/* base.css — reset, tipografía, retícula y ritmo vertical */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.12;
  font-weight: 650;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p, li {
  max-width: 68ch;
}

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

a {
  color: var(--accent);
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* Retícula ------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}

/* Ritmo de secciones: filos de 1px + mucho aire ------------------ */

.section {
  padding-block: var(--space-7);
  border-top: 1px solid var(--line);
}

.section--tint {
  background: var(--surface-tint);
}

.section--ink {
  background: var(--ink);
  color: #E8ECF1;
}

.section--ink h2 {
  color: #fff;
}

/* Banda a sangre en tinta (petición del cliente: fondos #121921) */
.section--accent {
  background: var(--ink);
  color: #E8ECF1;
  border-top: 0;
}

.section--accent h2 {
  color: #fff;
}

.section--accent p {
  color: #C4CCD6;
}

/* dentro de tarjetas blancas sobre la banda accent, el texto vuelve a su color */
.section--accent .card p {
  color: var(--text);
}

.section--accent .card .card__price {
  color: var(--ink);
}

.section--hero {
  border-top: 0;
}

/* Hero oscuro (tinta): el header transparente pasa a texto claro */
.section--hero-dark {
  background: var(--ink);
  color: #E8ECF1;
}

.section--hero-dark h1 {
  color: #fff;
}

.section--hero-dark .lead {
  color: #B9C3CF;
}

.section--hero-dark .eyebrow {
  color: var(--accent-soft);
}

@media (max-width: 767px) {
  .section {
    padding-block: var(--space-6);
  }
}

@media (min-width: 1440px) {
  .section--deep {
    padding-block: var(--space-8);
  }
}

/* Eyebrow: Archivo condensada, solo con información real --------- */

.eyebrow {
  display: block;
  font-variation-settings: 'wdth' 80;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.lead {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 56ch;
}

/* Utilidades mínimas --------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: calc(-1 * var(--space-6));
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  transition: top 150ms ease-out;
}

.skip-link:focus {
  top: var(--space-3);
}

/* Revelado de secciones (reveal.js añade .is-visible) ------------ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms cubic-bezier(0.16, 1, 0.3, 1), transform 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger: los hijos directos de [data-stagger] entran en cascada.
   reveal.js les asigna --reveal-i. */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--reveal-i, 0) * 90ms);
}

.is-visible[data-stagger] > *,
[data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

/* Subrayado del H2 que se dibuja al entrar en viewport */
.h2-line {
  position: relative;
  padding-bottom: var(--space-3);
}

.h2-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1) 200ms;
}

.is-visible .h2-line::after,
.h2-line.is-visible::after {
  transform: scaleX(1);
}

/* Entrada orquestada del hero al cargar la página */
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-seq > * {
  animation: hero-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-seq > *:nth-child(1) { animation-delay: 60ms; }
.hero-seq > *:nth-child(2) { animation-delay: 160ms; }
.hero-seq > *:nth-child(3) { animation-delay: 280ms; }
.hero-seq > *:nth-child(4) { animation-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  [data-stagger] > * {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-seq > * {
    animation: none;
  }

  .h2-line::after {
    transform: scaleX(1);
    transition: none;
  }
}

/* Sin JS todo visible */
.no-js .reveal,
.no-js [data-stagger] > * {
  opacity: 1;
  transform: none;
}
