/* Goodhour launch site. Palette from docs/DESIGN.md, via docs/site/BRIEF.md. */
:root {
  --surface: #f6f2ec;
  --surface-raised: #fffcf7;
  --surface-sunken: #ede7dd;
  --border: #ddd4c6;
  --border-strong: #b9ad9b;
  --text: #1f1b16;
  --text-muted: #5f574c;
  --accent: #c2410c;
  --accent-text: #ffffff;
  --accent-strong: #a6370a;
  --accent-soft: #fbe3d4;
  --focus-ring: #1f5fd1;
  --working: #1f7a63;
  --working-text: #ffffff;
  --off: #e9e2d6;
  --off-text: #3d362d;
  --night: #141a2b;
  --night-text: #e6e9f2;
  --shadow-md:
    0 1px 2px rgb(60 40 20 / 0.08), 0 8px 24px -8px rgb(60 40 20 / 0.18);
  --shadow-lg:
    0 2px 4px rgb(60 40 20 / 0.08), 0 24px 60px -20px rgb(60 40 20 / 0.3);

  --radius: 20px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:
    system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans",
    Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --rhythm: clamp(5rem, 10vw, 9rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header: 64px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #14130f;
    --surface-raised: #1e1c17;
    --surface-sunken: #0f0e0b;
    --border: #322e27;
    --border-strong: #574f44;
    --text: #eeeae3;
    --text-muted: #aaa298;
    --accent: #ff9a5c;
    --accent-text: #1d0f05;
    --accent-strong: #ffa76f;
    --accent-soft: #3a2316;
    --focus-ring: #8ab4ff;
    --working: #86e6c8;
    --working-text: #0c1a15;
    --off: #6b645a;
    --off-text: #f6f2ec;
    --night: #0b0d14;
    --night-text: #c9cfdc;
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -8px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.5), 0 24px 60px -20px rgb(0 0 0 / 0.8);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: var(--header);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 1.0625rem/1.6 var(--sans);
  overflow-x: clip;
}
h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
}
ol,
ul {
  padding: 0;
  list-style: none;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.6rem, 1.6rem + 5vw, 5.25rem);
  font-variation-settings: "opsz" 144;
}
h1 em {
  font-style: italic;
}
h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  margin-bottom: 1.25rem;
}
h3 {
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.wrap {
  max-width: calc(72rem + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}
.narrow {
  max-width: calc(44rem + 2 * var(--pad));
}
main > section {
  padding-block: var(--rhythm);
}
.band-surface {
  background: var(--surface);
}
.band-sunken {
  background: var(--surface-sunken);
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  margin-bottom: 1rem;
}
.intro {
  max-width: 40rem;
  color: var(--text-muted);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.readout,
.chip,
.ticks,
.card-title,
.num,
.m-big,
.their {
  font-variant-numeric: tabular-nums;
}

/* ---------- Interactive states ---------- */
a {
  color: var(--accent-strong);
}
a,
.btn {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.btn,
.nav-link,
.text-link,
.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    scale 120ms ease;
}
.btn:active,
.nav-link:active,
.text-link:active,
.logo:active {
  scale: 0.97;
}
.btn {
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  white-space: nowrap;
}
.btn-lg {
  min-height: 52px;
  padding: 0 1.5rem;
}
.btn-primary,
.btn-night {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover,
.btn-night:hover {
  background: var(--accent-strong);
}
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-raised);
  border-color: var(--text-muted);
}
.arrow {
  display: inline-block;
  transition: translate 200ms var(--ease);
}
.btn:hover .arrow {
  translate: 3px 0;
}
.nav-link {
  padding: 0 0.75rem;
  color: var(--text);
  border-radius: 999px;
}
.nav-link:hover {
  background: var(--surface-sunken);
}
.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}
.text-link:hover {
  text-decoration-color: currentColor;
}

/* ---------- Logo ---------- */
.logo {
  gap: 8px;
  color: var(--text);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.mark {
  flex: none;
}
.m-night {
  fill: var(--night);
  stroke: var(--border-strong);
  stroke-width: 1;
}
.m-accent {
  fill: var(--accent);
}
.m-working {
  fill: var(--working);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav .btn {
  margin-left: 0.5rem;
}
.short {
  display: none;
}
@media (max-width: 639px) {
  .nav-link,
  .long {
    display: none;
  }
  .short {
    display: inline;
  }
  .nav .btn {
    padding: 0 1rem;
  }
}

/* ---------- Bands (the signature visual) ---------- */
.bands {
  --label-w: 9rem;
  --col-gap: 1rem;
  --row-gap: 0.75rem;
  --ticks-h: 1rem;
  --gap: 4px;
  position: relative;
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  column-gap: var(--col-gap);
  row-gap: var(--row-gap);
  align-items: center;
}
.band,
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: var(--gap);
  height: 2.25rem;
}
.cell {
  position: relative;
  border-radius: 3px;
  background: var(--off);
  color: var(--off-text);
}
.cell.w {
  background: var(--working);
  color: var(--working-text);
}
.cell.n {
  background: var(--night);
  color: var(--night-text);
}
@media (prefers-color-scheme: dark) {
  .cell.n,
  .m-swatches .n {
    box-shadow: inset 0 0 0 1px var(--border-strong);
  }
}
.ticks {
  position: relative;
  height: var(--ticks-h);
  font: 0.75rem/1 var(--mono);
  color: var(--text-muted);
}
.ticks span {
  position: absolute;
  bottom: 0;
  left: calc(var(--at) * (100% + var(--gap)) / var(--n));
}
.who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.who b {
  font-weight: 600;
}
.where {
  font: 0.8125rem/1.3 var(--mono);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.overlap-layer {
  position: absolute;
  pointer-events: none;
  left: calc(var(--label-w) + var(--col-gap));
  right: 0;
  top: calc(var(--ticks-h) + var(--row-gap));
  bottom: 0;
}
.overlap {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: calc(var(--start) * (100% + var(--gap)) / var(--n) - 3px);
  width: calc(var(--count) * (100% + var(--gap)) / var(--n) - var(--gap) + 6px);
}
.overlap svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.overlap rect {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

/* ---------- 1. Hero ---------- */
.hero {
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
}
main > .hero {
  padding-block: clamp(3rem, 7vw, 6rem);
}
.hero-grid {
  width: 100%;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 5fr 7fr;
  }
}
.hero-copy h1 {
  margin-bottom: 1.5rem;
}
.lede {
  font-size: 1.1875rem;
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.caption {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.hero-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(1rem, 2.4vw, 1.75rem);
  min-width: 0;
}
.card-title {
  font: 0.8125rem/1.4 var(--mono);
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.hero-bands {
  --label-w: 9.5rem;
  --gap: 2px;
}
.hero-bands .where {
  font-size: 0.75rem;
  white-space: nowrap;
}
/* Each person's local time at the outlined hour, from 640 px up. */
.their,
.their-head {
  display: none;
}
.their {
  font: 0.8125rem/1.3 var(--mono);
}
.their.after {
  color: var(--text-muted);
}
.their-head {
  align-self: end;
  font: 0.75rem/1 var(--mono);
  color: var(--text-muted);
  white-space: nowrap;
}
@media (min-width: 640px) {
  .hero-bands {
    --their-w: 4.5rem;
    grid-template-columns: var(--label-w) minmax(0, 1fr) var(--their-w);
  }
  .hero-bands .overlap-layer {
    right: calc(var(--their-w) + var(--col-gap));
  }
  .their,
  .their-head {
    display: block;
  }
}
/* The card is narrowest beside the copy: drop the city to keep cells wide. */
@media (min-width: 960px) and (max-width: 1199px) {
  .hero-bands {
    --label-w: 6rem;
  }
  .hero-bands .city {
    display: none;
  }
}
.live-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1rem, 2.4vw, 1.75rem);
}
.chip {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.9375rem;
}
@media (min-width: 1200px) {
  .hero-bands {
    --gap: 3px;
  }
}
@media (max-width: 639px) {
  .hero-card {
    margin-inline: -0.5rem;
    padding: 0.875rem 0.625rem;
    border-radius: 16px;
  }
  .hero-bands {
    --label-w: 5.5rem;
    --col-gap: 6px;
    --gap: 2px;
  }
  .hero-bands .band {
    height: 2rem;
  }
  .hero-bands .cell {
    border-radius: 1.5px;
  }
  .hero-bands .city {
    display: none;
  }
  .hero-bands .where {
    font-size: 0.6875rem;
  }
  .chip {
    border-radius: 14px;
    font-size: 0.875rem;
  }
}

/* ---------- 2. Problem ---------- */
.problem-text {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
}
.ul {
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% /
    100% 2px;
  padding-bottom: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 900ms var(--ease) 200ms;
}
.ul + .ul,
.problem-text .ul:last-child {
  transition-delay: 600ms;
}
.motion .problem-text:not(.in) .ul {
  background-size: 0 2px;
}
.follow {
  color: var(--text-muted);
}

/* ---------- 3. How it works ---------- */
.steps {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step,
.feature,
.dst-panel {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
}
.step p,
.feature p {
  color: var(--text-muted);
}
.well {
  height: 140px;
  border-radius: 14px;
  background: var(--surface-sunken);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.num {
  display: block;
  font: 400 3.5rem/1 var(--serif);
  color: var(--accent-strong);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.m-field {
  width: 100%;
  max-width: 16rem;
  font-size: 0.875rem;
}
.m-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.m-input {
  display: flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-raised);
}
.caret {
  width: 1.5px;
  height: 1.1em;
  margin-left: 1px;
  background: var(--text);
}
.m-option {
  margin-top: 4px;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.m-option b {
  font-weight: 600;
}
.mini-bands {
  --label-w: 0px;
  --col-gap: 0px;
  --ticks-h: 0px;
  --row-gap: 6px;
  --gap: 2px;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
}
.mini-bands .overlap-layer {
  top: 0;
}
.mini-bands .band {
  height: 1.375rem;
}
.mini-bands .cell {
  border-radius: 2px;
}
.m-suggest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 17rem;
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.m-copy,
.m-url-btn {
  flex: none;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.m-copy .c2,
.step:hover .m-copy .c1 {
  display: none;
}
.step:hover .m-copy .c2 {
  display: inline;
}
.step:hover .m-copy {
  background: var(--working);
  border-color: var(--working);
  color: var(--working-text);
}

/* ---------- 4. The clocks change ---------- */
.dst-static {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 960px) {
  .dst-static {
    grid-template-columns: repeat(3, 1fr);
  }
}
.dst-date {
  font: 600 0.875rem/1.4 var(--sans);
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
}
.dst-bands {
  --label-w: 4.75rem;
  --col-gap: 0.625rem;
  --gap: 2px;
  --row-gap: 0.625rem;
}
.dst-bands .band {
  height: 1.5rem;
}
.dst-bands .cell,
.mini-bands .cell {
  border-radius: 2px;
}
.dst-bands .who,
.live-bands .who {
  font-size: 0.875rem;
}
.readout {
  margin-top: 1.5rem;
}
.readout-num {
  font: 400 clamp(2.5rem, 1.5rem + 4vw, 4.5rem) / 1 var(--serif);
  letter-spacing: -0.03em;
}
.dst-panel .readout-num {
  font-size: clamp(2.25rem, 1.5rem + 2vw, 3rem);
}
.readout-range {
  margin-top: 0.5rem;
  font-weight: 600;
}
.readout-offs {
  font: 0.8125rem/1.4 var(--mono);
  color: var(--text-muted);
}
.dst-caption {
  margin-top: clamp(2rem, 4vw, 3rem);
  max-width: 44rem;
  color: var(--text-muted);
}

/* Live sticky scene, only when main.js upgrades the section. */
@media (prefers-reduced-motion: no-preference) {
  .dst.is-live .dst-static {
    display: none;
  }
}
.dst-live {
  height: 300vh;
}
.dst-sticky {
  position: sticky;
  top: var(--header);
  height: calc(100vh - var(--header));
  max-width: calc(72rem + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rail {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.rail::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 6px;
  height: 1px;
  background: var(--border-strong);
}
.rail li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-muted);
  transition: color 400ms ease;
}
.rail li:nth-child(2) {
  align-items: center;
}
.rail li:last-child {
  align-items: flex-end;
}
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-sunken);
  transition:
    background-color 400ms ease,
    border-color 400ms ease;
}
[data-step="0"] [data-stop="0"],
[data-step="1"] [data-stop="1"],
[data-step="2"] [data-stop="2"] {
  color: var(--text);
}
[data-step="0"] [data-stop="0"] .dot,
[data-step="1"] [data-stop="1"] .dot,
[data-step="2"] [data-stop="2"] .dot {
  background: var(--accent);
  border-color: var(--accent);
}
.live-bands .band,
.live-bands .strip {
  height: 3rem;
}
.band-clip {
  display: block;
  overflow: hidden;
}
.strip {
  width: calc((100% + var(--gap)) * 38 / 36 - var(--gap));
  transition: transform 400ms ease-out;
}
[data-step="1"] .strip {
  transform: translateX(calc((100% + var(--gap)) * -2 / 38));
}
.live-overlap {
  transition:
    left 400ms ease-out,
    width 400ms ease-out;
}
[data-step="1"] .live-overlap {
  --start: 14;
  --count: 8;
}
.readouts {
  display: grid;
  margin-top: clamp(1.5rem, 4vh, 3rem);
}
.readouts .readout {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  transition: opacity 400ms ease;
}
[data-step="0"] [data-for="0"],
[data-step="1"] [data-for="1"],
[data-step="2"] [data-for="2"] {
  opacity: 1;
}
@media (max-width: 639px) {
  .dst-live {
    height: 240vh;
  }
  .live-bands {
    --label-w: 5.5rem;
    --col-gap: 6px;
    --gap: 2px;
  }
  .live-bands .band,
  .live-bands .strip {
    height: 2rem;
  }
  .live-bands .cell {
    border-radius: 2px;
  }
}

/* ---------- 5. Features ---------- */
.bento {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
  }
  .span-2 {
    grid-column: span 2;
  }
  .span-3 {
    grid-column: span 3;
  }
  .span-4 {
    grid-column: span 4;
  }
}
.feature {
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}
@media (hover: hover) and (pointer: fine) {
  .feature:hover {
    translate: 0 -2px;
    box-shadow: var(--shadow-lg);
  }
}
.motif {
  min-height: 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 1.25rem;
}
.m-ranks span {
  display: flex;
  gap: 0.75rem;
  width: min(100%, 17rem);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.m-ranks .best {
  border-color: var(--accent);
}
.m-ranks b {
  color: var(--text-muted);
}
.m-chip {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--off);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  .m-chip {
    color: var(--off-text);
  }
}
.m-swatches {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.m-swatches span {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.m-swatches i {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  background: var(--off);
}
.m-swatches .w {
  background: var(--working);
}
.m-swatches .n {
  background: var(--night);
}
.m-big {
  font: 400 3rem/1 var(--serif);
  letter-spacing: -0.03em;
}
.m-wrap {
  --gap: 3px;
  --ticks-h: 1rem;
  align-items: stretch;
  width: 100%;
  max-width: 16rem;
}
.m-wrap .band {
  height: 1.75rem;
}
.m-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.375rem 0.375rem 0.375rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-sunken);
}
.m-url-text {
  font: 0.8125rem/1.4 var(--mono);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-lock {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.also {
  margin-top: 1.75rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- 6. The real app ---------- */
.browser {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  background: var(--surface-raised);
  overflow: hidden;
}
.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.browser-label {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  font: 0.75rem/1 var(--mono);
  color: var(--text-muted);
}
.browser iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: var(--surface);
}
.real-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 1.25rem;
}
@media (max-width: 639px) {
  .real .wrap {
    padding-inline: 0.75rem;
  }
  .real .eyebrow,
  .real h2,
  .real .intro,
  .real-links {
    padding-inline: calc(var(--pad) - 0.75rem);
  }
  .browser-label {
    display: none;
  }
  .browser iframe {
    height: 640px;
  }
}

/* ---------- 7. Closing ---------- */
.closing {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: var(--night-text);
  text-align: center;
}
.closing-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: min(70%, 20rem);
  translate: 0 -50%;
  background-image: linear-gradient(
    90deg,
    rgb(230 233 242 / 0.06) calc(100% - 4px),
    transparent 0
  );
  background-size: calc(100% / 48) 100%;
}
.drift {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: calc(100% * 22 / 48 - 4px);
  width: calc(100% * 4 / 48 + 4px);
  border: 2px solid var(--accent);
  border-radius: 8px;
  opacity: 0.35;
}
.closing-inner {
  position: relative;
}
.closing h2 {
  color: #f6f2ec;
  max-width: 18ch;
  margin-inline: auto;
}
.closing p {
  margin-bottom: 2rem;
}
.closing .btn-night {
  background: #c2410c;
  color: #ffffff;
}
.closing .btn-night:hover {
  background: #a6370a;
}
.closing :focus-visible {
  outline-color: #8ab4ff;
}
@media (prefers-color-scheme: dark) {
  .closing .btn-night {
    background: #ff9a5c;
    color: #1d0f05;
  }
  .closing .btn-night:hover {
    background: #ffa76f;
  }
}

/* ---------- 8. Footer ---------- */
.site-footer {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mark-sm {
  width: 22px;
  height: 22px;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
}

/* ---------- Motion (cut entirely under reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .hero-bands .cell {
    animation: fill 500ms ease both;
    animation-delay: calc(var(--r) * 90ms + var(--i) * 6ms);
  }
  .hero-overlap rect {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 600ms var(--ease) 1.15s forwards;
  }
  .hero .chip {
    animation: rise 450ms var(--ease) 1.75s both;
  }
  .caret {
    animation: blink 1.06s steps(1) infinite;
  }
  .motion [data-reveal] {
    transition:
      opacity 600ms var(--ease) var(--d, 0ms),
      transform 600ms var(--ease) var(--d, 0ms),
      translate 200ms ease,
      box-shadow 200ms ease;
  }
  .motion [data-reveal]:not(.in) {
    opacity: 0;
    transform: translateY(12px);
  }
  .motion .closing.in-view .drift {
    animation: drift 20s ease-in-out infinite alternate;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dst-live {
    display: none;
  }
}
@keyframes fill {
  from {
    background-color: var(--off);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes drift {
  from {
    transform: translateX(-1vw);
  }
  to {
    transform: translateX(1vw);
  }
}
