/* ============================================================
   Codex Alchemy — Shared Stylesheet
   Neumorphic fintech theme · Mobile-first · Responsive
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
    --bg-color: #f0f2f5;
    --white-glow: #ffffff;
    --soft-shadow: #d1d9e6;
    --gold-metallic: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    --gold: #D4AF37;
    --gold-light: #F1E5AC;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --lab-border: #e2e8f0;
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: #444;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

/* ----- Layout ----- */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .content {
        padding: 2rem;
    }
}

/* ----- Typography ----- */
.terminal-text {
    font-family: 'Courier New', Courier, monospace;
    color: #aa771c;
    letter-spacing: 2px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2rem;
    font-weight: 500;
    color: #444;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-sub {
    color: #666;
    line-height: 1.7;
    font-size: 0.9rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-sub code {
    color: #c02d76;
}

.gold-shimmer {
    background: linear-gradient(
        90deg,
        #bf953f 0%,
        #fcf6ba 25%,
        #b38728 50%,
        #fbf5b7 75%,
        #aa771c 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-move 4s linear infinite;
}

/* ----- Navigation (.lab-nav) ----- */
.lab-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(240, 242, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lab-border);
}

@media (max-width: 768px) {
    .lab-nav {
        flex-wrap: wrap;
    }
}

@media (min-width: 769px) {
    .lab-nav {
        padding: 20px 40px;
    }
}

.nav-left {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-right {
        width: 100%;
        margin-top: 10px;
        justify-content: flex-start;
    }
}

.nav-logo {
    font-weight: 800;
    letter-spacing: 2px;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.nav-logo::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-metallic);
    transition: width 0.3s ease;
}

.nav-logo:hover::after {
    width: 100%;
}

.status-tag {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    color: #64748b;
}

@media (max-width: 768px) {
    .status-tag {
        display: none;
    }
}

.blink {
    color: #22c55e;
    animation: blink 1s infinite;
}

.neu-nav-btn {
    border-radius: 10px;
    height: 38px;
    padding: 0 12px;
    min-width: 80px;
    background: var(--bg-color);
    box-shadow: 5px 5px 10px var(--soft-shadow),
                -5px -5px 10px var(--white-glow);
    font-weight: 700;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.2s ease;
}

.neu-nav-btn:active {
    box-shadow: inset 3px 3px 6px var(--soft-shadow),
                inset -3px -3px 6px var(--white-glow);
}

@media (min-width: 768px) {
    .neu-nav-btn {
        min-width: 100px;
        font-size: 0.65rem;
    }
}

.btn-gold-shimmer {
    background: linear-gradient(
        90deg,
        #bf953f,
        #fcf6ba,
        #b38728,
        #fbf5b7,
        #aa771c,
        #bf953f,
        #fcf6ba,
        #b38728
    );
    background-size: 400% 100%;
    border-radius: 15px;
    padding: 12px 25px;
    color: #3d2b08;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    animation: shimmer-move 24s infinite linear;
    box-shadow: 0 10px 20px rgba(184, 134, 11, 0.3);
    font-size: 0.7rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gold-shimmer:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(184, 134, 11, 0.4);
}

@media (min-width: 768px) {
    .btn-gold-shimmer {
        padding: 15px 40px;
    }
}

/* ----- Hero Section (.lab-hero) ----- */
.lab-hero {
    text-align: center;
    padding: 40px 20px;
}

@media (min-width: 768px) {
    .lab-hero {
        padding: 60px 40px;
    }
}

/* ----- Circuit Board Widget (.circuit-board) ----- */
.circuit-board {
    --r-base: 120px;
    --r-ext: 150px;
    --chip-size: 75px;
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    margin: 2rem auto;
}

@media (min-width: 768px) {
    .circuit-board {
        --r-base: 200px;
        --r-ext: 250px;
        --chip-size: 90px;
        margin: 3rem auto;
    }
}

@media (min-width: 1024px) {
    .circuit-board {
        --r-base: 300px;
        --r-ext: 350px;
        --chip-size: 110px;
        margin: 4rem auto;
    }
}

.rectilinear-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.gold-wire {
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.5;
    opacity: 0.1;
}

.button-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--chip-size);
    height: var(--chip-size);
    z-index: 10;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%)
               rotate(var(--angle, 0deg))
               translateX(var(--radius, var(--r-base)))
               rotate(calc(-1 * var(--angle, 0deg)));
}

