/* ══════════════════════════════════════════════════════════════════════════
   CASA VETA — hoja de estilos única
   BEM: block__element--modifier · estados .is-* (los alterna el JS)
   Los hooks .js-* NUNCA se estilizan.

   TABLA DE CONTENIDOS
   01 · Tokens (:root) y fuentes
   02 · Reset y base
   03 · Accesibilidad
   04 · Tipografía compartida (kicker, display, link-arrow)
   05 · Encabezado y navegación
   06 · Hero
   07 · Intro (01 — Casa Veta)
   08 · Colecciones
   09 · Catálogo
   10 · En uso
   11 · El taller
   12 · A medida
   13 · Cuidado de la piedra
   14 · Pie de página
   15 · Revelado (fail-safe)
   16 · Páginas legales (.page-legal)
   17 · Impresión
   ══════════════════════════════════════════════════════════════════════════ */


/* ══ 01 · TOKENS ═════════════════════════════════════════════════════════ */

:root {
  /* Paleta del manual de marca (valores exactos, en hex por fidelidad). */
  --cream:     #F4EEE4;   /* Blanco cálido */
  --earth:     #55412E;   /* Café tierra */
  --graphite:  #2A2521;   /* Grafito */
  --stone:     #998B77;   /* Piedra */
  --sand:      #E8DFD0;   /* Arena */
  --gold:      #B5985F;   /* Dorado veta */
  --white:     #FFFFFF;

  /* Superficies */
  --bg:           var(--cream);
  --surface:      var(--white);
  --surface-deep: var(--sand);
  --ink:          var(--graphite);

  /* Escala semántica de texto.
     Piedra y Dorado no llegan a 4.5:1 en texto pequeño sobre crema/café;
     para TEXTO se usan variantes del mismo tono que sí cumplen WCAG AA.
     Para volver a los valores exactos del diseño: --text-faint: var(--stone),
     --text-accent: var(--gold), --on-dark-faint: var(--stone), --on-dark-accent: var(--gold). */
  --text-clear:      var(--ink);
  --text-mid:        var(--earth);
  --text-faint:      #75685A;   /* piedra AA sobre crema (4.6:1) */
  --text-accent:     #7A6442;   /* dorado AA sobre crema (4.6:1) */
  --text-invert:     var(--cream);
  --on-dark-soft:    var(--sand);
  --on-dark-faint:   #C2B6A3;   /* piedra AA sobre café (4.7:1) */
  --on-dark-accent:  #D2B884;   /* dorado AA sobre café (5.0:1) */

  /* Líneas */
  --line:         var(--sand);
  --line-strong:  var(--graphite);
  --line-invert:  color-mix(in oklch, var(--cream) 18%, transparent);

  /* Tipografía — fallback encadenado */
  --font-sans:    "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Escala tipográfica (la del diseño) */
  --text-label:   10px;
  --text-xs:      12px;
  --text-sm:      14px;
  --text-base:    15px;
  --display-xl:   clamp(44px, 6.4vw, 104px);
  --display-lg:   clamp(40px, 4.5vw, 64px);
  --display-md:   clamp(36px, 3.6vw, 48px);

  --track-label:  0.26em;
  --track-wide:   0.32em;
  --track-brand:  0.4em;

  /* Ritmo y medida */
  --radius:     0;
  --pad-x:      clamp(24px, 5vw, 72px);
  --maxw:       1440px;
  --measure:    68ch;
  --section-y:  clamp(72px, 9vw, 120px);
  --header-h:   80px;

  /* Sombras por rol */
  --shadow-soft: 0 1px 2px color-mix(in oklch, var(--ink) 8%, transparent);
  --shadow-base: 0 18px 40px -24px color-mix(in oklch, var(--ink) 45%, transparent);

  /* Velos de foto */
  --veil-strong: color-mix(in srgb, var(--graphite) 78%, transparent);
  --veil-mid:    color-mix(in srgb, var(--graphite) 70%, transparent);

  --focus: var(--earth);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Fuentes self-hosted (variables, subset latin): solo 300–400 y la itálica 300. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-var.woff2") format("woff2");
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-italic-var.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-var.woff2") format("woff2");
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}


