/* Pawfect Match website.
   Tokens follow the app (apps/mobile/src/lib/theme.ts, Brand Guidelines
   v1.0): Forest carries text and buttons, Meadow and Lime the nature,
   Match Violet the screen titles and the match. Day by default; `.night`
   switches a block to the app's night palette, and pages marked
   `.follows-scheme` switch on the visitor's dark mode. */

@font-face {
  font-family: "Archivo Black";
  src: url("assets/fonts/archivo-black.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --forest: #055522;
  --meadow: #3b992c;
  --lime: #85cb2e;
  --violet: #8f53ff;
  --cream: #f4f8ef;
  --slate: #1c2620;
  --sage: #5f6b63;

  --display: "Archivo Black", "Arial Black", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;
  --pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 4px 16px rgba(5, 85, 34, 0.08);
  --shadow-lift: 0 22px 44px -12px rgba(5, 85, 34, 0.28), 0 3px 8px rgba(5, 85, 34, 0.08);

  --sky-day: linear-gradient(180deg, #bbe3da 0%, #c9e9df 45%, #d8eee4 75%, #e2efd3 100%);
  --sky-dusk: linear-gradient(180deg, #b9a7e2 0%, #d3c4ec 40%, #ead5e5 75%, #f3e0de 100%);
  --sky-night: linear-gradient(180deg, #150a31 0%, #1e1142 45%, #291754 75%, #362069 100%);
}

/* Day palette (dayColors). */
:root,
.day {
  --bg: var(--cream);
  --ink: var(--slate);
  --ink-muted: var(--sage);
  --ink-subtle: #68746b;
  --primary: var(--forest);
  --primary-fill: var(--forest);
  --primary-fill-hover: #033d18;
  --primary-light: #e4f1da;
  /* Meadow is too light for text on the sky: hours use the app's darker
     success green (4:1 on the day sky). */
  --hour: #2e7a22;
  --on-primary: #ffffff;
  --on-lime: var(--forest);
  --lime-light: #edf7df;
  --accent: var(--violet);
  --accent-fill: #7a3cf0;
  --accent-ink: #6a35d9;
  --accent-light: #f1eaff;
  --surface: #ffffff;
  --surface-muted: #ebf1e3;
  --glass: rgba(255, 255, 255, 0.9);
  --chip: rgba(214, 228, 200, 0.55);
  --line: #e0e8d8;
  --field-border: #829086;
  --danger: #c0392b;
  --danger-light: #f8e6e3;
  --warning: #8a6110;
  --warning-light: #f6efd9;
  --success: #2e7a22;
  --focus: var(--forest);
  --app-bg: var(--cream);
  --veil: rgba(228, 242, 236, 0.92);
  color-scheme: light;
}

/* Night palette (nightColors): the night park's sky and violet paper. */
.night {
  --bg: #150a31;
  --ink: #f2eeff;
  --ink-muted: #bdb3db;
  --ink-subtle: #9d95bf;
  --primary: #5bb84a;
  --primary-fill: #2a7a35;
  --primary-fill-hover: #256e30;
  --primary-light: #263447;
  --hour: var(--lime);
  --on-primary: #ffffff;
  --on-lime: #10300f;
  --lime-light: #333646;
  --accent: #9d6bff;
  --accent-fill: #7a45e8;
  --accent-ink: #c2a3ff;
  --accent-light: #3d2875;
  --surface: #231a4a;
  --surface-muted: #2e2459;
  --glass: rgba(35, 26, 74, 0.86);
  --chip: rgba(120, 100, 200, 0.24);
  --line: #3a2f66;
  --field-border: #7268a6;
  --danger: #f07a70;
  --danger-light: #46244a;
  --warning: #e8b54a;
  --warning-light: #43334a;
  --success: #6cc45a;
  --focus: #85cb2e;
  --app-bg: #150a31;
  --veil: rgba(21, 10, 49, 0.9);
  --shadow: 0 4px 16px rgba(8, 2, 26, 0.4);
  --shadow-lift: 0 22px 44px -12px rgba(8, 2, 26, 0.7), 0 3px 8px rgba(8, 2, 26, 0.4);
  color-scheme: dark;
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  .follows-scheme {
    --bg: #150a31;
    --ink: #f2eeff;
    --ink-muted: #bdb3db;
    --ink-subtle: #9d95bf;
    --primary: #5bb84a;
    --primary-fill: #2a7a35;
    --primary-fill-hover: #256e30;
    --primary-light: #263447;
    --hour: var(--lime);
    --on-lime: #10300f;
    --accent: #9d6bff;
    --accent-fill: #7a45e8;
    --accent-ink: #c2a3ff;
    --accent-light: #3d2875;
    --surface: #231a4a;
    --surface-muted: #2e2459;
    --glass: rgba(35, 26, 74, 0.86);
    --chip: rgba(120, 100, 200, 0.24);
    --line: #3a2f66;
    --danger: #f07a70;
    --danger-light: #46244a;
    --warning: #e8b54a;
    --warning-light: #43334a;
    --success: #6cc45a;
    --focus: #85cb2e;
    --app-bg: #150a31;
    --shadow: 0 4px 16px rgba(8, 2, 26, 0.4);
    --shadow-lift: 0 22px 44px -12px rgba(8, 2, 26, 0.7), 0 3px 8px rgba(8, 2, 26, 0.4);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  scrollbar-color: color-mix(in srgb, var(--primary) 55%, transparent) transparent;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  caret-color: var(--primary);
  accent-color: var(--primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: var(--on-lime); }

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2.5px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--primary);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }
p + p { margin-top: 1em; }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--pill);
  background: var(--primary-fill);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--pill);
  border: 0;
  background: var(--primary-fill);
  color: var(--on-primary);
  font: 700 16px/1.2 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.btn:hover { background: var(--primary-fill-hover); color: var(--on-primary); }
.btn:active { transform: scale(0.97); }
.btn.secondary { background: var(--chip); color: var(--ink); }
.btn.secondary:hover { background: var(--surface-muted); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--primary); min-height: 44px; padding: 0 8px; }
.btn.ghost:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Site header ---------- */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1376px;
  margin: 0 auto;
  padding: 20px clamp(16px, 4.4vw, 64px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font: 22px/1 var(--display);
  letter-spacing: -0.01em;
}
.brand img { width: 40px; height: 44px; }
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--pill);
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.site-nav a:hover { background: var(--glass); }
.site-nav a[aria-current="page"] { background: var(--primary-light); }

