/* ==========================================================================
   Gerrit Nieberg — design prototype
   Tokens · base · components · sections · motion
   ========================================================================== */

@font-face {
  font-family: "Zodiak";
  src: url("../fonts/Zodiak-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Zodiak";
  src: url("../fonts/Zodiak-VariableItalic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/Jost-Italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* colour */
  --ink: #07130e;          /* green-black field */
  --ink-2: #0a1a13;
  --forest: #0c2419;       /* forest field */
  --forest-2: #113526;
  --moss: #1c4d37;         /* elevated green, borders on dark */
  --chalk: #e9eae3;        /* light field */
  --paper: #f4f4ef;
  --ivory: #eeeadf;        /* text on dark */
  --ivory-2: #b9c2b9;      /* secondary text on dark */
  --ivory-3: #8e9a90;
  --text: #0c2419;         /* text on chalk */
  --text-2: #43544a;       /* secondary text on chalk */
  --gold: #c8ae78;         /* muted champagne gold */
  --gold-hi: #dcc697;
  --gold-lo: #a8894f;
  --gold-ink: #6e5526;     /* gold that reads on chalk */
  --gold-brass: #9a814e;   /* brightest gold that still holds 3:1 on chalk (large type) */
  --line-dark: rgb(200 174 120 / 0.22);
  --line-light: rgb(12 36 25 / 0.14);

  /* type */
  --serif: "Zodiak", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  /* space */
  --pad: clamp(20px, 4.45vw, 72px);
  --max: 1520px;
  --section: clamp(96px, 14vw, 200px);

  /* depth — layered, soft, green-tinted */
  --shadow-light:
    0 1px 1px rgb(7 25 17 / 0.05),
    0 3px 6px -2px rgb(7 25 17 / 0.08),
    0 14px 28px -10px rgb(7 25 17 / 0.18),
    0 42px 72px -30px rgb(7 25 17 / 0.32);
  --shadow-dark:
    0 1px 2px rgb(0 0 0 / 0.3),
    0 10px 24px -10px rgb(0 0 0 / 0.55),
    0 40px 80px -36px rgb(0 0 0 / 0.75);
  --shadow-btn: 0 1px 1px rgb(0 0 0 / 0.18), 0 8px 18px -8px rgb(0 0 0 / 0.45);

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);

  --nav-h: 76px;

  color-scheme: dark;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  background: var(--ink);
  scrollbar-color: var(--gold-lo) var(--ink);
  scrollbar-width: thin;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  caret-color: var(--gold);
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: var(--moss);
  border: 2px solid var(--ink);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-lo);
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.light :focus-visible {
  outline-color: var(--gold-ink);
}

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

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

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

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip:focus-visible {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* fields */
.dark {
  background: var(--ink);
  color: var(--ivory);
}
.forest {
  background:
    radial-gradient(120% 80% at 85% 0%, rgb(28 77 55 / 0.55), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgb(5 16 11 / 0.7), transparent 70%),
    var(--forest);
  color: var(--ivory);
}
.light {
  background: var(--chalk);
  color: var(--text);
  color-scheme: light;
}

/* grain: keeps the dark fields from going flat */
.grain {
  position: relative;
  isolation: isolate;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain > * {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.94;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.serif-it {
  font-style: italic;
  font-weight: 300;
}
/* a single key word in gold; rail gold on dark, gold ink on chalk */
.display .accent {
  color: var(--gold);
}
.light .display .accent {
  color: var(--gold-brass);
}

.h2 {
  font-size: clamp(2.75rem, 6.2vw, 6.5rem);
}
.h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 2.2vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.lead {
  font-size: clamp(1.125rem, 1.35vw, 1.3125rem);
  line-height: 1.55;
  max-width: 38ch;
}

.prose p {
  max-width: 62ch;
}
.prose p + p {
  margin-top: 1.1em;
}

.num {
  font-variant-numeric: tabular-nums lining-nums;
}

.dark .muted,
.forest .muted {
  color: var(--ivory-2);
}
.light .muted {
  color: var(--text-2);
}

/* word-mask reveal (words wrapped by JS) */
.wm {
  display: inline-block;
  overflow-x: visible;
  overflow-y: clip;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.wi {
  display: inline-block;
}

/* line-mask reveal wrapper */
.line {
  display: block;
  overflow-x: visible;
  overflow-y: clip;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.line > span {
  display: block;
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  --btn-fg: var(--ink);
  --btn-fg-hover: var(--ivory);
  --pr: 26px;   /* right padding: the arrow sits here */
  --dot: 20px;  /* radius of the disc the fill gathers into */
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding: 0 var(--pr) 0 28px;
  isolation: isolate;
  background: transparent;
  color: var(--btn-fg);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: var(--shadow-btn), inset 0 0 0 1px rgb(200 174 120 / 0);
  transition:
    color 360ms var(--ease-out),
    box-shadow 420ms var(--ease-out),
    transform 160ms var(--ease-out);
}
/* the gold fill: a circle large enough to cover the button, centred on the arrow */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gold);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
  clip-path: circle(150% at calc(100% - var(--pr) - 9px) 50%);
  transition:
    clip-path 620ms var(--ease-expo),
    background-color 300ms ease;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: color 300ms ease, transform 420ms var(--ease-expo);
}
.btn > span {
  transition: transform 520ms var(--ease-expo);
}
.btn:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .btn:not(.btn--line):hover {
    color: var(--btn-fg-hover);
    box-shadow: 0 0 0 rgb(0 0 0 / 0), inset 0 0 0 1px rgb(200 174 120 / 0);
  }
  .btn:not(.btn--line):hover > span {
    transform: translateX(-4px);
  }
  .btn:not(.btn--line):hover::before {
    clip-path: circle(var(--dot) at calc(100% - var(--pr) - 9px) 50%);
    background-color: var(--gold-hi);
  }
  .btn:not(.btn--line):hover svg {
    color: var(--ink);
    transform: translateX(1px);
  }
}
.light .btn,
.contact__card .btn {
  --btn-fg-hover: var(--text);
}
@media (prefers-reduced-motion: reduce) {
  .btn::before {
    transition: background-color 200ms ease;
  }
}

.btn--line {
  --btn-bg: transparent;
  --btn-fg: var(--ivory);
  box-shadow: inset 0 0 0 1px rgb(200 174 120 / 0.55);
  overflow: hidden;
  isolation: isolate;
}
.btn--line::before {
  background: rgb(200 174 120 / 0.14);
  box-shadow: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 420ms var(--ease-expo);
}
@media (hover: hover) and (pointer: fine) {
  .btn--line:hover {
    --btn-bg: transparent;
    box-shadow: inset 0 0 0 1px var(--gold);
  }
  .btn--line:hover::before {
    clip-path: inset(0 0 0 0);
  }
}
.light .btn--line {
  --btn-fg: var(--text);
  box-shadow: inset 0 0 0 1px rgb(110 85 38 / 0.5);
}
.light .btn--line::before {
  background: rgb(200 174 120 / 0.22);
}

.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 0.32em;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 200ms ease;
}
.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgb(200 174 120 / 0.7);
  transform-origin: 100% 50%;
}
.link svg {
  width: 15px;
  height: 15px;
  transition: transform 300ms var(--ease-expo);
}
@keyframes line-redraw {
  0% { transform: scaleX(1); transform-origin: 100% 50%; }
  45% { transform: scaleX(0); transform-origin: 100% 50%; }
  46% { transform: scaleX(0); transform-origin: 0% 50%; }
  100% { transform: scaleX(1); transform-origin: 0% 50%; }
}
@media (hover: hover) and (pointer: fine) {
  .link:hover::after {
    background: var(--gold);
    animation: line-redraw 760ms var(--ease-io);
  }
  .link:hover svg {
    transform: translate(2px, -2px);
  }
}
.light .link::after {
  background: rgb(110 85 38 / 0.55);
}
.light .link:hover::after {
  background: var(--gold-ink);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  color: var(--ivory);
  transition:
    background-color 360ms ease,
    box-shadow 360ms ease,
    transform 420ms var(--ease-expo);
}
.nav::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line-dark);
  opacity: 0;
  transition: opacity 360ms ease;
}
.nav.is-solid {
  background: rgb(7 19 14 / 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 18px 40px -28px rgb(0 0 0 / 0.8);
}
.nav.is-solid::after {
  opacity: 1;
}
.nav.is-hidden {
  transform: translateY(-100%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  max-width: none;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32em;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark em {
  font-style: italic;
  font-weight: 300;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.nav__links a {
  position: relative;
  padding: 8px 0;
  text-decoration: none;
  color: var(--ivory-2);
  transition: color 200ms ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 420ms var(--ease-expo);
}
.nav__links a[aria-current="true"],
.nav__links a:hover {
  color: var(--ivory);
}
.nav__links a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__tools {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  box-shadow: inset 0 0 0 1px var(--line-dark);
}
.lang button {
  position: relative;
  z-index: 1;
  min-width: 44px;
  height: 36px;
  color: var(--ivory-3);
  transition: color 240ms ease;
}
.lang button[aria-pressed="true"] {
  color: var(--ink);
}
.lang__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 36px;
  background: var(--gold);
  transition: transform 380ms var(--ease-expo);
}
.lang[data-lang="en"] .lang__thumb {
  transform: translateX(44px);
}

.nav__cta {
  --pr: 18px;
  --dot: 15px;
  min-height: 42px;
  padding: 0 var(--pr) 0 20px;
  font-size: 0.8125rem;
  box-shadow: none;
}

.menu-btn {
  display: none;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.menu-btn__bars {
  position: relative;
  width: 26px;
  height: 10px;
}
.menu-btn__bars::before,
.menu-btn__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 360ms var(--ease-expo);
}
.menu-btn__bars::before {
  top: 0;
}
.menu-btn__bars::after {
  bottom: 0;
  left: 8px;
}
.menu-btn[aria-expanded="true"] .menu-btn__bars::before {
  transform: translateY(4.25px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] .menu-btn__bars::after {
  left: 0;
  transform: translateY(-4.25px) rotate(-45deg);
}

/* mobile sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 32px) var(--pad) 32px;
  background:
    radial-gradient(120% 60% at 100% 0%, rgb(28 77 55 / 0.5), transparent 60%),
    var(--ink);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition:
    clip-path 620ms var(--ease-io),
    visibility 0s linear 620ms;
}
.sheet.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition:
    clip-path 620ms var(--ease-io),
    visibility 0s;
}
.sheet__links a {
  display: block;
  padding: 10px 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 11vw, 3.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-dark);
}
.sheet__foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* --------------------------------------------------------------------------
   Hero — the name is the obstacle
   -------------------------------------------------------------------------- */

.hero {
  --S: max(640px, 100svh);                 /* side of the square stage */
  --L: calc(100vw - var(--S));             /* stage left edge (right-anchored) */
  /* display size of the name: tied to the stage, capped so "Gerrit Nieberg"
     (~6.8em wide, right end at 0.785·S) never runs past the left page margin */
  --F: min(calc(var(--S) * 0.168), calc((100vw - var(--S) * 0.215 - var(--pad)) / 6.8));
  --Y: 0.798;                              /* cap line, as a share of the stage */
  position: relative;
  height: max(640px, 100svh);
  overflow: hidden;
  background:
    linear-gradient(to top, rgb(7 19 14 / 0.7), transparent 32%),
    radial-gradient(70% 80% at 6% 24%, rgb(29 77 54 / 0.32), transparent 70%),
    linear-gradient(90deg, #103325 0%, #0c271c 24%, #091b14 46%, #07130e 74%);
}

.hero__stage {
  position: absolute;
  top: 0;
  left: var(--L);
  width: var(--S);
  height: var(--S);
}

.hero__photo,
.hero__cut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.hero__photo {
  z-index: 1;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.3) 20%, rgb(0 0 0 / 0.8) 40%, #000 56%),
    linear-gradient(to top, transparent 9%, #000 36%, #000 94%, rgb(0 0 0 / 0.55) 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.3) 20%, rgb(0 0 0 / 0.8) 40%, #000 56%),
    linear-gradient(to top, transparent 9%, #000 36%, #000 94%, rgb(0 0 0 / 0.55) 100%);
  mask-composite: intersect;
}

.hero__cut {
  z-index: 4;
  pointer-events: none;
}

.hero__shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgb(12 39 28 / 0) 0%,
    rgb(12 39 28 / 0.5) 16%,
    rgb(12 39 28 / 0.32) 34%,
    rgb(12 39 28 / 0) 60%
  );
}

.hero__name {
  position: absolute;
  z-index: 3;
  right: calc(var(--S) * 0.215);
  top: calc(var(--S) * var(--Y) - var(--F) * 0.155);
  font-family: var(--serif);
  font-size: 0; /* the literal space stays in the a11y tree but takes no width */
  font-weight: 300;
  line-height: 1;
  white-space: nowrap;
  color: var(--ivory);
}
.hero__name > span {
  display: inline-block;
  font-size: var(--F);
  letter-spacing: -0.035em;
}
.hero__first {
  margin-right: 0.2em;
}
.hero__last {
  font-style: italic;
  font-weight: 300;
}

.hero__rail {
  position: absolute;
  z-index: 3;
  left: calc(var(--L) * -1 + var(--pad));
  right: 0;
  top: calc(var(--S) * var(--Y) + var(--F) * 0.715);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold) 12%, var(--gold) 70%, rgb(200 174 120 / 0.2));
  transform-origin: left;
}

.hero__intro {
  position: absolute;
  z-index: 5;
  top: clamp(116px, 18svh, 200px);
  left: var(--pad);
  width: min(27rem, calc(100vw - var(--S) * 0.72 - var(--pad) * 2));
}
.hero__claim {
  max-width: 12ch;
  margin-bottom: clamp(18px, 2vw, 26px);
  font-size: clamp(2rem, 2.9vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  color: var(--ivory);
}
.hero__lede {
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.55;
  color: var(--ivory);
  text-wrap: pretty;
}
.hero__lede strong {
  font-weight: 500;
  color: var(--gold-hi);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 36px;
}

.hero__credit {
  position: absolute;
  z-index: 5;
  right: var(--pad);
  bottom: 22px;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-2);
}

.hero__scroll {
  position: absolute;
  z-index: 5;
  left: var(--pad);
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-2);
  text-decoration: none;
}
.hero__scroll i {
  position: relative;
  display: block;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: rgb(200 174 120 / 0.25);
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  animation: drip 2.4s var(--ease-io) infinite;
}
@keyframes drip {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* --------------------------------------------------------------------------
   Profile
   -------------------------------------------------------------------------- */

.profile {
  padding-block: var(--section);
}
.profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.profile__figure {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}
.frame {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-light);
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame--offset::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgb(238 234 223 / 0.45);
}
.profile__figure .frame {
  aspect-ratio: 3 / 4;
}
.figcap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}
.light .figcap {
  color: var(--text-2);
}
.dark .figcap,
.forest .figcap {
  color: var(--ivory-3);
}

