/* lattercast.com, after the Lattercast Style Guide (the app's ADR 0012 and 0013):
   always dark, the system face, white and one grey, mint only for links and the mark.
   Filenames under /images/ never change in place; give a changed image a new name. */

:root {
  color-scheme: dark;

  /* The app's colors. The app is always dark, so the site is too. */
  --ground: #000000;
  --primary: #ffffff;
  --secondary: rgba(235, 235, 245, 0.6);   /* the app's .secondary, 6.3:1 on black */
  --divider: rgba(255, 255, 255, 0.15);
  --panel: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-edge: rgba(255, 255, 255, 0.24);
  --mint: #86ebd2;                           /* Color.brandMint: links and the mark only */
  --stage: #2a3737;                          /* the hero's ground and the loop's, exactly: see hero-loop/build.py */

  /* Onboarding's wallpaper. */
  --wall-1: #365e54;
  --wall-2: #37443c;
  --wall-3: #222c3a;
  --wall-4: #0a101a;

  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: max(18px, env(safe-area-inset-left, 0px));
  --gutter-r: max(18px, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--primary);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
@media (min-width: 700px) {
  .wrap { padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--ground); padding: 8px 12px; }

/* ---------- Type, built from the app's text roles ---------- */
.t-hero { font-weight: 300; font-size: clamp(40px, 7.4vw, 76px); line-height: 1.02; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.t-section { font-weight: 700; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.t-display { font-weight: 300; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.3; margin: 0; text-wrap: pretty; }
.t-heading { font-weight: 600; font-size: 17px; line-height: 22px; margin: 0; }
.t-subtitle { font-size: 15px; line-height: 20px; color: var(--secondary); margin: 0; }
.t-small-caps { font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--secondary); margin: 0; }
.t-row-title { font-size: 15px; line-height: 20px; margin: 0; }
.t-row-caption { font-size: 12px; line-height: 16px; color: var(--secondary); margin: 0; }
.muted { color: var(--secondary); }

/* ---------- The mark ---------- */
/* Lockup: the app icon about 1.9x the wordmark's cap height, a gap of 0.4x the icon. */
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--primary); }
.lockup:hover { text-decoration: none; }
.lockup .icon { width: 25px; height: 25px; border-radius: 6px; }
.lockup .word { width: 150px; height: auto; }

/* ---------- Navigation ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; min-height: 68px; }
.nav__links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.nav__links a { color: var(--secondary); font-size: 15px; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--primary); text-decoration: none; }
/* On a phone the nav's lockup keeps only the icon, so the links stay on one line. */
@media (max-width: 480px) {
  .nav .lockup .word { display: none; }
  .nav__links { gap: 6px 18px; }
}

/* ---------- Pieces ---------- */
.wallpaper {
  background:
    radial-gradient(circle at 20% 15%, var(--wall-1), transparent 60%),
    radial-gradient(circle at 85% 80%, var(--wall-2), transparent 55%),
    linear-gradient(160deg, var(--wall-3), var(--wall-4));
}
/* A call to action is a glass capsule with a Heading label. Never mint. */
.capsule {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--glass);
  box-shadow: inset 0 0 0 .5px var(--glass-edge), inset 0 1px 0 rgba(255, 255, 255, .12);
  font-weight: 600; font-size: 17px; color: var(--primary);
}
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; gap: 2px; padding-block: 10px; border-top: 1px solid var(--divider); }
.rows li:first-child { border-top: 0; }

/* ---------- Home ---------- */
/* The hero: the copy, then the stage under it; side by side from 780px, the copy first. */
.hero { display: grid; gap: 36px; padding-block: 12px 48px; }
.hero__copy { display: grid; align-content: center; justify-items: start; }
.hero .t-hero { font-size: clamp(40px, 7.4vw, 56px); }
.hero .t-hero span { display: inline-block; }
.hero .t-display { margin-top: 16px; color: var(--secondary); }
.hero__what { margin: 12px 0 0; max-width: 36ch; font-size: 17px; line-height: 24px; color: var(--secondary); }

