/* =========================================================================
   DT AUTOPRO · ASESOR DE NEUMÁTICOS — Sistema de diseño
   Mobile-first. Identidad: rojo #d62829, negro #111, crema, tipografía Archivo/
   Hanken Grotesk/IBM Plex Mono. Estética automoción premium, limpia y sobria.
   ========================================================================= */

:root {
  --red: #d62829;
  --red-700: #b01f20;
  --ink: #111111;
  --ink-soft: #16171c;
  --ink-2: #1d1f26;
  --paper: #ffffff;
  --cream: #fafbf6;
  --grey-50: #f5f5f2;
  --grey-100: #eeeeea;
  --grey-200: #e2e2dc;
  --grey-300: #c9cbd1;
  --grey-400: #a4a7ad;
  --grey-500: #6b6e76;
  --grey-600: #52555c;

  --ok: #2f8f4e;
  --warn: #b8791f;

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 6px 20px -14px rgba(17, 17, 17, .35);
  --shadow: 0 18px 50px -26px rgba(17, 17, 17, .45);
  --ring: 0 0 0 3px rgba(214, 40, 41, .32);

  --ff-head: "Archivo", system-ui, sans-serif;
  --ff-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--ff-head); line-height: 1.12; margin: 0; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--red); margin: 0 0 .5rem; display: inline-flex; align-items: center; gap: .55rem; font-weight: 600;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--red); display: inline-block; }
.eyebrow--onred { color: #ff6a6b; }
.eyebrow--onred::before { background: #ff6a6b; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--grey-200); position: sticky; top: 0; z-index: 60; }
.site-header__inner { display: flex; align-items: center; gap: .9rem; height: 66px; }
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 40px; width: auto; display: block; }
.site-header__tag { margin-left: auto; font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--grey-500); padding-left: .6rem; border-left: 2px solid var(--red); line-height: 1.2; }

