/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  --cream:      #FAF7F2;
  --cream-2:    #F0E9DC;
  --cream-3:    #E2D8C8;
  --cream-4:    #CEC2B0;

  --wood-light: #D4AC7A;
  --wood-mid:   #A8784A;
  --wood-dark:  #6B4828;

  --ink:        #1E1009;
  --ink-soft:   #382010;
  --ink-mute:   #7A5E44;

  --accent:     #C9A972;
  --accent-2:   #E8C990;

  --bg:         #FAF7F2;
  --line:       rgba(30, 16, 9, 0.10);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter:  clamp(1.25rem, 5vw, 3.5rem);
  --nav-h:   84px;
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px; line-height: 1.65;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.02; letter-spacing: -0.025em; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. UTILITIES
   ============================================================= */
.skip-link {
  position: fixed; top: -120px; left: 1rem;
  padding: .6rem 1.2rem;
  background: var(--ink); color: var(--cream);
  z-index: 9999; border-radius: 6px; font-size: 0.875rem;
  transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* Safety: split-text elements must never be opacity:0 via .reveal */
[data-reveal][data-split],
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. CUSTOM CURSOR
   ============================================================= */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9000;
  display: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity .3s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
/* cursor personalizado desactivado — se usa el cursor clásico del sistema */

.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; will-change: transform;
}
.cursor-dot {
  width: 5px; height: 5px; margin: -2.5px;
  background: var(--cream); border-radius: 50%;
}
.cursor-ring {
  width: 30px; height: 30px; margin: -15px;
  border: 1.5px solid var(--cream); border-radius: 50%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out);
}
.cursor.is-interactive .cursor-ring { width: 50px; height: 50px; margin: -25px; }
/* .has-cursor desactivado */

/* =============================================================
   5. NAV
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0;
  z-index: 200; height: var(--nav-h);
  transition: background-color .6s var(--ease-out), backdrop-filter .6s var(--ease-out),
              box-shadow .6s var(--ease-out), color .4s var(--ease-out),
              transform .5s var(--ease-out), opacity .5s var(--ease-out);
  color: var(--cream);
}
.nav.is-hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}
.nav.is-scrolled {
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto; height: 100%;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 2rem;
}
.nav-logo {
  display: flex; align-items: center;
  flex-shrink: 0;
}
.nav-logo-img {
  height: clamp(44px, 6vw, 64px); width: auto;
  filter: brightness(0);
  transition: filter .45s var(--ease-out);
  display: block;
}
.nav.is-scrolled .nav-logo-img {
  filter: brightness(0);
}

.nav-links { display: none; align-items: center; gap: 2.25rem; margin: 0 auto; }
@media (min-width: 960px) { .nav-links { display: flex; } }

.nav-link {
  font-size: 0.875rem; font-weight: 400; letter-spacing: .025em;
  position: relative; padding: .3rem 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  display: none;
  font-size: 0.8125rem; font-weight: 500; letter-spacing: .04em;
  padding: .55rem 1.25rem;
  border: 1px solid currentColor; border-radius: 100px; flex-shrink: 0;
  transition: background .35s var(--ease-out), color .35s, border-color .35s;
}
@media (min-width: 960px) { .nav-cta { display: block; } }
.nav:not(.is-scrolled) .nav-cta:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.nav.is-scrolled .nav-cta:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* Botón "Comprar Ya" — contorno elegante (borde + texto madera) */
.nav-buy {
  display: none;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: .04em;
  padding: .55rem 1.35rem;
  background: transparent; color: var(--wood-mid);
  border: 1.5px solid var(--wood-mid); border-radius: 100px; flex-shrink: 0;
  transition: background .35s var(--ease-out), color .35s var(--ease-out);
}
@media (min-width: 960px) { .nav-buy { display: block; } }
.nav-buy:hover { background: var(--wood-mid); color: var(--cream); }

/* Grupo derecho: CTA + idiomas */
.nav-right {
  display: flex; align-items: center; gap: 1.1rem;
  flex-shrink: 0;
}
/* En móvil (sin nav-links centrados) empujamos el grupo a la derecha */
@media (max-width: 959px) {
  .nav-right { margin-left: auto; }
}

/* Selector de idiomas (desplegable de banderas) */
.lang-switch { position: relative; flex-shrink: 0; }

