/* =========================================
   EliteBench — Augmentation Platform
   v3.0 — Solarized Dark / Light
   ========================================= */

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

/* --- Solarized Dark (default) --- */
:root, [data-theme="dark"] {
    --void: #002b36;
    --deep: #073642;
    --surface: #094555;
    --surface-hi: #0d5666;

    --border: #094555;
    --border-hi: #0d5666;

    --text-1: #eee8d5;
    --text-2: #93a1a1;
    --text-3: #586e75;

    --teal: #2aa198;
    --teal-soft: rgba(42, 161, 152, 0.12);
    --teal-glow: rgba(42, 161, 152, 0.07);
    --cyan-hi: #38d4c8;

    --cat-core: #2aa198;
    --cat-ai: #7c81d4;
    --cat-tools: #c8a44e;

    --green: #859900;
    --green-soft: rgba(133, 153, 0, 0.12);

    --violet: #6c71c4;
    --orange: #cb4b16;

    --nav-bg: rgba(0, 43, 54, 0.75);
    --card-bg: rgba(7, 54, 66, 0.65);
    --card-hover: rgba(9, 69, 85, 0.55);
    --pipe-bg: rgba(7, 54, 66, 0.5);
    --glow-opacity: 0.5;

    --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(42, 161, 152, 0.06);
}

/* --- Solarized Light --- */
[data-theme="light"] {
    --void: #fdf6e3;
    --deep: #eee8d5;
    --surface: #ddd6c1;
    --surface-hi: #d0c9b4;

    --border: #d3cbb7;
    --border-hi: #c5bca6;

    --text-1: #073642;
    --text-2: #586e75;
    --text-3: #93a1a1;

    --nav-bg: rgba(253, 246, 227, 0.85);
    --card-bg: rgba(238, 232, 213, 0.75);
    --card-hover: rgba(221, 214, 193, 0.65);
    --pipe-bg: rgba(238, 232, 213, 0.6);
    --glow-opacity: 0.15;

    --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(42, 161, 152, 0.06);
}

:root {
    /* Typography */
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', monospace;

    /* Layout */
    --max-w: 920px;
    --r: 10px;
    --r-sm: 6px;
    --r-pill: 100px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* =========================================
   Atmosphere — Background layers
   ========================================= */

.atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

/* Noise texture for materiality */
.noise-layer {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* Breathing teal core — the platform heartbeat */
.core-glow {
    position: absolute;
    top: -15vh;
    left: 50%;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--teal-glow) 0%,
        rgba(42, 161, 152, 0.03) 35%,
        transparent 65%
    );
    transform: translateX(-50%);
    opacity: var(--glow-opacity);
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

/* =========================================
   Navigation
   ========================================= */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 52px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-brand:hover { color: var(--text-1); }

.nav-brand img {
    border-radius: 5px;
    opacity: 0.9;
}

.nav-brand strong {
    font-weight: 700;
    color: var(--text-1);
}

.nav-sys {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 4px 6px;
    cursor: pointer;
    color: var(--text-3);
    display: flex;
    align-items: center;
    transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
    color: var(--teal);
    border-color: var(--teal);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

.sys-label {
    color: var(--teal);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    opacity: 0.8;
}

#clock {
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    min-width: 5.5ch;
}

/* =========================================
   Main Layout
   ========================================= */

main {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   Hero
   ========================================= */

.hero {
    padding: 10rem 0 5rem;
    text-align: center;
}

.hero-inner > * {
    animation: fadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-inner > :nth-child(1) { animation-delay: 0.1s; }
.hero-inner > :nth-child(2) { animation-delay: 0.18s; }
.hero-inner > :nth-child(3) { animation-delay: 0.26s; }
.hero-inner > :nth-child(4) { animation-delay: 0.34s; }
.hero-inner > :nth-child(5) { animation-delay: 0.42s; }
.hero-inner > :nth-child(6) { animation-delay: 0.50s; }

/* Status pill */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 18px;
    border-radius: var(--r-pill);
    background: var(--green-soft);
    border: 1px solid rgba(16, 185, 129, 0.18);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 2.5rem;
}

.pill-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
    50% { opacity: 0.4; box-shadow: 0 0 2px rgba(16, 185, 129, 0.15); }
}

/* Wordmark */
.wordmark {
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 9vw, 5.8rem);
    font-weight: 800;
    color: var(--text-2);
    letter-spacing: -0.045em;
    line-height: 1;
    margin-bottom: 0.12em;
}

.wordmark strong {
    color: var(--text-1);
}

/* Tagline */
.tagline {
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 1.4vw, 0.82rem);
    font-weight: 400;
    color: var(--teal);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    margin-bottom: 1.8rem;
}

/* Description */
.desc {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-2);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.75;
}

/* CTAs */
.actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 26px;
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-fill {
    background: var(--teal);
    color: var(--void);
    border: 1px solid var(--teal);
}

