/* The Pasty Bus — signwritten coachwork.
   Navy enamel panels, cream reveals, yellow signwritten lettering with a painted shade. */

@font-face {
  font-family: 'Smythe';
  src: url('fonts/smythe-regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}

:root {
  --navy:       #101f3d;
  --navy-deep:  #08101f;
  --navy-lift:  #1b2f56;
  --yellow:     #f7c022;
  --yellow-hi:  #ffd457;
  --yellow-dp:  #c48f00;
  --cream:      #f6efe0;
  --cream-dp:   #e7dbc2;
  --ink:        #16233c;
  --ink-soft:   #3d4a66;
  --on-navy:    #ded4c2;
  --on-navy-dim:#a9a08d;
  --signal:     #b03a2a;

  --display: 'Smythe', Georgia, serif;
  --text: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gut: clamp(1.25rem, 5vw, 5.5rem);
  --pad: clamp(3.5rem, 9vh, 9rem);
  --shade: 0.055em;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--navy);
  color: var(--on-navy);
  font-family: var(--text);
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.125rem);
  line-height: 1.62;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- lettering ---------- */

.h2, .hero__title, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.002em;
  line-height: 0.94;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.5rem, 1.5rem + 4.5vw, 4.7rem);
  margin: 0 0 1.6rem;
}

.lead {
  font-size: clamp(1.15rem, 1.02rem + 0.62vw, 1.45rem);
  line-height: 1.45;
  max-width: 52ch;
}

p { max-width: 68ch; }

/* ---------- coachline ---------- */

.coachline {
  display: block;
  width: min(320px, 62%);
  height: 6px;
  border-top: 3px solid var(--yellow);
  border-bottom: 1px solid var(--signal);
  transform-origin: left center;
  animation: draw 1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(0.34em); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border: 2px solid var(--navy-deep);
  box-shadow: 0 4px 0 var(--yellow-dp), 0 10px 22px -8px rgb(8 16 31 / 0.55);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.btn:hover { background: var(--yellow-hi); transform: translateY(-2px); box-shadow: 0 6px 0 var(--yellow-dp), 0 16px 28px -10px rgb(8 16 31 / 0.6); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--yellow-dp), 0 6px 14px -8px rgb(8 16 31 / 0.5); }

.btn--sm { padding: 0.55rem 1.05rem; font-size: 0.94rem; box-shadow: 0 3px 0 var(--yellow-dp); }
.btn--sm:hover { box-shadow: 0 5px 0 var(--yellow-dp); }

.link-arrow {
  font-weight: 600;
  text-decoration: none;
  color: var(--cream);
  padding-bottom: 3px;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.link-arrow::after { content: ' \2192'; color: var(--yellow); }
.link-arrow:hover { background-size: 100% 2px; }

/* ---------- header ---------- */

.head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0.4rem var(--gut);
  background: var(--navy-deep);
  border-bottom: 1px solid rgb(247 192 34 / 0.25);
}

section[id] { scroll-margin-top: 96px; }

.wordmark, .foot__mark { display: block; margin: 0 auto 0 0; line-height: 0; }
.wordmark img { width: clamp(172px, 18vw, 224px); height: auto; }
.foot__mark img { width: clamp(200px, 26vw, 300px); height: auto; }
.wordmark { transition: opacity 160ms ease; }
.wordmark:hover { opacity: 0.82; }

.head__nav { display: none; gap: clamp(1rem, 2.2vw, 2rem); }
.head__nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--on-navy);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 240ms cubic-bezier(0.16, 1, 0.3, 1), color 160ms ease;
}
.head__nav a:hover { color: var(--cream); background-size: 100% 2px; }

@media (min-width: 900px) { .head__nav { display: flex; } }

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  background: var(--navy);
}

.hero__img { display: block; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }

.hero__body { padding: clamp(1.5rem, 5vw, 3.5rem) var(--gut) clamp(2rem, 5vw, 4rem); }

/* Sized so each authored line stays one line: three lines, never a wall of five. */
.hero__title {
  font-size: clamp(2.4rem, 0.4rem + 7.2vw, 5rem);
  line-height: 0.95;
  margin: 0 0 clamp(0.9rem, 2vw, 1.5rem);
  color: var(--yellow);
  text-shadow: var(--shade) var(--shade) 0 var(--navy-deep);
}
.hero__title .ln { display: block; animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__title .ln:nth-child(1) { animation-delay: 0.05s; }
.hero__title .ln:nth-child(2) { animation-delay: 0.14s; }
.hero__title .ln:nth-child(3) { animation-delay: 0.23s; }
.hero__title .ln--alt { color: var(--cream); }

.hero__lede { margin: clamp(0.9rem, 2.4vw, 1.75rem) 0 clamp(1.35rem, 3vw, 2.25rem); max-width: 42ch; font-size: clamp(1.02rem, 0.96rem + 0.42vw, 1.3rem); line-height: 1.5; color: var(--on-navy); }

.hero__acts { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); margin: 0; max-width: none; }

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin: 0;
  padding: 0.75rem var(--gut);
  max-width: none;
  background: var(--navy-deep);
  border-top: 1px solid rgb(247 192 34 / 0.25);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
}
.hero__foot span { display: inline-flex; align-items: center; gap: 0.6rem; }
.hero__foot span + span::before { content: ''; width: 6px; height: 6px; background: var(--yellow); }