/* ══ 02 · RESET Y BASE ═══════════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text-clear);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: normal;   /* como el diseño: solo los párrafos fijan su interlineado */
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--earth); text-decoration: none; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
a:hover { color: var(--gold); }

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

ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

address { font-style: normal; }

button { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }


/* Encuadre puntual de fotos (object-position) sin CSS inline: data-pos="X-Y". */
[data-pos="40-50"] { --pos: 40% 50%; }
[data-pos="42-50"] { --pos: 42% 50%; }
[data-pos="50-40"] { --pos: 50% 40%; }
[data-pos="50-60"] { --pos: 50% 60%; }
[data-pos="50-70"] { --pos: 50% 70%; }
[data-pos="55-50"] { --pos: 55% 50%; }


/* ══ 03 · ACCESIBILIDAD ══════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100%;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--text-invert);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
}
.skip-link:focus-visible { top: 0.5rem; color: var(--text-invert); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* En secciones oscuras el foco se dibuja en crema. */
.hero, .intro__seal, .workshop, .site-footer { --focus: var(--cream); }


/* ══ 04 · TIPOGRAFÍA COMPARTIDA ══════════════════════════════════════════ */

/* Kicker/eyebrow: etiqueta de sección. */
.kicker {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 400;
  line-height: normal;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--text-faint);
}
.kicker--light { color: var(--sand); }
.kicker--gold  { color: var(--on-dark-accent); }
.kicker--muted { color: var(--on-dark-faint); letter-spacing: var(--track-label); }
.kicker--flush { letter-spacing: 0.24em; }

/* Títulos de sección en Cormorant Light */
.display {
  font-size: var(--display-lg);
  line-height: 1;
  color: var(--text-clear);
}

/* Enlace "texto → " con subrayado inferior (CTA del diseño) */
.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid currentColor;
  color: var(--earth);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  white-space: nowrap;
}
/* Área táctil de 44px sin alterar la medida del diseño */
.link-arrow::before { content: ""; position: absolute; inset: -12px -8px -4px; }
.link-arrow:hover { color: var(--gold); }
.link-arrow__arrow {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 0;
  transition: transform 0.3s var(--ease);
}
.link-arrow:hover .link-arrow__arrow { transform: translateX(4px); }

.link-arrow--light {
  color: var(--cream);
  border-bottom-color: color-mix(in srgb, var(--cream) 60%, transparent);
}
.link-arrow--light:hover { color: var(--cream); border-bottom-color: var(--cream); }


/* ══ 05 · ENCABEZADO Y NAVEGACIÓN ════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-soft); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  padding: 12px var(--pad-x);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: var(--graphite);
}
.brand:hover { color: var(--graphite); }
.brand__iso { width: 15px; height: 36px; flex: none; color: var(--earth); }
.brand__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: var(--track-brand);
  text-transform: uppercase;
  line-height: 1;
}

/* Hamburguesa → X: tres <span>, sin iconos externos. */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--graphite);
  cursor: pointer;
}
.nav-toggle__box { position: relative; display: block; width: 22px; height: 13px; }
.nav-toggle__box span {
  position: absolute;
  left: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__box span:nth-child(1) { top: 0; }
.nav-toggle__box span:nth-child(2) { top: 6px; }
.nav-toggle__box span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__list { display: flex; gap: 32px; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--earth);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.nav__link--wa { color: var(--text-faint); }

/* Escritorio */
@media (min-width: 861px) {
  .nav-toggle { display: none; }
}

/* Móvil: panel desplegable. Sin JS el menú permanece visible (no display:none). */
@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .brand__name { font-size: 19px; letter-spacing: 0.32em; }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    padding: 8px var(--pad-x) 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-base);
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__item + .nav__item { border-top: 1px solid var(--line); }
  .nav__link { min-height: 52px; width: 100%; font-size: 11px; }

  /* El JS colapsa el menú solo cuando confirmó que puede volver a abrirlo. */
  body.nav-ready .nav { display: none; }
  body.nav-ready .nav.is-open { display: block; }
}