.lang-toggle {
  display: flex; align-items: center; gap: .35rem;
  padding: .25rem .4rem; border-radius: 6px;
  background: none; border: 1px solid transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.lang-toggle:hover { border-color: rgba(30,16,9,.18); }
.lang-flag {
  display: block; width: 26px; height: 18px; border-radius: 3px;
  overflow: hidden; line-height: 0;
  border: 1px solid rgba(30,16,9,.18);
}
.lang-flag svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.lang-caret {
  color: var(--ink-mute);
  transition: transform .3s var(--ease-out);
}
.lang-switch.is-open .lang-caret { transform: rotate(180deg); }

/* Menú desplegable */
.lang-menu {
  position: absolute; top: calc(100% + .5rem); right: 0;
  display: flex; flex-direction: column; gap: .35rem;
  padding: .45rem; border-radius: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(30,16,9,.16);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility .25s;
  z-index: 50;
}
.lang-switch.is-open .lang-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.lang-btn {
  width: 30px; height: 21px; border-radius: 3px; overflow: hidden;
  padding: 0; cursor: pointer; background: none;
  border: 1px solid rgba(30, 16, 9, 0.15);
  opacity: .6; line-height: 0;
  transition: opacity .2s var(--ease-out), box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.lang-btn svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.lang-btn:hover { opacity: 1; transform: translateY(-1px); }
.lang-btn.is-active {
  opacity: 1;
  box-shadow: 0 0 0 1.5px var(--wood-mid);
  border-color: var(--wood-mid);
}

.nav-burger {
  display: flex; flex-direction: column; gap: 5px;
  width: 28px; padding: 4px 0; margin-left: .25rem;
  flex-shrink: 0;
}
@media (min-width: 960px) { .nav-burger { display: none; } }

.nav-burger span {
  display: block; height: 1.5px; background: currentColor;
  transition: transform .4s var(--ease-out), opacity .3s; transform-origin: center;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 190;
  background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .75s var(--ease-out);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile ul { text-align: center; display: flex; flex-direction: column; gap: 2rem; }
.nav-mobile a {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 8vw, 3.5rem); font-style: italic; font-weight: 300;
  letter-spacing: -0.02em; display: block;
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s, transform .5s var(--ease-out);
}
.nav-mobile[aria-hidden="false"] a { opacity: 1; transform: none; transition-delay: calc(0.08s * var(--i, 1)); }
.nav-mobile li:nth-child(1) a { --i: 1; }
.nav-mobile li:nth-child(2) a { --i: 2; }
.nav-mobile li:nth-child(3) a { --i: 3; }
.nav-mobile li:nth-child(4) a { --i: 4; }
.nav-mobile li:nth-child(5) a { --i: 5; }
.nav-mobile li:nth-child(6) a { --i: 6; }
.nav-mobile-cta {
  font-family: 'Inter', sans-serif !important; font-size: 0.9375rem !important;
  font-style: normal !important; padding: .75rem 2rem;
  border: 1px solid var(--cream-4); border-radius: 100px; display: inline-block !important;
}
.nav-mobile-buy {
  font-family: 'Inter', sans-serif !important; font-size: 0.9375rem !important;
  font-style: normal !important; font-weight: 600 !important; padding: .8rem 2.25rem;
  background: transparent; color: var(--wood-light) !important;
  border: 1.5px solid var(--wood-light); border-radius: 100px; display: inline-block !important;
}
.nav-mobile-close {
  position: absolute; top: 1.5rem; right: var(--gutter);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.nav-mobile-close span {
  position: absolute; width: 22px; height: 1.5px; background: var(--cream);
}
.nav-mobile-close span:nth-child(1) { transform: rotate(45deg); }
.nav-mobile-close span:nth-child(2) { transform: rotate(-45deg); }

/* =============================================================
   6. HERO — scroll container
   ============================================================= */

/* Tall scroll space — vídeo progresa con el scroll (desktop) */
.hero {
  height: 300vh;      /* espacio de scroll para el vídeo */
  position: relative;
}

/* Móvil: mantenemos el scroll-scrub (mismo comportamiento que desktop) */

/* Poster móvil — ya no se usa, el canvas dibuja el vídeo */
.hero-mobile-poster { display: none !important; }

/* Vista sticky: lo que el usuario ve */
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100svh; min-height: 600px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* --- Capas de media --- */
.hero-media {
  position: absolute; inset: 0; z-index: 0;
  background: #F8F7F5;
  overflow: hidden;
}

/* Vídeo fuente — invisible, solo decodifica frames */
.hero-video-src {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; z-index: -1;
}

/* Canvas fondo borroso — DESACTIVADO
   Se sustituye por el color sólido de .hero-media */
.hero-canvas-bg {
  display: none;
}

/* Canvas principal — dispositivo sobre fondo sólido */
.hero-canvas-main {
  position: absolute; z-index: 1;
  top: 0; left: 50%;
  height: 100%; width: auto;
  transform: translateX(-50%) scale(var(--vid-scale, 1));
  transform-origin: center center;
  will-change: transform; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%);
  mask-image: linear-gradient(to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%);
}
@media (max-width: 719px) {
  /* Canvas ocupa todo el alto del viewport en móvil, recortando horizontal */
  .hero-canvas-main {
    height: 100%; width: auto;
    transform: translateX(-50%) scale(1.05) !important;
  }
}

/* Resto de capas */
.hero-overlay     { z-index: 2; }
.hero-vignette    { z-index: 3; }
.hero-fade-bottom { z-index: 4; }
.hero-grain       { z-index: 5; }

/* Sin overlay — el fondo claro no lo necesita */
.hero-overlay {
  display: none;
}

.hero-vignette { display: none; }
.hero-fade-bottom { display: none; }
.hero-grain { display: none; }

/* --- Fases de contenido --- */
.hero-phase {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: var(--nav-h) var(--gutter) 6rem;
  color: var(--cream);
  pointer-events: none;
}
.hero-phase a, .hero-phase button { pointer-events: auto; }

/* FASE 1: solo el texto derecho y scroll hint */
.hero-phase--intro {
  align-items: flex-start; /* no centrar — el texto se posiciona con absolute */
}

/* FASE 3: CTA al final del recorrido */
.hero-phase--outro {
  opacity: 0;
  pointer-events: none;
  justify-content: space-between;
  padding-top: calc(var(--nav-h) + 0rem);
  padding-bottom: 4rem;
}
.hero-phase--outro[aria-hidden="false"] { pointer-events: auto; }

/* --- Kicker --- */
.hero-kicker {
  display: flex; align-items: center; gap: .75rem;
  flex-wrap: wrap; justify-content: center;
  font-size: clamp(0.65rem, 1.2vw, 0.78rem);
  font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  color: var(--wood-light);
  opacity: 0; transform: translateY(12px);    /* revelado por JS al cargar */
}
.hero-kicker.is-revealed {
  opacity: 1; transform: none;
  transition: opacity .9s .15s var(--ease-out), transform .9s .15s var(--ease-out);
}
.hero-kicker .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--wood-light); opacity: .5; flex-shrink: 0;
}

/* --- Título principal --- */
/* ── NIFIC centrado arriba ───────────────────── */
.hero-nific-top {
  position: absolute; z-index: 11;
  top: calc(var(--nav-h) + 1.5rem);
  left: 50%; transform: translateX(-50%);
  pointer-events: none; white-space: nowrap;
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 200; font-style: italic;
  letter-spacing: -.03em; line-height: 1;
  color: var(--wood-mid);
  text-shadow: 0 2px 30px rgba(100,70,40,0.2);
}

/* Título dividido — NI izquierda / FIC derecha */
.hero-title-split {
  position: absolute; inset: 0;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
  overflow: hidden;
  padding: 0;
}
.hero-title-part {
  font-family: 'Fraunces', serif;
  font-size: clamp(5.5rem, 18vw, 14rem);
  font-weight: 200; font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  line-height: 0.88; letter-spacing: -.04em;
  user-select: none; display: block; opacity: 1;
  /* Textura de madera — vetas con gradiente */
  background-image:
    repeating-linear-gradient(
      168deg,
      transparent         0px,
      transparent         3px,
      rgba(60,30,8,0.06)  3px,
      rgba(60,30,8,0.06)  5px,
      transparent         5px,
      transparent         9px,
      rgba(80,40,10,0.04) 9px,
      rgba(80,40,10,0.04) 11px
    ),
    linear-gradient(
      172deg,
      #E8C98A  0%,
      #A06828 12%,
      #D4A85C 22%,
      #7A4418 34%,
      #C89848 44%,
      #8B5820 54%,
      #E0C07A 63%,
      #9A6430 73%,
      #D4A458 82%,
      #7A4018 91%,
      #C89040 100%
    );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 3px 18px rgba(100,60,20,0.22));
}
.hero-title-part--l { padding-left: clamp(3rem, 10vw, 10rem); }
.hero-title-part--r { padding-right: clamp(3rem, 10vw, 10rem); }

