/* ============================================================
   tuneumaticotrail.com — Estilos globales
   ============================================================ */

/* VARIABLES */
:root {
  /* Fondos oscuros */
  --soil: #1e1a14;
  --dirt: #2a2318;
  --mud: #332b1e;

  /* Fondos claros */
  --sand: #f5f0e8;
  --sand-mid: #ede5d6;
  --sand-dark: #e0d4c0;

  /* Acento ámbar */
  --amber: #d4820a;
  --amber-light: #f0a020;

  /* Texto sobre fondos oscuros */
  --dust: #c8b99a;
  --chalk: #f5f0e8;
  --white: #faf8f4;
  --grey: #7a6e5e;

  /* Texto sobre fondos claros */
  --ink: #1e1a14;
  --ink-mid: #3d3528;
  --ink-light: #7a6e5e;

  /* Colores de estado */
  --green-trail: #3d5c35;
  --green-light: #5a8a52;
  --tag-on: #1e4a8a;
  --tag-off: #5a2200;
  --tag-wet: #0d4a5a;
}

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--sand);
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 64px;
  background: rgba(30,26,20,0.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212,130,10,0.2);
}

.logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--white);
  text-decoration: none;
}
.logo span { color: var(--amber); }

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
nav ul a {
  color: var(--dust);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
nav ul a:hover,
nav ul a.active { color: var(--amber-light); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--soil);
  padding: 3rem;
  border-top: 1px solid rgba(212,130,10,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
footer .logo { font-size: 1.2rem; }

.footer-links { display: flex; gap: 2rem; }
.footer-links a {
  font-size: 0.8rem;
  color: var(--grey);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--amber); }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(122,110,94,0.6);
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ============================================================
   SECCIONES — layout base
   ============================================================ */
section { padding: 5rem 3rem; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
}
/* Versión para secciones oscuras */
.section-dark .section-header h2 { color: var(--white); }

.section-header .section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212,130,10,0.5), transparent);
}
.section-header a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  white-space: nowrap;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn-primary {
  background: var(--amber);
  color: var(--soil);
  padding: 0.85rem 2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--amber-light); transform: translateY(-2px); }

.btn-ghost {
  color: var(--chalk);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(245,240,232,0.35);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--white); border-color: var(--white); }

.btn-dark {
  background: var(--soil);
  color: var(--amber-light);
  padding: 0.9rem 2.2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s;
  display: inline-block;
}
.btn-dark:hover { transform: translateY(-2px); }

/* ============================================================
   BADGES DE TIPO
   ============================================================ */
