/* Velocity website. One stylesheet for every page.
   Brand (from the app, Velocity/Design/Brand.swift): cream instead of white, pure black,
   the logo's blue. Dark mode: black background, lighter blue. Bricolage Grotesque throughout;
   the reading word uses the system font, as it does in the app. */

@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #fef7ee;
  --card: #f6ede1;
  --ink: #000;
  --soft: rgba(0, 0, 0, 0.62);
  --line: rgba(0, 0, 0, 0.14);
  --accent: #1f63e0;
  --night: #000;          /* the dark reading tile */
  --night-ink: #e4e4e4;
  --night-focus: #6fa3fa;
  --bezel: #0b0b0c;
  --gutter: clamp(16px, 2.6vw, 40px);
  --radius: clamp(28px, 3.2vw, 44px);
  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --reading: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --card: #1c1c1e;
    --ink: #fff;
    --soft: rgba(255, 255, 255, 0.64);
    --line: rgba(255, 255, 255, 0.18);
    --accent: #6fa3fa;
    --night: #1c1c1e;
    --night-ink: #ececec;
    --bezel: #2a2a2d;
  }
}

*, *::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 18px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

html[data-launch="soon"] .only-live,
html[data-launch="live"] .only-soon { display: none !important; }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 20;
  padding: 10px 16px; border-radius: 100px; background: var(--ink); color: var(--bg);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */

h1, h2 { font-weight: 600; letter-spacing: -0.022em; line-height: 1; text-wrap: balance; }
h2 { font-size: clamp(30px, 3.5vw, 52px); line-height: 1.04; }
.tile p, .hero__lede { color: var(--soft); font-size: clamp(18px, 1.45vw, 22px); line-height: 1.35; text-wrap: pretty; }

/* ---------- Pills, nav ---------- */

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px; border-radius: 100px;
  font-weight: 500; font-size: 16px; line-height: 1; text-decoration: none; white-space: nowrap;
}
.pill--ink { background: var(--ink); color: var(--bg); transition: transform 0.15s ease; }
.pill--ink:hover { transform: scale(1.04); }
.pill--ink:active { transform: scale(0.97); }
.pill--line { box-shadow: inset 0 0 0 1.5px var(--line); }

.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--gutter);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 22px; letter-spacing: -0.03em; text-decoration: none;
}
.brand img { width: auto; height: 34px; }

/* ---------- Phone ---------- */