/* ======================================================================
   Home: one day at the park
   ====================================================================== */

.home { background: #bbe3da; }

/* The park stays behind the page, as in the app; its time follows the
   section being read (data-time on <html>, set by the script). */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.backdrop .sky,
.backdrop .land {
  position: absolute;
  inset: 0;
  transition: opacity 1.2s var(--ease-out), transform 1.4s var(--ease-out);
}
.backdrop .land img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
}
.sky-day { background: var(--sky-day); }
.sky-dusk { background: var(--sky-dusk); opacity: 0; }
.sky-night { background: var(--sky-night); opacity: 0; }
.land-night { opacity: 0; }

/* The moon hangs in the sky, not on the hills: it stays put while the park
   settles, rises at dusk and is full by 19:00. */
.sky-moon {
  position: absolute;
  top: 3vh;
  left: 52%;
  width: clamp(120px, 13vw, 210px);
  height: auto;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease-out), transform 1.6s var(--ease-out);
}
[data-time="dusk"] .sky-moon { opacity: 0.5; transform: translateY(18px); }
[data-time="sunset"] .sky-moon,
[data-time="night"] .sky-moon,
[data-time="end"] .sky-moon { opacity: 1; transform: none; }

/* Reading: the park stays in full colour and settles a little lower, so
   the hills sit under the copy rather than behind it. */
[data-time="day"] .land-day { opacity: 0.94; transform: translateY(12%); }
[data-time="dusk"] .sky-dusk { opacity: 1; }
[data-time="dusk"] .land-day { opacity: 0.9; transform: translateY(12%); }
[data-time="dusk"] .land-night { opacity: 0.5; transform: translateY(12%); }
[data-time="sunset"] .sky-night,
[data-time="night"] .sky-night,
[data-time="end"] .sky-night { opacity: 1; }
[data-time="sunset"] .land-day,
[data-time="night"] .land-day,
[data-time="end"] .land-day { opacity: 0; }
[data-time="night"] .land-night { opacity: 0.94; transform: translateY(12%); }
[data-time="sunset"] .land-night,
[data-time="end"] .land-night { opacity: 1; }

/* Where copy passes over the hills, a tight halo of the hour's sky around
   each letter keeps it readable; over open sky it is the sky's own colour
   and leaves no shape. */