/* ══ 06 · HERO ═══════════════════════════════════════════════════════════
   Foto como <img> real (no background-image): el preloader la descubre.
   ══════════════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  height: min(92vh, 880px);
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: var(--graphite);
  color: var(--cream);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--graphite) 15%, transparent) 0%,
    color-mix(in srgb, var(--graphite) 5%, transparent) 40%,
    var(--veil-strong) 100%
  );
}

.hero__inner {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: clamp(40px, 6vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 760px;
}

.hero__title {
  font-size: var(--display-xl);
  line-height: 0.96;
  color: var(--cream);
}


/* ══ 07 · INTRO (01 — CASA VETA) ═════════════════════════════════════════ */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: stretch;
}

.intro__body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: clamp(64px, 8vw, 112px) var(--pad-x);
}

.intro__title { font-size: clamp(40px, 4.4vw, 68px); }

.intro__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 32px;
  max-width: 820px;
}

.intro__text {
  font-size: var(--text-base);
  line-height: 1.85;
  font-weight: 300;
  color: var(--graphite);
}

.intro__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  font-weight: 300;
  color: var(--earth);
}
.intro__fact { display: flex; align-items: baseline; flex-wrap: wrap; }
.intro__fact-term {
  margin-right: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-accent);
}

.intro__seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 420px;
  padding: clamp(56px, 7vw, 96px) 32px;
  background: var(--earth);
  color: var(--cream);
}
.intro__iso {
  width: auto;
  height: clamp(120px, 14vw, 180px);
  color: var(--white);
}
.intro__wordmark {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--cream);
}
.intro__rule { display: block; width: 56px; height: 1px; background: var(--gold); }
.intro__tagline {
  font-size: var(--text-label);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  text-align: center;
  color: var(--sand);
}

@media (max-width: 860px) {
  .intro { grid-template-columns: minmax(0, 1fr); }
}


/* ══ 08 · COLECCIONES ════════════════════════════════════════════════════ */

.collections {
  border-block: 2px solid var(--sand);
  background: var(--sand);
}

/* Grid hairline: gap + fondo del contenedor */
.collections__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 2px;
}

.collection {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--graphite);
  color: var(--cream);
}
.collection:hover { color: var(--cream); }
.collection::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--veil-mid));
}
.collection__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transition: transform 0.8s var(--ease);
}
.collection:hover .collection__img,
.collection:focus-visible .collection__img { transform: scale(1.04); }
.collection:focus-visible { outline-offset: -6px; }

.collection__text {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.collection__name { font-family: var(--font-display); font-size: 36px; line-height: 1; }
.collection__items {
  font-size: var(--text-label);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sand);
}


/* ══ 09 · CATÁLOGO ═══════════════════════════════════════════════════════ */

.catalog { padding: var(--section-y) var(--pad-x) 0; }

.catalog__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.filters { display: flex; flex-wrap: wrap; gap: 0 24px; }
.filters[hidden] { display: none; }
.filters__btn {
  position: relative;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}
/* Área táctil de 44px sin alterar el trazo del diseño */
.filters__btn::before { content: ""; position: absolute; inset: -14px -10px -8px; }
.filters__btn:hover { color: var(--graphite); }
.filters__btn.is-active { color: var(--graphite); border-bottom-color: var(--graphite); }

/* Columnas: equivale a floor((ancho + 28) / 288) del diseño.
   El JS reparte la última fila incompleta (--span / --ratio). */
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 48px 28px;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  grid-column: span var(--span, 1);
}
.product[hidden] { display: none; }

.product__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* content-box a propósito: en el diseño la proporción 4/5 se aplica sin
     contar el padding del 8%, lo que da cajas un poco más bajas. */
  box-sizing: content-box;
  aspect-ratio: var(--ratio, 4 / 5);
  padding: 8%;
  overflow: hidden;
  background: var(--white);
}
/* Producto sobre blanco: se muestra completo */
.product__img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
/* Foto ambientada: llena la caja */
.product__media--cover .product__img,
.product__media[data-pos] .product__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  mix-blend-mode: normal;
}

