/* NN-Bride — Klondike Heritage Railway
   Light theme, Canadian red & white, system fonts only. */

:root {
  --bg: #FBF7F0;
  --surface: #FFFFFF;
  --ink: #1F1A17;
  --muted: #4F4842;
  --line: #E6DDD0;
  --red: #C8102E;
  --red-dark: #9B0C22;
  --red-soft: #FBE8EA;
  --sky: #DCEBF6;
  --gold: #7A5A0E;
  --gold-soft: #FFF4D6;
  --purple: #5B2C91;
  --green: #22652E;
  --blue: #1F3F94;
  --ruby: #B3122A;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 26, 23, .06), 0 10px 28px rgba(31, 26, 23, .08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(1rem, .96rem + .2vw, 1.0625rem)/1.65 var(--sans);
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.45rem); }
p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .35rem; }

a { color: var(--red-dark); text-underline-offset: .18em; }
a:hover { color: var(--ink); }

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

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Skip link */
.skip-link {
  position: absolute; left: 1rem; top: -200px; z-index: 100;
  background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Header */
.flagbar { height: 6px; background: linear-gradient(90deg, var(--red) 0 25%, #fff 25% 75%, var(--red) 75%); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; min-height: 68px; }

.brand { display: flex; align-items: center; gap: .65rem; min-height: 48px; color: var(--ink); text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { display: block; font: 700 1.3rem/1 var(--serif); }
.brand-tag { display: block; margin-top: .25rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 48px; min-width: 48px; padding: 0 1rem;
  font: 700 1rem var(--sans); color: var(--ink);
  background: transparent; border: 2px solid var(--ink); border-radius: 999px; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
  flex-basis: 100%;
  max-height: 0; overflow: hidden; visibility: hidden;
  transition: max-height .3s ease, visibility 0s linear .3s;
}
.site-nav.is-open { max-height: 40rem; visibility: visible; transition: max-height .3s ease, visibility 0s; }
.site-nav ul { list-style: none; margin: 0; padding: .25rem 0 1rem; }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: flex; align-items: center; min-height: 48px; padding: 0 .9rem;
  border-radius: 10px; color: var(--ink); font-weight: 600; text-decoration: none;
}
.site-nav a:hover { background: var(--bg); }
.site-nav a[aria-current="page"] { background: var(--red-soft); color: var(--red-dark); }
.site-nav .nav-cta { background: var(--red); color: #fff; justify-content: center; margin-top: .5rem; }
.site-nav .nav-cta:hover { background: var(--red-dark); color: #fff; }
.site-nav .nav-cta[aria-current="page"] { background: var(--red-dark); color: #fff; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { flex-basis: auto; max-height: none; overflow: visible; visibility: visible; transition: none; }
  .site-nav ul { display: flex; align-items: center; gap: .2rem; padding: 0; }
  .site-nav a { padding: 0 .8rem; }
  .site-nav .nav-cta { margin: 0 0 0 .4rem; border-radius: 999px; padding: 0 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav, .site-nav.is-open { transition: none; }
}

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: .7rem 1.4rem; border: 2px solid transparent; border-radius: 999px;
  font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--red-dark); }
.btn-light:hover { background: var(--gold-soft); color: var(--ink); }
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--red-dark); }

@media (max-width: 480px) {
  .btn { width: 100%; }
}

/* Generic sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.eyebrow {
  margin-bottom: .6rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red-dark);
}
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 42rem; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .4rem; }

.trip-card { border-top: 6px solid var(--accent, var(--red)); display: flex; flex-direction: column; }
.trip-card .more { margin-top: auto; padding-top: .5rem; font-weight: 700; }

.tag {
  display: inline-block; margin-bottom: .75rem; padding: .3rem .7rem; border-radius: 999px;
  font-size: .82rem; font-weight: 700; background: var(--bg); color: var(--accent, var(--red-dark));
  border: 1px solid currentColor;
}

.accent-purple { --accent: var(--purple); }
.accent-green { --accent: var(--green); }
.accent-ruby { --accent: var(--ruby); }
.accent-blue { --accent: var(--blue); }

/* Hero */
.hero { padding-block: clamp(2rem, 5vw, 4rem); background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.hero-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.hero-art { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); background: var(--sky); }
.hero-art svg { width: 100%; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
}

.page-hero { padding-block: clamp(2rem, 5vw, 3.5rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-bottom: 0; }

/* Facts strip */
.facts { background: var(--red); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1rem 2rem; padding-block: 1.75rem; }
.fact-num { display: block; font: 700 clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem)/1.1 var(--serif); }
.fact-label { display: block; font-size: .95rem; }

/* Story / split layouts */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1.3fr 1fr; }
  .split-rev { grid-template-columns: 1fr 1.3fr; }
  .split-rev > :first-child { order: 2; }
}

