@font-face {
  font-family: "Imbue";
  src: url("fonts/imbue.woff2") format("woff2");
  font-weight: 300 500;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 400 650;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #16121d;
  --deep: #2a2238;
  --dusk: #6b4a7a;
  --coral: #f2a07b;
  --peach: #ffd9a8;
  --cream: #f6efe6;
  --cream-2: #d8cfc8;
  --line: rgba(246, 239, 230, 0.14);
  --fog-ink: #251d31;
  --fog-ink-2: #3c3346;
  --display: "Imbue", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  --step-2: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-3: clamp(2.3rem, 1.5rem + 3.6vw, 4.2rem);
  --step-4: clamp(2.6rem, 1.4rem + 5.4vw, 5.4rem);
  --step-hero: clamp(3.4rem, 1rem + 11.5vw, 9.6rem);
  --step-time: clamp(4.4rem, 1.6rem + 13vw, 12rem);

  --gutter: clamp(16px, 5vw, 64px);
  --measure: 34rem;
  --radius-shot: 34px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--cream);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: from-font; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--peach);
  outline-offset: 4px;
  border-radius: 6px;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 50;
  background: var(--cream); color: var(--fog-ink);
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  color: var(--fog-ink);
}
.bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(22, 18, 29, 0.84);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.bar.live { position: fixed; transition: transform 0.32s var(--ease-out), color 0.3s var(--ease-out); }
.bar.live.away { transform: translateY(-100%); transition-duration: 0.24s; }
.bar.dark { color: var(--cream); }
.bar.dark::before { opacity: 1; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--display); font-size: 1.6rem; line-height: 1;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.bar nav { display: flex; gap: clamp(6px, 2.4vw, 20px); font-size: 0.95rem; font-weight: 500; }
.bar nav a, .foot nav a { position: relative; text-decoration: none; padding: 10px 4px; }
.bar nav a { white-space: nowrap; }
@media (max-width: 379px) { .bar nav .wide-only { display: none; } }
.bar nav a::after, .foot nav a::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 6px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.22s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .bar nav a:hover::after, .foot nav a:hover::after { transform: scaleX(1); transform-origin: left; }
}
.bar nav a:focus-visible::after, .foot nav a:focus-visible::after { transform: scaleX(1); }

/* Hours: each is a place photo held on a sticky stage; the next hour fades in over the last one */
.hour {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: 0 var(--gutter);
  overflow-x: clip;
}
.hour + .hour { margin-top: -28svh; }
.hour-bg { position: absolute; inset: 0; z-index: -1; overflow: clip; }
.hour + .hour .hour-bg {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28svh);
  mask-image: linear-gradient(to bottom, transparent 0, #000 28svh);
}
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.drift { position: absolute; inset: 0; }
.place { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hour:not(.dawn) .stage::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(22, 18, 29, 0.56), rgba(22, 18, 29, 0.36) 55%, rgba(22, 18, 29, 0.46));
}

/* From 600px each hour switches to a landscape crop of its full-size original */
@media (min-width: 600px) {
  .hour:not(.dawn) .stage::after { background: rgba(22, 18, 29, 0.36); }
  .noon .place { object-position: 50% 45%; }
  .night .place { object-position: 50% 60%; }
}
.hour.noon .stage::after, .hour.dusk .stage::after { background: linear-gradient(rgba(22, 18, 29, 0.68), rgba(22, 18, 29, 0.42) 50%, rgba(22, 18, 29, 0.46)); }

/* Dawn hero: the fog is pale, so the ink is dark here and turns light as the day goes on */
.dawn { color: var(--fog-ink); display: grid; align-content: end; padding-bottom: calc(28svh + 32px); }
.dawn .stage { background-color: #c9ccd2; }
.dawn .place { object-position: 50% 30%; }
.dawn-inner { max-width: 62rem; padding-top: 120px; }
.dawn h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-hero);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin: 0 0 0.32em;
  max-width: 11ch;
  text-wrap: balance;
}
.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: var(--measure);
  margin: 0 0 28px;
  color: var(--fog-ink-2);
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  border-radius: 999px;
  background: var(--fog-ink); color: var(--cream);
  font-weight: 600; text-decoration: none;
  transition: transform 0.16s var(--ease-out), background-color 0.2s var(--ease-out);
}
.pill:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { background: var(--deep); }
}
.quiet-link { font-weight: 600; color: var(--fog-ink); padding: 12px 0; }