/* ---------- Hero ---------- */
.hero { background: var(--ink-soft); color: #f3f3ef; padding: 30px 0 34px; position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); }
.hero__title { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 800; max-width: 16ch; }
.hero__lede { color: #b9bac0; margin: .9rem 0 0; max-width: 56ch; font-size: 1rem; }
.hero__points { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem .7rem; padding: 0; margin: 1.1rem 0 0; }
.hero__points li { font-size: .82rem; color: #e7e7e2; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); padding: .3rem .7rem; border-radius: 999px; }
.hero__points li::before { content: "✓ "; color: #ff6a6b; font-weight: 700; }

/* ---------- Layout principal ---------- */
.main { padding: 22px 0 40px; }
.app-shell {
  background: var(--paper); border: 1px solid var(--grey-200); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 16px 22px; margin-top: -30px; position: relative;
}

/* ---------- Botones ---------- */
.btn {
  --bg: var(--ink); --fg: #fff; --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font-weight: 700; font-size: .95rem; padding: .8rem 1.1rem; border-radius: var(--radius-sm);
  cursor: pointer; transition: transform .14s ease, background .14s ease, border-color .14s, opacity .14s;
  min-height: 48px; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn-red { --bg: var(--red); } .btn-red:hover { background: var(--red-700); }
.btn-dark { --bg: var(--ink); } .btn-dark:hover { background: #000; }
.btn-outline { --bg: transparent; --fg: var(--ink); --bd: var(--grey-300); }
.btn-outline:hover { border-color: var(--ink); }
.btn--wide { flex: 1; }
.btn--sm { min-height: 40px; padding: .5rem .85rem; font-size: .85rem; }

/* ---------- Iconos ---------- */
.icon { display: inline-flex; width: 22px; height: 22px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.icon--sm { width: 16px; height: 16px; }

/* =========================================================================
   CUESTIONARIO
   ========================================================================= */
.progress { height: 6px; background: var(--grey-100); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.progress__bar { height: 100%; background: var(--red); border-radius: 999px; transition: width .35s ease; }

.step__head { margin-bottom: 18px; }
.step__title { font-size: clamp(1.3rem, 4.5vw, 1.7rem); font-weight: 800; }
.step__sub { color: var(--grey-600); margin: .5rem 0 0; font-size: .95rem; }
.step__note { display: flex; align-items: flex-start; gap: .45rem; margin: .8rem 0 0; font-size: .85rem; color: var(--grey-600); background: #eef4ee; border: 1px solid #cfe3d4; border-radius: var(--radius-sm); padding: .55rem .7rem; }
.step__note .icon { color: var(--ok); margin-top: 1px; flex: none; }
.step__body { display: grid; gap: 18px; }
.step__nav { display: flex; gap: 10px; margin-top: 24px; }
.step__nav .btn-outline { flex: none; min-width: 96px; }

.field__label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .55rem; }
.field__help { color: var(--grey-500); font-size: .82rem; margin: .5rem 0 0; }

/* Tarjetas de opción */
.cards { display: grid; gap: 10px; }
.cards--1 { grid-template-columns: 1fr; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(2, 1fr); }
.card-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left;
  background: var(--paper); border: 1.5px solid var(--grey-200); border-radius: var(--radius-sm);
  padding: 14px 14px; cursor: pointer; transition: border-color .14s, box-shadow .14s, transform .14s;
  min-height: 84px; color: var(--ink);
}
.card-opt:hover { border-color: var(--grey-400); transform: translateY(-2px); }
.card-opt:focus-visible { outline: none; box-shadow: var(--ring); }
.card-opt.is-selected { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow-sm); background: #fff; }
.card-opt__icon { color: var(--ink); width: 30px; height: 30px; }
.card-opt.is-selected .card-opt__icon { color: var(--red); }
.card-opt__label { font-family: var(--ff-head); font-weight: 700; font-size: 1rem; }
.card-opt__desc { color: var(--grey-600); font-size: .82rem; line-height: 1.35; }

/* Segmented / píldoras */
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.seg {
  flex: 1 1 auto; min-width: max-content; background: var(--paper); border: 1.5px solid var(--grey-200);
  border-radius: 999px; padding: .6rem 1rem; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink);
  transition: border-color .14s, background .14s, color .14s; min-height: 44px;
}
.seg:hover { border-color: var(--grey-400); }
.seg:focus-visible { outline: none; box-shadow: var(--ring); }
.seg.is-selected { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Sliders */
.field--slider { background: var(--grey-50); border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 12px 14px; }
.slider__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.slider__head .field__label { margin: 0; }
.slider__value { font-family: var(--ff-mono); font-size: .78rem; color: var(--red); font-weight: 600; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--grey-200); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--red); border: 3px solid #fff; cursor: pointer; }
.slider:focus-visible { box-shadow: var(--ring); }

/* Selector de medida */
.size-field { background: var(--grey-50); border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 16px 14px; }
.size-row { display: flex; align-items: flex-end; gap: 8px; }
.size-col { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 0; }
.size-col__cap { font-size: .7rem; color: var(--grey-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.size-select { width: 100%; min-height: 52px; padding: .5rem .6rem; border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm); background: #fff; font-family: var(--ff-mono); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.size-select:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--red); }
.size-sep { font-family: var(--ff-head); font-weight: 800; font-size: 1.3rem; color: var(--grey-400); padding-bottom: .6rem; }
.size-hint { color: var(--grey-500); font-size: .8rem; margin: .7rem 0 0; }
.size-adv { margin-top: 14px; border-top: 1px dashed var(--grey-300); padding-top: 12px; }
.size-adv__toggle { background: none; border: none; color: var(--red); font-weight: 700; font-size: .85rem; cursor: pointer; padding: .3rem 0; }
.size-row--adv { margin-top: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.size-warn { margin-top: 12px; font-size: .85rem; background: #fff5e6; border: 1px solid #f0d9ad; color: var(--warn); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.size-warn--ok { background: #eaf6ee; border-color: #b9e0c6; color: var(--ok); display: flex; align-items: center; gap: .4rem; }

/* =========================================================================
   RESULTADOS
   ========================================================================= */
.results__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.results__title { font-size: clamp(1.35rem, 5vw, 1.9rem); font-weight: 800; }

/* Perfil */
.profile { background: var(--ink-soft); color: #f2f2ee; border-radius: var(--radius); padding: 18px 16px; display: grid; gap: 16px; margin-bottom: 18px; }
.profile__h { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; color: #fff; }
.profile__h .icon { color: var(--red); }
.profile__text { color: #c9cacf; margin: .7rem 0 0; font-size: .96rem; }
.profile__facts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: .9rem; }
.profile__facts .chip { background: rgba(255, 255, 255, .12); color: #eceded; }
.profile__facts .chip--mono { font-family: var(--ff-mono); background: #fff; color: var(--ink); }
.profile__facts .chip--ev { background: #e7f3ec; color: var(--ok); }
.profile__scores { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }

/* Ratings */
.rating__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .25rem; }
.rating__label { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; }
.rating__label .icon { color: var(--grey-500); }
.rating__val { font-family: var(--ff-mono); font-size: .78rem; font-weight: 600; color: var(--grey-600); }
.rating__track { height: 7px; background: var(--grey-100); border-radius: 999px; overflow: hidden; }
.rating__fill { height: 100%; background: linear-gradient(90deg, var(--red-700), var(--red)); border-radius: 999px; transition: width .5s ease; }
.rating--compact .rating__label { font-size: .76rem; }
.profile .rating__track { background: rgba(255, 255, 255, .14); }
.profile .rating__label, .profile .rating__val { color: #d7d8dc; }

/* Anillo de encaje */
.ring { flex: none; }
.ring__bg { fill: none; stroke: var(--grey-100); stroke-width: 8; }
.ring__fg { fill: none; stroke: var(--red); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .7s ease; }
.ring__num { font-family: var(--ff-head); font-weight: 800; font-size: 26px; fill: var(--ink); text-anchor: middle; dominant-baseline: middle; }
.ring__pct { font-size: 13px; fill: var(--grey-500); }
.ring__cap { font-family: var(--ff-mono); font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; fill: var(--grey-400); text-anchor: middle; }

/* Tarjetas de neumático */
.pick-grid { display: grid; gap: 14px; }
.pick-grid__alts { display: grid; gap: 14px; }
.tire-card { background: var(--paper); border: 1.5px solid var(--grey-200); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.tire-card--featured { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow); }
.tire-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tire-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tire-card__brand { font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-500); margin: 0; }
.tire-card__model { font-size: 1.3rem; font-weight: 800; margin: .1rem 0 .5rem; }
.tire-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tire-card__bars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 16px; }
.tire-card--featured .tire-card__model { font-size: 1.5rem; }

/* Chips / badges */
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; background: var(--grey-100); color: var(--grey-600); }
.chip--ev { background: #e7f3ec; color: var(--ok); }
.chip--season.chip--summer { background: #fdecdc; color: #b8631f; }
.chip--season.chip--allseason { background: #e6f0ea; color: #2f7d52; }
.chip--season.chip--winter { background: #e4eef7; color: #2564a0; }
.role-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 800; padding: .3rem .65rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.role-badge--primary { background: var(--red); color: #fff; }
.role-badge--value { background: #113; color: #fff; background: var(--ink); }
.role-badge--premium { background: #efe3c8; color: #7a5a12; }
.price-dots { display: inline-flex; gap: 3px; align-items: center; }
.price-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey-200); }
.price-dot.is-on { background: var(--ink); }

/* ¿Por qué? */
.why { margin-top: 16px; background: var(--grey-50); border: 1px solid var(--grey-200); border-radius: var(--radius-sm); padding: 12px 14px; }
.why__h { font-family: var(--ff-head); font-weight: 700; font-size: .92rem; margin: 0 0 .5rem; }
.why__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.why__list li { display: flex; gap: .5rem; font-size: .88rem; color: var(--grey-600); align-items: flex-start; }
.why__list .icon { color: var(--ok); margin-top: 1px; }

/* Pros / contras */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.proscons__h { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin: 0 0 .4rem; }
.proscons__h--pro { color: var(--ok); } .proscons__h--con { color: var(--warn); }
.proscons ul { margin: 0; padding-left: 1.05rem; display: grid; gap: .25rem; }
.proscons li { font-size: .84rem; color: var(--grey-600); }

/* Comparativa */
.compare { margin-top: 22px; }
.compare__h { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.compare__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--grey-200); border-radius: var(--radius); }
.compare__table { width: 100%; border-collapse: collapse; min-width: 460px; }
.compare__table th, .compare__table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--grey-100); }
.compare__table thead th { background: var(--grey-50); position: sticky; top: 0; }
.compare__brand { display: block; font-family: var(--ff-mono); font-size: .68rem; text-transform: uppercase; color: var(--grey-500); }
.compare__model { display: block; font-family: var(--ff-head); font-weight: 700; font-size: .9rem; }
.compare__rowh { text-align: left; font-weight: 700; font-size: .84rem; color: var(--grey-600); white-space: nowrap; }
.compare__table td.is-best { background: #fdf0f0; }
.minibar { display: inline-flex; align-items: center; gap: .4rem; width: 100%; }
.minibar__fill { height: 6px; border-radius: 999px; background: var(--red); flex: none; }
.minibar__num { font-family: var(--ff-mono); font-size: .72rem; color: var(--grey-600); }

/* CTA */
.cta { margin-top: 24px; background: var(--ink); color: #fff; border-radius: var(--radius); overflow: hidden; position: relative; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0, rgba(214, 40, 41, .35), transparent 55%); }
.cta__inner { position: relative; padding: 22px 18px; }
.cta__h { font-size: 1.4rem; font-weight: 800; }
.cta__sub { color: #c4c5ca; margin: .5rem 0 1rem; font-size: .95rem; }
.cta__actions { display: grid; gap: 10px; }
/* En el CTA (fondo oscuro) los botones secundarios van en estilo ghost claro */
.cta .btn-dark, .cta .btn-outline {
  --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .5);
}
.cta .btn-dark:hover, .cta .btn-outline:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.cta__loc { margin: 1rem 0 0; font-family: var(--ff-mono); font-size: .76rem; color: var(--grey-400); }

.disclaimer { color: var(--grey-500); font-size: .78rem; margin: 18px 2px 0; line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--grey-300); padding: 20px 0; margin-top: 10px; }
.site-footer__inner { display: grid; gap: .3rem; font-size: .82rem; }
.site-footer__mini { color: var(--grey-500); font-size: .76rem; }

/* =========================================================================
   RESPONSIVE — tablet / desktop
   ========================================================================= */
@media (min-width: 560px) {
  .container { padding-inline: 22px; }
  .site-header__inner { height: 78px; }
  .brand__logo { height: 54px; }
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
  .cta__actions { grid-template-columns: repeat(2, 1fr); }
  .cta__actions .btn--wide { grid-column: 1 / -1; }
}
@media (min-width: 820px) {
  .app-shell { padding: 30px 28px 32px; }
  .profile { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 24px; }
  .profile__scores { gap: 10px 20px; }
  .pick-grid { grid-template-columns: 1.15fr .85fr; align-items: start; }
  .pick-grid__alts { grid-template-columns: 1fr; }
  .tire-card__bars { grid-template-columns: 1fr 1fr; }
  .cta__inner { padding: 30px; }
  .cta__h { font-size: 1.7rem; }
  .step__body { max-width: 720px; }
}
@media (min-width: 1024px) {
  .hero { padding: 44px 0 48px; }
}

@media (max-width: 400px) {
  .site-header__inner { height: 58px; gap: .6rem; }
  .brand__logo { height: 32px; }
  .site-header__tag { font-size: .62rem; letter-spacing: .08em; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