/* Heredado — puede quedar vacío si se elimina del HTML */
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(5rem, 20vw, 15rem);
  font-weight: 200; font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  line-height: 0.88; letter-spacing: -.04em;
  color: var(--cream); user-select: none;
  margin: .25rem 0;
}
.hero-char {
  display: inline-block;
  will-change: transform, opacity;
}

/* Halo ambiental detrás del título */
.hero-phase--intro::before {
  content: "";
  position: absolute; inset: -30% -20%;
  background: radial-gradient(ellipse 55% 45% at 50% 50%,
    rgba(196, 154, 100, 0.10), transparent 70%);
  pointer-events: none; z-index: -1;
  animation: meshBreath 14s ease-in-out infinite;
}
@keyframes meshBreath {
  0%, 100% { opacity: .7; transform: scale(1); }
  50%       { opacity: 1;  transform: scale(1.06); }
}

/* --- Tagline --- */
.hero-tagline {
  font-family: 'Fraunces', serif;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 300; line-height: 1.35; letter-spacing: -.01em;
  color: rgba(250, 247, 242, 0.85);
  opacity: 0; transform: translateY(12px);
}
.hero-tagline.is-revealed {
  opacity: 1; transform: none;
  transition: opacity .9s .55s var(--ease-out), transform .9s .55s var(--ease-out);
}
.hero-tagline em { color: var(--wood-light); font-style: italic; }

/* Textos laterales — ocupan el hueco de NI/FIC, centrados verticalmente */
.hero-side-text {
  --ty: 0px;
  position: absolute;
  top: 50%; transform: translateY(calc(-50% + var(--ty)));
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 200; font-style: italic;
  line-height: 1.1; letter-spacing: -.03em;
  will-change: transform, opacity;
  z-index: 11;
}
.hero-side-text--left {
  left: clamp(3rem, 10vw, 10rem);
  text-align: left;
  color: var(--ink);
}
.hero-side-text--right {
  right: clamp(3rem, 10vw, 10rem);
  text-align: right;
  color: var(--ink);
}
.hero-side-text em { font-style: italic; color: var(--ink); }

/* --- MÓVIL: textos enmarcando el dispositivo (arriba/abajo, no laterales) --- */
@media (max-width: 719px) {
  /* NIFIC oculto en móvil */
  .hero-nific-top { display: none; }

  /* "Sin papel. Sin apps." → sube a la posición de NIFIC */
  .hero-side-text--left {
    top: calc(var(--nav-h) - .5rem);
    left: 50%;
    right: auto;
    transform: translate(-50%, var(--ty));
    text-align: center;
    width: max-content;
    max-width: 90vw;
    color: var(--ink);
    text-shadow: none;
  }

  /* "Solamente con NIFIC." → sube a la posición de "Sin papel" */
  .hero-side-text--right {
    top: calc(var(--nav-h) + 3.5rem);
    bottom: auto;
    right: 50%;
    transform: translate(50%, var(--ty));
    text-align: center;
    width: max-content;
    max-width: 90vw;
    color: var(--wood-mid);
    text-shadow: none;
  }

  .hero-side-text {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    line-height: 1.08;
    text-shadow: none;
  }

  /* Outro título y botones — más compactos */
  .hero-outro-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    padding: 0 1.25rem;
  }
  .hero-actions { gap: .75rem; }
  .hero-actions .btn { padding: .65rem 1.25rem; font-size: .82rem; }
}

/* --- Fase 3 textos --- */
.hero-outro-eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font-size: clamp(0.65rem, 1.2vw, 0.78rem);
  font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(30,16,9,.45); margin-bottom: 1.5rem;
}
.hero-outro-dot {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--wood-mid);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.6); }
}
.hero-outro-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 200; font-style: italic; line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--ink); margin-bottom: 0;
}
.hero-outro-title em { color: var(--wood-mid); font-style: italic; }

/* Botón sólido ink (CTA sobre fondo claro) */
.btn-solid-cream {
  background: var(--ink); color: var(--cream);
  border-color: var(--ink);
  font-weight: 600;
}
.btn-solid-cream:hover { background: var(--wood-mid); border-color: var(--wood-mid); }

/* --- Botones --- */
.hero-actions {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; justify-content: center;
  opacity: 0; transform: translateY(10px);
}
.hero-actions.is-revealed {
  opacity: 1; transform: none;
  transition: opacity .9s .85s var(--ease-out), transform .9s .85s var(--ease-out);
}

/* Cuando están en fase 3, GSAP controla la visibilidad */
.hero-phase--outro .hero-actions {
  opacity: 1; transform: none;
  transition: none;
}

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 0.875rem; font-weight: 500; letter-spacing: .04em;
  padding: .75rem 1.75rem; border-radius: 100px; border: 1.5px solid transparent;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out),
              background .35s, color .35s, border-color .35s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,0.22); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }
.btn svg { transition: transform .4s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn-outline-cream {
  border-color: rgba(250,247,242,0.65); color: var(--cream);
  background: rgba(250,247,242,0.07);
}
.btn-outline-cream:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.btn-text-cream {
  color: rgba(250,247,242,.65); border-color: transparent;
  padding-left: .25rem; padding-right: .25rem;
}
.btn-text-cream:hover { color: var(--cream); }

/* --- Indicador de scroll (fase 1) --- */
.hero-scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%;
  display: flex; flex-direction: column; align-items: center; gap: .65rem;
  color: var(--wood-mid);
  opacity: 0; transform: translateX(-50%) translateY(8px);
  pointer-events: auto; cursor: pointer;
  transition: opacity .3s;
}
.hero-scroll-hint:hover { opacity: .85 !important; }
.hero-scroll-hint.is-revealed {
  opacity: 1; transform: translateX(-50%) translateY(0);
  transition: opacity .9s 1.4s var(--ease-out), transform .9s 1.4s var(--ease-out);
}
.scroll-label {
  font-family: 'Fraunces', serif;
  font-size: clamp(.8rem, 1.2vw, 1rem);
  font-style: italic; font-weight: 300;
  letter-spacing: .04em;
  white-space: nowrap;
}
.scroll-arrow {
  animation: arrowBounce 1.8s ease-in-out infinite;
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0);   opacity: .6; }
  50%      { transform: translateY(5px); opacity: 1;  }
}
@media (prefers-reduced-motion: reduce) { .scroll-line { animation: none; } }

