/* =========================================================
   Bedolla Studio · estilos
   Índice:
   1. Variables (design system)
   2. Base
   3. Utilidades y botones
   4. Hero
   5. Servicios
   6. Sobre mí
   7. Proceso
   8. Proyectos
   9. Cotizar (formulario)
   10. Footer
   11. Menú
   12. Galería y demo (caras del cubo)
   13. Aviso de salida
   14. Cursor
   15. Responsive y movimiento reducido
   ========================================================= */

/* 1. Variables ------------------------------------------- */
:root {
  /* Propuesta 3.1 "Editorial rojo" (ver docs/design.md) */
  --background: #F4F4F4;
  --surface: #FFFFFF;
  --on-surface: #000000;
  --on-surface-variant: #605F5F;
  --muted: #767676;
  --outline: #E3E3E3;
  --inverse: #000000;
  --inverse-hover: #333333;
  --primary: #871E18;          /* rojo de la marca */
  --primary-mid: #8B382A;      /* medios tonos */
  --primary-deep: #401310;     /* rojo casi negro: botones y paneles sobre rojo o fotos */
  --primary-hover: #6E1813;
  --night: #000000;
  --on-night: #FFFFFF;
  --on-night-variant: rgba(255, 255, 255, .72);
  --collage: #ABA392;          /* beige de collages */
  --success: #2F6B4F;
  --error: #B3261E;

  --font-display: 'Inter Tight', Inter, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-serif: 'Libre Caslon Text', Georgia, serif;
  --font-mono: ui-monospace, Menlo, monospace;

  --ease-cube: cubic-bezier(.65, 0, .35, 1);
}

