/* ==========================================================================
   Lean Value Tech — System Design Language
   Dark, blueprint-inspired, Linear/Anthropic-grade.
   - Root pages (index / lean-ai / lean-fde) load ONLY this file.
   - Legacy pages (lean-data/*, about, contact) load style.css first, then
     this file: the token remap + Part 6 reskin rules restyle them without
     touching their markup or layout.
   ========================================================================== */

/* ---------- Part 1 · Design tokens ---------- */
:root {
    /* New system tokens */
    --sys-bg-0: #05080F;
    --sys-bg-1: #0A0F1E;
    --sys-bg-2: #0D1526;
    --sys-cyan: #22D3EE;
    --sys-cyan-soft: #7DD3FC;
    --sys-indigo: #818CF8;
    --sys-violet: #A78BFA;
    --sys-grad: linear-gradient(92deg, #22D3EE 0%, #818CF8 52%, #A78BFA 100%);
    --sys-glass: linear-gradient(180deg, rgba(148, 178, 255, 0.055), rgba(148, 178, 255, 0.018));
    --sys-glass-border: rgba(148, 178, 255, 0.13);
    --sys-grid-line: rgba(120, 165, 255, 0.055);
    --sys-glow-cyan: rgba(34, 211, 238, 0.16);
    --sys-glow-violet: rgba(139, 92, 246, 0.14);

    /* Legacy variable names, remapped to the system palette.
       On legacy pages these override style.css :root (same specificity,
       later file), so every var()-driven rule in style.css re-skins itself. */
    --primary-bg: #05080F;
    --accent-cyan: #22D3EE;
    --accent-orange: #8B5CF6;
    --text-primary: #F2F5FA;
    --text-secondary: #A7B0C2;
    --text-muted: #68738C;
    --card-bg: rgba(148, 178, 255, 0.045);
    --card-border: rgba(148, 178, 255, 0.13);
    --hover-bg: rgba(34, 211, 238, 0.10);
    --font-heading: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --border-radius: 14px;
    --transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

::selection {
    background: rgba(34, 211, 238, 0.35);
    color: #FFFFFF;
}

/* ---------- Part 2 · Base (root pages carry no other stylesheet) ------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: var(--sys-bg-0);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

a {
    color: var(--sys-cyan);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--sys-cyan-soft);
}

.grad-text {
    background: var(--sys-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Section eyebrow: chapter number + wide tracking, e.g. "01 — THE SYSTEM" */
.eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--sys-cyan);
    margin-bottom: 1.1rem;
}

.eyebrow::before,
.eyebrow::after {
    content: "";
    width: 2.4rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.65));
}

.eyebrow::after {
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.65), transparent);
}

/* ---------- Part 3 · Header & navigation (shared markup, all pages) ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.85rem 0;
    background: rgba(5, 8, 15, 0.72);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid rgba(148, 178, 255, 0.10);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 8, 15, 0.92);
    border-bottom-color: rgba(148, 178, 255, 0.18);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-heading);
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.logo::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: var(--sys-grad);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.75);
    flex: none;
}

.logo:hover {
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.3rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.85rem;
    border-radius: 9px;
    transition: var(--transition);
    display: inline-block;
}

.nav-menu a:hover {
    color: #FFFFFF;
    background: rgba(148, 178, 255, 0.08);
}

.nav-menu a.active {
    color: var(--sys-cyan);
    background: rgba(34, 211, 238, 0.10);
}

/* Pure-CSS dropdown (Lean Data submenu) */
.nav-menu .nav-dropdown {
    position: relative;
}

.nav-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 228px;
    list-style: none;
    background: rgba(8, 12, 24, 0.92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(148, 178, 255, 0.16);
    border-radius: 14px;
    padding: 0.45rem;
    z-index: 1002;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(34, 211, 238, 0.05), 0 8px 40px rgba(34, 211, 238, 0.07);
}

.nav-menu .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-menu .nav-dropdown:hover .dropdown-menu,
.nav-menu .nav-dropdown:focus-within .dropdown-menu {
    display: block;
}

.nav-menu .dropdown-menu li {
    width: 100%;
}

.nav-menu .dropdown-menu a {
    display: block;
    padding: 0.55rem 0.8rem;
    border-radius: 9px;
    white-space: nowrap;
    font-size: 0.92rem;
}

.nav-menu .dropdown-menu a:hover {
    background: rgba(34, 211, 238, 0.10);
    color: #FFFFFF;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- Part 4 · Heroes -------------------------------------------- */
.hero,
.page-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(880px 480px at 82% -12%, var(--sys-glow-violet), transparent 62%),
        radial-gradient(760px 460px at 12% -8%, var(--sys-glow-cyan), transparent 60%),
        linear-gradient(180deg, var(--sys-bg-1) 0%, var(--sys-bg-0) 88%);
}