/* --- Barra de progreso del vídeo --- */
.hero-progress-track {
  display: none;
}
.hero-progress-fill {
  display: block; height: 100%; width: 0%;
  background: var(--wood-light);
  transition: width .08s linear;
}

/* --- Esquinas --- */
.hero-corner {
  position: absolute; z-index: 10;
  font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(250,247,242,.35); font-weight: 300;
}
.hero-corner--bl { bottom: 2.25rem; left: var(--gutter); }
.hero-corner--br { bottom: 2.25rem; right: var(--gutter); }
@media (max-width: 540px) { .hero-corner { display: none; } }

/* =============================================================
   6b. ETIQUETAS DESPIECE
   ============================================================= */

/*
 * Geometría de referencia (desktop, contain):
 *   Video 720×1280 → renderizado 450×800 en container 1265×800
 *   Video ocupa: x 32.2%–67.8%,  y 0%–100%
 *
 * Posiciones de componentes en el frame del despiece (~4s):
 *   Chapa superior  → x ≈ 57%,  y ≈  9%  (arriba, centro-dcha)
 *   Chip NFC        → x ≈ 60%,  y ≈ 40%  (medio,  centro-dcha)
 *   Base madera     → x ≈ 35%,  y ≈ 70%  (abajo,  centro-izda)
 *
 * Diseño: dot (●) en el componente, línea horizontal, texto con
 * fondo cristal para legibilidad sobre el vídeo.
 */

.hero-labels {
  position: absolute; inset: 0; z-index: 15;
  pointer-events: none;
}

/* ── Base de cada etiqueta ── */
.hero-label {
  position: absolute;
  display: flex; align-items: center;
  gap: .5rem;
  opacity: 0;
  will-change: opacity, transform;
  white-space: nowrap;
}

/* Cuerpo: cristal claro acorde con la estética de la web */
.hero-label-body {
  display: flex; flex-direction: column; gap: .2rem;
  background: rgba(250, 247, 242, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(30, 16, 9, 0.10);
  border-radius: 10px;
  padding: .5rem .85rem;
  box-shadow: 0 8px 24px rgba(30, 16, 9, 0.08);
}
.hero-label-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(.56rem, .95vw, .72rem);
  font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); line-height: 1.2;
}
.hero-label-sub {
  font-family: 'Fraunces', serif;
  font-size: clamp(.62rem, .95vw, .82rem);
  font-style: italic; font-weight: 300;
  color: var(--wood-mid); letter-spacing: .01em; line-height: 1.3;
}

/* Línea conectora */
.hero-label-line {
  display: block; height: 1px; flex-shrink: 0;
  width: clamp(24px, 3vw, 44px);
  background: rgba(168, 120, 74, 0.5);
}

/* Punto indicador */
.hero-label-dot {
  display: block; flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--wood-mid);
  box-shadow: 0 0 0 4px rgba(168, 120, 74, 0.15);
}

/* ══════════════════════════════════════════════════════════
   POSICIONES EXACTAS sobre el despiece
   Orden visual:  [dot●]──[line]──[body]
   Usando flex-direction: row-reverse sobre HTML [body|line|dot]
   → renderiza visualmente: dot (izda) | line | body (dcha)
   ══════════════════════════════════════════════════════════ */

/* CHAPA SUPERIOR — arriba, sobre la capa de madera clara */
.hero-label--1 {
  top: 9%; left: 57%;
  flex-direction: row-reverse;
}

/* CHIP NFC — medio, sobre la etiqueta transparente */
.hero-label--2 {
  top: 40%; left: 60%;
  flex-direction: row-reverse;
}

/* BASE — abajo izquierda, sobre el soporte de madera oscura
   Orden visual: [body]──[line]──[dot●]  (dot apunta al componente)
   HTML [body|line|dot] con flex-direction: row → dot queda a la dcha */
.hero-label--3 {
  bottom: 20%; left: 31%;
  flex-direction: row;
  text-align: left;
}

/* En móvil el vídeo es autoplay — ocultar etiquetas */
@media (max-width: 719px) {
  .hero-labels { display: none; }
}

/* =============================================================
   7. REVEALS (scroll-triggered genéricos)
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

[data-split] { overflow: hidden; }
.split-word  { display: inline-block; }

/* =============================================================
   8. INTRO SECTION
   ============================================================= */
.intro {
  position: relative;
  background: #1a0e07;
  padding: clamp(5rem, 10vw, 9rem) var(--gutter) clamp(4rem, 8vw, 6rem);
  z-index: 1;
  overflow: hidden;
  display: flex; align-items: flex-start;
  margin-bottom: 0;
}

/* Imagen de fondo */
.intro-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
  filter: brightness(0.55) saturate(0.9);
}

.intro-bg-overlay { display: none; }
.intro-inner {
  max-width: 860px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 3rem;
  align-items: center; text-align: center;
  position: relative; z-index: 2;
}
.intro-eyebrow { display: flex; align-items: center; gap: 1.5rem; justify-content: center; }
.intro-tag {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(250,247,242,.6); font-weight: 500;
}
.intro-num {
  font-family: 'Fraunces', serif; font-size: .75rem;
  font-style: italic; color: var(--accent-2);
}
.intro-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.875rem, 4.5vw, 3.5rem);
  font-weight: 300; line-height: 1.08; letter-spacing: -.025em;
  color: var(--cream); max-width: 22ch;
  text-shadow: 0 2px 24px rgba(10,5,2,0.4);
}
.intro-title em { font-style: italic; color: var(--accent-2); }
.intro-title .split-word { display: inline-block; will-change: transform, opacity; }

/* Bloque inferior: frase destacada + CTA */
.intro-bottom {
  display: flex; flex-direction: column; align-items: center; gap: 2.5rem;
  margin-top: auto;
  padding-top: clamp(3rem, 10vw, 6rem);
}
.intro-tagline {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 200; font-style: italic; line-height: 1.12;
  letter-spacing: -.03em; text-align: center;
  color: var(--cream);
  text-shadow: 0 2px 24px rgba(10,5,2,0.4);
}
.intro-tagline em { color: var(--accent-2); font-style: italic; }
.intro-cta {
  background: var(--cream); color: var(--ink);
  border-color: var(--cream); font-weight: 600;
  padding: .85rem 2rem; font-size: .9rem;
  gap: .6rem;
}
.intro-cta:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--ink); }

