/* ========================================
   BASE PROTOCOL — Warm Clinical Luxury
   Mobile-First · SVG Animation-Rich
   ======================================== */

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

:root {
    --cream: #F9F6F0;
    --cream-dark: #F0EBE1;
    --midnight: #0A1128;
    --midnight-light: #111B38;
    --copper: #B87333;
    --copper-light: #C48A6A;
    --copper-pale: #D4A574;
    --copper-glow: rgba(184, 115, 51, 0.3);
    --copper-gradient: linear-gradient(145deg, #D4A574 0%, #C48A6A 20%, #B87333 45%, #9A5E2A 70%, #B87333 85%, #D4A574 100%);
    --royal: #0033A0;
    --royal-light: #1D4ED8;
    --royal-glow: rgba(0, 51, 160, 0.35);
    --royal-bright: #3B6EFF;
    --espresso: #2A2421;
    --text-warm: #7A6E66;
    --text-cream: rgba(249, 246, 240, 0.85);
    --text-cream-muted: rgba(249, 246, 240, 0.5);
    --border-warm: rgba(184, 115, 51, 0.12);
    --border-dark: rgba(249, 246, 240, 0.08);
    --heading: 'Space Grotesk', -apple-system, sans-serif;
    --body: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--body); background: var(--cream); color: var(--espresso); overflow-x: hidden; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(249, 246, 240, 0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-warm);
    transition: box-shadow 0.3s ease;
}
.nav-inner {
    max-width: 1400px; margin: 0 auto; padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    font-family: var(--heading); font-size: 14px; font-weight: 500;
    letter-spacing: 0.25em; color: var(--copper);
}
.nav-logo span { font-weight: 700; }
.nav-links { display: none; align-items: center; gap: 36px; }
.nav-links a {
    font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
    color: var(--text-warm); transition: color 0.3s; text-transform: uppercase;
}
.nav-links a:hover { color: var(--espresso); }
.nav-cta {
    background: var(--espresso) !important; color: var(--cream) !important;
    padding: 9px 20px !important; border-radius: 3px;
    font-size: 11px !important; letter-spacing: 0.14em !important;
    transition: all 0.3s !important;
}
.nav-cta:hover { background: var(--royal) !important; }

.nav-mobile-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-mobile-toggle span { display: block; width: 22px; height: 1.5px; background: var(--espresso); transition: all 0.3s; }
.nav-mobile-toggle.open span:first-child { transform: rotate(45deg) translate(4px, 4px); }
.nav-mobile-toggle.open span:last-child { transform: rotate(-45deg) translate(4px, -4px); }

.nav-mobile {
    display: none; flex-direction: column; padding: 16px 24px 24px;
    border-top: 1px solid var(--border-warm); gap: 14px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
    font-size: 14px; font-weight: 500; color: var(--espresso);
    letter-spacing: 0.04em;
}

@media (min-width: 769px) {
    .nav-inner { padding: 0 60px; height: 72px; }
    .nav-links { display: flex; }
    .nav-mobile-toggle { display: none; }
    .nav-mobile { display: none !important; }
}

/* ========================================
   FOLD 1: HERO
   ======================================== */
.hero {
    min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column;
    background: var(--cream); position: relative;
    padding-top: 64px;
}
.hero-inner {
    flex: 1; display: flex; flex-direction: column;
    max-width: 1400px; margin: 0 auto; width: 100%;
    padding: 32px 24px 40px;
}

/* -- Hero Product -- */
.hero-product {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 340px; margin-bottom: 32px;
}

/* Cellular Grid */
.cell-grid-wrap {
    position: absolute; width: 320px; height: 320px;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 1; opacity: 0.1; transition: opacity 1.2s ease;
}
.cell-grid-svg { width: 100%; height: 100%; }
.grid-line { stroke: var(--copper); stroke-width: 0.5; opacity: 0.4; transition: all 1.2s ease; }
.grid-line.gl-d { opacity: 0.2; }
.grid-node { fill: var(--copper); opacity: 0.4; transition: all 1.2s ease; }
.grid-node.gn-center { fill: var(--royal); opacity: 0.6; }

/* Grid pulse on pump */
.hero-product.pumping .cell-grid-wrap { opacity: 0.35; }
.hero-product.pumping .grid-line { stroke: var(--copper-light); stroke-width: 1; opacity: 0.6; }
.hero-product.pumping .grid-line.gl-d { opacity: 0.4; }
.hero-product.pumping .grid-node { fill: var(--copper-light); opacity: 0.8; r: 3; }
.hero-product.pumping .grid-node.gn-center { fill: var(--royal-bright); opacity: 1; r: 5; filter: drop-shadow(0 0 8px var(--royal-glow)); }

