/* Like Today: wall-label type, hairlines, 3px corners, light only. */

/* Allo (SIL Open Font License, fonts/OFL.txt). One variable file: weight 100–900 and optical size
   9–32, which the browser sets from the font size, so the hero gets Allo's display cut and the
   13–15px labels get the text cut the app bundles. Figures are proportional by default. */
@font-face {
  font-family: 'Allo';
  src: url('fonts/AlloVariableFriendly.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #0e1318;
  --slate: #5b6670;
  --frost: #eef2f5;
  --rule: rgba(14, 19, 24, 0.12);
  --rule-width: 1px;
  --calm: cubic-bezier(0.45, 0, 0.1, 1);
  --margin: clamp(16px, 4.5vw, 64px);
  --max: 1440px;
  --font: 'Allo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}
@media (min-resolution: 2dppx) {
  :root { --rule: rgba(14, 19, 24, 0.22); --rule-width: 0.5px; }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
.rule { border: 0; border-top: var(--rule-width) solid var(--rule); }
.slate { color: var(--slate); }

/* Header and footer */

.site-header .wrap, .site-footer .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header .wrap { height: 88px; }
.wordmark { font-size: 15px; font-weight: 500; text-decoration: none; }
.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.site-footer { border-top: var(--rule-width) solid var(--rule); margin-top: 120px; }
.site-footer .wrap { min-height: 88px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.site-footer nav a { color: var(--slate); font-size: 13px; }

/* Buttons */

.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; border-radius: 3px;
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--calm);
}
.button:hover { background: #2a3138; }
.button:active { background: rgba(14, 19, 24, 0.78); }
.cta-note { color: var(--slate); font-size: 13px; }

.quiet-toggle {
  min-width: 44px; min-height: 44px; padding: 0 4px;
  border: 0; background: none; cursor: pointer;
  color: var(--slate); font-size: 13px;
}
.quiet-toggle:hover { color: var(--ink); }
.quiet-toggle[hidden] { display: none; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  grid-template-areas: 'title stage' 'copy stage';
  grid-template-rows: auto 1fr;
  column-gap: 48px;
  padding-top: 56px; padding-bottom: 96px;
}
.hero h1 {
  grid-area: title; align-self: end;
  font-size: clamp(40px, 6vw, 86px); font-weight: 480;
  line-height: 1.02; letter-spacing: -0.022em;
  max-width: 9em;
  padding-top: 72px;
}
.hero .copy { grid-area: copy; padding-top: 40px; }
.lede { max-width: 32ch; color: var(--slate); font-size: 18px; line-height: 1.5; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 500; }
.hero .cta { margin-top: 32px; }

.stage { grid-area: stage; display: flex; flex-direction: column; align-items: flex-end; }

.roundel { position: relative; width: 100%; max-width: 640px; aspect-ratio: 1; }
.roundel > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.roundel .glyph-fill, .roundel .glyph-outline { transition: opacity 0.9s var(--calm); }
.roundel .glyph-fallback { object-fit: contain; transition: opacity 0.6s var(--calm); }
.roundel.is-drawn .glyph-fallback { opacity: 0; }
.roundel:not(.is-drawn) .glyph-fill, .roundel:not(.is-drawn) .glyph-outline { opacity: 0; }
.roundel .glyph-empty { opacity: 0; transition: opacity 0.9s var(--calm); }
.roundel.is-empty .glyph-fill, .roundel.is-empty .glyph-outline, .roundel.is-empty .glyph-fallback { opacity: 0; }
.roundel.is-empty .glyph-empty { opacity: 1; }

.caption {
  min-height: 72px; margin-top: 4px; text-align: right;
  transition: opacity 0.28s var(--calm);
}
.caption.is-changing { opacity: 0; }
.caption .who { font-size: 13px; font-weight: 500; }
.caption .when { font-size: 13px; color: var(--slate); margin-top: 2px; }
.caption .sentence { font-size: 15px; margin-top: 8px; }

.picker { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; margin-right: -10px; }
.people { display: flex; padding: 0; list-style: none; }
.people button {
  position: relative; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer; border-radius: 50%;
}
.people .mark { position: absolute; inset: 12px; border-radius: 50%; filter: blur(1.2px); }
.people .yours .mark { filter: none; inset: 13px; border: var(--rule-width) solid rgba(14, 19, 24, 0.22); }
.people button::after {
  content: ''; position: absolute; inset: 6px; border-radius: 50%;
  border: 1px solid var(--ink); opacity: 0; transition: opacity 0.4s var(--calm);
}
.people button[aria-pressed='true']::after { opacity: 1; }
.people button:hover:not([aria-pressed='true'])::after { opacity: 0.2; }
.people button:focus-visible { outline-offset: 0; border-radius: 50%; }

/* Section heads */

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  padding-top: 64px;
}
h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 400; line-height: 1.18; letter-spacing: -0.01em; text-wrap: balance; }
.section-head p { color: var(--slate); font-size: 13px; }

/* Gallery */

.gallery {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 24px;
  padding: 48px 0 0; list-style: none;
}
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer;
}
.gallery .glyph { display: block; position: relative; width: 100%; aspect-ratio: 1; }
.gallery .glyph > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.gallery .label, .gallery .label > span { display: block; }
.gallery .label { margin-top: 16px; padding-top: 12px; border-top: var(--rule-width) solid var(--rule); transition: border-color 0.4s var(--calm); }
.gallery button[aria-pressed='true'] .label { border-top-color: var(--ink); }
.gallery button:hover .label { border-top-color: rgba(14, 19, 24, 0.4); }
.gallery .name { font-size: 13px; font-weight: 500; }
.gallery .date { font-size: 13px; color: var(--slate); margin-top: 2px; }
.gallery .sentence { font-size: 13px; margin-top: 8px; }