.profile__statement {
  font-size: clamp(2.75rem, 5.6vw, 6rem);
  color: var(--text);
}

.profile__body {
  margin-top: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  max-width: 44rem;
}
.profile__body .prose {
  font-size: 1.125rem;
  color: var(--text);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-light);
}
.facts div {
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--line-light);
}
.facts div:nth-child(odd) {
  padding-right: 24px;
}
.facts dt {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.facts dd {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.8vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* --------------------------------------------------------------------------
   Signet divider — a jump in miniature: fence, flight arc, landing, next line
   -------------------------------------------------------------------------- */

.sig {
  --fence: rgb(238 234 223 / 0.78);
  --sig-w: clamp(66px, 5.4vw, 86px);
  display: flex;
  align-items: flex-end;
  width: min(100%, 360px);
  margin-top: clamp(26px, 3vw, 44px);
  color: var(--gold);
}
.light .sig {
  --fence: var(--text);
  color: var(--gold-ink);
}
.sig__mark {
  flex: none;
  width: var(--sig-w);
  height: calc(var(--sig-w) * 30 / 66);
  overflow: visible;
}
.sig__ground,
.sig__arc {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  vector-effect: non-scaling-stroke;
}
.sig__arc {
  opacity: 0.55;
  stroke-dasharray: 0.035 0.03;
}
.sig__fence {
  fill: none;
  stroke: var(--fence);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.sig__fence path {
  vector-effect: non-scaling-stroke;
}
.sig__dot {
  fill: currentColor;
}
.sig__rail {
  flex: 1;
  height: 1px;
  margin-bottom: calc(var(--sig-w) * 6 / 66 - 0.5px);
  margin-left: calc(var(--sig-w) * -8 / 66); /* starts under the landing diamond */
  background: linear-gradient(to right, currentColor, rgb(200 174 120 / 0));
  transform-origin: left;
}
.light .sig__rail {
  background: linear-gradient(to right, currentColor 40%, rgb(110 85 38 / 0));
}

/* waiting state (only when the script will play it) */
.js.motion-ok .sig:not(.is-played) .sig__ground,
.js.motion-ok .sig:not(.is-played) .sig__arc {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.js.motion-ok .sig:not(.is-played) .sig__fence {
  transform: scaleY(0);
}
.js.motion-ok .sig:not(.is-played) .sig__dot {
  opacity: 0;
}
.js.motion-ok .sig:not(.is-played) .sig__rail {
  transform: scaleX(0);
}

.head__title {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Moments — feature cards
   -------------------------------------------------------------------------- */

.moments {
  padding-block: var(--section) calc(var(--section) * 0.9);
  overflow: hidden;
}
.moments__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 40px clamp(40px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 104px);
}
.moments__head .lead {
  color: var(--ivory-2);
}
.shutter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  font-family: var(--serif);
  color: var(--gold-hi);
  white-space: nowrap;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 44px);
  align-items: start;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgb(28 77 55 / 0.35), rgb(12 36 25 / 0.2));
  box-shadow: var(--shadow-dark), inset 0 1px 0 rgb(238 234 223 / 0.06), inset 0 0 0 1px rgb(200 174 120 / 0.12);
  transition: box-shadow 420ms var(--ease-out), transform 520ms var(--ease-expo);
}
.card:nth-child(2) {
  margin-top: clamp(40px, 9vw, 150px);
}
.card:nth-child(3) {
  margin-top: clamp(20px, 4.5vw, 72px);
}
.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1100ms var(--ease-expo), filter 600ms ease;
  filter: saturate(0.9);
}
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(7 19 14 / 0.55), transparent 42%);
  pointer-events: none;
}
.card__phase {
  position: absolute;
  z-index: 2;
  left: 22px;
  bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
}
.card__phase b {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--gold-hi);
}
.card__body {
  padding: 26px 26px 28px;
}
.card__body p {
  margin-top: 12px;
  color: var(--ivory-2);
  font-size: 1rem;
  line-height: 1.6;
}
.card__exif {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ivory-3);
  font-variant-numeric: tabular-nums;
}
.card__exif span:first-child {
  color: var(--gold);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow:
      0 2px 4px rgb(0 0 0 / 0.3),
      0 24px 40px -14px rgb(0 0 0 / 0.6),
      0 60px 100px -40px rgb(0 0 0 / 0.8),
      inset 0 1px 0 rgb(238 234 223 / 0.08),
      inset 0 0 0 1px rgb(200 174 120 / 0.3);
  }
  .card:hover .card__media img {
    transform: scale(1.045);
    filter: saturate(1);
  }
}
.moments__credit {
  margin-top: clamp(40px, 5vw, 64px);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ivory-3);
}

