/* ==========================================================================
   BusEventos España — Design tokens
   Palette: deep navy + steel blue + warm road-amber accent
   Type: Fraunces (display) / Inter (body) / Space Mono (data & labels)
   Signature: "La Ruta" — an animated route line that threads the page,
   with origin/destination pins and stop-markers as section dividers.
   ========================================================================== */

:root {
  --navy-900: #0a1f3d;
  --navy-800: #0f2a4d;
  --navy-700: #12315c;
  --steel-500: #2c5c99;
  --steel-300: #6f93c2;
  --gold-500: #e4a93b;
  --gold-600: #c88f26;
  --gray-100: #f2f4f7;
  --gray-200: #e4e8ee;
  --gray-400: #a7b0bf;
  --ink: #0e1626;
  --white: #ffffff;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --shadow-card: 0 12px 32px -18px rgba(10, 31, 61, 0.35);
  --shadow-lift: 0 20px 48px -20px rgba(10, 31, 61, 0.45);
  --container: 1180px;
}

[data-theme="dark"] {
  --gray-100: #0d1830;
  --gray-200: #16223f;
  --white: #0a1220;
  --ink: #eef1f6;
  --gray-400: #7f8ba3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--navy-900);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 {
  color: var(--white);
}

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-block;
  margin-bottom: 0.9em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; }
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--gold-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-600); box-shadow: var(--shadow-lift); }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-ghost { background: var(--gray-100); color: var(--navy-900); }
.btn-ghost:hover { background: var(--gray-200); }

.btn-whatsapp { background: #1f7a5c; color: var(--white); }
.btn-whatsapp:hover { background: #185f47; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 31, 61, 0.92);
  backdrop-filter: blur(10px);
  color: var(--white);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
}
.logo .mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-500), var(--steel-300));
  display: grid; place-items: center;
  color: var(--navy-900);
  font-family: var(--font-mono);
  font-weight: 700;
}
nav.main-nav { display: flex; gap: 28px; }
nav.main-nav a {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover { color: var(--white); border-color: var(--gold-500); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.theme-toggle {
  background: none; border: 1px solid rgba(255,255,255,0.3);
  color: var(--white); width: 38px; height: 38px; border-radius: 999px;
  cursor: pointer; font-size: 1rem;
}
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 900px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn-outline { display: none; }
}

/* Hero + route line signature */
.hero {
  position: relative;
  background: radial-gradient(ellipse at top right, var(--navy-700), var(--navy-900) 60%);
  color: var(--white);
  overflow: hidden;
  padding: 120px 0 100px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .hero { padding: 100px 0 64px; } }

.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); color: var(--white); }
.hero .lead { font-size: 1.1rem; color: rgba(255,255,255,0.82); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.route-svg { width: 100%; height: auto; }
.route-line {
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  stroke-dashoffset: 0;
  animation: dash-flow 3.2s linear infinite;
}
@keyframes dash-flow { to { stroke-dashoffset: -180; } }
.route-pin { fill: var(--white); }
.route-pin.origin { fill: var(--steel-300); }
.route-pin.dest { fill: var(--gold-500); }
.route-label { font-family: var(--font-mono); font-size: 11px; fill: rgba(255,255,255,0.7); letter-spacing: 0.06em; }

.hero-stats {
  display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap;
}
.hero-stats div { font-family: var(--font-mono); }
.hero-stats strong { display: block; font-size: 1.6rem; color: var(--gold-500); }
.hero-stats span { font-size: 0.78rem; color: rgba(255,255,255,0.65); }

/* Stop-marker divider used between major sections */
.stop-divider {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
}
.stop-divider .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); flex: none; }
.stop-divider .line { flex: 1; height: 1px; background: var(--gray-200); }

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 980px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); background: var(--white); border-color: var(--gray-200); }
.service-card .ico { font-size: 1.6rem; margin-bottom: 12px; display: block; }
.service-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.service-card p { font-size: 0.86rem; color: var(--gray-400); margin-bottom: 14px; }
.service-card a.mini { font-family: var(--font-mono); font-size: 0.75rem; color: var(--steel-500); }

/* How it works — real sequence, numbered by design */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  counter-reset: step;
}
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--gold-600);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 10px;
}
.step h3 { font-size: 1rem; }
.step p { font-size: 0.88rem; color: var(--gray-400); }

/* Advantages */
.advantages {
  background: var(--navy-900);
  color: var(--white);
}
.advantages h2, .advantages .eyebrow { color: var(--white); }
.adv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 980px) { .adv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .adv-grid { grid-template-columns: 1fr; } }
.adv-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 22px;
}
.adv-card .ico { font-size: 1.4rem; }
.adv-card h3 { color: var(--white); font-size: 0.98rem; margin: 10px 0 6px; }
.adv-card p { color: rgba(255,255,255,0.65); font-size: 0.85rem; margin: 0; }

/* Calculator */
.calc-wrap {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
}
@media (max-width: 900px) { .calc-wrap { grid-template-columns: 1fr; padding: 28px; } }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-grid { grid-template-columns: 1fr; } }

label { font-size: 0.8rem; font-weight: 600; color: var(--navy-800); display: block; margin-bottom: 6px; }
[data-theme="dark"] label { color: var(--gray-400); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.92rem;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--steel-300); outline-offset: 1px; border-color: var(--steel-500); }
.field { margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }

.calc-result {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc-result .price { font-family: var(--font-mono); font-size: 2.4rem; color: var(--gold-500); margin: 6px 0; }
.calc-result .note { font-size: 0.78rem; color: rgba(255,255,255,0.6); }

/* Form */
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
}
@media (max-width: 640px) { .form-card { padding: 24px; } }
.radio-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.radio-row input { width: auto; }

.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; display: none; }
.form-status.ok { display: block; background: #e5f6ec; color: #1c6b45; border: 1px solid #bfe6cf; }
.form-status.err { display: block; background: #fdeceb; color: #9a2f26; border: 1px solid #f4c6c1; }

/* Testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }
.testi-card {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 24px;
}
.stars { color: var(--gold-500); letter-spacing: 2px; margin-bottom: 10px; }
.testi-card .who { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gray-400); margin-top: 10px; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); color: var(--gold-600); font-size: 1.2rem; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: 10px; color: var(--gray-400); font-size: 0.92rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-info-item .ico { font-size: 1.3rem; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--gray-200); }
.map-embed iframe { width: 100%; height: 260px; border: 0; display: block; }

/* Footer */
footer.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
footer h4 { color: var(--white); font-size: 0.9rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 14px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 8px; font-size: 0.88rem; }
footer a:hover { color: var(--gold-500); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 48px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.5);
}

/* Floating WhatsApp */
.float-whatsapp {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #1f7a5c;
  color: var(--white);
  display: grid; place-items: center;
  font-size: 1.6rem;
  box-shadow: 0 12px 28px -8px rgba(31,122,92,0.6);
  z-index: 60;
  transition: transform 0.2s ease;
}
.float-whatsapp:hover { transform: scale(1.08); }

/* Mobile nav drawer */
.mobile-drawer {
  position: fixed; inset: 0; background: var(--navy-900);
  z-index: 70; display: none; flex-direction: column;
  padding: 24px;
}
.mobile-drawer.open { display: flex; }
.mobile-drawer a { color: var(--white); font-size: 1.1rem; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-drawer .close-drawer { align-self: flex-end; background: none; border: none; color: var(--white); font-size: 1.8rem; cursor: pointer; }

/* Utility */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 6px 12px; border-radius: 999px;
  background: var(--gray-100); color: var(--navy-800);
}