/* 2. Base ------------------------------------------------ */
@view-transition { navigation: auto; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--on-surface); }
a:hover { color: var(--inverse-hover); }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--inverse); outline-offset: 3px; }
::selection { background: var(--primary); color: #fff; }

.site {
  background: var(--background);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}
.page { background: var(--background); backface-visibility: hidden; }

/* 3. Utilidades y botones -------------------------------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.eyebrow { font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -.035em; }
.italic { margin: 0; font-family: var(--font-serif); font-style: normal; font-weight: 400; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.01em; }
.italic--accent { color: var(--on-surface); }
.pending { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.section-head { display: flex; flex-direction: column; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 30px; border: 0; border-radius: 0;
  font: 600 16px var(--font-body); text-decoration: none; white-space: nowrap;
}
.btn--dark { background: var(--inverse); color: #fff; }
.btn--dark:hover { background: var(--inverse-hover); color: #fff; }
/* Botones de acción principal ("Escríbeme por WhatsApp", "Enviar"): negro con texto blanco */
.btn--green { background: var(--inverse); color: #fff; }
.btn--green:hover { background: var(--inverse-hover); color: #fff; }
.btn--light { background: var(--on-night); color: var(--on-surface); padding: 0 26px; font-size: 15px; }
.btn--light:hover { background: #fff; }
.btn--outline { border: 1px solid rgba(255, 255, 255, .45); color: var(--on-night); padding: 0 26px; font-size: 15px; }
.btn--outline:hover { border-color: var(--on-night); color: var(--on-night); }
.btn--sm { padding: 0 24px; font-size: 15px; }
.btn--wide { padding: 0 40px; }

/* Botón con círculo de play (videos) */
.btn-play {
  position: relative; display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 8px 26px 8px 8px; border: 0; border-radius: 999px;
  background: var(--primary); color: #fff; font: 600 16px var(--font-body);
}
.btn-play:hover { background: var(--primary-hover); }
.btn-play__icon { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.btn-play__icon::after { content: ""; width: 0; height: 0; border-left: 13px solid var(--primary); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }

/* Botón de cerrar (X) */
.close-btn { flex: none; width: 52px; height: 52px; background: var(--inverse); border: 0; position: relative; }
.close-btn span { position: absolute; left: 15px; top: 25px; width: 22px; height: 1.5px; background: var(--on-night); transform: rotate(45deg); }
.close-btn span + span { transform: rotate(-45deg); }

.round-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--inverse); color: #fff; font-size: 20px; }
.round-btn:hover { background: var(--inverse-hover); }

/* 4. Hero ------------------------------------------------ */
.hero { position: relative; height: 100vh; min-height: 560px; background: var(--primary-deep); color: var(--on-night); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
  /* Rojo de la marca (después irá tu foto con tono rojo encima) */
  background:
    radial-gradient(ellipse 30% 45% at 52% 72%, rgba(37, 26, 25, .55), transparent 70%),
    radial-gradient(ellipse 60% 70% at 20% 30%, rgba(172, 112, 98, .45), transparent 70%),
    radial-gradient(ellipse 45% 60% at 85% 20%, rgba(64, 19, 16, .7), transparent 70%),
    linear-gradient(170deg, var(--primary-mid), var(--primary) 55%, var(--primary-deep));
}
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(64, 19, 16, 0) 40%, rgba(64, 19, 16, .45) 100%); }
.is-stage-2 .hero__bg { opacity: 1; }

.hero__nav {
  position: absolute; top: 28px; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: center; gap: 36px;
  opacity: 0; pointer-events: none; transition: opacity .6s ease;
}
.show-topnav .hero__nav { opacity: 1; pointer-events: auto; }
.hero__nav a { color: var(--on-night); text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid transparent; }
.hero__nav a:hover { color: var(--on-night); border-bottom-color: currentColor; }

.hero__body { position: absolute; left: clamp(16px, 4vw, 64px); right: clamp(16px, 4vw, 64px); bottom: clamp(32px, 9vh, 96px); z-index: 2; }
.hero__name {
  margin: 0; font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(52px, 11.6vw, 288px); line-height: .95; letter-spacing: -.03em; color: var(--on-night);
  transform: var(--name-tf, none); transform-origin: 50% 50%;
  transition: transform 1s cubic-bezier(.7, 0, .25, 1);
}
.hero__words { display: flex; flex-wrap: wrap; justify-content: center; column-gap: .25em; }
.hero__word { display: flex; white-space: nowrap; }
.hero__letter {
  display: inline-block; opacity: 0; transform: translateY(.3em);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.is-stage-1 .hero__letter { opacity: 1; transform: none; }

.hero__content {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 24px 48px; margin-top: clamp(20px, 3vh, 36px);
  opacity: 0; transform: translateY(16px);
  transition: opacity .8s ease .3s, transform .8s ease .3s;
}
.is-stage-2 .hero__content { opacity: 1; transform: none; }
.hero__text { max-width: 820px; display: flex; flex-direction: column; gap: 12px; }
.hero__tagline { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: clamp(30px, 4.2vw, 64px); line-height: 1.05; letter-spacing: -.02em; color: var(--on-night); }
.hero__lead { margin: 0; max-width: 34ch; font-size: clamp(15px, 1.2vw, 18px); font-weight: 500; line-height: 1.6; letter-spacing: .01em; text-transform: uppercase; color: rgba(255, 255, 255, .9); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Botón "Ver demo landing Paco Fiesta" */
.btn-demo {
  display: flex; align-items: center; gap: 14px; height: 60px; padding: 6px 24px 6px 6px;
  border: 0; border-radius: 999px;
  background: #fff; color: var(--primary); font: 600 16px var(--font-body);
  transition: background .15s ease;
}
.btn-demo:hover { background: #F4F4F4; }
.btn-demo__thumb { width: 68px; height: 46px; border-radius: 999px; background: var(--primary) url('../assets/img/paco-fiesta-poster.webp') center / cover no-repeat; box-shadow: inset 0 0 0 999px rgba(135, 30, 24, .45); display: flex; align-items: center; justify-content: center; }
.btn-demo__play { width: 0; height: 0; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }

/* 5. Servicios ------------------------------------------- */
.services {
  position: relative; overflow: hidden; isolation: isolate;
  /* Foto real de la mesa con los bocetos, cubriendo toda la sección */
  background: var(--primary) url('../assets/img/mesa-bocetos.webp') center / cover no-repeat;
  padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 8vw, 104px);
}
/* Degradado: arriba continúa el rojo oscuro del hero y hacia abajo se va
   desvaneciendo hasta dejar ver la foto con sus colores originales */
.services::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg,
    #401310 0%,
    rgba(64, 19, 16, .94) 14%,
    rgba(135, 30, 24, .82) 34%,
    rgba(135, 30, 24, .5) 58%,
    rgba(135, 30, 24, .16) 80%,
    rgba(135, 30, 24, 0) 100%);
}
.services__inner { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.services__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(40px, 5vw, 64px); color: var(--on-night); }
.services__head .eyebrow { color: var(--on-night-variant); }
.services__note { margin: calc(-1 * clamp(20px, 3vw, 40px)) 0 clamp(16px, 2vw, 24px); text-align: center; font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--on-night-variant); }

.pkgs { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: stretch; max-width: 460px; margin: 0 auto; }
.pkg {
  /* Tarjetas de vidrio sobre el rojo */
  --pkg-bg: rgba(255, 255, 255, .86); --pkg-fg: #000; --pkg-sub: #605F5F;
  --pkg-border: rgba(255, 255, 255, .6); --pkg-line: rgba(0, 0, 0, .12);
  --pkg-btn-bg: #000; --pkg-btn-fg: #fff;
  position: relative; display: flex; flex-direction: column; gap: 20px; padding: 28px 24px 24px;
  background: var(--pkg-bg); color: var(--pkg-fg); border: 1px solid var(--pkg-border);
  -webkit-backdrop-filter: blur(18px) saturate(130%); backdrop-filter: blur(18px) saturate(130%);
}
.pkg--featured {
  /* Vidrio rojo oscuro */
  --pkg-bg: rgba(64, 19, 16, .82); --pkg-fg: #fff; --pkg-sub: rgba(255, 255, 255, .75);
  --pkg-border: rgba(255, 255, 255, .2); --pkg-line: rgba(255, 255, 255, .18);
  --pkg-btn-bg: #000; --pkg-btn-fg: #fff;
}
/* Entrada animada de las tarjetas (la activa js/main.js al llegar a Servicios)
   left = entra de derecha a izquierda · up = sube como bloque */
.js-reveal .pkg[data-reveal] {
  opacity: 0;
  transition: opacity .9s ease, transform 1.2s cubic-bezier(.25, .6, .3, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.js-reveal .pkg[data-reveal="left"] { transform: translateX(180px); --reveal-delay: .15s; }
.js-reveal .pkg[data-reveal="up"] { transform: translateY(180px); }
.js-reveal .pkg[data-reveal="up"]:nth-child(3) { --reveal-delay: .45s; }
.js-reveal .pkg[data-reveal="up"]:nth-child(4) { --reveal-delay: .7s; }
.js-reveal .pkgs.is-in .pkg[data-reveal] { opacity: 1; transform: none; }
.pkg__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pkg__name { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: -.02em; }
.pkg__badge { flex: none; padding: 5px 10px; border-radius: 0; background: #fff; color: var(--primary); text-transform: uppercase; letter-spacing: .02em; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pkg__for { margin: 0; color: var(--pkg-sub); font-size: 15px; line-height: 1.5; min-height: 3em; text-wrap: pretty; }
.pkg__price { display: flex; flex-direction: column; gap: 2px; }
.pkg__price > div { display: flex; align-items: baseline; gap: 8px; }
.pkg__from { font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--pkg-sub); }
.pkg__amount { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 3.4vw, 50px); line-height: 1; letter-spacing: -.04em; }
.pkg__cur { font-size: 14px; font-weight: 500; color: var(--pkg-sub); }
.pkg__line { height: 1px; background: var(--pkg-line); }
.pkg__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pkg__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.pkg__list li::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5,8.5 6.5,12 13.5,4' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='2.5,8.5 6.5,12 13.5,4' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pkg__note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--pkg-sub); }
.pkg__btn { height: 52px; border: 0; border-radius: 0; background: var(--pkg-btn-bg); color: var(--pkg-btn-fg); font: 600 15px var(--font-body); }
.pkg__btn:hover { opacity: .86; }

.services__extra { max-width: 460px; margin: clamp(20px, 3vw, 36px) auto 0; /* mismo estilo que las tarjetas de precios */ padding: 28px 24px 24px; background: rgba(255, 255, 255, .86); border: 1px solid rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(18px) saturate(130%); backdrop-filter: blur(18px) saturate(130%); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; color: var(--on-surface); font-size: 15px; font-weight: 500; line-height: 1.5; }
.services__extra p { margin: 0; }
.services__cine { flex: 1 1 100%; max-width: 820px; padding-left: 16px; border-left: 3px solid var(--primary); font-size: 16px; }
.services__cine strong { color: var(--primary); }
.services__extra strong { font-weight: 600; }
.services__extra-list { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* 6. Sobre mí -------------------------------------------- */
.about {
  background: var(--background); padding: clamp(64px, 9vw, 128px) 0;
  display: grid; grid-template-columns: 1fr; align-items: center; gap: clamp(32px, 6vw, 96px);
}
/* Entrada animada de Sobre mí (la activa js/main.js):
   el medio círculo con la foto entra desde la izquierda y el texto desde la derecha */
.js-reveal .about__photo,
.js-reveal .about__text {
  opacity: 0;
  transition: opacity 1s ease, transform 1.3s cubic-bezier(.25, .6, .3, 1);
}
.js-reveal .about__photo { transform: translateX(-100%); }
.js-reveal .about__text { transform: translateX(160px); transition-delay: .2s; }
.js-reveal .about.is-in .about__photo,
.js-reveal .about.is-in .about__text { opacity: 1; transform: none; }
.about__photo {
  width: clamp(180px, 30vw, 380px); aspect-ratio: 1 / 2; max-height: 760px; border-radius: 0 999px 999px 0;
  background: var(--collage);
  position: relative; overflow: hidden;
}
/* Foto recortada sin fondo, centrada verticalmente en el medio círculo */
.about__photo img {
  position: absolute; left: -22%; top: 50%; transform: translateY(-50%);
  width: 130%; max-width: none; height: auto; display: block;
  /* Desvanece el corte inferior del saco */
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 98%);
          mask-image: linear-gradient(to bottom, #000 78%, transparent 98%);
}
.about__text { max-width: 620px; padding: 0 clamp(16px, 4vw, 64px); display: flex; flex-direction: column; gap: 16px; }
.about__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 5.6vw, 72px); line-height: 1; letter-spacing: -.035em; }
.about__text .italic { font-size: clamp(26px, 2.6vw, 36px); }
.about__lead { margin: 8px 0 0; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--on-surface-variant); text-wrap: pretty; }
.about__cta { display: flex; margin-top: 12px; }

