/* Hallmark · v2.0.0 · shared layer for board round two: reset, entrance, buttons, work cards, footer · every colour and face comes from the option's own :root tokens */
/* Hallmark · waive 26b · no disabled attribute or aria-disabled anywhere on these pages · every button picks a CV, opens a card or copies a link, and none is ever switched off */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: var(--space-5); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; font-synthesis: none; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 700); line-height: 1.02; letter-spacing: -0.03em; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--space-4); top: var(--space-3); z-index: 50; padding: var(--space-2) var(--space-4); background: var(--ink); color: var(--bg); transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
.wrap { max-width: 1360px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 56px); }

/* Nav */
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-height: 72px; }
.wordmark { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.nav ul { display: flex; align-items: center; gap: var(--space-6); font-size: 15px; font-weight: 500; }
.nav a:not(.wordmark) { position: relative; text-decoration: none; }
.nav a:not(.wordmark)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .22s var(--ease); }
@media (hover: hover) { .nav a:not(.wordmark):hover::after { transform: scaleX(1); transform-origin: left; } }

/* Buttons: the label rolls up on hover, the box steps 1px, a press sinks it */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 50px; padding: 0 var(--space-5); border: 2px solid var(--ink); border-radius: var(--radius-btn, 999px);
  background: transparent; color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 16px;
  text-decoration: none; white-space: nowrap; cursor: pointer; overflow: hidden;
  transition: transform .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: translateY(1px) scale(.985); transition-duration: .09s; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn[hidden] { display: none; }
.roll { display: grid; height: 1.3em; line-height: 1.3em; overflow: hidden; }
.roll > span { grid-area: 1 / 1; transition: transform .32s var(--ease); }
.roll > span:last-child { transform: translateY(105%); }
@media (hover: hover) { .btn:hover .roll > span:first-child { transform: translateY(-105%); } }
@media (hover: hover) { .btn:hover .roll > span:last-child { transform: none; } }

/* Hero entrance: words rise from masks, then the rest; pieces settle in order */
.fx-m { display: inline-block; overflow: clip; overflow-clip-margin: .14em; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.fx-w { display: inline-block; }
.js.fx:not(.fx-done) [data-enter] .fx-w { transform: translateY(108%); }
.js.fx:not(.fx-done) [data-enter] [data-rise] { opacity: 0; transform: translateY(12px); }
.js.fx:not(.fx-done) [data-enter] [data-pop] { opacity: 0; transform: var(--pop-from, translateY(18px) scale(.94)) rotate(var(--rot, 0deg)); }
.fx.fx-go:not(.fx-done) [data-enter] .fx-w { transform: none; transition: transform .72s cubic-bezier(.22, 1, .36, 1) calc(var(--k, 0) * 55ms); }
.fx.fx-go:not(.fx-done) [data-enter] [data-rise] { opacity: 1; transform: none; transition: opacity .52s var(--ease) calc(380ms + var(--r, 0) * 70ms), transform .52s cubic-bezier(.22, 1, .36, 1) calc(380ms + var(--r, 0) * 70ms); }
.fx.fx-go:not(.fx-done) [data-enter] [data-pop] { opacity: 1; transform: rotate(var(--rot, 0deg)); transition: opacity .5s var(--ease) calc(250ms + var(--pop, 0) * 70ms), transform .8s cubic-bezier(.22, 1, .36, 1) calc(250ms + var(--pop, 0) * 70ms); }

/* Work cards (each option restyles through its tokens) */
.work { padding-block: var(--space-10) var(--space-9); }
.work__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4) var(--space-7); margin-bottom: var(--space-7); }
.work__head h2 { font-size: clamp(40px, 4.6vw, 68px); max-width: 16ch; }
.work__head p { font-size: 19px; color: var(--muted); max-width: 34ch; }
.cards { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.cards > li { grid-column: span 4; }
.cards > li[hidden] { display: none; }
.cards > li:nth-child(1), .cards > li:nth-child(2) { grid-column: span 6; }
.cards > li:nth-child(n+3) { grid-column: span 3; }
.w-card { position: relative; display: grid; gap: var(--space-3); height: 100%; align-content: start; transition: transform .18s var(--ease); }
@media (hover: hover) { .w-card:has(.w-link):hover { transform: translateY(-2px); } }
.w-pic { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-card, 20px); background: var(--card); }
.cards > li:nth-child(n+3) .w-pic { aspect-ratio: 4 / 3.2; }
.w-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .6s var(--ease); }
@media (hover: hover) { .w-card:hover .w-pic img { transform: scale(1.035); } }
.w-pic--fig { display: grid; place-items: center; background: var(--fig-bg, var(--ink)); color: var(--fig-ink, var(--bg)); }
.w-pic--fig > span { font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(34px, 3.6vw, 64px); letter-spacing: -0.04em; text-align: center; padding: var(--space-4); line-height: 1; transition: transform .5s var(--ease); }
@media (hover: hover) { .w-card:hover .w-pic--fig > span { transform: scale(1.04); } }
.w-chip {
  position: absolute; left: var(--space-3); bottom: var(--space-3); padding: var(--space-1) var(--space-3); border-radius: 999px;
  background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600;
  transform: translateY(160%); transition: transform .28s var(--ease);
}
.w-card:focus-within .w-chip { transform: none; }
@media (hover: hover) { .w-card:hover .w-chip { transform: none; } }
.w-name { font-family: var(--font-display); font-size: 25px; letter-spacing: -0.02em; }
.cards > li:nth-child(n+3) .w-name { font-size: 21px; }
.w-fig { font-size: 16px; color: var(--muted); }
.w-fig b { color: var(--ink); font-weight: 700; }
.w-award { font-size: 14px; color: var(--muted); }
.w-link { font-weight: 600; font-size: 15px; justify-self: start; }
.w-link::after { content: ""; position: absolute; inset: 0; }
@media (hover: hover) { .w-link:hover { color: var(--accent-text, var(--ink)); } }

