/* =============================================================================
   automated.tours — design system
   Premium editorial travel utility. Refined, calm, map-forward.
   ============================================================================= */

/* ---------- 1. Design tokens ----------------------------------------------- */

:root {
  /* Colors */
  --bg: #FAF7F0;            /* warm ivory */
  --bg-deep: #F4EFE2;       /* deeper ivory for section accents */
  --surface: #FFFFFF;
  --surface-soft: #F3E7D3;  /* sand */
  --surface-sand: #EFE6D1;
  --text: #1F2933;
  --text-soft: #607080;
  --text-mute: #8A95A3;
  --primary: #0F766E;       /* deep teal */
  --primary-dark: #115E59;
  --primary-soft: #CFE6E2;
  --primary-tint: #E6F2F0;
  --accent: #F9735B;        /* sunset coral */
  --accent-soft: #FCE4DC;
  --success: #2F855A;
  --warning: #D97706;
  --error: #C2410C;
  --border: #E7E2D8;
  --border-strong: #D6CFC0;
  --border-soft: #EFEAE0;

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', 'Source Serif Pro', Georgia, serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Radius */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;

  /* Shadows */
  --shadow-1: 0 1px 0 0 rgba(31, 41, 51, 0.04), 0 1px 2px rgba(31, 41, 51, 0.04);
  --shadow-2: 0 4px 16px -4px rgba(31, 41, 51, 0.08);
  --shadow-3: 0 16px 40px -12px rgba(31, 41, 51, 0.14);
  --shadow-route: 0 0 0 6px rgba(15, 118, 110, 0.08);

  /* Layout */
  --container: 1240px;
  --header-h: 72px;
}

/* ---------- 2. Reset + base ------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 3. Layout helpers ---------------------------------------------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--s-7); }
}

.section { padding-block: var(--s-9); }
.section-tight { padding-block: var(--s-8); }

.stack { display: grid; gap: var(--s-5); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }

/* ---------- 4. Typography utilities ---------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px; background: currentColor; display: inline-block;
}

.display {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-weight: 450;
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.024em;
  color: var(--text);
  margin: 0;
}
.display em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-weight: 400;
  color: var(--primary);
}

.h1 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0;
}

.h2 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "SOFT" 50;
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
}

.h3 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 36;
  font-weight: 500;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.008em;
  margin: 0;
}

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--text-soft);
  margin: 0;
  max-width: 56ch;
}

.muted { color: var(--text-soft); }
.dim   { color: var(--text-mute); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
  letter-spacing: -0.01em;
}

.tnum { font-feature-settings: "tnum" on, "lnum" on; }

/* ---------- 5. Buttons ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn .arrow {
  transition: transform 0.18s ease;
  width: 14px; height: 14px;
}
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(15, 118, 110, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(31, 41, 51, 0.04);
}

.btn-affiliate {
  background: white;
  color: var(--primary-dark);
  border-color: var(--primary);
}
.btn-affiliate:hover {
  background: var(--primary-tint);
  border-color: var(--primary-dark);
}

.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- 6. Form controls ----------------------------------------------- */

.field { display: grid; gap: var(--s-2); }
.field-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.003em;
  color: var(--text-soft);
}
.field-help { font-size: 13px; color: var(--text-mute); }

.input {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  background: white;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-size: 17px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  min-width: 0;
}
.input input::placeholder { color: var(--text-mute); }
.input .leading { color: var(--text-mute); width: 18px; height: 18px; flex: none; }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.chip .check {
  width: 12px; height: 12px;
  opacity: 0; transition: opacity 0.15s ease;
}
.chip[aria-pressed="true"] .check { opacity: 1; }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.duration-group {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 999px;
  gap: 2px;
}
.duration-group .duration {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.duration-group .duration[aria-pressed="true"] {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-1);
}

/* ---------- 7. Logo / brand ------------------------------------------------ */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 18;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.012em;
}
.logo-mark { width: 30px; height: 16px; color: var(--primary); }
.logo .tld { color: var(--text-mute); font-weight: 450; }

