/* S1 by SHARQ — waitlist.
   Black ground, warm white type. Two voices: Archivo (Latin) and Noto Kufi (Arabic), because the
   product itself decides in Arabic. The ember palette lives only in the 3D sun and the field's focus
   line — the sun's light touching whatever you are filling in. No page gradients, no borrowed effects.
   v6 (2 Nov 2026): redesign — bilingual type, a horizon, flat fields. */

@font-face { font-family: 'S1 Sans'; src: url('fonts/archivo-latin-wdth-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'S1 Kufi'; src: url('fonts/noto-kufi-arabic-arabic-wght-normal.woff2') format('woff2-variations'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --void: #000;
  --ink: #f4f0e9;
  --ink-70: rgb(244 240 233 / 0.70);
  --ink-50: rgb(244 240 233 / 0.50);
  --ink-35: rgb(244 240 233 / 0.33);
  --line: rgb(244 240 233 / 0.14);
  --line-strong: rgb(244 240 233 / 0.30);
  --field: rgb(244 240 233 / 0.035);
  --ember: #e8591c;
  --danger: #ff8a6b;
  --sans: 'S1 Sans', system-ui, sans-serif;
  --ar: 'S1 Kufi', 'S1 Sans', system-ui, sans-serif;
  --col: 940px;
  --measure: 440px;
  --gut: clamp(20px, 5vw, 48px);
  --r: 7px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); color: var(--ink); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
html, body { min-block-size: 100%; }
body { margin: 0; min-block-size: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--void); }
h1, h2, p, ul, dl, dd, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: #000; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
.soft { color: var(--ink-35); }
.vh { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; inset-block-start: 10px; inset-inline-start: 10px; z-index: 100; padding: 10px 14px; border-radius: var(--r); background: var(--ink); color: #000; font-size: 14px; font-weight: 500; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

/* ---------- Nav ---------- */
.nav { position: sticky; inset-block-start: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  block-size: 64px; padding-inline: var(--gut); border-block-end: 1px solid transparent; transition: background 240ms, border-color 240ms; }
.nav[data-solid] { background: rgb(0 0 0 / 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-block-end-color: var(--line); }
.lockup { display: inline-flex; align-items: baseline; gap: 10px; min-block-size: 44px; align-content: center; flex-wrap: wrap; }
.lockup b { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.lockup-name { color: var(--ink-35); font-weight: 500; font-size: 12px; letter-spacing: 0.14em; }
.lockup-ar { font-family: var(--ar); font-size: 15px; font-weight: 400; color: var(--ink-50); line-height: 1; }
.navEnd { display: flex; align-items: center; gap: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-block-size: 48px; padding: 0 22px; border: 0; border-radius: var(--r);
  background: var(--ink); color: #000; font-size: 15px; font-weight: 550; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer;
  transition: opacity 150ms, transform 150ms var(--ease); }
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.985); }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; padding-block: clamp(16px, 3vh, 40px); min-inline-size: 0; }
.heroInner { inline-size: 100%; max-inline-size: calc(var(--col) + var(--gut) * 2); margin-inline: auto; padding-inline: var(--gut); min-inline-size: 0; }
.stage { position: relative; inline-size: 100%; block-size: clamp(150px, 26svh, 260px); }
#world { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; display: block; opacity: 0; transition: opacity 1100ms var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 86%, transparent 100%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
  mask-composite: intersect; }
.stage[data-ready] #world { opacity: 1; }
.fallbackSun { display: none; position: absolute; inset-inline-start: 50%; inset-block-start: 8%; inline-size: min(36vw, 200px); transform: translateX(-50%); opacity: 0.85; }
.stage[data-fallback] .fallbackSun, .no-js .fallbackSun { display: block; }

/* The horizon: one line that stands for your own ground, with the sun rising from behind it. */
.horizon { block-size: 1px; inline-size: 100%; background: var(--line); margin-block: 6px clamp(22px, 4vh, 40px); }

.heroCopy { display: grid; justify-items: start; text-align: start; gap: clamp(16px, 2.4vh, 24px); }
.kicker { font-family: var(--ar); font-size: clamp(20px, 1.2rem + 1vw, 28px); font-weight: 500; line-height: 1.3; color: var(--ink); }
h1 { font-size: clamp(40px, 1.6rem + 4.4vw, 80px); line-height: 1.02; font-weight: 600; letter-spacing: -0.035em; font-stretch: 97%; text-wrap: balance; max-inline-size: 16ch; }
.lede { max-inline-size: 58ch; color: var(--ink-70); font-size: clamp(16px, 0.95rem + 0.4vw, 18px); line-height: 1.55; text-wrap: pretty; }

