/* Hallmark · shape: Poster + Pinned story · genre: atmospheric · theme: Lumen (deal 1/3, seed premium-orbita-native-mac-4085·b65ac965·2026-11-15·r0) · job: try · draw: custom-from-material
 * hero: Poster (the live universe, full bleed, head low left) · nav: floating pill on blur · footer: mast · imagery: the product (live WebGL + captured app screens) · signature: the universe folds into a brain as you scroll
 * axes: dark/roman-serif/warm · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P5 H5 E4 S5 R4 V4 · weakest: E, four feature screens could read as a tour; each section shows one capture and one claim, no icon tiles */
/* waive 29 (Lumen: no ambient loop, no glowing object): the particle universe is the product itself, rendered from the app's own geometry, not a decorative orb; it pauses off-screen and stills under reduced motion */
/* waive 47c: the blueprint grid sits inside the one diagram well, never under running text */
/* waive 38iii: one verb in the hero head ("ritrova") carries the theme's drawn underline in brass and ink; the user asked for no rose */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --nav-h: 64px;
  --shot-drop: drop-shadow(0 40px 60px oklch(4% 0.02 290 / 0.6));
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-variant-numeric: tabular-nums; }
h1, h2, h3, nav, label, th, caption, figcaption, .btn, .cosmos__title { text-transform: lowercase; }
h1, h2, h3 { font-weight: 400; }
h2 { font-size: var(--text-display-s); line-height: 0.98; max-width: 16ch; }

.container { padding-inline: var(--gutter); }
@media (max-width: 60rem) { :root { --gutter: 20px; } }

.skip { position: absolute; left: var(--space-md); top: -100px; z-index: 50; padding: var(--space-xs) var(--space-md); background: var(--color-accent); color: var(--color-accent-ink); border-radius: var(--radius-pill); }
.skip:focus-visible { top: var(--space-md); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-pill);
  font-weight: 500; font-size: var(--text-md); text-decoration: none; border: 0; cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--small { min-height: 36px; padding: var(--space-2xs) var(--space-md); font-size: var(--text-sm); }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: color-mix(in oklab, var(--color-accent) 88%, var(--color-ink)); }
.btn--secondary { box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2); color: var(--color-ink); background: transparent; }
.btn--secondary:hover { background: var(--color-paper-2); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

a:not(.btn) { text-decoration-color: transparent; transition: text-decoration-color var(--dur-short) var(--ease-out); }
a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--color-accent); }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 20; top: var(--space-md); left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: var(--space-lg);
  padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-md); border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-paper) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule);
}
.nav__brand { display: inline-flex; align-items: center; gap: var(--space-xs); font-family: var(--font-display); font-size: var(--text-xl); text-decoration: none; }
.nav__brand img { border-radius: 7px; }
.nav__links { display: flex; gap: var(--space-lg); font-size: var(--text-sm); color: var(--color-ink-2); }
.nav__links a { text-decoration: none; }
.nav__links a:hover { color: var(--color-ink); }
@media (max-width: 48rem) { .nav__links { display: none; } .nav { gap: var(--space-md); } }

/* ---------- the cosmos (hero + pinned morph) ---------- */
.cosmos { position: relative; height: 380svh; }
.cosmos__stage { position: sticky; top: 0; height: 100dvh; overflow: clip; }
.cosmos__fallback, .cosmos__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cosmos__fallback { object-fit: cover; opacity: 0.55; }
.cosmos.is-live .cosmos__fallback { opacity: 0; transition: opacity var(--dur-long) var(--ease-out); }
.cosmos__canvas { display: block; }
.cosmos__stage::after { /* keeps the head legible over the brightest stars */
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: linear-gradient(to top, var(--color-paper), color-mix(in oklab, var(--color-paper) 0%, transparent));
}