.product__body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.product__text { display: flex; flex-direction: column; gap: 5px; }
.product__name {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--graphite);
}
.product__meta {
  font-size: var(--text-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.product__order {
  position: relative;
  flex: none;
  margin-top: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--sand);
  color: var(--text-faint);
  font-size: var(--text-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.product__order::before { content: ""; position: absolute; inset: -14px -12px; }
.product__order:hover { color: var(--earth); border-bottom-color: var(--earth); }

.catalog__note {
  max-width: 620px;
  margin-top: 40px;
  font-size: var(--text-xs);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-faint);
}


/* ══ 10 · EN USO ═════════════════════════════════════════════════════════ */

.in-use {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  margin-top: var(--section-y);
  background: var(--sand);
}
.in-use__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}


/* ══ 11 · EL TALLER ══════════════════════════════════════════════════════ */

.workshop {
  overflow: hidden;
  padding: clamp(72px, 9vw, 128px) var(--pad-x);
  background: var(--earth);
  color: var(--cream);
}

.workshop__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.workshop__title { font-family: var(--font-sans); line-height: normal; }

.workshop__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.workshop__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--graphite);
}

/* Sin JS solo se ve la primera imagen. */
.workshop__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.9s ease, transform 6s linear;
}
.workshop__slide.is-active { opacity: 1; transform: scale(1.06); }

.workshop__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--graphite) 75%, transparent));
}

.workshop__counter {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.workshop__roman {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(88px, 10vw, 150px);
  line-height: 0.8;
  color: var(--cream);
  opacity: 0.9;
}
.workshop__count {
  padding-bottom: 10px;
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--sand);
}

.workshop__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: color-mix(in srgb, var(--cream) 15%, transparent);
}
.workshop__bar {
  display: block;
  height: 100%;
  width: var(--progress, 25%);
  background: var(--gold);
  transition: width 0.6s ease;
}

.steps { display: flex; flex-direction: column; }

.step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 36px;
  gap: 20px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line-invert);
  transition: border-color 0.5s;
}
.step:last-child { border-bottom: 1px solid var(--line-invert); }

.step__num {
  padding-top: 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--on-dark-faint);
  transition: color 0.5s;
}

.step__body { display: flex; flex-direction: column; gap: 12px; }

.step__title { font-size: clamp(30px, 3vw, 44px); }
.step__btn {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

.step__text {
  max-width: 420px;
  font-size: var(--text-sm);
  line-height: 1.75;
  font-weight: 300;
  color: var(--sand);
}

.step__icon {
  width: 32px;
  height: 32px;
  justify-self: end;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: opacity 0.5s;
}

/* Estado activo (también sin JS para el paso 1) */
.step.is-active { border-top-color: color-mix(in srgb, var(--cream) 60%, transparent); }
.step.is-active .step__num { color: var(--on-dark-accent); }

/* Con JS (.is-enhanced) los pasos inactivos se pliegan, como en el diseño. */
.workshop.is-enhanced .step { cursor: pointer; }
.workshop.is-enhanced .step__text {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.5s ease;
}
.workshop.is-enhanced .step.is-active .step__text { max-height: 140px; opacity: 1; }
.workshop.is-enhanced .step__icon { opacity: 0.3; }
.workshop.is-enhanced .step.is-active .step__icon { opacity: 0.95; }

@media (max-width: 860px) {
  .workshop__grid { grid-template-columns: minmax(0, 1fr); }
}


/* ══ 12 · A MEDIDA ═══════════════════════════════════════════════════════ */

.custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  background: var(--sand);
}

.custom__img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.custom__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: clamp(56px, 7vw, 112px) var(--pad-x);
  background: var(--cream);
}

.custom__body .link-arrow { align-self: flex-start; }

.custom__title { font-size: clamp(40px, 4.2vw, 64px); line-height: 1.02; }

.custom__text {
  max-width: 440px;
  font-size: var(--text-sm);
  line-height: 1.8;
  font-weight: 300;
  color: var(--earth);
}

@media (max-width: 860px) {
  .custom { grid-template-columns: minmax(0, 1fr); }
  .custom__img { min-height: 0; aspect-ratio: 4 / 3; }
}


/* ══ 13 · CUIDADO DE LA PIEDRA ═══════════════════════════════════════════ */

.care {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 40px;
  padding: var(--section-y) var(--pad-x) 0;
}

.care__head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}
.care__title { font-size: var(--display-md); }

.care__label {
  margin-bottom: 12px;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-accent);
}
.care__text {
  font-size: var(--text-sm);
  line-height: 1.7;
  font-weight: 300;
  color: var(--earth);
}


/* ══ 14 · PIE DE PÁGINA ══════════════════════════════════════════════════ */

