/* MagiCalli · paleta oliva, suave y natural */
:root {
  --fondo: #1e2219;        /* oliva muy oscuro, el color donde se disuelven las fotos */
  --fondo-2: #272c21;      /* un paso más claro, para cajas */
  --tinta: #e6e6dc;        /* hueso verdoso */
  --suave: #a9a88f;        /* salvia apagada */
  --oliva: #8f9566;        /* oliva claro */
  --salvia: #c9c7a4;       /* botón */
  --m: clamp(18px, 2.6vw, 36px);
  --chica: 0.875rem;
  --texto: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --palabra: clamp(3.2rem, 8.6vw, 9rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fondo); color: var(--tinta);
  font-family: "Outfit", system-ui, sans-serif; font-weight: 300; font-size: var(--texto); line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--salvia); outline-offset: 4px; }
::selection { background: var(--oliva); color: var(--fondo); }

/* barra */
.barra {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--m); transition: background-color .4s;
}
.barra.solida { background: rgba(30, 34, 25, .94); }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none;
  font-family: "Marcellus", serif; letter-spacing: .16em; font-size: .9375rem; color: var(--tinta); }
.barra nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); font-size: var(--chica); }
.barra nav a:not(.pastilla) { text-decoration: none; opacity: .85; transition: opacity .2s; }
.barra nav a:not(.pastilla):hover { opacity: 1; }
.pastilla, .boton {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  border-radius: 999px; font-weight: 500; transition: transform .3s var(--ease), background-color .3s;
}
.pastilla { min-height: 38px; padding: 0 20px; background: var(--tinta); color: var(--fondo); }
.boton { min-height: 54px; padding: 0 32px; background: var(--salvia); color: var(--fondo); font-size: var(--texto); font-weight: 500; }
.pastilla:hover, .boton:hover { transform: translateY(-2px); background: #fff; }
.pastilla:active, .boton:active { transform: scale(.97); }

/* capítulo: foto + una palabra, la foto se disuelve en el fondo oliva (el pin) */
.vista { position: relative; height: 100svh; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); /* taste-skill-ignore: la foto se disuelve, como pidió Erick */
          mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); /* taste-skill-ignore */ }
.vista-corta { height: 90svh;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 62%, transparent 100%); /* taste-skill-ignore: entra y sale suave */
          mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 62%, transparent 100%); /* taste-skill-ignore */ }
.vista-foto {
  position: absolute; inset: -8% 0 auto 0; width: 100%; height: 116% !important; object-fit: cover;
  transform: translate3d(0, calc(var(--y, 0) * 1px), 0) scale(var(--z, 1));
}
.vista-foto { filter: brightness(.86) saturate(.92); }
#retiros .vista-foto { filter: brightness(.7) saturate(.9); }
#inicio .vista-foto { object-position: 50% 60%; filter: brightness(.72) saturate(.9); }
#tepoztlan .vista-foto { object-position: 50% 45%; }
#retiros .vista-foto { object-position: 50% 40%; }
#casa .vista-foto { object-position: 50% 35%; }
#contacto .vista-foto { object-position: 40% 50%; }
.palabra {
  position: absolute; left: 0; right: 0; top: 30%; text-align: center;
  font-family: "Outfit", system-ui, sans-serif; font-weight: 600; font-size: var(--palabra);
  letter-spacing: -0.035em; line-height: 1; color: #f0f0e8;
  transform: translate3d(0, calc(var(--t, 0) * 1px), 0); opacity: var(--o, 1);
}
.vista-pie {
  position: absolute; left: var(--m); right: var(--m); bottom: 24%;
  display: flex; justify-content: space-between; align-items: end; gap: 20px; font-size: var(--chica); bottom: 31%;
  opacity: var(--o, 1);
}
.vista-pie b { font-weight: 500; }
.vista-ligas { display: flex; gap: 20px; }
.vista-ligas a { text-decoration: none; opacity: .85; }
.vista-ligas a:hover { opacity: 1; text-decoration: underline; }

.fondo { position: relative; margin-top: -8svh; padding: 0 var(--m) clamp(120px, 16vw, 220px); }
.texto { max-width: 44ch; margin: 0 auto; text-align: center; color: var(--tinta); }

/* qué es y cómo funciona */
.bajada { position: absolute; left: 0; right: 0; top: calc(30% + var(--palabra) * 1.15); text-align: center; font-size: clamp(1.0625rem, 1rem + .4vw, 1.375rem); font-weight: 400; letter-spacing: .01em; color: #f0f0e8; opacity: var(--o, 1); transform: translate3d(0, calc(var(--t, 0) * 1px), 0); }
.texto-grande { max-width: 34ch; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.45; font-weight: 300; }
.como { list-style: none; margin: clamp(64px, 8vw, 104px) auto; padding: 0; max-width: 1040px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); text-align: center; }
.como h3 { margin: 0 0 10px; font-size: var(--texto); font-weight: 500; }
.como p { font-size: var(--chica); color: var(--suave); max-width: 26ch; margin: 0 auto; }
.como li { padding-top: 26px; position: relative; }
.como li::before { content: ""; position: absolute; top: 0; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--oliva); }

