/* ==========================================================================
   Héroes del Timón — Sistema visual
   Paleta de marca (tomada del logo): NEGRO + ROJO + BLANCO
   ========================================================================== */
:root {
  /* Marca */
  --black: #171717;
  --black-deep: #0c0c0c;
  --black-soft: #2b2b2b;
  --red: #e11f26;
  --red-dark: #b5141a;

  /* Superficies y texto */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1a1a1a;
  --muted: #5f5f66;
  --border: #e6e6ea;
  --card: #ffffff;

  /* Alias de compatibilidad (código previo usaba estos nombres) */
  --navy: var(--black);
  --navy-deep: var(--black-deep);
  --navy-soft: var(--black-soft);
  --gold: var(--red);
  --gold-dark: var(--red-dark);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.16);
  --container: 1160px;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

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

/* ===== Utilidades ===== */
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--red);
  margin-bottom: .8rem;
}
.text-center { text-align: center; }
.highlight { color: var(--red); }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); box-shadow: 0 10px 24px rgba(225, 31, 38, .4); }
.btn--dark { background: var(--black); color: #fff; }
.btn--dark:hover { background: var(--black-deep); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn--outline:hover { background: var(--bg-alt); border-color: var(--red); color: var(--red); }
.btn--wa { background: #25d366; color: #fff; }
.btn--wa:hover { background: #1eb955; }
.btn--sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn--block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; }
.brand__img { height: 52px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav__link { color: var(--black); font-size: .95rem; font-weight: 600; }
.nav__link:hover { color: var(--red); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--black); border-radius: 3px; transition: .25s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(900px 500px at 82% -12%, rgba(225,31,38,.32), transparent 58%),
    radial-gradient(700px 400px at 8% 108%, rgba(225,31,38,.16), transparent 55%),
    linear-gradient(160deg, var(--black) 0%, var(--black-deep) 100%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: linear-gradient(to top left, var(--bg) 49%, transparent 51%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(4.5rem, 10vw, 7rem);
  max-width: 760px;
}
.hero__logo {
  height: clamp(84px, 14vw, 132px);
  width: auto;
  margin: 0 0 1.6rem;
}
.hero__title { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 900; letter-spacing: -.5px; }
.hero__subtitle { font-size: 1.18rem; color: rgba(255,255,255,.82); max-width: 620px; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero--center .hero__inner { margin-inline: auto; text-align: center; }
.hero--center .hero__actions { justify-content: center; }
.hero--center .hero__logo { margin-inline: auto; }

/* Hero con foto de fondo (home) */
.hero--photo {
  background:
    linear-gradient(90deg, rgba(8,8,10,.95) 0%, rgba(8,8,10,.78) 40%, rgba(8,8,10,.42) 100%),
    linear-gradient(0deg, rgba(8,8,10,.9) 2%, rgba(8,8,10,0) 42%),
    url("../assets/hero-truck.jpg") center right / cover no-repeat;
}
.hero__stats {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem;
  margin: 2.4rem 0 0; padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.16);
  list-style: none;
}
.hero__stats li { color: rgba(255,255,255,.82); font-size: .95rem; line-height: 1.25; }
.hero__stats b { display: block; color: var(--red); font-size: 1.55rem; font-weight: 900; }

/* ===== Secciones ===== */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--black); color: #fff; }
.section__head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }
.section__title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section--navy .section__title { color: #fff; }
.section__lead { color: var(--muted); font-size: 1.08rem; }
.section--navy .section__lead { color: rgba(255,255,255,.75); }

/* Encabezado de categoría (catálogo) */
.cat-head {
  display: flex; align-items: center; gap: .9rem;
  margin: 3.5rem 0 1.5rem;
  padding-bottom: .9rem;
  border-bottom: 3px solid var(--red);
}
.cat-head:first-of-type { margin-top: 0; }
.cat-head__icon {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  background: var(--black); color: #fff;
  border-radius: 12px; font-size: 1.4rem;
}
.cat-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; color: var(--black); }

/* ===== Grids ===== */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Cards ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(225,31,38,.35); }
.card__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(225,31,38,.16), rgba(225,31,38,.04));
  font-size: 1.7rem;
  margin-bottom: 1.1rem;
}
.card__icon svg { width: 28px; height: 28px; color: var(--red); }
.card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;      /* la caja se ajusta al ancho del logo */
  height: 64px;
  padding: 9px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  overflow: hidden;
}
.card__logo img { height: 100%; width: auto; max-width: 170px; object-fit: contain; display: block; }
.card__title { font-size: 1.2rem; margin-bottom: .5rem; color: var(--black); }
.card__text { color: var(--muted); margin: 0 0 1rem; font-size: .97rem; }
.card__text:last-child { margin-bottom: 0; }
.card__list { display: grid; gap: .5rem; margin: 0 0 1rem; }
.card__list li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: .95rem; }
.card__list li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.card__foot { margin-top: auto; padding-top: .5rem; }
.tag {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: .8rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  align-self: flex-start;
}

