/* ============================================================
   Ballspoint — a typeface with a point
   (thisishuman.services/balls-in-your-corner)
   White ground · blue #302C4D heads/controls · red #DC353B stats
   & CTAs · orange #FF5602 donate.
   NOTE: fallback stacks deliberately omit "Helvetica" — the project
   avoids any reference to it in code, comments or copy. Nimbus Sans L
   also intentionally not used as fallback in the body stack; this
   page is set almost entirely in Ballspoint itself, by design.
   ============================================================ */

@font-face {
  font-family: 'Ballspoint';
  src: url('../fonts/ballspoint/Ballspoint-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ballspoint';
  src: url('../fonts/ballspoint/Ballspoint-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Ballspoint';
  src: url('../fonts/ballspoint/Ballspoint-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ballspoint';
  src: url('../fonts/ballspoint/Ballspoint-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Nimbus Sans L';
  src: url('../fonts/nimbus-sans-l/NimbusSanL-Reg.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nimbus Sans L';
  src: url('../fonts/nimbus-sans-l/NimbusSanL-Bol.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F5F5F5;
  --ink: #111111;
  --blue: #302C4D;
  --red: #DC353B;
  --orange: #FF5602;
  --white: #FFFFFF;
}

@view-transition { navigation: auto; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Ballspoint', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1338px;
  margin: 0 auto;
  padding: 0 51px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Scroll reveal: continuous blur-to-focus ----------
   This page's own transition character — see ballspoint-scroll.js.
   Blur amount is set directly per-frame from JS as an inline style,
   so no CSS transition here: a transition would fight the scroll
   handler's own per-frame updates and read as laggy. Deliberately
   just filter, no opacity change — a genuinely out-of-focus photo
   is still 100% visible, just not sharp. */
.blur-reveal { will-change: filter; }

@media (prefers-reduced-motion: reduce) {
  .blur-reveal { filter: none !important; }
}

/* ---------- Close ---------- */

.close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  color: var(--white);
  transition: color 400ms ease;
  z-index: 3;
}
.close svg { display: block; width: 100%; height: 100%; }
.close:hover { color: var(--red); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 56vw;
  max-height: 810px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 51px;
  overflow: hidden;
  /* Fallback in case the video is slow to load or unsupported —
     also what shows through if a browser can't play either source. */
  background: radial-gradient(120% 140% at 15% 20%, #1a5c66 0%, #0f3d52 35%, #16324a 60%, #0c0c0c 100%);
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: clamp(64px, 13.9vw, 200px);
  line-height: 1;
  color: var(--white);
  opacity: 0.95;
}

/* ---------- Specimen bar: wordmark + download, 267px per Figma ---------- */

.specimen-bar {
  background: var(--blue);
  color: var(--white);
  height: 267px;
  display: flex;
  align-items: flex-end;
}

.specimen-bar-inner {
  max-width: 1338px;
  width: 100%;
  margin: 0 auto;
  padding: 0 51px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.specimen-wordmark {
  font-weight: 700;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  white-space: nowrap;
}

/* ---------- Controls row: style + size, on the WHITE ground below
   the blue bar — not part of it, per Figma. ---------- */

.controls-row {
  background: var(--bg);
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--blue);
}

.controls-row-inner {
  max-width: 1338px;
  margin: 0 auto;
  padding: 0 51px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  color: var(--blue);
}

.control-style select {
  font-family: 'Ballspoint', Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 10px 14px;
  border: 2.5px solid var(--blue);
  border-radius: 0;
  background: var(--bg);
  color: var(--blue);
  cursor: pointer;
}

.control-size {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
  font-weight: 700;
  font-size: 20px;
}
.control-size .a-small { font-size: 14px; }
.control-size .a-large { font-size: 24px; }

.control-size input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  height: 2px;
  background: var(--blue);
  cursor: pointer;
}
.control-size input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  background: var(--blue);
  border-radius: 50%;
}
.control-size input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--blue);
  border: none;
  border-radius: 50%;
}

.size-readout {
  min-width: 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 318px;
  min-height: 66px;
  padding: 14px 32px;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  text-align: center;
  color: var(--white);
  background: var(--ink);
  transition: background 300ms ease;
}
.btn-red { background: var(--red); }
.btn-red:hover { background: var(--ink); }
.btn-orange { background: var(--orange); }
.btn-orange:hover { background: var(--ink); }
.btn-compact { min-width: 0; min-height: 0; padding: 12px 22px; font-size: 14px; white-space: nowrap; }
/* NHS-blue CTA, paired with the real NHS logo — per Figma (#015FB8),
   distinct from the page's own #302C4D accent used everywhere else. */
.btn-nhs { background: #015FB8; }
.btn-nhs:hover { background: var(--ink); }
.btn-wide { width: 100%; min-width: 0; }

.btn-row { margin-top: 28px; }
.btn-row.centered { text-align: center; margin-top: 40px; }

/* ---------- Specimen preview ---------- */

.specimen-preview-wrap {
  padding: 0 51px;
}

.specimen-preview {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 40px 0;
  cursor: text;
  border-bottom: 1px solid var(--ink);
}

.specimen-text {
  display: inline-block;
  white-space: nowrap;
  font-size: 56px;
  line-height: 1.15;
  color: var(--blue);
  outline: none;
  min-width: 100%;
}

.specimen-hint {
  padding: 16px 0 0;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-size: 13px;
  line-height: 18px;
  color: #666;
  max-width: 700px;
}

/* ---------- Section heads & body copy ---------- */

/* Headings share the exact same column (max-width 789, centred the
   same way) as the body paragraphs below them, so their left edges
   line up — per Figma, both sit at the same x/width. */
.section-head {
  font-weight: 700;
  font-size: clamp(32px, 3.9vw, 56px);
  line-height: 1.05;
  color: var(--blue);
  text-transform: uppercase;
  text-align: left;
  max-width: 789px;
  margin: 100px auto 0;
}

.wrap p {
  font-size: 20px;
  line-height: 1.5;
  max-width: 789px;
  margin: 40px auto 0;
}
.wrap p a {
  text-decoration: underline;
  color: var(--blue);
}
.wrap p a:hover { color: var(--red); }

/* ---------- Stats ---------- */

.stat-block {
  text-align: center;
  margin-top: 60px;
}
.stat-number {
  font-weight: 700;
  font-size: clamp(96px, 20vw, 240px);
  line-height: 1;
  color: var(--red);
  opacity: 0.95;
}
.stat-caption {
  margin-top: 8px;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
}

/* ---------- Pull quote ---------- */

.pull-quote {
  max-width: 789px;
  margin: 100px auto 0;
  font-weight: 700;
  font-size: 125px;
  line-height: 130px;
  color: var(--red);
  text-align: left;
}

/* ---------- Download / Donate — stacked column, per Figma ---------- */

.dl-donate-stack {
  max-width: 789px;
  margin: 40px auto 0;
}
.dl-donate-stack .dl-lede {
  max-width: 420px;
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 1.5;
}
.dl-donate-stack .btn-row {
  margin: 0 0 48px;
}

.donate-logo {
  display: block;
  width: fit-content;
  margin: 0 auto 32px;
}
.donate-logo img {
  display: block;
  max-width: 220px;
  height: auto;
}

.nhs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.nhs-logo img {
  display: block;
  height: 40px;
  width: auto;
}

/* ---------- Credit / next project / footer ---------- */

/* Credit line now lives inside the dark footer, near the top — see
   Figma (was a separate grey block above the footer before). Left
   aligned to the same left edge as the rest of the body copy —
   max-width:789 + margin:auto, no extra padding, per the alignment
   convention used for .section-head / .wrap p. */
.contact .credit {
  max-width: 789px;
  margin: 0 auto 48px;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
}

.next-project {
  margin-top: 100px;
  text-align: center;
}
.next-project .next-label {
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--blue);
}
.next-project a {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: clamp(28px, 4.8vw, 56px);
  text-transform: uppercase;
  color: var(--red);
  transition: color 400ms ease;
}
.next-project a:hover { color: var(--blue); }

.contact {
  margin-top: 100px;
  padding: 75px 0;
  text-align: center;
  background: var(--blue);
  color: var(--white);
}
.contact .contact-link { position: relative; display: inline-block; }
.contact .gif-frame {
  display: block;
  width: 288px;
  height: 288px;
  border: 30px solid var(--bg);
}
.contact .gif-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact .cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 442px;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-weight: 700;
  font-size: 60px;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--red);
  transition: color 400ms ease;
}
.contact .contact-link:hover .cta { color: var(--white); }
.footer-logo { display: block; margin: 60px auto 0; width: 260px; height: auto; }
.contact .credit-font {
  margin: 40px 20px 0;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.contact .credit-font a { text-decoration: underline; }
.contact .credit-font a:hover { color: var(--red); }

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  .wrap, .specimen-preview-wrap, .section-head, .pull-quote { padding-left: 20px; padding-right: 20px; }
  .contact .credit { padding-left: 20px; padding-right: 20px; }

  .close { top: 16px; right: 16px; width: 32px; height: 32px; }

  .hero { height: 70vw; padding: 0 20px; }

  .specimen-bar { height: auto; padding: 20px 0; }
  .specimen-bar-inner { padding: 0 20px; gap: 16px; }
  .controls-row-inner { padding: 0 20px; gap: 14px; }
  .control-size { flex-basis: 100%; }

  .specimen-text { font-size: 32px; }

  .section-head { margin-top: 64px; }
  .wrap p { margin-top: 28px; }

  .stat-block { margin-top: 44px; }
  .pull-quote { font-size: 40px; line-height: 44px; margin-top: 64px; }

  .dl-donate-stack .dl-lede { max-width: none; }
  .nhs-row { justify-content: flex-start; }

  .next-project { margin-top: 64px; }

  .contact { margin-top: 64px; padding: 60px 0; }
  .contact .gif-frame { width: 239px; height: 239px; }
  .contact .cta {
    position: static;
    transform: none;
    display: block;
    width: auto;
    margin-top: 14px;
    font-size: 20px;
  }
  .footer-logo { margin-top: 48px; width: 220px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .close, .btn, .next-project a, .contact .cta, .wrap p a {
    transition: none;
  }
  /* Hero video replaced by its poster frame — see ballspoint.js,
     which also pauses playback so it isn't just hidden but idle. */
  .hero-video { display: none; }
}

/* ---------- Cookie notice (shared pattern, page palette) ---------- */

@keyframes notice-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-notice {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 18px 51px;
  background: var(--ink);
  color: var(--white);
  animation: notice-in 400ms ease both;
}
.cookie-notice p {
  flex: 1 1 auto;
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
}
.cookie-actions { flex: 0 0 auto; display: flex; gap: 10px; }
.cookie-actions button {
  font-family: 'Nimbus Sans L', Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border: 2px solid var(--white);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}
.cookie-actions button:hover { background: var(--white); color: var(--ink); }
@media (max-width: 767px) {
  .cookie-notice { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-notice { animation: none; }
  .cookie-actions button { transition: none; }
}
