/* Field Day — pet day care landing page */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */

@font-face {
  font-family: "Caprasimo";
  src: url("../assets/fonts/caprasimo-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../assets/fonts/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --field: #17523a;       /* mown grass */
  --field-deep: #0f3a29;  /* grass in shade */
  --ink: #10261c;
  --muted: #4b6157;
  --chalk: #f6faf0;       /* line-marking chalk */
  --chalk-tint: #e9f2e0;
  --paper: #ffffff;
  --ball: #ddf247;        /* tennis-ball yellow */
  --ball-dark: #cbe22d;
  --tongue: #f48ba0;      /* rosette pink */
  --alert: #ffc7d2;       /* error text on grass */

  --rule: rgb(16 38 28 / 0.14);
  --chalk-line: rgb(246 250 240 / 0.26);
  --on-field-muted: rgb(246 250 240 / 0.8);

  --font-display: "Caprasimo", "Cooper Black", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --wrap: 72.5rem;
  --header-h: 4.25rem;
  --radius: 0.625rem;
  --radius-photo: 1.75rem;

  --focus: var(--field);
}

.on-field {
  --focus: var(--ball);
}

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

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

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote,
address {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 1.35rem + 3.2vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.25;
}

p {
  text-wrap: pretty;
}

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

[hidden] {
  display: none !important;
}

.nowrap {
  white-space: nowrap;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.wrap {
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: var(--ball);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.5rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn--small {
  min-height: 2.75rem;
  padding-inline: 1.25rem;
  font-size: 0.975rem;
}

.btn--ball {
  background: var(--ball);
  color: var(--ink);
}

.btn--ball:hover {
  background: var(--ball-dark);
}

.btn--field {
  background: var(--field);
  color: var(--chalk);
}

.btn--field:hover {
  background: var(--field-deep);
}

.btn:focus-visible {
  border-radius: 999px;
}

.text-link {
  padding: 0.6rem 0;
  border: 0;
  background: none;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  cursor: pointer;
}

.text-link:hover {
  text-decoration-color: var(--ball);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--field);
  color: var(--chalk);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.4rem;
  text-decoration: none;
}

.brand__ball {
  width: 1.6rem;
  height: 1.6rem;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* The nav carries the `popover` attribute. These undo the browser's popover box
   so it can sit in the header as an ordinary row on wide screens. */
.nav {
  margin: 0;
  border: 0;
  color: inherit;
}

.nav__list {
  display: flex;
  gap: clamp(0.25rem, 1.5vw, 1.25rem);
}

.nav__list a {
  display: block;
  padding: 0.7rem 0.6rem;
  font-weight: 550;
  text-decoration: none;
  text-underline-offset: 0.4em;
  text-decoration-thickness: 2px;
}

.nav__list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ball);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 2px solid var(--chalk-line);
  border-radius: 999px;
  background: none;
  font-weight: 600;
  cursor: pointer;
}

/* Two bars, drawn as borders so they survive forced-colors mode */
.nav-toggle__bars,
.nav-toggle__bars::before {
  display: block;
  width: 1.1rem;
  border-top: 2px solid;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-toggle__bars {
  transform: translateY(-3px);
}

.nav-toggle__bars::before {
  content: "";
  transform: translateY(4px);
}

.site-header:has(.nav:popover-open) .nav-toggle__bars {
  transform: rotate(45deg);
}

.site-header:has(.nav:popover-open) .nav-toggle__bars::before {
  transform: translateY(-2px) rotate(-90deg);
}

@media (min-width: 54em) {
  .nav {
    position: static;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2rem);
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    background: none;
  }
}

@media (max-width: 53.99em) {
  .nav-toggle {
    display: inline-flex;
  }

  /* A panel under the header. The browser keeps it hidden until it is opened. */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    width: auto;
    height: auto;
    max-height: calc(100dvh - var(--header-h));
    padding: 0.5rem var(--gutter) 1.75rem;
    overflow-y: auto;
    border-top: 1px solid var(--chalk-line);
    background: var(--field);
    box-shadow: 0 1.5rem 2rem -1rem rgb(16 38 28 / 0.45);
  }

  .nav:popover-open {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--chalk-line);
    font-size: 1.15rem;
  }

  /* Browsers without popover support get the links laid out under the logo. */
  @supports not selector(:popover-open) {
    .site-header {
      position: static;
    }

    .site-header__bar {
      flex-wrap: wrap;
      row-gap: 0;
    }

    .nav-toggle {
      display: none;
    }

    .nav {
      position: static;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.25rem 1.25rem;
      width: 100%;
      max-height: none;
      padding: 0 0 1rem;
      border-top: 0;
      box-shadow: none;
    }

    .nav__list {
      flex-flow: row wrap;
      gap: 0 1.25rem;
    }

    .nav__list a {
      padding: 0.6rem 0;
      border-bottom: 0;
      font-size: 1rem;
    }
  }
}

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