.hour .copy p,
.moment h3,
.moment p {
  text-shadow: 0 0 1px var(--veil), 0 0 6px var(--veil), 0 0 14px var(--veil);
}
.hour h2 {
  text-shadow: 0 0 2px var(--veil), 0 0 10px var(--veil), 0 0 22px var(--veil);
}

/* 19:00, between dusk and night: only sky and park on screen while the
   park turns to night, so no text ever sits on the wrong sky. */
.sunset {
  min-height: 130vh;
  display: grid;
  place-items: center;
}
.sunset-note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 10px;
  border-radius: var(--pill);
  background: var(--glass);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 16px;
}
.sunset-note .t {
  padding: 4px 12px;
  border-radius: var(--pill);
  background: var(--accent-fill);
  color: #fff;
  font: 17px/1.3 var(--display);
}

/* Without the script the park belongs to the first screen only and the
   page's own sky goes from day to night. */
.no-js .backdrop { position: absolute; height: 100svh; }
.no-js .home { background: linear-gradient(180deg, #bbe3da 0, #d8eee4 52%, #d3c4ec 70%, #150a31 86%); }

.day-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 0 clamp(24px, 3vw, 48px);
  max-width: 1376px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4.4vw, 64px);
}
.day-grid > main { grid-column: 1; grid-row: 1; min-width: 0; }

/* ---------- Hero ---------- */

.hero {
  min-height: calc(100svh - 84px);
  padding: clamp(12px, 4.5vh, 56px) 0 32px;
}
/* The park takes the lower part of the screen at any size, so the hero's
   type follows the screen's height as well as its width. */
.hero h1 {
  font-size: clamp(2.4rem, min(1.15rem + 4.3vw, 8.6vh), 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 10.5ch;
}
.hero .lede {
  margin-top: clamp(14px, 2.4vh, 26px);
  max-width: 34rem;
  font-size: clamp(1.02rem, min(0.95rem + 0.45vw, 2.2vh), 1.3rem);
  line-height: 1.5;
  color: var(--ink);
}
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: clamp(18px, 3.2vh, 32px);
}
.hero .status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.hero .status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(133, 203, 46, 0.28);
}

/* ---------- The hour rail ---------- */

.rail {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 24px;
  margin-top: clamp(28px, 7vh, 72px);
  padding: 18px 18px 14px 14px;
  border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: var(--shadow);
  transition: background-color 1.2s var(--ease-out);
}
.rail-title {
  font: 15px/1.2 var(--display);
  color: var(--primary);
  margin: 0 0 10px 44px;
}
.rail ol {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rail ol::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 22px;
  bottom: 22px;
  border-left: 2px dashed color-mix(in srgb, var(--primary) 35%, transparent);
}
.rail li a {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas: "dot t" "dot l";
  align-items: center;
  min-height: 56px;
  padding: 6px 6px 6px 0;
  border-radius: var(--r-md);
  color: var(--ink);
  text-decoration: none;
}
.rail .t { grid-area: t; }
.rail .l { grid-area: l; }
.rail li a::before {
  content: "";
  grid-area: dot;
  justify-self: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
}
.rail li a:hover { background: var(--chip); }
.rail .t { font: 17px/1.1 var(--display); color: var(--primary); display: block; }
.rail .l { font-size: 14px; font-weight: 600; color: var(--ink-muted); display: block; }
.rail li a[aria-current="location"] .l { color: var(--ink); }

/* The sun and the moon are paper discs from the kit (assets/scene), each
   with its glow, centred on the current hour's dot. */
.marker {
  position: absolute;
  left: 8px;
  top: 0;
  width: 56px;
  height: 56px;
  translate: 0 calc(var(--marker-y, 8px));
  transition: translate 900ms var(--ease-out);
  pointer-events: none;
}
.marker .sun,
.marker .moon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 600ms var(--ease-out), transform 900ms var(--ease-out);
}
.marker .moon { opacity: 0; transform: rotate(-30deg) scale(0.7); }
.marker.is-moon .sun { opacity: 0; transform: scale(0.6); }
.marker.is-moon .moon { opacity: 1; transform: none; }

/* ---------- Hour sections ---------- */

