/*
  RMC baseline components. Requires tokens.css.
  Plain CSS, no build step. Every component reads role tokens (--ink, --accent,
  --surface...) so it adapts inside .on-dark sections.
*/

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* keep hidden working on elements that set display (grid forms) */
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tracking-display); margin: 0; color: var(--ink); }
h1 { font-size: var(--text-h1); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--text-h2); line-height: 1.15; }
h3 { font-size: var(--text-xl); line-height: var(--leading-snug); }
h1 em, h2 em, h3 em { font-style: normal; color: var(--accent); } /* accent by colour only, never italic */
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: rgba(191, 215, 48, 0.45); color: inherit; }
input, textarea { caret-color: var(--color-ember-500); }
input, select, textarea { accent-color: var(--color-ember-600); }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; background: var(--surface); color: var(--ink); }
.section--alt { background: var(--surface-alt); }
.section--deep { background: var(--color-navy-900); }
.section-head { margin-bottom: 3.5rem; max-width: 34rem; }
.section-head--center { text-align: center; margin-inline: auto; }
.lead { font-size: var(--text-lg); color: var(--ink-muted); max-width: 30rem; }
.muted { color: var(--ink-muted); }

/* Eyebrow label */
.label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.label--lime { color: var(--color-lime-500); } /* dark grounds only */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast);
}
.btn--primary { background: var(--color-ember-600); color: var(--color-navy-900); box-shadow: var(--shadow-button); } /* graphite on lime; white fails */
.btn--primary:hover { background: var(--color-ember-700); }
.btn--outline { background: transparent; color: var(--ink); border-color: currentColor; }
.btn--outline:hover { background: var(--ink); color: var(--surface); }
.btn--navy { background: var(--color-navy-800); color: var(--color-stone-100); }
.btn--navy:hover { background: var(--color-navy-900); }
.btn--sm { padding: 0.65rem 1.15rem; font-size: 0.76rem; }
.btn--block { width: 100%; }

/* Badge (tags on photos and cards) */
.badge {
  display: inline-block;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-xs);
  background: var(--color-ember-600);
  color: var(--color-navy-900);
}
.badge--outline { background: transparent; color: var(--accent); border: 1px solid currentColor; }

/* Card */
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 2.25rem 2rem;
}
/* Cards are static containers, so they don't react to hover. Only links (like .dest-card) lift. */
.card--featured { border-radius: var(--radius-lg); box-shadow: 0 18px 45px rgba(38, 38, 38, 0.2); position: relative; overflow: hidden; }
.card--featured > .badge { position: absolute; top: 0; right: 0; border-radius: 0 0 0 var(--radius-xs); }
.card__num { font-family: var(--font-display); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; color: var(--accent); margin-bottom: var(--space-4); }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 15px; margin-bottom: var(--space-5);
  color: var(--accent); background: rgba(191, 215, 48, 0.14);
}
.card h3 { margin-bottom: var(--space-3); }
.card p { font-size: 0.9rem; color: var(--ink-muted); }

/* Check list */
.checks { list-style: none; padding: 0; margin: var(--space-6) 0 0; display: grid; gap: 0.6rem; }
.checks li { display: flex; align-items: center; gap: 0.6rem; font-size: var(--text-sm); }
.checks li::before {
  content: "✓"; flex: none; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.65rem; color: var(--color-navy-900);
  background: var(--color-ember-600);
}
.on-dark .checks li::before, [data-surface="dark"] .checks li::before { background: var(--color-lime-500); color: var(--color-navy-900); }

/* Destination card (photo) */
.dest-card {
  position: relative; display: block; height: 340px; overflow: hidden;
  border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--color-navy-900); box-shadow: var(--shadow-dark);
  color: var(--color-stone-100); text-decoration: none;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base);
}
.dest-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; transition: opacity var(--dur-base), transform 0.5s var(--ease); }
.dest-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(38, 38, 38, 0.95) 30%, transparent 70%); }
.dest-card:hover { transform: translateY(var(--lift)); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); }
.dest-card:hover img { opacity: 0.72; transform: scale(1.03); }
.dest-card .badge { position: absolute; top: var(--space-4); left: var(--space-4); z-index: 1; }
.dest-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-5); z-index: 1; }
.dest-card__meta { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-lime-500); margin-bottom: var(--space-1); }
.dest-card h3 { color: var(--color-stone-100); font-size: 1.5rem; line-height: var(--leading-tight); }