/* Chapters */
.chapter {
  display: grid;
  align-content: center;
  gap: clamp(36px, 5vw, 72px);
  padding-top: 34svh;
  padding-bottom: 38svh;
}
.chapter .copy { max-width: var(--measure); position: relative; }
.chapter .copy::before {
  content: ""; position: absolute; z-index: -1;
  inset: -22% -30% -22% -24%;
  background: radial-gradient(closest-side, rgba(22, 18, 29, 0.68), rgba(22, 18, 29, 0.56) 55%, rgba(22, 18, 29, 0.24) 82%, transparent);
  pointer-events: none;
}
.time {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-time);
  line-height: 0.9;
  color: var(--peach);
  font-variant-numeric: lining-nums;
  margin-bottom: 0.08em;
  text-shadow: 0 2px 28px rgba(15, 10, 20, 0.5);
}
.chapter h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1;
  margin: 0 0 0.45em;
  text-wrap: balance;
  text-shadow: 0 1px 20px rgba(15, 10, 20, 0.55);
}
.chapter p { margin: 0 0 1em; color: var(--cream-2); text-shadow: 0 1px 14px rgba(15, 10, 20, 0.6); text-wrap: pretty; }
.chapter p:last-child { margin-bottom: 0; }
.chapter .copy a { color: var(--cream); font-weight: 600; }

/* Rolling clock digits (built by motion.js) */
.roll {
  display: inline-block; height: 0.9em; overflow: clip; vertical-align: top;
  -webkit-mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent);
}
.roll > span { display: block; }
.roll > span > span { display: block; height: 0.9em; line-height: 0.9em; text-align: center; }

/* Listening nods, as in the composer */
.nod {
  margin: 1.4em 0 1.6em;
  padding: 18px 20px 16px;
  border-radius: 22px;
  background: rgba(22, 18, 29, 0.58);
  border: 1px solid var(--line);
}
.nod-line { margin: 0; color: var(--cream); font-size: 1.0625rem; line-height: 1.5; text-shadow: none; min-height: 3em; }
.nod-line .caret {
  display: none;
  width: 2px; height: 1.15em; margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--peach);
}
.nod.playing .caret { display: inline-block; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.nod-row { display: flex; align-items: center; margin-top: 12px; min-height: 30px; }
.nod-pill {
  display: inline-flex; align-items: center;
  min-height: 30px; padding: 0 12px;
  border-radius: 999px;
  background: rgba(246, 239, 230, 0.16);
  border: 1px solid rgba(246, 239, 230, 0.12);
  font-size: 0.9375rem; line-height: 1;
  color: var(--cream);
}
.nod-replay {
  font: inherit; font-size: var(--step--1); font-weight: 600;
  color: var(--cream-2);
  background: none; border: 0; padding: 0; margin-left: 0.4em;
  text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color 0.2s var(--ease-out), transform 0.16s var(--ease-out);
}
.nod-replay:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .nod-replay:hover { color: var(--cream); } }
.nod figcaption { margin-top: 10px; font-size: var(--step--1); line-height: 1.5; color: var(--cream-2); }

.shot {
  margin: 0;
  width: min(300px, 74vw);
  border-radius: var(--radius-shot);
  overflow: hidden;
  box-shadow: 0 30px 80px -24px rgba(8, 5, 14, 0.75), 0 0 0 1px rgba(246, 239, 230, 0.12);
  background: var(--deep);
}
.shot img { width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; }
.shots { display: flex; gap: clamp(12px, 3vw, 28px); align-items: flex-start; }
.shots .shot { width: min(240px, 42vw); border-radius: 26px; }
.shots .shot:nth-child(2) { margin-top: clamp(40px, 8vw, 96px); }

@media (min-width: 900px) {
  .chapter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .chapter.flip .copy { order: 2; }
  .chapter .media { justify-self: center; }
  .shot { width: min(320px, 26vw); }
}

/* Also in Sove */
.hour.night .hour-bg {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28svh, #000 calc(100% - 48svh), transparent);
  mask-image: linear-gradient(to bottom, transparent 0, #000 28svh, #000 calc(100% - 48svh), transparent);
}
.also {
  position: relative;
  margin-top: -22svh;
  padding: clamp(80px, 14vw, 160px) var(--gutter) clamp(48px, 8vw, 88px);
}
.also h2 {
  font-family: var(--display); font-weight: 400;
  font-size: var(--step-3); line-height: 1;
  margin: 0 0 clamp(24px, 4vw, 48px);
  max-width: 16ch;
  text-wrap: balance;
}
.ruled {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; column-gap: clamp(32px, 6vw, 96px);
  max-width: 72rem;
}
.ruled li {
  display: grid; grid-template-columns: minmax(7.5rem, 10rem) 1fr; gap: 4px 20px;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}
.ruled b { font-weight: 600; color: var(--cream); }
.ruled span { color: var(--cream-2); text-wrap: pretty; }
@media (max-width: 479px) { .ruled li { grid-template-columns: 1fr; } }
@media (min-width: 900px) { .ruled { grid-template-columns: 1fr 1fr; } }

/* Closing: the lamp comes on, as it does in the app when a moment is kept */
.get {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(96px, 16vw, 200px) var(--gutter) clamp(80px, 12vw, 140px);
  text-align: center;
}
.lamp {
  position: absolute; z-index: -1;
  inset: 0; margin: auto;
  width: min(900px, 160vw); height: min(900px, 160vw);
  pointer-events: none;
}
.lamp::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(closest-side, rgba(255, 217, 168, 0.34), rgba(242, 160, 123, 0.16) 45%, rgba(107, 74, 122, 0.08) 70%, transparent);
}
.get.lit .lamp::before { animation: breathe 9s ease-in-out infinite alternate; will-change: transform, opacity; }
.get.lit.paused .lamp::before { animation-play-state: paused; will-change: auto; }
@keyframes breathe {
  from { transform: scale(0.97); opacity: 0.86; }
  to { transform: scale(1.03); opacity: 1; }
}
.get .icon { display: block; width: 112px; height: 112px; margin: 0 auto 28px; }
.get .icon img { width: 112px; height: 112px; border-radius: 25px; box-shadow: 0 18px 40px -14px rgba(8, 5, 14, 0.7); }
.get h2 {
  font-family: var(--display); font-weight: 400;
  font-size: var(--step-4); line-height: 0.95;
  margin: 0 auto 0.4em; max-width: 14ch; text-wrap: balance;
}
.get p { margin: 0 auto 0.6em; max-width: 30rem; color: var(--cream-2); text-wrap: balance; }
.get .store { margin-top: 26px; font-weight: 600; color: var(--peach); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 28px;
  padding: 24px var(--gutter) 36px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem; color: var(--cream-2);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0 18px; margin-left: -4px; }

