:root {
  --bg: #dedad3;
  --surface: #d3cec6;
  --ink: #0a0a0a;
  --muted: #5c5852;
  --accent: #256f82;
  --accent-ink: #ffffff;

  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --text: "Public Sans", system-ui, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(3rem, 1.2rem + 6vw, 6.5rem);
  --step-display: clamp(96px, 16vw, 300px);

  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(120px, 14vw, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--text);
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: .88;
  margin: 0;
}

/* ---------- bar ---------- */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--m);
  font-size: var(--step-small); font-weight: 600;
  pointer-events: none;
}
.bar a { pointer-events: auto; text-decoration: none; color: var(--title, var(--ink)); transition: color .4s var(--ease); }
.bar nav { display: flex; gap: 24px; }
.bar nav a { position: relative; }
.bar nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.bar nav a:hover::after { transform: scaleX(1); }

/* ---------- hero ---------- */
.hero { position: relative; height: calc(100svh + (var(--steps) - 1) * 50svh); }
.pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  background: var(--ground, var(--bg));
  transition: background-color .6s var(--ease);
}
.name {
  position: absolute; z-index: 3; left: 0; right: 0; top: 96px;
  text-align: center;
  font-size: var(--step-display);
  color: var(--title, var(--ink));
  transition: color .6s var(--ease);
  white-space: nowrap;
}
.frames {
  position: absolute; z-index: 2;
  left: 50%; bottom: 0; transform: translateX(-50%);
  height: calc(100svh - 120px - var(--step-display) * .88); aspect-ratio: 2 / 3;
}
.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .5s var(--ease); }
.frame.is-on { opacity: 1; }
.now {
  position: absolute; z-index: 3; right: var(--m); bottom: 112px; margin: 0; max-width: 24ch; text-align: right;
  font-size: var(--step-small); color: var(--title, var(--ink)); transition: color .6s var(--ease);
}
.now b { display: block; font-size: var(--step-body); }
.lede {
  position: absolute; z-index: 3; left: var(--m); bottom: 32px; margin: 0;
  max-width: 26ch; font-weight: 600; font-size: var(--step-body);
  color: var(--title, var(--ink)); transition: color .6s var(--ease);
}
.btn {
  position: absolute; z-index: 3; right: var(--m); bottom: 32px;
  display: inline-block; padding: 16px 28px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s;
}
.btn:hover { background: #1d5867; transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

/* ---------- work ---------- */
.work { padding-top: var(--gap); }
.work-head, .work-sub { padding: 0 var(--m); }
.work-head { font-size: var(--step-head); max-width: 14ch; }
.work-sub { margin: 32px 0 72px; font-size: var(--step-lead); max-width: 40ch; }
.panel {
  position: relative;
  height: 100svh; overflow: hidden; background: #111;
}
.panel-media {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transform: scale(var(--zoom, 1.06)); transition: transform .2s linear;
}
.band {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: grid; grid-template-columns: 10% 1fr auto; align-items: center; gap: 24px;
  padding: 22px var(--m);
  background: rgba(10, 10, 10, .86); color: var(--bg);
}
.when { font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.what { display: grid; grid-template-columns: minmax(120px, 18%) 1fr; align-items: baseline; gap: 24px; }
.what h3 { font-size: var(--step-lead); }
.what p { margin: 0; max-width: 62ch; font-size: var(--step-body); }
.fact { font-size: var(--step-small); text-align: right; text-decoration: none; font-weight: 600; }
.fact:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- career ---------- */
.career { position: relative; z-index: 1; background: var(--bg); padding: var(--gap) var(--m) 0; }
.career h2 { font-size: var(--step-head); }
.years {
  display: grid; grid-template-columns: minmax(200px, 33%) 1fr; gap: 16px 32px; align-items: center;
  margin: 56px 0 72px; padding: 32px; background: var(--surface);
}
.years label { font-weight: 600; }
.years input { grid-column: 1; width: 100%; accent-color: var(--accent); height: 32px; cursor: pointer; }
.years output { grid-column: 2; grid-row: 1 / span 2; font-size: var(--step-lead); line-height: 1.35; }
.years output b { font-family: var(--display); margin-right: .3em; color: var(--accent); }
.lineup { width: 100%; border-collapse: collapse; font-size: var(--step-lead); }
.lineup td { padding: .25em 0; vertical-align: baseline; transition: color .3s var(--ease); }
.lineup td:nth-child(1) { width: 40%; }
.lineup td:nth-child(2) { width: 26%; }
.lineup td:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.lineup tr.dim td { color: #a39e96; }
.lineup tr.edu td { color: var(--muted); }
.lineup tr.edu.dim td { color: #a39e96; }

/* ---------- how ---------- */
.how {
  position: relative; z-index: 1; background: var(--bg);
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  padding: var(--gap) var(--m);
}
.how h2 { font-size: var(--step-head); }
.statement { font-size: var(--step-lead); line-height: 1.3; margin: 40px 0 24px; max-width: 26ch; font-weight: 600; }
.how .body { margin: 0 0 12px; max-width: 48ch; }
.stack { color: var(--muted); max-width: 48ch; margin: 0; }
.how-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; align-content: start; }
.how-list li { max-width: 52ch; }
.how-list b { display: block; font-size: var(--step-lead); margin-bottom: 6px; line-height: 1.3; }

/* ---------- contact ---------- */
.contact {
  position: relative; z-index: 1;
  min-height: 100svh; background: var(--ink); color: var(--bg);
  padding: 32px var(--m);
  display: grid; grid-template-rows: 1fr auto auto; gap: 40px;
}
.contact-line {
  font-family: var(--text); text-transform: none; font-weight: 600; letter-spacing: 0;
  font-size: var(--step-lead); line-height: 1.35; max-width: 30ch;
}
.mail {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: min(14.6vw, 300px); line-height: .85; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; margin-bottom: 4vh;
  transition: color .25s var(--ease);
}
.mail:hover { color: #6fb6c8; }
.contact .corner-l, .contact .corner-r { font-size: var(--step-small); }
.contact { grid-template-columns: 1fr 1fr; }
.contact-line, .mail { grid-column: 1 / -1; }
.corner-r { text-align: right; display: flex; gap: 24px; justify-content: flex-end; }

/* ---------- footer ---------- */
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: baseline;
  padding: 20svh var(--m) 30px; font-size: var(--step-small);
}
.foot .muted { color: var(--muted); }
.foot .r { text-align: right; }
.foot .links { display: flex; gap: 24px; }
.foot a { text-decoration: none; font-weight: 600; }
.foot a:hover { text-decoration: underline; }

/* ---------- motion ---------- */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js .rise.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .js .rise { opacity: 1; transform: none; }
  .panel-media { transform: none; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .bar nav { gap: 16px; }
  .bar .wordmark { font-size: 0; }
  .bar .wordmark::before { content: "AF"; font-size: var(--step-small); }
  .name { top: 56px; }
  :root { --step-display: 21vw; }
  .frames { top: calc(68px + 19vw); bottom: auto; height: calc(100svh - 68px - 19vw - 190px); }
  .now { display: none; }
  .lede { bottom: 84px; max-width: 30ch; }
  .btn { bottom: 16px; right: var(--m); padding: 14px 20px; }
  .what { grid-template-columns: 1fr; gap: 8px; }
  .band { top: auto; bottom: 20px; transform: none; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 18px var(--m); }
  .band .what { grid-column: 1 / -1; grid-row: 1; }
  .when, .fact { font-size: 13px; }
  .panel { height: 82svh; }
  .years { grid-template-columns: 1fr; padding: 20px; }
  .years output { grid-column: 1; grid-row: auto; }
  .lineup, .lineup tbody, .lineup tr { display: block; }
  .lineup tr { display: grid; grid-template-columns: 1fr auto; margin-bottom: 18px; }
  .lineup td { padding: 0; width: auto !important; }
  .lineup td:nth-child(1) { grid-column: 1 / -1; font-size: 22px; }
  .lineup td:nth-child(2), .lineup td:nth-child(3), .lineup td:nth-child(4) { font-size: 14px; color: var(--muted); }
  .lineup td:nth-child(2) { grid-column: 1; }
  .lineup td:nth-child(3) { display: none; }
  .lineup td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .how { grid-template-columns: 1fr; gap: 48px; }
  .contact { min-height: 86svh; grid-template-columns: 1fr; }
  .mail { font-size: 24vw; white-space: normal; }
  .corner-r { justify-content: flex-start; text-align: left; }
  .foot { grid-template-columns: 1fr; gap: 8px; padding-top: 20svh; padding-bottom: 88px; }
  .foot .r { text-align: left; }
}