/* las tiras C A L L I */
.tiras {
  list-style: none; margin: 0 auto clamp(64px, 8vw, 110px); padding: 0;
  display: flex; justify-content: center; align-items: flex-start; gap: clamp(14px, 3vw, 48px);
}
.tiras li { position: relative; width: clamp(58px, 9.5vw, 140px); transform: translate3d(0, calc(var(--p, 0) * 1px), 0); }
.tiras li:nth-child(2) { margin-top: -5%; }
.tiras li:nth-child(3) { margin-top: 9%; }
.tiras li:nth-child(4) { margin-top: 2%; }
.tiras li:nth-child(5) { margin-top: -3%; }
.tiras img, .con-video { width: 100%; aspect-ratio: 5 / 8; object-fit: cover; }
.tiras img { filter: saturate(.85); }
.con-video { position: relative; }
.con-video img { height: 100%; }
.con-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s; }
.con-video video.corre { opacity: .9; }
.tiras .letra {
  position: absolute; left: 0; right: 0; bottom: -0.5em; text-align: center;
  font-family: "Fraunces", Georgia, serif; font-optical-sizing: none; font-variation-settings: "opsz" 36, "SOFT" 100; font-weight: 300; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1;
  color: rgba(240, 240, 232, .82);
}

/* retiros */
.lista { max-width: 900px; margin: clamp(64px, 8vw, 104px) auto 0; display: grid; gap: clamp(28px, 4vw, 44px); }
.retiro { background: var(--fondo-2); padding: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px 52px; }
.retiro-fecha { grid-column: 1 / -1; }
.retiro-fecha strong { display: block; font-family: "Fraunces", Georgia, serif; font-optical-sizing: none; font-variation-settings: "opsz" 36, "SOFT" 100; font-weight: 300; font-size: clamp(2.8rem, 6vw, 4.8rem); letter-spacing: -0.02em; line-height: 1; }
.retiro-fecha span { display: block; margin-top: 8px; font-size: var(--texto); }
.retiro-fecha small { display: block; margin-top: 4px; font-size: var(--chica); color: var(--suave); }
.retiro-info p { margin-bottom: 8px; }
.retiro-info h4 { margin: 20px 0 6px; font-size: var(--chica); font-weight: 500; color: var(--oliva); }
.retiro-info ul { margin: 0; padding: 0; list-style: none; font-size: var(--chica); line-height: 1.85; }
.retiro-info .no li { color: var(--suave); }
.retiro-caja { display: grid; align-content: start; gap: 18px; }
.precio { display: flex; justify-content: space-between; align-items: baseline; }
.precio strong { font-family: "Fraunces", Georgia, serif; font-optical-sizing: none; font-variation-settings: "opsz" 36, "SOFT" 100; font-weight: 300; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.precio span, .cupo, .total { font-size: var(--chica); color: var(--suave); }
.cupo b, .total b { color: var(--tinta); font-weight: 500; }
.barra-cupo { height: 4px; background: #363c2d; border-radius: 4px; overflow: hidden; } /* taste-skill-ignore: medidor del cupo */
.barra-cupo i { display: block; height: 100%; background: var(--oliva); transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease); }
.retiro.visto .barra-cupo i { transform: scaleX(var(--lleno)); }
.personas { display: flex; justify-content: space-between; align-items: center; font-size: var(--chica); }
.contador { display: flex; align-items: center; gap: 6px; }
.contador button { width: 44px; height: 44px; border-radius: 999px; border: 0; background: #343a2b; color: var(--tinta); font: inherit; font-size: 1.2rem; cursor: pointer; transition: transform .2s var(--ease), background-color .2s; }
.contador button:hover:not(:disabled) { background: #434a37; }
.contador button:active { transform: scale(.92); }
.contador button:disabled { opacity: .3; cursor: default; }
.contador output { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.retiro-caja .boton { width: 100%; }
.retiro.lleno .boton { background: #343a2b; color: var(--tinta); }

/* pago */
.msi { font-size: var(--chica); color: var(--salvia); }
.hijole { color: var(--tinta); line-height: 1.5; }
.ventana { border: 0; padding: 0; background: transparent; color: var(--tinta); max-width: min(480px, calc(100vw - 24px)); width: 100%; }
.ventana::backdrop { background: rgba(14, 16, 11, .78); }
.pago { position: relative; background: var(--fondo-2); padding: clamp(28px, 5vw, 44px); display: grid; gap: 18px; border-radius: 14px; max-height: calc(100svh - 24px); overflow: auto; }
.pago h2 { font-family: "Fraunces", Georgia, serif; font-variation-settings: "opsz" 36, "SOFT" 100; font-weight: 300; font-size: 2.4rem; line-height: 1; margin: 0; }
.pago-retiro { font-size: var(--chica); color: var(--salvia); }
.pago-quedan, .pago-nota { font-size: var(--chica); color: var(--suave); }
.pago-cerrar { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; border: 0; background: none; color: var(--tinta); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.formas { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.formas legend { font-size: var(--chica); color: var(--suave); margin-bottom: 8px; }
.formas label { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #343a2b; border-radius: 10px; cursor: pointer; font-size: var(--chica); }
.formas label:has(input:checked) { background: #434a37; }
.formas input { accent-color: var(--salvia); width: 18px; height: 18px; }
.formas b { font-weight: 500; }
.campo { display: grid; gap: 6px; font-size: var(--chica); color: var(--suave); }
.campo input { font: inherit; font-size: 16px; color: var(--tinta); background: #343a2b; border: 0; border-radius: 10px; padding: 14px 16px; }
.campo input:focus { outline: 2px solid var(--salvia); }
.pago-error { color: #e7b38f; font-size: var(--chica); min-height: 1em; }
.pago .boton { width: 100%; border: 0; cursor: pointer; font-family: inherit; }
.pago .boton:disabled { opacity: .6; cursor: default; }
.pago-iframe { min-height: 230px; }
.pago-tarjeta { padding: 22px; border-radius: 10px; background: #343a2b; font-size: var(--chica); color: var(--suave); }
.pago-fin p { color: var(--tinta); }
.pago-clip { padding: 0; overflow: hidden; }
.pago-clip iframe { width: 100%; height: min(720px, calc(100svh - 90px)); border: 0; background: #fff; display: block; }
.pago-clip .pago-nota { padding: 12px 18px; }
.retiro-caja button.boton { border: 0; cursor: pointer; font-family: inherit; }

/* la casa */
.guias { margin: 0 auto clamp(48px, 6vw, 80px); width: min(600px, 100%); }
.guias img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; object-position: 50% 25%; }
.guias figcaption { margin-top: 14px; text-align: center; font-size: var(--chica); color: var(--suave); }
.cita { margin: clamp(80px, 10vw, 130px) auto 0; max-width: 34ch; text-align: center; }
.cita p { font-family: "Fraunces", Georgia, serif; font-optical-sizing: none; font-variation-settings: "opsz" 36, "SOFT" 100; font-style: italic; font-size: clamp(1.5rem, 1rem + 1.2vw, 2.25rem); line-height: 1.2; }
.cita footer { margin-top: 18px; font-size: var(--chica); color: var(--suave); }

/* cierre */
.cierre { display: grid; justify-items: center; gap: 28px; text-align: center; }
.firma { display: grid; justify-items: center; gap: 12px; margin-top: 64px; }
.firma img { width: 72px; height: 72px; }
.firma span { font-family: "Marcellus", serif; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: .12em; color: #e9d66a; line-height: 1; }
.firma small { font-family: "Marcellus", serif; font-size: var(--chica); letter-spacing: .16em; color: var(--suave); }
.creditos { max-width: 64ch; font-size: .8125rem; color: var(--suave); }
.creditos summary { cursor: pointer; list-style: none; opacity: .7; }
.creditos summary::-webkit-details-marker { display: none; }
.creditos p { margin-top: 10px; }

/* entradas */
.entra { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.entra.visto { opacity: 1; transform: none; }
#inicio .palabra, #inicio .bajada { animation: aparece 1.6s var(--ease) both; }
#inicio .bajada { animation-delay: .25s; }
#inicio .vista-pie, .barra { animation: aparece 1.3s var(--ease) .4s both; }
@keyframes aparece { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 760px) {
  .barra nav a:not(.pastilla) { display: none; }
  .palabra { top: 34%; font-size: 19vw; }
  .vista-pie { flex-direction: column; align-items: center; text-align: center; bottom: 22%; gap: 10px; }
  .tiras { gap: 8px; }
  .tiras li { width: 17vw; }
  .tiras .letra { font-size: 2rem; }
  .retiro { grid-template-columns: 1fr; }
  .como { grid-template-columns: 1fr; gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  /* Las transiciones ligadas al scroll se quedan (las pidió Erick); se apaga lo que se mueve solo. */
  html { scroll-behavior: auto; }
  #inicio .palabra, #inicio .bajada, #inicio .vista-pie, .barra { animation: none; }
  .con-video video { display: none; }
}

/* reel de Magali (Instagram) */
.reel { max-width: 400px; margin: clamp(32px, 6vw, 64px) auto; }
.reel .instagram-media { margin: 0 auto !important; min-width: 0 !important; width: 100% !important; border-radius: 18px !important; }
.aviso { margin-top: 28px; font-size: var(--chica); color: var(--suave); }
.fondo .texto + .texto { margin-top: 1.4em; }