/* Scene */
.product-scene { position: relative; z-index: 2; }
.product-glow {
    position: absolute; width: 260px; height: 260px;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--copper-glow) 0%, transparent 70%);
    border-radius: 50%; filter: blur(50px); opacity: 0.5;
    animation: glow-breathe 5s ease-in-out infinite;
}
@keyframes glow-breathe {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.65; transform: translate(-50%, -50%) scale(1.08); }
}
.product-jar { position: relative; animation: jar-float 7s ease-in-out infinite; }
@keyframes jar-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Jar Body */
.jar-cylinder { position: relative; width: 170px; }
.jar-body-copper {
    width: 170px; height: 195px; border-radius: 22px;
    background: var(--copper-gradient); position: relative; overflow: hidden;
    box-shadow:
        0 24px 48px rgba(42,36,33,0.28),
        0 8px 16px rgba(42,36,33,0.14),
        inset 0 1px 0 rgba(255,255,255,0.2),
        inset 0 -2px 0 rgba(0,0,0,0.12);
}
.jar-brushed-texture {
    position: absolute; inset: 0; border-radius: 22px;
    background: repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(255,255,255,0.02) 1px, rgba(255,255,255,0.02) 2px);
}
.jar-highlight {
    position: absolute; top: 0; left: 27%; width: 2.5px; height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.14) 20%, rgba(255,255,255,0.22) 45%, rgba(255,255,255,0.14) 70%, transparent 100%);
}
.jar-highlight-2 {
    position: absolute; top: 0; right: 20%; width: 1px; height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.06) 70%, transparent 100%);
}

/* Label */
.jar-label { position: absolute; top: 30px; left: 20px; right: 20px; }
.jar-brand {
    font-family: var(--heading); font-size: 9px; font-weight: 700;
    letter-spacing: 0.35em; color: rgba(0, 51, 160, 0.7); margin-bottom: 3px;
}
.jar-product-name {
    font-family: var(--heading); font-size: 17px; font-weight: 700;
    letter-spacing: 0.06em; color: var(--royal); margin-bottom: 8px;
}
.jar-line { width: 24px; height: 1px; background: var(--royal); opacity: 0.4; margin-bottom: 8px; }
.jar-sub {
    font-family: var(--heading); font-size: 7.5px; font-weight: 400;
    letter-spacing: 0.15em; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 16px;
}
.jar-details { display: flex; gap: 14px; }
.jar-details span { font-size: 7px; letter-spacing: 0.1em; color: rgba(255,255,255,0.35); text-transform: uppercase; }
.jar-origin {
    position: absolute; bottom: -36px; right: 0;
    font-size: 6.5px; letter-spacing: 0.15em; color: rgba(255,255,255,0.25); text-transform: uppercase;
}

/* Lid / Pump */
.jar-lid {
    position: absolute; top: -24px; left: -5px; right: -5px; z-index: 3;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.jar-lid-surface {
    width: 180px; height: 36px; border-radius: 16px 16px 10px 10px;
    background: linear-gradient(180deg, #D4A574 0%, #B87333 40%, #9A5E2A 100%);
    position: relative; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 -1px 6px rgba(0,0,0,0.08), 0 3px 10px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.22);
}
.jar-lid-surface::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(255,255,255,0.015) 1px, rgba(255,255,255,0.015) 2px);
}
.jar-pump-outer {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid rgba(0, 51, 160, 0.3); display: flex; align-items: center; justify-content: center;
    transition: border-color 0.5s ease;
}
.jar-pump-inner {
    width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(135deg, #9A5E2A, #7A4A20);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.jar-pump-hole {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--espresso); transition: all 0.5s ease;
}
.jar-grip {
    position: absolute; top: 50%; width: 28px; height: 7px;
    border-radius: 3.5px; background: rgba(0,0,0,0.07); transform: translateY(-50%);
}
.jar-grip-l { left: 14px; }
.jar-grip-r { right: 14px; }

/* Pump animation states */
.hero-product.pumping .jar-lid { transform: translateY(6px) scaleY(0.9); }
.hero-product.pumping .jar-pump-outer { border-color: rgba(0, 51, 160, 0.7); }
.hero-product.pumping .jar-pump-hole {
    background: var(--royal); box-shadow: 0 0 10px var(--royal-glow); width: 5px; height: 5px;
}

/* Serum Drop */
.serum-drop {
    position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #6B9FFF 0%, var(--royal-bright) 30%, var(--royal) 70%);
    z-index: 4; opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 0 var(--royal-glow);
}
.serum-highlight {
    position: absolute; width: 3px; height: 3px; border-radius: 50%;
    background: rgba(255,255,255,0.85); top: 3px; left: 4px;
    opacity: 0; transition: opacity 0.6s ease 0.3s;
}
.hero-product.pumping .serum-drop {
    width: 14px; height: 14px; opacity: 1; top: -32px;
    box-shadow: 0 0 18px var(--royal-glow), 0 0 40px rgba(0,51,160,0.2);
}
.hero-product.pumping .serum-highlight { opacity: 1; }

.jar-shadow {
    position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%);
    width: 140px; height: 14px;
    background: radial-gradient(ellipse, rgba(42,36,33,0.18) 0%, transparent 70%);
    filter: blur(6px);
}