.hour {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(80px, 13vh, 150px) 0;
}
.hour.flip .copy { order: 2; }
.hour h2 {
  font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hour h2 .when {
  display: block;
  color: var(--hour);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.12em;
}
.hour .copy p {
  margin-top: 20px;
  max-width: 34em;
  font-size: clamp(1.02rem, 0.97rem + 0.22vw, 1.15rem);
  line-height: 1.62;
}
.hour .copy p + p { margin-top: 12px; }
.hour .copy .fine { font-size: 15px; color: var(--ink-muted); }

.facts {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.facts li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 16px;
  line-height: 1.5;
}
.facts .disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
}
.facts strong { display: block; color: var(--ink); }

/* ---------- The app's screens, rebuilt ---------- */

.stage { position: relative; justify-self: center; width: min(380px, 100%); }
.screen {
  position: relative;
  width: 100%;
  border-radius: 40px;
  background: var(--app-bg);
  border: 8px solid var(--surface);
  box-shadow: var(--shadow-lift);
  padding: 18px 16px 22px;
  overflow: hidden;
}
.night .screen { border-color: #2e2459; }
.example {
  width: fit-content;
  margin: 12px auto 0;
  padding: 3px 12px;
  border-radius: var(--pill);
  background: var(--glass);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* Phones and tablets: the hours of the day, under the headline. Once the
   hero scrolls away, the pinned row (.rail) takes over. */
.hero-hours { display: none; }
@media (max-width: 1099px) {
  .hero-hours {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 22px;
    padding: 5px 5px 5px 2px;
    border-radius: var(--pill);
    background: var(--glass);
    box-shadow: var(--shadow);
    max-width: 100%;
  }
  .hero-hours img { width: 40px; height: 40px; flex: none; }
  .hero-hours ol { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
  .hero-hours a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    border-radius: var(--pill);
    color: var(--primary);
    font: 15px/1 var(--display);
    text-decoration: none;
  }
  .hero-hours a:hover { background: var(--chip); }
  .sky-moon { left: auto; right: 4vw; top: 70px; width: clamp(96px, 24vw, 150px); }
}
@media (max-width: 400px) {
  .hero-hours img { display: none; }
  .hero-hours { padding-left: 5px; }
}

.app-title {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--pill);
  background: var(--accent);
  color: #fff;
  font: 24px/30px var(--display);
  letter-spacing: -0.01em;
}
.app-row { display: flex; align-items: center; gap: 8px; }
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--pill);
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.chip.on { background: var(--primary-fill); color: var(--on-primary); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--pill);
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
}
.badge.primary { background: var(--primary-light); color: var(--primary); }
.badge.accent { background: var(--accent-light); color: var(--accent-ink); }
.badge.warning { background: var(--warning-light); color: var(--warning); }
.badge.danger { background: var(--danger-light); color: var(--danger); }
.badge.success { background: var(--lime); color: var(--on-lime); }

.app-card {
  margin-top: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.app-card .pad { padding: 14px 16px 16px; }
.app-card h3 { font-size: 22px; line-height: 28px; color: var(--primary); }
.meta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-muted); margin-top: 4px; }
.meta .icon { width: 15px; height: 15px; }

/* Playdate: the swipe card, the paws, the match. */
.dog-photo {
  height: 210px;
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
}
.dog-photo .icon { width: 64px; height: 64px; stroke-width: 1.25; }
.breed { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 10px; }
.paws { display: flex; justify-content: center; gap: 44px; margin-top: 16px; }
.paws img { width: 76px; height: 76px; filter: drop-shadow(0 4px 6px rgba(5, 85, 34, 0.18)); }

.match {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 24px;
  background: rgba(3, 40, 16, 0.95);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 400ms var(--ease-out), visibility 0s 400ms;
}
.match .clasp { position: relative; width: 100%; aspect-ratio: 760 / 592; }
.match .clasp img { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 620ms cubic-bezier(0.4, 0, 0.8, 0.45); }
.match .clasp .leash-green { transform: translate(-46%, 30%); }
.match .clasp .leash-purple { transform: translate(46%, -30%); }
.match .title { font: 34px/1.05 var(--display); margin-top: 4px; transform: translateY(14px) scale(0.86); opacity: 0; transition: transform 500ms var(--ease-out) 620ms, opacity 300ms var(--ease-out) 620ms; }
.match .title span { color: var(--violet); }
.match .who { margin-top: 10px; color: rgba(255, 255, 255, 0.82); font-size: 14px; line-height: 1.5; opacity: 0; transition: opacity 400ms var(--ease-out) 820ms; }
.match .btn { margin-top: 18px; background: #7a3cf0; color: #fff; opacity: 0; transition: opacity 400ms var(--ease-out) 900ms; }
.is-matched .match { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-out); }
.is-matched .match .clasp img { transform: none; }
.is-matched .match .title { opacity: 1; transform: none; }
.is-matched .match .who,
.is-matched .match .btn { opacity: 1; }
.replay {
  display: inline-flex;
  margin: 10px auto 0;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--primary);
  font: 700 15px var(--text);
  cursor: pointer;
}
.replay:hover { text-decoration: underline; text-underline-offset: 4px; }
.stage .center { display: flex; justify-content: center; }

