/* Strange Clocks landing — tokens and page layout. See /DESIGN.md. */

:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --surface-1: #1c1c1e;
  --surface-2: #2c2c2e;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --action: #0071e3;
  --action-hover: #0077ed;
  --link: #2997ff;
  --font-sans: "Onest", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 16px;
  --measure: 34em;
  --section: clamp(80px, 12vw, 160px);
  --max: 1120px;
}
@media (min-width: 740px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
::selection { background: color-mix(in srgb, var(--link) 45%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
button { font: inherit; color: inherit; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 10; background: var(--surface-2);
  color: var(--text); padding: 10px 16px; border-radius: var(--radius-pill); }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- type roles ---------- */
.display {
  font-weight: 800; font-size: clamp(3rem, 9vw, 6.5rem); line-height: .95;
  letter-spacing: -0.035em; margin: 0; text-wrap: balance;
}
.headline {
  font-weight: 700; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05;
  letter-spacing: -0.025em; margin: 0 0 .45em; text-wrap: balance;
}
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.45; color: var(--text-2);
  max-width: var(--measure); margin: 0; text-wrap: pretty; }
.lede strong { color: var(--text); font-weight: 600; }
.label { font: 400 .8125rem/1.5 var(--font-mono); letter-spacing: .02em; color: var(--text-2); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px; }
.topbar .name { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--text); }
.topbar .name:hover { text-decoration: none; }
.lang { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.lang svg { width: 16px; height: 16px; flex: none; }
.lang select {
  appearance: none; -webkit-appearance: none; background: transparent; border: 0;
  color: var(--text-2); font: 500 .9375rem var(--font-sans); padding: 8px 0 8px 4px; cursor: pointer;
  field-sizing: content; text-align: right;
}
.lang select:hover { color: var(--text); }
.lang select option { background: var(--surface-1); color: var(--text); }

/* ---------- actions ---------- */
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: var(--radius-pill); border: 0;
  background: var(--action); color: #fff; font-weight: 600; font-size: 1.0625rem;
  cursor: pointer; transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--action-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn[aria-disabled="true"] { background: var(--surface-2); color: var(--text); cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; }
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 50px; width: auto; }
.cta-note { font-size: .9375rem; color: var(--text-2); margin: 0; }
.textlink { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font-weight: 500; }
.textlink:hover { text-decoration: underline; text-underline-offset: .18em; }
.textlink::after { content: ""; display: inline-block; width: .42em; height: .64em; margin-left: .3em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1.5 6 6l-4.5 4.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1.5 6 6l-4.5 4.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- sections ---------- */
section { padding-block: var(--section); }
.section-head { max-width: 46rem; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lede { margin-inline: auto; }

/* hero */
.hero { padding-block: clamp(24px, 5vw, 64px) var(--section); }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-live { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.hero-device { justify-self: center; width: min(78vw, 360px); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; }
  .hero-device { width: min(100%, 400px); justify-self: end; }
}
.live-line { margin: 0; font-size: .9375rem; color: var(--text-2); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text);
  margin-right: 8px; vertical-align: 1px; }

/* same instant */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 3vw, 32px); }
.trio figure { position: relative; margin: 0; background: var(--surface-1); border-radius: var(--radius-lg); aspect-ratio: 1; }
.trio svg { position: absolute; inset: 14%; width: 72%; height: 72%; }
.reveal { margin-top: 36px; text-align: center; min-height: 3.5em; }
.reveal output { display: block; font: 500 clamp(1.5rem, 4vw, 2.25rem)/1.2 var(--font-mono);
  letter-spacing: -0.01em; }
@media (max-width: 520px) { .trio { grid-template-columns: 1fr 1fr; } .trio figure:last-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; } }

