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

  :root {
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
  }

  body {
    background: #0a0a0a;
    color: #f0ede6;
    font-family: 'Georgia', serif;
    overflow-x: hidden;
  }

  /* ─── HERO CONTAINER ─── */
  /*
    Height > 100vh gives scroll space within the hero.
    Sticky top:0 keeps it visible while user scrolls through its height.
  */
  .parallax-hero {
    position: relative;
    height: 250vh;  /* 2.5x viewport = lots of scroll space */
  }

  /* ─── STICKY INNER (actual viewport-filling visible area) ─── */
  .parallax-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  /* ─── PARALLAX LAYER BASE ─── */
  /*
    All layers share absolute positioning.
    Extra size (120%×120%) prevents gaps during movement.
  */
  .layer {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    will-change: transform;
  }

  /* ─── LAYER 1: DEEP BACKGROUND (slowest parallax) ─── */
  .layer-bg {
    background: radial-gradient(ellipse at 40% 60%, #1a0a2e 0%, #0a0a0a 70%);
    z-index: 0;
  }

  /* ─── LAYER 2: MID GRADIENT (medium speed) ─── */
  .layer-mid {
    background:
      radial-gradient(circle at 70% 30%, rgba(124,92,252,0.3) 0%, transparent 50%),
      radial-gradient(circle at 30% 70%, rgba(255,60,142,0.2) 0%, transparent 40%);
    z-index: 1;
    mix-blend-mode: screen;
  }

  /* ─── LAYER 3: GEOMETRIC SHAPES (medium-fast speed) ─── */
  .layer-shapes {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .shape-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(240,237,230,0.1);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: breathe 8s ease-in-out infinite;
  }
  .shape-ring:nth-child(1) { width: 300px; height: 300px; }
  .shape-ring:nth-child(2) { width: 500px; height: 500px; animation-delay: -2s; }
  .shape-ring:nth-child(3) { width: 700px; height: 700px; animation-delay: -4s; }

  @keyframes breathe {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.14; }
  }

  /* ─── LAYER 4: TEXT (fastest parallax = closest to viewer) ─── */
  .layer-text {
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 8vw 10vh;
    width: 100%;
    height: 100%;
  }

  .hero-headline {
    font-size: clamp(4rem, 12vw, 12rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 0.9;
    position: relative;
  }

  .hero-sub {
    margin-top: 2rem;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-family: 'Helvetica Neue', sans-serif;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.4;
    max-width: 600px;
  }

  /* ─── SCROLL INDICATOR ─── */
  .scroll-indicator {
    position: absolute;
    bottom: 3rem;
    right: 8vw;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.3;
  }

  .scroll-line {
    width: 1px;
    height: 60px;
    background: rgba(240,237,230,0.3);
    position: relative;
    overflow: hidden;
  }

  .scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(240,237,230,0.8);
    animation: scroll-drop 2s ease-in-out infinite;
  }

  @keyframes scroll-drop {
    0% { top: -100%; }
    100% { top: 100%; }
  }

  /* ─── POST-HERO SECTION ─── */
  .after-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8vw;
    background: #f5f2eb;
    color: #111;
  }

  .after-hero h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
  }

  /* ─── PARALLAX PROGRESS INDICATOR ─── */
  .parallax-depth {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .depth-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(240,237,230,0.2);
    transition: all 0.3s ease;
  }

  .depth-dot.active {
    background: rgba(240,237,230,0.8);
    transform: scale(1.5);
  }

  /* ─── OKAMI GRAIN OVERLAY ─── */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 100;
    mix-blend-mode: overlay;
  }

  /* ─── BOKEH DEPTH-OF-FIELD ─── */
  .layer-bg {
    transition: filter 0.4s ease;
  }
  .layer-mid {
    transition: filter 0.4s ease;
  }
  /* Base DOF blurs applied via JS; fast-scroll intensifies them */
  body.scroll-fast .layer-bg {
    filter: blur(3px) saturate(0.8) !important;
    transition: filter 0.1s ease !important;
  }

  /* ─── BOKEH CHROMATIC ABERRATION ─── */
  .ca-blast {
    animation: ca-anim 0.4s ease-out forwards;
  }
  @keyframes ca-anim {
    0%   { filter: none; }
    20%  { filter: drop-shadow(6px 0 0 rgba(255,0,80,0.4)) drop-shadow(-6px 0 0 rgba(0,80,255,0.4)); }
    100% { filter: none; }
  }

  /* ─── OKAMI DOT+RING CURSOR ─── */
  html, body { cursor: none; }
  #cursor {
    position: fixed; width: 2px; height: 2px;
    background: #f0e8d8; border-radius: 50%;
    pointer-events: none; z-index: 200;
    transform: translate(-50%,-50%);
    box-shadow: 0 0 8px rgba(240,232,216,0.8);
  }
  #cursor::after {
    content: ''; position: absolute;
    width: 24px; height: 24px;
    border: 1px solid rgba(240,232,216,0.2);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    transition: width 0.3s, height 0.3s;
  }

  /* ─── OKAMI LIVE HUD ─── */
  #parallax-hud {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 150;
    pointer-events: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.45rem;
    letter-spacing: 0.2em;
    color: rgba(201,168,76,0.4);
    text-transform: uppercase;
    line-height: 2;
  }

  /* ─── OKAMI FADE-UP ─── */
  @keyframes fade-up {
    from { opacity:0; transform: translateY(12px); }
    to   { opacity:1; transform: none; }
  }

  /* ─── LENS FLARE CANVAS ─── */
  #flare-canvas {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
  }

  /* ─── CURL NOISE CANVAS ─── */
  #curl-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* between layer-bg (z:0) and layer-mid (z:1) — sits under mid */
    pointer-events: none;
    opacity: 0.05;
  }