/* mobile: the photo is a deliberate wide band, so proposition and both actions
   land inside the first screen. Full width, no aspect-ratio/max-height fight. */
@media (max-width: 799px) {
  .hero__img { width: 100%; height: clamp(200px, 29vh, 250px); }
  .hero__img img { height: 100%; object-position: 50% 46%; }
}

@media (min-width: 800px) {
  .hero { min-height: min(88svh, 880px); grid-template-rows: 1fr auto; }
  .hero__img { position: absolute; inset: 0; }
  .hero__img img { height: 100%; }
  /* Keeps the calm left of the frame dark enough to letter on, and lets the
     livery signage from just past halfway stay bright. */
  .hero__img::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(96deg, rgb(8 16 31 / 0.95) 0%, rgb(8 16 31 / 0.9) 34%, rgb(8 16 31 / 0.5) 52%, rgb(8 16 31 / 0.12) 72%, rgb(8 16 31 / 0.04) 100%),
      linear-gradient(0deg, rgb(8 16 31 / 0.55) 0%, rgb(8 16 31 / 0) 42%);
  }
  .hero__body {
    position: relative;
    align-self: end;
    padding-block: clamp(4rem, 12vh, 8rem) clamp(2.5rem, 7vh, 4.5rem);
    max-width: 50rem;
  }
  .hero__foot { position: relative; }
}

/* ---------- the pasty ---------- */

.pasty {
  background: var(--cream);
  color: var(--ink);
  padding: var(--pad) var(--gut);
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.pasty__text .h2 { color: var(--navy); text-shadow: var(--shade) var(--shade) 0 var(--yellow); }
.pasty__text .lead { color: var(--ink); }
.pasty__text p + p { margin-top: 1.25rem; color: var(--ink-soft); }

.pasty__fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (min-width: 860px) {
  .pasty { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; padding-right: 0; column-gap: clamp(3rem, 6vw, 6rem); }
  .pasty__fig img { aspect-ratio: 4 / 3.2; }
}

/* ---------- destination board ---------- */

.board { background: var(--navy); padding: var(--pad) var(--gut); }
.board__h { color: var(--yellow); text-shadow: var(--shade) var(--shade) 0 var(--navy-deep); }

.board__list { list-style: none; margin: clamp(2rem, 5vh, 3.5rem) 0 0; padding: 0; }
.board__list li {
  display: grid;
  gap: 0.6rem 3rem;
  padding: clamp(1.6rem, 3.5vh, 2.4rem) 0;
  border-top: 1px solid rgb(247 192 34 / 0.34);
}
.board__list li:last-child { border-bottom: 1px solid rgb(247 192 34 / 0.34); }
.board__list h3 {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  color: var(--cream);
  text-shadow: var(--shade) var(--shade) 0 var(--navy-deep);
}
.board__list p { margin: 0; color: var(--on-navy); max-width: 56ch; }

@media (min-width: 800px) {
  .board__list li { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr); align-items: baseline; }
  .board__list li:nth-child(even) h3 { color: var(--yellow); }
}

/* ---------- stops (caption-backed past appearances) ---------- */

.stops {
  background: var(--navy-deep);
  padding: var(--pad) var(--gut);
  display: grid;
  gap: clamp(1.75rem, 4vw, 4rem);
}
.stops__h { color: var(--yellow); text-shadow: var(--shade) var(--shade) 0 #000; margin-bottom: 1.1rem; }
.stops__lead { margin: 0; color: var(--on-navy); max-width: 44ch; }

.stops__rail { list-style: none; margin: 0; padding: 0; }
.stops__rail li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgb(247 192 34 / 0.28);
}
.stops__rail li:first-child { border-top: 1px solid rgb(247 192 34 / 0.28); }
.stops__name {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.002em;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.95rem);
  color: var(--cream);
}
.stops__yr {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  white-space: nowrap;
}