/* --------------------------------------------------------------------------
   Archive — wide image with focus detail
   -------------------------------------------------------------------------- */

.archive {
  padding-block: 0 clamp(80px, 10vw, 150px);
  background: var(--forest);
}
.archive__figure {
  position: relative;
}
.archive__media {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  box-shadow: var(--shadow-dark);
  background: #0d0d10;
}
.archive__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 6%;
  filter: saturate(0.8) contrast(1.04);
}
.archive__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgb(7 19 14 / 0.92) 4%, rgb(7 19 14 / 0.5) 30%, transparent 52%),
    linear-gradient(to right, rgb(7 19 14 / 0.4), transparent 34%);
}
.focus {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  left: var(--fx, 10%);
  top: var(--fy, 10%);
  width: var(--fw, 60%);
  height: var(--fh, 70%);
}
.focus i {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--gold);
  border-style: solid;
  border-width: 0;
  transform: translate(var(--cx, 0px), var(--cy, 0px));
  transition: transform 1200ms var(--ease-expo);
}
.archive.is-in .focus i {
  transform: none;
}
.focus i:nth-child(1) { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.focus i:nth-child(2) { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.focus i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.focus i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.archive__overlay {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 3vw, 44px);
  right: clamp(20px, 3vw, 44px);
  bottom: clamp(20px, 3vw, 40px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.archive__title {
  font-size: clamp(2.25rem, 4.6vw, 4.75rem);
  color: var(--ivory);
}
.archive__exif {
  display: grid;
  gap: 4px;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ivory-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.archive__exif b {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--gold-hi);
}
.archive__caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  margin-top: 22px;
  color: var(--ivory-2);
  font-size: 0.9375rem;
}
.archive__caption p {
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
   Time — typographic divider, timing sweep
   -------------------------------------------------------------------------- */

.time {
  padding-block: clamp(100px, 13vw, 190px) clamp(90px, 11vw, 160px);
  overflow: hidden;
}
.time__figure {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: clamp(28px, 6vw, 48px) clamp(16px, 2.2vw, 36px);
}
.time__value {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(7.5rem, 27vw, 30rem);
  line-height: 0.76;
  letter-spacing: -0.055em;
  margin-left: -0.05em;
  font-variant-numeric: lining-nums;
  color: var(--ivory);
}
.time__value .comma {
  color: var(--gold);
}
.time__unit {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.25rem, 4.3vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ivory);
}
.time__text {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(40px, 6vw, 96px);
  margin-top: clamp(48px, 6vw, 88px);
  align-items: start;
}
.time__text .lead {
  color: var(--ivory);
  max-width: 34ch;
}

/* timing scale */
.timing {
  position: relative;
  padding-top: 64px;
}
.timing__scale {
  position: relative;
  height: 40px;
}
.timing__ticks {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 12px;
  color: rgb(238 234 223 / 0.35);
}
.timing__axis {
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: rgb(238 234 223 / 0.3);
}
.timing__sweep {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: var(--p, 31.5%);
  background: var(--gold);
  transform-origin: left;
}
.timing__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ivory-3);
  font-variant-numeric: tabular-nums;
}
.timing__mark {
  position: absolute;
  bottom: 0;
  left: var(--x);
  display: grid;
  justify-items: start;
  gap: 4px;
  padding-left: 10px;
  padding-bottom: 18px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ivory-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.timing__mark::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 100%;
  background: rgb(238 234 223 / 0.45);
}
.timing__mark b {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--ivory);
}
.timing__mark--win {
  color: var(--gold-hi);
}
.timing__mark--win::before {
  background: var(--gold);
  width: 2px;
}
.timing__mark--win b {
  color: var(--gold-hi);
  font-size: 1.5rem;
}
.timing__mark--b {
  bottom: 52px;
}
.timing__mark--c {
  bottom: 0;
  justify-items: end;
  padding-left: 0;
  padding-right: 10px;
  transform: translateX(-100%);
}
.timing__mark--c::before {
  left: auto;
  right: 0;
}
.timing__mark--b::before {
  height: calc(100% + 52px);
  bottom: -52px;
}
.timing__note {
  margin-top: 26px;
  font-size: 0.8125rem;
  color: var(--ivory-3);
}