/* ---------- Waitlist form ---------- */
.join { inline-size: 100%; max-inline-size: var(--measure); }
.pick, .line { display: flex; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: var(--r); background: var(--field);
  transition: border-color 180ms, box-shadow 220ms var(--ease), background 180ms; }
.pick { position: relative; margin-block-end: 10px; }
.pick:hover, .line:hover { border-color: var(--line-strong); }
.pick:focus-within, .line:focus-within { border-color: var(--ink-50); background: rgb(244 240 233 / 0.06); box-shadow: inset 0 -2px 0 0 var(--ember); }
.pick[data-state='bad'], .line[data-state='bad'] { border-color: var(--danger); box-shadow: inset 0 -2px 0 0 var(--danger); }
.pick input, .line input { flex: 1; inline-size: 100%; min-inline-size: 0; min-block-size: 48px; border: 0; background: none; outline: none; font-size: 16px; letter-spacing: -0.005em; }
.pick input { padding-inline: 14px 40px; }
.line input { padding-inline: 14px; }
.pick input::placeholder, .line input::placeholder { color: var(--ink-35); }
.line .btn { flex: none; min-block-size: 44px; }

.chev { position: absolute; inset-inline-end: 18px; inline-size: 12px; block-size: 12px; color: var(--ink-35); pointer-events: none; transition: transform 200ms var(--ease); }
.pick:has([aria-expanded='true']) .chev { transform: rotate(180deg); }
.opts { position: absolute; z-index: 5; inset-inline: 0; inset-block-end: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; text-align: start;
  max-block-size: min(292px, 42svh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(244 240 233 / 0.2) transparent;
  border: 1px solid var(--line); border-radius: 12px; background: rgb(12 11 10 / 0.95); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.6); }
.opts li { display: flex; align-items: center; min-block-size: 44px; padding: 8px 14px; border-radius: 8px; font-size: 14px; color: var(--ink-70); cursor: pointer; }
.opts li:hover, .opts li[data-active] { background: rgb(244 240 233 / 0.07); color: var(--ink); }
.opts li[aria-selected='true'], .opts li[data-own] { color: var(--ink); }
.opts li[data-own]:not(:first-child) { margin-block-start: 4px; border-block-start: 1px solid var(--line); border-radius: 0 0 8px 8px; padding-block-start: 11px; }
@media (pointer: fine) { .opts li { min-block-size: 36px; } }

.msg { min-block-size: 20px; margin-block-start: 10px; font-size: 13px; color: var(--ink-50); text-align: start; }
.msg[data-tone='bad'] { color: var(--danger); }
.done { max-inline-size: var(--measure); padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); text-align: start; outline: none; }
.done strong { display: block; margin-block-end: 4px; font-weight: 550; }
.done p { color: var(--ink-70); font-size: 14px; }
.done button { min-block-size: 44px; margin-block-start: 8px; padding: 0; border: 0; background: none; color: var(--ink-50); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.done button:hover { color: var(--ink); }

/* ---------- Perks: quiet, stacked, no separators ---------- */
.perks { display: grid; justify-items: start; gap: 10px; }
.perks h2 { font-size: 13px; font-weight: 500; color: var(--ink-35); }
.perks ul { display: flex; flex-wrap: wrap; gap: 6px 28px; list-style: none; padding: 0; font-size: 14px; color: var(--ink-70); }
.perks li { line-height: 1.4; }

/* ---------- Footer ---------- */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--gut) 20px; color: var(--ink-35); font-size: 12px; }
.foot a { min-block-size: 44px; display: inline-flex; align-items: center; padding-inline: 4px; }
.foot a:hover { color: var(--ink); }

/* ---------- Narrow screens ----------
   The sun's rise (scene.js) is the one page-load moment; the copy is present from the first paint. */
@media (max-width: 720px) {
  .perks ul { flex-direction: column; gap: 4px; }
}
@media (max-width: 420px) {
  .line { flex-wrap: wrap; }
  .line input { flex-basis: 100%; }
  .line .btn { flex: 1 0 100%; }
  .pick input, .line input { padding-inline: 12px; font-size: 15px; }
  .pick input { padding-inline-end: 34px; }
}
@media (max-height: 620px) { .lede { display: none; } .stage { block-size: clamp(130px, 24svh, 220px); } }

