/* Organiza's site: the app's ledger tokens (Theme.kt), one split stage, Geist throughout. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #5f6368;
  --surface: #f1f1f1;
  --stage: #141414;
  --on-stage: #f2f4f7;
  --accent: #1d5fbf;
  --on-accent: #ffffff;
  --accent-ink: #1d5fbf;

  --t-small: 15px;
  --t-body: 18px;
  --t-lead: 24px;
  --t-head: clamp(32px, 3vw, 44px);
  --t-display: clamp(64px, 14vw, 240px);

  --margin: 32px;
  --radius: 12px;
  --gap-section: 200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --ink: #ffffff;
    --muted: #b4b4b4;
    --surface: #1e1e1e;
    --stage: #141414;
    --accent: #6ea2f2;
    --on-accent: #000000;
    --accent-ink: #6ea2f2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 "Geist", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
h2 { font-size: var(--t-head); font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-size: var(--t-body); font-weight: 600; line-height: 1.3; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--margin); top: var(--margin); background: var(--bg); padding: 8px 12px; z-index: 10; }

/* The bar: plain links top right, the last one the action. */
.bar { position: absolute; top: 0; right: 0; z-index: 5; padding: 28px var(--margin); }
.bar nav { display: flex; gap: 28px; align-items: center; font-size: var(--t-small); }
.bar a { text-decoration: none; }
.bar a:hover { text-decoration: underline; }
.bar-action {
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.bar-action:hover { color: var(--bg); background: var(--accent); text-decoration: none !important; transform: translateY(-1px); }
.bar-action:active { transform: translateY(1px); }

/* The split: the stage holds still on the left while the reading column scrolls. */
.split { display: grid; grid-template-columns: 47vw 1fr; }
.stage {
  position: sticky; top: 20px; height: calc(100svh - 40px); margin: 20px 0 20px 20px;
  background: var(--stage); border-radius: var(--radius); overflow: hidden;
}
/* The app's screens have empty space at their foot, so each is shown large from its top and cropped by the stage. */
.shot {
  position: absolute; top: 7%; left: 0; right: 0; margin: 0 auto; width: min(68%, 62svh); height: auto; border-radius: var(--radius);
  opacity: 0; transform: scale(0.985); transition: opacity 420ms var(--ease), transform 600ms var(--ease);
}
.shot.is-on { opacity: 1; transform: scale(1); }

.read { padding: 0 var(--margin) 0 72px; min-width: 0; }
.read > section { max-width: 46ch; margin-top: var(--gap-section); }
.read > section.hero { margin-top: 0; max-width: none; }

/* Hero: a sentence at mid height, the name along the bottom crossing into the stage. */
.hero { position: relative; height: 100svh; }
.hero-line { position: absolute; top: 44%; left: 0; max-width: 22ch; font-size: var(--t-lead); line-height: 1.3; letter-spacing: -0.01em; }
.wordmark {
  position: absolute; bottom: 40px; right: 0; margin-left: -10vw;
  font-size: var(--t-display); font-weight: 400; letter-spacing: -0.045em; line-height: 0.9;
  white-space: nowrap; z-index: 2;
  transform-origin: right bottom;
}

/* Mission: one narrow column; the first paragraph leads. */
.mission h2 { margin-bottom: 40px; }
.mission p { font-size: var(--t-body); color: var(--muted); }
.mission p + p { margin-top: 1.1em; }
.mission p.first { color: var(--ink); font-weight: 500; }
.mission a { color: var(--ink); }

/* Features: a small proof beside its text, never alternating sides. */
.features { max-width: 680px !important; }
.features h2 { margin-bottom: 64px; }
.module { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.module + .module { margin-top: 104px; }
.proof { background: var(--surface); border-radius: var(--radius); height: 168px; overflow: hidden; }
.proof img { width: 100%; height: 100%; object-fit: cover; }
.module-text p { font-size: var(--t-small); color: var(--muted); margin-top: 8px; }

/* A real fragment of the app's limit card. */
.proof-ui { height: auto; padding: 18px 18px 8px; font-size: var(--t-small); }
.ui-head { font-weight: 600; margin-bottom: 10px; }
.ui-row { display: grid; grid-template-columns: 20px 1fr auto 56px; gap: 10px; align-items: center; height: 44px; }
.ui-dot { width: 20px; height: 20px; border-radius: 6px; background: #3b4a67; }
.ui-dot-2 { background: #5865f2; }
.ui-name { font-weight: 600; white-space: nowrap; }
.ui-time { font-weight: 600; color: #c4242a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-bar { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.ui-bar span { display: block; height: 100%; background: #c4242a; border-radius: 4px; }
.ui-bar-calm span { background: var(--ink); }
.ui-row:last-child .ui-time { color: var(--ink); }

/* The pause, stage by stage: the slider drives the stage on the left and this column. */
.pause { max-width: 46ch; }
.pause-clause { font-size: var(--t-head); line-height: 1.05; letter-spacing: -0.035em; min-height: 2em; }
.pause-shot { display: none; }
.pause-text { margin-top: 32px; min-height: 5.2em; }
.try { margin-top: 24px; }
.try label { display: block; font-size: var(--t-small); color: var(--muted); }
.try-phrase { display: block; color: var(--ink); font-size: var(--t-lead); line-height: 1.3; margin-top: 6px; }
.try input {
  margin-top: 14px; width: 100%; font: inherit; font-size: var(--t-body); color: var(--ink);
  background: var(--surface); border: 0; border-radius: var(--radius); padding: 14px 16px;
}
.try input:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
.try-count { font-size: var(--t-small); color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.try-count.is-done { color: var(--accent-ink); }
.stages { margin-top: 48px; }
/* The track is drawn under a see-through range: a surface bar, and the passed part in full ink. */
.track { position: relative; }
.track::before, .track-passed { content: ""; position: absolute; left: 0; top: 50%; height: 8px; margin-top: -4px; border-radius: 4px; }
.track::before { right: 0; background: var(--surface); }
.track-passed { width: var(--passed, 0%); background: var(--ink); transition: width 200ms var(--ease); }
#stage { position: relative; width: 100%; height: 32px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#stage::-webkit-slider-runnable-track { height: 8px; background: transparent; }
#stage::-moz-range-track { height: 8px; background: transparent; }
#stage::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -12px; border-radius: 8px; background: var(--accent); transition: transform 160ms var(--ease); }
#stage::-moz-range-thumb { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--accent); }
#stage:active::-webkit-slider-thumb { transform: scale(1.12); }
.stage-names { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin-top: 12px; font-size: var(--t-small); color: var(--muted); }
.stage-names li:nth-child(2) { text-align: center; transform: translateX(-16%); }
.stage-names li:nth-child(3) { text-align: center; transform: translateX(16%); }
.stage-names li:last-child { text-align: right; }
.stage-names .is-on { color: var(--ink); font-weight: 500; }

/* Where it runs: two-ended rows, no boxes and nothing drawn between them. */
.runs h2 { margin-bottom: 32px; }
.rows { list-style: none; padding: 0; }
.rows li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: baseline; min-height: 38px; padding: 6px 0; font-size: var(--t-body); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transform: translateY(1px); }
.dot-android { background: #3ddc84; }
.dot-linux { background: #e95420; }
.dot-windows { background: #0078d4; }
.dot-source { background: var(--ink); }
.row-value { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.rows-group { color: var(--muted); font-size: var(--t-small); margin: 40px 0 6px; }
.runs-note { margin-top: 40px; font-size: var(--t-small); color: var(--muted); }
.runs-note a { color: var(--ink); }
.runs { padding-bottom: 160px; }

/* The close breaks the split: a full field in the accent with the app's first screen already open. */
.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 64px; align-items: end;
  min-height: 90svh; margin: 0 20px; padding: 64px 44px 56px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent);
}
.cta h2 { font-size: min(var(--t-display), 9.5vw); line-height: 0.92; letter-spacing: -0.045em; font-weight: 400; max-width: 6.2ch; }
.cta-words p { margin-top: 28px; max-width: 40ch; font-size: var(--t-body); }
.dialog {
  align-self: center; background: var(--bg); color: var(--ink); border-radius: 20px; padding: 32px;
}
.dialog img { border-radius: 14px; }
.dialog-title { font-size: var(--t-lead); font-weight: 600; margin-top: 18px; }
.dialog-sub { color: var(--muted); margin-top: 2px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 24px 0 0; padding: 4px; border: 0; background: var(--surface); border-radius: var(--radius); }
.segmented legend { position: absolute; left: -9999px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; text-align: center; padding: 10px 0; border-radius: 9px; font-size: var(--t-small); font-weight: 500; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.segmented input:checked + span { background: var(--ink); color: var(--bg); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 1px; }
.segmented label:hover span { background: var(--bg); }
.segmented input:checked + span:hover, .segmented label:hover input:checked + span { background: var(--ink); }
.dialog-file { margin-top: 18px; font-size: var(--t-small); color: var(--muted); }
.dialog-file strong { color: var(--ink); font-weight: 600; }
.dialog-go {
  display: block; margin-top: 18px; text-align: center; text-decoration: none; font-weight: 600;
  background: var(--ink); color: var(--bg); padding: 16px; border-radius: 999px;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.dialog-go:hover { color: var(--on-accent); background: var(--accent); transform: translateY(-1px); }
.dialog-go:active { transform: translateY(1px); }
.dialog-note { margin-top: 18px; padding: 16px; background: var(--surface); border-radius: var(--radius); font-size: var(--t-small); color: var(--muted); }
.dialog-note[hidden] { display: none; }
.dialog-note strong, .dialog-note-title { color: var(--ink); font-weight: 600; }
.dialog-note ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.dialog-note p + p { margin-top: 4px; }
.dialog-note a { display: inline-block; margin-top: 10px; color: var(--ink); }

/* The footer: one quiet line after open ground. */
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 24px;
  padding: 96px var(--margin) 30px; font-size: var(--t-small); color: var(--muted);
}
.foot-links { display: flex; gap: 24px; }
.foot-links a { color: var(--ink); }
.foot-end { text-align: right; }

/* Entrances: each part of a section rises in turn, once. Without the script everything shows. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* The name grows heavy as the first screen leaves. */
@supports (animation-timeline: scroll()) {
  .wordmark { animation: settle linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
  @keyframes settle { to { transform: scale(0.94); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .shot { transition: opacity 1ms; transform: none; }
  .wordmark { animation: none; }
  .bar-action, .dialog-go, #stage::-webkit-slider-thumb { transition: none; }
}

/* Tablet and phone: the stage becomes the top of the page, then the column reads alone. */
@media (max-width: 900px) {
  :root { --margin: 20px; --gap-section: 120px; }
  .bar { left: 0; padding: 16px 20px; }
  .bar nav { justify-content: flex-end; gap: 18px; }
  .bar nav a:not(.bar-action):not(:first-child) { display: none; }
  .bar nav a:first-child { margin-right: auto; color: var(--on-stage); }
  .split { display: block; }
  .stage { position: relative; top: 0; height: 58svh; margin: 12px; }
  .shot { top: 64px; width: 74%; }
  .read { padding: 0 var(--margin); }
  .hero { height: auto; padding-bottom: 8px; display: flex; flex-direction: column-reverse; }
  .hero-line { position: static; font-size: 19px; max-width: 30ch; margin-top: 12px; }
  /* Crosses the stage's foot: difference turns it white over the dark ground, ink over the page. */
  .wordmark { position: static; margin: -14vw 0 0; font-size: 21vw; color: #ffffff; mix-blend-mode: difference; }
  .module { grid-template-columns: 1fr; gap: 16px; }
  .module + .module { margin-top: 64px; }
  .proof { height: 200px; }
  .pause-shot { display: block; background: var(--stage); border-radius: var(--radius); height: 60svh; margin-top: 24px; overflow: hidden; }
  .pause-shot img { width: 74%; height: auto; margin: 24px auto 0; border-radius: var(--radius); }
  .pause-clause { min-height: 0; }
  #stage { height: 40px; }
  #stage::-webkit-slider-thumb { width: 40px; height: 40px; margin-top: -16px; }
  .rows li { min-height: 44px; font-size: 17px; }
  .cta { grid-template-columns: 1fr; margin: 0 12px; padding: 48px 20px 20px; gap: 40px; align-items: start; min-height: 84svh; }
  .cta h2 { font-size: 13vw; }
  .dialog { padding: 24px; }
  .foot { grid-template-columns: 1fr; gap: 8px; padding-top: 56px; }
  .foot-end { text-align: left; }
}