.phone { container-type: inline-size; width: 100%; }
.phone__body {
  aspect-ratio: 440 / 956;
  padding: 2.4cqw;
  border-radius: 17cqw;
  background: var(--bezel);
}
.phone__screen {
  display: block; width: 100%; height: 100%;
  border-radius: 14.8cqw; overflow: hidden;
  background: var(--bg);
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* The hero phone's screen is drawn in HTML so the word can play live. */
.screen {
  position: relative; border: 0; padding: 0; cursor: pointer;
  background: var(--bg); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.screen__time {
  position: absolute; left: 13.5cqw; top: 6.1cqw;
  font: 600 4.3cqw/1 var(--reading); letter-spacing: -0.01em;
}
.screen__island {
  position: absolute; left: 50%; top: 3.2cqw; width: 29cqw; height: 8.6cqw;
  margin-left: -14.5cqw; border-radius: 100px; background: var(--bezel);
}
.screen__status { position: absolute; right: 8.5cqw; top: 6.2cqw; width: 19cqw; height: auto; fill: currentColor; }

/* ---------- The word ---------- */

/* Three columns: the focus letter sits in the middle one, so it never moves. */
.word {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline;
  width: 100%; white-space: pre;
  font-family: var(--reading); font-weight: 500; letter-spacing: -0.01em; line-height: 1.1;
}
.word__a { text-align: right; }
.word__b { text-align: left; }
.screen .word { position: absolute; left: 0; top: 39%; font-size: 11.5cqw; }
.screen .word--long { font-size: 8.6cqw; }
.screen .word__f { color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  display: grid; align-items: end;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 27vw, 420px) minmax(0, 1fr);
  column-gap: clamp(24px, 4vw, 72px);
  min-height: max(100svh, 640px);
  padding: 120px var(--gutter) 0;
}
.hero__title {
  align-self: center; padding-top: 12vh;
  font-size: clamp(44px, 5.5vw, 100px); line-height: 0.94; white-space: nowrap;
}
.hero__phone { align-self: end; margin-bottom: -9%; }
.hero__side { align-self: center; padding-top: 12vh; max-width: 21em; justify-self: end; }
.hero__side > * + * { margin-top: 22px; }
.badge { display: inline-block; transition: transform 0.15s ease; }
.badge:hover { transform: scale(1.04); }
.badge img { height: 52px; width: auto; }

/* ---------- Tiles ---------- */

section + section { margin-top: var(--gutter); }
.hero + section { margin-top: 0; }

.tile {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(24px, 3.2vw, 48px);
}
.tile--card { background: var(--card); }
.tile--night { background: var(--night); color: var(--night-ink); }
.tile--blue { background: #1f63e0; color: #fff; }
.tile h2 + p { margin-top: 14px; max-width: 24em; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.pair > .tile { display: flex; flex-direction: column; min-height: clamp(460px, 44vw, 640px); }

/* A page of grey lines with a dot hopping between fixations, like an eye reading. */
.page-art {
  position: relative; margin: auto 0; width: min(100%, 520px); align-self: center;
  display: grid; gap: clamp(14px, 1.7vw, 22px);
}
.page-art i {
  height: clamp(10px, 1.1vw, 14px); border-radius: 100px;
  background: var(--ink); opacity: 0.13;
}
.page-art i:nth-child(3) { width: 92%; }
.page-art i:nth-child(5) { width: 97%; }
.page-art i:nth-child(7) { width: 58%; }
.page-art b {
  position: absolute; left: 0; top: 0;
  width: clamp(18px, 2vw, 26px); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent);
  margin: calc(clamp(18px, 2vw, 26px) / -2 + clamp(10px, 1.1vw, 14px) / 2) 0 0 calc(clamp(18px, 2vw, 26px) / -2);
  animation: saccade 9s infinite;
}
/* Each stop holds, then jumps fast: fixations and saccades. Rows are 1/6 of the height apart. */
@keyframes saccade {
  0%, 5%      { left: 6%;  top: 0; }
  7%, 12%     { left: 31%; top: 0; }
  14%, 19%    { left: 58%; top: 0; }
  21%, 25%    { left: 44%; top: 0; }
  27%, 32%    { left: 83%; top: 0; }
  35%, 40%    { left: 9%;  top: 16.67%; }
  42%, 47%    { left: 38%; top: 16.67%; }
  49%, 54%    { left: 70%; top: 16.67%; }
  57%, 62%    { left: 12%; top: 33.33%; }
  64%, 68%    { left: 47%; top: 33.33%; }
  70%, 74%    { left: 29%; top: 33.33%; }
  76%, 81%    { left: 76%; top: 33.33%; }
  84%, 89%    { left: 8%;  top: 50%; }
  91%, 96%    { left: 41%; top: 50%; }
  100%        { left: 6%;  top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .page-art b { animation: none; left: 38%; top: 16.67%; }
  html { scroll-behavior: auto; }
}

/* The live word in the dark tile, with the speed slider under it. */
.stream {
  flex: 1; display: grid; place-items: center; min-height: 180px;
  border: 0; padding: 0; background: none; cursor: pointer; container-type: inline-size;
  -webkit-tap-highlight-color: transparent;
}
.stream .word { font-size: clamp(40px, 12cqw, 84px); }
.stream .word--long { font-size: clamp(30px, 9cqw, 62px); }
.stream .word__f { color: var(--night-focus); }
.stream.is-paused .word, .screen.is-paused .word { opacity: 0.45; }

.speed { display: grid; gap: 16px; }
.speed .speed__now { color: inherit; font-size: 17px; opacity: 0.7; }
.speed__now output { font-weight: 600; font-variant-numeric: tabular-nums; }
.speed__range {
  --fill: 22%;
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 44px; margin: -14px 0; background: none; cursor: pointer;
}
.speed__range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 100px;
  background: linear-gradient(to right, #fff var(--fill), rgba(255, 255, 255, 0.24) var(--fill));
}
.speed__range::-moz-range-track { height: 6px; border-radius: 100px; background: rgba(255, 255, 255, 0.24); }
.speed__range::-moz-range-progress { height: 6px; border-radius: 100px; background: #fff; }
.speed__range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px;
  border-radius: 50%; background: #fff; border: 0;
}
.speed__range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; }

/* Wide tile: words on the left, the phone rising out of the bottom on the right. */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--gutter);
  padding-bottom: 0; min-height: clamp(420px, 40vw, 600px);
}
.feature__text { padding-bottom: clamp(24px, 3.2vw, 48px); }
.feature__text h2 { font-size: clamp(34px, 4.6vw, 72px); }
.feature__shot { width: min(100%, 380px); justify-self: center; align-self: end; margin-bottom: -22%; padding-top: 16px; }

