/* ============================================
   RUTA CR — Sistema de diseño
   Paleta: asfalto + amarillo señal + rojo alto
   Tipografía: Barlow Condensed (rótulos de ruta) + Inter (lectura) + JetBrains Mono (datos)
   ============================================ */

:root {
  --asphalt: #1B1F23;
  --asphalt-light: #262B31;
  --asphalt-line: #33393f;
  --cream: #F5F3EE;
  --yellow: #FFC93C;
  --yellow-dim: #d9ac2c;
  --red: #E63946;
  --grey: #8A8F98;
  --white: #FFFFFF;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 4px;
  --max-width: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--asphalt);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ---------- Tipografía ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--asphalt);
  border-bottom: 1px solid var(--asphalt-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .dot { color: var(--yellow); }

.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--yellow);
  color: var(--asphalt);
}
.btn-primary:hover { background: var(--white); }

.btn-ghost {
  background: transparent;
  border-color: var(--asphalt-line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--asphalt);
  color: var(--asphalt);
}
.btn-outline-dark:hover { background: var(--asphalt); color: var(--cream); }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */

.hero {
  background: var(--asphalt);
  color: var(--cream);
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero .eyebrow { color: var(--yellow); margin-bottom: 14px; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--white);
  margin-bottom: 20px;
}

.hero h1 span { color: var(--yellow); }

.hero p.lead {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: #C8CBD1;
  max-width: 520px;
  margin-bottom: 34px;
}

.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* lane-line signature: dashed animated line running down the page */
.lane-line {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 6px;
  transform: translateX(-50%);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--yellow) 0px, var(--yellow) 34px,
    transparent 34px, transparent 64px
  );
  opacity: 0.16;
  animation: lane-scroll 3.2s linear infinite;
}
@keyframes lane-scroll {
  from { background-position-y: 0; }
  to { background-position-y: 64px; }
}

/* ---------- Ruta / KM markers section ---------- */

.route {
  position: relative;
  padding: 40px 0 20px;
}

.route::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--asphalt) 0px, var(--asphalt) 22px,
    transparent 22px, transparent 42px
  );
  opacity: 0.15;
  z-index: 0;
}

.km-stop {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto 84px;
  text-align: center;
}

.km-marker {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--asphalt);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border: 3px solid var(--yellow);
}

.km-stop h3 { font-size: 1.7rem; margin-bottom: 10px; }
.km-stop p { color: #4b5157; font-size: 1rem; }

/* ---------- Cards / auth panels ---------- */

.auth-wrap {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--asphalt);
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.auth-card {
  position: relative;
  z-index: 2;
  background: var(--cream);
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.auth-card .eyebrow { margin-bottom: 8px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--grey); font-size: 0.95rem; margin-bottom: 28px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #DAD6CB;
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--asphalt);
  transition: border-color 0.15s ease;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238A8F98'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%238A8F98' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--yellow-dim);
}

.field-hint { font-size: 0.78rem; color: var(--grey); margin-top: 5px; }
.field-hint a { color: var(--asphalt); font-weight: 600; border-bottom: 1px solid var(--yellow); }

.form-msg {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.form-msg.show { display: block; }
.form-msg.error { background: #fbe3e5; color: #9c1f2b; border: 1px solid #f3b6bb; }
.form-msg.success { background: #e7f6e9; color: #1e6b2e; border: 1px solid #b9e3bf; }

.auth-switch {
  margin-top: 22px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--grey);
}
.auth-switch a { color: var(--asphalt); font-weight: 600; border-bottom: 2px solid var(--yellow); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--asphalt);
  color: var(--grey);
  padding: 34px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero { padding: 60px 0 70px; }
  .auth-card { padding: 32px 24px; }
  .lane-line, .route::before { opacity: 0.1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lane-line { animation: none; }
  html { scroll-behavior: auto; }
}