/* 7. Proceso --------------------------------------------- */
/* Colores de los pasos del Proceso (antes estaban dentro del HTML) */
.step { --bg: #3B1612; --wc: #9C564A; --cbg: #FFFFFF; --cfg: #000000; --cac: #871E18; }
.step {
  /* Cada paso mide 2 pantallas: la de adentro se queda fija (sticky) mientras haces scroll,
     primero ves solo la palabra gigante y luego la tarjeta baja como la cara de un cubo */
  position: relative; height: 200vh; overflow: clip;
  background: var(--bg); color: var(--on-night);
}
.step__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 96px 16px;
}
.step__word {
  position: absolute; top: 50%; left: 0; white-space: pre; will-change: transform;
  transform: translate3d(-40vw, -50%, 0);
  font-family: var(--font-serif); font-weight: 700; font-size: clamp(140px, 22vw, 380px); line-height: 1; letter-spacing: -.03em;
  color: var(--wc);
}

/* Luces de película DENTRO de las letras (inspiradas en "light leaks")
   El fondo de la sección se queda igual; la luz se ve solo a través de la palabra.
   Cada paso define sus colores con --l1, --l2 y --l3 */
.step__word {
  color: transparent;
  background-image:
    /* polvo de película */
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(255, 255, 255, .7) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 64% 38%, rgba(255, 255, 255, .6) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 36% 76%, rgba(255, 255, 255, .55) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 86% 64%, rgba(255, 255, 255, .6) 50%, transparent 51%),
    /* manchas de luz blanca que pasan por las letras */
    radial-gradient(closest-side, rgba(255, 255, 255, .42), transparent),
    radial-gradient(closest-side, rgba(255, 255, 255, .3), transparent),
    radial-gradient(closest-side, rgba(255, 255, 255, .36), transparent),
    /* color base de la letra (cada paso lo define con --wc) */
    linear-gradient(var(--wc, rgba(255, 255, 255, .15)), var(--wc, rgba(255, 255, 255, .15)));
  background-size: 260px 260px, 260px 260px, 260px 260px, 260px 260px, 70vw 120%, 55vw 110%, 50vw 130%, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat-x, repeat-x, repeat-x, no-repeat;
  -webkit-background-clip: text; background-clip: text;
  animation: word-lights 26s ease-in-out infinite;
  animation-play-state: paused;
}
@keyframes word-lights {
  0%   { background-position: 0 0, 0 0, 0 0, 0 0,  0 40%,     0 70%,      0 20%,     0 0; }
  50%  { background-position: -130px -260px, -130px -260px, -130px -260px, -130px -260px, 70vw 10%, -55vw 100%, 50vw 80%, 0 0; }
  100% { background-position: -260px -520px, -260px -520px, -260px -520px, -260px -520px, 140vw 40%, -110vw 70%, 100vw 20%, 0 0; }
}
.step.is-live .step__word { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
  .step__word { animation: none; background-position: 0 0, 0 0, 0 0, 0 0, 10vw 40%, 30vw 70%, 60vw 20%, 0 0; }
}