.hero {
  overflow: hidden;
  /* Mowing stripes */
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.028) 0 7rem, transparent 7rem 14rem),
    var(--field);
  color: var(--chalk);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem);
}

.hero__title {
  font-size: clamp(2.75rem, 0.6rem + 11.2vw, 6.75rem);
  line-height: 0.94;
  letter-spacing: -0.015em;
}

.hero__line {
  display: block;
  white-space: nowrap;
}

.hero__lead {
  max-width: 34rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  color: var(--on-field-muted);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.hero__photo {
  position: relative;
  justify-self: center;
  width: min(100%, 25rem);
  margin-block: 0.75rem;
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  /* A running-track oval, with one chalk lane marked around it */
  border-radius: 999px;
  outline: 2px solid var(--chalk-line);
  outline-offset: 0.75rem;
}

.hero__photo figcaption {
  position: absolute;
  bottom: 9%;
  left: -0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--chalk);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  transform: rotate(-3deg);
}

.hero__facts {
  display: grid;
  gap: 0.6rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--chalk-line);
  color: var(--on-field-muted);
  font-weight: 500;
}

@media (min-width: 40em) {
  .hero__facts {
    grid-auto-flow: column;
    justify-content: space-between;
    gap: 2rem;
  }
}

@media (min-width: 60em) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    column-gap: clamp(2rem, 5vw, 4.5rem);
    padding-top: clamp(3rem, 5vw, 4.5rem);
  }

  .hero__title {
    font-size: clamp(4.5rem, 7.6vw, 6.75rem);
  }

  .hero__photo {
    justify-self: end;
    width: min(100%, 25.5rem);
    margin-right: 0.75rem;
  }

  .hero__facts {
    grid-column: 1 / -1;
  }
}

/* The tennis ball is the full stop. It drops in once on load. */

.ball {
  display: inline-block;
  width: 0.27em;
  height: 0.27em;
  margin-left: 0.06em;
  transform-origin: 50% 100%;
  cursor: pointer;
}

.ball svg {
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .ball {
    animation: ball-drop 1.5s 0.3s both;
  }

  .ball.has-landed {
    animation: none;
  }

  .ball.is-hopping {
    animation: ball-hop 0.85s both;
  }
}

@keyframes ball-drop {
  0% {
    transform: translateY(-8em);
    animation-timing-function: cubic-bezier(0.5, 0, 1, 0.75);
  }
  34% {
    transform: translateY(0) scale(1.18, 0.78);
    animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
  }
  54% {
    transform: translateY(-1.5em) scale(1);
    animation-timing-function: cubic-bezier(0.5, 0, 1, 0.75);
  }
  72% {
    transform: translateY(0) scale(1.1, 0.88);
    animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
  }
  84% {
    transform: translateY(-0.45em) scale(1);
    animation-timing-function: cubic-bezier(0.5, 0, 1, 0.75);
  }
  93% {
    transform: translateY(0) scale(1.04, 0.95);
    animation-timing-function: ease-out;
  }
  97% {
    transform: translateY(-0.08em);
  }
  100% {
    transform: none;
  }
}

