@view-transition {
    navigation: auto;
}

:root {
            color-scheme: light;
            --bg: #fff;
            --text: #000;
            --muted: #666;
            --subtle: #999;
            --line: #e5e5e5;
            --surface: #fafafa;
            --button-bg: transparent;
            --button-border: #e5e5e5;
            --button-text: #000;
            --button-hover-bg: #000;
            --button-hover-text: #fff;
            --faint: #ccc;
        }

        @media (prefers-color-scheme: dark) {
            :root {
                color-scheme: dark;
                --bg: #101214;
                --text: #f4efe8;
                --muted: #c1b8ab;
                --subtle: #938c84;
                --line: #2c3238;
                --surface: #181c20;
                --button-bg: rgba(255, 255, 255, 0.03);
                --button-border: #394149;
                --button-text: #f4efe8;
                --button-hover-bg: #f4efe8;
                --button-hover-text: #101214;
                --faint: #5a636d;
            }
        }

        :root[data-theme="light"] {
            color-scheme: light;
            --bg: #fff;
            --text: #000;
            --muted: #666;
            --subtle: #999;
            --line: #e5e5e5;
            --surface: #fafafa;
            --button-bg: transparent;
            --button-border: #e5e5e5;
            --button-text: #000;
            --button-hover-bg: #000;
            --button-hover-text: #fff;
            --faint: #ccc;
        }

        :root[data-theme="dark"] {
            color-scheme: dark;
            --bg: #101214;
            --text: #f4efe8;
            --muted: #c1b8ab;
            --subtle: #938c84;
            --line: #2c3238;
            --surface: #181c20;
            --button-bg: rgba(255, 255, 255, 0.03);
            --button-border: #394149;
            --button-text: #f4efe8;
            --button-hover-bg: #f4efe8;
            --button-hover-text: #101214;
            --faint: #5a636d;
        }

        @keyframes fade-shift {
            0% {
                color: #80cbc4;
            }

            50% {
                color: #c42b8c;
            }

            100% {
                color: #80cbc4;
            }
        }

        html {
            scroll-behavior: smooth;
        }

        @media (prefers-reduced-motion: reduce) {
            html {
                scroll-behavior: auto;
            }
        }

        /* Ensure anchor scroll targets have top clearance for sticky header */
        section,
        [id] {
            scroll-margin-top: 5.5rem;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            line-height: 1.5;
            color: var(--text);
            background: var(--bg);
            -webkit-font-smoothing: antialiased;
            transition: background-color 0.35s ease, color 0.35s ease;
            position: relative;
            overflow-x: hidden;
        }

        .hex-bg-canvas {
            position: absolute;
            left: 0;
            width: 100%;
            pointer-events: none;
            z-index: 0;
            will-change: opacity;
            opacity: 1;
            transition: opacity 0.15s ease-out;
        }

        .hex-bg-top {
            top: 0;
            height: 95vh;
            min-height: 760px;
            max-height: 1280px;
            mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 65%, rgba(0, 0, 0, 0) 100%);
            -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 65%, rgba(0, 0, 0, 0) 100%);
        }

        .hex-bg-bottom {
            bottom: 0;
            height: 560px;
            mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0) 100%);
            -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 50%, rgba(0, 0, 0, 0) 100%);
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 3rem;
            position: relative;
            z-index: 1;
        }

        header {
            padding: 8rem 0 0rem 0;
            /* border-bottom: 1px solid var(--line); */
        }

        .header-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 2rem;
            margin-bottom: 6rem;
            position: relative;
            width: 100%;
            transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 1000;
        }

        .header-placeholder {
            display: none;
            width: 100%;
        }

        .header-nav-wrapper {
            display: flex;
            align-items: center;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .logo {
            font-size: 1.125rem;
            font-weight: 400;
            letter-spacing: 0.05em;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            text-transform: uppercase;
        }

        .logo-icon {
            font-size: 1.5rem;
            animation: fade-shift 15s infinite ease-in-out;
            transition: color 0.5s;
        }

        h1 {
            font-size: 5.5rem;
            font-weight: 300;
            line-height: 1.1;
            letter-spacing: -0.03em;
            max-width: 900px;
            margin-bottom: 3rem;
        }

        .intro {
            font-size: 1.5rem;
            font-weight: 300;
            line-height: 1.6;
            color: var(--muted);
            max-width: 700px;
        }

        section {
            padding: 8rem 0;
            border-bottom: 1px solid var(--line);
        }

        section:last-of-type {
            border-bottom: none;
        }

        .section-label {
            font-size: 0.875rem;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            color: var(--subtle);
            margin-bottom: 4rem;
        }

        .capabilities {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4rem 6rem;
        }

        .capability {
            font-size: 1.75rem;
            font-weight: 300;
            line-height: 1.3;
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0;
            margin-top: 4rem;
        }

        .product {
            border-right: 1px solid var(--line);
            border-bottom: 1px solid var(--line);
            padding: 3rem 2.5rem;
            position: relative;
            overflow: hidden;
            transition: background 0.4s ease;
            display: flex;
            align-items: flex-start;
            gap: 1rem;
        }

        .product-content {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .product-name {
            font-size: 1.5rem;
            font-weight: 400;
        }

        .product-name a {
            color: var(--text);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .product-name a:hover,
        .product-name a:focus-visible {
            color: var(--muted);
        }

        .product-description {
            font-size: 1rem;
            color: var(--muted);
            line-height: 1.4;
            margin-bottom: 0.5rem;
        }

        .product-link {
            color: var(--muted);
            text-decoration: none;
            font-size: 0.9rem;
            letter-spacing: 0.02em;
            transition: color 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
        }

        .product-link .material-symbols-outlined {
            font-size: 1.1em;
        }

        .product:nth-child(3n) {
            border-right: none;
        }

        .product:hover {
            background: var(--surface);
        }

        .product:hover .product-link {
            color: var(--text);
        }

        .retired-section {
            margin-top: 6rem;
        }

        .retired-grid {
            display: flex;
            gap: 3rem;
            margin-top: 2rem;
            flex-wrap: wrap;
        }

        .retired-item {
            font-size: 1rem;
            color: var(--subtle);
        }

        .retired-item a {
            color: var(--subtle);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .retired-item a:hover {
            color: var(--muted);
        }

        .nyt-badge {
            font-size: 0.75rem;
            color: var(--faint);
            margin-left: 0.5rem;
        }

        .contact-container {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-top: 2rem;
            position: relative;
        }

        .email {
            font-size: 1.75rem;
            font-weight: 300;
            color: var(--text);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .email:hover {
            color: var(--muted);
        }

        .copy-btn {
            background: var(--button-bg);
            border: 1px solid var(--button-border);
            padding: 0.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            border-radius: 4px;
            color: var(--button-text);
        }

        .copy-btn:hover {
            border-color: var(--button-hover-bg);
            background: var(--button-hover-bg);
            color: var(--button-hover-text);
        }

        .copy-btn:hover svg {
            stroke: currentColor;
        }

        .copy-btn svg {
            stroke: currentColor;
            transition: stroke 0.3s ease;
        }

        .copy-feedback {
            position: absolute;
            left: 0;
            top: -2rem;
            font-size: 0.875rem;
            color: var(--text);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .copy-feedback.show {
            opacity: 1;
        }

        .theme-toggle {
            appearance: none;
            border: 1px solid var(--button-border);
            background: var(--button-bg);
            color: var(--button-text);
            border-radius: 50%;
            width: 38px;
            height: 38px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        }

        .theme-toggle .material-symbols-outlined {
            font-size: 20px;
        }

        .theme-toggle:hover {
            border-color: var(--button-hover-bg);
            background: var(--button-hover-bg);
            color: var(--button-hover-text);
        }

        .theme-toggle:focus-visible,
        .copy-btn:focus-visible,
        .email:focus-visible,
        .retired-item a:focus-visible,
        .product-link:focus-visible {
            outline: 2px solid var(--text);
            outline-offset: 3px;
        }

        footer {
            padding: 4rem 0;
            font-size: 0.875rem;
            color: var(--subtle);
        }

        @media (max-width: 1024px) {
            .container {
                padding: 0 2rem;
            }

            h1 {
                font-size: 4rem;
            }

            .capabilities {
                grid-template-columns: repeat(2, 1fr);
                gap: 3rem 4rem;
            }

            .products-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .product:nth-child(3n) {
                border-right: 1px solid var(--line);
            }

            .product:nth-child(2n) {
                border-right: none;
            }
        }

        @media (max-width: 768px) {
            header {
                padding: 4rem 0 6rem;
            }

            .header-meta {
                gap: 1.5rem;
                margin-bottom: 3rem;
            }

            h1 {
                font-size: 2.5rem;
            }

            .intro {
                font-size: 1.25rem;
            }

            section {
                padding: 4rem 0;
            }

            .capabilities {
                grid-template-columns: 1fr;
                gap: 2rem;
            }

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

            .product {
                border-right: none;
            }

            .product:nth-child(3n),
            .product:nth-child(2n) {
                border-right: none;
            }

        }

        p {
            font-size: 1.5rem;
            /* Approx 18px */
            line-height: 1.6;
            /* Spacious vertical breathing room */
            /*max-width: 65ch;           /* Optimal line length for focus */
            /*color: #333;               /* High contrast but softer than pure black */
            text-align: left;
            /* Predictable starting point for eyes */
            text-wrap: pretty;
            /* Prevents awkward line endings */
            margin-bottom: 1.5em;
            /* Clear separation between paragraphs */
        }

        a {
            color: var(--text);
            text-decoration: none;
            transition: color 0.3s ease, text-decoration-color 0.3s ease;
        }

/* Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links .nav-item {
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
    color: var(--text);
}

.nav-toggle {
    appearance: none;
    border: 1px solid var(--button-border);
    background: var(--button-bg);
    color: var(--button-text);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.nav-toggle .material-symbols-outlined {
    font-size: 20px;
}

.nav-toggle:hover {
    border-color: var(--button-hover-bg);
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

/* ==========================================================================
   Collapsed Sticky Floating Pill State
   ========================================================================== */
.header-meta.is-scrolled {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 3rem), 1340px);
    margin-bottom: 0;
    padding: 0.65rem 1.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.08),
                0 4px 10px -2px rgba(0, 0, 0, 0.04);
    animation: headerSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headerSlideDown {
    from {
        transform: translate(-50%, -10px);
        opacity: 0.9;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@media (prefers-color-scheme: dark) {
    .header-meta.is-scrolled {
        background: rgba(24, 28, 32, 0.85);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5),
                    0 4px 12px -2px rgba(0, 0, 0, 0.3);
    }
}

:root[data-theme="light"] .header-meta.is-scrolled {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--line);
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.08),
                0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

:root[data-theme="dark"] .header-meta.is-scrolled {
    background: rgba(24, 28, 32, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5),
                0 4px 12px -2px rgba(0, 0, 0, 0.3);
}

.header-meta.is-scrolled .logo {
    font-size: 1rem;
}

.header-meta.is-scrolled .logo-icon {
    font-size: 1.25rem;
}

.header-meta.is-scrolled .nav-links {
    gap: 1.25rem;
}

.header-meta.is-scrolled .nav-links a {
    font-size: 0.85rem;
}

.header-meta.is-scrolled .theme-toggle,
.header-meta.is-scrolled .nav-toggle {
    width: 34px;
    height: 34px;
}

.header-meta.is-scrolled .theme-toggle .material-symbols-outlined,
.header-meta.is-scrolled .nav-toggle .material-symbols-outlined {
    font-size: 18px;
}

@media (max-width: 768px) {
    .header-meta {
        gap: 1rem;
        margin-bottom: 3.5rem;
        align-items: center;
    }

    .header-meta.is-scrolled {
        width: calc(100% - 2rem);
        top: 0.75rem;
        padding: 0.55rem 1rem;
        border-radius: 9999px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .header-nav-wrapper {
        position: static;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        width: 100%;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        z-index: 100;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .nav-links.open {
        display: flex;
        animation: navFadeDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes navFadeDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links .nav-item {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        font-size: 0.95rem;
        letter-spacing: 0.03em;
        color: var(--text);
    }

    .nav-links a:hover,
    .nav-links a:focus-visible,
    .nav-links a.active {
        background: var(--line);
        color: var(--text);
    }
}