/* The call to action: until launch, the date where the App Store badge goes, and the price under it. */
.cta { display: grid; justify-items: start; gap: 4px; margin-top: 28px; }
.cta__when { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.cta__price { margin: 0; font-size: 15px; line-height: 20px; color: var(--secondary); }
.cta__badge { display: block; margin-bottom: 6px; }
.cta__badge img { width: 144px; height: 48px; }

/* The masthead: the nav and the hero on one ground, the loop's own color, so the devices stand
   on the page with no card. The teal glow is a layer over the ground and the loop alike, under the
   text, so it tints both the same and no seam shows. Its alpha eases out, as (1 - d)^2.2, before
   the grey text, which keeps that text at 4.5:1 or better from 320px up. */
.masthead { --glow: circle 240px at 4% 30px; position: relative; isolation: isolate; background: var(--stage); }
.masthead::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(var(--glow), rgba(54, 94, 84, .8), rgba(54, 94, 84, .49) 20%, rgba(54, 94, 84, .26) 40%,
                              rgba(54, 94, 84, .107) 60%, rgba(54, 94, 84, .023) 80%, rgba(54, 94, 84, 0));
}
.masthead .nav, .hero__copy { position: relative; z-index: 2; }

/* The stage: the loop, on the ground. Its edges are the ground exactly, and fade out over 6% each
   way, short of the devices, so a browser that moves the video's color a level or two shows no box.
   One mask per axis, on two boxes, so they multiply without mask-composite; the poster is the first frame. */
.stage {
  position: relative; justify-self: center; width: min(100%, 520px); aspect-ratio: 4 / 5;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.stage__fade {
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
}
.stage video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* iOS draws a play button over a video that Low Power Mode keeps from playing; the poster is enough. */
.stage video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

@media (min-width: 780px) {
  .masthead { --glow: circle 40vw at 18% 80px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 56px; align-items: center; padding-block: 24px 56px; }
  .hero .t-hero { font-size: clamp(40px, 4.6vw, 64px); }
  .stage { width: 100%; }
}
@media (min-width: 1400px) {
  .masthead { --glow: circle 560px at 18% 80px; }
}

/* Under the hero, what Lattercast doesn't do, and who makes it. The dots are drawn, so they aren't read aloud. */
.proof { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 28px; padding-block: 28px; border-bottom: 1px solid var(--divider); text-align: center; }
.proof__maker { margin: 0; font-size: 15px; line-height: 20px; color: var(--secondary); }

/* The section after the hero: the listing's opening, centered, over three phones. */
.latest { padding-block: 112px 88px; }
.latest__copy { display: grid; gap: 20px; justify-items: center; text-align: center; }
.latest__copy .t-section { max-width: 24ch; }
.latest__copy .t-display { max-width: 34ch; color: var(--secondary); }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 72px; }
.shot { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 12px; align-content: start; justify-items: center; text-align: center; margin: 0; }
.shot picture { display: block; width: 80%; margin-top: 8px; }
.shot img { width: 100%; }
.shot .t-subtitle { max-width: 30ch; }

.band .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; padding-block: 64px; align-items: center; }
.band .copy { display: grid; gap: 12px; }

.made-head { display: grid; gap: 8px; justify-items: center; text-align: center; padding-block: 72px 28px; }
.made-group { display: block; max-width: 1000px; margin-inline: auto; }
/* CarPlay: Episodes and Now Playing take turns in the bezel, 3 s each, sliding like pages.
   The screen sits 26 px into the 1324 x 772 bezel: 1272 x 720, corners r 38. Still under Reduce Motion. */