/* Stat */
.stat__value { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; line-height: 1; color: var(--accent); }
.stat__label { font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); margin-top: var(--space-1); }
.stats { display: flex; flex-wrap: wrap; gap: var(--space-8); border-top: 1px solid var(--border); padding-top: var(--space-8); }

/* FAQ (uses <details>, no JS) */
.faq { display: grid; gap: var(--space-3); }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.48); padding: 0 var(--space-5);
  transition: background var(--dur-base), border-color var(--dur-base), box-shadow var(--dur-base);
}
.faq details[open] { border-color: rgba(90, 102, 16, 0.3); background: rgba(255, 255, 255, 0.8); box-shadow: 0 10px 30px rgba(38, 38, 38, 0.06); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-5) 0; font-weight: 500; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; transition: transform var(--dur-fast); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--space-5); font-size: 0.9rem; color: var(--ink-muted); }

/* Form fields */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.9rem; color: var(--ink);
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--radius-xs); padding: 0.85rem 1rem;
  transition: border-color var(--dur-fast);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); opacity: 0.8; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); }
.on-dark .field input, .on-dark .field select, .on-dark .field textarea { background: rgba(239, 239, 239, 0.06); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-grid .span-2 { grid-column: span 2; }

/* Nav (floating glass shell) */
.site-nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 14px 20px 0; }
.nav-shell {
  max-width: var(--container); margin: 0 auto; height: 4rem; padding: 0 var(--space-4);
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.13); border-radius: var(--radius-md);
  background: rgba(38, 38, 38, 0.86); backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}
