/* =====================================================================
   Travel By Taxi holding page. One stylesheet, no frameworks.
   LEARN: Every angle on the page is a CSS clip-path polygon or a skew:
   LEARN: no images, so it loads instantly and stays sharp on any screen.
   ===================================================================== */

/* LEARN: Self-hosted fonts (both under the SIL Open Font Licence; the licence files sit beside them). */
@font-face { font-family: "Chakra Petch"; src: url(fonts/chakrapetch-medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(fonts/chakrapetch-semibold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url(fonts/chakrapetch-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Selawik"; src: url(fonts/selawik-vf.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }

/* LEARN: The palette. Cyan is the Travel By Taxi brand colour; black text on it is 13:1, white on night is 18:1. */
:root {
  --night: #050d13; --deep: #0b1b25; --line: #2b4d60;
  --cyan: #00e4f0; --text: #eaf6f8; --muted: #a9bfca;
  --display: "Chakra Petch", "Segoe UI", sans-serif;
  --body: "Selawik", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .85, .15, 1);
}
* { box-sizing: border-box; }
html { background: var(--night); overflow-x: clip; }
body { margin: 0; overflow-x: clip; color: var(--text); font: 18px/1.55 var(--body); background: var(--night);
  /* LEARN: a faint dot grid, the neo look's signature background */
  background-image: radial-gradient(#132a37 1px, transparent 1.2px); background-size: 22px 22px; }
a { color: var(--cyan); }
a:hover { color: #fff; }
/* LEARN: A clear focus ring for keyboard users, in cyan so it shows on every background. */
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: #fff; color: #000; padding: 10px 14px; }

/* ---- Buttons: chamfered corners ---- */
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; background: var(--cyan); color: #000;
  font: 700 18px var(--display); text-decoration: none; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.btn:hover { background: #fff; color: #000; }
.btn-line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; min-height: 46px; }
.btn-line:hover { background: var(--deep); color: #fff; }
.btn-dark { background: #000; color: var(--cyan); font-size: clamp(16px, 2vw, 22px); min-height: 60px; }
.btn-dark:hover { background: var(--night); color: #fff; }

/* ---- Header ---- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px var(--gutter);
  border-bottom: 1px solid #16303f; position: relative; z-index: 3; background: var(--night); }
.logo img { display: block; height: 46px; width: auto; }

/* ---- Hero: four angled bands ---- */
.pre { display: flex; align-items: center; gap: 14px; margin: 0 var(--gutter) clamp(20px, 3vw, 34px); font: 700 clamp(17px, 1.9vw, 24px)/1.2 var(--display); color: var(--cyan); }
.hero { position: relative; padding: clamp(36px, 6vw, 80px) 0 clamp(110px, 12vw, 160px); overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 70px), 0 100%); }
.bands { margin: 0; display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 22px);
  font: 700 clamp(40px, 8.6vw, 132px)/.98 var(--display); letter-spacing: -.03em; }
/* LEARN: Each band is a block whose ends are cut on a slant. Odd bands lean right, even bands lean left. */
.band { display: block; width: fit-content; max-width: 100%; padding: .06em .45em .1em var(--gutter); }
.b1 { color: #000; }
.b2 { color: #000; margin-left: clamp(0px, 6vw, 110px); padding-left: .45em; }
.b3 { color: var(--text); padding-left: var(--gutter); }
.b4 { color: #000; margin-left: auto; padding: .06em var(--gutter) .1em .55em; }
/* LEARN: The angled shape is drawn on a layer behind the words (::before), not on the band itself,
   LEARN: so the city tab can stick up past the band's edge without being cut off. */
.b1, .b2, .b4 { isolation: isolate; }
.b1::before, .b2::before, .b4::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.b1::before { background: var(--text); clip-path: polygon(0 0, 100% 0, calc(100% - .45em) 100%, 0 100%); }
.b2::before { background: var(--cyan); clip-path: polygon(.45em 0, 100% 0, calc(100% - .45em) 100%, 0 100%); }
.b4::before { background: var(--cyan); clip-path: polygon(.45em 0, 100% 0, 100% 100%, 0 100%); }
/* LEARN: The city name is a black tab clipped to the top edge of its band. It's positioned on its own,
   LEARN: so it never pushes the big words onto another line, and it never drops below 13px so it stays readable. */
.band { position: relative; }
.city { position: absolute; top: 0; right: 1.15em; transform: translateY(-55%); padding: .32em .9em .36em .7em;
  font-size: max(13px, .19em); letter-spacing: .01em; line-height: 1; white-space: nowrap;
  background: #000; color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan);
  clip-path: polygon(0 0, 100% 0, calc(100% - .5em) 100%, 0 100%); }
.b4 .city { right: auto; left: 1.2em; }
.hero-foot { display: flex; flex-wrap: wrap; gap: 18px 60px; align-items: flex-start; padding: clamp(36px, 5vw, 60px) var(--gutter) 0; max-width: 1440px; }
.kicker { margin: 4px 0 0; font: 700 20px var(--display); color: var(--text); flex: 0 0 auto; padding: 6px 16px 6px 12px; background: var(--deep); clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.slash { width: 54px; height: 6px; background: var(--cyan); transform: skewX(-35deg); }
.lede { margin: 0; max-width: 46ch; flex: 1 1 380px; font-size: clamp(19px, 1.7vw, 23px); color: #c4d6de; }

/* LEARN: One orchestrated entrance: the bands slice in from alternate sides, a beat apart. Skipped entirely
   LEARN: for anyone whose device asks for less motion, and it never repeats. */
@media (prefers-reduced-motion: no-preference) {
  .b1, .b3 { animation: from-left .8s var(--ease) both; }
  .b2, .b4 { animation: from-right .8s var(--ease) both; }
  .b2 { animation-delay: .12s; } .b3 { animation-delay: .24s; } .b4 { animation-delay: .36s; }
  .hero-foot, .pre { animation: rise .7s var(--ease) .55s both; }
  .pre { animation-delay: 0s; }
  @keyframes from-left { from { transform: translateX(-105%); } to { transform: none; } }
  @keyframes from-right { from { transform: translateX(105%); } to { transform: none; } }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* ---- The 100% ---- */
.fare { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 56px; margin-top: -50px;
  padding: 130px var(--gutter) 150px; background: var(--cyan); color: #000;
  clip-path: polygon(0 90px, 100% 0, 100% calc(100% - 90px), 0 100%); }
.fare-num { margin: 0; font: 700 clamp(130px, 25vw, 380px)/.78 var(--display); letter-spacing: -.06em; }
.fare-num span { font-size: .55em; vertical-align: .62em; margin-left: .02em; }
.fare-text { flex: 1 1 380px; max-width: 600px; padding-top: 10px; }
.fare h2 { margin: 0 0 16px; font: 700 clamp(36px, 4.4vw, 62px)/.98 var(--display); letter-spacing: -.02em; }
.fare .big { margin: 0 0 18px; font: 600 clamp(19px, 1.8vw, 24px)/1.35 var(--display); }
.fare .small { margin: 0; font-size: 15px; padding-top: 14px; border-top: 3px solid #000; max-width: 58ch; }

/* ---- Places strip: a slanted ticker ---- */
/* LEARN: Visually hidden but read by screen readers. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.places { margin-top: -40px; position: relative; z-index: 1; transform: rotate(-3deg); background: #000; padding: 18px 0;
  box-shadow: 0 0 0 1px #16303f; overflow: hidden; }
.ticker { overflow: hidden; margin-right: calc(var(--gutter) + 64px); }
/* LEARN: The same list twice, side by side, so when the track has moved exactly half its width the loop is seamless. */
/* LEARN: This fixed order is only a fallback: assets/places.php replaces it with a fresh shuffle on each visit. */
.track { display: flex; width: max-content; font: 700 clamp(22px, 3vw, 40px)/1.15 var(--display); color: var(--text); white-space: pre; }
.track::before, .track::after { content: "Edinburgh   /   Glasgow   /   Aberdeen   /   Dundee   /   Inverness   /   Stirling   /   Perth   /   Dunfermline   /   Glasgow Airport   /   Edinburgh Airport   /   Aberdeen Airport   /   Prestwick Airport   /   Inverness Airport   /   Paisley   /   East Kilbride   /   Livingston   /   Hamilton   /   Cumbernauld   /   Kirkcaldy   /   Ayr   /   Kilmarnock   /   Falkirk   /   Loch Lomond   /   St Andrews   /   Oban   /   Fort William   /   Glencoe   /   Pitlochry   /   Aviemore   /   North Berwick   /   "; }
.track::after { color: var(--text); }
/* LEARN: The pause button: a real checkbox (so it works by keyboard), drawn as a small cyan tab on the strip. */
.hold { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hold-btn { position: absolute; right: var(--gutter); top: 50%; z-index: 2; transform: translateY(-50%); width: 44px; height: 44px; cursor: pointer;
  background: var(--cyan); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
/* LEARN: Two bars = pause; a triangle = play. Pure CSS shapes. */
.hold-btn::before, .hold-btn::after { content: ""; position: absolute; top: 13px; width: 5px; height: 18px; background: #000; }
.hold-btn::before { left: 14px; } .hold-btn::after { left: 24px; }
.hold:checked + .hold-btn::before { left: 16px; width: 0; height: 0; background: none; border-left: 14px solid #000; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.hold:checked + .hold-btn::after { display: none; }
.hold:focus-visible + .hold-btn { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .track { animation: ticker 90s linear infinite; }
  .places:hover .track, .hold:checked ~ .ticker .track, .hold:focus-visible ~ .ticker .track { animation-play-state: paused; }
  @keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}
/* LEARN: Nothing moves for people who've asked for less motion, so the button isn't needed. */
@media (prefers-reduced-motion: reduce) { .hold-btn { display: none; } }

/* ---- Three cards ---- */
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; padding: 130px var(--gutter) 100px; max-width: 1440px; margin: 0 auto; }
.card { position: relative; background: var(--deep); padding: 34px 32px 32px; border-top: 4px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px)); }
.card-hi { border-top-color: var(--cyan); background: #0d2430; }
.card-k { position: absolute; right: 26px; top: 14px; margin: 0; font: 700 64px/1 var(--display); color: #173444; }
.card-hi .card-k { color: #0f4a55; }
.card h2 { position: relative; margin: 0 0 16px; font: 700 36px/1 var(--display); }
.card ul { margin: 0; padding: 0; list-style: none; position: relative; }
.card li { position: relative; padding-left: 28px; margin-top: 12px; color: #c4d6de; }
.card li::before { content: ""; position: absolute; left: 0; top: .62em; width: 14px; height: 4px; background: var(--cyan); transform: skewX(-35deg); }

/* ---- Join ---- */
.join { padding: 0 var(--gutter) 120px; }
.join-in { max-width: 1296px; margin: 0 auto; background: var(--cyan); color: #000; padding: clamp(36px, 5vw, 64px);
  clip-path: polygon(0 0, 100% 0, calc(100% - 60px) 100%, 0 100%); }
.join h2 { margin: 0 0 16px; font: 700 clamp(44px, 6.4vw, 96px)/.92 var(--display); letter-spacing: -.03em; }
.join p { margin: 0 0 26px; max-width: 56ch; font-size: 19px; }

/* ---- Footer ---- */
.foot { display: flex; gap: 20px; align-items: flex-start; padding: 70px var(--gutter) 44px; background: #000; color: var(--muted); font-size: 14px;
  clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%); }
.foot p { margin: 0 0 8px; max-width: 90ch; }
.foot img { flex: 0 0 auto; }
/* LEARN: The small links row in the footer (privacy notice and website terms). */
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 14px; padding: 0; list-style: none; font: 600 15px var(--display); }
.foot-links a { color: var(--text); text-underline-offset: 3px; }
.foot-links a:hover { color: var(--cyan); }

/* ---- Text pages (privacy notice, website terms) ---- */
/* LEARN: Long reading needs a calm page: one column under about 70 characters wide,
   LEARN: generous line spacing, and the angled band kept to the title only. */
.doc { padding: clamp(36px, 6vw, 80px) 0 clamp(80px, 9vw, 120px); }
.doc .bands { margin-bottom: clamp(26px, 4vw, 44px); }
.doc-body { padding: 0 var(--gutter); max-width: calc(68ch + 2 * var(--gutter)); font-size: 18px; color: #d3e2e8; }
.doc-body h2 { margin: 2.2em 0 .5em; font: 700 clamp(24px, 2.6vw, 30px)/1.15 var(--display); color: var(--text); }
.doc-body p, .doc-body ul { margin: 0 0 1em; }
.doc-body ul { padding-left: 1.2em; }
.doc-body li { margin-bottom: .45em; }
.doc-body li::marker { color: var(--cyan); }
.doc-body strong { color: var(--text); }
.doc-meta { color: var(--muted); font-size: 16px; }
/* LEARN: The "coming soon" notice: a cyan edge so it can't be missed or mistaken for terms. */
.notice { margin: 0 0 1.6em; padding: 18px 22px; background: var(--deep); box-shadow: inset 4px 0 0 var(--cyan); color: var(--text); }

/* ---- Phones ---- */
@media (max-width: 560px) {
  .b2, .b4 { margin-left: 0; }
  .b4 { margin-left: auto; }
  .fare { padding: 110px var(--gutter) 120px; clip-path: polygon(0 50px, 100% 0, 100% calc(100% - 50px), 0 100%); }
  .places { transform: rotate(-4deg); }
  .join-in { clip-path: polygon(0 0, 100% 0, calc(100% - 30px) 100%, 0 100%); }
  .card-k { font-size: 48px; }
}