/* --------------------------------------------------------------------------
   Results — accordion
   -------------------------------------------------------------------------- */

.results {
  padding-block: var(--section) clamp(56px, 7vw, 96px);
}
.results__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 32px clamp(40px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.results__head .lead {
  color: var(--text-2);
}

.acc {
  border-top: 1px solid var(--text);
}
.acc__item > h3,
.acc__item > h4 {
  margin: 0;
  font: inherit;
}
.acc__item {
  position: relative;
}
.acc__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line-light);
  transform-origin: left;
  pointer-events: none;
}
.acc__trigger {
  display: grid;
  width: 100%;
  align-items: center;
  text-align: left;
  min-height: 96px;
  padding: 20px 0;
  transition: background-color 260ms ease;
}
.acc__trigger > :not(.acc__icon) {
  transition: transform 520ms var(--ease-expo);
}
.acc__icon {
  position: relative;
  width: 40px;
  height: 40px;
  justify-self: end;
  box-shadow: inset 0 0 0 1px var(--line-light);
  transition: background-color 260ms ease, box-shadow 260ms ease;
}
.acc__icon::before,
.acc__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  margin: -0.75px 0 0 -7px;
  background: currentColor;
  transition: transform 420ms var(--ease-expo);
}
.acc__icon::after {
  transform: rotate(90deg);
}
.acc__item.is-open .acc__icon {
  background: var(--text);
  color: var(--chalk);
  box-shadow: none;
}
.acc__item.is-open .acc__icon::after {
  transform: rotate(0deg);
}
@media (hover: hover) and (pointer: fine) {
  .acc__trigger:hover {
    background: linear-gradient(to right, rgb(200 174 120 / 0.14), rgb(200 174 120 / 0) 70%);
  }
  .acc__trigger:hover > :not(.acc__icon) {
    transform: translateX(14px);
  }
  .acc__trigger:hover .acc__icon {
    box-shadow: inset 0 0 0 1px var(--gold-ink);
  }
}
.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 520ms var(--ease-io);
}
.acc__item.is-open .acc__panel {
  grid-template-rows: 1fr;
}
.acc__inner {
  min-height: 0;
  overflow: hidden;
}
.acc__content {
  padding: 4px 0 34px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 300ms ease, transform 520ms var(--ease-expo);
}
.acc__item.is-open .acc__content {
  opacity: 1;
  transform: none;
  transition-delay: 120ms;
}
.no-js .acc__panel {
  grid-template-rows: 1fr;
}
.no-js .acc__content {
  opacity: 1;
  transform: none;
}