/* Footer */
.foot { padding-block: var(--space-9) var(--space-7); }
.foot__big { display: inline-block; font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: clamp(30px, 4.6vw, 72px); letter-spacing: -0.035em; line-height: 1.05; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat; transition: background-size .35s var(--ease); }
@media (hover: hover) { .foot__big:hover { background-size: 100% 3px; } }
.foot__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); font-size: 15px; }
.foot__row > div { grid-column: span 4; display: grid; gap: var(--space-2); align-content: start; }
.foot__row h2 { font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.foot__row a { text-decoration: none; }
@media (hover: hover) { .foot__row a:hover { text-decoration: underline; } }
.copy { margin-left: var(--space-2); min-height: 30px; padding: 0 var(--space-3); border: 1.5px solid var(--ink); border-radius: 999px; background: none; cursor: pointer; font-size: 13px; font-weight: 600; transition: transform .12s var(--ease); }
@media (hover: hover) { .copy:hover { transform: translateY(-1px); } }
.copy:active { transform: translateY(1px); }

/* Touch. No grey flash on a tap and no double-tap zoom wait: everything tappable answers the finger itself. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:not(.btn):active { opacity: .6; }
.w-card:has(.w-link:active) { transform: scale(.985); }
/* The card crossing the middle of the screen shows what a mouse would see by hovering (fx.js sets .is-near) */
.w-card.is-near .w-chip { transform: none; }
.w-card.is-near .w-pic > img { transform: scale(1.035); }
.w-card.is-near .w-pic--fig > span { transform: scale(1.04); }
.foot__big.is-near { background-size: 100% 3px; transition-duration: .7s; }
.btn.is-tap .roll > span:first-child { transform: translateY(-105%); }
.btn.is-tap .roll > span:last-child { transform: none; }
/* iPhones with a notch or home bar: keep content out from under them (the page sets viewport-fit=cover) */
.wrap { padding-inline: max(clamp(20px, 4vw, 56px), env(safe-area-inset-left), env(safe-area-inset-right)); }

@media (max-width: 1080px) {
  .cards > li:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 640px) {
  .cards > li:nth-child(n) { grid-column: 1 / -1; }
  .foot__row > div { grid-column: 1 / -1; }
  .nav li:not(:last-child) { display: none; }
  .foot__row a { display: inline-block; padding-block: var(--space-1); }
  .copy { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
