@font-face {
  font-family: "Baloo 2";
  src: url("/fonts/baloo-2-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --paper: #f7f5f0;
  --ink: #141414;
  --muted: #5c5a55;
  --line: #d8d4ca;
  --on-ink-muted: #c9c5bb;
  --yellow: #fcc344;
}

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

[hidden] { display: none !important; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1.125rem/1.45 "Baloo 2", ui-rounded, system-ui, sans-serif;
}

h1, h2, h3, p, ol { margin: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
h1, .slide { font-size: clamp(1.625rem, 0.25rem + 7.6vw, 4.25rem); line-height: 1.06; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); line-height: 1.12; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; line-height: 1.3; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 50rem;
  margin-inline: auto;
  padding-inline: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
}

.muted { color: var(--muted); }
.tag { color: var(--ink); overflow-wrap: anywhere; }

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 1;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { top: 1rem; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}
.header a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.logo img { display: block; }
.header-link { font-size: 1rem; text-underline-offset: 0.25em; }

section { padding-block: clamp(3rem, 9vw, 5.5rem); border-top: 1px solid var(--line); }
section > h2 + p { margin-top: 1rem; }

.opening { padding-top: clamp(1rem, 5vw, 3rem); border-top: 0; animation: appear 0.6s ease-out; }

/* Slides share one grid cell, so the tallest sets the height and nothing below moves. */
.carousel { touch-action: pan-y pinch-zoom; }
.slides { display: grid; align-items: center; }
.slide { grid-area: 1 / 1; opacity: 0; text-wrap: balance; pointer-events: none; transition: opacity 0.5s; }
.slide.active { opacity: 1; pointer-events: auto; }
.dots { display: flex; min-height: 2rem; margin-top: 0.5rem; }
.dot { flex: 0 1 1.75rem; height: 2rem; padding: 0; border: 0; background: none; cursor: pointer; }
.dot::before {
  content: "";
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  margin-inline: auto;
  border-radius: 999px;
  background: #8a867d;
}
.dot[aria-current]::before { width: 1.125rem; background: var(--ink); }

.campaign { margin-top: clamp(0.5rem, 2.5vw, 1.5rem); }
/* The highlighted title is about 16.4em wide, so this keeps it on one line on phones. */
.campaign h2 { margin-bottom: 0.5rem; font-size: clamp(0.875rem, (100vw - 2.5rem) / 16.6, 1.75rem); line-height: 1.25; letter-spacing: 0; }
.highlight {
  padding: 0.1em 0.3em;
  border-radius: 0.4em;
  background: var(--yellow);
  white-space: nowrap;
}

.reveal {
  margin-top: 1.5rem;
  padding: 1.25rem 0.75rem;
  border-radius: 1.75rem;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.reveal-label { color: var(--on-ink-muted); font-size: 1rem; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 0.5rem 0.75rem; }
.number {
  display: block;
  font-size: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.number[data-unit="seconds"] { color: var(--yellow); }
.unit { display: block; color: var(--on-ink-muted); font-size: 0.875rem; }
.arriving:not(:empty) { margin-block: 1rem; font-size: 1.625rem; line-height: 1.2; }

.actions { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.text-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 1rem; text-underline-offset: 0.25em; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.icon { flex: none; width: 1.25rem; height: 1.25rem; }
.button-dark { background: var(--ink); color: var(--paper); }
.button:active { transform: scale(0.98); }
@media (hover: hover) {
  .button:hover { background: var(--ink); color: var(--paper); }
  .button-dark:hover { background: #333; }
}

.steps { margin-block: 1.75rem 2rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: 2.75rem; counter-increment: step; }
.steps li + li { margin-top: 1.5rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; font-size: 1.25rem; line-height: 1.3; }

.share-buttons { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.copy-status { min-height: 1.6em; margin-top: 0.75rem; text-align: center; overflow-wrap: anywhere; }

.footer { padding-block: 0 max(3rem, env(safe-area-inset-bottom)); }

@media (min-width: 40rem) {
  .actions { flex-direction: row; gap: 1rem; }
  .actions .button { width: auto; min-width: 16rem; }
  .share-buttons { grid-template-columns: 1fr 1fr auto; }
  .share-buttons .button { padding-inline: 1.25rem; white-space: nowrap; }
  .copy-status { text-align: left; }
}

@keyframes appear { from { opacity: 0.5; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .opening { animation: none; }
  .slide { transition: none; }
  .button:active { transform: none; }
}