/* ---------- 8. Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.84);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.site-nav {
  display: none;
  align-items: center;
  gap: var(--s-5);
  margin-left: auto;
}
.site-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--text); }
.header-cta { margin-left: var(--s-4); }
@media (min-width: 880px) { .site-nav { display: flex; } }

/* ---------- 9. Hero -------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: var(--s-8) var(--s-9);
  overflow: hidden;
}
.hero::before {
  /* topographic background — very subtle */
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 10% -10%, rgba(15, 118, 110, 0.06), transparent 60%),
    radial-gradient(ellipse 50% 60% at 110% 30%, rgba(249, 115, 91, 0.05), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-8); }
}

.hero-copy { display: grid; gap: var(--s-5); }
.hero-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  align-items: center;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-5);
  margin-top: var(--s-3);
  font-size: 14px;
  color: var(--text-soft);
}
.hero-meta strong { color: var(--text); font-weight: 600; }
.hero-meta .dot { width: 4px; height: 4px; background: var(--text-mute); border-radius: 50%; display: inline-block; margin: 0 4px; vertical-align: middle; }

/* ---------- 10. Generator card -------------------------------------------- */

.generator {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  display: grid;
  gap: var(--s-5);
  box-shadow: var(--shadow-2);
  position: relative;
}
.generator::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.0) 0%, rgba(15, 118, 110, 0.06) 100%);
  z-index: -1;
}
.generator-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-soft);
}
.generator-header .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  position: relative;
}
.generator-header .live-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--success); opacity: 0.3;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}
.generator-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.generator-footnote {
  font-size: 13px;
  color: var(--text-mute);
  margin: 0;
}

.generator-submit { display: grid; gap: var(--s-2); }

/* ---------- 11. Route preview SVG illustration ---------------------------- */

.route-preview {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    linear-gradient(180deg, #F8F4E8 0%, #FAF7F0 100%);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-2);
}
.route-preview svg { width: 100%; height: 100%; }
.route-preview .tile {
  position: absolute;
  inset: var(--s-5);
  pointer-events: none;
}
.route-badge {
  position: absolute;
  left: var(--s-5);
  top: var(--s-5);
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.route-badge .bullet {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.route-stat {
  position: absolute;
  right: var(--s-5);
  bottom: var(--s-5);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--shadow-2);
  display: grid; gap: var(--s-1);
}
.route-stat .num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.route-stat .label { font-size: 12px; color: var(--text-soft); letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- 12. How it works ---------------------------------------------- */

.steps {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
  margin-top: var(--s-7);
}
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: grid;
  gap: var(--s-3);
  position: relative;
}
.step .step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
}
.step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.012em;
  margin: 0;
}
.step p { margin: 0; color: var(--text-soft); }

/* ---------- 13. Sample tour card ------------------------------------------ */

.sample-tour {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .sample-tour { grid-template-columns: 1fr 1fr; } }

.sample-tour-info { padding: var(--s-7); display: grid; gap: var(--s-4); }
.sample-tour-info .tag-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.003em;
}
.tag-coral { background: var(--accent-soft); border-color: rgba(249, 115, 91, 0.3); color: #B23D27; }
.tag-teal { background: var(--primary-tint); border-color: var(--primary-soft); color: var(--primary-dark); }

.sample-stops {
  display: grid; gap: var(--s-2);
  margin-top: var(--s-3);
}
.sample-stops li {
  display: flex; align-items: center; gap: var(--s-3);
  font-size: 15px;
  color: var(--text);
}
.sample-stops .stop-pin {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
  flex: none;
}
.sample-tour-map {
  background:
    linear-gradient(180deg, #F0EBDD 0%, #E6DFCB 100%);
  position: relative;
  min-height: 380px;
}

/* ---------- 14. Destination cards ----------------------------------------- */

.cities {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
  margin-top: var(--s-7);
}
@media (min-width: 640px) { .cities { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cities { grid-template-columns: repeat(3, 1fr); } }

.city-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.city-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
}
.city-card-image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--surface-sand), var(--bg-deep));
  position: relative;
  overflow: hidden;
}
.city-card-image svg { width: 100%; height: 100%; }
.city-card-body { padding: var(--s-5); display: grid; gap: var(--s-2); }
.city-card .country {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.city-card .name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.014em;
  margin: 0;
}
.city-card .types {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
}
.city-card .city-stats {
  display: flex; gap: var(--s-4);
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--border-soft);
}
.city-card .stat {
  display: grid;
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.city-card .stat strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.012em;
}