@media (min-width: 860px) {
  .stops { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
}

/* ---------- the bus ---------- */

.bus { background: var(--cream); color: var(--ink); padding: var(--pad) var(--gut); }
.bus__h { color: var(--navy); text-shadow: var(--shade) var(--shade) 0 var(--yellow); }

.bus__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(0.65rem, 1.5vw, 1.5rem); margin-top: clamp(2rem, 5vh, 3.5rem); }
.bus__fig { min-height: 0; }
.bus__fig img { width: 100%; height: 100%; object-fit: cover; }
.bus__fig:nth-child(1) { grid-column: 1 / 13; }
.bus__fig:nth-child(1) img { aspect-ratio: 5 / 4; }
.bus__fig:nth-child(2) { grid-column: 1 / 7; }
.bus__fig:nth-child(3) { grid-column: 7 / 13; }
.bus__fig:nth-child(2) img,
.bus__fig:nth-child(3) img { aspect-ratio: 1 / 1; }

/* Square sources, so three equal columns with the middle one dropped: the
   asymmetry comes from the offset, not from crops that cut the subjects. */
@media (min-width: 800px) {
  .bus__fig:nth-child(1) { grid-column: 1 / 5; }
  .bus__fig:nth-child(2) { grid-column: 5 / 9; margin-top: clamp(2rem, 5vw, 4.5rem); }
  .bus__fig:nth-child(3) { grid-column: 9 / 13; }
  .bus__fig img { aspect-ratio: 1 / 1; }
}

/* ---------- questions ---------- */

.qs { background: var(--navy); padding: var(--pad) var(--gut); display: grid; gap: clamp(1rem, 4vw, 4rem); }
.qs__h { color: var(--yellow); text-shadow: var(--shade) var(--shade) 0 var(--navy-deep); margin-bottom: 0; }
.qs__list { margin-top: 0; }

@media (min-width: 860px) {
  .qs { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); align-items: start; }
}

.qs details { border-top: 1px solid rgb(247 192 34 / 0.34); }
.qs details:last-of-type { border-bottom: 1px solid rgb(247 192 34 / 0.34); }

.qs summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 0;
  font-weight: 600;
  font-size: clamp(1.02rem, 0.98rem + 0.35vw, 1.2rem);
  color: var(--cream);
  transition: color 160ms ease;
}
.qs summary::-webkit-details-marker { display: none; }
.qs summary:hover { color: var(--yellow); }
.qs summary::after {
  content: '';
  flex: none;
  width: 15px;
  height: 15px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) center / 100% 3px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) center / 3px 100% no-repeat;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.qs details[open] summary::after { transform: rotate(45deg); }
.qs__a { padding: 0 0 1.5rem; }
.qs__a p { margin: 0; color: var(--on-navy); max-width: 64ch; }

/* ---------- enquire ---------- */

.enq {
  background: var(--yellow);
  color: var(--navy);
  padding: var(--pad) var(--gut);
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}
.enq .h2 { color: var(--navy); text-shadow: var(--shade) var(--shade) 0 var(--yellow-hi); }
.enq .lead { color: var(--navy); }
.enq__intro p + p { margin-top: 1.1rem; color: #4a3a06; }

.enq__form {
  border: 2px solid var(--navy);
  background: var(--cream);
  padding: clamp(0.5rem, 2vw, 1rem);
}
.enq__form iframe {
  display: block;
  width: 100%;
  border: 0;
  /* Tally posts its real height when the embed script loads; this is the floor
     before that happens, and the whole height if the script is blocked. */
  min-height: max(560px, 78vh);
}
.enq__fallback { margin: 1rem 0 0; font-size: 0.95rem; color: #4a3a06; }
.enq__fallback a { color: var(--navy); font-weight: 700; }

.enq :focus-visible { outline-color: var(--navy); }

@media (min-width: 860px) {
  .enq { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); align-items: start; }
}

/* ---------- footer ---------- */

.foot {
  background: var(--navy-deep);
  padding: clamp(3rem, 7vh, 5rem) var(--gut) clamp(2rem, 5vh, 3rem);
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
}
.foot__mark { margin-right: 0; }
.foot__line { margin: 1rem 0 0; color: var(--on-navy-dim); max-width: 42ch; font-size: 0.95rem; }

.foot__nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; align-content: start; }
.foot__nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--on-navy); }
.foot__nav a:hover { color: var(--yellow); text-decoration: underline; text-underline-offset: 4px; }

.foot__quiet {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: clamp(1.5rem, 3vh, 2.25rem);
  border-top: 1px solid rgb(247 192 34 / 0.2);
  color: var(--on-navy-dim);
  font-size: 0.9rem;
  max-width: none;
}
.foot__quiet a { color: var(--on-navy); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--yellow); }
.foot__quiet a:hover { color: var(--yellow); }

@media (min-width: 800px) {
  .foot { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

/* ---------- utility pages ---------- */

.error-page {
  min-height: 100vh;
  max-width: 50rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 6rem) 1.5rem;
}
.error-page > a:first-child img { width: min(22rem, 80vw); height: auto; }
.error-page .h2 { margin: 3rem 0 1rem; }
.error-page p { max-width: 42rem; }
.error-page a:not(.btn) { color: var(--yellow); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