.cosmos__hero, .cosmos__step {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(48px, 9vh, 112px);
  display: grid; gap: var(--space-md); justify-items: start;
}
.cosmos__hero h1 { font-size: clamp(3.25rem, 8vw + 0.5rem, 8.5rem); line-height: 0.92; max-width: 12ch; }
.cosmos__hero .lead { color: var(--color-ink-2); }
.cosmos__hero .actions { margin-top: var(--space-xs); }

.verb { display: inline-block; color: var(--color-ink); }
.verb::after { content: ""; display: block; height: 2px; margin-top: -0.06em; background: var(--color-accent); transform-origin: left; animation: draw var(--dur-long) var(--ease-out) 0.4s both; }
@keyframes draw { from { transform: scaleX(0); } }

.cosmos__step { opacity: 0; pointer-events: none; }
.cosmos__title { font-family: var(--font-display); font-size: var(--text-display-s); line-height: 0.98; max-width: 16ch; }
.cosmos__step p:not(.cosmos__title) { color: var(--color-ink-2); font-size: var(--text-lead); max-width: 40ch; }
.cosmos.is-live .cosmos__hero, .cosmos.is-live .cosmos__step { will-change: opacity, transform; }

.cosmos__progress { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(48px, 9vh, 112px); width: 120px; height: var(--rule-hair); background: var(--color-rule-2); opacity: 0; }
.cosmos__progress span { display: block; height: 100%; background: var(--color-accent); transform-origin: left; transform: scaleX(0); }
.cosmos.is-live .cosmos__progress { opacity: 1; }

/* No JS or no WebGL: the hero is a still of the real app, the steps stay hidden, the section is one screen tall. */
.cosmos:not(.is-live) { height: auto; }
.cosmos:not(.is-live) .cosmos__stage { position: relative; }

/* ---------- product shots ---------- */
.shot { margin: 0; min-width: 0; }
.shot img { width: 100%; border-radius: var(--radius-card); filter: var(--shot-drop); }
.shot--tilt img { transform: perspective(1600px) rotateY(-9deg) rotateX(3deg); transform-origin: left center; }

/* ---------- sections ---------- */
.feature, .claude, .close { padding-block: var(--section-gap); }
.feature { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-3xl); align-items: center; }
.feature__text { display: grid; gap: var(--space-lg); }
.feature__text .lead, .split__text .lead, .claude__head .lead, .close .lead { color: var(--color-ink-2); }

.rows { list-style: none; margin: var(--space-sm) 0 0; padding: 0; border-top: var(--rule-hair) solid var(--color-rule); }
.rows li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); align-items: baseline; padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-ink-2); }
.readout { font: 400 0.8125rem/1.5 var(--font-outlier); color: var(--color-accent); }

.band { background: var(--color-paper-2); color: var(--color-ink); padding-block: var(--section-gap); border-block: var(--rule-hair) solid var(--color-rule); }
.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl); align-items: center; }
.split--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split__text { display: grid; gap: var(--space-lg); align-content: center; }
/* the phone shot sits narrow beside the text, never stretched to a desktop column */
.split--phone { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.shot--phone { justify-self: center; width: min(100%, 300px); }
.shot--phone img { border-radius: 40px; }
.shot--film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius-card); background: var(--color-paper); filter: var(--shot-drop); }