@keyframes ball-hop {
  0% {
    transform: scale(1.14, 0.82);
    animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
  }
  35% {
    transform: translateY(-1.1em) scale(1);
    animation-timing-function: cubic-bezier(0.5, 0, 1, 0.75);
  }
  65% {
    transform: translateY(0) scale(1.1, 0.88);
    animation-timing-function: cubic-bezier(0, 0.4, 0.4, 1);
  }
  82% {
    transform: translateY(-0.3em) scale(1);
    animation-timing-function: cubic-bezier(0.5, 0, 1, 0.75);
  }
  100% {
    transform: none;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.section--tint {
  background: var(--chalk-tint);
}

.section--ruled {
  padding-top: 0;
}

.section--ruled > .wrap {
  padding-top: clamp(4rem, 9vw, 7.5rem);
  border-top: 2px solid var(--rule);
}

.section__head {
  max-width: 42rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section__head p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.5;
}

/* ---------- A day here ---------- */

.day {
  display: grid;
  row-gap: 3.5rem;
}

.day .section__head {
  margin-bottom: 0;
}

.timetable__row {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  column-gap: 1.25rem;
  align-items: baseline;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}

.timetable__row:last-child {
  border-bottom: 1px solid var(--rule);
}

.timetable__time {
  color: var(--field);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
  white-space: nowrap;
}

.timetable__row p {
  max-width: 34rem;
  margin-top: 0.3rem;
  color: var(--muted);
}

.day__card {
  justify-self: center;
  width: min(100%, 23rem);
}

.day__card-caption {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

@media (min-width: 60em) {
  .day {
    grid-template-columns: minmax(0, 1fr) 23rem;
    column-gap: clamp(3rem, 8vw, 7rem);
  }

  .day .section__head {
    grid-column: 1 / -1;
  }

  .timetable__row {
    grid-template-columns: 6.5rem minmax(0, 1fr);
  }

  .timetable__time {
    font-size: 1.75rem;
  }

  .day__card {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    align-self: start;
    justify-self: end;
  }
}

/* The report card */

.report {
  position: relative;
  padding: 1.5rem 1.5rem 1.6rem;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow:
    0 0 0 1px rgb(16 38 28 / 0.06),
    0 1.5rem 2.5rem -1.5rem rgb(16 38 28 / 0.4);
  transform: rotate(-1.5deg);
}

.rosette {
  position: absolute;
  top: -1.9rem;
  right: 0.25rem;
  width: 5.25rem;
  transform: rotate(9deg);
}

@media (min-width: 60em) {
  /* Room to hang the rosette off the corner */
  .rosette {
    right: -0.9rem;
  }
}

.rosette__text {
  fill: var(--field);
  font-family: var(--font-display);
  font-size: 15px;
}

.report__head {
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--ink);
}

.report__head h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.1;
}

.report__head p {
  color: var(--muted);
  font-size: 0.95rem;
}

.report__pet {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 1.1rem;
}

.report__pet img {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  object-fit: cover;
}

.report__pet p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.report__pet strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
}

.report__rows > div {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-block: 0.6rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.975rem;
  line-height: 1.4;
}

.report__rows dt {
  color: var(--muted);
}

.report__rows dd {
  font-weight: 600;
}

.meter {
  display: inline-flex;
  gap: 0.2rem;
  margin-left: 0.4rem;
  vertical-align: -0.05em;
}

.meter__dot {
  width: 0.7rem;
  height: 0.7rem;
  border: 1.5px solid var(--field);
  border-radius: 50%;
}

.meter__dot--on {
  background: var(--ball);
}

.report__note {
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 0.4rem;
  background: var(--chalk-tint);
  font-size: 0.975rem;
  line-height: 1.45;
}

.report__note footer {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Spaces ---------- */

.spaces {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}

.space {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.space img {
  width: 100%;
  border-radius: var(--radius-photo);
  object-fit: cover;
}

.space--loft img,
.space--quiet img {
  height: clamp(17rem, 60vw, 26rem);
}

.space__text {
  max-width: 34rem;
}

.space h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
}

.space p {
  margin-top: 0.5rem;
  color: var(--muted);
}

@media (min-width: 60em) {
  .spaces {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .space--yard {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: end;
  }

  .space--yard picture {
    grid-column: span 8;
  }

  .space--yard .space__text {
    grid-column: span 4;
    padding-bottom: 1rem;
  }

  .space--loft {
    grid-column: span 5;
  }

  .space--quiet {
    grid-column: span 7;
  }

  .space--loft img,
  .space--quiet img {
    height: 27rem;
  }
}

/* ---------- Prices ---------- */

.prices {
  display: grid;
  row-gap: 2.5rem;
}

.prices .section__head {
  margin-bottom: 0;
}

.price-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}

.price-list__row:last-child {
  border-bottom: 1px solid var(--rule);
}

.price-list__row h3 {
  font-size: 1.25rem;
}

.price-list__row div p {
  margin-top: 0.2rem;
  color: var(--muted);
}

.price-list__price {
  color: var(--field);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem);
  line-height: 1;
}