/* Community: an event card. */
.event .when-row { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); font-size: 15px; margin-top: 8px; }
.spots { margin-top: 12px; }
.spots .bar { height: 8px; border-radius: var(--pill); background: var(--surface-muted); overflow: hidden; }
.spots .bar span { display: block; height: 100%; width: 70%; border-radius: inherit; background: var(--meadow); }
.spots p { margin-top: 6px; font-size: 13px; color: var(--ink-muted); font-weight: 600; }
.event .btn { width: 100%; margin-top: 14px; min-height: 48px; }
.reminder {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.reminder .disc { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-light); color: var(--accent-ink); }
.reminder strong { display: block; font-size: 14px; }

/* Places: a place and its live conditions. */
.now { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.report { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.report h4 { margin: 0 0 10px; font: 700 14px var(--text); color: var(--ink); }
.report .app-chips { margin-top: 0; gap: 6px; }
.report .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* Safety: three moments of one meetup. */
.hour.safety { grid-template-columns: 1fr; gap: 48px; --hour: var(--accent-ink); }
.safety .copy { max-width: 46rem; }
.moments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  align-items: start;
}
.moment h3 { font-size: 22px; line-height: 1.15; color: var(--primary); margin-top: 18px; }
.moment p { margin-top: 8px; font-size: 16px; line-height: 1.55; }
.moment .screen { padding: 14px 12px 16px; border-radius: 30px; border-width: 6px; }
.moment:nth-child(2) { margin-top: 56px; }
.moment:nth-child(3) { margin-top: 112px; }
.list-card { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.list-card .row { display: flex; align-items: center; gap: 12px; padding: 14px; font-size: 14.5px; }
.list-card .row + .row { border-top: 1px solid var(--line); }
.list-card .row .grow { flex: 1; min-width: 0; }
.list-card .row strong { display: block; color: var(--ink); }
.list-card .row small { display: block; color: var(--ink-muted); font-size: 13px; }
.list-card .act { font-weight: 700; color: var(--primary); }
.list-card .icon { color: var(--primary); }
.bubbles { margin-top: 12px; display: grid; gap: 8px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 20px; font-size: 14px; line-height: 1.4; background: var(--surface); box-shadow: var(--shadow); }
.bubble.mine { justify-self: end; background: var(--primary-fill); color: var(--on-primary); }
.live {
  margin-top: 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px;
}
.live .map { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.map .ground { fill: var(--primary-light); }
.map .park { fill: rgba(59, 153, 44, 0.24); }
.map .road { fill: none; stroke: var(--surface); stroke-width: 7; stroke-linecap: round; }
.map .road.thin { stroke-width: 4; }
.map .halo-2 { fill: rgba(122, 60, 240, 0.1); }
.map .halo-1 { fill: rgba(122, 60, 240, 0.22); }
.map .dot { fill: var(--accent-fill); stroke: var(--surface); stroke-width: 2.5; }
.live .who { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 14px; }
.live .who strong { color: var(--ink); }
.rate { margin-top: 12px; text-align: center; }
.rate .row-stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0 4px; }
.rate .row-stars .icon { width: 30px; height: 30px; fill: #f0b429; stroke: #c98a10; stroke-width: 1.5; }
.rate .row-stars .icon.off { fill: none; stroke: var(--field-border); }
.rate .links { display: flex; justify-content: center; gap: 16px; margin-top: 12px; font-size: 14px; font-weight: 700; }
.rate .links span { color: var(--danger); }
.prompt { font-weight: 700; color: var(--ink); font-size: 15px; }

/* Lost dog, by night. */
.alert {
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 14px;
}
.alert .top { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--danger-light); color: var(--danger); font-weight: 700; font-size: 15px; }
.alert .pad { padding: 14px 16px 16px; }
.alert h3 { font-size: 22px; line-height: 28px; }
.alert .btn { width: 100%; margin-top: 14px; min-height: 48px; }
.sightings { margin-top: 12px; }

/* ---------- Night section and the close ---------- */

.night-text h2, .night-text h3 { color: var(--primary); }
.close {
  position: relative;
  min-height: 100svh;
  padding: clamp(88px, 16vh, 168px) clamp(16px, 4.4vw, 64px) 40px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.close-inner { max-width: 1376px; width: 100%; margin: 0 auto; }
.close h2 {
  font-size: clamp(2.3rem, 1.3rem + 3.3vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  max-width: 13ch;
}
.close .promise {
  margin-top: 20px;
  max-width: 36rem;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  color: var(--ink);
}
.close .actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 28px; }
.legal {
  margin-top: auto;
  padding-top: 48px;
}
.legal-inner {
  max-width: 1376px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: var(--shadow);
  font-size: 15px;
}
.legal-inner nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.legal-inner a { font-weight: 700; }
.legal-inner .maker { margin-left: auto; color: var(--ink-muted); }
.legal-inner .maker a { font-weight: 600; }

/* ---------- Home on narrower screens ---------- */

/* Narrower: the rail becomes a row of hours pinned to the top of the
   screen while the day is read, out of the way on the hero and the close. */
@media (max-width: 1099px) {
  .day-grid { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed;
    z-index: 6;
    top: max(10px, env(safe-area-inset-top));
    left: 50%;
    translate: -50% 0;
    margin: 0;
    padding: 5px;
    border-radius: var(--pill);
    max-width: calc(100vw - 24px);
    transition: opacity 400ms var(--ease-out), translate 400ms var(--ease-out), background-color 1.2s var(--ease-out);
  }
  [data-time="dawn"] .rail,
  [data-time="end"] .rail {
    opacity: 0;
    translate: -50% -24px;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 400ms var(--ease-out), translate 400ms var(--ease-out), visibility 0s 400ms;
  }
  .no-js .rail { display: none; }
  .rail-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
  .rail ol { display: flex; gap: 2px; }
  .rail ol::before { display: none; }
  .rail li a {
    grid-template-columns: auto;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--pill);
  }
  .rail li a::before, .rail .l { display: none; }
  .rail .t { font-size: 15px; }
  .rail li a[aria-current="location"] { background: var(--primary-fill); }
  .rail li a[aria-current="location"] .t { color: var(--on-primary); }
  .marker { display: none; }
}

@media (max-width: 860px) {
  .hour { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 72px 0; }
  .hour.flip .copy { order: 0; }
  .moments { grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 420px; margin: 0 auto; }
  .moment:nth-child(2), .moment:nth-child(3) { margin-top: 0; }
  .legal-inner .maker { margin-left: 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-header { padding-top: 14px; padding-bottom: 14px; }
  .brand { font-size: 19px; }
  .brand img { width: 34px; height: 37px; }
  .site-nav .wide-only { display: none; }
  .site-nav a { padding: 0 10px; }
  .hero { padding-top: 8px; }
  .hero h1 { max-width: none; }
  .hero .actions .btn:not(.ghost) { width: 100%; }
  .screen { border-radius: 34px; border-width: 6px; }
  .close { padding-top: 80px; }
}

/* ======================================================================
   Inner pages: privacy, delete account, invite
   ====================================================================== */

.page { background: var(--bg); }
.band {
  position: relative;
  background: var(--sky-day);
  overflow: hidden;
}
.band .art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
}
.band .site-header { padding-bottom: clamp(110px, 15vw, 210px); }
@media (prefers-color-scheme: dark) {
  .follows-scheme .band { background: var(--sky-night); }
}

.doc {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) clamp(16px, 4.4vw, 64px) 72px;
}
.doc-head h1 { font-size: clamp(2.3rem, 1.6rem + 2.6vw, 3.6rem); letter-spacing: -0.02em; }
.doc-head .meta-line { margin-top: 12px; color: var(--ink-muted); font-size: 16px; }

.read {
  display: grid;
  grid-template-columns: 220px minmax(0, 68ch);
  gap: clamp(32px, 5vw, 72px);
  margin-top: 40px;
}
.toc { position: sticky; top: 24px; align-self: start; font-size: 15px; }
.toc h2 { font: 700 13px/1.2 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--r-md);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { background: var(--surface-muted); }
.toc a[aria-current="true"] { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.toc details > summary { display: none; }

.prose { font-size: 17px; line-height: 1.68; }
.prose > p:first-child { font-size: 19px; line-height: 1.6; }
.prose h2 {
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
  margin: 56px 0 14px;
  scroll-margin-top: 24px;
}
.prose h2 .n { color: var(--hour); margin-right: 0.35em; font-variant-numeric: tabular-nums; }
.prose h3 { font-size: 19px; margin: 30px 0 8px; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 12px 0; }
.prose li { margin: 8px 0; padding-left: 0.2em; }
.prose li::marker { color: var(--meadow); }
.prose strong { color: var(--ink); }
.prose p + p, .prose ul + p, .prose ol + p { margin-top: 14px; }
.prose ul + ul { margin-top: 0; }

.note {
  margin: 28px 0;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 16.5px;
  line-height: 1.65;
}
.note.address { background: var(--primary-light); box-shadow: none; }

.page-foot {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  font-size: 15px;
  color: var(--ink-muted);
}
.page-foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.page-foot nav a { font-weight: 700; }
.page-foot .maker { margin-left: auto; }

@media (max-width: 900px) {
  .read { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .toc { position: static; }
  .toc h2 { display: none; }
  .toc details {
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .toc details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }
  .toc details > summary::-webkit-details-marker { display: none; }
  .toc details > summary .icon { transition: transform 200ms var(--ease-out); }
  .toc details[open] > summary .icon { transform: rotate(90deg); }
  .toc details ol { padding: 0 8px 10px; }
  .page-foot .maker { margin-left: 0; }
}

/* Delete account: two ways, then what goes. */
.ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.way {
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px 24px 26px;
}
.way .head { display: flex; align-items: center; gap: 12px; }
.way .disc { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); flex: none; }
.way h2 { font-size: 22px; line-height: 1.2; }
.way ol { margin: 16px 0 0; padding-left: 1.3em; }
.way li { margin: 10px 0; line-height: 1.55; }
.way li::marker { color: var(--meadow); font-weight: 700; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: 56px;
}
.split h2 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem); margin-bottom: 12px; }
.split ul { padding-left: 1.3em; margin: 0; }
.split li { margin: 9px 0; line-height: 1.6; }
.split li::marker { color: var(--meadow); }
.split .after { margin-top: 20px; color: var(--ink); }
@media (max-width: 760px) {
  .ways, .split { grid-template-columns: minmax(0, 1fr); }
}