.quote {
  margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-left: 5px solid var(--red);
  background: var(--red-soft); border-radius: 0 12px 12px 0; font-family: var(--serif); font-size: 1.1rem;
}

/* Mascots */
.mascot { background: radial-gradient(circle at 50% 60%, var(--glow, #fff) 0 55%, transparent 56%); }
.mascot svg { margin-inline: auto; width: 100%; max-width: 15rem; }
.mascot-sm svg { max-width: 9.5rem; }
.glow-purple { --glow: #EFE6FA; }
.glow-green { --glow: #E3F2E5; }
.glow-ruby { --glow: #FCE4E7; }
.glow-blue { --glow: #E2E9FA; }

.crew-mini { text-align: center; text-decoration: none; color: var(--ink); }
.crew-mini h3 { margin: .5rem 0 .2rem; font-size: 1.15rem; }
.crew-mini p { margin: 0; color: var(--muted); font-size: .95rem; }

.crew-profile { border-top: 6px solid var(--accent); }
.crew-profile + .crew-profile { margin-top: 1.5rem; }
.crew-profile .split { align-items: start; }

/* Definition lists (specs) */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .75rem; margin: 1.25rem 0; }
.specs div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; }
.specs dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.specs dd { margin: .15rem 0 0; font-weight: 700; }

/* Route map */
.route-map { margin: 0 0 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(.75rem, 2vw, 1.5rem); }
.route-map figcaption { margin-top: .5rem; font-size: .9rem; color: var(--muted); }

.stops { list-style: none; padding: 0; counter-reset: stop; display: grid; gap: .75rem; }
.stops li { margin: 0; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.stops strong { color: var(--red-dark); }

/* Journey blocks */
.journey + .journey { border-top: 1px solid var(--line); }

/* Tables */
.table-wrap { margin: 0 0 1.5rem; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
caption { text-align: left; font: 700 1.15rem var(--serif); padding: 0 0 .75rem; }
th, td { padding: .8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--ink); color: #fff; font-size: .9rem; letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: #FDFAF5; }
td:first-child { font-weight: 700; }

@media (max-width: 640px) {
  .rtable { border: 0; background: transparent; border-radius: 0; overflow: visible; }
  .rtable thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden;
  }
  .rtable td, .rtable tbody tr:nth-child(even) td {
    display: flex; justify-content: space-between; gap: 1rem; text-align: right;
    border-bottom: 1px dashed var(--line); background: var(--surface);
  }
  .rtable caption { display: block; width: 100%; }
  .rtable td::before { content: attr(data-label); flex: none; max-width: 50%; text-align: left; font-weight: 700; color: var(--muted); }
  .rtable tbody tr td:first-child { background: var(--ink); color: #fff; font-family: var(--serif); font-size: 1.1rem; }
  .rtable tbody tr td:first-child::before { color: #E8DED2; font-family: var(--sans); font-size: .9rem; }
  .rtable tr td:last-child { border-bottom: 0; }
}

/* Steps */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.steps li {
  margin: 0; counter-increment: step; position: relative; padding: 3.5rem 1.25rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step); position: absolute; top: 1rem; left: 1.25rem;
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 700;
}

.note { padding: 1rem 1.25rem; background: var(--gold-soft); border: 1px solid #EAD7A4; border-radius: 12px; margin-bottom: 1.5rem; }
.note > :last-child { margin-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: .75rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 48px; padding: .9rem 1.1rem; cursor: pointer; list-style: none;
  font: 700 1.08rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 700 1.5rem/1 var(--sans); color: var(--red); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 1.1rem 1rem; }
.faq .answer > :last-child { margin-bottom: 0; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin: 0 0 1rem; }
.contact-list strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact-list a, .contact-list span { font-size: 1.1rem; font-weight: 700; overflow-wrap: anywhere; }

/* Legal pages */
.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.3rem, 1.15rem + .8vw, 1.7rem); margin-top: 2rem; }
.updated { color: var(--muted); font-size: .95rem; }

/* CTA band */
.cta-band { background: var(--red); color: #fff; }
.cta-band .wrap { padding-block: clamp(2rem, 5vw, 3rem); }
.cta-band h2 { margin-bottom: .4rem; }
.cta-band p { margin: 0; max-width: 40rem; }

/* Footer */
.site-footer { background: var(--ink); color: #EFE8E0; padding-block: 2.5rem 1.5rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #F6D77A; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.footer-title { font: 700 1.1rem var(--serif); color: #fff; margin-bottom: .6rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #4A423C; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: #D9D0C6; }
.footer-bottom p { margin: 0; }