/* -- Hero Text -- */
.hero-text { text-align: center; }
.hero-tag {
    font-size: 10px; font-weight: 600; letter-spacing: 0.2em;
    color: var(--copper); margin-bottom: 20px; font-family: var(--heading);
    opacity: 0; animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-headline {
    font-family: var(--heading); font-size: 36px; font-weight: 700;
    line-height: 1.1; letter-spacing: -0.02em; color: var(--espresso); margin-bottom: 20px;
    opacity: 0; animation: fadeUp 0.8s ease 0.5s forwards;
}
.hero-headline span { color: var(--text-warm); font-weight: 300; }
.hero-sub {
    font-size: 15px; line-height: 1.7; color: var(--text-warm);
    max-width: 520px; margin: 0 auto 28px; font-weight: 400;
    opacity: 0; animation: fadeUp 0.8s ease 0.7s forwards;
}
.allocation-tracker {
    max-width: 360px; margin: 0 auto 28px;
    opacity: 0; animation: fadeUp 0.8s ease 0.9s forwards;
}
.allocation-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.allocation-status {
    font-family: var(--heading); font-size: 9px; font-weight: 600;
    letter-spacing: 0.2em; color: var(--text-warm);
}
.allocation-count { font-family: var(--heading); font-size: 11px; letter-spacing: 0.1em; color: var(--copper); }
.allocation-count strong { font-weight: 700; font-size: 13px; }
.allocation-bar { width: 100%; height: 3px; background: var(--border-warm); border-radius: 2px; overflow: hidden; }
.allocation-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--copper-light), var(--copper));
    border-radius: 2px; position: relative; transition: width 1.5s ease;
}
.allocation-fill::after {
    content: ''; position: absolute; right: 0; top: -2px; width: 7px; height: 7px;
    background: var(--copper); border-radius: 50%; box-shadow: 0 0 10px var(--copper-glow);
    animation: alloc-pulse 2s ease-in-out infinite;
}
@keyframes alloc-pulse {
    0%, 100% { box-shadow: 0 0 6px var(--copper-glow); }
    50% { box-shadow: 0 0 18px var(--copper-glow); }
}

/* Primary Button */
.btn-primary {
    display: inline-block; background: var(--royal); color: #fff;
    font-family: var(--heading); font-size: 13px; font-weight: 600;
    letter-spacing: 0.14em; padding: 16px 40px; border: none; border-radius: 4px;
    cursor: pointer; transition: all 0.3s; text-transform: uppercase;
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}
.btn-primary:hover {
    background: #00288a; box-shadow: 0 8px 32px var(--royal-glow); transform: translateY(-1px);
}

/* Glowing CTA */
.btn-glow {
    animation: btn-glow-pulse 3s ease-in-out infinite;
}
@keyframes btn-glow-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 51, 160, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(0, 51, 160, 0); }
}
.btn-glow:hover { animation: none; }

.hero .btn-primary {
    opacity: 0; animation: fadeUp 0.8s ease 1s forwards, btn-glow-pulse 3s ease-in-out 1.8s infinite;
}

.hero-trust {
    margin-top: 16px; font-size: 11px; color: var(--text-warm); letter-spacing: 0.04em;
    opacity: 0; animation: fadeUp 0.8s ease 1.1s forwards;
}

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

/* Desktop hero */
@media (min-width: 769px) {
    .hero { padding-top: 72px; }
    .hero-inner {
        display: grid; grid-template-columns: 1fr 1fr; align-items: center;
        padding: 0 60px; gap: 48px;
    }
    .hero-product { order: 2; min-height: 560px; margin-bottom: 0; }
    .hero-text { text-align: left; order: 1; }
    .hero-headline { font-size: clamp(42px, 4.8vw, 68px); }
    .hero-sub { margin: 0 0 28px; }
    .allocation-tracker { margin: 0 0 28px; }
    .cell-grid-wrap { width: 420px; height: 420px; }
    .product-glow { width: 300px; height: 300px; }
    .jar-cylinder { width: 190px; }
    .jar-body-copper { width: 190px; height: 215px; }
    .jar-lid-surface { width: 200px; height: 38px; }
    .jar-label { top: 34px; left: 22px; right: 22px; }
    .jar-brand { font-size: 10px; }
    .jar-product-name { font-size: 19px; }
}

/* ========================================
   FOLD 2: BIOLOGICAL VISUALIZATION
   ======================================== */
.bio-viz {
    background: var(--midnight); padding: 80px 24px; position: relative;
    overflow: hidden;
}
.bio-inner { max-width: 1100px; margin: 0 auto; }
.bio-header { text-align: center; margin-bottom: 56px; }
.bio-label {
    font-family: var(--heading); font-size: 10px; font-weight: 600;
    letter-spacing: 0.25em; color: var(--copper-light); margin-bottom: 20px;
    display: block;
}
.bio-headline {
    font-family: var(--heading); font-size: clamp(28px, 6vw, 52px); font-weight: 700;
    line-height: 1.1; color: var(--copper-pale); letter-spacing: -0.01em;
}