/* Invite. */
.invite { max-width: 760px; }
.ticket {
  position: relative;
  margin-top: 28px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  padding: 28px clamp(20px, 4vw, 36px) 30px;
}
.ticket .code {
  margin: 14px 0 22px;
  font: clamp(2.4rem, 1.6rem + 3.6vw, 3.6rem)/1 var(--display);
  letter-spacing: 0.08em;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.ticket .code-label { font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.ticket .hint { margin-top: 12px; font-size: 15px; color: var(--ink-muted); }
.ticket .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ticket .paw {
  position: absolute;
  right: clamp(16px, 4vw, 32px);
  top: -30px;
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 4px 6px rgba(5, 85, 34, 0.2));
}
.ticket > p:first-of-type { padding-right: 64px; }
.ticket.invalid p { font-size: 17px; }
.get h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-top: 56px; }
.get > p { margin-top: 10px; color: var(--ink); }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.platform {
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px 22px 24px;
  border: 2px solid transparent;
}
.platform.is-yours { border-color: var(--primary); }
.platform h3 { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.platform h3 .yours { font: 700 12px/1.5 var(--text); padding: 2px 10px; border-radius: var(--pill); background: var(--primary-light); color: var(--primary); }
.platform ol { margin: 14px 0 0; padding-left: 1.3em; }
.platform li { margin: 10px 0; line-height: 1.55; font-size: 16px; }
.platform li::marker { color: var(--meadow); font-weight: 700; }
.platform .btn { margin-top: 6px; min-height: 46px; font-size: 15px; }
.platform .fine { margin-top: 14px; font-size: 14px; color: var(--ink-muted); }
@media (max-width: 680px) {
  .platforms { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    animation: none !important;
  }
}
