/* Hallmark · custom (bespoke) · one screen · vibe: "one story, many universes: quiet paper, one phone"
 * paper: warm off-white · accent: the logo's deep purple, on the button only · display: the system serif (New York on
 * Apple, Georgia elsewhere) · body: the system sans · the wordmark keeps the logo's rounded Nunito.
 * axes: light / classical-serif / cool (purple). Replaces the orbit page the owner called norak; all five screens
 * stacked at once on the owner's word (2026-10-25).
 * pre-emit critique: P5 H5 E4 S5 R5 V5 */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700 900; font-display: swap; src: url("fonts/display-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --color-paper: #F6F4EF;
  --color-ink: #17141D;
  --color-muted: #6E6878;
  --color-line: #E2DED6;
  --color-accent: #3E1F7A;        /* the logo's V */
  --color-accent-ink: #FFFFFF;

  --font-display: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mark: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;

  --text-hero: clamp(2.1rem, 2.6vw + 1rem, 4rem);
  --text-line: clamp(0.98rem, 0.3vw + 0.9rem, 1.15rem);
  --text-small: 0.8rem;

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px;
  --radius-button: 999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms; --dur-move: 620ms; --dur-hold: 4500ms;
}

html, body { overflow-x: clip; }
* { box-sizing: border-box; }
body { margin: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column;
  background: var(--color-paper); color: var(--color-ink); font: 400 1rem/1.5 var(--font-body); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
h1 { font-style: normal; }

.top { flex: none; display: flex; align-items: center; gap: 9px; padding: var(--space-md) var(--space-lg) 0; font: 900 1.25rem/1 var(--font-mark); color: var(--color-accent); text-decoration: none; align-self: flex-start; }
.top img { width: 30px; height: 30px; border-radius: 8px; }

/* The page: the words, and the same chat in five apps, stacked as one deck. */
.stage { flex: 1 1 auto; min-height: 0; display: grid; gap: var(--space-md); padding: var(--space-md) var(--space-lg);
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "lead" "phone" "act"; text-align: center; }
.lead { grid-area: lead; } .act { grid-area: act; } .phone { grid-area: phone; }
.lead h1 { margin: 0 auto var(--space-sm); max-width: 13ch; font: 500 var(--text-hero)/1.04 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; overflow-wrap: anywhere; }
.lead p { margin: 0 auto; max-width: 36ch; font-size: var(--text-line); color: var(--color-muted); text-wrap: balance; }

.phone { margin: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-md); }
/* The deck: all five screens at once, the chosen app in front, the others fanned out behind it (stack.js). */
.stack { position: relative; flex: none; width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stack img { position: absolute; left: 50%; top: 50%; width: var(--card, 200px); height: auto; border-radius: 9% / 4.2%; cursor: pointer;
  box-shadow: 0 0 0 1px var(--color-line), 0 22px 44px -24px color-mix(in srgb, var(--color-ink) 50%, transparent);
  -webkit-user-drag: none; }
.stack.ready img { transition: transform var(--dur-move) var(--ease-out); } /* after the first layout, so the deck never flies in */

/* The five universes: one label each, the current one in ink with a line that fills until the next. */
.apps { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; }
.apps button { position: relative; padding: 6px 0; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font: 500 var(--text-small)/1 var(--font-body); color: var(--color-muted); transition: color var(--dur-fast) var(--ease-out); }
.apps button:hover { color: var(--color-ink); }
.apps button[aria-pressed="true"] { color: var(--color-ink); }
.apps button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--color-ink); transform: scaleX(0); transform-origin: left; }
.apps button[aria-pressed="true"]::after { transform: scaleX(1); transition: transform var(--dur-hold) linear; }
.apps.held button[aria-pressed="true"]::after, .apps.still button[aria-pressed="true"]::after { transition: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: var(--radius-button);
  font: 600 0.95rem/1 var(--font-body); white-space: nowrap; text-decoration: none; background: var(--color-accent); color: var(--color-accent-ink);
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out); }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(0.98); }
.btn[aria-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; } /* not in the App Store yet: inert until Apple's link exists */
.note { margin: var(--space-sm) 0 0; font-size: var(--text-small); color: var(--color-muted); }

.fine { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; padding: 0 var(--space-lg) var(--space-md); font-size: 0.72rem; color: var(--color-muted); }
.fine a { text-decoration: none; } .fine a:hover { text-decoration: underline; }
.langs { display: flex; gap: 12px; } .langs a[aria-current] { color: var(--color-ink); }

/* The privacy page: one reading column that scrolls (the landing stays one screen). */
body.doc { height: auto; min-height: 100svh; overflow: visible; }
.page { flex: 1 0 auto; width: min(640px, 100% - 2 * var(--space-lg)); margin: var(--space-xl) auto var(--space-2xl); }
.page h1 { margin: 0 0 var(--space-xs); font: 500 clamp(2.2rem, 2vw + 1.6rem, 3rem)/1.1 var(--font-display); letter-spacing: -0.02em; }
.page .when { margin: 0 0 var(--space-xl); font-size: var(--text-small); color: var(--color-muted); }
.page .big { font: 500 1.35rem/1.35 var(--font-display); margin: 0 0 var(--space-lg); }
.page h2 { margin: var(--space-xl) 0 var(--space-sm); font: 600 1rem/1.3 var(--font-body); }
.page p { margin: 0; color: var(--color-muted); } .page a { color: var(--color-accent); }
:lang(th) h1, :lang(th) .big { letter-spacing: 0; line-height: 1.3; } /* Thai marks need the room */

/* Wide screens: the words left, the phone right, both centred in the height. */
@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-rows: 1fr auto 1fr; grid-template-areas: ". phone" "lead phone" "act phone";
    column-gap: var(--space-2xl); width: min(1180px, 100%); margin-inline: auto; padding: var(--space-lg) var(--space-xl); text-align: left; }
  .lead { align-self: end; } .act { align-self: start; padding-top: var(--space-lg); }
  .lead h1, .lead p { margin-left: 0; }
  .phone { padding-block: var(--space-sm); }
  .top { align-self: center; width: min(1180px, 100%); padding: var(--space-lg) var(--space-xl) 0; } /* the mark lines up with the words */
}
@media (max-width: 899px) { .stack { width: calc(100% + 2 * var(--space-md)); margin-inline: calc(-1 * var(--space-md)); } } /* phones: the deck uses the side margins */
@media (max-height: 640px) and (max-width: 899px) { .lead p { display: none; } } /* small phones: the sentence, the phone, the button */
@media (prefers-reduced-motion: reduce) { .stack img, .btn, .apps button { transition: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