/* Landscape phones: sun beside the copy, not above it. */
@media (orientation: landscape) and (max-height: 540px) and (min-width: 640px) {
  .heroInner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 0 clamp(20px, 4vw, 48px); max-inline-size: min(1000px, 100%); }
  .stage { block-size: min(74svh, 300px); grid-column: 1; }
  .horizon { display: none; }
  .heroCopy { grid-column: 2; gap: 14px; }
  h1 { font-size: clamp(28px, 7svh, 44px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #world { transition: none; }
}

/* ---------- Try S1 (only on pages built with S1_TRY_URL) ----------
   A dialog opened from the nav, over the hero. Results reuse the confidence bar and type below. */
.tryOpen { display: inline-flex; align-items: center; min-block-size: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: none; color: var(--ink-70); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color 150ms, color 150ms; }
.tryOpen:hover { border-color: var(--ink-50); color: var(--ink); }
.try { inline-size: min(560px, calc(100% - 32px)); max-inline-size: none; max-block-size: calc(100svh - 32px); margin: auto; padding: 0;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(244 240 233 / 0.2) transparent;
  border: 1px solid var(--line); border-radius: 16px; background: #0b0a0a; color: var(--ink); }
.try::backdrop { background: rgb(0 0 0 / 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tryHead { position: sticky; inset-block-start: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 22px; background: #0b0a0a; border-block-end: 1px solid var(--line); }
.tryHead h2 { font-size: 17px; font-weight: 550; letter-spacing: -0.01em; }
.tryX { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border: 0; border-radius: var(--r); background: none; color: var(--ink-70); cursor: pointer; }
.tryX:hover { background: rgb(244 240 233 / 0.07); color: var(--ink); }
.tryX svg { inline-size: 14px; block-size: 14px; }
.tryForm { display: grid; gap: 10px; padding: 18px 22px 4px; }
.try fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.try legend, .tryLabel { padding: 0; margin-block-end: 8px; font-size: 13px; color: var(--ink-35); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-block-size: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: none; color: var(--ink-70); font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--ink-50); }
.chip[aria-pressed='true'] { border-color: var(--ink); color: var(--ink); background: rgb(244 240 233 / 0.06); }
.try textarea { display: block; inline-size: 100%; min-block-size: 96px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--field); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.6; resize: vertical; outline: none; }
.try textarea:focus { border-color: var(--ink-50); box-shadow: inset 0 -2px 0 0 var(--ember); }
.tryCount { margin-block-start: -4px; font-size: 12px; color: var(--ink-35); text-align: end; }
.tryQs > div { display: grid; gap: 2px; }
.tryQ { display: flex; align-items: center; gap: 12px; min-block-size: 44px; font-size: 15px; color: var(--ink-70); cursor: pointer; }
.tryQ input { flex: none; inline-size: 18px; block-size: 18px; margin: 0; accent-color: var(--ember); }
.tryForm .btn { justify-self: start; margin-block-start: 4px; }
.tryForm .btn:disabled { opacity: 0.4; cursor: default; }
.tryForm .msg { margin: 0; text-align: start; }
.tryOut { margin: 4px 22px 0; border-block-start: 1px solid var(--line); }
.tryOut ul { display: grid; margin: 0; padding: 0; list-style: none; }
.tryA { display: grid; gap: 6px; padding-block: 14px; border-block-end: 1px solid var(--line); }
.exQ { font-size: 14px; color: var(--ink-70); }
.exRes { display: grid; grid-template-columns: 14ch minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; }
.exRes b { font-weight: 550; }
.bar { position: relative; block-size: 4px; border-radius: 4px; background: rgb(244 240 233 / 0.12); }
.bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 4px; background: var(--ember); }
.exRes .to { color: var(--ink-50); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tryMeta { display: flex; gap: 32px; padding-block: 14px 0; }
.tryMeta dt { font-size: 13px; color: var(--ink-35); }
.tryMeta dd { margin-block-start: 4px; font-size: 15px; }
.tryNote { padding: 14px 22px 20px; font-size: 13px; color: var(--ink-35); }
@media (max-width: 480px) {
  .try { inline-size: 100%; max-block-size: 100svh; block-size: 100svh; border-radius: 0; border: 0; }
  .tryForm { padding-inline: 16px; } .tryOut { margin-inline: 16px; } .tryNote { padding-inline: 16px; }
  .tryHead { padding-inline-start: 16px; }
  .tryForm .btn { justify-self: stretch; }
}
