@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

/* Colours come from the video's set: the wall, the hoodie, the caption yellow. */
:root {
  --wall: #efdfd6;
  --ink: #2b2325;
  --muted: #66575a;
  --teal: #1f6463;
  --teal-dark: #174d4c;
  --line: #9e8a83;
  --accent: #ffd84d;
  --error: #a3261b;
  --frame-radius: 28px;
  --field-radius: 18px;
  --field-pad: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font: 400 1.0625rem/1.55 'Nunito', system-ui, sans-serif;
}
a { color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.top { padding-top: 18px; padding-bottom: 6px; }
.wordmark { font-weight: 900; font-size: 1.375rem; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }

h1, h2, h3 { text-wrap: balance; }
h1 {
  font-weight: 900;
  font-size: clamp(2.125rem, 1.45rem + 3vw, 3.5rem);
  line-height: 1.04;
  margin: 0.25em 0 0.4em;
}
h2 {
  font-weight: 900;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  line-height: 1.1;
  margin: 0 0 0.45em;
}
h3 { font-weight: 800; font-size: 1.1875rem; line-height: 1.25; margin: 0; }
p { text-wrap: pretty; }
.lede { font-size: 1.1875rem; max-width: 33em; margin: 0; }

main > section { padding-top: 48px; padding-bottom: 48px; }
main > .hero { padding-top: 4px; }

/* Hero: copy first, the clip under it on phones and beside it on wider screens. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: center; padding-bottom: 80px; }
}

.clip {
  position: relative;
  margin: 0;
  border-radius: var(--frame-radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--wall);
}
.clip video { display: block; width: 100%; max-width: 100%; height: 100%; object-fit: cover; }
.clip figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 10px 14px;
  border-radius: calc(var(--frame-radius) - 16px);
  background: var(--ink);
  color: #fff;
  line-height: 1.3;
}
.clip figcaption strong { display: block; font-weight: 800; }
.clip figcaption span { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }

/* The sign-up form: one field and one button inside a white field. */
.join { margin-top: 28px; max-width: 31rem; }
.field {
  display: flex;
  gap: var(--field-pad);
  padding: var(--field-pad);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--field-radius);
}
.field:focus-within { border-color: var(--teal); outline: 3px solid var(--teal); outline-offset: 1px; }
.field input {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  outline: none;
}
.field input::placeholder { color: #8c7c78; }
.field button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: calc(var(--field-radius) - var(--field-pad));
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.field button:hover { background: var(--teal-dark); }
.field button[disabled] { cursor: progress; background: var(--teal-dark); }
@media (max-width: 400px) {
  .field { flex-direction: column; }
  .field input { padding: 12px 10px; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.error { margin: 10px 0 0; color: var(--error); font-weight: 700; }
.fine { margin: 10px 0 0; font-size: 0.9375rem; color: var(--muted); }
.fine a { color: var(--muted); }

/* After joining */
.joined { margin-top: 28px; max-width: 34rem; animation: rise 0.35s ease-out; }
.joined:focus { outline: none; }
.joined-title { margin: 0; font-size: 1.5rem; font-weight: 900; }
.joined-text { margin: 4px 0 0; }
.ask { margin-top: 20px; }
.q { margin: 0 0 10px; font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.choices button {
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}
.choices button:hover { border-color: var(--teal); }
.choices button[aria-pressed='true'] { background: var(--teal); border-color: var(--teal); color: #fff; }
.thanks { margin: 0; font-weight: 700; color: var(--teal); }
.done { margin-top: 28px; font-weight: 800; font-size: 1.25rem; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* The day's routine, with the second clip */
.routine-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.routine-grid .clip-small { max-width: 360px; }
@media (min-width: 860px) {
  .routine-grid { grid-template-columns: 340px minmax(0, 1fr); gap: 64px; align-items: center; }
  .routine-grid .clip-small { order: -1; }
}
.routine-copy > p { margin: 0; max-width: 32em; }
.routine { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; }
.routine li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 12px; }
.routine .t { padding-top: 1px; color: var(--teal); font-weight: 800; font-variant-numeric: tabular-nums; }
.routine p { margin: 2px 0 0; color: var(--muted); }

.points { display: grid; gap: 28px; margin-top: 24px; }
.points p { margin: 6px 0 0; color: var(--muted); }
@media (min-width: 760px) {
  .points { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .faq { grid-template-columns: repeat(2, 1fr); max-width: 860px; }
}

main > .last { padding-top: 56px; padding-bottom: 72px; }
.last .join { margin-top: 20px; }

.foot { padding-bottom: 32px; color: var(--muted); font-size: 0.9375rem; }
.foot a { color: var(--muted); }

/* Text pages: privacy, leaving the list, admin */
.page { max-width: 680px; padding-bottom: 72px; }
.page h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
.page h2 { font-size: 1.375rem; margin-top: 1.6em; }
.page li { margin: 4px 0; }
.btn {
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.btn:hover { background: var(--teal-dark); }
.btn[disabled] { cursor: progress; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 12px 8px 0; }
th { font-weight: 800; }
td.n, th.n { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  .joined { animation: none; }
  .choices button { transition: none; }
}