/* Diagrams Grid */
.diagrams-grid {
    display: flex; flex-direction: column; align-items: center; gap: 0;
}
.diagram-card {
    width: 100%; max-width: 520px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 28px 20px; position: relative;
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.diagram-card.visible { opacity: 1; transform: translateY(0); }
.diagram-badge {
    font-family: var(--heading); font-size: 9px; font-weight: 700;
    letter-spacing: 0.2em; padding: 5px 14px; border-radius: 3px;
    display: inline-block; margin-bottom: 20px;
}
.badge-problem { background: rgba(255,107,74,0.12); color: #FF6B4A; }
.badge-solution { background: rgba(59,110,255,0.12); color: #3B6EFF; }

.diagram-visual {
    width: 100%; aspect-ratio: 360 / 300;
    margin-bottom: 20px; border-radius: 8px; overflow: hidden;
    background: rgba(0,0,0,0.15);
}
.skin-svg { width: 100%; height: 100%; display: block; }

.diagram-caption {
    font-size: 13px; line-height: 1.7; color: var(--text-cream-muted);
    font-style: italic;
}

/* Diagrams Divider */
.diagrams-divider {
    display: flex; align-items: center; gap: 12px;
    padding: 24px 0; width: 100%; max-width: 520px;
}
.divider-line { flex: 1; height: 1px; background: rgba(255,255,255,0.08); }
.divider-vs {
    font-family: var(--heading); font-size: 11px; font-weight: 700;
    letter-spacing: 0.2em; color: var(--copper-light);
}

/* SVG Labels */
.svg-label {
    font-family: var(--heading); font-size: 6.5px; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
}
.svg-label-ret { fill: rgba(255,107,74,0.5); }
.svg-label-pep { fill: rgba(59,110,255,0.5); }

/* Skin Boundaries */
.skin-boundary { stroke-width: 1.5; fill: none; }
.ret-boundary { stroke: #FF6B4A; opacity: 0.5; }
.ret-b-top { stroke-width: 1.2; opacity: 0.7; }
.ret-boundary-deep { stroke: #FF8C42; stroke-width: 0.8; opacity: 0.25; }
.pep-boundary { stroke: #0033A0; opacity: 0.4; stroke-width: 1.2; }

/* ---- Retinol Flaking Animation ---- */
.flake { transition: opacity 0.3s; }

.diagram-card.visible .fl-1 { animation: flake-off 3s ease-in-out 0.2s infinite; }
.diagram-card.visible .fl-2 { animation: flake-off 3.4s ease-in-out 0.6s infinite; }
.diagram-card.visible .fl-3 { animation: flake-off 2.8s ease-in-out 0.0s infinite; }
.diagram-card.visible .fl-4 { animation: flake-off 3.2s ease-in-out 0.8s infinite; }
.diagram-card.visible .fl-5 { animation: flake-off 3.6s ease-in-out 0.4s infinite; }
.diagram-card.visible .fl-6 { animation: flake-off 3.0s ease-in-out 1.0s infinite; }
.diagram-card.visible .fl-7 { animation: flake-off 3.3s ease-in-out 0.5s infinite; }
.diagram-card.visible .fl-8 { animation: flake-off 2.9s ease-in-out 0.3s infinite; }

@keyframes flake-off {
    0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
    15% { opacity: 0.8; }
    100% { opacity: 0; transform: translate(-15px, -35px) rotate(40deg); }
}

/* ---- Retinol Inflammation Pulse ---- */
.diagram-card.visible .inf-1 { animation: inflame-pulse 2.5s ease-in-out 0.0s infinite; }
.diagram-card.visible .inf-2 { animation: inflame-pulse 2.8s ease-in-out 0.4s infinite; }
.diagram-card.visible .inf-3 { animation: inflame-pulse 2.3s ease-in-out 0.8s infinite; }
.diagram-card.visible .inf-4 { animation: inflame-pulse 2.6s ease-in-out 0.6s infinite; }

@keyframes inflame-pulse {
    0%, 100% { opacity: 0; r: 3; }
    50% { opacity: 0.35; r: 8; }
}

/* ---- Peptide Collagen Draw-In ---- */
.collagen-strand {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    transition: stroke-dashoffset 0.3s;
}
.diagram-card.visible .cs-1 { animation: collagen-draw 2.5s ease-out 0.2s forwards; }
.diagram-card.visible .cs-2 { animation: collagen-draw 2.5s ease-out 0.5s forwards; }
.diagram-card.visible .cs-3 { animation: collagen-draw 2.5s ease-out 0.8s forwards; }
.diagram-card.visible .cs-4 { animation: collagen-draw 2.5s ease-out 1.1s forwards; }
.diagram-card.visible .cs-5 { animation: collagen-draw 2.5s ease-out 0.4s forwards; }
.diagram-card.visible .cs-6 { animation: collagen-draw 2.0s ease-out 1.4s forwards; }
.diagram-card.visible .cs-7 { animation: collagen-draw 2.0s ease-out 1.2s forwards; }

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

/* ---- Peptide Plumping Arrows ---- */
.plump-arrow { opacity: 0; }
.diagram-card.visible .pa-1 { animation: plump-up 2s ease-out 1.5s forwards; }
.diagram-card.visible .pa-2 { animation: plump-up 2s ease-out 1.8s forwards; }
.diagram-card.visible .pa-3 { animation: plump-up 2s ease-out 2.1s forwards; }

@keyframes plump-up {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---- Peptide Particles ---- */
.diagram-card.visible .pp-1 { animation: particle-rise 3.0s ease-in-out 0.5s infinite; }
.diagram-card.visible .pp-2 { animation: particle-rise 3.4s ease-in-out 0.8s infinite; }
.diagram-card.visible .pp-3 { animation: particle-rise 2.8s ease-in-out 0.2s infinite; }
.diagram-card.visible .pp-4 { animation: particle-rise 3.2s ease-in-out 1.0s infinite; }
.diagram-card.visible .pp-5 { animation: particle-rise 3.6s ease-in-out 0.6s infinite; }
.diagram-card.visible .pp-6 { animation: particle-rise 2.9s ease-in-out 0.3s infinite; }

@keyframes particle-rise {
    0% { opacity: 0; transform: translateY(0); }
    20% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-50px); }
}

/* Desktop diagrams */
@media (min-width: 769px) {
    .bio-viz { padding: 120px 60px; }
    .bio-header { margin-bottom: 72px; }
    .diagrams-grid {
        flex-direction: row; align-items: stretch; gap: 0;
    }
    .diagram-card { max-width: none; flex: 1; }
    .diagram-card:first-child { border-radius: 12px 0 0 12px; border-right: none; }
    .diagram-card:last-child { border-radius: 0 12px 12px 0; border-left: none; }
    .diagrams-divider {
        flex-direction: column; width: auto; padding: 0 20px;
        align-self: stretch; justify-content: center;
    }
    .divider-line { width: 1px; height: 60px; flex: 0; }
}

/* ========================================
   FOLD 3: FORMULATION SPECS
   ======================================== */
.formulation { background: var(--cream); padding: 80px 24px; }
.formulation-inner { max-width: 1400px; margin: 0 auto; }
.formulation-header { margin-bottom: 48px; }
.formulation-label {
    font-size: 10px; font-weight: 600; letter-spacing: 0.25em;
    color: var(--copper); margin-bottom: 12px; font-family: var(--heading);
}
.formulation-headline {
    font-family: var(--heading); font-size: clamp(26px, 5vw, 40px);
    font-weight: 700; color: var(--espresso); letter-spacing: -0.01em;
}

.spec-grid { display: flex; flex-direction: column; gap: 1px; background: var(--border-warm); border: 1px solid var(--border-warm); border-radius: 8px; overflow: hidden; }
.spec-card {
    background: var(--cream); padding: 32px 24px; position: relative;
    transition: background 0.3s;
    opacity: 0; transform: translateY(20px);
}
.spec-card.visible { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s; }
.spec-card:hover { background: var(--cream-dark); }

/* SVG Animation Containers */
.spec-anim-wrap {
    width: 120px; height: 120px; margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
}
.spec-svg { width: 100%; height: 100%; }

.spec-content { text-align: center; }
.spec-compound {
    font-family: var(--heading); font-size: 12px; font-weight: 600;
    letter-spacing: 0.14em; color: var(--copper); margin-bottom: 6px; text-transform: uppercase;
}
.spec-title {
    font-family: var(--heading); font-size: 20px; font-weight: 600;
    color: var(--espresso); margin-bottom: 14px;
}
.spec-divider { width: 32px; height: 2px; background: var(--copper); margin: 0 auto 14px; }
.spec-desc { font-size: 14px; line-height: 1.7; color: var(--text-warm); }

/* ---- Hex Molecular Animation ---- */
.hex-shape {
    fill: none; stroke: var(--copper); stroke-width: 1;
    stroke-dasharray: 120; stroke-dashoffset: 120;
    opacity: 0.6;
}
.hex-conn {
    stroke: var(--copper-light); stroke-width: 0.8;
    stroke-dasharray: 40; stroke-dashoffset: 40;
    opacity: 0.4;
}
.hex-cu {
    fill: var(--royal); opacity: 0;
    transition: opacity 0.5s ease;
}
.hex-cu-label {
    font-family: var(--heading); font-size: 7px; font-weight: 700;
    fill: #fff; opacity: 0;
}

/* Hex draw-in when visible */
.spec-card.visible .hx-0 { animation: hex-draw 1.5s ease-out 0.0s forwards; }
.spec-card.visible .hx-1 { animation: hex-draw 1.5s ease-out 0.2s forwards; }
.spec-card.visible .hx-2 { animation: hex-draw 1.5s ease-out 0.4s forwards; }
.spec-card.visible .hx-3 { animation: hex-draw 1.5s ease-out 0.6s forwards; }
.spec-card.visible .hx-4 { animation: hex-draw 1.5s ease-out 0.8s forwards; }
.spec-card.visible .hx-5 { animation: hex-draw 1.5s ease-out 1.0s forwards; }
.spec-card.visible .hx-6 { animation: hex-draw 1.5s ease-out 1.2s forwards; }

.spec-card.visible .hc-1 { animation: conn-draw 0.8s ease-out 0.3s forwards; }
.spec-card.visible .hc-2 { animation: conn-draw 0.8s ease-out 0.5s forwards; }
.spec-card.visible .hc-3 { animation: conn-draw 0.8s ease-out 0.7s forwards; }
.spec-card.visible .hc-4 { animation: conn-draw 0.8s ease-out 0.9s forwards; }
.spec-card.visible .hc-5 { animation: conn-draw 0.8s ease-out 1.1s forwards; }
.spec-card.visible .hc-6 { animation: conn-draw 0.8s ease-out 1.3s forwards; }

.spec-card.visible .hex-cu { animation: cu-appear 0.6s ease-out 1.5s forwards; }
.spec-card.visible .hex-cu-label { animation: cu-appear 0.6s ease-out 1.6s forwards; }

@keyframes hex-draw {
    to { stroke-dashoffset: 0; opacity: 0.8; }
}
@keyframes conn-draw {
    to { stroke-dashoffset: 0; opacity: 0.5; }
}
@keyframes cu-appear {
    to { opacity: 1; }
}

/* Hex continuous pulse after initial draw */
.spec-card.visible .hex-group {
    animation: hex-pulse 4s ease-in-out 2.5s infinite;
}
@keyframes hex-pulse {
    0%, 100% { filter: none; }
    50% { filter: drop-shadow(0 0 4px var(--copper-glow)); }
}

/* ---- Synapse Animation ---- */
.syn-terminal {
    fill: none; stroke: var(--copper-light); stroke-width: 1.2; opacity: 0.5;
}
.syn-pre { stroke-dasharray: 200; stroke-dashoffset: 200; }
.syn-post { stroke-dasharray: 200; stroke-dashoffset: 200; }
.syn-cleft { stroke: rgba(255,255,255,0.1); stroke-width: 0.5; stroke-dasharray: 3 3; }
.syn-vesicle { fill: var(--royal); opacity: 0; }
.syn-signal { fill: var(--royal-bright); opacity: 0; }
.syn-block { opacity: 0; }

.spec-card.visible .syn-pre { animation: syn-draw 1.2s ease-out 0.2s forwards; }
.spec-card.visible .syn-post { animation: syn-draw 1.2s ease-out 0.4s forwards; }

.spec-card.visible .sv-1 { animation: vesicle-pop 0.5s ease-out 0.8s forwards; }
.spec-card.visible .sv-2 { animation: vesicle-pop 0.5s ease-out 1.0s forwards; }
.spec-card.visible .sv-3 { animation: vesicle-pop 0.5s ease-out 1.2s forwards; }
.spec-card.visible .sv-4 { animation: vesicle-pop 0.5s ease-out 1.4s forwards; }

.spec-card.visible .ss-1 { animation: signal-move 2s ease-in-out 1.6s infinite; }
.spec-card.visible .ss-2 { animation: signal-move 2s ease-in-out 1.8s infinite; }
.spec-card.visible .ss-3 { animation: signal-move 2s ease-in-out 2.0s infinite; }

.spec-card.visible .syn-block { animation: block-flash 2s ease-in-out 2.2s infinite; }

@keyframes syn-draw {
    to { stroke-dashoffset: 0; opacity: 0.6; }
}
@keyframes vesicle-pop {
    0% { opacity: 0; r: 0; }
    100% { opacity: 0.7; }
}
@keyframes signal-move {
    0% { opacity: 0; transform: translateX(0); }
    30% { opacity: 0.8; transform: translateX(8px); }
    50% { opacity: 0.4; transform: translateX(12px); }
    70% { opacity: 0.2; transform: translateX(10px); }
    100% { opacity: 0; transform: translateX(8px); }
}
@keyframes block-flash {
    0%, 40%, 100% { opacity: 0; }
    50%, 70% { opacity: 0.9; }
}

/* ---- Liposomal Animation ---- */
.lipo-ring {
    fill: none; stroke: var(--copper-light); stroke-width: 1;
    stroke-dasharray: 300; stroke-dashoffset: 300;
    opacity: 0.4;
}
.lm-dot {
    fill: var(--copper); opacity: 0;
}
.lipo-payload {
    fill: var(--royal); opacity: 0;
}
.lipo-payload-hl {
    fill: rgba(255,255,255,0.7); opacity: 0;
}
.lipo-transport { opacity: 0; }

.spec-card.visible .lr-1 { animation: lipo-draw 1.5s ease-out 0.2s forwards; }
.spec-card.visible .lr-2 { animation: lipo-draw 1.5s ease-out 0.5s forwards; }
.spec-card.visible .lr-3 { animation: lipo-draw 1.5s ease-out 0.8s forwards; }

.spec-card.visible .lm-dot { animation: dot-pop 0.4s ease-out forwards; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(1) { animation-delay: 0.6s; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(2) { animation-delay: 0.7s; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(3) { animation-delay: 0.8s; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(4) { animation-delay: 0.9s; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(5) { animation-delay: 1.0s; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(6) { animation-delay: 1.1s; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(7) { animation-delay: 1.2s; }
.spec-card.visible .lipo-membrane .lm-dot:nth-child(8) { animation-delay: 1.3s; }

.spec-card.visible .lipo-payload { animation: payload-appear 0.8s ease-out 1.2s forwards; }
.spec-card.visible .lipo-payload-hl { animation: payload-appear 0.8s ease-out 1.4s forwards; }
.spec-card.visible .lipo-transport { animation: transport-show 0.6s ease-out 1.8s forwards; }

@keyframes lipo-draw {
    to { stroke-dashoffset: 0; opacity: 0.5; }
}
@keyframes dot-pop {
    0% { opacity: 0; r: 0; }
    100% { opacity: 0.7; }
}
@keyframes payload-appear {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes transport-show {
    to { opacity: 1; }
}

/* Lipo continuous breathing */
.spec-card.visible .lipo-group {
    animation: lipo-breathe 4s ease-in-out 2.5s infinite;
}
@keyframes lipo-breathe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Lipo ring continuous pulse */
.spec-card.visible .lr-1 { animation: lipo-draw 1.5s ease-out 0.2s forwards, lipo-ring-pulse 3s ease-in-out 2.5s infinite; }
.spec-card.visible .lr-2 { animation: lipo-draw 1.5s ease-out 0.5s forwards, lipo-ring-pulse 3s ease-in-out 2.8s infinite; }
.spec-card.visible .lr-3 { animation: lipo-draw 1.5s ease-out 0.8s forwards, lipo-ring-pulse 3s ease-in-out 3.1s infinite; }

@keyframes lipo-ring-pulse {
    0%, 100% { stroke-opacity: 0.4; stroke-width: 1; }
    50% { stroke-opacity: 0.7; stroke-width: 1.5; }
}

/* Desktop formulation */
@media (min-width: 769px) {
    .formulation { padding: 120px 60px; }
    .formulation-header { margin-bottom: 64px; }
    .spec-grid { flex-direction: row; }
    .spec-card { flex: 1; padding: 44px 32px; }
    .spec-anim-wrap { width: 140px; height: 140px; }
}

/* ========================================
   FINAL CTA BAND
   ======================================== */
.final-cta { background: var(--midnight-light); padding: 48px 24px; }
.final-cta-inner {
    max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: 24px;
}
.final-cta-label {
    font-family: var(--heading); font-size: 10px; font-weight: 600;
    letter-spacing: 0.2em; color: var(--copper-light); display: block; margin-bottom: 6px;
}
.final-cta-headline {
    font-family: var(--heading); font-size: 20px; font-weight: 600;
    color: #fff; letter-spacing: -0.01em;
}

@media (min-width: 769px) {
    .final-cta { padding: 56px 60px; }
    .final-cta-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ========================================
   FOOTER
   ======================================== */
.footer { background: var(--midnight); padding: 60px 24px 32px; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-top {
    display: flex; flex-direction: column; gap: 36px;
    padding-bottom: 40px; border-bottom: 1px solid var(--border-dark); margin-bottom: 32px;
}
.footer-logo {
    font-family: var(--heading); font-size: 14px; font-weight: 500;
    letter-spacing: 0.25em; color: var(--copper-light); margin-bottom: 6px;
}
.footer-logo span { font-weight: 700; }
.footer-tagline { font-size: 12px; color: var(--text-cream-muted); line-height: 1.5; }
.footer-links { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title {
    font-family: var(--heading); font-size: 9px; font-weight: 600;
    letter-spacing: 0.2em; color: var(--text-cream-muted); text-transform: uppercase; margin-bottom: 4px;
}
.footer-col a { font-size: 13px; color: var(--text-cream-muted); transition: color 0.3s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px;
}
.footer-legal { font-size: 11px; color: var(--text-cream-muted); line-height: 1.5; }
.footer-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: var(--text-cream-muted);
}
.maple-leaf { color: var(--copper-light); }
.footer-beta-notice {
    padding-top: 20px; border-top: 1px solid var(--border-dark);
    font-size: 10px; color: rgba(249,246,240,0.2); text-align: center; line-height: 1.5;
}

@media (min-width: 769px) {
    .footer { padding: 72px 60px 36px; }
    .footer-top { flex-direction: row; justify-content: space-between; }
    .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
    .footer-links { gap: 72px; }
}

/* ========================================
   BOTTOM-SHEET MODAL
   ======================================== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(10, 17, 40, 0); pointer-events: none; opacity: 0;
    transition: all 0.35s ease;
}
.modal-overlay.active {
    background: rgba(10, 17, 40, 0.55); pointer-events: all; opacity: 1;
}

.modal-sheet {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: var(--cream); border-radius: 20px 20px 0 0;
    padding: 12px 24px 36px; max-height: 92vh; overflow-y: auto;
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -20px 60px rgba(10,17,40,0.25);
}
.modal-overlay.active .modal-sheet { transform: translateY(0); }

.modal-handle {
    width: 36px; height: 4px; border-radius: 2px;
    background: rgba(42,36,33,0.15); margin: 0 auto 20px;
}
.modal-close {
    position: absolute; top: 16px; right: 16px; background: none; border: none;
    cursor: pointer; color: var(--text-warm); padding: 4px; transition: color 0.3s;
}
.modal-close:hover { color: var(--espresso); }

.modal-header { margin-bottom: 28px; }
.modal-label {
    font-family: var(--heading); font-size: 9px; font-weight: 600;
    letter-spacing: 0.2em; color: var(--copper); margin-bottom: 12px;
}
.modal-headline {
    font-family: var(--heading); font-size: 24px; font-weight: 700;
    color: var(--espresso); margin-bottom: 10px; letter-spacing: -0.01em;
}
.modal-copy { font-size: 14px; line-height: 1.65; color: var(--text-warm); }

.modal-form { display: flex; flex-direction: column; gap: 18px; }
.modal-input-group { display: flex; flex-direction: column; gap: 6px; }
.modal-input-label {
    font-family: var(--heading); font-size: 9px; font-weight: 600;
    letter-spacing: 0.14em; color: var(--text-warm);
}
.modal-input {
    width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.7);
    border: 1px solid var(--border-warm); border-radius: 4px;
    font-family: var(--body); font-size: 16px; color: var(--espresso); outline: none;
    transition: all 0.3s; -webkit-appearance: none;
}
.modal-input::placeholder { color: rgba(42,36,33,0.25); }
.modal-input:focus { border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-glow); background: #fff; }

.modal-checkbox-group { margin: 2px 0; }
.gate-checkbox { display: flex; gap: 12px; cursor: pointer; align-items: flex-start; }
.gate-checkbox input { display: none; }
.gate-checkmark {
    width: 22px; height: 22px; min-width: 22px;
    border: 2px solid var(--border-warm); border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; margin-top: 1px;
}
.gate-checkbox input:checked ~ .gate-checkmark {
    background: var(--royal); border-color: var(--royal); box-shadow: 0 0 10px var(--royal-glow);
}
.gate-checkbox input:checked ~ .gate-checkmark::after {
    content: ''; width: 5px; height: 9px; border: solid #fff;
    border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px;
}
.gate-text { font-size: 12px; line-height: 1.55; color: var(--text-warm); }

.btn-modal-submit {
    width: 100%; padding: 16px 28px; border: none; border-radius: 4px;
    font-family: var(--heading); font-size: 13px; font-weight: 600;
    letter-spacing: 0.14em; cursor: pointer; display: flex;
    align-items: center; justify-content: center; gap: 8px;
    transition: all 0.4s; text-transform: uppercase;
    background: var(--cream-dark); color: var(--text-warm);
}
.btn-modal-submit:disabled { cursor: not-allowed; }
.btn-modal-submit.active {
    background: var(--royal); color: #fff; cursor: pointer;
    box-shadow: 0 6px 24px var(--royal-glow);
}
.btn-modal-submit.active:hover { background: #00288a; transform: translateY(-1px); }
.btn-modal-submit.active .btn-modal-lock { display: none; }

.modal-footer {
    margin-top: 16px; display: flex; justify-content: center;
    gap: 6px; font-size: 10px; color: var(--text-warm);
}

/* Modal success state */
.modal-success { text-align: center; padding: 16px 0; }
.modal-success-icon {
    width: 52px; height: 52px; border-radius: 50%; background: var(--royal);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; box-shadow: 0 8px 28px var(--royal-glow);
    animation: success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.modal-success-headline {
    font-family: var(--heading); font-size: 20px; font-weight: 700;
    color: var(--espresso); margin-bottom: 10px;
}
.modal-success-copy { font-size: 14px; line-height: 1.65; color: var(--text-warm); }
.modal-success-copy strong { color: var(--espresso); }

@keyframes success-pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* Desktop modal */
@media (min-width: 769px) {
    .modal-overlay { display: flex; align-items: center; justify-content: center; }
    .modal-overlay.active { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .modal-sheet {
        position: relative; bottom: auto; left: auto; right: auto;
        max-width: 500px; width: 90%; border-radius: 8px;
        padding: 44px; max-height: 90vh;
        transform: translateY(24px) scale(0.97);
        box-shadow: 0 40px 80px rgba(10,17,40,0.3);
    }
    .modal-overlay.active .modal-sheet { transform: translateY(0) scale(1); }
    .modal-handle { display: none; }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.fade-in {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

::selection { background: var(--copper); color: #fff; }