.checklist {
  align-self: start;
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: var(--radius);
  background: var(--chalk-tint);
}

.checklist h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
}

.checklist ul {
  display: grid;
  gap: 0.75rem;
  margin-block: 1.1rem 1.6rem;
}

.checklist li {
  position: relative;
  padding-left: 1.9rem;
}

/* A drawn tick */
.checklist li::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0.3rem;
  width: 0.5rem;
  height: 0.9rem;
  border: solid var(--field);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(40deg);
}

.checklist .btn {
  width: 100%;
}

@media (min-width: 60em) {
  .prices {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(3rem, 7vw, 6rem);
  }

  .prices .section__head {
    grid-column: 1 / -1;
  }
}

/* ---------- Questions ---------- */

.faq {
  display: grid;
}

.faq .section__head a {
  color: var(--field);
  font-weight: 600;
}

.faq__item {
  border-top: 1px solid var(--rule);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.2rem;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

/* Plus that turns into a cross when open */
.faq__item summary::after {
  content: "";
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background:
    linear-gradient(var(--field), var(--field)) center / 0.85rem 2px no-repeat,
    linear-gradient(var(--field), var(--field)) center / 2px 0.85rem no-repeat,
    var(--chalk-tint);
  transition: transform 0.2s ease;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item summary:hover::after {
  background-color: var(--ball);
}

.faq__item p {
  max-width: 38rem;
  padding-bottom: 1.4rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    .faq__item {
      interpolate-size: allow-keywords;
    }

    .faq__item::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
    }

    .faq__item[open]::details-content {
      block-size: auto;
    }
  }
}

@media (min-width: 60em) {
  .faq {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(3rem, 7vw, 6rem);
    align-items: start;
  }

  .faq .section__head {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
  }
}

/* ---------- Newsletter ---------- */

.newsletter {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 7.5rem);
  background: var(--field);
  color: var(--chalk);
}

/* The bend of a running track, in chalk */
.newsletter::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(46rem, 90vw);
  aspect-ratio: 1;
  background: repeating-radial-gradient(
    circle at 100% 100%,
    transparent 0 4.5rem,
    var(--chalk-line) 4.5rem calc(4.5rem + 2px)
  );
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 0 55%, transparent 70%);
  mask-image: radial-gradient(circle at 100% 100%, #000 0 55%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}

.newsletter__inner {
  position: relative;
  display: grid;
  gap: 2rem;
  max-width: 44rem;
  margin-left: max(var(--gutter), (100% - var(--wrap)) / 2);
}

.newsletter h2 {
  font-size: clamp(3rem, 1.6rem + 6.4vw, 5.5rem);
  line-height: 0.95;
}

.newsletter__copy p {
  max-width: 36rem;
  margin-top: 1.25rem;
  color: var(--on-field-muted);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.5;
}

.subscribe {
  display: grid;
  gap: 0.6rem;
}

.subscribe__label {
  font-weight: 650;
}

.subscribe__field {
  display: grid;
  gap: 0.6rem;
}

.subscribe__input {
  width: 100%;
  min-height: 3.5rem;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
}

.subscribe__input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.subscribe__button {
  min-height: 3.5rem;
  background: var(--ball);
  color: var(--ink);
}

.subscribe__button:hover {
  background: var(--ball-dark);
}

.subscribe__button[disabled] {
  cursor: progress;
  opacity: 0.85;
}

.subscribe__input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 3px var(--tongue);
}

.subscribe__error,
.subscribe__suggest {
  font-weight: 600;
  line-height: 1.4;
}

.subscribe__error {
  color: var(--alert);
}