/* ---------- 15. Tour type cards ------------------------------------------- */

.tour-types {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(2, 1fr);
  margin-top: var(--s-7);
}
@media (min-width: 720px) { .tour-types { grid-template-columns: repeat(3, 1fr); } }

.tour-type {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: grid; gap: var(--s-3);
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.tour-type:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.tour-type-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--primary-tint);
  color: var(--primary);
  display: grid; place-items: center;
}
.tour-type-icon svg { width: 18px; height: 18px; }
.tour-type h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0;
}
.tour-type p {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
}

/* ---------- 16. Benefits split -------------------------------------------- */

.benefits {
  display: grid; gap: var(--s-7);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) { .benefits { grid-template-columns: 1fr 1.1fr; gap: var(--s-9); } }
.benefits-list { display: grid; gap: var(--s-5); }
.benefit {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border-soft);
}
.benefit:last-child { border-bottom: none; padding-bottom: 0; }
.benefit-num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 500;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -0.02em;
  min-width: 28px;
}
.benefit-body h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  margin: 0 0 var(--s-1) 0;
  letter-spacing: -0.01em;
}
.benefit-body p { margin: 0; color: var(--text-soft); font-size: 15.5px; }

/* ---------- 17. Affiliate transparency block ------------------------------ */

.affiliate-note {
  background: var(--surface-soft);
  border: 1px solid rgba(214, 207, 192, 0.5);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-7);
  display: grid;
  gap: var(--s-3);
  grid-template-columns: auto 1fr;
  align-items: start;
}
.affiliate-note .icon-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--accent);
}
.affiliate-note h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.01em;
}
.affiliate-note p {
  margin: 6px 0 0 0;
  font-size: 15px;
  color: var(--text-soft);
  max-width: 60ch;
}

/* ---------- 18. Final CTA -------------------------------------------------- */

.final-cta {
  background: var(--text);
  color: white;
  border-radius: var(--r-xl);
  padding: var(--s-9) var(--s-7);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(15, 118, 110, 0.45), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(249, 115, 91, 0.25), transparent 50%);
  pointer-events: none;
}
.final-cta > * { position: relative; }
.final-cta .display { color: white; max-width: 18ch; margin-inline: auto; }
.final-cta .display em { color: var(--accent); font-variation-settings: "opsz" 144, "SOFT" 100; }
.final-cta .lede { color: rgba(255, 255, 255, 0.7); margin: var(--s-5) auto 0 auto; }
.final-cta .actions { margin-top: var(--s-6); display: inline-flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }
.final-cta .btn-primary { background: white; color: var(--text); }
.final-cta .btn-primary:hover { background: var(--bg); }
.final-cta .btn-ghost { color: white; border-color: rgba(255, 255, 255, 0.2); }
.final-cta .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- 19. Footer ---------------------------------------------------- */

.site-footer {
  padding-block: var(--s-9) var(--s-6);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.footer-brand { display: grid; gap: var(--s-3); max-width: 320px; }
.footer-tag { color: var(--text-soft); font-size: 14.5px; margin: 0; }

.footer-col h5 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 var(--s-3) 0;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer-col a {
  font-size: 14.5px;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--text); }

.footer-meta {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-mute);
}

/* =============================================================================
   Generated tour page
   ============================================================================= */

.tour-shell { padding-bottom: var(--s-9); }

.tour-context {
  display: flex; align-items: center; gap: var(--s-2);
  padding-top: var(--s-5);
  font-size: 13.5px;
  color: var(--text-soft);
}
.tour-context a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
.tour-context a:hover { color: var(--text); }
.tour-context svg { width: 12px; height: 12px; opacity: 0.6; }