/* Tall tile: words on top, the phone cropped by the bottom edge. */
.shot { padding-bottom: 0; }
.shot__phone { width: min(74%, 320px); margin: clamp(28px, 3vw, 44px) auto -30%; }

/* The time-saved tile. */
.saved { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: clamp(20px, 4vw, 72px); }
.saved .saved__big {
  font-weight: 600; letter-spacing: -0.035em; line-height: 0.86;
  font-size: clamp(64px, 12.5vw, 200px); color: #fff; white-space: nowrap;
}
.saved__text { max-width: 30em; justify-self: end; padding-bottom: 0.6vw; }
.saved__text h2 { font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -0.025em; line-height: 1.12; }
.saved .saved__text p { color: rgba(255, 255, 255, 0.78); font-size: 16px; }

/* ---------- Closing ---------- */

.get {
  display: grid; justify-items: start; gap: 28px;
  padding-block: clamp(72px, 11vw, 160px) clamp(56px, 8vw, 120px);
}
.get__icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 1px var(--line); }
.get__title { font-size: clamp(56px, 10vw, 168px); line-height: 0.9; letter-spacing: -0.03em; }
.get p { display: flex; flex-wrap: wrap; gap: 10px; }
.get .badge img { height: 60px; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 15px; color: var(--soft);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { text-decoration: none; color: var(--ink); }
.footer a:hover, .prose a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Text pages: support, privacy, terms, 404 ---------- */

.page { padding-top: clamp(120px, 14vw, 180px); padding-bottom: clamp(56px, 8vw, 120px); }
.prose { max-width: 680px; }
.prose h1 { font-size: clamp(44px, 6vw, 80px); margin-bottom: 24px; }
.prose h2 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.025em; margin: 56px 0 14px; }
.prose p, .prose li { color: var(--soft); }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 14px 0; padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .lede { font-size: clamp(19px, 1.6vw, 22px); }
.prose .updated { margin-top: 48px; font-size: 15px; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font-weight: 500; font-size: 19px; letter-spacing: -0.015em; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 20px; max-width: 60ch; }

.lost { min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: 24px; }
.lost h1 { font-size: clamp(56px, 10vw, 150px); }

/* ---------- Smaller screens ---------- */

@media (max-width: 899px) {
  .hero {
    grid-template-columns: 1fr; align-items: start; row-gap: 0;
    min-height: 0; padding-top: 112px;
  }
  .hero__title { padding-top: 0; font-size: clamp(52px, 15vw, 96px); }
  .hero__side { order: 2; padding-top: 0; margin-top: 20px; justify-self: start; }
  .hero__phone { order: 3; width: min(78%, 340px); margin: 44px auto -34%; }

  .pair, .feature, .saved { grid-template-columns: 1fr; }
  .pair > .tile { min-height: 0; }
  .pair > .tile--card:has(.page-art) { min-height: 380px; }
  .page-art { margin: auto 0; padding-top: 12px; }
  .tile--night { min-height: 440px !important; }
  .feature { min-height: 0; gap: 0; }
  .feature__text { padding-bottom: 0; }
  .feature__shot { width: min(74%, 320px); margin: 36px auto -30%; padding: 0; }
  .saved { align-items: start; }
  .saved .saved__big { font-size: clamp(72px, 22vw, 150px); }
  .saved__text { justify-self: start; }
}

@media (max-width: 420px) {
  .brand span { font-size: 20px; }
  .pill { min-height: 42px; padding: 0 16px; font-size: 15px; }
}
