/* =====================================================================
   Entre Amigas · Estilos
   Distribución inspirada en v0-mono-six: nombre gigante, secuencias
   al hacer scroll, bloque oscuro y pie con la marca grande.
   ✏️ Colores y tipografía en :root
   ===================================================================== */
:root {
  --bg: #F5F1EB;          /* blanco cálido */
  --bg-2: #ECE5DA;
  --ink: #16120E;
  --ink-2: #5E554C;
  --ink-3: #93887C;
  --line: rgba(22, 18, 14, .12);
  --dark: #14100C;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1280px;
  --gx: clamp(16px, 3.5vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
svg { width: 20px; height: 20px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gx); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Cabecera: barra plana arriba, píldora flotante al bajar ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; justify-content: center; padding: 10px var(--gx) 0; pointer-events: none; }
.nav__bar {
  pointer-events: auto; width: 100%; max-width: 980px; height: 52px; padding: 0 8px 0 18px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  border-radius: 999px; background: transparent;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), max-width .5s var(--ease);
}
.nav__bar, .nav.is-scrolled .nav__bar { max-width: 860px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 8px 30px -12px rgba(22, 18, 14, .25), 0 0 0 1px rgba(22, 18, 14, .05); }
.nav__brand { font-weight: 600; font-size: 15px; letter-spacing: -.02em; text-decoration: none; }
.nav__links { display: flex; gap: 28px; font-size: 13.5px; }
.nav__links a { text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { justify-self: end; height: 36px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 500; text-decoration: none; transition: transform .2s; }
.nav__cta:hover { transform: translateY(-1px); }

/* ---------- Portada: la foto de la caja a pantalla completa ---------- */
.hero { position: relative; height: 300vh; background: var(--bg); }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
/* JS le da el tamaño de "cover" (llena la pantalla sin deformar) y luego la encoge */
.hero__media { position: absolute; z-index: 2; transform-origin: 50% 50%; overflow: hidden; will-change: transform; background: #c8ac87; }
.hero__bg, .hero__fg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fg { z-index: 2; pointer-events: none;
  /* solo tapa la parte baja de las letras: por encima de --cut se ve el nombre */
  -webkit-mask-image: linear-gradient(180deg, transparent var(--cut, 30%), #000 calc(var(--cut, 30%) + 3%));
          mask-image: linear-gradient(180deg, transparent var(--cut, 30%), #000 calc(var(--cut, 30%) + 3%)); }
.hero__media::before { content: ""; position: absolute; inset: 0 0 auto 0; height: var(--topshade, 40%); z-index: 1; background: linear-gradient(180deg, rgba(40, 26, 12, .42), rgba(40, 26, 12, 0)); pointer-events: none; }
/* El nombre va entre el fondo (cartón y virutas) y los muñecos */
.hero__word {
  position: absolute; left: 0; right: 0; z-index: 1; text-align: center; white-space: nowrap;
  font-weight: 700; letter-spacing: -.065em; line-height: .8; color: #FBF6EE;
  text-shadow: 0 2px 30px rgba(60, 38, 16, .35);
  font-size: 16vw; /* JS lo ajusta al ancho visible */
  will-change: opacity;
}
.hero__word span { display: inline-block; }
.hero__shade { position: absolute; inset: auto 0 0 0; height: 38%; z-index: 3; background: linear-gradient(180deg, rgba(30, 20, 10, 0), rgba(30, 20, 10, .55)); pointer-events: none; }
.hero__tag {
  position: absolute; left: 0; right: 0; z-index: 4; text-align: center; padding-inline: var(--gx);
  color: #fff; font-size: clamp(22px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.035em; line-height: 1.12;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .3);
}
.hero__cols { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hcol { position: absolute; left: 50%; top: 50%; display: grid; gap: 14px; width: var(--C, 200px); will-change: transform, opacity; opacity: 0; }
.hcol img { width: 100%; border-radius: 6px; box-shadow: 0 20px 40px -24px rgba(40, 26, 12, .5); }
/* La cabecera sobre la foto: texto oscuro sobre el cartón claro */

/* ---------- Galería ---------- */
.gallery-sec { padding-top: clamp(40px, 8vh, 96px); padding-bottom: clamp(80px, 14vh, 160px); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 20px; margin-bottom: clamp(24px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.sec-title { font-size: clamp(40px, 6vw, 88px); font-weight: 600; letter-spacing: -.055em; line-height: .9; }
.sec-sub { font-size: 14px; color: var(--ink-3); }
.gallery { columns: 3 300px; column-gap: clamp(14px, 2vw, 24px); }
.card { break-inside: avoid; margin-bottom: clamp(14px, 2vw, 24px); }
.card__btn { display: block; width: 100%; text-align: left; padding: 10px 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; transition: border-color .3s, box-shadow .3s; }
.card__btn:hover { border-color: rgba(22, 18, 14, .25); box-shadow: 0 18px 40px -28px rgba(22, 18, 14, .45); }
.card__img { position: relative; display: block; overflow: hidden; border-radius: 3px; background: var(--bg-2); }
.card__img img { width: 100%; transition: transform .8s var(--ease); }
.card__btn:hover .card__img img { transform: scale(1.025); }
.card__name { display: block; margin-top: 12px; padding-inline: 2px; font-size: 15.5px; font-weight: 500; letter-spacing: -.02em; }
.card__desc { display: block; margin-top: 2px; padding-inline: 2px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.card__tag { position: absolute; left: 8px; top: 8px; padding: 4px 8px; border-radius: 999px; background: #fff; font-size: 11px; color: var(--ink-2); }
/* Pendientes: bloque aparte para revisar antes de publicar */
.pending { margin-top: 32px; padding-top: 28px; border-top: 1px dashed var(--line); }
.pending__title { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 20px; }
.pending__title span { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.pending__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pending .card { margin: 0; }
.pending .card__btn { padding: 6px 6px 10px; }
.pending .card__img { aspect-ratio: 4 / 5; }
.pending .card__img img { width: 100%; height: 100%; object-fit: cover; }
.pending .card__name { font-size: 13.5px; margin-top: 8px; }

/* ---------- Letras que van cambiando (fondo blanco) ---------- */
.statement { position: relative; height: 260vh; background: #fff; }
.statement__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.statement__line {
  position: absolute; left: 0; right: 0; padding-inline: var(--gx); text-align: center;
  font-size: clamp(40px, 7.6vw, 120px); font-weight: 600; letter-spacing: -.05em; line-height: 1;
  opacity: 0; will-change: transform, opacity, filter;
}

/* ---------- Bocetos ---------- */
.sketch { padding: clamp(96px, 16vh, 180px) 0 clamp(40px, 8vh, 80px); }
.sketch__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); }
.sk { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 10px 14px; }
.sk--wide { grid-column: span 2; }
.sk { display: flex; flex-direction: column; }
.sk__img { flex: 1 1 auto; }
.sk--wide .sk__img { aspect-ratio: 4 / 3; }
.sk__img { position: relative; overflow: hidden; border-radius: 3px; aspect-ratio: 4 / 5; background: #F6F1E8; }
.sk__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* la versión en color se descubre de abajo arriba (JS cambia --r de 100% a 0%) */
.sk__color { clip-path: inset(var(--r, 100%) 0 0 0); }
.sk__line { position: absolute; left: 0; right: 0; top: var(--r, 100%); height: 1.5px; background: rgba(58, 54, 50, .55); opacity: var(--lo, 0); }
.sk figcaption { margin-top: 10px; padding-inline: 2px; font-size: 14.5px; font-weight: 500; letter-spacing: -.02em; }
.sk figcaption span { color: var(--ink-3); font-weight: 400; margin-right: 8px; font-variant-numeric: tabular-nums; }

/* ---------- Galería que se superpone ---------- */
.stack { position: relative; height: 520vh; background: var(--bg-2); }
.stack__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stack__head { position: absolute; left: 0; right: 0; top: 84px; z-index: 20; display: flex; justify-content: space-between; align-items: baseline; }
.stack__title { font-size: clamp(32px, 5vw, 72px); font-weight: 600; letter-spacing: -.055em; line-height: .9; }
.stack__count { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stack__deck { position: absolute; inset: 0; }
.stack__card {
  position: absolute; left: 50%; top: 54%; width: min(40vw, 46vh, 520px); margin: 0;
  background: #fff; padding: 10px 10px 14px; border-radius: 6px;
  box-shadow: 0 30px 60px -30px rgba(40, 26, 12, .45), 0 0 0 1px rgba(22, 18, 14, .06);
  transform: translate(-50%, 120vh); will-change: transform;
}
.stack__card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.stack__card figcaption { margin-top: 10px; font-size: 14px; font-weight: 500; letter-spacing: -.02em; }

/* ---------- Pedidos ---------- */
.order { background: #0D0A07; color: #fff; padding: clamp(110px, 18vh, 200px) 0 clamp(90px, 14vh, 160px); }
.order__kicker { font-size: 14px; color: rgba(255, 255, 255, .55); margin-bottom: 24px; }
.scrub__text { max-width: 22ch; font-size: clamp(32px, 4.6vw, 72px); font-weight: 500; letter-spacing: -.045em; line-height: 1.06; }
.scrub__text .sw { opacity: .18; transition: opacity .3s ease; }
.scrub__text .sw.on { opacity: 1; }
.order__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: clamp(56px, 9vh, 96px); }
.order__card { padding: 26px 26px 28px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; background: rgba(255, 255, 255, .03); }
.order__card h3 { font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
.order__card p { margin-top: 8px; color: rgba(255, 255, 255, .65); font-size: 15.5px; max-width: 40ch; }
.order__steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.order__steps li { padding: 18px 20px 20px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.order__steps span { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .45); font-variant-numeric: tabular-nums; }
.order__ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: clamp(40px, 6vh, 64px); }
.btn { height: 48px; padding: 0 22px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-1px); }
.btn--wa { background: #fff; color: var(--ink); }
.btn--ghost { border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Pie ---------- */
.footer { padding: clamp(64px, 10vh, 110px) 0 28px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: clamp(48px, 8vh, 80px); }
.footer__brand { font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.footer__desc { margin-top: 8px; max-width: 32ch; font-size: 14.5px; color: var(--ink-2); }
.footer__col { display: grid; gap: 8px; align-content: start; font-size: 14.5px; }
.footer__h { font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.footer__col a { text-decoration: none; color: var(--ink-2); }
.footer__col a:hover { color: var(--ink); }
.footer__word { white-space: nowrap; font-weight: 700; letter-spacing: -.065em; line-height: .8; font-size: 16vw; text-align: center; overflow: hidden; }
.footer__word span { display: inline-block; padding-bottom: .06em; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.footer__bottom a { text-decoration: none; }
.footer__bottom a:hover { color: var(--ink); }

/* ---------- Vista ampliada ---------- */
.viewer { width: min(1240px, calc(100vw - 32px)); max-width: none; height: min(860px, calc(100dvh - 32px)); max-height: none; padding: 0; border: 0; border-radius: 10px; background: #fff; color: var(--ink); grid-template-columns: 1fr 300px; overflow: hidden; }
.viewer[open] { display: grid; animation: fade .25s ease; }
.viewer::backdrop { background: rgba(20, 16, 12, .6); backdrop-filter: blur(4px); }
.viewer__main { position: relative; min-height: 0; background: var(--bg-2); display: grid; place-items: center; }
.viewer__main img { width: 100%; height: 100%; object-fit: contain; }
.viewer__nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.viewer__nav--prev { left: 14px; } .viewer__nav--prev svg { transform: scaleX(-1); }
.viewer__nav--next { right: 14px; }
.viewer.is-single .viewer__nav { display: none; }
.viewer__close { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.viewer__side { padding: 64px 28px 28px; overflow-y: auto; }
.viewer__title { font-size: 26px; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.viewer__desc { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.viewer__count { margin-top: 24px; font-size: 13px; color: var(--ink-3); }
.viewer__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.viewer__thumbs button { aspect-ratio: 1; overflow: hidden; border-radius: 4px; opacity: .55; outline-offset: 2px; transition: opacity .2s; }
.viewer__thumbs button[aria-current="true"] { opacity: 1; outline: 1.5px solid var(--ink); }
.viewer__thumbs button:hover { opacity: 1; }
.viewer__thumbs img { width: 100%; height: 100%; object-fit: cover; }
body.no-scroll { overflow: hidden; }

/* ---------- Páginas legales ---------- */
.legal { padding: 120px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: 44px; font-weight: 600; letter-spacing: -.045em; line-height: 1; margin-bottom: 28px; }
.legal h2 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }

/* ---------- Entrada suave ---------- */
@keyframes fade { from { opacity: 0; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__bar { grid-template-columns: 1fr auto; }
  .hero__word { white-space: normal; }
  .hero__word span { display: block; width: fit-content; margin-inline: auto; }
  .sketch__grid { grid-template-columns: 1fr 1fr; }
  .order__cards { grid-template-columns: 1fr; }
  .order__steps { grid-template-columns: 1fr 1fr; }
  .stack__card { width: min(72vw, 50vh); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__intro { grid-column: 1 / -1; }
  .viewer { width: 100vw; height: 100dvh; border-radius: 0; grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .viewer__side { padding: 18px 20px 24px; max-height: 40dvh; }
  .viewer__thumbs { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 600px) {
  .gallery { columns: 2; column-gap: 10px; }
  .card { margin-bottom: 10px; }
  .card__btn { padding: 6px 6px 10px; }
  .card__name { font-size: 14px; margin-top: 8px; }
  .card__desc { font-size: 12.5px; }
  .sketch__grid { gap: 10px; }
  .sk { padding: 6px 6px 10px; }
  .sk figcaption { font-size: 13px; }
  .order__steps li { padding: 14px 4px 16px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