/* results row */
.results .acc__trigger {
  grid-template-columns: 7.5rem minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 1fr) 4rem 40px;
  gap: 24px;
}
.r-year {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: lining-nums;
}
.r-event {
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.35;
}
.r-class {
  color: var(--text-2);
  line-height: 1.35;
}
.r-horse {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.2;
}
.r-rank {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--gold-ink);
  text-align: right;
}
.r-rank small {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.results .acc__content {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 18rem);
  gap: 24px;
  padding-left: 0;
}
.results .acc__content p {
  grid-column: 2;
  max-width: 60ch;
  font-size: 1.0625rem;
  color: var(--text);
}
.results .acc__content .r-src {
  grid-column: 3;
  justify-self: end;
  align-self: start;
  font-size: 0.875rem;
}

/* places — two endless tickers, independent of scrolling */
.places {
  display: grid;
  padding-block: clamp(64px, 8vw, 120px) clamp(96px, 12vw, 180px);
  overflow: hidden;
}
.places__track {
  display: flex;
  width: max-content;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 13vw, 14rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: var(--text);
  animation: places-left 72s linear infinite;
  will-change: transform;
}
.places__track--b {
  margin-top: 0.1em; /* clears row one's descenders */
  animation-name: places-right;
  animation-duration: 58s;
}
.places.is-offscreen .places__track {
  animation-play-state: paused;
}
/* each half carries its own trailing gap, so -50% loops seamlessly */
.places__group {
  display: flex;
  gap: 0.35em;
  padding-right: 0.35em;
}
.places__group span {
  white-space: nowrap;
}
.places__track .it {
  font-style: italic;
  color: var(--forest-2);
}
.places__track i {
  font-style: normal;
  color: var(--gold-ink);
}
@keyframes places-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@keyframes places-right {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

/* --------------------------------------------------------------------------
   Partners
   -------------------------------------------------------------------------- */

.partners {
  padding-bottom: var(--section);
}
.partners__hero {
  position: relative;
  min-height: clamp(520px, 72svh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.partners__hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 30%;
  filter: saturate(0.85);
}
.partners__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--ink) 2%, rgb(7 19 14 / 0.25) 42%, transparent 70%),
    linear-gradient(to right, rgb(7 19 14 / 0.8), rgb(7 19 14 / 0.2) 52%, transparent 70%);
}
.partners__hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 28px;
  justify-items: start;
  padding-bottom: clamp(56px, 7vw, 96px);
}
.partners__hero .h2 {
  max-width: 9ch;
}
.partners__hero .sig {
  margin-top: 0;
}
.partners__hero .lead {
  max-width: 34ch;
  color: var(--ivory-2);
}