.intro-body-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 720px) { .intro-body-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }


.intro-body {
  font-size: clamp(.9375rem, 1.3vw, 1.0625rem);
  font-weight: 300; line-height: 1.75; color: var(--ink-soft);
}
.intro-body--accent { color: var(--ink-mute); }

.intro-stats {
  display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap;
  justify-content: center;
  padding-top: 1.5rem; border-top: 1px solid rgba(250,247,242,.2);
  width: 100%;
}
.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 200; font-style: italic; line-height: 1;
  color: var(--cream); letter-spacing: -.03em;
}
.stat-label {
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(250,247,242,.55); font-weight: 400;
}
.stat-divider { width: 1px; height: 3rem; background: rgba(250,247,242,.2); }
@media (max-width: 540px) { .stat-divider { display: none; } }

/* =============================================================
   9. MAGNETIC
   ============================================================= */
.has-magnetic { display: inline-flex; position: relative; }
.magnetic-inner {
  display: inline-flex; align-items: center; gap: inherit;
  will-change: transform; transition: transform .8s var(--ease-soft);
}

/* =============================================================
   10. CÓMO FUNCIONA — vídeo de fondo
   ============================================================= */
.how {
  position: relative;
  overflow: hidden;
  color: var(--cream);
  padding: clamp(7rem, 14vw, 12rem) var(--gutter);
  z-index: 1;
  margin-top: 0;
  /* Mínimo para que el vídeo tenga presencia */
  min-height: 90vh;
  display: flex; align-items: center;
}

/* ── Vídeo de fondo ─────────────────────────── */
.how-video-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  /* Sombra interna / profundidad de segundo plano */
  filter: brightness(0.72) saturate(0.85);
  transform: scale(1.04);        /* evita bordes blancos al hacer scale en sombras */
  will-change: transform;
}

/* ── Overlay central — oscurece para legibilidad del texto ── */
.how-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(10,5,2,0.55) 0%,
      rgba(10,5,2,0.25) 40%,
      rgba(10,5,2,0.15) 70%,
      transparent 100%);
  pointer-events: none;
}

/* ── Sombra superior — funde con la sección Producto (cream) ── */
.how-shadow-top { display: none; }

/* ── Sombra inferior — funde con la siguiente sección ── */
.how-shadow-bot {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 28%;
  z-index: 2;
  background: linear-gradient(to top,
    var(--cream) 0%,
    rgba(250,247,242,0.6) 30%,
    transparent 100%
  );
  pointer-events: none;
}

/* --- MÓVIL: vídeo en franja superior, fondo beige integrado --- */
@media (max-width: 719px) {
  .how {
    display: block;
    min-height: 0;
    /* Beige cálido — integra con la paleta cream/madera de la web */
    background-color: #F0E9DC;
    padding: clamp(4rem, 13vw, 6rem) var(--gutter) clamp(3rem, 8vw, 4rem);
    position: relative;
  }
  /* Banda beige detrás del vídeo (mismo tono, sin contraste duro) */
  .how::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 55vh;
    background: #F0E9DC;
    z-index: 0;
  }
  /* Vídeo absoluto, franja superior */
  .how-video-bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    bottom: auto;
    width: 100%;
    height: 55vh;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.95) saturate(1);
    transform: none;
    z-index: 1;
  }
  /* Fundido suave del vídeo al beige */
  .how-shadow-top { display: none; }
  .how-shadow-bot {
    display: block;
    top: calc(55vh - 80px);
    bottom: auto;
    height: 110px;
    background: linear-gradient(to bottom,
      transparent 0%,
      #F0E9DC 100%);
    z-index: 2;
  }
  .how-overlay { display: none; }

  /* Texto del título arriba (como antes), con sombra para legibilidad sobre el vídeo */
  .how-inner {
    text-shadow: 0 2px 14px rgba(10,5,2,0.55);
    position: relative; z-index: 3;
  }
  .how-title { margin-bottom: 0; }

  /* Steps justo debajo del vídeo, sobre beige — colores oscuros */
  .how-steps {
    margin-top: calc(55vh - 14rem);
    text-shadow: none;
    position: relative; z-index: 3;
  }
  .how-step {
    background: rgba(168, 120, 74, 0.04);
    border: 1px solid rgba(168, 120, 74, 0.10);
  }
  .how-step-num   { color: var(--wood-mid); }
  .how-step-title { color: var(--ink); }
  .how-step-text  { color: rgba(30, 16, 9, 0.70); }
}

/* ── Contenido encima del vídeo ─────────────── */
.how-inner {
  position: relative; z-index: 3;
  max-width: 680px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 0;
  text-align: center; align-items: center;
  /* Sombra de texto fuerte para legibilidad sobre el vídeo */
  text-shadow: 0 2px 12px rgba(10,5,2,0.9), 0 4px 32px rgba(10,5,2,0.7);
}

/* Eyebrow */
.how-eyebrow {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; margin-bottom: 1.75rem;
}
.how-tag {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(250,247,242,.65); font-weight: 500;
}
.how-num {
  font-family: 'Fraunces', serif; font-size: .75rem;
  font-style: italic; color: var(--wood-mid);
}

/* Título */
.how-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300; line-height: 1.06; letter-spacing: -.03em;
  color: var(--cream); margin-bottom: 4rem;
}
.how-title em { font-style: italic; color: var(--accent-2); }
.how-title .split-word { display: inline-block; will-change: transform, opacity; }

/* Pasos — fila horizontal en desktop, columna en móvil */
/* ── Desktop: grid de cards original ── */
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  width: 100%;
  background: rgba(250,247,242,.12);
  border: 1px solid rgba(250,247,242,.12);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  text-shadow: none;
}
@media (min-width: 720px) {
  .how-steps { grid-template-columns: repeat(3, 1fr); }
}
.how-step {
  display: flex; flex-direction: column; gap: .6rem;
  padding: 2rem 1.75rem;
  background: rgba(10,5,2,0.30);
  text-align: left;
}
.how-step-num {
  font-family: 'Fraunces', serif;
  font-size: .8125rem; font-style: italic;
  color: var(--wood-light); margin-bottom: .25rem;
}
.how-step-title {
  display: block;
  font-size: .9375rem; font-weight: 500; letter-spacing: .01em;
  color: var(--cream); line-height: 1.3;
}
.how-step-text {
  font-size: .875rem; font-weight: 300; line-height: 1.7;
  color: rgba(250,247,242,.58);
}