/* Blueprint grid layer */
.hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--sys-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--sys-grid-line) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 96%);
    mask-image: linear-gradient(180deg, #000 30%, transparent 96%);
}

.hero {
    margin-top: 64px;
    padding: 7.5rem 0 5.5rem;
    text-align: center;
}

.hero-content {
    max-width: 920px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.7rem, 6vw, 4.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.06;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.18rem;
    color: var(--text-secondary);
    line-height: 1.85;
    max-width: 820px;
    margin: 0 auto var(--spacing-lg);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Layer chips under the hero CTAs */
.hero-layers {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3.2rem;
}

.hero-layers a {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 0.55rem 1rem;
    border: 1px solid rgba(148, 178, 255, 0.16);
    border-radius: 999px;
    background: rgba(148, 178, 255, 0.04);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-layers a:hover {
    color: #FFFFFF;
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.18);
}

.hero-layers .n {
    color: var(--sys-cyan);
    margin-right: 0.45rem;
}

.page-hero {
    margin-top: 64px;
    padding: 6.5rem 0 5rem;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.page-hero p {
    font-size: 1.15rem;
    max-width: 820px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ---------- Part 5 · Buttons ------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.95rem 1.9rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.98rem;
    font-family: var(--font-body);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(92deg, #0EA5C6 0%, #22D3EE 42%, #8B5CF6 105%);
    color: #051019;
    box-shadow: 0 10px 34px -8px rgba(34, 211, 238, 0.45);
}

.btn-primary:hover {
    color: #051019;
    transform: translateY(-2px);
    box-shadow: 0 16px 44px -8px rgba(34, 211, 238, 0.55);
    filter: brightness(1.07);
}

.btn-secondary {
    background: rgba(148, 178, 255, 0.05);
    color: #E8F4FF;
    border: 1px solid rgba(148, 178, 255, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-secondary:hover {
    color: #FFFFFF;
    border-color: rgba(34, 211, 238, 0.6);
    background: rgba(34, 211, 238, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -10px rgba(34, 211, 238, 0.35);
}

/* ---------- Part 6 · Sections & cards -------------------------------- */
.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: var(--spacing-md);
}

.section-intro {
    text-align: center;
    max-width: 820px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 1.06rem;
    line-height: 1.8;
}

.content-section h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.content-section h2::after {
    content: "";
    display: block;
    width: 3.2rem;
    height: 3px;
    border-radius: 3px;
    margin-top: 0.9rem;
    background: var(--sys-grad);
}

.content-block {
    margin-bottom: var(--spacing-md);
}

.content-block h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: #FFFFFF;
}

.content-block p,
.content-block li {
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-block ul {
    padding-left: 1.3rem;
}

.content-block strong {
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.offerings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card,
.offering-card,
.impact-card {
    position: relative;
    background: var(--sys-glass);
    border: 1px solid var(--sys-glass-border);
    border-radius: 16px;
    padding: var(--spacing-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    overflow: hidden;
}

.feature-card::before,
.offering-card::before,
.impact-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--sys-grad);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.feature-card:hover,
.offering-card:hover,
.impact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 22px 55px -18px rgba(34, 211, 238, 0.28), 0 4px 24px rgba(0, 0, 0, 0.35);
}

.feature-card:hover::before,
.offering-card:hover::before,
.impact-card:hover::before {
    opacity: 1;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-size: 1.35rem;
    border-radius: 12px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(148, 178, 255, 0.18);
    margin-bottom: var(--spacing-sm);
}

.feature-card h3,
.offering-card h3 {
    color: #FFFFFF;
    font-size: 1.22rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card p,
.offering-card p {
    color: var(--text-secondary);
    line-height: 1.75;
}

.feature-card ul,
.offering-card ul {
    list-style: none;
    padding-left: 0;
}

.feature-card li,
.offering-card li {
    color: var(--text-secondary);
    padding: 0.45rem 0 0.45rem var(--spacing-md);
    position: relative;
    line-height: 1.65;
}

.feature-card li::before,
.offering-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--sys-cyan);
    font-weight: 600;
}

.impact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.impact-card h4 {
    color: #FFFFFF;
    font-size: 1.12rem;
    margin-bottom: var(--spacing-sm);
}

.impact-card p,
.impact-card li {
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ---------- Part 7 · The stack (three-layer architecture) ------------- */
.stack {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: var(--spacing-lg);
}

.stack-layer {
    position: relative;
    background: var(--sys-glass);
    border: 1px solid var(--sys-glass-border);
    border-radius: 18px;
    padding: 2.1rem 2.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: var(--transition);
}

.stack-layer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--sys-cyan);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
}

.stack-layer[data-layer="2"]::before {
    background: var(--sys-indigo);
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.55);
}

.stack-layer[data-layer="3"]::before {
    background: var(--sys-violet);
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.55);
}

@media (min-width: 900px) {
    .stack-layer[data-layer="2"] { margin-left: 2.6rem; }
    .stack-layer[data-layer="3"] { margin-left: 5.2rem; }
}

.stack-layer:hover {
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 24px 60px -20px rgba(34, 211, 238, 0.30);
}

.stack-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.7rem;
}