.marquee {
  position: relative;
  margin-top: clamp(8px, 2vw, 24px);
}
.marquee__viewport {
  overflow: hidden;
  padding-block: 28px 72px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee.is-static .marquee__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-mask-image: none;
  mask-image: none;
}
.marquee__track {
  display: flex;
  gap: 28px;
  width: max-content;
  padding-inline: var(--pad);
  will-change: transform;
}
.marquee__group {
  display: flex;
  gap: 28px;
}
.sponsor {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  width: clamp(250px, 23vw, 330px);
  height: clamp(270px, 24vw, 330px);
  padding: 26px;
  text-decoration: none;
  scroll-snap-align: start;
  background: linear-gradient(160deg, rgb(28 77 55 / 0.55), rgb(12 36 25 / 0.92) 60%);
  box-shadow: var(--shadow-dark), inset 0 1px 0 rgb(238 234 223 / 0.06), inset 0 0 0 1px rgb(200 174 120 / 0.16);
  transition: box-shadow 360ms var(--ease-out), transform 520ms var(--ease-expo), background-color 300ms ease;
}
.sponsor__logo {
  display: grid;
  place-items: center;
  margin: 2px 2px 22px;
  background: linear-gradient(180deg, rgb(7 19 14 / 0.35), rgb(7 19 14 / 0.1));
  box-shadow: inset 0 0 0 1px rgb(200 174 120 / 0.28);
}
.sponsor__logo {
  color: rgb(238 234 223 / 0.84);
  transition: color 300ms ease;
}
/* logos are optically balanced: wide wordmarks hit the width, stacked marks the height */
.sponsor__logo svg {
  width: 72%;
  height: 56%;
  overflow: visible;
}
@media (hover: hover) and (pointer: fine) {
  .sponsor:hover .sponsor__logo {
    color: var(--gold-hi);
  }
}
.sponsor__name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ivory);
}
.sponsor__url {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.sponsor__url svg {
  width: 16px;
  height: 16px;
  transition: transform 300ms var(--ease-expo);
}
.sponsor:focus-visible {
  outline-offset: -2px;
}
@media (hover: hover) and (pointer: fine) {
  .sponsor:hover {
    transform: translateY(-6px);
    box-shadow: 0 2px 4px rgb(0 0 0 / 0.3), 0 26px 50px -18px rgb(0 0 0 / 0.7), inset 0 1px 0 rgb(238 234 223 / 0.08), inset 0 0 0 1px rgb(200 174 120 / 0.45);
  }
  .sponsor:hover .sponsor__url svg {
    transform: translate(3px, -3px);
  }
}
.marquee__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.marquee__controls {
  display: flex;
  gap: 8px;
}
.ctrl {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px var(--line-dark);
  transition: box-shadow 220ms ease, background-color 220ms ease, transform 160ms var(--ease-out);
}
.ctrl svg {
  width: 18px;
  height: 18px;
}
.ctrl:active {
  transform: scale(0.95);
}
@media (hover: hover) and (pointer: fine) {
  .ctrl:hover {
    box-shadow: inset 0 0 0 1px var(--gold);
    background: rgb(200 174 120 / 0.08);
  }
}
.ctrl .i-play {
  display: none;
}
.marquee.is-paused .ctrl .i-play {
  display: block;
}
.marquee.is-paused .ctrl .i-pause {
  display: none;
}
.marquee__note {
  font-size: 0.8125rem;
  color: var(--ivory-3);
}
.partners__cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--line-dark);
}
.partners__cta p {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 26ch;
}
.partners__cta em {
  font-style: normal;
  color: var(--gold-hi);
}

/* --------------------------------------------------------------------------
   Contact & press
   -------------------------------------------------------------------------- */

.contact {
  padding-block: var(--section);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(56px, 8vw, 140px);
  align-items: start;
}
.contact__title {
  font-size: clamp(3rem, 7vw, 7.5rem);
}
.contact .lead {
  margin-top: 28px;
  color: var(--text-2);
}
.contact__card {
  margin-top: clamp(40px, 5vw, 64px);
  padding: clamp(28px, 3vw, 40px);
  background: var(--paper);
  box-shadow: var(--shadow-light), inset 0 0 0 1px rgb(12 36 25 / 0.06);
}
.contact__rows {
  display: grid;
  gap: 0;
}
.contact__rows div {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-light);
}
.contact__rows dt {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  padding-top: 3px;
}
.contact__rows dd {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.3;
}
.contact__rows dd.tbd {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-style: normal;
  color: var(--text-2);
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}
.contact__actions .btn {
  --btn-fg: var(--ink);
}
.contact__link {
  font-family: var(--serif);
  text-decoration: underline;
  text-decoration-color: rgb(110 85 38 / 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 200ms ease, color 200ms ease;
}
.contact__link:hover {
  color: var(--gold-ink);
  text-decoration-color: var(--gold-ink);
}
.press__download {
  margin-top: 24px;
}
.press .acc__content .press__meta {
  margin-top: 12px;
  font-size: 0.75rem;
  font-style: italic;
  letter-spacing: 0.03em;
  color: var(--moss);
}
.contact__hint {
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--text-2);
}
.press__title {
  margin-bottom: 28px;
}
.press .acc__trigger {
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 20px;
  min-height: 80px;
}
.press .acc__label {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.8vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.press .acc__label small {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.press .acc__content p,
.press .acc__content li {
  max-width: 58ch;
  font-size: 1rem;
  color: var(--text);
}
.press .acc__content li + li {
  margin-top: 10px;
}
.press .acc__content li {
  padding-left: 18px;
  position: relative;
}
.press .acc__content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 1px;
  background: var(--gold-ink);
}

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

.footer {
  padding-top: clamp(80px, 10vw, 140px);
  overflow: hidden;
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: clamp(56px, 7vw, 96px);
}
.footer__claim {
  font-family: var(--serif);
  font-size: clamp(1.625rem, 2.4vw, 2.25rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 18ch;
}
.footer__claim em {
  font-style: normal;
  color: var(--gold-hi);
}
.footer__col h2 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.footer__col li + li {
  margin-top: 10px;
}
.footer__col a {
  color: var(--ivory-2);
  text-decoration: none;
  transition: color 200ms ease;
}
.footer__col a:hover {
  color: var(--ivory);
}
.footer__name {
  display: block;
  font-family: var(--serif);
  /* fills the content column at any width: "Gerrit Nieberg" is ~6.5em plus the italic overhang */
  font-size: calc((min(100vw, var(--max)) - 2 * var(--pad)) / 6.75);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  margin: 0 auto -0.12em;
  text-indent: -0.04em;
  color: var(--ivory);
  user-select: none;
}
.footer__name em {
  font-style: italic;
}
.footer__name .line {
  position: relative;
  z-index: 2;
  padding-bottom: 0.3em;
  margin-bottom: -0.3em;
}
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.8125rem;
  color: var(--ivory-3);
}
.footer__bar a {
  color: inherit;
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ivory-2);
}
.to-top svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Motion — initial states only when JS runs and motion is welcome
   -------------------------------------------------------------------------- */

