/* Oats site. The app's tokens (DESIGN.md §2): zinc neutrals and one honey
   brand colour. The film's stage and wordmark: light grey fluid behind the
   window, EB Garamond for the name and the headings, Inter for everything
   else. One light theme, like the film. */

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --stage: #f3f3f3;
  --wash: #fafafa;
  --ink: #18181b;
  --ink-display: #1a1a1a;
  --ink-soft: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --bullet: #a1a1aa;
  --honey: #f5a30f;
  --honey-top: #f8b52e;
  --honey-label: #1a1306;
  --honey-ink: #9a5b00;
  --serif: "EB Garamond", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --gutter: 24px;
  --window-shadow:
    0 0 0 1px rgb(24 24 27 / 0.08), 0 2px 4px rgb(24 24 27 / 0.04), 0 24px 48px -16px rgb(24 24 27 / 0.18),
    0 56px 96px -40px rgb(24 24 27 / 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video,
canvas {
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: rgb(245 163 15 / 0.28);
}

:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(1120px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Type */

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink-display);
  text-wrap: balance;
}

/* Below 364 px the headline shrinks, so its second line still fits. */
h1 {
  font-size: clamp(36px, min((100vw - 32px) / 7.6, max(44px, 7.4vw)), 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(34px, 4.3vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  text-wrap: pretty;
}

kbd {
  font-family: var(--mono);
  font-size: 14px;
  padding: 1px 6px 2px;
  border-radius: 6px;
  background: #f4f4f5;
  box-shadow:
    inset 0 -1px 0 rgb(24 24 27 / 0.12),
    inset 0 0 0 1px rgb(24 24 27 / 0.08);
  color: var(--ink);
  white-space: nowrap;
}

q {
  quotes: "\201C" "\201D";
}

/* The mark: the app's grain, painted on device pixels. */

.mark {
  display: block;
  image-rendering: pixelated;
}

.mark-small {
  width: 28px;
  height: 28px;
}

.mark-hero {
  width: 128px;
  height: 128px;
}

.mark-download {
  width: 96px;
  height: 96px;
}

.mark-button {
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: none;
  cursor: pointer;
}

.wordmark {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-display);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-display);
  text-decoration: none;
}

/* Buttons. The honey one is the app's main action (.oats-cta). */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font: 600 16px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 150ms var(--ease),
    box-shadow 150ms var(--ease),
    filter 150ms var(--ease),
    background-color 150ms var(--ease);
}

.button-large {
  height: 52px;
  padding: 0 24px;
  font-size: 17px;
}

.button-small {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
}

.button-honey {
  color: var(--honey-label);
  background-image: linear-gradient(180deg, var(--honey-top) 0%, var(--honey) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.45),
    0 1px 2px rgb(154 91 0 / 0.35),
    0 4px 10px -4px rgb(245 163 15 / 0.6);
}

.button-honey:hover {
  filter: brightness(1.04);
}

.button-honey:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    0 1px 1px rgb(154 91 0 / 0.3);
}

.button-quiet {
  color: var(--ink);
  background: rgb(255 255 255 / 0.72);
  box-shadow:
    inset 0 0 0 1px rgb(24 24 27 / 0.1),
    0 1px 2px rgb(24 24 27 / 0.06);
}

.button-quiet:hover {
  background: #fff;
}

.button-quiet:active {
  transform: translateY(1px);
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(243 243 243 / 0.78);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 rgb(24 24 27 / 0.06);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}