/* ===== Sección "¿Qué es?" — mockup de carnet ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.about__visual { width: 100%; max-width: 470px; margin-inline: auto; }
.about__content .section__title { text-align: left; margin-bottom: 1rem; }
.about__text { color: var(--muted); font-size: 1.05rem; }

.feature-list { display: grid; gap: 1.15rem; margin: 1.8rem 0 2rem; list-style: none; padding: 0; }
.feature-list li { display: flex; gap: .9rem; align-items: flex-start; }
.feature-list svg { flex: none; width: 26px; height: 26px; color: var(--red); margin-top: 2px; }
.feature-list p { margin: 0; color: var(--muted); font-size: .98rem; }
.feature-list b { color: var(--black); display: block; margin-bottom: .1rem; }

/* Imagen del carnet real (genérico) */
.carnet-img {
  display: block;
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2.5deg);
  transition: transform .35s ease;
}
.carnet-img:hover { transform: rotate(0deg) translateY(-5px); }

/* Carnet (mockup) */
.id-card {
  position: relative; overflow: hidden;
  aspect-ratio: 1.6 / 1;
  border-radius: 20px;
  background: linear-gradient(140deg, #212121 0%, #0b0b0b 72%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.1rem, 2.8vw, 1.7rem);
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  transform: rotate(-2.5deg);
  transition: transform .35s ease;
}
.id-card:hover { transform: rotate(0deg) translateY(-5px); }
.id-card__glow { position: absolute; inset: 0; background: radial-gradient(125% 85% at 100% 0%, rgba(225,31,38,.4), transparent 55%); pointer-events: none; }
.id-card > *:not(.id-card__glow) { position: relative; z-index: 1; }
.id-card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.id-card__logo { height: 34px; width: auto; }
.id-card__chip { width: 42px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #f0d688, #b8860b); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.id-card__label { display: block; font-size: .66rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); font-weight: 800; margin-bottom: .25rem; }
.id-card__name { display: block; font-size: clamp(1.05rem, 2.6vw, 1.4rem); font-weight: 800; letter-spacing: .3px; }
.id-card__foot { display: flex; align-items: flex-end; gap: 1.3rem; }
.id-card__field { display: grid; gap: 2px; }
.id-card__field small { font-size: .58rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.55); }
.id-card__field b { font-size: .95rem; font-weight: 700; }
.id-card__qr { margin-left: auto; width: 48px; height: 48px; border-radius: 8px; background: #fff; background-image: radial-gradient(#111 40%, transparent 44%); background-size: 8px 8px; }

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about__content .section__title { text-align: center; }
  .about__content .eyebrow { display: block; text-align: center; }
}

/* ===== Pasos ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.step { text-align: center; }
.step__num {
  width: 56px; height: 56px; margin: 0 auto 1rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--black-soft); color: #fff;
  font-weight: 900; font-size: 1.3rem;
  border: 3px solid var(--red);
}
.step__title { font-size: 1.1rem; color: var(--black); }
.section--navy .step__title { color: #fff; }
.step__text { color: var(--muted); font-size: .95rem; margin: 0; }
.section--navy .step__text { color: rgba(255,255,255,.75); }

/* ===== FAQ ===== */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 1rem; }
.faq__item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq__item.is-open { border-color: rgba(225,31,38,.4); }
.faq__q {
  width: 100%; text-align: left;
  padding: 1.15rem 1.3rem;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--black);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq__q::after { content: "+"; font-size: 1.4rem; color: var(--red); transition: transform .2s ease; }
.faq__item.is-open .faq__q::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { padding: 0 1.3rem 1.2rem; color: var(--muted); margin: 0; }

/* ===== Formulario embebido ===== */
.form-embed {
  max-width: 560px; margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: clamp(1rem, 3vw, 1.6rem);
}
.form__note { font-size: .82rem; color: var(--muted); text-align: center; margin: 0; }

/* ===== CTA band ===== */
.cta-band {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 560px; margin: 0 auto 1.8rem; font-weight: 500; }

/* ===== WhatsApp flotante ===== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(37,211,102,.45);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ===== Footer ===== */
.site-footer { background: var(--black-deep); color: rgba(255,255,255,.72); padding: 3rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer__logo { height: 58px; width: auto; margin-bottom: 1rem; }
.footer__brand p { font-size: .92rem; margin-top: .2rem; max-width: 34ch; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,.72); font-size: .92rem; display: block; padding: .25rem 0; }
.footer a:hover { color: var(--red); }
.footer__social { display: flex; gap: .8rem; margin-top: .8rem; }
.footer__social a { width: 38px; height: 38px; display: grid; place-items: center; background: rgba(255,255,255,.1); border-radius: 10px; padding: 0; }
.footer__social a:hover { background: var(--red); color: #fff; }
.footer__social svg { width: 18px; height: 18px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem; text-align: center; font-size: .85rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }

  .nav {
    position: fixed; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 1rem 20px 1.5rem;
    transform: translateY(-130%);
    transition: transform .28s ease;
    box-shadow: var(--shadow);
  }
  .nav.is-open { transform: translateY(0); }
  .nav__link { padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin-top: .8rem; }
  .nav-toggle { display: flex; }
}
@media (max-width: 480px) {
  .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}