.formats { width: 100%; border-collapse: collapse; margin-top: var(--space-sm); }
.formats caption { text-align: left; color: var(--color-muted); font-size: var(--text-sm); padding-bottom: var(--space-xs); }
.formats th { text-align: left; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 400; padding-right: var(--space-lg); }
.formats th, .formats td { padding-block: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
.formats td { color: var(--color-ink-2); }
.formats td.readout { text-align: right; color: var(--color-muted); }
.compare thead th { font-family: inherit; font-size: var(--text-sm); color: var(--color-muted); border-top: 0; }
.compare td { padding-right: var(--space-lg); }
.compare td:last-child { color: var(--color-ink); }

/* ---------- claude ---------- */
.claude { display: grid; gap: var(--space-2xl); }
.claude__head { display: grid; gap: var(--space-lg); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; }
.well { background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); }
.blueprint { background-image: linear-gradient(var(--rule-blueprint) 1px, transparent 1px), linear-gradient(90deg, var(--rule-blueprint) 1px, transparent 1px); background-size: 48px 48px; }
.diagram { padding: var(--space-2xl) var(--space-xl); display: grid; gap: var(--space-xl); }
.diagram__row { display: grid; grid-template-columns: 8rem auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto; align-items: center; }
.diagram__label { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-muted); }
.diagram__row--on .diagram__label { color: var(--color-ink); }
.node { font: 400 0.875rem/1 var(--font-outlier); padding: var(--space-md) var(--space-lg); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-paper); color: var(--color-ink-2); white-space: nowrap; }
.node--on { border-color: var(--color-accent); color: var(--color-ink); }
.wire { height: var(--rule-hair); background: var(--color-rule-2); position: relative; display: grid; place-items: center; }
.wire--on { background: var(--color-accent); }
.wire .readout { background: var(--color-paper-2); padding-inline: var(--space-xs); line-height: 1; }
.diagram__caption { color: var(--color-ink-2); font-size: var(--text-sm); border-top: var(--rule-hair) solid var(--color-rule); padding-top: var(--space-md); }
@media (max-width: 60rem) {
  .diagram__row { grid-template-columns: 1fr; justify-items: start; gap: var(--space-xs); }
  .wire { width: var(--rule-hair); height: 20px; margin-left: var(--space-lg); }
  .wire .readout { position: absolute; left: var(--space-sm); }
}

.claude__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-lg); align-items: start; }
.code { padding: var(--space-lg); display: grid; gap: var(--space-md); }
.code__bar { display: flex; justify-content: space-between; align-items: center; }
.code pre { margin: 0; white-space: pre-wrap; word-break: break-all; font: 400 0.9375rem/1.6 var(--font-outlier); color: var(--color-ink); }
.code__note { color: var(--color-muted); font-size: var(--text-sm); }
.tools { list-style: none; margin: 0; padding: 0; border-top: var(--rule-hair) solid var(--color-rule); }
.tools li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-md); padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
.tools code { font: 400 0.8125rem/1.5 var(--font-outlier); color: var(--color-ink); }
.tools span { color: var(--color-ink-2); font-size: var(--text-sm); }

/* ---------- close ---------- */
.close { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: center; }
.close__text { display: grid; gap: var(--space-lg); justify-items: start; }
.close__icon { width: 96px; height: 96px; }
.close__note { color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- footer ---------- */
.foot { border-top: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-2xl) var(--space-xl); overflow: clip; }
.foot__mast { font-family: var(--font-display); font-size: clamp(6rem, 22vw, 20rem); line-height: 0.8; letter-spacing: -0.03em; color: var(--color-paper-3); margin-bottom: var(--space-xl); }
.foot__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: var(--space-lg); color: var(--color-muted); font-size: var(--text-sm); }
.foot__links { display: flex; gap: var(--space-lg); }

/* ---------- reveal: one, on the product shots ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .shot { opacity: 0; translate: 0 24px; transition: opacity 700ms var(--ease-out), translate 700ms var(--ease-out); }
  .js .shot.is-in { opacity: 1; translate: 0 0; }
}

/* ---------- small screens ---------- */
@media (max-width: 60rem) {
  .feature, .split, .split--reverse, .close, .claude__head, .claude__grid, .foot__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .split--reverse .shot { order: -1; }
  .shot--tilt img { transform: none; }
  .cosmos { height: 260svh; }
}
@media (prefers-reduced-motion: reduce) {
  .verb::after { animation: none; }
  .shot--tilt img { transform: none; }
}

/* ================= motion · premium: one curve (--ease-out), three durations, one entrance (rise from a mask) ================= */
:root { --dur-quick: 240ms; --dur-std: 760ms; --dur-slow: 1150ms; }