.made-carplay { position: relative; max-width: 640px; margin: 48px auto 0; }
.carplay-screen { position: absolute; left: 1.9637%; top: 3.3679%; width: 96.0725%; height: 93.2642%; overflow: hidden; clip-path: inset(0 round 2.9874% / 5.2778%); }
.carplay-strip { position: relative; animation: carplay-swipe 7.2s infinite; }
.carplay-strip picture { display: block; }
.carplay-strip img { width: 100%; }
.carplay-strip picture + picture { position: absolute; top: 0; left: calc(100% + 12px); width: 100%; }
@keyframes carplay-swipe {
  0%, 41.667% { transform: translateX(0); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  50%, 91.667% { transform: translateX(calc(-100% - 12px)); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
  100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) { .carplay-strip { animation: none; } }
.devices3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
/* A card is a body and a footer. Side by side, the cards share their rows through subgrid:
   every footer takes the height of the tallest, its text starts at the footer's top,
   and each image centers in the body above. */
.device { background: var(--panel); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 20px; margin: 0; min-width: 0; }
.device picture { flex: 1; display: flex; align-items: center; justify-content: center; }
.device figcaption { display: grid; gap: 6px; align-content: start; }

.closing { display: grid; grid-template-columns: 1fr; gap: 24px 56px; padding-block: 72px; align-items: start; }
.closing .lead { display: grid; gap: 10px; }
.closing .cta { margin-top: 18px; }

@media (min-width: 780px) {
  .band .wrap { grid-template-columns: 1fr 1.25fr; gap: 56px; }
  .devices3 { grid-template-columns: 1.6fr 1fr 1fr; grid-template-rows: 1fr auto; row-gap: 20px; }
  .device { display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 20px; }
  .closing { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .latest { padding-block: 72px 56px; }
  .shots { grid-template-columns: 1fr; gap: 48px; margin-top: 48px; }
  .shot picture { width: 62%; }
}

/* ---------- Text pages ---------- */
.page { max-width: 720px; padding-block: 32px 80px; }
.page__head { display: grid; gap: 10px; padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--divider); }
.page__head .t-section { font-size: clamp(32px, 5vw, 44px); }
.page__head .lang { justify-self: start; font-size: 15px; }
.prose h2 { font-size: 22px; line-height: 28px; font-weight: 700; margin: 40px 0 10px; }
.prose h3 { font-size: 17px; line-height: 22px; font-weight: 600; margin: 28px 0 6px; }
.prose p, .prose li { color: rgba(255, 255, 255, 0.86); max-width: 68ch; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--primary); font-weight: 600; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; background: rgba(255, 255, 255, 0.08); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 12px 16px; overflow-x: auto; margin: 0 0 14px; }
.prose pre code { background: none; padding: 0; font-size: 13px; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.prose td, .prose th { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--divider); font-size: 15px; }
.prose th { font-weight: 600; color: var(--primary); white-space: nowrap; }
.prose td { color: rgba(255, 255, 255, 0.86); }
.toc { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-block: 16px; border-bottom: 1px solid var(--divider); font-size: 15px; }
.prose .shot-inline { width: min(60%, 260px); margin: 8px 0 18px; }

/* ---------- Press ---------- */
a.capsule:hover { text-decoration: none; background: var(--glass-edge); }
.prose .capsule { margin: 4px 0 24px; }
.prose picture { display: block; margin: 8px 0 18px; }
/* The developer: his photo in a circle on the wallpaper, with his name under it.
   The bottom padding keeps the photo centered above the name at every width. */
.portrait { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 2; width: 100%; margin: 8px 0 18px; padding: 16px 0 62px; border-radius: 16px; overflow: hidden; }
.prose .portrait picture { width: 26%; margin: 0; }
.portrait img { width: 100%; border-radius: 50%; }
.portrait figcaption { position: absolute; left: 24px; bottom: 20px; display: grid; gap: 2px; }

/* ---------- 404 ---------- */
.notfound { display: grid; gap: 14px; justify-items: center; text-align: center; padding-block: 120px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--divider); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; padding-block: 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot nav a { color: var(--secondary); font-size: 13px; }
.foot nav a:hover { color: var(--primary); text-decoration: none; }
.foot .legal { flex-basis: 100%; font-size: 12px; line-height: 16px; color: var(--secondary); margin: 0; }
