@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
}

:root {
  --evergreen: #13372a;
  --clay: #6f9677;
  --ball: #d9f24b;
  --ball-pressed: #c9e238;
  --chalk: #f5f2ea;
  --ink: #0e1a15;
  --ink-2: #2e3b35;
  --ink-3: #4a5a52;
  --mist: #c9d9cc;

  --gutter: clamp(1.25rem, 5vw, 2rem);
  --radius-panel: clamp(20px, 2.4vw, 28px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p,
h1 {
  margin: 0;
}

/* Layout: stacked on phones, split on wide screens. */
.page {
  display: grid;
  grid-template-areas:
    "masthead"
    "court"
    "intro"
    "colophon";
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(1.5rem, 5vw, 2.25rem);
  min-height: 100svh;
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

.masthead { grid-area: masthead; }
.court { grid-area: court; }
.intro { grid-area: intro; }
.colophon { grid-area: colophon; }

/* Lockup: ball mark + lower-case wordmark, from the brand board. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.26em;
  font-size: clamp(1.75rem, 6.4vw, 2.25rem);
  color: var(--evergreen);
  text-decoration: none;
  border-radius: 6px;
}

.lockup-mark {
  flex: none;
  width: 0.9em;
  height: 0.9em;
}

.lockup-word {
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  padding-bottom: 0.1em; /* optical: centre the x-height, not the descenders */
}

.lockup:focus-visible {
  outline: 3px solid var(--evergreen);
  outline-offset: 5px;
}

/* The court: a perspective view from behind the baseline. Geometry and the
   ball's flight are generated by assets-src/court.py. */
.court {
  position: relative;
  overflow: hidden;
  min-height: clamp(280px, 46svh, 440px);
  border-radius: var(--radius-panel);
  background: #0c261c;
  isolation: isolate;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene .surface { fill: #194333; }
.scene .windscreen { fill: #0c261c; }
.scene .lines { fill: #eef2ea; fill-opacity: 0.72; }
.scene .net-body { fill: #07190f; fill-opacity: 0.5; }
.scene .net-tape {
  fill: none;
  stroke: var(--chalk);
  stroke-opacity: 0.92;
  stroke-width: 3;
  stroke-linejoin: round;
}
.scene .net-post {
  stroke: #07190f;
  stroke-width: 6;
  stroke-linecap: round;
}

.scene .ball-mark {
  fill: var(--clay);
  fill-opacity: 0.3;
}

.scene .ball-mark-far {
  opacity: 0; /* rest pose shows only the near mark */
}

.scene .ball-shadow {
  fill: #04100a;
  fill-opacity: 0.55;
  filter: url(#soft);
  transform-box: fill-box;
  transform-origin: center;
}

.scene .ball,
.scene .ball-spin {
  transform-box: fill-box;
  transform-origin: center;
}

/* Pause / play for the looping rally (WCAG 2.2.2). CSS only: no script. */
.motion-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgb(4 16 10 / 0.5);
  color: var(--chalk);
  cursor: pointer;
}

.motion-toggle input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.motion-toggle svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.motion-toggle .icon-play,
.motion-toggle:has(input:checked) .icon-pause {
  display: none;
}

.motion-toggle:has(input:checked) .icon-play {
  display: block;
}

.motion-toggle:hover {
  background: rgb(4 16 10 / 0.7);
}

.motion-toggle:has(input:focus-visible) {
  outline: 3px solid var(--chalk);
  outline-offset: 2px;
}

.court:has(.motion-toggle input:checked) .scene * {
  animation-play-state: paused;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* scene:start */
.scene .ball { animation: ball-flight 5.1s linear infinite; }
.scene .ball-spin { animation: ball-spin 1.6s linear infinite; }
.scene .ball-shadow { animation: ball-shadow 5.1s linear infinite; }
.scene .ball-mark-near { animation: mark-near 5.1s linear infinite; }
.scene .ball-mark-far { animation: mark-far 5.1s linear infinite; }

@keyframes ball-flight {
  0.00% { transform: translate(-186.5px, -267.5px) scale(0.447); opacity: 0.00; }
  2.45% { transform: translate(-178.9px, -279.1px) scale(0.473); opacity: 0.62; }
  4.90% { transform: translate(-170.3px, -285.8px) scale(0.501); opacity: 1.00; }
  7.35% { transform: translate(-160.4px, -286.5px) scale(0.530); opacity: 1.00; }
  9.80% { transform: translate(-149.4px, -280.3px) scale(0.560); opacity: 1.00; }
  12.25% { transform: translate(-137.0px, -265.9px) scale(0.591); opacity: 1.00; }
  14.71% { transform: translate(-123.2px, -242.1px) scale(0.623); opacity: 1.00; }
  17.16% { transform: translate(-108.0px, -207.6px) scale(0.655); opacity: 1.00; }
  19.61% { transform: translate(-91.4px, -161.2px) scale(0.688); opacity: 1.00; }
  22.06% { transform: translate(-73.4px, -101.8px) scale(0.720); opacity: 1.00; }
  24.51% { transform: translate(-54.2px, -28.4px) scale(0.751); opacity: 1.00; }
  25.69% { transform: translate(-46.7px, -35.7px) scale(0.788); opacity: 1.00; }
  26.86% { transform: translate(-38.7px, -39.2px) scale(0.827); opacity: 1.00; }
  28.04% { transform: translate(-30.2px, -38.5px) scale(0.867); opacity: 1.00; }
  29.22% { transform: translate(-21.2px, -32.9px) scale(0.908); opacity: 1.00; }
  30.39% { transform: translate(-11.8px, -21.7px) scale(0.949); opacity: 1.00; }
  31.57% { transform: translate(-2.0px, -4.3px) scale(0.992); opacity: 1.00; }
  32.75% { transform: translate(8.1px, 20.1px) scale(1.034); opacity: 1.00; }
  33.92% { transform: translate(18.6px, 52.0px) scale(1.075); opacity: 1.00; }
  35.10% { transform: translate(29.2px, 92.0px) scale(1.116); opacity: 1.00; }
  36.27% { transform: translate(39.8px, 140.6px) scale(1.155); opacity: 1.00; }
  38.73% { transform: translate(-7.6px, 39.9px) scale(1.048); opacity: 1.00; }
  41.18% { transform: translate(-47.5px, -36.4px) scale(0.954); opacity: 1.00; }
  43.63% { transform: translate(-81.2px, -93.2px) scale(0.872); opacity: 1.00; }
  46.08% { transform: translate(-109.6px, -134.4px) scale(0.799); opacity: 1.00; }
  48.53% { transform: translate(-133.6px, -163.1px) scale(0.735); opacity: 1.00; }
  50.98% { transform: translate(-154.1px, -181.9px) scale(0.678); opacity: 1.00; }
  53.43% { transform: translate(-171.4px, -192.6px) scale(0.627); opacity: 1.00; }
  55.88% { transform: translate(-186.3px, -196.9px) scale(0.581); opacity: 1.00; }
  58.33% { transform: translate(-198.9px, -196.0px) scale(0.540); opacity: 1.00; }
  60.78% { transform: translate(-209.7px, -191.0px) scale(0.503); opacity: 1.00; }
  61.96% { transform: translate(-207.7px, -212.8px) scale(0.501); opacity: 1.00; }
  63.14% { transform: translate(-205.5px, -231.5px) scale(0.498); opacity: 1.00; }
  64.31% { transform: translate(-203.3px, -246.9px) scale(0.494); opacity: 1.00; }
  65.49% { transform: translate(-201.0px, -259.0px) scale(0.489); opacity: 1.00; }
  66.67% { transform: translate(-198.7px, -268.0px) scale(0.484); opacity: 1.00; }
  67.84% { transform: translate(-196.3px, -273.8px) scale(0.478); opacity: 1.00; }
  69.02% { transform: translate(-193.9px, -276.5px) scale(0.471); opacity: 0.90; }
  70.20% { transform: translate(-191.4px, -276.3px) scale(0.463); opacity: 0.60; }
  71.37% { transform: translate(-189.0px, -273.2px) scale(0.455); opacity: 0.30; }
  72.55% { transform: translate(-186.5px, -267.5px) scale(0.447); opacity: 0.00; }
  100.00% { transform: translate(-186.5px, -267.5px) scale(0.447); opacity: 0.00; }
}

@keyframes ball-shadow {
  0.00% { transform: translate(-171.9px, -342.2px) scale(0.476); opacity: 0.00; }
  2.45% { transform: translate(-164.0px, -328.9px) scale(0.496); opacity: 0.35; }
  4.90% { transform: translate(-155.4px, -314.4px) scale(0.519); opacity: 0.44; }
  7.35% { transform: translate(-146.0px, -298.5px) scale(0.543); opacity: 0.36; }
  9.80% { transform: translate(-135.6px, -281.1px) scale(0.570); opacity: 0.32; }
  12.25% { transform: translate(-124.2px, -261.8px) scale(0.599); opacity: 0.33; }
  14.71% { transform: translate(-111.6px, -240.5px) scale(0.632); opacity: 0.37; }
  17.16% { transform: translate(-97.4px, -216.7px) scale(0.668); opacity: 0.46; }
  19.61% { transform: translate(-81.6px, -190.0px) scale(0.709); opacity: 0.60; }
  22.06% { transform: translate(-63.7px, -159.9px) scale(0.755); opacity: 0.78; }
  24.51% { transform: translate(-43.2px, -125.5px) scale(0.808); opacity: 1.00; }
  25.69% { transform: translate(-37.4px, -108.6px) scale(0.834); opacity: 0.88; }
  26.86% { transform: translate(-31.2px, -90.6px) scale(0.861); opacity: 0.78; }
  28.04% { transform: translate(-24.6px, -71.4px) scale(0.891); opacity: 0.70; }
  29.22% { transform: translate(-17.5px, -50.8px) scale(0.922); opacity: 0.64; }
  30.39% { transform: translate(-9.9px, -28.7px) scale(0.956); opacity: 0.61; }
  31.57% { transform: translate(-1.7px, -5.0px) scale(0.992); opacity: 0.59; }
  32.75% { transform: translate(7.1px, 20.7px) scale(1.032); opacity: 0.60; }
  33.92% { transform: translate(16.7px, 48.4px) scale(1.074); opacity: 0.63; }
  35.10% { transform: translate(27.1px, 78.6px) scale(1.120); opacity: 0.68; }
  36.27% { transform: translate(38.4px, 111.4px) scale(1.171); opacity: 0.75; }
  38.73% { transform: translate(-6.6px, 32.9px) scale(1.050); opacity: 0.64; }
  41.18% { transform: translate(-43.3px, -31.0px) scale(0.953); opacity: 0.55; }
  43.63% { transform: translate(-73.6px, -84.0px) scale(0.871); opacity: 0.50; }
  46.08% { transform: translate(-99.3px, -128.7px) scale(0.803); opacity: 0.48; }
  48.53% { transform: translate(-121.1px, -166.9px) scale(0.744); opacity: 0.49; }
  50.98% { transform: translate(-140.1px, -199.9px) scale(0.694); opacity: 0.53; }
  53.43% { transform: translate(-156.6px, -228.7px) scale(0.650); opacity: 0.60; }
  55.88% { transform: translate(-171.1px, -254.0px) scale(0.611); opacity: 0.70; }
  58.33% { transform: translate(-184.0px, -276.5px) scale(0.577); opacity: 0.84; }
  60.78% { transform: translate(-195.5px, -296.6px) scale(0.546); opacity: 1.00; }
  61.96% { transform: translate(-192.9px, -301.8px) scale(0.538); opacity: 0.88; }
  63.14% { transform: translate(-190.3px, -306.8px) scale(0.530); opacity: 0.78; }
  64.31% { transform: translate(-187.8px, -311.7px) scale(0.523); opacity: 0.70; }
  65.49% { transform: translate(-185.3px, -316.4px) scale(0.516); opacity: 0.64; }
  66.67% { transform: translate(-182.9px, -321.0px) scale(0.508); opacity: 0.60; }
  67.84% { transform: translate(-180.6px, -325.4px) scale(0.502); opacity: 0.58; }
  69.02% { transform: translate(-178.4px, -329.8px) scale(0.495); opacity: 0.53; }
  70.20% { transform: translate(-176.2px, -334.0px) scale(0.488); opacity: 0.37; }
  71.37% { transform: translate(-174.0px, -338.2px) scale(0.482); opacity: 0.20; }
  72.55% { transform: translate(-171.9px, -342.2px) scale(0.476); opacity: 0.00; }
  100.00% { transform: translate(-171.9px, -342.2px) scale(0.476); opacity: 0.00; }
}

@keyframes ball-spin {
  to { transform: rotate(1turn); }
}

@keyframes mark-near {
  0%, 24.31% { opacity: 0; }
  25.11%, 46.78% { opacity: 1; }
  56.78%, 100% { opacity: 0; }
}

@keyframes mark-far {
  0%, 60.58% { opacity: 0; }
  61.38%, 83.53% { opacity: 1; }
  100% { opacity: 0; }
}
/* scene:end */

@media (prefers-reduced-motion: reduce) {
  .scene * {
    animation: none !important;
  }

  .motion-toggle {
    display: none;
  }
}

/* Message */
.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 1.5rem);
}

h1 {
  max-width: 9ch;
  font-weight: 800;
  font-size: clamp(3rem, 14vw, 6.75rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--evergreen);
  text-wrap: balance;
}

.lede {
  max-width: 34ch;
  font-size: clamp(1.125rem, 4.4vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* The one action: ball yellow, dark text. */
.action {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  margin-top: 0.25rem;
  padding: 0 1.5rem;
  border-radius: 14px;
  background: var(--ball);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background-color 120ms ease, transform 120ms ease;
}

.action:hover {
  background: var(--ball-pressed);
}

.action:active {
  transform: translateY(1px);
}

.action:focus-visible {
  outline: 3px solid var(--evergreen);
  outline-offset: 3px;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.25rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

/* Wide screens: text on chalk to the left, the court fills the right. */
@media (min-width: 60rem) {
  .page {
    grid-template-areas:
      "masthead court"
      "intro    court"
      "colophon court";
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(2.5rem, 6vw, 6rem);
    row-gap: 0;
    height: 100svh;
    min-height: 40rem;
    padding: clamp(1.25rem, 2vw, 1.75rem);
    padding-left: clamp(2.5rem, 6vw, 6rem);
  }

  .masthead {
    padding-top: clamp(1rem, 3vh, 2rem);
  }

  .intro {
    justify-content: center;
  }

  .colophon {
    padding-bottom: clamp(0.5rem, 2vh, 1.25rem);
  }

  .court {
    min-height: 0;
  }

}

/* 404: no court, message only. */
.page-simple {
  grid-template-areas: "masthead" "intro" "colophon";
  grid-template-rows: auto 1fr auto;
}

.page-simple .intro {
  justify-content: center;
}



@media (min-width: 60rem) {
  .page-simple {
    grid-template-areas: "masthead" "intro" "colophon";
    grid-template-columns: minmax(0, 1fr);
  }
}