.btn-fill:hover {
    background: var(--cyan-hi);
    border-color: var(--cyan-hi);
    box-shadow: 0 4px 24px rgba(42, 161, 152, 0.25);
}

.btn-line {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-hi);
}

.btn-line:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* Stats */
.stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-val {
    display: flex;
    align-items: baseline;
    font-family: var(--font-mono);
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--teal);
    line-height: 1;
}

.stat-sfx {
    font-size: 1.3rem;
    opacity: 0.6;
}

.stat-lbl {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 5px;
}

.stat-sep {
    width: 1px;
    height: 30px;
    background: var(--border);
}

/* =========================================
   Section Heads
   ========================================= */

.sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sec-head h2 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sec-count {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--teal);
    padding: 2px 12px;
    border-radius: var(--r-pill);
    background: var(--teal-soft);
    border: 1px solid rgba(42, 161, 152, 0.12);
}

/* =========================================
   Service Cards
   ========================================= */

.services {
    padding-bottom: 4rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.card {
    display: block;
    padding: 20px 20px 20px 22px;
    border-radius: var(--r);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cat-core);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;

    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(18px);
}

.card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Category borders */
.card.cat-ai   { border-left-color: var(--cat-ai); }
.card.cat-tools { border-left-color: var(--cat-tools); }

/* Hover */
.card:hover {
    transform: translateY(-4px);
    background: var(--card-hover);
    box-shadow: var(--shadow-card);
}

.card:hover svg {
    color: var(--teal);
}

/* Card internals */
.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    color: var(--text-3);
}

.card-top svg {
    transition: color 0.2s ease;
}

.led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-3);
}

.led.on {
    background: var(--green);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
}

.card p {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 14px;
}

.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tags span {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 400;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(42, 161, 152, 0.06);
    color: var(--teal);
    border: 1px solid rgba(42, 161, 152, 0.1);
    letter-spacing: 0.02em;
}

/* =========================================
   Architecture Pipeline
   ========================================= */

.arch {
    padding-bottom: 4rem;
}

.pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border-radius: var(--r);
    background: var(--pipe-bg);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0;
}

.pipe-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: var(--r-sm);
    background: var(--deep);
    border: 1px solid var(--border);
    color: var(--text-3);
    font-size: 0.72rem;
    font-weight: 500;
    min-width: 88px;
    transition: all 0.2s ease;
}

.pipe-node svg { color: var(--text-3); }

.pipe-active {
    border-color: rgba(42, 161, 152, 0.35);
    color: var(--text-1);
    background: rgba(42, 161, 152, 0.06);
    box-shadow: 0 0 24px rgba(42, 161, 152, 0.06);
}

.pipe-active svg { color: var(--teal); }

/* Animated connection lines */
.pipe-conn {
    width: 48px;
    height: 2px;
    background: var(--border);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.pipe-pulse {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--teal), transparent);
    animation: flowH 2.8s linear infinite;
}

@keyframes flowH {
    0%   { left: -100%; }
    100% { left: 100%; }
}

/* Network badges */
.net-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.net {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
}

.net-abyss {
    background: rgba(42, 161, 152, 0.06);
    color: var(--teal);
    border: 1px solid rgba(42, 161, 152, 0.12);
}

.net-sara {
    background: rgba(108, 113, 196, 0.06);
    color: var(--violet);
    border: 1px solid rgba(108, 113, 196, 0.12);
}

.net-web {
    background: rgba(203, 75, 22, 0.06);
    color: var(--orange);
    border: 1px solid rgba(203, 75, 22, 0.12);
}

/* =========================================
   Footer
   ========================================= */

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    font-size: 0.75rem;
    color: var(--text-3);
    border-top: 1px solid var(--border);
}

footer strong {
    font-weight: 600;
    color: var(--text-2);
}

/* =========================================
   Animations
   ========================================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 768px) {
    .hero {
        padding: 7rem 0 3.5rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .pipeline {
        flex-direction: column;
        padding: 1.5rem 1rem;
    }

    .pipe-conn {
        width: 2px;
        height: 28px;
    }

    .pipe-pulse {
        width: 100%;
        height: 100%;
        top: -100%;
        left: 0;
        background: linear-gradient(180deg, transparent, var(--teal), transparent);
        animation: flowV 2.8s linear infinite;
    }

    .actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }
}

@keyframes flowV {
    0%   { top: -100%; }
    100% { top: 100%; }
}

@media (max-width: 480px) {
    .hero { padding-top: 5.5rem; }
    .nav { padding: 0 1rem; }
    main { padding: 0 1rem; }

    .stats { gap: 1.2rem; }
    .stat-val { font-size: 1.8rem; }
    .stat-sep { display: none; }

    .wordmark { letter-spacing: -0.03em; }
}