/* ── Móvil: steps ocultos (solo vídeo + título) ── */
@media (max-width: 719px) {
  .how-steps { display: none; }
}

/* ── Móvil: timeline horizontal — números arriba, títulos abajo ── */
@media (max-width: 719px) and (max-width: 0px) {
  .how-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: none; border: none; border-radius: 0;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    gap: 0; overflow: visible;
    position: relative;
    margin-top: calc(55vh - 14rem);
    text-align: center;
  }
  /* Línea horizontal conectora entre nodos */
  .how-steps::before {
    content: "";
    position: absolute;
    top: 1.75rem;
    left: calc(16.6% + .5rem);
    right: calc(16.6% + .5rem);
    height: 1px;
    background: rgba(30,16,9,.2);
    z-index: 0;
  }
  .how-step {
    flex-direction: column; align-items: center;
    gap: 1rem; padding: 0 .5rem 0;
    background: none; text-shadow: none;
    position: relative;
  }
  /* Nodo circular con número */
  .how-step-num {
    width: 3.5rem; height: 3.5rem; border-radius: 50%;
    background: var(--cream);
    border: 1.5px solid rgba(30,16,9,.15);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Fraunces', serif; font-size: .95rem;
    font-style: italic; font-weight: 300;
    color: var(--ink); margin: 0 auto;
    position: relative; z-index: 1;
  }
  .how-step-body { padding-top: 0; }
  .how-step-title { color: var(--ink); font-size: .85rem; font-weight: 500; }
  .how-step-text  { display: none; }
}

/* =============================================================
   11. EQUIPO
   ============================================================= */
.team {
  position: relative;
  background: var(--cream);
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
  z-index: 1;
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}
.team-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 3.5rem;
}

/* Eyebrow */
.team-eyebrow { display: flex; align-items: center; gap: 1.5rem; }
.team-tag {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500;
}
.team-num {
  font-family: 'Fraunces', serif; font-size: .75rem;
  font-style: italic; color: var(--accent);
}

/* Título */
.team-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.875rem, 4.5vw, 3.5rem);
  font-weight: 300; line-height: 1.08; letter-spacing: -.025em;
  color: var(--ink); max-width: 18ch;
}
.team-title em { font-style: italic; color: var(--wood-mid); }
.team-title .split-word { display: inline-block; will-change: transform, opacity; }

/* Grid de cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

/* Card */
.team-card {
  display: flex; flex-direction: column; gap: 1.25rem;
}

/* Foto + hover LinkedIn */
.team-card-photo-link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 5;     /* Proporción vertical de retrato */
  background: var(--cream-3);  /* Fondo mientras carga la foto */
  cursor: pointer;
}
/* El wrapper interno ocupa todo el link */
.team-card-photo {
  position: absolute; inset: 0;
}
.team-card-img {
  display: block;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  transition: transform .55s var(--ease-out), filter .55s var(--ease-out);
}

/* Overlay LinkedIn */
.team-card-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 5, 2, 0.62);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.team-linkedin-icon {
  width: 36px; height: 36px;
  color: var(--cream);
  transform: translateY(8px);
  transition: transform .45s var(--ease-out);
}

/* Hover */
.team-card-photo-link:hover .team-card-img {
  transform: scale(1.05);
  filter: brightness(0.85);
}
.team-card-photo-link:hover .team-card-overlay { opacity: 1; }
.team-card-photo-link:hover .team-linkedin-icon { transform: translateY(0); }

/* Foto sin src — muestra placeholder elegante */
.team-card-img[src=""] {
  visibility: hidden;
}
.team-card-photo-link:has(.team-card-img[src=""])::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, var(--cream-2) 0%, var(--cream-3) 100%);
}
.team-card-photo-link:has(.team-card-img[src=""])::after {
  content: "📷";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; opacity: .3;
}

/* Info debajo de la foto */
.team-card-info {
  display: flex; flex-direction: column; gap: .3rem;
}
.team-card-name {
  font-family: 'Fraunces', serif;
  font-size: 1.125rem; font-weight: 400; font-style: italic;
  color: var(--ink); letter-spacing: -.01em;
}
.team-card-role {
  font-size: .8125rem; font-weight: 400; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-mute);
}

/* ── Móvil: texto centrado y espacio reducido en sección equipo ── */
@media (max-width: 719px) {
  .team-inner { align-items: center; text-align: center; gap: 1.25rem; }
  .team-eyebrow { justify-content: center; }
  .team-title { text-align: center; }
}

/* ── Móvil: 3 columnas — fotos arriba, nombre+cargo abajo ── */
@media (max-width: 719px) {
  .team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem 1rem;
    align-items: start;
  }
  .team-card {
    flex-direction: column;
    gap: .5rem;
  }
  /* Foto cuadrada con altura fija para que se muestre */
  .team-card-photo-link {
    border-radius: 10px;
    aspect-ratio: auto;
    height: 28vw;
    max-height: 110px;
  }
  .team-card-info {
    gap: .15rem;
    text-align: center;
  }
  .team-card-name {
    font-size: .75rem;
    font-style: italic;
    letter-spacing: 0;
  }
  .team-card-role {
    font-size: .6rem;
    letter-spacing: .06em;
  }
}

/* =============================================================
   12. PORTFOLIO — Carrusel
   ============================================================= */
.portfolio {
  position: relative;
  background: var(--cream-2);
  color: var(--ink);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  z-index: 1;
  overflow: hidden;
}
.portfolio-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; flex-direction: column; gap: 1.75rem;
  margin-bottom: 2.5rem;
  align-items: center; text-align: center;
}
.portfolio-eyebrow { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.portfolio-tag {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500;
}
.portfolio-num {
  font-family: 'Fraunces', serif; font-size: .75rem;
  font-style: italic; color: var(--accent);
}
.portfolio-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.875rem, 4.5vw, 3.5rem);
  font-weight: 300; line-height: 1.08; letter-spacing: -.025em;
  color: var(--ink); max-width: none;
}
.portfolio-title em { font-style: italic; color: var(--wood-mid); }
.portfolio-title .split-word { display: inline-block; will-change: transform, opacity; }