.stack-no {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--sys-cyan);
}

.stack-layer[data-layer="2"] .stack-no { color: var(--sys-indigo); }
.stack-layer[data-layer="3"] .stack-no { color: var(--sys-violet); }

.stack-layer h3 {
    font-size: 1.55rem;
    font-weight: 700;
}

.stack-layer p {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 880px;
}

.stack-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Connector caption between stack and next section */
.stack-base {
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    margin-top: 1.4rem;
}

/* ---------- Part 8 · Method chain -------------------------------------- */
.chain {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.chain-step {
    position: relative;
    background: var(--sys-glass);
    border: 1px solid var(--sys-glass-border);
    border-radius: 16px;
    padding: 1.8rem 1.7rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.chain-step:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 22px 55px -18px rgba(34, 211, 238, 0.28);
}

.chain-no {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--sys-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    line-height: 1;
}

.chain-zh {
    display: block;
    margin-top: 0.65rem;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: #FFFFFF;
}

.chain-step h3 {
    font-size: 1.13rem;
    margin: 0.55rem 0 0.6rem;
    color: #FFFFFF;
}

.chain-step p {
    color: var(--text-secondary);
    line-height: 1.72;
    font-size: 0.96rem;
}

@media (min-width: 1100px) {
    /* Inter-step arrows are inline SVG (.chain-arrow, Part 13) — the old
       text glyph is retired so the pulse animation can travel the path. */
    .chain-step:not(:last-child)::after {
        content: none;
    }
}

/* ---------- Part 9 · Founder, CTA, footer ------------------------------ */
.founder-section {
    background: rgba(255, 255, 255, 0.015);
}

.founder-content {
    max-width: 900px;
    margin: 0 auto;
}

.founder-text p,
.founder-content p {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: var(--spacing-sm);
}

.founder-content h3 {
    color: #FFFFFF;
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
}

.media-strip {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.media-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.media-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.media-logos span {
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(148, 178, 255, 0.14);
    border-radius: 999px;
    background: rgba(148, 178, 255, 0.04);
}

.cta-section {
    text-align: center;
    background:
        radial-gradient(700px 340px at 50% -20%, var(--sys-glow-cyan), transparent 65%),
        linear-gradient(135deg, rgba(34, 211, 238, 0.09) 0%, rgba(139, 92, 246, 0.10) 100%);
    border-top: 1px solid rgba(148, 178, 255, 0.10);
    border-bottom: 1px solid rgba(148, 178, 255, 0.10);
}

.cta-text {
    max-width: 720px;
    margin: 0 auto var(--spacing-lg);
    font-size: 1.08rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.footer {
    background: #04060C;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid rgba(148, 178, 255, 0.10);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
    color: #FFFFFF;
    font-size: 1.02rem;
    margin-bottom: var(--spacing-sm);
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.94rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.55rem;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.94rem;
}

.footer-col a:hover {
    color: var(--sys-cyan);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 178, 255, 0.08);
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.86rem;
}

/* ---------- Part 10 · Scroll reveal (root pages, via system.js) -------- */
.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

.js .reveal-d1 { transition-delay: 0.08s; }
.js .reveal-d2 { transition-delay: 0.16s; }
.js .reveal-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .js .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ---------- Part 11 · Responsive nav & layout --------------------------- */
@media (max-width: 900px) {
    .stack-layer {
        padding: 1.6rem 1.4rem;
    }
}

@media (max-width: 860px) {
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        top: 62px;
        left: -100%;
        flex-direction: column;
        align-items: stretch;
        background: rgba(6, 9, 18, 0.98);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        width: 100%;
        padding: 1.2rem var(--spacing-md) 1.6rem;
        border-top: 1px solid rgba(148, 178, 255, 0.12);
        transition: left 0.32s ease;
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
        max-height: calc(100vh - 62px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.15rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 46px;
        padding: 0.7rem 0.8rem;
        font-size: 1rem;
    }

    /* Submenu renders inline inside the mobile panel: always reachable by tap */
    .nav-menu .dropdown-menu {
        position: static;
        display: block;
        transform: none;
        min-width: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0 0 0.4rem 1.1rem;
    }

    .nav-menu .dropdown-menu a {
        min-height: 42px;
        color: var(--text-muted);
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 5rem 0 4rem;
    }
    .hero-cta .btn,
    .cta-buttons .btn {
        width: 100%;
    }
    .section {
        padding: var(--spacing-lg) 0;
    }
}

/* ==========================================================================
   Part 12 · Legacy reskin — ONLY visual properties.
   Applies on lean-data/*, about and contact, where style.css (loaded first)
   still owns layout. Nothing here changes geometry beyond radii, so the
   preserved pages keep their exact structure in the new skin.
   ========================================================================== */

/* Ambient page atmosphere over the flat legacy background */
body {
    background-image:
        radial-gradient(1100px 560px at 85% -10%, rgba(139, 92, 246, 0.09), transparent 60%),
        radial-gradient(900px 520px at 8% 0%, rgba(34, 211, 238, 0.07), transparent 55%);
    background-attachment: fixed;
}

/* Legacy fixed header is a touch taller than the root-page header */
.hero,
.page-hero {
    margin-top: 76px;
}

/* Gradient display type for legacy hero / section / page titles */
.hero-title,
.page-hero h1,
.section-title {
    background: linear-gradient(100deg, #FFFFFF 10%, #BDEBFF 48%, var(--sys-cyan) 78%, var(--sys-indigo) 105%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Trust bar + logo chips (legacy home / workshops) */
.hero-trust-bar {
    border-top: 1px solid rgba(148, 178, 255, 0.10);
    background: rgba(148, 178, 255, 0.02);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.trust-text {
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.logo-item,
.client-logo {
    background: var(--sys-glass);
    border: 1px solid var(--sys-glass-border);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-secondary);
    transition: var(--transition);
}

.logo-item:hover,
.client-logo:hover {
    border-color: rgba(34, 211, 238, 0.45);
    color: #FFFFFF;
    box-shadow: 0 12px 34px -12px rgba(34, 211, 238, 0.35);
}

/* Insights: tabs + article cards */
.tabs {
    gap: 0.6rem;
}

.tab-button {
    background: rgba(148, 178, 255, 0.05);
    border: 1px solid rgba(148, 178, 255, 0.20);
    color: var(--text-secondary);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: var(--transition);
}

.tab-button:hover {
    color: #FFFFFF;
    border-color: rgba(34, 211, 238, 0.5);
}

.tab-button.active {
    background: linear-gradient(92deg, #0EA5C6 0%, #22D3EE 42%, #8B5CF6 105%);
    color: #051019;
    border-color: transparent;
    font-weight: 600;
}

.article-card {
    background: var(--sys-glass);
    border: 1px solid var(--sys-glass-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.article-card:hover {
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 22px 55px -18px rgba(34, 211, 238, 0.28);
    transform: translateY(-3px);
}

.article-card h3 {
    color: #FFFFFF;
}

.article-meta {
    color: var(--sys-indigo);
    letter-spacing: 0.06em;
}

.article-card p {
    color: var(--text-secondary);
}

.article-link {
    color: var(--sys-cyan);
    font-weight: 600;
}

/* Contact form: dark glass inputs */
.contact-form {
    background: var(--sys-glass);
    border: 1px solid var(--sys-glass-border);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(10, 15, 30, 0.65);
    border: 1px solid rgba(148, 178, 255, 0.20);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.form-group select option {
    background: var(--sys-bg-1);
    color: var(--text-primary);
}

/* Thin dark scrollbar, WebKit only */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--sys-bg-0);
}

::-webkit-scrollbar-thumb {
    background: #1D2942;
    border-radius: 6px;
    border: 2px solid var(--sys-bg-0);
}

::-webkit-scrollbar-thumb:hover {
    background: #2A3B5E;
}

/* ---------- Part 13 · Vector motion system (homepage) -------------------
   Inline-SVG animation in the same visual language as the rest of the
   system: strokes draw themselves in, pulses travel the paths, and the
   three layers are wired together with light. Pure CSS keyframes + SMIL
   animateMotion — no libraries. Everything freezes, fully legible, under
   prefers-reduced-motion. */

/* --- 13.1 Hero vector backdrop --- */
.hero-viz {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.hero-viz svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hero .hero-content {
    position: relative;
    z-index: 1;
}

/* Lines draw themselves in (pathLength="1" normalises the dash maths) */
.hero-viz .viz-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    opacity: 0.5;
    animation: viz-draw 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes viz-draw {
    to { stroke-dashoffset: 0; }
}

/* Nodes pop in once their lines arrive */
.hero-viz .viz-node {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: viz-node-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes viz-node-in {
    from { opacity: 0; transform: scale(0.35); }
    to   { opacity: 1; transform: scale(1); }
}

/* Pulses fade in after the network exists, then ride their paths (SMIL) */
.hero-viz .viz-pulse {
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(125, 211, 252, 0.8));
    animation: viz-fade-in 1.2s ease 1.8s forwards;
}

@keyframes viz-fade-in {
    to { opacity: 0.95; }
}

/* The three stacked planes + the beam that lights them */
.hero-viz .viz-plane {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: viz-draw 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-viz .viz-planes {
    animation: viz-float 9s ease-in-out 2.6s infinite alternate;
}

@keyframes viz-float {
    from { transform: translateY(0); }
    to   { transform: translateY(-7px); }
}

.hero-viz .viz-beam {
    stroke-dasharray: 2 7;
    opacity: 0;
    animation: viz-fade-in 1.2s ease 2.2s forwards, viz-beam-flow 1.1s linear infinite;
}

@keyframes viz-beam-flow {
    to { stroke-dashoffset: -9; }
}

/* --- 13.2 Stack connectors: light flowing Data → AI → FDE --- */
.stack-flow {
    height: 40px;
    margin: -7px 0 -7px 0.4rem;
    pointer-events: none;
}

.stack-flow svg {
    display: block;
    width: 96px;
    height: 40px;
    overflow: visible;
}

@media (min-width: 900px) {
    /* Follow the staircase: the second connector starts under Layer 02 */
    .stack-flow.flow-b { margin-left: calc(0.4rem + 2.6rem); }
}

.stack-flow .flow-track {
    stroke: rgba(148, 178, 255, 0.16);
    stroke-width: 3;
    stroke-linecap: round;
}

.stack-flow .flow-line {
    stroke: var(--sys-indigo);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 3 7;
}

.stack-flow.flow-a .flow-line { stroke: var(--sys-cyan); }

/* Flow starts only when the section scrolls into view (.reveal.in is
   added by the existing IntersectionObserver in system.js) */
.reveal.in .stack-flow .flow-line {
    animation: flow-dash 0.9s linear infinite;
}

@keyframes flow-dash {
    to { stroke-dashoffset: -10; }
}

.stack-flow .flow-pulse {
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(125, 211, 252, 0.85));
}

.reveal.in .stack-flow .flow-pulse {
    opacity: 0.95;
}

/* --- 13.3 Method-chain SVG arrows: one pulse, passed step to step --- */
.chain-arrow {
    display: none;
}

@media (min-width: 1100px) {
    .chain-arrow {
        display: block;
        position: absolute;
        top: 50%;
        right: -2.02rem;
        width: 34px;
        height: 16px;
        transform: translateY(-50%);
        z-index: 3;
        overflow: visible;
        opacity: 0;
        transition: opacity 0.6s ease;
    }

    .chain-step.in .chain-arrow {
        opacity: 1;
    }

    .chain-arrow .ca-line {
        stroke: var(--sys-indigo);
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
    }

    .chain-step.in .chain-arrow .ca-line {
        animation: viz-draw 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .chain-arrow .ca-pulse {
        opacity: 0;
        filter: drop-shadow(0 0 4px rgba(125, 211, 252, 0.8));
    }

    .chain-step.in .chain-arrow .ca-pulse {
        opacity: 0.95;
    }
}

/* --- 13.4 Reduced motion: everything rests, nothing is lost --- */
@media (prefers-reduced-motion: reduce) {
    .hero-viz .viz-line,
    .hero-viz .viz-plane {
        animation: none !important;
        stroke-dashoffset: 0 !important;
    }

    .hero-viz .viz-node {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-viz .viz-planes,
    .hero-viz .viz-beam {
        animation: none !important;
    }

    .hero-viz .viz-beam { opacity: 0.7 !important; }

    /* SMIL pulses cannot be paused by CSS — remove them outright */
    .viz-pulse,
    .flow-pulse,
    .ca-pulse {
        display: none !important;
    }

    .reveal.in .stack-flow .flow-line {
        animation: none !important;
    }

    .chain-step.in .chain-arrow { opacity: 1 !important; }

    .chain-step.in .chain-arrow .ca-line {
        animation: none !important;
        stroke-dashoffset: 0 !important;
    }
}