.nav-links a:not(.button) {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav-links a:not(.button):hover {
  color: var(--ink);
}

/* The stage: the film's grey fluid, behind the hero and the download. Quiet
   text on it is zinc-600: zinc-500 (--muted) is 4.4:1 on #f3f3f3 and less on
   the fluid's darker greys, under the 4.5:1 that small text needs. */

.stage {
  --muted: #52525b;
  position: relative;
  isolation: isolate;
  background: var(--stage);
}

.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

/* Hero */

.hero {
  padding-top: clamp(56px, 9vw, 104px);
  background: linear-gradient(180deg, var(--stage) 0, var(--stage) calc(100% - 260px), var(--paper) calc(100% - 260px));
}

.hero .field {
  height: calc(100% - 260px);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Two lines: "The conversation," over "mapped as it happens". */
.hero h1 {
  max-width: 16ch;
  margin-top: 24px;
}

.lead {
  max-width: 38em;
  margin: 28px auto 0;
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Why it matters, under the lead and quieter than it. Each sentence wraps
   as one piece, so a break falls between them, and within one only when it
   must. */
.why {
  max-width: 36em;
  margin: 14px auto 0;
  line-height: 1.55;
  color: var(--muted);
}

.why span {
  display: inline-block;
  text-wrap: balance;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.other-arch {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* A link alone on its line is a target: 24 px tall at least. */
.other-arch a,
.footer-links a {
  display: inline-block;
  padding-block: 4px;
}

.other-arch a,
.privacy-copy a,
.numbers a,
.footer-note a {
  color: var(--honey-ink);
  text-decoration: underline;
  text-decoration-color: rgb(154 91 0 / 0.35);
  text-underline-offset: 3px;
}

.other-arch a:hover,
.privacy-copy a:hover,
.numbers a:hover,
.footer-note a:hover {
  text-decoration-color: currentColor;
}

.other-arch .note {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.not-mac {
  display: none;
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}

[data-platform="other"] .not-mac {
  display: block;
}

[data-platform="other"] .other-arch {
  display: none;
}

.window {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--window-shadow);
}

.window img,
.window video {
  display: block;
  width: 100%;
  height: auto;
}

/* Pause or play a loop (site.js adds it). 44 px to press, a 32 px disc to see. */
.loop-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.loop-toggle::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  box-shadow:
    0 0 0 1px rgb(24 24 27 / 0.14),
    0 1px 3px rgb(24 24 27 / 0.14);
  transition: background-color 150ms var(--ease);
}

.loop-toggle:hover::before {
  background: #fff;
}

/* The ring around the disc, not around the larger target. */
.loop-toggle:focus-visible {
  outline-offset: -4px;
}

.loop-toggle svg {
  position: relative;
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.loop-toggle .icon-play,
.loop-toggle[data-paused] .icon-pause {
  display: none;
}

.loop-toggle[data-paused] .icon-play {
  display: block;
}

.hero-window {
  width: calc(100% - 2 * var(--gutter));
  max-width: 1120px;
  margin: clamp(48px, 7vw, 80px) auto 0;
}

/* Features */

.feature {
  padding-block: clamp(88px, 11vw, 152px) 0;
}

.feature:last-of-type {
  padding-bottom: clamp(88px, 11vw, 152px);
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 5.5vw, 80px);
}

.feature-flip .feature-row {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.feature-flip .feature-copy {
  order: 2;
}

.feature-copy > p {
  max-width: 34em;
  margin: 22px 0 0;
  color: var(--ink-soft);
}

.feature-copy > p.aside {
  font-size: 15px;
  color: var(--muted);
}

.feature-visual {
  min-width: 0;
}

/* A full-window story (recording, the board): the words above, the window
   across the whole column below. */
.feature-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 20px clamp(32px, 5.5vw, 80px);
}

.feature-head .feature-copy > p:first-child {
  margin-top: 6px;
}

.feature-wide {
  margin-top: clamp(36px, 5vw, 56px);
}

/* One card of the window (the topic lanes), at the size the app draws it. */
.feature-card {
  max-width: 956px;
}

.points {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--ink-soft);
}

.points li,
.privacy-lines li {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.points li::before,
.privacy-lines li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--bullet);
  transform: translateY(-2px);
}

.verdicts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 28px 0 0;
}

.verdicts dt {
  margin: 0;
}

.verdicts dd {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* The app's question marks (questionMarks.ts): one circle, filled when settled. */
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.dot-answered {
  background: #16a34a;
}

.dot-unknown {
  background: #c2410c;
}

.dot-ring {
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

/* Privacy */

.privacy {
  margin-top: clamp(88px, 11vw, 152px);
  padding-block: clamp(72px, 9vw, 120px);
  background: var(--wash);
  box-shadow:
    inset 0 1px 0 var(--line),
    inset 0 -1px 0 var(--line);
}

.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px clamp(32px, 5.5vw, 80px);
  align-items: start;
}

/* The words take the right column; the counter sits under the heading. */
.privacy-copy {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.privacy-copy p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

/* What leaves the Mac, in three lines, above the details. */
.privacy-lines {
  display: grid;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  color: var(--ink);
}

.counter {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  margin: 8px 0 0;
  max-width: 232px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgb(24 24 27 / 0.08), 0 8px 24px -12px rgb(24 24 27 / 0.2);
}

.counter img {
  display: block;
  width: 100%;
  height: auto;
}

/* Numbers */

.numbers {
  padding-block: clamp(72px, 9vw, 112px);
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.numbers-grid > div {
  padding-top: 20px;
  box-shadow: inset 0 1px 0 var(--line);
}

.numbers p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.numbers .number {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-display);
  font-variant-numeric: tabular-nums;
}

.number span {
  font-size: 0.45em;
  letter-spacing: 0;
  color: var(--muted);
}

/* Film */

.film-section {
  padding-block: clamp(32px, 4vw, 48px) clamp(88px, 11vw, 152px);
  text-align: center;
}

.film-section h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.film {
  position: relative;
  max-width: 1120px;
  margin: clamp(32px, 4vw, 48px) auto 0;
  background: var(--stage);
}

.film-play {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--honey-label);
  background-image: linear-gradient(180deg, var(--honey-top) 0%, var(--honey) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.45),
    0 2px 4px rgb(154 91 0 / 0.3),
    0 12px 28px -8px rgb(245 163 15 / 0.65);
  cursor: pointer;
  transition: transform 150ms var(--ease);
}

.film-play:hover {
  transform: scale(1.04);
}

.film-play svg {
  width: 30px;
  height: 30px;
  margin-left: 4px;
  fill: currentColor;
}

.film.is-playing .film-play {
  display: none;
}

/* Download */

.download {
  padding-block: clamp(88px, 11vw, 136px);
}

.download-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.download h2 {
  margin-top: 20px;
}

.first-run {
  width: 100%;
  max-width: 560px;
  margin: 44px auto 0;
  padding: 24px 28px;
  border-radius: 12px;
  background: rgb(255 255 255 / 0.86);
  box-shadow: 0 0 0 1px rgb(24 24 27 / 0.08), 0 8px 24px -16px rgb(24 24 27 / 0.2);
  text-align: left;
}

.first-run h3 {
  font-size: 24px;
}

.first-run p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.first-run ol {
  margin: 14px 0 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.first-run li + li {
  margin-top: 6px;
}

/* What comes after the steps: setup's one choice. */
.first-run .first-run-next {
  margin-top: 14px;
  color: var(--ink-soft);
}

.consent {
  max-width: 34em;
  margin: 24px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Footer */

.footer {
  padding-block: 40px;
  box-shadow: inset 0 1px 0 var(--line);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.footer .wordmark {
  font-size: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-note {
  margin: 0 0 0 auto;
  font-size: 14px;
  color: var(--muted);
}

/* Narrow screens */

@media (max-width: 900px) {
  .feature-row,
  .feature-flip .feature-row,
  .feature-head,
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-flip .feature-copy {
    order: 0;
  }

  .counter,
  .privacy-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .numbers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav-links a:not(.button):not([href^="https://github.com/alexgaoth/oats"]) {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .hero {
    background: linear-gradient(180deg, var(--stage) 0, var(--stage) calc(100% - 120px), var(--paper) calc(100% - 120px));
  }

  .hero .field {
    height: calc(100% - 120px);
  }

  .mark-hero {
    width: 96px;
    height: 96px;
  }

  /* On a phone the lead runs to four lines: the hero reads from the left. */
  .hero-copy {
    align-items: flex-start;
    text-align: left;
  }

  .hero .lead,
  .hero .why {
    margin-inline: 0;
  }

  .hero .facts {
    justify-content: flex-start;
  }

  /* The grain sits inside its square: pulled left so it lines up with the words. */
  .hero .mark-button {
    margin-left: -20px;
  }

  .cta-row .button {
    width: 100%;
  }

  .verdicts {
    grid-template-columns: minmax(0, 1fr);
  }

  .first-run {
    padding: 20px;
  }

  .footer-note {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .button:active,
  .film-play,
  .film-play:hover {
    transition: none;
    transform: none;
  }
}

/* The page for an address that does not exist (404.html). */

.lost {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
