/* Ben Casey — programme cover, web edition.
   Tokens: paper #ffffff, ink #000000, kit yellow #eed42e, meta #5a5a5a, hairline #c8c8c8.
   Yellow means "reach Ben": the contact band and the actions on the back cover. Nothing else. */

@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-display: swap; src: url("/fonts/BigShouldersDisplay-Black.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("/fonts/BigShouldersDisplay-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/IBMPlexSans-Italic.woff2") format("woff2"); }

:root {
  --paper: #ffffff;
  --ink: #000000;
  --kit: #eed42e;
  --meta: #5a5a5a;
  --rule: #c8c8c8;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --text: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --safe-l: max(var(--gutter), env(safe-area-inset-left));
  --safe-r: max(var(--gutter), env(safe-area-inset-right));
  --measure: 62ch;
  --name: clamp(84px, 15.5vw, 236px);
  --hero-gap: clamp(28px, 3.5vw, 56px);
  --h2: clamp(30px, 3.6vw, 44px);
  --year: clamp(32px, 3.4vw, 44px);
  --body: 17px;
  --small: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--kit); outline-offset: 3px; }
.cover :focus-visible { outline-color: var(--paper); }

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--h2);
  line-height: 1;
  letter-spacing: 0.005em;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 22px;
}

/* Hero: photo bleeds off the top-left; the name runs across its edge on wide screens. */
.hero { display: grid; grid-template-columns: 1fr; }
.hero-photo { position: relative; overflow: hidden; }
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  aspect-ratio: 4 / 5;
  max-height: 68svh;
  animation: photo-in 900ms cubic-bezier(.2,.7,.2,1) both;
}
.hero-text { padding: 20px var(--safe-r) 26px var(--safe-l); }
.name {
  font-family: var(--display);
  font-weight: 900;
  font-size: var(--name);
  line-height: 0.82;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  margin-left: -0.02em;
}
.name span { display: block; animation: rise 700ms cubic-bezier(.2,.7,.2,1) both; }
.name span:nth-child(2) { animation-delay: 90ms; }
.strap {
  font-weight: 500;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.3;
  max-width: 30ch;
  margin-top: 22px;
  animation: rise 700ms 200ms cubic-bezier(.2,.7,.2,1) both;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(320px, 44%) 1fr; }
  .hero-photo img { aspect-ratio: 5 / 6; max-height: none; object-position: 50% 0; }
  .hero-text { padding: clamp(40px, 5vw, 72px) var(--safe-r) 40px var(--hero-gap); align-self: start; }
  .name { margin-left: calc(-1 * var(--hero-gap) - 0.28em); }
  .strap { margin-top: 26px; }
}

/* Contact band: the one yellow surface on the page. */
.band { background: var(--kit); }
.band ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  padding: 6px var(--safe-r) 6px var(--safe-l);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
}
.band li { display: flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.band a { text-decoration: none; }
.band a:active, .band a:hover { text-decoration: underline; }
@media (min-width: 900px) {
  .band ul { display: flex; flex-wrap: wrap; gap: 0 40px; padding: 4px var(--safe-r) 4px var(--safe-l); }
}

main { padding: 0 var(--safe-r) 0 var(--safe-l); }
section { padding-top: clamp(44px, 6vw, 80px); }
.profile p + p { margin-top: 1em; }
.profile-copy p { max-width: var(--measure); }

/* Profile facts panel: the player-profile box from a matchday programme. */
.facts { margin-top: 34px; border-top: 1.5px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--ink); }
@media (min-width: 900px) {
  .profile { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
  .profile h2 { grid-column: 1 / -1; }
  .facts { margin-top: 0; }
}

/* The pathway: forward chronology, years set as scoreboard numerals in the rail. */
.timeline > li { display: grid; grid-template-columns: 1fr; padding: 0 0 30px; }
.timeline > li + li { border-top: 1px solid var(--rule); padding-top: 26px; }
.when { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.year { font-family: var(--display); font-weight: 900; font-size: var(--year); line-height: 1; }
.span { color: var(--meta); font-weight: 500; font-size: var(--small); }
.what { max-width: var(--measure); }
.what h3 { font-size: 20px; font-weight: 600; line-height: 1.25; }
.role { color: var(--meta); font-weight: 500; margin-bottom: 10px; }
.what ul { margin-top: 12px; }
.what li { position: relative; padding-left: 20px; margin-top: 6px; }
.what li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; background: var(--ink); }
@media (min-width: 900px) {
  .timeline > li { grid-template-columns: 200px 1fr; padding-bottom: 36px; }
  .timeline > li + li { padding-top: 32px; }
  .when { flex-direction: column; align-items: flex-start; gap: 6px; margin: 0; padding-right: 24px; }
  .what { border-left: 1.5px solid var(--ink); padding-left: 28px; }
}

/* Education and qualifications. */
.credentials { display: grid; grid-template-columns: 1fr; gap: 44px; padding-bottom: clamp(56px, 8vw, 96px); }
.items li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.items strong { font-weight: 600; }
.items span { color: var(--meta); font-weight: 500; font-size: 15px; }
@media (min-width: 900px) { .credentials { grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 96px); } }

/* Back cover: ink ground, the actions in kit yellow. */
.cover {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(44px, 6vw, 80px) var(--safe-r) max(28px, env(safe-area-inset-bottom)) var(--safe-l);
}
.cover h2 { border-bottom-color: var(--paper); }
.actions { display: grid; grid-template-columns: 1fr; gap: 4px; max-width: 32ch; }
.actions a {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--kit);
  font-weight: 600;
  font-size: 19px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.actions a:hover, .actions a:active { text-decoration: underline; }
.small { color: rgba(255,255,255,.72); font-size: var(--small); margin-top: 40px; max-width: var(--measure); }
@media (min-width: 900px) {
  .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 40px; max-width: 64ch; }
}

@keyframes rise { from { opacity: 0; transform: translateY(0.25em); } to { opacity: 1; transform: none; } }
@keyframes photo-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero-photo img, .name span, .strap { animation: none; }
}
@media (hover: none) { a:hover { text-decoration: none; } .band a:hover, .actions a:hover { text-decoration: none; } }

@media print {
  .band, .cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero-photo img { max-height: 90mm; }
}
