/* ---------- Fuentes (autoalojadas: sin peticiones a terceros) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --red: #a42325;
  --red-hover: #8b1c1e;
  --ink: #161616;
  --ink-soft: #2a2a2a;
  --text: #2b2b2b;
  --muted: #646464;
  --paper: #fafaf8;
  --sand: #f1efea;
  --line: #e3e0da;
  --white: #fff;
  --radius: 4px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 52px; padding: 0.85em 1.8em;
  font: 600 0.95rem/1 var(--font-body);
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.btn-ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-white { background: var(--white); color: var(--red); }
.btn-white:hover { background: var(--ink); color: var(--white); }
.btn-sm { min-height: 40px; padding: 0.6em 1.1em; font-size: 0.8rem; }

/* ---------- Cabecera ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  color: var(--white);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 84px;
}
.logo { display: inline-flex; flex: none; }
.logo img { width: 132px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.nav a:not(.btn) {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; opacity: .9;
}
.nav a:not(.btn):hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

/* Cabecera sólida (páginas interiores) */
.site-header.solid { position: relative; background: var(--ink); }

@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .logo img { width: 112px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 2; }
.hero h1 { color: var(--white); margin-bottom: 0.3em; }
.hero p { color: rgba(255, 255, 255, .86); max-width: 40ch; font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none;
  font-size: 0.85rem; letter-spacing: 0.06em; color: rgba(255, 255, 255, .75);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 6px; height: 6px; background: var(--red); transform: rotate(45deg); }

@media (min-width: 861px) {
  .hero { min-height: min(100svh, 920px); display: flex; align-items: flex-end; }
  .hero-media { position: absolute; inset: 0; }
  .hero-media::after {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(to top, rgba(10, 10, 10, .88) 0%, rgba(10, 10, 10, .55) 32%, rgba(10, 10, 10, 0) 62%),
      linear-gradient(to bottom, rgba(10, 10, 10, .45) 0%, rgba(10, 10, 10, 0) 18%);
  }
  .hero-content { padding-block: 120px clamp(56px, 8vh, 96px); }
}
@media (max-width: 860px) {
  .hero { padding-top: 84px; }
  .hero-media { position: relative; aspect-ratio: 4 / 3; }
  .hero-media img { object-position: 50% 15%; }
  .hero-content { padding-block: 36px 56px; }
}

/* ---------- Ventajas ---------- */
.features { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); background: var(--line); border: 1px solid var(--line); }
.feature { background: var(--white); padding: clamp(28px, 3vw, 40px); }
.feature-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px;
  color: var(--red); background: var(--sand);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature p { color: var(--muted); margin: 0; font-size: 1rem; }

.uses { display: flex; flex-wrap: wrap; gap: 10px; margin: 40px 0 0; padding: 0; list-style: none; }
.uses li {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.9rem; background: var(--white);
}

/* ---------- Banner de marca ---------- */
.brand-banner { background: var(--ink); }
.brand-banner img { width: 100%; aspect-ratio: 2910 / 900; object-fit: cover; }

/* ---------- Producto / especificaciones ---------- */
.split { display: grid; gap: clamp(32px, 6vw, 80px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1.05fr 1fr; } }

.specs { width: 100%; border-collapse: collapse; font-size: 1rem; }
.specs th, .specs td { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 42%; font-weight: 500; color: var(--muted); padding-right: 16px; }
.specs td { color: var(--ink); font-weight: 500; }

.note {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--red);
  padding: clamp(24px, 3vw, 36px);
}
.note h3 { margin-bottom: 0.6em; }
.note p { color: var(--muted); }
.note p:last-child { margin-bottom: 0; }
.note .btn { margin-top: 12px; }

/* ---------- Instalación ---------- */
.section-sand { background: var(--sand); }
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; margin: 0; padding: 0; list-style: none; }
.step { background: var(--white); padding: 32px 28px; position: relative; }
.step img { width: 112px; height: 112px; margin-bottom: 22px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 22px; right: 26px;
  font: 600 2.4rem/1 var(--font-display); color: var(--line);
}
.step h3 { margin-bottom: 0.4em; }
.step p { margin: 0; color: var(--muted); font-size: 1rem; }
.steps-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 40px; }
.steps-cta p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Nueva colección ---------- */
.collection { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .collection { grid-template-columns: 1.6fr 1fr; } }
.collection img { width: 100%; aspect-ratio: 2563 / 975; object-fit: cover; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--red); border-bottom: 2px solid var(--red);
  transform: translateY(-3px) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; max-width: 70ch; }

/* ---------- CTA final ---------- */
.cta-band { background: var(--red); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, .88); max-width: 52ch; margin: 0 auto 32px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .72); font-size: 0.92rem; padding-block: 56px 36px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .logo img { width: 120px; margin-bottom: 16px; }
.site-footer h2 {
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.16em; color: var(--white); margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.82rem;
}

/* ---------- Páginas interiores ---------- */
.page-hero { background: var(--ink); color: var(--white); padding-block: 48px 64px; }
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(255, 255, 255, .78); margin: 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.9rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose a { color: var(--red); }

.manual-preview {
  display: block; background: var(--white); border: 1px solid var(--line); padding: clamp(12px, 2vw, 24px);
  transition: box-shadow .2s;
}
.manual-preview:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, .08); }
.warning {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff6f5; border: 1px solid #f1d1cf; padding: 20px 22px; margin-top: 32px;
}
.warning svg { flex: none; width: 26px; height: 26px; color: var(--red); margin-top: 2px; }
.warning p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.center-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.center-page .lead { margin-inline: auto; }
.center-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