/* ── Carrusel ───────────────────────────────── */
.portfolio-carousel-wrap {
  overflow: hidden;
  width: 100%;
  padding: .5rem 0;
  position: relative;
  /* Sombras en los bordes para efecto de profundidad */
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

/* ── Flechas ──────────────────────────────── */
.pc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30,16,9,.12);
  transition: background .3s var(--ease-out), transform .3s var(--ease-out),
              box-shadow .3s var(--ease-out);
}
.pc-arrow--prev { left: 1rem; }
.pc-arrow--next { right: 1rem; }
.pc-arrow:hover {
  background: var(--ink); color: var(--cream);
  box-shadow: 0 8px 24px rgba(30,16,9,.22);
  transform: translateY(-50%) scale(1.08);
}
.pc-arrow:active { transform: translateY(-50%) scale(.96); }

/* En móvil ocultamos flechas — se navega con swipe táctil */
@media (max-width: 719px) {
  .pc-arrow { display: none; }
  .portfolio-track {
    touch-action: pan-y;       /* deja el scroll vertical al navegador */
    -webkit-user-select: none;
    user-select: none;
  }
}
.portfolio-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  will-change: transform;
}

/* ── Card del carrusel ──────────────────────── */
.pc-card {
  position: relative;
  flex-shrink: 0;
  width: clamp(220px, 28vw, 360px);
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  border: none;
  background: var(--cream-3);
  cursor: pointer;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.pc-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transition: transform .55s var(--ease-out);
  display: block;
}
/* Gradiente permanente en la parte inferior */
.pc-card::before {
  content: "";
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(10,5,2,0.82) 0%, transparent 100%);
  z-index: 1;
  transition: opacity .4s var(--ease-out);
}
.pc-card-label {
  position: absolute; bottom: 1.25rem; left: 1.25rem; right: 1.25rem;
  z-index: 2;
  font-family: 'Fraunces', serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic; font-weight: 300;
  color: var(--cream); line-height: 1.2;
  pointer-events: none;
}
/* Hover */
.pc-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(10,5,2,.22); }
.pc-card:hover img { transform: scale(1.06); }
/* Borde sutil */
.pc-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(10,5,2,.10);
  z-index: 3; pointer-events: none;
}

/* ── Panel de detalle ───────────────────────── */
.portfolio-detail {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  /* dvh cubre el viewport dinámico en iOS Safari (barra de URL incluida) */
  height: 100dvh;
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: var(--gutter);
  background: rgba(10,5,2,.7);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  opacity: 0; pointer-events: none;
  transition: opacity .45s var(--ease-out);
  overscroll-behavior: contain;
  touch-action: none;
}
.portfolio-detail[aria-hidden="false"] {
  opacity: 1; pointer-events: auto;
}
.pd-inner {
  background: var(--cream);
  border-radius: 20px;
  overflow: hidden;
  max-width: 860px; width: 100%;
  max-height: min(90dvh, 90vh);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  transform: translateY(24px) scale(.97);
  transition: transform .45s var(--ease-out);
  box-shadow: 0 40px 80px rgba(10,5,2,.45);
}
@media (min-width: 640px) {
  .pd-inner { grid-template-columns: 1fr 1fr; }
}
.portfolio-detail[aria-hidden="false"] .pd-inner {
  transform: translateY(0) scale(1);
}
.pd-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
}
@media (min-width: 640px) { .pd-img-wrap { aspect-ratio: auto; min-height: 360px; } }
.pd-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.pd-content {
  padding: 2.5rem 2rem;
  display: flex; flex-direction: column; justify-content: center; gap: 1.25rem;
}
.pd-name {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 300; font-style: italic;
  color: var(--ink); line-height: 1.1; display: block;
}
.pd-desc {
  font-size: .9375rem; font-weight: 300; line-height: 1.75;
  color: var(--ink-mute);
}
.pd-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  align-self: flex-start;
  margin-top: .5rem;
  padding: .65rem 1.4rem;
  background: var(--ink); color: var(--cream);
  font-size: .8125rem; font-weight: 500; letter-spacing: .04em;
  border-radius: 100px;
  transition: background .3s, gap .3s;
}
.pd-cta:hover { background: var(--wood-dark); gap: .75rem; }
.pd-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(250,247,242,.9);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer; border: none;
  transition: background .3s, transform .3s;
}
.pd-close:hover { background: var(--cream-3); transform: rotate(90deg); }

/* --- Botón X independiente — solo móvil --- */
.pd-close-mobile {
  display: none;
  position: fixed;
  bottom: max(2rem, env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  z-index: 510;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(250,247,242,0.95);
  color: var(--ink);
  align-items: center; justify-content: center;
  border: 1px solid rgba(30,16,9,.12);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(10,5,2,.2);
  transition: background .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pd-close-mobile:active { transform: translateX(-50%) scale(.92); }

/* Oculta el nav mientras el detalle está abierto */
body.detail-open .nav { display: none; }
/* Botón X móvil — cierra y vuelve a #portfolio */
@media (max-width: 719px) {
  .pd-close { display: none; }
  .portfolio-detail[aria-hidden="false"] .pd-close-mobile {
    display: flex;
  }
}

/* =============================================================
   13. CONTACTO
   ============================================================= */
.contact {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 0;
  content-visibility: auto;
  contain-intrinsic-size: 0 700px;
  z-index: 1;
}
.contact-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 820px) {
  .contact-inner { grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; }
  /* En desktop: info + detalles en columna izquierda, formulario en derecha */
  .contact-info      { order: 1; }
  .contact-form-wrap { order: 2; grid-row: 1 / 3; }
  .contact-details   { order: 3; }
}

/* Info izquierda */
.contact-eyebrow { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }

@media (max-width: 719px) {
  .contact-eyebrow { justify-content: center; }
  .contact-title { text-align: center; }
  .contact-sub { text-align: center; }
  .contact-buy { display: inline-flex; }
  .contact-info { text-align: center; }
}
.contact-buy {
  margin-top: 1.75rem;
  background: var(--wood-mid); color: var(--cream); border-color: var(--wood-mid);
  font-weight: 600;
}
.contact-buy:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.contact-tag {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500;
}
.contact-num {
  font-family: 'Fraunces', serif; font-size: .75rem;
  font-style: italic; color: var(--accent);
}
.contact-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 300; line-height: 1.06; letter-spacing: -.025em;
  color: var(--ink); margin-bottom: 1.75rem;
}
.contact-title em { font-style: italic; color: var(--wood-mid); }
.contact-title .split-word { display: inline-block; will-change: transform, opacity; }

