/* bellpush.co.uk. One stylesheet for the marketing pages and the timetable pages.
   Layout: a single phone-first column; the hero and the boards are lit dot-matrix signs (always dark),
   everything else sits on paper in light mode and on the display black in dark mode. */

/* Barlow is the brand face. It is used when installed; drop barlow-500.woff2 and barlow-800.woff2
   into /assets/fonts/ and add url() sources below to serve it. Until then the system face stands in. */
@font-face { font-family: "Bellpush Display"; font-weight: 800; src: local("Barlow ExtraBold"), local("Barlow-ExtraBold"); font-display: swap; }
@font-face { font-family: "Bellpush Text"; font-weight: 500; src: local("Barlow Medium"), local("Barlow-Medium"); font-display: swap; }

:root {
  /* Brand (brand/colours/bellpush-colours.css) */
  --panel: #0E0F12;
  --unlit: #2A2519;
  --amber: #FFB21A;
  --red: #FF3B30;
  --ink: #16181D;
  --paper: #F4F4F1;
  /* Theme */
  --bg: var(--paper);
  --surface: #FFFFFF;
  --fg: var(--ink);
  --muted: #55575E;
  --line: #D8D6CE;
  --link: #7A4E00;
  --chip: #ECEAE3;
  --live: #1C7C3A;
  --late: #B3261E;
  /* Type */
  --display: "Bellpush Display", "Barlow", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --text: "Bellpush Text", "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 6vw, 2.8rem);
  --step-4: clamp(2.5rem, 9vw, 4.6rem);
  --radius: 14px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--panel);
    --surface: #17191E;
    --fg: var(--paper);
    --muted: #A6A59E;
    --line: #2C2E34;
    --link: var(--amber);
    --chip: #22242A;
    --live: #5BD27F;
    --late: #FF7A70;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 500 var(--step-0)/1.55 var(--text); }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); line-height: 1.2; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--amber); color: var(--ink); padding: 8px 14px; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }
