:root {
      --ink: #f6f6f7;
      --muted: rgba(240, 242, 248, 0.78);
      --violet: #a16cff;
      --orbit-duration: 24s;
      --perspective: 1320px;
      --panel-blur: 15px;
      --panel-opacity: 0.82;
      --glow-intensity: 1;
      --copy-width: 840px;
      --character-height: min(1536px, 128svh, 150vw);
      --character-top: calc(100svh - var(--character-height) * .46);
    }

    * { box-sizing: border-box; }

    html,
    body {
      margin: 0;
      min-height: 100%;
      background: #04050b;
      color: var(--ink);
      overflow-x: clip;
    }

    body {
      font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    button,
    a { font: inherit; }

    .hero {
      position: relative;
      isolation: isolate;
      width: 100%;
      min-height: 165svh;
      overflow: clip;
      background:
        radial-gradient(ellipse 76vw 38svh at 50% 102svh, rgba(0, 109, 255, .68), rgba(0, 41, 154, .18) 48%, transparent 76%),
        radial-gradient(ellipse 60vw 60svh at 50% 65svh, rgba(17, 28, 69, .22), transparent 70%),
        #04050b;
    }

    .hero-stage {
      position: relative;
      width: 100%;
      height: 100svh;
      overflow: visible;
      isolation: isolate;
    }

    .hero-stage::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background:
        linear-gradient(180deg, rgba(0,0,0,.20) 0%, rgba(0,0,0,0) 22%),
        radial-gradient(ellipse at center, rgba(0,0,0,0) 43%, rgba(0,0,0,.24) 100%);
    }

    .hero-stage::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: -12%;
      width: min(1050px, 88vw);
      height: 36vh;
      z-index: 0;
      transform: translateX(-50%);
      border-radius: 50%;
      background: rgba(0, 91, 255, 0.20);
      filter: blur(64px);
      pointer-events: none;
    }

    .nav {
      position: absolute;
      inset: max(20px, env(safe-area-inset-top)) 0 auto 0;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 clamp(18px, 4vw, 56px);
      pointer-events: none;
    }

    .nav-left {
      display: flex;
      align-items: center;
      gap: clamp(18px, 2.2vw, 34px);
      margin-left: -12px;
    }

    .app-button { pointer-events: auto; }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      white-space: nowrap;
      user-select: none;
    }

    .brand-mark {
      width: 24px;
      height: 24px;
      filter: drop-shadow(0 0 8px rgba(255,255,255,.08));
    }

    .brand-name {
      font-family: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
      font-size: 22px;
      line-height: 1;
      letter-spacing: -0.02em;
    }

    .app-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      min-height: 44px;
      padding: 0 19px;
      border: 1px solid rgba(255,255,255,.66);
      border-radius: 13px;
      background: #fbfbfb;
      color: #0a0a0b;
      text-decoration: none;
      font-size: 14px;
      font-weight: 700;
      box-shadow: 0 6px 22px rgba(0,0,0,.24), inset 0 1px 0 white;
      transition: transform 180ms ease, box-shadow 180ms ease;
    }

    .app-button:hover { transform: translateY(-1px); box-shadow: 0 9px 28px rgba(0,0,0,.30), inset 0 1px 0 white; }
    .app-button svg { width: 16px; height: 18px; flex: 0 0 auto; }

    .copy {
      position: absolute;
      z-index: 12;
      left: 50%;
      top: clamp(146px, 16.2vh, 186px);
      width: min(var(--copy-width), calc(100vw - 36px));
      transform: translateX(-50%);
      text-align: center;
      will-change: transform;
      pointer-events: none;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-bottom: 34px;
      color: var(--violet);
      font-size: 14px;
      font-weight: 650;
      letter-spacing: 0.01em;
    }

    .eyebrow svg {
      width: 15px;
      height: 18px;
      filter: drop-shadow(0 0 8px rgba(150, 91, 255, .24));
    }

    h1 {
      margin: 0;
      font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
      font-weight: 400;
      font-size: clamp(42px, 4.25vw, 64px);
      line-height: 0.99;
      letter-spacing: -0.042em;
      text-wrap: balance;
      text-shadow: 0 2px 22px rgba(0,0,0,.26);
    }

    h1 em {
      font-style: italic;
      font-weight: 400;
      letter-spacing: -0.055em;
    }

    .supporting-copy {
      margin: 24px auto 0;
      max-width: 670px;
      color: var(--muted);
      font-size: clamp(14px, 1.2vw, 17px);
      line-height: 1.45;
      letter-spacing: -0.016em;
      text-wrap: balance;
      text-shadow: 0 2px 12px rgba(0,0,0,.55);
    }

    .orbit-layer {
      position: absolute;
      inset: 0;
      z-index: 3;
      perspective: var(--perspective);
      perspective-origin: 50% var(--orbit-top, 72%);
      transform-style: preserve-3d;
      pointer-events: none;
    }

    .orbit-layer.front { z-index: 6; }

    .character-wrap {
      position: absolute;
      z-index: 5;
      left: 50%;
      top: var(--character-top);
      width: auto;
      height: var(--character-height);
      transform: translateX(-50%);
      will-change: transform;
      pointer-events: none;
      user-select: none;
    }

    .character-wrap::after {
      content: "";
      position: absolute;
      z-index: -1;
      left: 50%;
      bottom: 0;
      width: 82%;
      height: 28%;
      transform: translate(-50%, 22%);
      border-radius: 50%;
      background: rgba(0, 93, 255, .22);
      filter: blur(34px);
      opacity: .72;
    }

    .character {
      display: block;
      width: auto;
      height: 100%;
      pointer-events: none;
      -webkit-user-drag: none;
      user-select: none;
      mask-image: linear-gradient(to bottom, #000 94%, transparent 100%);
      -webkit-mask-image: linear-gradient(to bottom, #000 94%, transparent 100%);
    }

    .rain-layer {
      position: absolute;
      inset: 0 0 auto;
      height: 100%;
      overflow: hidden;
      pointer-events: none;
      user-select: none;
    }
    .rain-layer--distant { z-index: 1; }
    .rain-layer--back { z-index: 2; }
    .rain-layer--front { z-index: 7; }
    .rain-layer--back::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse at 22% 70%, rgba(106, 147, 188, .10), transparent 55%),
        radial-gradient(ellipse at 82% 55%, rgba(148, 133, 172, .065), transparent 48%);
    }
    .rain-drop {
      position: absolute;
      top: -112px;
      left: var(--rain-x);
      width: var(--rain-width);
      height: var(--rain-length);
      border-radius: 999px;
      opacity: var(--rain-opacity);
      background: linear-gradient(to bottom, transparent, var(--rain-tint) 45%, #e4eaff 88%, transparent);
      animation: auria-rainfall var(--rain-duration) linear infinite;
      animation-delay: var(--rain-delay);
    }
    .rain-drop--close { filter: blur(.7px); }
    .rain-paused .rain-drop { animation-play-state: paused; }
    @keyframes auria-rainfall {
      from { transform: translate3d(0, 0, 0) rotate(var(--rain-angle)); }
      to { transform: translate3d(var(--rain-drift), var(--rain-distance), 0) rotate(var(--rain-angle)); }
    }
    @media (prefers-reduced-motion: reduce) {
      .rain-layer { display: none; }
      .rain-drop { animation: none; }
    }

    /* Droplets retain their impact position in the scene while scrolling. */
    .glass-rain {
      position: absolute;
      inset: 0;
      z-index: 30;
      overflow: hidden;
      pointer-events: none;
      user-select: none;
    }
    .glass-rain__drop {
      position: absolute;
      height: auto;
      opacity: 0;
      mix-blend-mode: screen;
      animation: glass-drop-land var(--drop-life) linear both;
      will-change: transform, opacity;
    }
    @keyframes glass-drop-land {
      0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--drop-rotation)) scale(.68, .82); }
      3% { opacity: var(--drop-opacity); transform: translate(-50%, -50%) rotate(var(--drop-rotation)) scale(1.06, .96); }
      7%, 48% { opacity: var(--drop-opacity); transform: translate(-50%, -50%) rotate(var(--drop-rotation)) scale(1); }
      58% { opacity: var(--drop-opacity); }
      100% { opacity: 0; transform: translate(-50%, calc(-50% + var(--drop-slide))) rotate(var(--drop-rotation)) scale(.96, 1.04); }
    }
    @media (prefers-reduced-motion: reduce) {
      .glass-rain { display: none; }
      .glass-rain__drop { animation: none; }
    }

    .character-story {
      position: absolute;
      z-index: 12;
      left: 50%;
      /* Anchor the finished text to the portrait's elbows, in document space. */
      top: calc(var(--character-top) + var(--character-height) * .73);
      width: min(650px, calc(100% - 40px));
      transform: translate(-50%, -50%);
      text-align: center;
      text-shadow: 0 2px 16px #04050b, 0 4px 32px #04050b;
    }

    .character-story__content {
      position: relative;
      isolation: isolate;
      opacity: 0;
      transform: translateY(56px);
      transition: opacity 700ms ease, transform 900ms cubic-bezier(.16, 1, .3, 1);
    }

    .character-story__content::before {
      content: "";
      position: absolute;
      z-index: -1;
      inset: -35px -20px;
      background: radial-gradient(ellipse, rgba(4, 5, 11, .74), rgba(4, 5, 11, .35) 48%, transparent 72%);
      pointer-events: none;
    }

    .character-story__eyebrow {
      display: block;
      margin-bottom: 16px;
      color: #c8a4ff;
      font-size: 11px;
      font-weight: 650;
      letter-spacing: .16em;
      text-transform: uppercase;
    }

    .character-story h2 {
      margin: 0;
      font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
      font-size: clamp(32px, 4.3vw, 58px);
      font-weight: 400;
      line-height: 1.06;
      letter-spacing: -.035em;
      text-wrap: balance;
    }

    .character-story h2 em { color: #d9c7f8; font-weight: 400; }

    .character-story p {
      max-width: 530px;
      margin: 22px auto 0;
      color: rgba(246, 246, 250, .88);
      font-size: clamp(14px, 1.25vw, 17px);
      line-height: 1.6;
      text-wrap: pretty;
    }

    .character-story.is-pending .character-story__content {
      opacity: 0;
      transform: translateY(56px);
    }

    .character-story.is-revealed .character-story__content {
      opacity: 1;
      transform: translateY(0);
    }

    @media (prefers-reduced-motion: reduce) {
      .character-story.is-pending .character-story__content { transform: none; }
      .character-story.is-revealed .character-story__content { transition: none; }
    }

    .glass-panel {
      position: absolute;
      left: 50%;
      top: var(--orbit-top, 72%);
      width: var(--w, 210px);
      height: var(--h, 102px);
      margin-left: calc(var(--w, 210px) / -2);
      margin-top: calc(var(--h, 102px) / -2);
      /* This wrapper MUST NOT get opacity, filter, overflow:hidden or paint
         containment: those flatten its two faces and break backface culling. */
      transform-style: preserve-3d;
      will-change: transform;
    }

    .panel-face {
      position: absolute;
      inset: 0;
      overflow: hidden;
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
      border-radius: clamp(7px, .65vw, 10px);
    }

    .panel-face--inner {
      /* Local +Z is the inward normal; the orbit wrapper aims it at the centre. */
      transform: translateZ(.25px);
      border: 1px solid rgba(153, 218, 255, .46);
      background:
        linear-gradient(155deg,
          rgba(202, 237, 255, .040) 0%,
          rgba(7, 16, 45, .22) 42%,
          rgba(13, 58, 154, .20) 78%,
          rgba(222, 52, 102, .060) 100%);
      box-shadow:
        inset 0 1px 0 rgba(234, 250, 255, .42),
        inset 0 -1px 0 rgba(32, 130, 255, .31),
        inset 0 0 24px rgba(24, 92, 220, .075),
        0 0 13px rgba(23, 128, 255, .14),
        0 11px 32px rgba(0, 0, 0, .28);
      backdrop-filter: blur(var(--panel-blur)) saturate(135%);
      -webkit-backdrop-filter: blur(var(--panel-blur)) saturate(135%);
      opacity: var(--panel-opacity);
    }

    .panel-face--outer {
      /* A separate outward face, not a mirrored view through the front. */
      transform: rotateY(180deg) translateZ(.25px);
      border: 1px solid rgba(165, 194, 229, .27);
      background: linear-gradient(150deg, rgba(173, 198, 222, .10),
        rgba(28, 46, 73, .16) 48%, rgba(57, 95, 146, .12));
      box-shadow: inset 0 0 22px rgba(168, 205, 255, .08),
        0 0 14px rgba(87, 130, 189, .08);
      backdrop-filter: blur(20px) saturate(85%);
      -webkit-backdrop-filter: blur(20px) saturate(85%);
      filter: blur(.85px);
      opacity: .55;
    }

    .panel-face--inner::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background:
        linear-gradient(105deg,
          rgba(255,255,255,0) 4%,
          rgba(190,228,255,.10) 27%,
          rgba(255,255,255,0) 46%),
        radial-gradient(100% 80% at 94% 8%, rgba(255, 90, 118, .070), transparent 55%),
        radial-gradient(115% 92% at 7% 100%, rgba(31, 149, 255, .16), transparent 58%);
      transform: translateX(var(--sheen-x, -20%));
      mix-blend-mode: screen;
      pointer-events: none;
    }

    .panel-face--inner::after {
      content: "";
      position: absolute;
      inset: auto 5% 2px 5%;
      height: 1px;
      border-radius: 100%;
      background: linear-gradient(90deg, transparent, rgba(106, 216, 255, .65), rgba(255,255,255,.72), rgba(83,154,255,.34), transparent);
      opacity: .42;
      filter: blur(.15px);
      pointer-events: none;
    }

    .edge-glint {
      position: absolute;
      z-index: 4;
      inset: 0;
      pointer-events: none;
      background: radial-gradient(ellipse 32% 9% at 50% 98%, rgba(52, 143, 255, .13), transparent 72%);
      mix-blend-mode: screen;
    }

    @media (max-width: 980px) {
      :root {
        --perspective: 1120px;
        --panel-blur: 12px;
      }

      .nav { padding-inline: 18px; }
      .brand-name { font-size: 20px; }
      .copy { top: 132px; width: min(760px, calc(100vw - 32px)); }
      .eyebrow { margin-bottom: 26px; }
      .supporting-copy { max-width: 590px; margin-top: 20px; }
      .panel-face { border-radius: 8px; }
    }

    @media (max-width: 720px) {
      :root {
        --perspective: 950px;
        --panel-opacity: .76;
      }

      .nav { top: max(14px, env(safe-area-inset-top)); }
      .nav-left { gap: 14px; margin-left: -8px; }
      .brand-mark { width: 20px; height: 20px; }
      .brand-name { font-size: 18px; }
      .app-button { min-height: 40px; padding-inline: 13px; font-size: 13px; border-radius: 11px; }
      .app-button svg { width: 14px; height: 16px; }
      .copy { top: 118px; }
      .eyebrow { margin-bottom: 20px; font-size: 13px; }
      h1 { font-size: clamp(38px, 9.6vw, 53px); line-height: 1.01; }
      .supporting-copy { margin-top: 17px; font-size: 14px; max-width: 500px; padding-inline: 12px; }
    }

    @media (max-width: 520px) {
      .nav { padding-inline: 14px; }
      .nav-left { gap: 10px; margin-left: -5px; }
      .brand-name { display: none; }
      .app-button { padding-inline: 12px; }
      .copy { top: 105px; width: calc(100vw - 26px); }
      .eyebrow { margin-bottom: 18px; }
      h1 { font-size: clamp(35px, 10.4vw, 46px); letter-spacing: -0.05em; }
      .supporting-copy { max-width: 390px; line-height: 1.42; }
    }

    @media (max-height: 790px) and (min-width: 721px) {
      .copy { top: 112px; }
      .eyebrow { margin-bottom: 20px; }
      h1 { font-size: clamp(40px, 4.0vw, 55px); }
      .supporting-copy { margin-top: 16px; }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
      }
      .app-button { transition: none; }
    }