/* Summary panel */
.tour-summary {
  display: grid;
  gap: var(--s-5);
  padding-block: var(--s-6) var(--s-5);
  border-bottom: 1px solid var(--border-soft);
}
.tour-summary .title-row {
  display: grid;
  gap: var(--s-3);
}
.tour-title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 500;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.018em;
  line-height: 1.08;
  margin: 0;
  max-width: 22ch;
}
.tour-title em { font-style: italic; color: var(--primary); font-variation-settings: "opsz" 144, "SOFT" 100; }

.tour-meta-row {
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5);
  align-items: center;
}
.tour-meta-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px;
  color: var(--text-soft);
}
.tour-meta-item svg { width: 16px; height: 16px; color: var(--text-mute); }
.tour-meta-item strong { color: var(--text); font-weight: 600; }

.tour-actions {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
}
.icon-btn {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: white;
  display: grid; place-items: center;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { border-color: var(--text); color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }

/* Two-column layout */
.tour-layout {
  display: grid; gap: var(--s-7);
  grid-template-columns: 1fr;
  padding-top: var(--s-7);
}
@media (min-width: 980px) {
  .tour-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-7); }
}

.tour-map-col {
  position: relative;
}
@media (min-width: 980px) {
  .tour-map-col {
    position: sticky;
    top: calc(var(--header-h) + var(--s-5));
    align-self: start;
    height: calc(100vh - var(--header-h) - var(--s-7));
    max-height: 720px;
  }
}

.tour-map {
  position: relative;
  width: 100%; height: 100%;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    linear-gradient(180deg, #F0EBDD 0%, #E8E1CC 100%);
  box-shadow: var(--shadow-2);
}
.tour-map svg { width: 100%; height: 100%; }
.tour-map .map-controls {
  position: absolute;
  right: var(--s-4);
  top: var(--s-4);
  display: grid; gap: var(--s-2);
}
.tour-map .map-control {
  width: 38px; height: 38px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.tour-map .map-control:hover { color: var(--primary); }
.tour-map .map-legend {
  position: absolute;
  left: var(--s-4); bottom: var(--s-4);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: grid; gap: 6px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.tour-map .legend-row { display: flex; align-items: center; gap: 8px; }
.tour-map .legend-marker {
  width: 14px; height: 14px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 600; color: white;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 12px; bottom: 12px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-strong) 0 6px,
    transparent 6px 12px
  );
}
.stop {
  position: relative;
  padding: 0 0 var(--s-5) 0;
}
.stop-pin {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-route);
}
.stop[data-type="food"] .stop-pin { background: var(--accent); }
.stop[data-type="start"] .stop-pin,
.stop[data-type="end"] .stop-pin {
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.stop[data-type="end"] .stop-pin svg { width: 12px; height: 12px; }

.stop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stop-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.stop-card .stop-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3); flex-wrap: wrap;
  margin-bottom: var(--s-2);
}
.stop-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.014em;
  margin: 0;
}
.stop-card .stop-meta {
  display: inline-flex; gap: var(--s-3);
  font-size: 13.5px;
  color: var(--text-soft);
}
.stop-card .stop-meta .badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: 12px; font-weight: 500;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid var(--border);
}
.stop-card .stop-meta .badge-food { background: var(--accent-soft); border-color: rgba(249, 115, 91, 0.3); color: #B23D27; }
.stop-card .stop-meta .badge-free { background: var(--primary-tint); border-color: var(--primary-soft); color: var(--primary-dark); }

.stop-card p {
  margin: 0 0 var(--s-3) 0;
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.55;
}
.stop-card .practical {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--border);
  font-size: 14.5px;
  color: var(--text-soft);
}
.stop-card .practical-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
}
.stop-card .stop-foot {
  margin-top: var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  align-items: center;
}
.stop-card .stop-foot .link {
  font-size: 14px; font-weight: 500;
  color: var(--primary-dark);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.stop-card .stop-foot .link:hover { text-decoration: underline; }

/* Walking transition between stops */
.walk {
  position: relative;
  padding: var(--s-3) 0 var(--s-3) var(--s-2);
  display: flex; align-items: center; gap: var(--s-3);
  font-size: 13.5px;
  color: var(--text-soft);
  margin-left: -8px;
}
.walk svg { width: 14px; height: 14px; color: var(--text-mute); flex: none; }
.walk strong { color: var(--text); font-weight: 600; }

/* Affiliate inline card */
.affiliate-card {
  margin-left: -28px;
  background: linear-gradient(180deg, white 0%, var(--bg) 100%);
  border: 1px solid var(--primary-soft);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
  position: relative;
}
.affiliate-card::before {
  content: "Optional booking";
  position: absolute;
  top: -10px; left: var(--s-5);
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.affiliate-card .aff-row {
  display: grid; gap: var(--s-4);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 600px) {
  .affiliate-card .aff-row { grid-template-columns: 1fr auto; }
}
.affiliate-card h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
}
.affiliate-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-soft);
  max-width: 50ch;
}
.affiliate-card .aff-meta {
  margin-top: var(--s-3);
  display: flex; gap: var(--s-3); flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-mute);
}
.affiliate-card .aff-meta strong { color: var(--text); font-weight: 600; }
.affiliate-card .provider {
  display: inline-flex; align-items: center; gap: 5px;
}
.affiliate-card .provider .dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; display: inline-block; }