.neu-chip {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: var(--bg-color);
    box-shadow: 8px 8px 16px var(--soft-shadow),
                -8px -8px 16px var(--white-glow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    transition: transform 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.neu-chip:hover {
    transform: translateY(-5px);
    color: var(--gold);
}

.neu-chip.active {
    box-shadow: inset 4px 4px 8px var(--soft-shadow),
                inset -4px -4px 8px var(--white-glow);
}

.chip-label-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

@media (min-width: 768px) {
    .chip-label-stack {
        font-size: 0.65rem;
    }
}

.hub-anchor {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: 20;
    width: 100%;
    max-width: 400px;
}

/* ----- Glass Panel (Product Detail Modal) ----- */
.glass-panel {
    background: rgba(240, 242, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 10px 10px 20px var(--soft-shadow),
                -10px -10px 20px var(--white-glow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #444;
}

.gold-divider {
    width: 40px;
    height: 3px;
    background: var(--gold-metallic);
    margin: 10px 0 15px;
    border-radius: 2px;
}

.btn-gold {
    padding: 12px 30px;
    border-radius: 15px;
    border: none;
    background: var(--gold-metallic);
    color: #3d2b08;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(184, 134, 11, 0.25);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(184, 134, 11, 0.35);
}

/* ----- Alchemy Symbol Hub ----- */
.central-hub-container {
    position: relative;
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ps-container,
.pulse-ring {
    width: 260px;
    height: 260px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
    margin: 0 auto;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    animation: none !important;
}

@media (min-width: 768px) {
    .ps-container,
    .pulse-ring {
        width: 340px;
        height: 340px;
    }
}

.alch-glyph {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Noto Sans Symbols 2', 'Segoe UI Symbol', sans-serif !important;
    font-size: 140px;
    line-height: 1;
    display: inline-block;
    background: var(--gold-metallic);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #D4AF37;
    filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.55));
    user-select: none;
    pointer-events: none;
    overflow: visible !important;
    text-align: center;
}

@media (min-width: 768px) {
    .alch-glyph {
        font-size: 190px;
    }
}

.alch-glyph.animating {
    animation: glyph-transmute 6s cubic-bezier(0.2, 0.8, 0.4, 1) forwards, shimmer-move 4s linear infinite;
}

/* ----- Product Grid Section ----- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
}

.neu-card {
    background: var(--bg-color);
    padding: 30px 25px;
    border-radius: 25px;
    box-shadow: 8px 8px 16px var(--soft-shadow),
                -8px -8px 16px var(--white-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.neu-card:hover {
    transform: translateY(-5px);
}

@media (min-width: 768px) {
    .neu-card {
        padding: 40px 30px;
        border-radius: 30px;
    }
}

.gold-connector-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    background: var(--gold-metallic);
    border-radius: 0 0 4px 4px;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(
        135deg,
        #bf953f,
        #fcf6ba,
        #b38728,
        #fbf5b7,
        #aa771c
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.node-id {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.65rem;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.spec-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    text-align: left;
}

.spec-list li {
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #555;
}

.gold-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: var(--gold-metallic);
    margin-top: 6px;
}

/* ----- Product Page Specific ----- */
.product-header-area {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .product-header-area {
        flex-wrap: wrap;
    }
}

@media (min-width: 769px) {
    .product-header-area {
        gap: 20px;
    }
}

.status-badge {
    background: var(--bg-color);
    box-shadow: inset 3px 3px 6px var(--soft-shadow),
                inset -3px -3px 6px var(--white-glow);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #4CAF50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
    animation: pulse 2s infinite;
}

.action-footer {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .action-footer {
        flex-wrap: wrap;
    }

    .action-footer .btn-gold-shimmer,
    .action-footer .btn-neu-back {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .action-footer {
        gap: 20px;
    }
}

.btn-neu-back {
    background: var(--bg-color);
    box-shadow: 5px 5px 10px var(--soft-shadow),
                -5px -5px 10px var(--white-glow);
    padding: 12px 20px;
    border-radius: 15px;
    border: none;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: box-shadow 0.2s ease;
}

.btn-neu-back:active {
    box-shadow: inset 3px 3px 6px var(--soft-shadow),
                inset -3px -3px 6px var(--white-glow);
}

@media (min-width: 769px) {
    .btn-neu-back {
        padding: 15px 30px;
    }
}

/* ----- Contact Modal ----- */
.signup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 242, 245, 0.7);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.contact-panel {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: #f0f2f5;
    padding: 30px;
    border-radius: 30px;
    box-shadow: 12px 12px 24px var(--soft-shadow),
                -12px -12px 24px var(--white-glow);
    max-height: 90vh;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .contact-panel {
        padding: 40px;
        border-radius: 40px;
    }
}

.contact-methods {
    margin-top: 20px;
}

.method-card {
    margin-bottom: 0;
}

.neu-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #9aa;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.data-reveal-box {
    min-width: auto;
    background: var(--bg-color);
    padding: 12px 15px;
    border-radius: 18px;
    box-shadow: inset 4px 4px 8px var(--soft-shadow),
                inset -4px -4px 8px var(--white-glow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

@media (min-width: 768px) {
    .data-reveal-box {
        padding: 15px 25px;
    }
}

.reveal-wrapper {
    position: relative;
    display: flex;
    overflow: hidden;
    height: 30px;
    flex-grow: 1;
    align-items: center;
}

.alchemy-mask {
    position: absolute;
    font-family: 'Noto Sans Symbols 2', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 5px;
    white-space: nowrap;
    background: linear-gradient(
        90deg,
        #bf953f 0%,
        #fcf6ba 25%,
        #b38728 50%,
        #fbf5b7 75%,
        #aa771c 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-move 4s linear infinite;
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}

@media (min-width: 768px) {
    .alchemy-mask {
        font-size: 1.4rem;
    }
}

.email-text-real {
    position: absolute;
    font-weight: 700;
    font-size: 0.8rem;
    color: #444;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (min-width: 768px) {
    .email-text-real {
        font-size: 0.95rem;
    }
}

.reveal-container:hover .alchemy-mask {
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(5px);
}

.reveal-container:hover .email-text-real {
    opacity: 1;
    transform: translateY(0);
}

.copy-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--bg-color);
    box-shadow: 4px 4px 8px var(--soft-shadow),
                -4px -4px 8px var(--white-glow);
    border-radius: 12px;
    border: none;
    color: #aa771c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.copy-btn:hover {
    transform: scale(1.05);
}

.copy-btn.active-success {
    box-shadow: inset 3px 3px 6px var(--soft-shadow),
                inset -3px -3px 6px var(--white-glow);
    color: #28a745;
    transform: scale(0.95);
}

.privacy-notice {
    margin-top: 25px;
    font-size: 0.65rem;
    color: #9aa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ----- Footer (.lab-footer) ----- */
.lab-footer {
    text-align: center;
    padding: 20px;
}

.footer-data-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2px;
    gap: 10px;
}

.data-badge-neu {
    background: var(--bg-color);
    box-shadow: 5px 5px 10px var(--soft-shadow),
                -5px -5px 10px var(--white-glow);
    padding: 12px 20px;
    border-radius: 15px;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
}

@media (min-width: 768px) {
    .data-badge-neu {
        min-width: 200px;
    }
}

.badge-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: #aa771c;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.badge-value {
    font-size: 0.75rem;
    color: #556;
    font-weight: 600;
}

@media (min-width: 768px) {
    .badge-value {
        font-size: 0.85rem;
    }
}

.legal-text {
    color: #889;
    font-size: 0.75rem;
}

/* ----- Background Effects ----- */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            rgba(0, 0, 0, 0.03) 49px,
            rgba(0, 0, 0, 0.03) 50px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(0, 0, 0, 0.03) 49px,
            rgba(0, 0, 0, 0.03) 50px
        );
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.conduit-system {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.gold-line {
    stroke: var(--gold);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 8 4;
    animation: gold-line-dash 2s linear infinite;
}

@keyframes gold-line-dash {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -24;
    }
}

/* ----- Animations ----- */
@keyframes shimmer-move {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

@keyframes pulse-ring {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

@keyframes glyph-transmute {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
        filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.2));
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.9);
        filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
    }
    70% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1.3);
        filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.8));
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.0);
        filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0));
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes data-packet {
    0% {
        offset-distance: 0%;
    }
    100% {
        offset-distance: 100%;
    }
}

.data-packet {
    r: 8;
    fill: #D4AF37;
    opacity: 0.8;
    animation: data-packet 1.5s ease-in-out forwards;
}

/* ----- Utility ----- */
.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
