
  :root {
    color-scheme: dark;
    --ink: #172e29;
    --ink-deep: #10221e;
    --ink-raised: #1d3832;
    --night: #2c4a43;
    --accent: #246b55;
    --line: #dce7e2;
    --citron: #edf58b;
    --citron-line: #b4be48;
    --text: #f2f6f3;
    --text-muted: rgba(220, 231, 226, .66);
    --text-faint: rgba(220, 231, 226, .4);
    --error: #ffb4a8;
    --font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease-settle: cubic-bezier(.2, .8, .2, 1);
    --radius-control: 10px;
    --radius-card: 20px;
  }
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; }
  body {
    background: var(--ink);
    color: var(--text);
    font-family: var(--font);
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* ---------- Scene ---------- */
  .scene-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    transform: translateY(12px);
  }
  #scene {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 1.6s var(--ease-settle);
  }
  .ready #scene { opacity: 1; }
  .veil {
    position: fixed; inset: 0; pointer-events: none;
    background:
      radial-gradient(120% 70% at 50% 0%, rgba(16, 34, 30, .92) 0%, rgba(16, 34, 30, .55) 38%, rgba(16, 34, 30, 0) 62%),
      radial-gradient(140% 90% at 50% 110%, rgba(12, 26, 23, .7) 0%, rgba(12, 26, 23, 0) 55%);
  }
  .grain {
    position: fixed; inset: -50%; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
    background-image: url("/assets/marketing/grain.svg");
  }

  /* ---------- Fallback (no WebGL) ---------- */
  .fallback {
    display: none;
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(56vw, 360px);
  }
  .fallback img { width: 100%; height: auto; display: block; }
  .no-webgl .fallback { display: block; }

  /* ---------- Layout ---------- */
  .page {
    position: relative; z-index: 2;
    height: 100vh; height: 100dvh;
    min-height: 560px;
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr);
    gap: 16px;
    padding: max(20px, env(safe-area-inset-top)) clamp(20px, 4vw, 48px) max(12px, env(safe-area-inset-bottom));
    pointer-events: none;
  }
  .page > * { pointer-events: auto; }
  .page > .scene-stage { pointer-events: none; }

  .brand { display: inline-flex; line-height: 0; margin-bottom: 18px; }
  .brand svg { height: 34px; width: auto; }

  .hero {
    align-self: start;
    justify-self: center;
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding-top: 0;
    transform: translateY(44px);
  }
  h1 {
    margin: 0;
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-optical-sizing: auto;
    text-wrap: balance;
  }
  .lede {
    margin: 14px auto 0;
    max-width: 40em;
    font-size: clamp(.9375rem, 1.2vw, 1.0625rem);
    line-height: 1.5;
    color: var(--text-muted);
    text-wrap: balance;
  }
  .ctas {
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
  }

  .ctas .btn { height: 44px; }

  /* ---------- Buttons ---------- */
  .btn {
    -webkit-appearance: none; appearance: none;
    font: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
    height: 48px; padding: 0 22px;
    border-radius: var(--radius-control);
    border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer;
    transition: transform 200ms var(--ease-settle), background-color 200ms var(--ease-settle), border-color 200ms var(--ease-settle), box-shadow 200ms var(--ease-settle), opacity 200ms;
  }
  .btn:focus-visible { outline: 2px solid var(--citron); outline-offset: 3px; }
  .btn:active { transform: translateY(1px) scale(.99); }
  .btn-primary {
    background: var(--citron); color: var(--ink); border-color: var(--citron-line);
    box-shadow: 0 0 0 0 rgba(237, 245, 139, 0), 0 10px 30px -12px rgba(237, 245, 139, .45);
  }
  .btn-primary:hover { background: #f3f9a6; box-shadow: 0 0 0 6px rgba(237, 245, 139, .1), 0 14px 36px -12px rgba(237, 245, 139, .55); }
  .btn-ghost {
    background: rgba(242, 246, 243, .04); color: var(--text);
    border-color: rgba(220, 231, 226, .18);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .btn-ghost:hover { background: rgba(242, 246, 243, .09); border-color: rgba(220, 231, 226, .32); }
  .btn .arrow { transition: transform 200ms var(--ease-settle); }
  .btn:hover .arrow { transform: translateX(3px); }
  .btn[disabled] { opacity: .6; cursor: progress; }
  .btn-block { width: 100%; }


  /* ---------- Dialogs ---------- */
  dialog.modal {
    width: min(420px, calc(100vw - 32px));
    padding: 0; border: 0;
    border-radius: var(--radius-card);
    background: linear-gradient(180deg, rgba(33, 62, 55, .96), rgba(24, 46, 41, .97));
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(220, 231, 226, .1), 0 40px 120px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    overflow: visible;
  }
  dialog.modal[open] { animation: rise 420ms var(--ease-settle); }
  dialog.modal::backdrop {
    background: rgba(9, 19, 17, .55);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    animation: fade 300ms var(--ease-settle);
  }
  @keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0 } to { opacity: 1 } }
  .modal-inner { padding: 36px 32px 32px; }
  .modal .close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px; border-radius: 9px;
    border: 0; background: transparent; color: var(--text-faint); cursor: pointer;
    display: grid; place-items: center;
    transition: background-color 160ms, color 160ms;
  }
  .modal .close:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
  .modal .close:focus-visible { outline: 2px solid var(--citron); outline-offset: 1px; }
  .modal .mark { width: 44px; margin-bottom: 22px; line-height: 0; }
  .modal .mark svg { width: 100%; height: auto; }
  .modal h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
  .modal .sub { margin: 8px 0 26px; font-size: 14.5px; line-height: 1.5; color: var(--text-muted); }
  .field { display: block; margin-bottom: 14px; }
  .field span { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-muted); margin-bottom: 7px; }
  .field input {
    width: 100%; height: 46px; padding: 0 14px;
    font: inherit; font-size: 15px; color: var(--text);
    background: rgba(10, 22, 19, .45);
    border: 1px solid rgba(220, 231, 226, .14);
    border-radius: var(--radius-control);
    outline: none;
    transition: border-color 160ms, box-shadow 160ms, background-color 160ms;
  }
  .field input::placeholder { color: rgba(220, 231, 226, .3); }
  .field input:hover { border-color: rgba(220, 231, 226, .24); }
  .field input:focus { border-color: var(--citron-line); box-shadow: 0 0 0 4px rgba(237, 245, 139, .12); background: rgba(10, 22, 19, .6); }
  .field input[aria-invalid="true"] { border-color: var(--error); }
  .field input.code {
    text-align: center; text-transform: uppercase;
    font-size: 20px; font-weight: 500; letter-spacing: .32em; height: 56px;
    font-variant-numeric: tabular-nums;
  }
  .error { min-height: 18px; margin: 2px 0 12px; font-size: 13px; color: var(--error); }
  .success { text-align: left; }
  .success .tick {
    width: 44px; height: 44px; border-radius: 12px; margin-bottom: 22px;
    background: var(--citron); color: var(--ink); display: grid; place-items: center;
    box-shadow: 0 0 30px rgba(237, 245, 139, .35);
    animation: pop 480ms var(--ease-settle);
  }
  @keyframes pop { from { transform: scale(.6); opacity: 0 } to { transform: none; opacity: 1 } }
  .success p { margin: 8px 0 26px; font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }
  .success strong { color: var(--text); font-weight: 500; }
  [hidden] { display: none !important; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

  /* ---------- Entrance ---------- */
  .in { opacity: 0; transform: translateY(10px); animation: enter 1s var(--ease-settle) forwards; }
  .in.d1 { animation-delay: .15s } .in.d2 { animation-delay: .3s } .in.d3 { animation-delay: .45s } .in.d4 { animation-delay: .7s }
  @keyframes enter { to { opacity: 1; transform: none; } }

  @media (max-width: 620px) {
    .brand svg { height: 28px; }
    .page { height: auto; min-height: 100dvh; grid-template-rows: auto minmax(260px, 1fr); padding-top: 68px; }
    .brand { margin-bottom: 16px; }
    .hero { padding-top: 0; transform: translateY(24px); }
    .scene-stage { transform: translateY(8px); }
    h1 { font-size: clamp(2rem, 8vw, 2.75rem); }
    .lede { margin-top: 12px; font-size: 15px; }
    .ctas { flex-direction: column; gap: 10px; margin-top: 18px; }
    .ctas .btn { width: min(320px, 100%); }
    .modal-inner { padding: 32px 22px 24px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .in { animation: none; opacity: 1; transform: none; }
    dialog.modal[open], dialog.modal::backdrop { animation: none; }
  }

  /* ---------- Daylight theme ---------- */
  :root {
    color-scheme: light;
    --text: #172e29;
    --text-muted: #52675f;
    --text-faint: rgba(23, 46, 41, .45);
    --error: #963e36;
  }
  body {
    background:
      radial-gradient(90% 60% at 50% 105%, #cfe8f2 0%, rgba(207, 232, 242, 0) 70%),
      radial-gradient(60% 45% at 85% 80%, rgba(217, 204, 242, .45) 0%, rgba(217, 204, 242, 0) 70%),
      radial-gradient(60% 45% at 12% 75%, rgba(205, 228, 193, .55) 0%, rgba(205, 228, 193, 0) 70%),
      #ffffff;
  }
  .veil { background: radial-gradient(110% 60% at 50% 0%, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .5) 40%, rgba(255, 255, 255, 0) 62%); }
  .grain { opacity: .035; mix-blend-mode: multiply; }
  .btn-primary { box-shadow: 0 10px 28px -14px rgba(132, 140, 30, .6); }
  .btn-primary:hover { box-shadow: 0 0 0 6px rgba(237, 245, 139, .35), 0 14px 32px -14px rgba(132, 140, 30, .7); }
  .btn:focus-visible { outline-color: var(--accent); }
  .btn-ghost { background: rgba(255, 255, 255, .65); color: var(--text); border-color: rgba(23, 46, 41, .16); }
  .btn-ghost:hover { background: #ffffff; border-color: rgba(23, 46, 41, .3); }
  dialog.modal {
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 0 0 1px rgba(23, 46, 41, .06), 0 40px 100px -24px rgba(23, 46, 41, .35);
  }
  dialog.modal::backdrop { background: rgba(23, 46, 41, .22); }
  .modal .close:hover { background: rgba(23, 46, 41, .06); }
  .modal .close:focus-visible { outline-color: var(--accent); }
  .field input { background: #f6f9f7; border-color: #dce7e2; }
  .field input::placeholder { color: rgba(23, 46, 41, .3); }
  .field input:hover { border-color: #c3d4cc; }
  .field input:focus { background: #ffffff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(36, 107, 85, .14); }
  .success .tick { box-shadow: 0 8px 24px -8px rgba(132, 140, 30, .6); }

.marketing-navigation{position:fixed;z-index:10;top:24px;right:32px}.marketing-navigation a{text-decoration:none;min-height:42px;padding:10px 20px}.brand img{display:block;width:auto;height:30px}.ctas a{text-decoration:none}.marketing-invite-copy{line-height:1.6}.marketing-invite-copy a{text-decoration:none}@media(max-width:520px){.marketing-navigation{top:16px;right:16px}.marketing-navigation a{min-height:40px;padding:9px 16px}}

@media(max-width:560px){.brand img{height:28px}}

#invite-form{margin-top:24px}

/* Keep the complete hero and a separate formation area inside short laptop viewports. */
@media (min-width: 621px) and (max-height: 700px) {
  .page { min-height: 520px; grid-template-rows: auto minmax(200px, 1fr); gap: 12px; padding-top: 16px; }
  .hero { transform: translateY(32px); }
  .scene-stage { transform: translateY(8px); }
  .brand { margin-bottom: 14px; }
  .brand img { height: 28px; }
  h1 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); }
  .lede { margin-top: 12px; font-size: 15px; line-height: 1.45; }
  .ctas { margin-top: 18px; }
}