.tire-badge,
.tire-card-badge {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 1rem;
}
.badge-off   { background: rgba(90,34,0,0.6);    color: #ff8c42; border: 1px solid rgba(90,34,0,0.8); }
.badge-on    { background: rgba(30,74,138,0.5);   color: #74a9ff; border: 1px solid rgba(30,74,138,0.8); }
.badge-mixed { background: rgba(74,103,65,0.5);   color: #8fcf83; border: 1px solid rgba(74,103,65,0.8); }
.badge-wet   { background: rgba(13,74,90,0.5);    color: #5dd0e8; border: 1px solid rgba(13,74,90,0.8); }

/* ============================================================
   BARRAS DE MÉTRICAS
   ============================================================ */
.meters { display: flex; flex-direction: column; gap: 0.6rem; margin: 1.2rem 0; }

.meter-row { display: flex; align-items: center; gap: 0.8rem; }

.meter-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  width: 72px;
  flex-shrink: 0;
}
/* Sobre fondo oscuro */
.section-dark .meter-label { color: var(--grey); }

.meter-track {
  flex: 1;
  height: 4px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.section-dark .meter-track { background: rgba(255,255,255,0.08); }

.meter-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s ease;
}
.fill-off { background: linear-gradient(90deg, #8b4500, #ff8c42); }
.fill-on  { background: linear-gradient(90deg, #1e4a8a, #74a9ff); }
.fill-wet { background: linear-gradient(90deg, #0d4a5a, #5dd0e8); }
.fill-dur { background: linear-gradient(90deg, #3d6600, #8fcf30); }

.meter-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-mid);
  width: 30px;
  text-align: right;
}
.section-dark .meter-val { color: var(--dust); }

/* ============================================================
   SCORE CIRCLE
   ============================================================ */
.score-circle {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 2px solid var(--amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
}
.score-label {
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ============================================================
   TARJETAS DE NEUMÁTICO
   ============================================================ */
.tires-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2px;
  background: rgba(212,130,10,0.12);
}

.tire-card {
  background: var(--sand-mid);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.25s;
}
.tire-card:hover { background: var(--sand-dark); }
.tire-card.featured { grid-row: span 2; padding: 2.5rem; }

.tire-brand {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}
.tire-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.tire-card.featured .tire-name { font-size: 2.6rem; }

.tire-desc {
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.55;
  margin: 1rem 0 1.5rem;
}

.tire-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.tire-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}
.tire-price span { font-size: 0.85rem; color: var(--ink-light); font-family: 'Barlow', sans-serif; font-weight: 300; }

.card-link {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s;
}
.card-link:hover { gap: 0.7rem; }

/* ============================================================
   TABLA COMPARATIVA
   ============================================================ */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare-table th {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: left;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid rgba(212,130,10,0.2);
}
.compare-table th:not(:first-child) { text-align: center; }
.compare-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--dust);
  vertical-align: middle;
}
.compare-table td:first-child { font-weight: 500; color: var(--chalk); }
.compare-table td:not(:first-child) { text-align: center; }
.compare-table tr:hover td { background: rgba(212,130,10,0.04); }

.dot-fill { display: inline-flex; gap: 3px; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.dot.active       { background: var(--amber); }
.dot.active.blue  { background: #74a9ff; }
.dot.active.cyan  { background: #5dd0e8; }
.dot.active.green { background: #8fcf30; }

/* ============================================================
   TARJETAS DE ARTÍCULO
   ============================================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(212,130,10,0.12);
}
.article-card {
  background: var(--sand);
  padding: 2rem;
  cursor: pointer;
  transition: background 0.2s;
}
.article-card:hover { background: var(--sand-mid); }

.article-tag {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green-trail);
  margin-bottom: 0.7rem;
  display: block;
}
.article-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.8rem;
}
.article-excerpt {
  font-size: 0.85rem;
  color: var(--ink-mid);
  line-height: 1.6;
}
.article-meta {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--ink-light);
}
.meta-dot { width: 3px; height: 3px; background: var(--ink-light); border-radius: 50%; }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--sand-mid);
  border-top: 1px solid rgba(212,130,10,0.2);
  border-bottom: 1px solid rgba(212,130,10,0.2);
  display: flex;
  justify-content: center;
}
.stat {
  flex: 1;
  max-width: 260px;
  padding: 1.8rem 2rem;
  text-align: center;
  border-right: 1px solid rgba(212,130,10,0.15);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 0.3rem;
}

/* ============================================================
   TERRAIN TAGS
   ============================================================ */
.terrain-section {
  text-align: center;
  padding: 4rem 3rem;
  background: #433520;
}
.terrain-section h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 2.5rem;
  letter-spacing: -0.01em;
}
.terrain-tags { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.terrain-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--dust);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
}
.terrain-tag:hover,
.terrain-tag.active { background: var(--amber); color: var(--soil); border-color: var(--amber); }

/* ============================================================
   CTA STRIP
   ============================================================ */
.cta-strip {
  background: var(--amber);
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-strip h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--soil);
  line-height: 1;
  letter-spacing: -0.02em;
}
.cta-strip p { color: rgba(26,18,8,0.65); margin-top: 0.5rem; font-size: 0.95rem; }

/* ============================================================
   HERO (usado en home e interior de producto)
   ============================================================ */
.hero {
  min-height: calc(100vh - 64px - 140px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(212,130,10,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(74,103,65,0.10) 0%, transparent 50%),
    linear-gradient(160deg, #2e2418 0%, #3d3020 40%, #4a3a25 100%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 18px,
    rgba(212,130,10,0.03) 18px, rgba(212,130,10,0.03) 20px
  );
}
.hero-tireprint {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 28px solid rgba(212,130,10,0.07);
  box-shadow: 0 0 0 52px rgba(212,130,10,0.04), 0 0 0 80px rgba(212,130,10,0.02);
  animation: spin-slow 40s linear infinite;
}
.hero-tireprint::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 8px dashed rgba(212,130,10,0.12);
}
.hero-content { position: relative; max-width: 680px; }

.hero-tag {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(212,130,10,0.4);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.hero h1 em { font-style: normal; color: var(--amber); display: block; }
.hero p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--dust);
  max-width: 480px;
  margin-bottom: 2.5rem;
}
.hero-cta { display: flex; gap: 1rem; align-items: center; }

/* Hero compacto para páginas interiores */
.hero-inner {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 3rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #2e2418 0%, #3d3020 40%, #4a3a25 100%);
}
.hero-inner .hero-content { max-width: 860px; }
.hero-inner h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 0.8rem;
}
.hero-inner .breadcrumb {
  font-size: 0.8rem;
  color: var(--grey);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-inner .breadcrumb a { color: var(--amber); text-decoration: none; }
.hero-inner .breadcrumb a:hover { color: var(--amber-light); }

/* ============================================================
   SECCIONES OSCURAS (clase helper)
   ============================================================ */
.section-dark {
  background: #3a2e1e;
  color: var(--chalk);
}
.section-dark .section-header h2 { color: var(--white); }

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin-slow {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

.hero-tag  { animation: fadeUp 0.5s ease both 0.1s; }
.hero h1   { animation: fadeUp 0.6s ease both 0.25s; }
.hero p    { animation: fadeUp 0.6s ease both 0.4s; }
.hero-cta  { animation: fadeUp 0.6s ease both 0.55s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .tires-grid { grid-template-columns: 1fr; }
  .tire-card.featured { grid-row: span 1; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  nav ul { display: none; }
  .cta-strip { flex-direction: column; text-align: center; }
  .stats-bar { flex-wrap: wrap; }
  .hero-inner { padding: 0 2rem 2.5rem; }
}
@media (max-width: 600px) {
  section { padding: 3rem 1.5rem; }
  .hero { padding: 0 1.5rem 4rem; }
  .articles-grid { grid-template-columns: 1fr; }
  .terrain-section { padding: 3rem 1.5rem; }
  .cta-strip { padding: 2.5rem 1.5rem; }
  footer { padding: 2rem 1.5rem; }
  .footer-links { flex-wrap: wrap; gap: 1rem; }
}
