/* Stanhope Learning: departure-timetable world. Two inks (black on yellow), white for sheets, red only for "live". */

@font-face { font-family: "Barlow"; src: url("/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --yellow: #ffd400;
  --yellow-deep: #f2c500;
  --ink: #111111;
  --ink-soft: #3d3300;      /* secondary text on yellow, tinted from the ground (≈ 8:1) */
  --ink-mute: #4a4a4a;      /* secondary text on white (≈ 8.9:1) */
  --sheet: #ffffff;
  --live: #d7261e;
  --rule: 2px solid var(--ink);
  --rule-thin: 1px solid var(--ink);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 12.5l5.5 5.5L20.5 6.5' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='square'/%3E%3C/svg%3E");
  --icon-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16' stroke='%23000' stroke-width='3.5'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9l7 7 7-7' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--ink) var(--yellow); }
body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font: 400 18px/1.5 var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--yellow); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sheet :focus-visible { outline-color: var(--ink); }
p { margin: 0 0 1em; max-width: 68ch; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 0.95; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(48px, 7.4vw, 92px); }
h2 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 24px; }
h3 { font-size: 26px; line-height: 1.05; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--yellow); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.not-for { margin: 32px 0 12px; }
.notify-consent { margin-top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- top rule ---- */
.top { border-bottom: 3px solid var(--ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.wordmark { font: 700 15px/1.3 var(--text); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.top nav { display: flex; gap: 24px; font-weight: 600; font-size: 16px; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
@media (max-width: 640px) { .top nav { display: none; } }
.clock { width: 34px; height: 34px; flex: none; }
.clock .hand-s { transform-origin: 50px 50px; }

/* ---- hero: the departures sheet ---- */
.hero { padding: clamp(24px, 4.5vw, 44px) 0 clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; gap: 56px; } }
.lede { font-size: clamp(19px, 2.1vw, 21px); line-height: 1.4; max-width: 44ch; margin: 16px 0 26px; color: var(--ink-soft); }
.lede strong { color: var(--ink); font-weight: 600; }

.board { border-top: 4px solid var(--ink); }
.board-head, .dep { display: grid; grid-template-columns: 76px minmax(0, 1fr) 92px; column-gap: 14px; }
@media (min-width: 560px) { .board-head, .dep { grid-template-columns: 96px minmax(0, 1fr) 120px; } }
.board-head { background: var(--ink); color: var(--yellow); font: 700 12px/1.35 var(--text); letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 14px; }
.board-head span:last-child { text-align: right; }
.deps { margin: 0; padding: 0; border: 0; }
.dep {
  position: relative; align-items: center; padding: 12px 14px; border-bottom: var(--rule);
  cursor: pointer; transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.dep input { position: absolute; opacity: 0; pointer-events: none; }
.dep:hover { background: var(--yellow-deep); }
.dep:has(input:checked) { background: var(--ink); color: var(--yellow); }
.dep:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: -6px; box-shadow: inset 0 0 0 6px var(--yellow); }
.dep-time { font: 800 clamp(32px, 6vw, 44px)/1 var(--display); }
.dep-time small { display: block; font: 600 12px/1.35 var(--text); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px; }
.dep-what { min-width: 0; }
.dep-what b { display: block; font: 700 clamp(22px, 3.6vw, 28px)/1.05 var(--display); }
.dep-what span { display: block; font-size: 15px; line-height: 1.3; margin-top: 2px; }
.dep-what .yours { font-weight: 600; }
.dep-seats { text-align: right; }
.dep-seats .n { font: 800 clamp(44px, 8vw, 64px)/0.9 var(--display); display: block; }
.dep-seats .l { font: 600 12px/1.35 var(--text); letter-spacing: 0.06em; text-transform: uppercase; }
.dep:has(input:checked) .dep-what span, .dep:has(input:checked) small, .dep:has(input:checked) .l { color: var(--yellow); }

/* seat glyph row: open / held / taken */
.seats { display: grid; grid-template-columns: repeat(5, 8px); gap: 3px; margin-top: 6px; justify-content: end; }
.seats .seat { width: 8px; height: 8px; border-width: 1.5px; }
@media (min-width: 560px) { .seats { display: flex; flex-wrap: wrap; gap: 4px; } .seats .seat { width: 12px; height: 12px; border-width: 2px; } }
.dep-what .wide { display: none; }
@media (min-width: 560px) { .dep-what .wide { display: block; } }
.seat { width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 3px 3px 1px 1px; }
.seat[data-state="held"] { background: linear-gradient(to top, currentColor 50%, transparent 50%); }
.seat[data-state="taken"] { background: currentColor; }

/* ---- the ticket (primary action) ---- */
.ticket {
  --notch: 13px;
  display: flex; align-items: stretch; justify-content: space-between; width: 100%;
  margin-top: 22px; background: var(--ink); color: var(--sheet); text-decoration: none; border: 0; cursor: pointer;
  font: inherit; text-align: left; border-radius: 6px; position: relative;
  -webkit-mask: radial-gradient(circle var(--notch) at left center, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at right center, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at left center, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at right center, transparent 98%, #000) right / 51% 100% no-repeat;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  box-shadow: 0 10px 24px -12px rgba(17, 17, 17, 0.6);
}
.ticket:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(17, 17, 17, 0.7); }
.ticket:active { transform: translateY(0); }
.ticket .t-main { padding: 18px 20px 18px 28px; }
.ticket .t-main b { display: block; font: 800 clamp(26px, 4.4vw, 34px)/1 var(--display); }
.ticket .t-main span { display: block; font-size: 14px; margin-top: 6px; color: #d9d9d9; }
.ticket .t-stub { padding: 18px 28px 18px 20px; border-left: 2px dashed rgba(255, 212, 0, 0.6); display: flex; align-items: center; }
.ticket .t-stub b { font: 800 clamp(34px, 6vw, 46px)/1 var(--display); color: var(--yellow); }
.ticket:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.under-ticket { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 15px; color: var(--ink-soft); }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px rgba(215, 38, 30, 0.18); }

/* ---- trainer plate ---- */
.plate { background: var(--sheet); border: var(--rule); }
.plate-photo { aspect-ratio: 1 / 1; background: #e9e4cf; display: grid; place-items: center; border-bottom: var(--rule); overflow: hidden; }
.plate-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.plate-photo .missing { font: 600 14px/1.4 var(--text); color: var(--ink-mute); text-align: center; padding: 16px; }
.plate-body { padding: 18px 20px 20px; }
.plate-body h2 { font-size: 32px; margin-bottom: 6px; }
.plate-body .role { font-weight: 600; margin-bottom: 12px; }
.plate-body ul { margin: 0 0 14px; padding: 0; list-style: none; }
.plate-body li { padding: 8px 0; border-top: var(--rule-thin); font-size: 16px; line-height: 1.4; }
.plate-body li strong { font-family: var(--display); font-size: 22px; font-weight: 800; }

/* ---- six facts ---- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: var(--rule); border-left: var(--rule); margin-top: 40px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.fact { border-right: var(--rule); border-bottom: var(--rule); padding: 14px 14px 16px; }
.fact dt { font: 700 12px/1.35 var(--text); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.fact dd { margin: 6px 0 0; font: 800 24px/1.05 var(--display); }
.fact dd small { display: block; font: 400 14px/1.3 var(--text); margin-top: 4px; }

/* ---- sheets (white sections) ---- */
.sheet { background: var(--sheet); border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.sec { padding-block: clamp(56px, 9vw, 104px); }
.sec-intro { max-width: 60ch; margin-bottom: 36px; font-size: 19px; }

/* ---- route: the eight stops ---- */
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route::before { content: ""; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 6px; background: var(--ink); transform-origin: top; }
.js .route.draw::before { transform: scaleY(0); }
.js .route.drawn::before { transform: scaleY(1); transition: transform 1.6s var(--ease-out); }
.stop { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 18px; padding: 0 0 30px; }
.stop:last-child { padding-bottom: 0; }
.stop .dot { width: 36px; height: 36px; border-radius: 50%; border: 6px solid var(--ink); background: var(--sheet); display: grid; place-items: center; font: 800 15px/1 var(--display); position: relative; z-index: 1; }
.stop.terminus .dot { background: var(--ink); color: var(--yellow); }
.stop-body { padding-top: 2px; }
.stop-when { display: block; font: 600 15px/1.35 var(--text); color: var(--ink-mute); margin-bottom: 6px; }
.stop-body h3 { margin: 2px 0 4px; }
.stop-body p { margin: 0; font-size: 17px; }
.stop-body .ex { display: block; margin-top: 8px; font-size: 16px; }
.stop-body .ex b { font-weight: 700; }
@media (min-width: 900px) {
  .route-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; }
  .route-grid .sticky { position: sticky; top: 32px; align-self: start; }
}

/* ---- a session, minute by minute ---- */
.service { width: 100%; border-collapse: collapse; margin-top: 8px; }
.service th, .service td { text-align: left; padding: 12px 12px 12px 0; border-bottom: var(--rule-thin); vertical-align: top; }
.service th { width: 84px; font: 800 26px/1 var(--display); }
.service td b { display: block; font-weight: 700; }
.service tr:first-child th, .service tr:first-child td { border-top: var(--rule); }

/* ---- included / for whom ---- */
.cols { display: grid; gap: 40px; }
@media (min-width: 860px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; } }
.list { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.list li { padding: 14px 0 14px 34px; border-bottom: var(--rule-thin); position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 20px; height: 20px; background: var(--ink); -webkit-mask: var(--icon-check) center / contain no-repeat; mask: var(--icon-check) center / contain no-repeat; }
.list.no li::before { -webkit-mask-image: var(--icon-dash); mask-image: var(--icon-dash); }
.list li b { font-weight: 700; }

/* ---- fine print / refunds ---- */
.terms-strip { display: grid; gap: 0; border-top: var(--rule); }
@media (min-width: 860px) { .terms-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.terms-strip > div { padding: 20px 20px 20px 0; border-bottom: var(--rule); }
@media (min-width: 860px) { .terms-strip > div { border-bottom: 0; border-right: var(--rule); padding: 20px 24px; } .terms-strip > div:first-child { padding-left: 0; } .terms-strip > div:last-child { border-right: 0; } }
.terms-strip h3 { margin-bottom: 8px; }
.terms-strip p { font-size: 17px; margin: 0; }

/* ---- FAQ ---- */
.faq details { border-bottom: var(--rule-thin); }
.faq details:first-child { border-top: var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 700 22px/1.2 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 2px; top: 20px; width: 22px; height: 22px; background: var(--ink); -webkit-mask: var(--icon-chevron) center / contain no-repeat; mask: var(--icon-chevron) center / contain no-repeat; transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { padding-bottom: 8px; }

/* ---- close ---- */
.close { padding: clamp(56px, 9vw, 104px) 0; }
.close-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .close-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; } }
.notify { border-top: var(--rule); padding-top: 18px; }
.notify p { font-size: 16px; color: var(--ink-soft); }
.notify-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- forms ---- */
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 20px; }
input[type="text"], input[type="email"], select {
  width: 100%; font: 400 18px/1.3 var(--text); color: var(--ink); background: var(--sheet);
  border: var(--rule); border-radius: 4px; padding: 12px 14px; min-height: 52px; caret-color: var(--live);
}
.notify-row input { flex: 1 1 220px; width: auto; }
input::placeholder { color: #6b6b6b; }
input:focus-visible, select:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--live); }
.check { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; font-weight: 400; font-size: 16px; margin-bottom: 14px; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px;
  background: var(--ink); color: var(--yellow); font: 700 18px/1 var(--text); border: 0; border-radius: 4px; cursor: pointer; text-decoration: none;
  transition: transform 0.2s var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.msg { padding: 14px 16px; border: var(--rule); border-radius: 4px; margin: 16px 0; background: var(--sheet); }
.msg.error { border-color: var(--live); }
.msg[hidden] { display: none; }
.hint { font-size: 15px; color: var(--ink-mute); margin-top: 6px; }
.on-yellow .hint { color: var(--ink-soft); }

/* ---- mobile dock: the ticket stays in reach once the hero ticket scrolls away ---- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  background: var(--ink); color: var(--sheet); text-decoration: none; border-radius: 6px; padding: 14px 18px;
  font: 800 24px/1 var(--display); box-shadow: 0 12px 28px -10px rgba(17, 17, 17, 0.65);
  transform: translateY(0); transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}
.dock b { color: var(--yellow); font-size: 28px; }
.dock.away { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (min-width: 760px) { .dock { display: none; } }
@media (max-width: 759px) { .foot { padding-bottom: 100px; } }

/* ---- footer ---- */
.foot { background: var(--ink); color: #e6e6e6; padding: 40px 0 48px; font-size: 15px; }
.foot a { color: var(--yellow); }
.foot .wrap { display: grid; gap: 14px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot p { margin: 0; max-width: none; }

/* ---- inner pages ---- */
.page { padding: clamp(32px, 6vw, 64px) 0 clamp(56px, 8vw, 96px); }
.page h1 { font-size: clamp(44px, 7vw, 80px); margin-bottom: 18px; }
.doc { background: var(--sheet); border: var(--rule); padding: clamp(20px, 4vw, 44px); max-width: 860px; }
.doc h2 { font-size: 32px; margin: 36px 0 12px; }
.doc h2:first-child { margin-top: 0; }
.doc ul, .doc ol { padding-left: 22px; max-width: 68ch; }
.doc li { margin-bottom: 8px; }
.form-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .form-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.choose { border: 0; margin: 0 0 20px; padding: 0; }
.choose legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.pay { margin: 0; padding: 0; list-style: none; border-top: var(--rule); }
.pay li { padding: 14px 0; border-bottom: var(--rule-thin); }
.code { font: 800 34px/1 var(--display); letter-spacing: 0.04em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .route.draw::before { transform: none; }
  html { scroll-behavior: auto; }
}