.step__eyebrow { position: absolute; top: 32px; left: clamp(16px, 4vw, 64px); font-size: 14px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--on-night-variant); }
.step__inner { position: relative; width: min(58vh, 84vw, 520px); display: flex; flex-direction: column; gap: 20px; transform-origin: 50% 0; will-change: transform, opacity; }
.step__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.step__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 3vw, 40px); line-height: 1.05; letter-spacing: -.03em; color: var(--on-night); }
.step__count { flex: none; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; padding-bottom: 4px; color: var(--on-night-variant); }
.step__card {
  aspect-ratio: 1 / 1; background: var(--cbg); color: var(--cfg);
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(24px, 4vw, 44px);
}
.step__card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.step__num { font-family: var(--font-serif); font-style: normal; font-weight: 400; font-size: clamp(56px, 7vw, 96px); line-height: .9; letter-spacing: -.02em; color: var(--cac); }
.step__key { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--cac); }
.step__desc { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -.02em; text-wrap: pretty; }

/* 8. Proyectos ------------------------------------------- */
.projects { background: var(--background); padding: clamp(72px, 9vw, 128px) 0; }
.projects__inner { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 56px); }
.projects-more {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px;
  padding: clamp(28px, 4vw, 48px); background: var(--surface); color: var(--on-surface); text-decoration: none;
}
.projects-more:hover { color: var(--on-surface); }
.projects-more__text { display: flex; flex-direction: column; gap: 8px; }
.projects-more .eyebrow { color: var(--muted); }
.projects-more__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3vw, 40px); line-height: 1.1; letter-spacing: -.03em; }
.projects-more__cta { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 28px; border-radius: 0; background: var(--inverse); color: #fff; font-weight: 600; transition: background .2s; }
.projects-more:hover .projects-more__cta { background: var(--inverse-hover); }

/* 9. Cotizar --------------------------------------------- */
.quote { background: var(--background); padding: 0 0 clamp(72px, 9vw, 128px); }
.quote__box { background: var(--surface); padding: clamp(28px, 5vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }
.quote__intro { display: flex; flex-direction: column; gap: 14px; }
.quote__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5vw, 60px); line-height: 1.02; letter-spacing: -.035em; }
.quote__italic { font-size: clamp(24px, 2.4vw, 32px); }
.quote__lead { margin: 8px 0 0; font-size: 17px; line-height: 1.5; color: var(--on-surface-variant); max-width: 420px; text-wrap: pretty; }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.field input, .field textarea {
  border: 1px solid var(--outline); border-radius: 0; background: #fff;
  font: 400 16px var(--font-body); color: var(--on-surface); outline: none;
}
.field input { height: 52px; padding: 0 16px; }
.field textarea { padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--on-surface); box-shadow: 0 0 0 1px var(--on-surface); }
.field__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.field__error { color: #814B3E; font-size: 13px; font-weight: 600; }
.field__error:empty { display: none; }
.field.has-error input, .field.has-error textarea { border-color: #814B3E; box-shadow: 0 0 0 1px #814B3E; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 6px; }
.form__sent { color: var(--success); font-weight: 600; }

/* 10. Footer --------------------------------------------- */
.footer { position: relative; overflow: hidden; background: var(--primary-deep); color: var(--on-night); padding: clamp(12px, 2.4vw, 32px); --dawn: #8A483B; --hit-x: 30%; --hit-y: 70%; }
.footer__frame { position: relative; z-index: 1; }
/* Estrella fugaz y cambio de color del footer */
.footer__dawn { position: absolute; inset: 0; z-index: 0; background: var(--dawn); clip-path: circle(0 at var(--hit-x) var(--hit-y)); transition: clip-path 1.6s cubic-bezier(.22, .8, .2, 1); }
.footer__flash { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--hit-x) var(--hit-y), rgba(255, 246, 225, .95) 0, rgba(255, 214, 170, .55) 8%, rgba(255, 190, 150, .18) 26%, transparent 55%); }
.footer.is-dawn .footer__dawn { clip-path: circle(160% at var(--hit-x) var(--hit-y)); }
.footer.is-dawn .footer__flash { animation: footer-flash 1.5s ease-out; }
@keyframes footer-flash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.footer__star { position: absolute; left: 0; top: 0; z-index: 3; width: 0; height: 0; pointer-events: none; opacity: 0; }
.footer__star-core { position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%; background: #FFF7E0; box-shadow: 0 0 4px 2px #FFE2A8, 0 0 12px 5px rgba(255, 160, 70, .9), 0 0 30px 10px rgba(240, 110, 40, .45); animation: spark-flicker .12s steps(2) infinite alternate; }
@keyframes spark-flicker { from { transform: scale(1); opacity: 1; } to { transform: scale(.75); opacity: .8; } }
.footer__star-tail { display: none; position: absolute; right: 0; top: -1px; width: clamp(60px, 7vw, 110px); height: 2px; border-radius: 2px; transform-origin: 100% 50%; transform: rotate(var(--tail-angle, 0deg)); background: linear-gradient(90deg, transparent, rgba(255, 150, 60, .5) 50%, rgba(255, 236, 190, .95)); filter: drop-shadow(0 0 4px rgba(255, 150, 60, .9)); }
.footer__ember { position: absolute; z-index: 2; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%; background: #FFD99A; box-shadow: 0 0 4px 1px rgba(255, 140, 50, .8); pointer-events: none; }
.footer__trail { position: absolute; z-index: 2; width: 2px; margin-left: -1px; height: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 150, 60, 0), rgba(255, 150, 60, .3) 60%, rgba(255, 225, 170, .9)); box-shadow: 0 0 8px 1px rgba(255, 140, 50, .4); border-radius: 2px; }
.footer__spark { position: absolute; z-index: 3; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #FFE3A6; box-shadow: 0 0 8px 2px rgba(255, 140, 50, .9); pointer-events: none; }
.footer__frame { border: 1px solid rgba(255, 255, 255, .16); padding: clamp(28px, 5vw, 80px) clamp(12px, 3.5vw, 56px) clamp(12px, 3vw, 40px); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; padding: 0 clamp(4px, 2vw, 32px); }
.footer__talk { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.footer__label { font-size: 14px; color: var(--on-night-variant); }
.footer__mail { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.footer__mail-link { color: var(--on-night); text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.footer__mail-link:hover { color: var(--on-night-variant); }
.footer__mail-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--inverse); display: flex; align-items: center; justify-content: center; }
.footer__mail-btn:hover { background: var(--inverse-hover); }
.footer__cols { display: flex; gap: clamp(40px, 6vw, 96px); }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col a { color: var(--on-night); text-decoration: none; }
.footer__col a:hover { color: var(--on-night-variant); }

.footer__eyes {
  display: flex; justify-content: center; gap: clamp(10px, 1.4vw, 20px);
  margin-top: clamp(56px, 9vw, 140px); margin-bottom: calc(clamp(64px, 8vw, 120px) * -0.42);
  position: relative; z-index: 0;
}

/* Ojos (footer y aviso de salida) */
.eye-wrap { width: clamp(64px, 8vw, 120px); height: clamp(64px, 8vw, 120px); }
.eye-wrap--sm { width: 56px; height: 56px; }
.eye {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  /* Esfera: luz arriba a la izquierda que se oscurece hacia la orilla (blanco, #F4F4F4, #E3E3E3 y #767676 del sistema 3.1) */
  background: radial-gradient(circle at 42% 36%, #FFFFFF 0%, #FFFFFF 38%, #F4F4F4 62%, #E3E3E3 84%, #C9C9C9 100%);
  box-shadow:
    inset -6px -10px 18px rgba(0, 0, 0, .22),   /* sombra interior: da volumen */
    inset 4px 6px 10px rgba(255, 255, 255, .7), /* luz que rebota en la orilla */
    0 10px 22px rgba(0, 0, 0, .35);             /* sombra hacia el fondo: la separa del footer */
}
.eye-wrap--sm .eye { box-shadow: inset -4px -6px 10px rgba(0, 0, 0, .28), inset 2px 4px 6px rgba(255, 255, 255, .7), 0 6px 12px rgba(0, 0, 0, .3); }
/* Orilla suave del ojo abierto (el brillo vive en el párpado: solo se ve con los ojos cerrados) */
.eye::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, .12) 100%); /* orilla suave */
}
/* Iris rojo del sistema (#871E18, #8B382A, #401310) con profundidad */
.eye__iris {
  position: absolute; left: 27%; top: 27%; width: 46%; height: 46%; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #8B382A 0%, #871E18 40%, #6E1813 70%, #401310 100%);
  box-shadow: inset 0 0 0 2px rgba(64, 19, 16, .55), inset -3px -4px 8px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .25);
}
.eye__pupil { position: absolute; left: 28%; top: 28%; width: 44%; height: 44%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #2A2A2A, #000 70%); }
.eye__shine { position: absolute; left: 20%; top: 16%; width: 18%; height: 18%; border-radius: 50%; background: #fff; opacity: .9; }
/* Párpado con el mismo volumen que la esfera, para que al cerrar no se vea plano */
.eye__lid {
  position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(ellipse 15% 9% at 30% 23%, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .7) 40%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(ellipse 36% 26% at 33% 27%, rgba(244, 244, 244, .55), rgba(244, 244, 244, 0) 75%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 78%, rgba(70, 64, 54, .35) 100%),
    radial-gradient(circle at 46% 42%, #DCD7CD 0%, #D6D0C5 45%, #C9C2B5 70%, #ABA392 90%, #8A8374 100%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
  transform: scaleY(0); transform-origin: 50% 0; transition: transform .12s;
}

.footer__brand { position: relative; z-index: 1; background: var(--background); color: var(--on-surface); padding: clamp(20px, 3vw, 44px) clamp(12px, 3vw, 44px) clamp(14px, 2vw, 24px); }
.footer__brand, .footer__brand .brand-cube__face, .footer__legal, .footer__legal a { transition: background-color 1.4s cubic-bezier(.4, 0, .2, 1), color 1.4s cubic-bezier(.4, 0, .2, 1); }
.footer__brand.is-lit, .footer__brand.is-lit .brand-cube__face, .footer__brand.is-lit .footer__legal, .footer__brand.is-lit .footer__legal a { transition-duration: .9s; }
.footer__brand.is-lit, .footer__brand.is-lit .brand-cube__face { background: #361814; color: var(--background); }
.footer__brand.is-lit .footer__legal, .footer__brand.is-lit .footer__legal a { color: rgba(244, 244, 244, .7); }
.brand-cube { perspective: 1400px; font-family: var(--font-serif); font-weight: 700; font-size: clamp(64px, 19vw, 360px); line-height: .9; letter-spacing: -.03em; }
.brand-cube__inner { position: relative; height: .92em; transform-style: preserve-3d; transform: translateZ(-.46em) rotateX(0deg); transition: transform .85s cubic-bezier(.7, 0, .25, 1); }
.brand-cube__inner.is-flipped { transform: translateZ(-.46em) rotateX(90deg); }
.brand-cube__face { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; background: var(--background); backface-visibility: hidden; }
.brand-cube__face--front { transform: translateZ(.46em); }
.brand-cube__face--bottom { transform: rotateX(-90deg) translateZ(.46em); }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: clamp(16px, 2vw, 28px); font-size: 14px; color: var(--on-surface-variant); }
.footer__legal a { color: var(--on-surface-variant); text-decoration: none; }
.footer__legal a:hover { color: var(--on-surface); }

/* 11. Menú ----------------------------------------------- */
.menu-btn {
  position: fixed; top: 20px; right: 20px; z-index: 110; width: 52px; height: 52px;
  background: var(--primary-deep); border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.show-menubtn .menu-btn { opacity: 1; pointer-events: auto; }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: var(--on-night); transition: transform .3s ease, opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .35s ease, visibility .35s;
}
.menu-open .menu { opacity: 1; pointer-events: auto; visibility: visible; }
.menu__panel {
  width: min(560px, 100%); padding: clamp(40px, 6vw, 64px) 24px;
  background: rgba(64, 19, 16, .8); -webkit-backdrop-filter: blur(18px) saturate(120%); backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, .16);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.menu__panel a { color: var(--on-night); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 6vw, 60px); line-height: 1.2; letter-spacing: -.03em; }
.menu__panel a:hover { color: var(--on-night-variant); }

/* 12. Galería y demo (caras del cubo) -------------------- */
/* El giro lo controla js/main.js con transform inline */
.cube-face {
  position: fixed; inset: 0; z-index: 120; transform-origin: 50% 50%;
  transition: transform .9s var(--ease-cube), opacity .45s ease; backface-visibility: hidden;
}
.cube-face[hidden] { display: none; }

.gallery { background: #481C17; color: #fff; }
/* Sobre el negro de la galería los botones van en blanco */
.gallery .btn--dark { background: #fff; color: #000; }
.gallery .btn--dark:hover { background: #E3E3E3; color: #000; }
.gallery .close-btn { background: #fff; }
.gallery .close-btn span { background: #000; }
.gallery .round-btn { background: #fff; color: #000; }
.gallery .round-btn:hover { background: #E3E3E3; }
.gallery__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 88px clamp(16px, 2vw, 24px) 90px 150px; }
.gallery__label { font-size: 13px; color: rgba(255, 255, 255, .6); text-align: center; }
.gallery__label[hidden] { display: none; }
.gallery__figure { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gallery__caption, .gallery__link { flex: none; }
.gallery__img { display: block; flex: 0 1 auto; min-height: 0; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; } /* siempre pegada arriba: mismo espacio con el título en todas las fotos */
.gallery__link { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; color: rgba(255, 255, 255, .75); font-size: 15px; font-weight: 500; text-decoration: none; }
.gallery__link span { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.gallery__link:hover span { color: var(--collage); }
.gallery__link[hidden] { display: none; }
.gallery__img[hidden], .gallery__caption[hidden] { display: none; }
/* Zoom out al pasar de un boceto a otro: la imagen entra grande y se acomoda, el título baja un instante después */
@keyframes g-zoom-out { from { transform: scale(1.18); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes g-title-in { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.gallery__figure.is-zoom .gallery__img { animation: g-zoom-out .7s cubic-bezier(.2, .7, .2, 1) both; }
.gallery__figure.is-zoom .gallery__caption { animation: g-title-in .5s ease .15s both; }
.gallery__caption { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: #fff; text-align: center; }
.gallery__thumb.has-img { background-size: cover; background-position: center; color: transparent; }
.gallery__bar { position: absolute; z-index: 2; top: 20px; left: clamp(16px, 3vw, 32px); right: clamp(16px, 3vw, 32px); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.gallery__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gallery__eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.gallery__title { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.gallery__actions { display: flex; align-items: center; gap: 10px; }
.gallery__thumbs {
  position: absolute; left: clamp(16px, 3vw, 32px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px; padding: 10px;
  background: var(--collage, #ABA392);
  max-width: calc(100vw - 32px); overflow: auto;
  /* Nunca se mete debajo del encabezado: si hay muchos bocetos, la columna hace scroll */
  max-height: calc(100vh - 200px); z-index: 1;
  overflow-x: hidden; overflow-y: auto;
  scrollbar-width: none; /* se puede deslizar, pero sin barras visibles */
}
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { flex: none; width: 92px; height: 62px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font: 600 13px var(--font-display); opacity: .55; outline: 2px solid #000; outline-offset: 2px; transition: opacity .2s; }
.gallery__thumb[aria-current="true"] { opacity: 1; outline-width: 3px; }
.gallery__nav { position: absolute; right: clamp(16px, 3vw, 32px); bottom: 28px; display: flex; align-items: center; gap: 12px; }
.gallery__counter { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.01em; margin-right: 8px; }

.demo { background: #000; color: var(--on-night); }
.demo__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.demo__bar {
  position: absolute; top: 0; left: 0; right: 0; padding: 20px clamp(16px, 3vw, 32px) 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: linear-gradient(rgba(0, 0, 0, .85), rgba(0, 0, 0, 0)); pointer-events: none;
}
.btn-back {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 6px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
  background: rgba(64, 19, 16, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--on-night); font: 600 15px var(--font-body);
}
.btn-back:hover { border-color: var(--on-night); }
.btn-back__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--on-night); color: var(--night); display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.demo__titles { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; text-align: right; }
.demo__eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--on-night-variant); }
.demo__title { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.demo__rotate {
  position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: none; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
  background: rgba(0, 0, 0, .75); font-size: 14px; color: #fff; white-space: nowrap; pointer-events: none;
}
.demo.is-on .demo__rotate { display: none; }
.demo__phone { display: inline-block; width: 14px; height: 22px; border: 2px solid #fff; border-radius: 4px; transform: rotate(-90deg); }

/* 13. Aviso de salida ------------------------------------ */
.exit { position: fixed; inset: 0; z-index: 130; background: rgba(0, 0, 0, .35); display: flex; align-items: flex-start; justify-content: center; padding: clamp(48px, 12vh, 120px) 16px 16px; }
.exit[hidden] { display: none; }
.exit__box { position: relative; width: min(400px, 100%); background: var(--background); color: var(--on-surface); padding: 36px 28px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; border: 1px solid var(--outline); }
.exit__close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; }
.exit__close span { position: absolute; left: 13px; top: 21px; width: 18px; height: 1.5px; background: var(--muted); transform: rotate(45deg); }
.exit__close span + span { transform: rotate(-45deg); }
.exit__eyes { display: flex; gap: 10px; }
.exit__title { margin: 8px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -.03em; }
.exit__text { margin: 0; color: var(--on-surface-variant); font-size: 16px; }
.exit__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* 14. Cursor --------------------------------------------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 300; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; pointer-events: none; display: none; mix-blend-mode: difference; will-change: transform;
  transition: width .25s ease, height .25s ease, background .25s ease, opacity .2s;
}
.cursor.is-hover { background: #fff; border: 0; mix-blend-mode: difference; }
@media (pointer: fine) {
  html.bs-cur, html.bs-cur * { cursor: none !important; }
}

/* Listón + sobrecito: entre el paso 01 y el 02.
   Con el scroll: 1) se dibuja un listón con giros, 2) aparece el sobre, 3) se abre la solapa, 4) sale la nota y queda encima */
.pocket { position: relative; height: 300vh; background: #3B1612; overflow: clip; --env-w: 260px; --env-h: 168px; --note-w: 440px; }
.pocket__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.ribbon { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.ribbon path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ribbon__body { stroke: #8B382A; stroke-width: 9; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.ribbon__shine { stroke: rgba(255, 255, 255, .28); stroke-width: 2; }
.pocket__stage { position: relative; z-index: 1; width: 100%; max-width: 620px; height: 440px; }
/* El sobre (posición, inclinación y aparición con JS) */
.envelope { position: absolute; left: 50%; top: 50%; width: var(--env-w); height: var(--env-h); margin: calc(var(--env-h) / -2) 0 0 calc(var(--env-w) / -2); opacity: 0; }
.envelope > span { position: absolute; }
.envelope--back { z-index: 0; }
.envelope--front { z-index: 2; }
.envelope--flap { z-index: 4; perspective: 700px; }
.envelope--flap.is-open { z-index: 0; }
.envelope__back { inset: 0; background: #5E1712; box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
/* Solapa: cerrada apunta hacia abajo; al abrir gira sobre la orilla de arriba */
.envelope__flap {
  left: 0; right: 0; top: 0; height: 56%;
  background: linear-gradient(180deg, #8B382A, #6E1813);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; will-change: transform;
}
.envelope__front {
  inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14%;
  background: linear-gradient(180deg, #871E18, #6E1813);
  clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%);
}
.envelope__front::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(255, 255, 255, .28); clip-path: inherit; }
.envelope__brand { font-family: var(--font-serif); font-weight: 700; font-size: 15px; color: rgba(255, 255, 255, .85); }
/* La nota */
.pocket__card {
  position: absolute; left: 50%; top: 50%; width: min(var(--note-w), 88vw); z-index: 1;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 26px 24px; background: #FFFFFF; color: #000;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .35); will-change: transform; visibility: hidden;
}
.pocket__card.is-out { z-index: 5; }
.pocket__label { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.pocket__text { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(19px, 2vw, 24px); line-height: 1.25; letter-spacing: -.02em; text-wrap: pretty; }
.pocket__text strong { color: var(--primary); font-weight: 700; }
@media (max-width: 560px) {
  .pocket { --env-w: 210px; --env-h: 136px; --note-w: 320px; }
  .pocket__stage { height: 420px; }
  .ribbon__body { stroke-width: 7; }
}

/* 15. Responsive y movimiento reducido ------------------- */
@media (min-width: 640px) {
  /* En 2 columnas las tarjetas se limitan de ancho para que respiren */
  .pkgs { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; }
  .services__extra { max-width: 860px; }
}
@media (min-width: 720px) {
  .about { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 719px) {
  .services { background-image: url('../assets/img/mesa-bocetos-vertical.webp'); background-position: center bottom; }
  /* Hero en celular: nombre gigante alineado a la izquierda, en dos líneas */
  .hero__name { font-size: 21vw; line-height: .9; }
  .hero__words { justify-content: flex-start; }
  .gallery__thumbs { left: 50%; top: auto; bottom: 16px; transform: translateX(-50%); flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .gallery__thumb { width: 64px; height: 44px; }
  .gallery__nav { bottom: 92px; }
  .gallery__stage { padding: 96px 12px 180px; }
  .gallery__titles { flex: 1; }
  .gallery__eyebrow { font-size: 11px; }
  .gallery__title { font-size: 16px; line-height: 1.15; }
  .gallery__titles { min-width: 0; }
  .gallery__actions .btn--sm { height: 44px; padding: 0 14px; font-size: 13px; }
  .gallery__actions .close-btn { width: 44px; height: 44px; }
  .gallery__actions .close-btn span { left: 11px; top: 21px; }
  /* Aviso para girar el teléfono cuando está vertical */
  @media (orientation: portrait) {
    .demo.is-on .demo__rotate { display: flex; }
  }
}
@media (min-width: 900px) {
  .quote__box { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
/* Galería en pantallas grandes: el título sube a la barra y las flechas pasan a la derecha,
   así el boceto usa casi toda la pantalla */
@media (min-width: 1024px) {
  .gallery__stage { padding: 108px 104px 24px 150px; }
  .gallery__caption { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
  .gallery__figure.is-zoom .gallery__caption { animation-name: g-title-in-center; }
  .gallery__nav { top: 50%; bottom: auto; right: 24px; transform: translateY(-50%); flex-direction: column; gap: 12px; }
  .gallery__counter { margin: 0 0 4px; font-size: 18px; }
}
@keyframes g-title-in-center { from { transform: translate(-50%, -14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (min-width: 1100px) {
  .pkgs { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; gap: 24px; }
  .services__extra { max-width: none; margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