/* End-of-tour upgrade module */
.end-module {
  margin-left: -28px;
  margin-top: var(--s-5);
  background: var(--text);
  color: white;
  border-radius: var(--r-lg);
  padding: var(--s-6);
  position: relative;
  overflow: hidden;
}
.end-module::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(249, 115, 91, 0.2), transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(15, 118, 110, 0.3), transparent 60%);
  pointer-events: none;
}
.end-module > * { position: relative; }
.end-module h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.014em;
  margin: 0 0 var(--s-2) 0;
}
.end-module p { margin: 0 0 var(--s-4) 0; color: rgba(255, 255, 255, 0.78); }
.end-module-grid {
  display: grid; gap: var(--s-3);
  grid-template-columns: 1fr;
  margin-top: var(--s-5);
}
@media (min-width: 600px) { .end-module-grid { grid-template-columns: 1fr 1fr; } }
.end-option {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  padding: var(--s-4);
  text-decoration: none;
  color: white;
  display: grid; gap: 6px;
  transition: background 0.15s ease;
}
.end-option:hover { background: rgba(255, 255, 255, 0.1); }
.end-option .opt-title { font-family: var(--font-display); font-weight: 500; font-size: 17px; }
.end-option .opt-meta { font-size: 13px; color: rgba(255, 255, 255, 0.6); }

/* Save module */
.save-module {
  margin-top: var(--s-7);
  padding: var(--s-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  display: grid; gap: var(--s-5);
}
.save-module .save-head { display: grid; gap: var(--s-2); }
.save-module h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.014em;
  margin: 0;
}
.save-form {
  display: grid; gap: var(--s-3);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .save-form { grid-template-columns: 1fr auto; }
}

/* Disclaimer */
.disclaimer {
  margin-top: var(--s-6);
  padding: var(--s-4) var(--s-5);
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: var(--r-md);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  font-size: 13.5px;
  color: #8B5A00;
}
.disclaimer svg { width: 18px; height: 18px; color: var(--warning); flex: none; margin-top: 1px; }
.disclaimer strong { color: #6E4500; font-weight: 600; }

/* ---------- 20. Utilities ------------------------------------------------- */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap;
}

.divider {
  height: 1px; background: var(--border-soft);
  margin-block: var(--s-7);
}

/* Section header pattern */
.section-head {
  display: grid; gap: var(--s-3);
  max-width: 56ch;
  margin-bottom: var(--s-2);
}
.section-head.center { text-align: center; margin-inline: auto; }
.section-head .lede { margin-top: var(--s-2); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print — minimal */
@media print {
  .site-header, .site-footer, .tour-actions, .save-module { display: none; }
}