.contact-sub {
  font-size: clamp(.9375rem, 1.3vw, 1.0625rem);
  font-weight: 300; line-height: 1.75;
  color: var(--ink-mute);
  margin-bottom: 2.5rem; max-width: 36ch;
}

/* Detalles de contacto */
.contact-details {
  list-style: none;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  margin-bottom: 3rem;
}
.contact-detail { display: flex; flex-direction: column; gap: .2rem; }
.contact-detail-label {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 500;
}
.contact-detail-value {
  font-size: .9375rem; font-weight: 300; color: var(--ink);
  transition: color .3s;
}
a.contact-detail-value:hover { color: var(--wood-mid); }

.contact-logo {
  width: 64px; height: auto;
  filter: brightness(0);
  opacity: .18;
}

/* ── Formulario ─────────────────────────────── */
.contact-form-wrap { position: relative; }

.contact-form {
  display: flex; flex-direction: column; gap: 1.5rem;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.contact-form.is-sent {
  opacity: 0; transform: translateY(-16px); pointer-events: none;
}

/* Campo */
.form-field {
  position: relative;
}
.form-input {
  width: 100%;
  background: rgba(30,16,9,.04);
  border: 1px solid rgba(30,16,9,.18);
  border-radius: 10px;
  padding: 1.25rem 1.1rem .6rem;
  font-family: 'Inter', sans-serif;
  font-size: .9375rem; font-weight: 300;
  color: var(--ink);
  outline: none;
  transition: border-color .35s var(--ease-out), background .35s var(--ease-out);
  -webkit-appearance: none;
}
.form-input::placeholder { color: transparent; }
.form-input:focus {
  border-color: var(--wood-mid);
  background: rgba(30,16,9,.06);
}
/* Label flotante */
.form-label {
  position: absolute;
  left: 1.1rem; top: 50%; transform: translateY(-50%);
  font-size: .9375rem; font-weight: 300;
  color: rgba(30,16,9,.4);
  pointer-events: none;
  transition: top .28s var(--ease-out), font-size .28s var(--ease-out),
              color .28s var(--ease-out), transform .28s var(--ease-out);
}
.form-field--textarea .form-label { top: 1.25rem; transform: none; }
/* Activo (focus o con valor) */
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  top: .55rem; transform: none;
  font-size: .7rem; letter-spacing: .08em;
  color: var(--wood-mid);
}
.form-field--textarea .form-input:focus + .form-label,
.form-field--textarea .form-input:not(:placeholder-shown) + .form-label {
  top: .5rem;
}
/* Textarea */
.form-textarea {
  resize: vertical; min-height: 120px;
  padding-top: 1.5rem;
}
/* Error */
.form-input.is-error { border-color: #C0624A; }
.form-input.is-valid  { border-color: #6A9E6F; }

.form-error {
  display: block;
  font-size: .78rem; font-weight: 400;
  color: #C0624A;
  margin-top: .3rem; padding-left: .25rem;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .25s var(--ease-out), opacity .25s var(--ease-out);
}
.form-field.has-error .form-error {
  max-height: 2rem; opacity: 1;
}

/* Honeypot anti-spam — invisible y fuera de pantalla */
.form-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Consentimiento RGPD */
.form-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .65rem;
  align-items: start;
  margin: .25rem 0 .5rem;
}
.form-consent-check {
  width: 18px; height: 18px;
  margin-top: .15rem;
  accent-color: var(--wood-mid);
  cursor: pointer; flex-shrink: 0;
}
.form-consent-label {
  font-size: .82rem; font-weight: 300; line-height: 1.5;
  color: var(--ink-mute); cursor: pointer;
}
.form-consent-label a {
  color: var(--wood-mid); text-decoration: underline;
  text-underline-offset: 2px;
}
.form-consent .form-error { grid-column: 1 / -1; }
.form-consent.has-error .form-error { max-height: 2rem; opacity: 1; }
.form-consent.has-error .form-consent-check { outline: 2px solid #C0624A; outline-offset: 2px; }
/* Autofill — evita el fondo azul del navegador */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px rgba(30,16,9,0.95) inset;
  -webkit-text-fill-color: var(--cream);
  caret-color: var(--cream);
}

/* Botón enviar */
.form-submit {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 2rem;
  background: var(--wood-mid);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: .875rem; font-weight: 500; letter-spacing: .04em;
  border-radius: 100px;
  cursor: pointer;
  transition: background .35s var(--ease-out), transform .2s var(--ease-out),
              gap .35s var(--ease-out);
  border: none;
}
.form-submit:hover {
  background: var(--wood-dark);
  gap: 1rem;
}
.form-submit:active { transform: scale(.97); }
.form-submit-arrow { flex-shrink: 0; transition: transform .35s var(--ease-out); }
.form-submit:hover .form-submit-arrow { transform: translateX(3px); }
.form-submit.is-loading { opacity: .6; pointer-events: none; }
.form-submit:disabled { opacity: .6; cursor: default; }

/* Mensaje de éxito */
.contact-success {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; text-align: center;
  opacity: 0; pointer-events: none;
  transform: translateY(16px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.contact-success.is-visible {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.contact-success svg { color: var(--wood-mid); }
.contact-success strong {
  font-family: 'Fraunces', serif; font-size: 1.5rem;
  font-weight: 300; font-style: italic; color: var(--ink);
}
.contact-success p {
  font-size: .9375rem; font-weight: 300;
  color: var(--ink-mute); max-width: 28ch;
}

/* ── Footer ─────────────────────────────────── */
.site-footer {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  font-size: .75rem; letter-spacing: .08em;
  color: var(--ink-mute);
}
.site-footer-links {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
}
.site-footer-links a {
  color: var(--ink-mute); text-decoration: none;
  transition: color .25s var(--ease-out);
}
.site-footer-links a:hover { color: var(--wood-mid); }

.site-footer-right { display: flex; align-items: center; gap: 1.25rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  transition: color .25s var(--ease-out), border-color .25s var(--ease-out), transform .25s var(--ease-out);
}
.social-link:hover {
  color: var(--wood-mid); border-color: var(--wood-mid);
  transform: translateY(-2px);
}
@media (max-width: 719px) {
  .site-footer { justify-content: center; text-align: center; }
  .site-footer-right { justify-content: center; }
}