/* Empty live regions stay in the accessibility tree but leave the layout. */
.subscribe__error:empty,
.subscribe__suggest:empty {
  position: absolute;
}

.subscribe__suggest-apply {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ball);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.subscribe__suggest-apply:focus-visible {
  outline-offset: 1px;
}

.subscribe__hint {
  color: var(--on-field-muted);
  font-size: 0.95rem;
}

/* Spam trap: off-screen for people, visible to bots */
.subscribe__trap {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 34em) {
  /* One pill: the input with its button inside */
  .subscribe__field {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    padding: 0.35rem;
    border-radius: 999px;
    background: var(--paper);
  }

  .subscribe__field:focus-within {
    outline: 3px solid var(--ball);
    outline-offset: 3px;
  }

  .subscribe__field:has([aria-invalid="true"]) {
    box-shadow: inset 0 0 0 3px var(--tongue);
  }

  .subscribe__input {
    min-height: 3.25rem;
    padding-left: 1.25rem;
    background: none;
  }

  .subscribe__input:focus-visible {
    outline: none;
  }

  .subscribe__input[aria-invalid="true"] {
    box-shadow: none;
  }

  .subscribe__button {
    min-height: 3.25rem;
    background: var(--field);
    color: var(--chalk);
    --focus: var(--ink);
  }

  .subscribe__button:hover {
    background: var(--field-deep);
  }
}

.subscribe-done {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.5rem;
  border: 2px solid var(--chalk-line);
  border-radius: var(--radius-photo);
  background: var(--field-deep);
}

.subscribe-done:focus-visible {
  border-radius: var(--radius-photo);
}

.subscribe-done__ball {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.15rem;
}

.subscribe-done h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
}

.subscribe-done p {
  margin-top: 0.35rem;
  color: var(--on-field-muted);
}

.subscribe-done strong {
  color: var(--chalk);
  overflow-wrap: anywhere;
}

.subscribe-done__demo {
  font-size: 0.95rem;
}

.subscribe-done .text-link {
  margin-top: 0.35rem;
}

@media (prefers-reduced-motion: no-preference) {
  .subscribe-done:not([hidden]) .subscribe-done__ball {
    transform-origin: 50% 100%;
    animation: ball-hop 0.85s both;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: var(--field-deep);
  color: var(--on-field-muted);
  font-size: 1rem;
}

.site-footer__grid {
  display: grid;
  gap: 2.25rem;
}

.site-footer .brand {
  color: var(--chalk);
}

.site-footer__brand p {
  max-width: 19rem;
  margin-top: 0.6rem;
}

.site-footer__title {
  margin-bottom: 0.6rem;
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

.site-footer address + p {
  margin-top: 0.6rem;
}

.site-footer a:not(.brand) {
  display: inline-block;
  padding-block: 0.35rem;
  text-decoration-color: var(--chalk-line);
  text-underline-offset: 0.3em;
}

.site-footer a:not(.brand):hover {
  color: var(--chalk);
  text-decoration-color: var(--ball);
}

.site-footer__legal {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--chalk-line);
  font-size: 0.925rem;
}

@media (min-width: 40em) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60em) {
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
    column-gap: 3rem;
  }
}

/* ---------- Not found page ---------- */

.lost {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: var(--gutter);
  background: var(--field);
  color: var(--chalk);
  text-align: center;
}

.lost__ball {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
}

.lost h1 {
  font-size: clamp(2.6rem, 1.5rem + 5vw, 4.5rem);
  line-height: 1;
}

.lost p {
  max-width: 28rem;
  margin: 1rem auto 2rem;
  color: var(--on-field-muted);
  font-size: 1.15rem;
}

/* ---------- Larger type on wide screens ---------- */

@media (min-width: 60em) {
  body {
    font-size: 1.125rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Forced colours (Windows high contrast) ---------- */

@media (forced-colors: active) {
  /* Backgrounds are dropped in this mode, so give the field an edge. */
  .subscribe__input {
    border: 1px solid;
  }

  .subscribe__input[aria-invalid="true"] {
    border-width: 3px;
  }

  .meter__dot--on {
    border-width: 0.35rem;
  }

  .faq__item summary::after {
    forced-color-adjust: none;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .newsletter,
  .skip-link {
    display: none;
  }
}