.js.motion-ok [data-reveal="rise"] .line > span,
.js.motion-ok [data-reveal="rise"] .wi {
  transform: translateY(115%) rotate(7deg);
  transform-origin: 0% 100%;
}
.js.motion-ok [data-reveal="rise"].is-in .line > span,
.js.motion-ok [data-reveal="rise"].is-in .wi {
  transform: none;
  transition: transform 1400ms var(--ease-expo);
  transition-delay: calc(var(--i, 0) * 130ms + var(--w, 0) * 45ms);
}

.js.motion-ok [data-reveal="fade"] {
  opacity: 0;
  transform: translateY(24px);
}
.js.motion-ok [data-reveal="fade"].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 900ms ease, transform 1100ms var(--ease-expo);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js.motion-ok [data-reveal="fade"].is-settled {
  transition:
    opacity 300ms ease,
    transform 520ms var(--ease-expo),
    box-shadow 420ms var(--ease-out);
  transition-delay: 0ms;
}

/* rows: list items rise one after another; accordion rules draw in */
.js.motion-ok [data-reveal="rows"] > * {
  opacity: 0;
  translate: 0 26px;
}
.js.motion-ok [data-reveal="rows"].is-in > * {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 700ms ease calc(var(--n, 0) * 95ms),
    translate 1100ms var(--ease-expo) calc(var(--n, 0) * 95ms);
}
.js.motion-ok [data-reveal="rows"]:not(.is-in) .acc__item::after {
  transform: scaleX(0);
}
.js.motion-ok [data-reveal="rows"].is-in .acc__item::after {
  transition: transform 1300ms var(--ease-io) calc(var(--n, 0) * 95ms + 120ms);
}

/* partner tiles fly in once, staggered, while the row already drifts */
.js.motion-ok .marquee:not(.is-in) .sponsor {
  opacity: 0;
  translate: 0 60px;
}
.js.motion-ok .marquee.is-in .sponsor {
  transition:
    opacity 800ms ease calc(var(--n, 0) * 90ms),
    translate 1200ms var(--ease-expo) calc(var(--n, 0) * 90ms),
    box-shadow 360ms var(--ease-out),
    transform 520ms var(--ease-expo);
}

/* images overscan their frames so they can drift (parallax) */
.js.motion-ok [data-parallax] {
  scale: 1.14;
}