/* Text pages (privacy, terms, support): each opens on one hour of the day and fades into the page */
.bar.on-scene { color: var(--cream); text-shadow: 0 1px 12px rgba(15, 10, 20, 0.55); }
.bar nav a[aria-current="page"]::after { transform: scaleX(1); }
.page-head {
  position: relative; isolation: isolate;
  min-height: min(66svh, 680px);
  display: grid; align-content: end;
  padding: 132px var(--gutter) clamp(28px, 5vw, 48px);
}
.page-head .hour-bg {
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}
.page-head .hour-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(22, 18, 29, 0.76), rgba(22, 18, 29, 0.2) 150px, rgba(22, 18, 29, 0.14) 34%, rgba(22, 18, 29, 0.34));
}
.page-head.night .place { object-position: 50% 58%; }
.page-head.dusk .place { object-position: 50% 62%; }
.page-head.day .place { object-position: 50% 52%; }
.page-time {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); line-height: 1;
  color: var(--peach);
  font-variant-numeric: lining-nums;
  margin-top: 0; margin-bottom: 0.2em;
  text-shadow: 0 2px 24px rgba(15, 10, 20, 0.5);
}
.page-head h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3rem, 1.6rem + 6vw, 7rem); line-height: 0.92;
  margin-top: 0; margin-bottom: 0.3em;
  text-wrap: balance;
  text-shadow: 0 1px 20px rgba(15, 10, 20, 0.55);
}
.updated { color: var(--cream-2); font-size: 0.95rem; margin-top: 0; margin-bottom: 0; text-shadow: 0 1px 14px rgba(15, 10, 20, 0.6); }
.page-head > :not(.hour-bg), .prose > * { max-width: 38rem; margin-left: auto; margin-right: auto; }
.page-head > :not(.hour-bg) { width: 100%; }
@media (min-width: 1100px) { .page-head > :not(.hour-bg), .prose > * { margin-left: calc(50% - 26rem); } }
.prose { padding: clamp(24px, 5vw, 48px) var(--gutter) clamp(64px, 10vw, 120px); }
.prose h2 {
  font-family: var(--display); font-weight: 400;
  font-size: var(--step-2); line-height: 1.05;
  margin-top: 2.2em; margin-bottom: 0.5em;
  color: var(--peach);
  scroll-margin-top: 88px;
}
.prose h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.8em; margin-bottom: 0.4em; }
.prose p, .prose li { color: var(--cream-2); text-wrap: pretty; }
.prose strong { color: var(--cream); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--coral); }
.prose a { color: var(--cream); overflow-wrap: anywhere; }
.prose code { font-size: 0.92em; }
.prose .note {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(42, 34, 56, 0.7);
  padding: 18px 22px;
}
.prose .note p:last-child { margin-bottom: 0; }
.prose .pill { background: var(--cream); color: var(--fog-ink); margin: 4px 0; }
@media (hover: hover) and (pointer: fine) { .prose .pill:hover { background: var(--peach); } }

@media (prefers-reduced-motion: no-preference) {
  html:not(.static) .page-head .place { animation: settle 1.8s var(--ease-out) both; }
  html:not(.static) .page-head > :not(.hour-bg) { animation: rise 0.7s var(--ease-out) both; }
  html:not(.static) .page-head > h1 { animation-delay: 0.07s; }
  html:not(.static) .page-head > .updated { animation-delay: 0.14s; }
  @supports (animation-timeline: scroll()) {
    html:not(.static) .page-head .drift { animation: sink linear both; animation-timeline: scroll(root); animation-range: 0px 680px; }
  }
}
@keyframes settle { from { transform: scale(1.06); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes sink { to { transform: translateY(14%); } }

/* Split words for the hero intro; the h1 keeps its whole text for assistive tech */
.w { display: inline-block; }
.intro .dawn h1, .intro .dawn .lede, .intro .dawn .actions { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .pill, .nod-replay, .bar, .bar::before, .bar nav a::after, .foot nav a::after { transition: none; }
}