.eyebrow { font: 700 0.8rem/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 38ch; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.top { background: var(--panel); color: var(--paper); border-bottom: 1px solid #000; padding-top: env(safe-area-inset-top, 0px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px 6px; }
.brand img { display: block; height: 30px; width: auto; }
.top-cta { color: var(--ink); background: var(--amber); font-weight: 700; text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 0.95rem; white-space: nowrap; }
.top-cta:hover { background: #FFC54D; }
.nav { display: flex; gap: 4px 18px; overflow-x: auto; padding-block: 4px 10px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: #C9C8C1; text-decoration: none; font-size: 0.95rem; white-space: nowrap; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--paper); }
.nav a[aria-current="page"] { color: var(--amber); border-bottom-color: var(--amber); }

/* The lit sign: the hero and any other dark band */
.sign {
  background-color: var(--panel);
  background-image: radial-gradient(circle, var(--unlit) 1.6px, transparent 1.9px);
  background-size: 10px 10px;
  color: var(--paper);
}
.hero { padding-block: 40px 48px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero h1 { font-size: var(--step-4); color: var(--amber); text-shadow: 0 0 22px rgba(255, 178, 26, 0.28); }
.hero h1 .bell { display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0.1em #5a1410, 0 0 18px rgba(255, 59, 48, 0.55); vertical-align: 0.02em; margin-left: 0.12em; }
.hero .lede { color: #D6D5CE; margin-top: 16px; }
.hero-text { display: grid; gap: 0; min-width: 0; }
.promise { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.promise li { border: 1px solid #3A3528; color: var(--paper); background: rgba(14, 15, 18, 0.7); padding: 4px 12px; border-radius: 999px; font-size: 0.9rem; }
.page-head { padding-block: 34px 30px; }
.page-head h1 { color: var(--amber); }
.page-head .lede { color: #D6D5CE; margin-top: 12px; }
.crumbs { font-size: 0.9rem; margin-bottom: 12px; color: #A6A59E; }
.crumbs a { color: #D6D5CE; }

/* Store badges (official artwork) and the web app button, all 48px tall */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.badge { display: block; border-radius: 9px; line-height: 0; }
.badge img { display: block; height: 48px; width: auto; }
.store-web { display: grid; align-content: center; height: 48px; box-sizing: border-box; text-decoration: none; color: var(--paper); background: transparent; border: 1px solid #A6A6A6; border-radius: 9px; padding: 0 16px; line-height: 1.1; }
.store-web:hover { border-color: var(--amber); }
.store-small { font-size: 0.7rem; color: #C9C8C1; }
.store-big { font: 800 1.05rem/1.15 var(--display); }
.stores-light .store-web { color: var(--fg); border-color: var(--muted); }
.stores-light .store-web .store-small { color: var(--muted); }

/* Phone screenshots */
.phone { margin: 0; justify-self: center; width: min(300px, 78vw); }
.phone img { display: block; width: 100%; height: auto; border-radius: 40px; border: 10px solid #0B0C0E; background: #0B0C0E; box-shadow: 0 0 0 1.5px #3B3D42, 0 30px 60px -18px rgba(0, 0, 0, 0.45); }
.phone figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 12px; }
.sign .phone figcaption { color: #A6A59E; }
.phones { display: flex; gap: 18px; justify-content: center; }
.phones .phone { width: min(240px, 44vw); }
.phones .phone:nth-child(2) { transform: translateY(28px); }

/* Departure board (dot-matrix style, real figures) */
.board { background: var(--panel); color: var(--amber); border-radius: var(--radius); padding: 14px 16px; font: 700 0.95rem/1.3 var(--mono); border: 1px solid #000; box-shadow: inset 0 0 0 1px #24211a; overflow-x: auto; }
.board table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th { text-align: left; color: #8C7A4E; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; padding: 0 8px 6px 0; }
.board td { padding: 5px 8px 5px 0; white-space: nowrap; text-shadow: 0 0 8px rgba(255, 178, 26, 0.35); }
.board td.dest { white-space: normal; width: 100%; }
.board .late { color: #FF7A70; text-shadow: 0 0 8px rgba(255, 59, 48, 0.35); }
.board .ok { color: #7FE39C; text-shadow: none; }
.board caption { caption-side: bottom; text-align: left; color: #8C7A4E; font: 500 0.78rem/1.4 var(--text); padding-top: 8px; }

/* Sections */
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 46rem; }
.split { display: grid; gap: 32px; align-items: center; }
.split-text { display: grid; gap: 14px; min-width: 0; }
.split-text ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; align-content: start; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.tag { display: inline-block; font: 700 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: var(--amber); padding: 5px 8px; border-radius: 5px; justify-self: start; }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--amber); border-radius: 8px; padding: 18px 20px; display: grid; gap: 8px; }
.cta-band { padding-block: 48px; }
.cta-band h2 { color: var(--amber); }
.cta-band p { color: #D6D5CE; margin-top: 10px; max-width: 40rem; }

/* Long text (help, privacy, terms) */
.prose { max-width: 70ch; padding-block: 36px 56px; }
.prose h1 { margin-bottom: 6px; }
.prose h2 { font-size: var(--step-1); margin: 32px 0 8px; }
.prose h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.prose p, .prose ul, .prose ol, .prose table { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose .updated { color: var(--muted); font-size: 0.95rem; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }

/* Timetable pages */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin: 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font: 800 1.35rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.line-badge { display: inline-grid; place-items: center; min-width: 2.2em; padding: 0.1em 0.35em; border-radius: 8px; font: 800 1em/1.1 var(--display); background: var(--amber); color: var(--ink); margin-right: 0.3em; }
.live-link { display: inline-flex; align-items: center; gap: 10px; background: var(--amber); color: var(--ink); text-decoration: none; font-weight: 800; padding: 12px 20px; border-radius: 999px; justify-self: start; }
.live-link::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.25); }
.live-link:hover { background: #FFC54D; }
.stops { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.stops li { position: relative; padding: 6px 0 6px 30px; border-left: 3px solid var(--amber); margin-left: 8px; }
.stops li::before { content: ""; position: absolute; left: -9px; top: 13px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 3px solid var(--amber); }
.stops li .when { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.data { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.data th, .data td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data tr:last-child td { border-bottom: 0; }
.data th { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.link-list { columns: 15rem auto; column-gap: 28px; padding: 0; margin: 0; list-style: none; }
.link-list li { break-inside: avoid; padding: 4px 0; }
.yes { color: var(--live); font-weight: 700; }
.no { color: var(--muted); }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 36px; }

/* Footer */
.foot { background: var(--panel); color: #C9C8C1; padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); margin-top: 0; font-size: 0.95rem; }
.foot a { color: var(--paper); }
.foot-grid { display: grid; gap: 24px; }
.foot-about { display: flex; gap: 14px; align-items: flex-start; max-width: 34rem; }
.foot-about img { flex: none; border-radius: 9px; }
.foot-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 6px 20px; }
.foot-contact a { color: var(--amber); }

@media (min-width: 760px) {
  .hero { padding-block: 64px 72px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .split.flip > :first-child { order: 2; }
  .section { padding-block: 80px; }
  .foot-grid { grid-template-columns: 1fr 1.4fr; }
  .foot-contact { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .bell { animation: ding 3.2s ease-in-out 0.8s 2; }
  @keyframes ding { 0%, 88%, 100% { filter: none; } 92% { filter: brightness(1.6); transform: scale(0.9); } }
}
.sign .eyebrow { color: #A6A59E; }
.shot { margin: 0; min-width: 0; }
.shot img { display: block; border-radius: 12px; border: 1px solid #000; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3); }
.shot figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h1-sub { display: block; font-size: 0.55em; color: var(--paper); margin-top: 8px; }
.page-head .line-badge { font-size: 0.9em; vertical-align: 0.05em; }
.link-list .line-badge { font-size: 0.95rem; min-width: 2.6em; }
.link-list a { text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.hero-text .eyebrow { margin-bottom: 12px; }
.page-head .eyebrow { margin-bottom: 10px; }

/* Timetable search and filters */
.search-panel { gap: 16px; }
.search { display: flex; gap: 8px; max-width: 40rem; }
.search input { flex: 1; min-width: 0; font: 500 1.05rem/1.3 var(--text); color: var(--fg); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.search input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 178, 26, 0.3); }
.search button { font: 800 1rem/1 var(--display); color: var(--ink); background: var(--amber); border: 0; border-radius: 12px; padding: 0 18px; cursor: pointer; }
.search button:hover { background: #FFC54D; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--fg); background: var(--chip); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 0.92rem; }
.chips a:hover { border-color: var(--amber); }
.chips a[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips a .num { color: var(--muted); font-size: 0.82rem; }
.chips a[aria-current="true"] .num { color: #C9C8C1; }
.regions { display: grid; gap: 24px 32px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.region h3 { font-size: 1.05rem; margin-bottom: 6px; }
.region ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.results li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.results li a { font-weight: 700; text-decoration: none; }
.results li a:hover { text-decoration: underline; }
.results li .muted { font-size: 0.9rem; }
@media (prefers-color-scheme: dark) {
  .chips a[aria-current="true"] { background: var(--amber); color: var(--ink); border-color: var(--amber); }
  .chips a[aria-current="true"] .num { color: #4a3a12; }
}