/* fifteen */
.grid15 { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 740px) { .grid15 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1040px) { .grid15 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 14px; text-align: left;
  background: var(--surface-1); border: 0; border-radius: var(--radius-md); padding: 16px 16px 18px;
  cursor: pointer; transition: background-color .2s var(--ease);
}
.tile:hover { background: #242426; }
a.tile { color: var(--text); }
a.tile:hover { text-decoration: none; }
.tile .face { position: relative; aspect-ratio: 1; }
.tile .face svg { position: absolute; inset: 6%; width: 88%; height: 88%; }
.tile .t-name { display: block; font-weight: 600; font-size: 1.0625rem; line-height: 1.25; }
.tile .t-tag { display: block; font-size: .875rem; line-height: 1.35; color: var(--text-2); margin-top: 2px; }
.tile .t-go { margin-top: auto; font-size: .875rem; font-weight: 500; color: var(--link); }
.tile .t-go::after { content: ""; display: inline-block; width: .42em; height: .64em; margin-left: .3em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1.5 6 6l-4.5 4.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1.5 6 6l-4.5 4.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.roman-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 20px;
  font-size: .9375rem; color: var(--text-2); }
.roman-loc select { background: var(--surface-1); color: var(--text); border: 0; border-radius: var(--radius-pill);
  padding: 8px 14px; font: 500 .9375rem var(--font-sans); }

/* duo */
.duo-stage { width: min(100%, 980px); margin-inline: auto; }
.figure-note { text-align: center; margin-top: 20px; font-size: .875rem; color: var(--text-2); }

/* widgets: three devices at one physical scale on a shared baseline.
   --pw is the portrait phone's width; its body is 96.8% of that (side-button
   padding), so the landscape StandBy phone, whose short side is the same
   71.9 mm, is 96.8% x 150 / 71.9 = 2.0195 x --pw wide. Phones: the two
   portrait phones side by side, StandBy beneath at the same scale. */
.widget-rows {
  --gap: 24px;
  --pw: min(250px, (100vw - 2 * var(--gutter) - var(--gap)) / 2);
  display: grid; grid-template-columns: repeat(2, var(--pw)); justify-content: center;
  gap: 48px var(--gap); align-items: end;
}
.widget-col { display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 0; }
.widget-col.is-standby { grid-column: 1 / -1; }
.w-dev { width: var(--pw); }
.w-dev .dev { max-width: none; }
.is-standby .w-dev { width: calc(var(--pw) * 2.0195); }
.widget-col h3 { font-weight: 600; font-size: 1.0625rem; margin: 0; color: var(--text-2); }
@media (min-width: 900px) {
  .widget-rows {
    --gap: 48px;
    --pw: min(250px, (100vw - 2 * var(--gutter) - 2 * var(--gap) - 24px) / 4.0195);
    grid-template-columns: var(--pw) var(--pw) auto;
  }
  .widget-col.is-standby { grid-column: auto; }
}

/* one clock free: the gift becomes the app icon */
.gift { display: grid; gap: 56px; }
@media (min-width: 900px) {
  .gift { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(56px, 7vw, 104px); align-items: center; }
}
.gift-stage { border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px) clamp(20px, 4vw, 40px); }
.gift-home { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gift-icon { width: clamp(120px, 34%, 176px); height: auto; aspect-ratio: 1; border-radius: 22.4%; }
.gift-icon.is-lifting { animation: gift-lift .45s var(--ease); }
@keyframes gift-lift { from { transform: translateY(10px) scale(.9); opacity: .4; } }
.gift-appname { font-weight: 500; font-size: .9375rem; color: var(--text); }
.gift-pick-label { margin: clamp(32px, 5vw, 48px) 0 16px; font-weight: 600; font-size: 1.0625rem; }
.gift-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 2.4vw, 16px); }
.gift-opt {
  position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 22.4%;
  transition: transform .25s var(--ease);
}
.gift-opt img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 22.4%; }
.gift-opt::after {
  content: ""; position: absolute; inset: -5px; border-radius: 27%;
  border: 2px solid transparent; transition: border-color .2s var(--ease);
}
.gift-opt:hover { transform: translateY(-2px); }
.gift-opt[aria-pressed="true"]::after { border-color: var(--text); }
@supports (corner-shape: superellipse(1.6)) {
  .gift-icon, .gift-opt, .gift-opt img, .gift-opt::after { corner-shape: superellipse(1.6); }
}
.gift-truths { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 44px); }
.truth h3 { font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.15;
  letter-spacing: -0.015em; margin: 0 0 8px; text-wrap: balance; }
.truth p { margin: 0; color: var(--text-2); max-width: 30em; text-wrap: pretty; }
@media (prefers-reduced-motion: reduce) {
  .gift-icon.is-lifting { animation: none; }
  .gift-opt, .gift-opt::after { transition: none; }
  .gift-opt:hover { transform: none; }
}

/* close */
.close { text-align: center; }
.close .cta { align-items: center; margin-top: 36px; }

/* footer */
.footer { border-top: 1px solid var(--surface-1); padding-block: 28px 40px; font-size: .875rem; color: var(--text-3); }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; gap: 20px; }
.footer a { color: var(--text-2); }

.motion-note { margin: 0; padding: 10px var(--gutter); text-align: center; font-size: .875rem;
  color: var(--text-2); background: var(--surface-1); }