/* How it works */

.how {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: 'head phone' 'steps phone';
  grid-template-rows: auto 1fr;
  column-gap: 64px; align-items: start;
  padding-top: 160px;
}
.how h2 { grid-area: head; font-size: clamp(26px, 2.8vw, 40px); padding-top: 96px; }
.how h2 span { display: block; }
.steps { grid-area: steps; max-width: 520px; margin-top: 40px; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 32px 1fr; padding: 20px 0 22px;
  border-top: var(--rule-width) solid var(--rule);
  counter-increment: step;
}
.steps li:last-child { border-bottom: var(--rule-width) solid var(--rule); }
.steps li::before { content: counter(step); font-size: 13px; color: var(--slate); padding-top: 2px; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 17px; font-weight: 500; line-height: 1.3; }
.steps p { color: var(--slate); font-size: 15px; margin-top: 6px; max-width: 46ch; text-wrap: pretty; }

.phone { grid-area: phone; justify-self: center; width: 100%; max-width: 440px; }
.phone video { width: 100%; height: auto; aspect-ratio: 1120 / 1432; background: #fff; }
.phone .quiet-toggle { display: block; margin: 4px auto 0; }

/* Closing */

.closing { padding-top: 160px; }
.closing h2 { font-size: clamp(26px, 2.8vw, 40px); }
.closing .cta { margin-top: 28px; }

/* Phone and narrow tablet */

@media (max-width: 860px) {
  .site-header .wrap { height: 64px; }
  .hero {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: 'title' 'stage' 'copy'; grid-template-rows: auto;
    padding-top: 16px; padding-bottom: 72px;
  }
  .hero h1 { padding-top: 0; font-size: clamp(36px, 10.5vw, 56px); }
  .stage { width: 100%; min-width: 0; margin-top: 16px; }
  .roundel { max-width: 520px; align-self: center; }
  .hero .copy { padding-top: 32px; }
  .lede { font-size: 17px; }
  .hero .cta { margin-top: 28px; }

  .section-head { flex-direction: column; padding-top: 48px; }
  .gallery {
    display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--margin)); padding: 32px var(--margin) 4px; scroll-padding-inline: var(--margin);
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery li { flex: 0 0 148px; scroll-snap-align: start; }

  .how {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'phone' 'steps'; grid-template-rows: auto;
    padding-top: 96px;
  }
  .how h2 { padding-top: 0; }
  .how h2 span { display: inline; }
  .phone { margin-top: 32px; max-width: 360px; }
  .steps { margin-top: 32px; max-width: none; }

  .closing { padding-top: 96px; }
  .site-footer { margin-top: 96px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Privacy */

.prose { max-width: 620px; padding-top: 56px; }
.prose h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 480; letter-spacing: -0.018em; line-height: 1.06; }
.prose .updated { color: var(--slate); font-size: 13px; margin-top: 12px; }
.prose section { margin-top: 40px; padding-top: 20px; border-top: var(--rule-width) solid var(--rule); }
.prose h2 { font-size: 17px; font-weight: 500; letter-spacing: 0; }
.prose p, .prose li { color: var(--slate); margin-top: 8px; text-wrap: pretty; }
.prose ul { padding-left: 18px; }
.prose a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