.js.motion-ok [data-reveal="image"] {
  clip-path: inset(0 0 100% 0);
}
.js.motion-ok [data-reveal="image"] img {
  transform: scale(1.18);
}
.js.motion-ok [data-reveal="image"].is-in {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1300ms var(--ease-io);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.js.motion-ok [data-reveal="image"].is-in img {
  transform: scale(1.001);
  transition: transform 1800ms var(--ease-expo);
  transition-delay: calc(var(--d, 0) * 1ms);
}

/* hero intro sequence */
.js.motion-ok .hero:not(.is-in) .hero__photo,
.js.motion-ok .hero:not(.is-in) .hero__cut {
  opacity: 0;
  transform: scale(1.07);
}
.js.motion-ok .hero:not(.is-in) .hero__name > span {
  transform: translateY(0.4em);
  opacity: 0;
  filter: blur(8px);
}
.js.motion-ok .hero:not(.is-in) .hero__rail {
  transform: scaleX(0);
}
.js.motion-ok .hero:not(.is-in) [data-hero-fade] {
  opacity: 0;
  transform: translateY(16px);
}
.js.motion-ok body:not(.hero-done) .nav {
  opacity: 0;
}
/* photo and cutout must stay registered: same transform, same clock.
   The cutout turns opaque sooner, so the rising name never shows through it. */
.js.motion-ok .hero.is-in .hero__photo {
  transition: opacity 1400ms ease, transform 2200ms var(--ease-expo);
}
.js.motion-ok .hero.is-in .hero__cut {
  transition: opacity 650ms ease, transform 2200ms var(--ease-expo);
}
.js.motion-ok .hero.is-in .hero__name > span {
  transition:
    transform 1300ms var(--ease-expo),
    opacity 900ms ease,
    filter 900ms ease;
}
.js.motion-ok .hero.is-in .hero__first {
  transition-delay: 600ms;
}
.js.motion-ok .hero.is-in .hero__last {
  transition-delay: 700ms;
}
.js.motion-ok .hero.is-in .hero__rail {
  transition: transform 1400ms var(--ease-io) 700ms;
}
.js.motion-ok .hero.is-in [data-hero-fade] {
  transition: opacity 800ms ease, transform 1000ms var(--ease-expo);
  transition-delay: calc(900ms + var(--d, 0) * 1ms);
}
.js.motion-ok .nav {
  transition:
    opacity 800ms ease 900ms,
    background-color 360ms ease,
    box-shadow 360ms ease,
    transform 420ms var(--ease-expo);
}

/* timing sweep */
.js.motion-ok .time:not(.is-in) .timing__sweep {
  transform: scaleX(0);
}
.js.motion-ok .time.is-in .timing__sweep {
  transition: transform 1700ms var(--ease-io) 200ms;
}
.js.motion-ok .time:not(.is-in) .timing__mark {
  opacity: 0;
  transform: translateY(8px);
}
.js.motion-ok .time.is-in .timing__mark {
  transition: opacity 500ms ease, transform 700ms var(--ease-expo);
}
.js.motion-ok .time.is-in .timing__mark--win { transition-delay: 1700ms; }
.js.motion-ok .time.is-in .timing__mark--b { transition-delay: 2000ms; }
.js.motion-ok .time.is-in .timing__mark--c { transition-delay: 2200ms; }
.js.motion-ok .time:not(.is-in) .time__value {
  clip-path: inset(0 100% 0 0);
}
.js.motion-ok .time.is-in .time__value {
  clip-path: inset(-10% -5% -10% 0);
  transition: clip-path 1700ms var(--ease-io) 200ms;
}

/* language swap */
[data-i18n] {
  transition: opacity 180ms ease, filter 180ms ease;
}
.is-swapping [data-i18n] {
  opacity: 0;
  filter: blur(4px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .nav__links {
    gap: 22px;
  }
  .results .acc__trigger {
    grid-template-columns: 6rem minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 3rem 40px;
    gap: 18px;
  }
  .results .acc__content {
    grid-template-columns: 6rem minmax(0, 1fr) minmax(0, 14rem);
  }
}

@media (max-width: 980px) {
  .nav__links,
  .nav__tools .lang,
  .nav__cta {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
  }
  .profile__grid,
  .moments__head,
  .results__head,
  .contact__grid,
  .time__text {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile__figure {
    position: relative;
    top: 0;
    max-width: 520px;
  }
  .cards {
    grid-template-columns: repeat(3, minmax(78vw, 1fr));
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1);
    padding: 0 var(--pad) 40px;
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }
  .cards::-webkit-scrollbar {
    display: none;
  }
  .card {
    scroll-snap-align: start;
  }
  .card:nth-child(2),
  .card:nth-child(3) {
    margin-top: 0;
  }
  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer__claim {
    grid-column: 1 / -1;
  }
}

/* portrait screens: stacked hero */
@media (max-aspect-ratio: 1 / 1), (max-width: 760px) {
  .hero {
    --S: min(128vw, 74svh);
    --L: max(calc((100vw - var(--S)) / 2 + 7vw), calc(100vw - var(--S)));
    --F: calc(var(--S) * 0.2);
    --F1: calc(var(--S) * 0.115);
    --T: calc(var(--nav-h) + var(--F1) * 1.05);
    height: auto;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding-top: var(--T);
  }
  .hero__stage {
    position: relative;
    top: 0;
    flex: none;
  }
  .hero__photo {
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.45) 22%, #000 46%, #000 90%, transparent 100%),
      linear-gradient(to top, transparent 9%, #000 36%, #000 88%, transparent 100%);
    mask-image:
      linear-gradient(to right, transparent 0%, rgb(0 0 0 / 0.45) 22%, #000 46%, #000 90%, transparent 100%),
      linear-gradient(to top, transparent 9%, #000 36%, #000 88%, transparent 100%);
  }
  .hero {
    --Y: 0.796;
  }
  .hero__name {
    right: auto;
    left: calc(var(--pad) - var(--L) - var(--F) * 0.04);
  }
  /* "Gerrit" sits above the stage: baseline at -1.5% of the stage height */
  .hero__name > .hero__first {
    position: absolute;
    left: 0.02em;
    top: calc(var(--S) * (-0.015 - var(--Y)) - var(--F1) * 0.855 + var(--F) * 0.155);
    font-size: var(--F1);
    margin: 0;
  }
  .hero__rail {
    left: calc(var(--L) * -1 + var(--pad));
    right: calc(var(--L) * -1);
  }
  .hero__shade {
    background: linear-gradient(to right, rgb(12 39 28 / 0) 0%, rgb(12 39 28 / 0.45) 14%, rgb(12 39 28 / 0) 55%);
  }
  .hero__intro {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    margin-top: calc(var(--S) * 0.035);
    padding: 0 var(--pad) 88px;
  }
  .hero__lede {
    max-width: 34ch;
  }
  .hero__actions {
    margin-top: 28px;
  }
  .hero__credit {
    bottom: 28px;
  }
  .hero__scroll {
    bottom: 26px;
  }
}

@media (max-width: 760px) {
  :root {
    --nav-h: 64px;
  }
  .wordmark {
    font-size: 1.1875rem;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts div:nth-child(odd) {
    padding-right: 0;
  }
  .archive .wrap {
    padding-inline: 0;
  }
  .archive__media {
    aspect-ratio: 4 / 5;
    box-shadow: none;
  }
  .archive__media img {
    object-position: 34% 50%;
  }
  .archive__overlay {
    flex-direction: column;
    align-items: flex-start;
  }
  .archive__exif {
    text-align: left;
  }
  .archive__caption {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: var(--pad);
  }
  .timing__mark--b {
    bottom: 64px;
  }
  .timing__mark--b::before {
    height: calc(100% + 64px);
    bottom: -64px;
  }
  .timing__mark--c {
    bottom: 128px;
  }
  .timing__mark--c::before {
    height: calc(100% + 128px);
    bottom: -128px;
  }
  .timing {
    padding-top: 190px;
  }
  .partners__hero::after {
    background:
      linear-gradient(to top, var(--ink) 4%, rgb(7 19 14 / 0.72) 48%, rgb(7 19 14 / 0.12)),
      linear-gradient(to right, rgb(7 19 14 / 0.6), transparent 80%);
  }
  .results .acc__trigger {
    grid-template-columns: minmax(0, 1fr) auto 40px;
    grid-template-areas:
      "year rank icon"
      "event event event"
      "class class class"
      "horse horse horse";
    gap: 6px 16px;
    padding: 22px 0;
  }
  .r-year { grid-area: year; }
  .r-event { grid-area: event; margin-top: 10px; }
  .r-class { grid-area: class; }
  .r-horse { grid-area: horse; margin-top: 4px; }
  .r-rank { grid-area: rank; text-align: right; }
  .results .acc__icon { grid-area: icon; }
  .results .acc__content {
    grid-template-columns: minmax(0, 1fr);
  }
  .results .acc__content p,
  .results .acc__content .r-src {
    grid-column: 1;
    justify-self: start;
  }
  .partners__hero {
    min-height: 560px;
  }
  .partners__cta {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact__rows div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .footer__top {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer__bar {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: keep fades that aid comprehension, drop travel
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .card,
  .sponsor,
  .card__media img,
  .btn,
  .btn svg {
    transition-property: box-shadow, background-color, color, opacity !important;
  }
  .card:hover,
  .sponsor:hover {
    transform: none !important;
  }
  .places__track,
  .places__group {
    flex-wrap: wrap;
    width: auto;
    white-space: normal;
    animation: none;
    transform: none !important;
  }
  .places__track {
    padding-inline: var(--pad);
    font-size: clamp(2.75rem, 10.5vw, 10rem);
  }
  .places__group + .places__group {
    display: none;
  }
}