/* hero head: words rise out of their line, 90 ms apart (rare: once per visit) */
.cosmos__hero h1 .w { display: inline-block; overflow: clip; overflow-clip-margin: 0.12em; vertical-align: top; padding-bottom: 0.08em; }
.cosmos__hero h1 .w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .cosmos__hero h1 .w > span { animation: rise var(--dur-slow) var(--ease-out) both; }
  .cosmos__hero h1 .w:nth-child(1) > span { animation-delay: 120ms; }
  .cosmos__hero h1 .w:nth-child(2) > span { animation-delay: 210ms; }
  .cosmos__hero h1 .w:nth-child(3) > span { animation-delay: 300ms; }
  .cosmos__hero h1 .w:nth-child(4) > span { animation-delay: 390ms; }
  .cosmos__hero h1 .w:nth-child(5) > span { animation-delay: 480ms; }
  .cosmos__hero h1 .w:nth-child(6) > span { animation-delay: 570ms; }
  .hero-in { animation: fade-up var(--dur-std) var(--ease-out) 700ms both; }
  .actions.hero-in { animation-delay: 820ms; }
  .verb::after { animation-delay: 1100ms; animation-duration: var(--dur-std); }
}
@keyframes rise { from { transform: translateY(135%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }

/* section heads and their copy: rise once as they arrive (visible without JS) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-std) var(--ease-out), transform var(--dur-std) var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .rows li { opacity: 0; transform: translateX(-10px); transition: opacity var(--dur-std) var(--ease-out), transform var(--dur-std) var(--ease-out); transition-delay: calc(320ms + var(--i, 0) * 60ms); }
  .js .rows.is-in li { opacity: 1; transform: none; }
}

/* product shots: settle in, then follow the pointer a few degrees (fine pointers only) */
@media (prefers-reduced-motion: no-preference) {
  .js .shot { opacity: 0; transform: translateY(32px) scale(0.965); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); translate: none; }
  .js .shot.is-in { opacity: 1; transform: none; }
}
.shot { perspective: 1400px; }
.shot img { transition: transform var(--dur-std) var(--ease-out); will-change: transform; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .shot.is-tilting img { transition-duration: 120ms; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
  .shot--tilt.is-tilting img { transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) - 9deg)); }
}

/* the diagram explains itself: a brass packet runs Claude → orbita → your notes */
.wire--on { container-type: inline-size; overflow: visible; }
.wire--on::after { content: ""; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin: calc(var(--space-2xs) * -1) 0 0 calc(var(--space-2xs) * -1); border-radius: 50%; background: var(--color-accent); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .diagram.is-in .wire--on::after { animation: packet 2.6s var(--ease-in-out) infinite; }
  .diagram.is-in .diagram__row--on .wire--on:nth-of-type(4)::after { animation-delay: 1.1s; }
}
@keyframes packet { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 70% { transform: translateX(100cqw); opacity: 1; } 80%, 100% { transform: translateX(100cqw); opacity: 0; } }

/* the command types itself once, like a terminal */
.code pre .caret { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: text-bottom; background: var(--color-accent); margin-left: var(--space-3xs); }
@media (prefers-reduced-motion: no-preference) { .code pre .caret { animation: blink 1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

/* morph progress, labelled at both ends (a 1px line: the accent stays far under 5% of the screen) */
.cosmos__progress { display: flex; align-items: center; gap: var(--space-sm); width: auto; height: auto; background: none; }
.cosmos__progress span { display: block; width: 120px; height: var(--rule-hair); background: var(--color-rule-2); position: relative; transform: none; }
.cosmos__progress span::after { content: ""; position: absolute; inset: 0; background: var(--color-accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.cosmos__progress i { font: 400 0.75rem/1 var(--font-outlier); font-style: normal; color: var(--color-muted); }

/* nav steps aside while you read downward, returns when you scroll up */
.nav { transition: transform var(--dur-std) var(--ease-out), opacity var(--dur-quick) var(--ease-out); }
.nav.is-hidden { transform: translateY(calc(-100% - var(--space-xl))); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .nav.is-hidden { transform: none; opacity: 1; } }