.nav-brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
/* RMC logo (images/brand/rmc-logo.svg) is drawn light for dark grounds: nav, hero, footer. */
.nav-brand__logo { display: block; height: 38px; width: auto; flex: none; }
.site-footer .nav-brand__logo { height: 44px; }
.nav-brand__logo + * { padding-left: var(--space-3); border-left: 1px solid rgba(239, 239, 239, 0.18); }
.nav-brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--color-stone-100); line-height: 1; }
.nav-brand__sub { font-size: 0.6rem; font-weight: 500; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-ember-500); margin-top: 3px; }
.nav-links { display: flex; gap: 3px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.nav-links a { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.025em; color: var(--color-stone-100); text-decoration: none; padding: 8px 10px; border-radius: 9px; transition: background var(--dur-fast); }
.nav-links a:hover { background: rgba(255, 255, 255, 0.09); color: var(--color-white); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; background: var(--color-navy-900); color: var(--color-stone-100); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; opacity: 0.85; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(38, 38, 38, 0.92) 0%, rgba(38, 38, 38, 0.7) 40%, rgba(38, 38, 38, 0.1) 75%),
    linear-gradient(to top, #262626 0%, rgba(38, 38, 38, 0) 35%);
}
@media (max-width: 860px) {
  .hero::after { background: linear-gradient(to top, #262626 35%, rgba(38, 38, 38, 0.55) 70%, rgba(38, 38, 38, 0.35) 100%); }
}
.hero__content { position: relative; z-index: 1; width: 100%; padding-top: 8rem; padding-bottom: 6rem; }
.hero__content > * { max-width: 42rem; }
.hero h1 { margin-bottom: var(--space-6); }
.hero .lead { margin-bottom: var(--space-10); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--color-stone-100); transition: transform var(--dur-base), opacity var(--dur-base); }
.mobile-menu {
  display: none; max-width: var(--container); margin: 8px auto 0; padding: var(--space-4);
  border-radius: var(--radius-md); background: rgba(38, 38, 38, 0.97); backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-menu a:not(.btn) { display: block; color: var(--color-stone-100); text-decoration: none; padding: 10px; border-radius: 9px; }
.mobile-menu .btn { margin-top: var(--space-3); width: 100%; }
.nav-open .mobile-menu { display: block; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Split: photo beside text */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--flip .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card-hover); display: block; }
.split__caption {
  position: absolute; left: -1rem; bottom: -1.25rem; max-width: 16rem;
  background: var(--color-ember-600); color: var(--color-navy-900);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3;
}
.split__text p { color: var(--ink-muted); margin-top: var(--space-5); max-width: 32rem; }

/* Quote band over a photo */
.quote-band { position: relative; padding: clamp(6rem, 14vw, 10rem) 0; text-align: center; overflow: hidden; background: var(--color-navy-900); }
.quote-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.quote-band blockquote { position: relative; z-index: 1; margin: 0 auto; max-width: 46rem; padding: 0 var(--gutter); font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.25; color: var(--color-stone-100); }
.quote-band cite { display: block; margin-top: var(--space-6); font-family: var(--font-body); font-style: normal; font-size: var(--text-xs); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-ember-500); }

/* Comparison table */
.compare-wrap { overflow-x: auto; margin-top: var(--space-12); border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-raised); }
.compare { width: 100%; border-collapse: collapse; font-size: var(--text-sm); min-width: 34rem; }
.compare th, .compare td { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); text-align: center; }
.compare tr:last-child td { border-bottom: 0; }
.compare th { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.compare td:first-child, .compare th:first-child { text-align: left; color: var(--ink); }
.compare .is-us { background: rgba(191, 215, 48, 0.1); color: var(--accent); }
.compare .yes { color: var(--accent); font-weight: 700; }
.compare .no { color: var(--ink-muted); opacity: 0.7; }
.on-dark .compare .yes, [data-surface="dark"] .compare .yes { color: var(--color-lime-500); }
@media (max-width: 640px) {
  .compare { min-width: 0; table-layout: fixed; font-size: 0.8rem; }
  .compare th, .compare td { padding: var(--space-3) var(--space-2); }
  .compare th:first-child, .compare td:first-child { width: 38%; padding-left: var(--space-4); }
  .compare th { padding-inline: var(--space-1); font-size: 0.56rem; letter-spacing: 0.02em; line-height: 1.3; }
}

/* Modal (booking). Markup comes from book-ride.js. */
.modal {
  width: min(34rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--color-navy-900); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.modal[open] { animation: modal-in var(--dur-base) var(--ease); }
.modal::backdrop { background: rgba(20, 20, 20, 0.72); backdrop-filter: blur(4px); }
.modal__inner { position: relative; padding: var(--space-10) var(--space-8) var(--space-8); }
.modal h2 { font-size: clamp(1.6rem, 4vw, 2rem); line-height: 1.15; padding-right: var(--space-8); }
.modal__sub { margin-top: var(--space-3); color: var(--ink-muted); }
.modal form { margin-top: var(--space-8); align-items: end; }
.modal .fine-print { margin-top: var(--space-5); font-size: var(--text-sm); color: var(--ink-muted); }
.modal__close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(239, 239, 239, 0.08); color: var(--ink); font-size: 1.5rem; line-height: 1;
  transition: background var(--dur-fast);
}
.modal__close:hover { background: rgba(239, 239, 239, 0.16); }
.modal__error { color: #f2a37a; font-size: var(--text-sm); }
.consent-check { display: flex; align-items: flex-start; gap: var(--space-3); }
.consent-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--color-ember-600); cursor: pointer; }
.consent-check label { font-size: var(--text-xs); line-height: 1.6; color: var(--ink-muted); cursor: pointer; }
.consent-check a { color: var(--ink); text-underline-offset: 2px; }
.modal__done { text-align: center; padding: var(--space-6) 0; }
.modal__done h2 { padding-right: 0; }
.modal__check {
  width: 64px; height: 64px; margin: 0 auto var(--space-6); border-radius: 50%;
  display: grid; place-items: center; font-size: 1.75rem;
  background: var(--color-lime-500); color: var(--color-navy-900);
}
.modal-open { overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 640px) { .modal__inner { padding: var(--space-8) var(--space-5) var(--space-6); } }

/* Footer */
.site-footer { background: var(--color-navy-950); color: rgba(239, 239, 239, 0.62); border-top: 1px solid rgba(239, 239, 239, 0.06); padding: var(--space-16) 0; font-size: var(--text-sm); }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--color-ember-500); }

@media (max-width: 1023px) {
  .nav-links, .nav-shell > .btn { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__caption { left: 1rem; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .site-nav { padding: 8px 12px 0; }
  .nav-shell .btn { padding: 0.55rem 0.8rem; font-size: 0.7rem; white-space: nowrap; }
  .nav-brand__name { font-size: 0.95rem; }
  .nav-brand__sub { display: none !important; }
}
@media (max-width: 480px) {
  .site-nav .nav-brand__logo + * { display: none; }
}