.site-footer {
  margin-top: var(--section-y);
  padding: 56px var(--pad-x) 32px;
  background: var(--graphite);
  color: var(--cream);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 40px;
  align-items: start;
}
.site-footer__inner > * { min-width: 0; }

.site-footer__brand { display: flex; flex-direction: column; gap: 18px; }
.brand--footer { color: var(--cream); }
.brand--footer .brand__iso { width: 16px; height: 40px; color: var(--white); }
.brand--footer .brand__name { font-size: 24px; }

.nap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 300;
  color: var(--sand);
}
.nap__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--sand);
}
.nap__link:hover { color: var(--gold); }
.nap__line { padding-top: 6px; color: var(--on-dark-faint); font-size: var(--text-xs); }

.site-footer__parent {
  justify-self: end;
  font-size: var(--text-label);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);   /* 4.56:1 sobre grafito */
}

.site-footer__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line-invert);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
}
.site-footer__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: -14px;
  color: var(--sand);
}
.site-footer__legal a:hover { color: var(--gold); }

@media (max-width: 720px) {
  .site-footer__parent { justify-self: start; }
}


/* ══ 15 · REVELADO (FAIL-SAFE) ═══════════════════════════════════════════
   El contenido NACE VISIBLE. Solo se oculta para animar si el JS confirmó
   capacidad real (body.anim-ready). Nunca queda un opacity:0 atascado.
   ══════════════════════════════════════════════════════════════════════════ */

body.anim-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
body.anim-ready [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body.anim-ready [data-reveal] { opacity: 1; transform: none; }
  .workshop__slide.is-active { transform: none; }
}


/* ══ 16 · PÁGINAS LEGALES ════════════════════════════════════════════════ */

.page-legal .legal {
  max-width: 78ch;
  margin-inline: auto;
  padding: clamp(48px, 7vw, 88px) var(--pad-x);
  font-weight: 300;
  line-height: 1.75;
}
.page-legal .legal p,
.page-legal .legal ul { margin: 0 0 1em; }
.page-legal .legal ul { padding-left: 1.25rem; list-style: disc; }
.page-legal .legal li { margin-bottom: 0.4em; }
.page-legal .legal strong { font-weight: 400; }
.page-legal .legal a { text-decoration: underline; text-underline-offset: 0.18em; }

.page-legal h1 { margin-bottom: 0.4em; font-size: var(--display-lg); }
.page-legal h2 {
  margin: 2.2em 0 0.6em;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 30px;
}
.page-legal h3 { margin: 1.6em 0 0.5em; font-size: 22px; font-weight: 400; }

.legal__updated {
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Ficha del responsable: tabla clave/valor, imprimible y fácil de rellenar. */
.controller-card {
  width: 100%;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--line);
  border-collapse: collapse;
  font-size: var(--text-sm);
  text-align: left;
  background: var(--white);
}
.controller-card th,
.controller-card td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.controller-card th {
  width: 34%;
  background: var(--cream);
  font-weight: 400;
  color: var(--earth);
}

/* Aviso destacado (anti-fraude, dominio oficial, enlaces a terceros). */
.callout {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--gold);
  background: var(--sand);
  font-size: var(--text-sm);
}
.callout__title {
  margin: 0 0 0.35em;
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--earth);
}

/* En la página legal el header lleva un único enlace de regreso. */
.nav__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--earth);
  font-size: var(--text-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}


/* ══ 17 · IMPRESIÓN ══════════════════════════════════════════════════════ */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }

  .site-header,
  .nav,
  .nav-toggle,
  .skip-link,
  .hero__bg,
  .hero__veil,
  .filters,
  .link-arrow,
  .product__order,
  .in-use,
  .workshop__media,
  .custom__img { display: none !important; }

  .hero { height: auto; min-height: 0; }
  .hero__inner { position: static; padding: 1rem 0; }
  .hero, .intro__seal, .workshop, .site-footer,
  .hero__title, .step__btn, .step__text, .workshop .kicker { background: #fff !important; color: #000 !important; }

  .workshop.is-enhanced .step__text { max-height: none; opacity: 1; }
  .product { break-inside: avoid; }

  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; word-break: break-all; }

  h2, h3 { break-after: avoid; }
  .controller-card { break-inside: avoid; }
}
