/* ============================================================
   XÍIMBAL KANAN · El Caminar del Guardián
   Sistema: escenario fijo + texto que pasa encima.
   Cada sección es una fotografía que se queda quieta ocupando
   exactamente una pantalla, y una columna de texto que la recorre.
   ============================================================ */

/* ------------------------------------------------------------
   TIPOGRAFÍAS · alojadas aquí mismo (public/fonts), no en Google:
   el sitio no manda nada a terceros. Son fuentes variables: un solo
   archivo cubre los pesos 300 y 400. Licencia SIL OFL · fonts/LICENCIA.txt
   ------------------------------------------------------------ */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../fonts/cormorant-garamond.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap; src: url('../fonts/cormorant-garamond-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter.woff2') format('woff2'); }

:root {
  --ink: #16314B;            /* azul maya · sólo pie y acentos */
  --ground: 14, 13, 11;      /* la oscuridad de los velos, en RGB para alfa */
  --paper: #F2EEE4;          /* texto sobre fotografía */
  --rule: rgba(242, 238, 228, .16);
  --serif: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --bar: 92px;
  --gutter: clamp(1.5rem, 7vw, 7.5rem);
  --column: min(42vw, 36rem);
  --veil: .80;               /* densidad del velo sobre el lado del texto */
  --stage-dim: .06;          /* velo uniforme muy ligero sobre toda la foto */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
/* suave sólo al hacer clic en un enlace (html:focus-within); un enlace directo a #seccion cae en seco y exacto */
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: rgb(var(--ground));
  color: var(--paper);
  font: 300 1rem/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p { margin: 0 0 1.15rem; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .3em; }
strong { font-weight: 400; }
em { font-style: italic; }
img { display: block; max-width: 100%; }
figure, blockquote { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--sans); font-size: .86rem; font-weight: 400; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 5px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 300; margin: 0; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.95rem, 2.8vw, 2.5rem); }
h3 { font-size: clamp(1.45rem, 1.9vw, 1.7rem); line-height: 1.18; margin: 2.6rem 0 1rem; }
h4 { font: 400 .78rem/1.6 var(--sans); letter-spacing: .22em; text-transform: uppercase; margin: 1.6rem 0 .9rem; opacity: .85; }
h2::after { content: ''; display: block; width: 56px; height: 1px; background: currentColor; opacity: .45; margin: 1.4rem 0 1.6rem; }

.eyebrow, .section-number {
  font: 300 .7rem/1.6 var(--sans); letter-spacing: .38em; text-transform: uppercase;
  margin-bottom: 1.25rem; opacity: .7;
}

/* ------------------------------------------------------------
   LA BARRA · vidrio esmerilado, siempre. Nunca un fondo sólido.
   ------------------------------------------------------------ */
.skip-link { position: fixed; z-index: 200; top: -100px; left: 24px; padding: 12px 18px; background: rgb(var(--ground)); }
.skip-link:focus { top: 12px; }

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  min-height: var(--bar);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0 var(--gutter);
  color: #fff;
  background: transparent;
  -webkit-backdrop-filter: blur(14px) saturate(130%);
          backdrop-filter: blur(14px) saturate(130%);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .4);
}
/* el seguro de lectura: nace oscuro arriba y muere en nada antes del borde */
.bar::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--ground), .48) 0%, rgba(var(--ground), .2) 55%, rgba(var(--ground), 0) 100%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bar::before { background: linear-gradient(to bottom, rgba(var(--ground), .7) 0%, rgba(var(--ground), .25) 70%, rgba(var(--ground), 0) 100%); }
}
.brand { display: block; flex: 0 0 auto; }
.brand img { width: 178px; height: auto; }

/* el nav vive FUERA de la barra (ver layout.html) y en escritorio se le superpone a la derecha */
.nav {
  position: fixed; top: 0; right: var(--gutter); z-index: 101;
  height: var(--bar);
  display: flex; align-items: center; gap: 1.6rem;
  font-size: .7rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .4);
}
.nav .nav-close { display: none; }
.nav a { padding: .8rem 0; text-decoration: none; border-bottom: 1px solid transparent; white-space: nowrap; transition: border-color .25s; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: rgba(255, 255, 255, .8); }
.nav .nav-quote { margin-left: .4rem; padding-left: 1.4rem; border-left: 1px solid rgba(255, 255, 255, .35); }

.menu-toggle {
  display: none; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.7);
  min-height: 44px; padding: .4rem 0; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}

/* ------------------------------------------------------------
   LA ESCENA
   .stage  · sticky, mide exactamente una pantalla, lleva la foto
   .body   · sube por encima con margin negativo y lleva el velo
   ------------------------------------------------------------ */
.scene { position: relative; isolation: isolate; }

.stage {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: rgb(var(--ground));
}
.stage picture, .stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 50%);
}
.stage img { transform: translateZ(0); backface-visibility: hidden; } /* capa propia desde el primer cuadro */
/* las escenas de una sola pantalla no necesitan sticky: la foto va fija en su caja */
.hero .stage, .scene--one .stage { position: absolute; inset: 0; height: 100%; }
.hero .body, .scene--one .body { margin-top: 0; }
.stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: rgba(var(--ground), var(--stage-dim));
}

.body {
  position: relative; z-index: 1;
  margin-top: -100vh; margin-top: -100svh;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--bar) + 2rem) var(--gutter) 6rem;
  /* el velo direccional viaja con el texto: oscurece sólo el lado donde está la columna */
  background: linear-gradient(to right,
    rgba(var(--ground), var(--veil)) 0%,
    rgba(var(--ground), calc(var(--veil) * .94)) 32%,
    rgba(var(--ground), calc(var(--veil) * .62)) 50%,
    rgba(var(--ground), 0) 68%);
}
.scene--right .body {
  justify-content: flex-end;
  background: linear-gradient(to left,
    rgba(var(--ground), var(--veil)) 0%,
    rgba(var(--ground), calc(var(--veil) * .94)) 32%,
    rgba(var(--ground), calc(var(--veil) * .62)) 50%,
    rgba(var(--ground), 0) 68%);
}
.column { width: var(--column); max-width: 100%; }
.column > :first-child { margin-top: 0; }

/* la página del formulario es larga: arranca arriba y no se centra */
.scene--form .body { align-items: flex-start; padding-top: calc(var(--bar) + 3.5rem); }
.scene--form .column { width: min(44vw, 38rem); }

/* la portada y el cierre miden exactamente una pantalla */
.scene--one .body { min-height: 100vh; min-height: 100svh; }
.hero .column { width: min(48vw, 40rem); }
.hero h1 { margin-bottom: .4rem; }
.hero .signature { margin-top: 0; }
.hero .tagline { font: 300 clamp(1.25rem, 1.9vw, 1.6rem)/1.35 var(--serif); letter-spacing: .005em; margin: 1.6rem 0 1.4rem; }

.prose > p { opacity: .94; max-width: 62ch; }
.prose li { opacity: .94; }
.signature, .closing-line { font: italic 300 1.25rem/1.5 var(--serif); margin-top: 1.6rem; }
.signature::before, .closing-line::before { content: ''; display: block; width: 40px; height: 1px; background: currentColor; opacity: .45; margin-bottom: 1.1rem; }
.closing-line p { margin: 0; }

.text-link, .button {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 48px;
  padding: .7rem 0; margin-top: .4rem;
  font: 400 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: inherit; background: none; border: 0; border-bottom: 1px solid rgba(242, 238, 228, .55);
  text-decoration: none; cursor: pointer; transition: border-color .25s, gap .25s;
}
.text-link:hover, .button:hover { border-bottom-color: var(--paper); gap: 1rem; }
.button:disabled { opacity: .6; cursor: wait; }

.pending { margin: 1.6rem 0; font-size: .76rem; opacity: .8; }
.pending code { font-size: .76rem; }

/* bloques de consulta: sobre la misma oscuridad del velo, nunca otro color */
.panel {
  margin: 1.6rem 0; padding: 1.5rem 1.6rem;
  background: rgba(var(--ground), .38);
  border: 1px solid rgba(242, 238, 228, .12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.requirements { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: .75rem 0; border-top: 1px solid var(--rule); }

.facts { margin: 1.6rem 0; }
.facts > div { display: grid; grid-template-columns: 30% 1fr; gap: 1rem; border-top: 1px solid var(--rule); padding: .75rem 0; }
.facts dt { font-weight: 400; }
.facts dd { margin: 0; opacity: .92; overflow-wrap: anywhere; }
.bank-details { font-variant-numeric: tabular-nums; }
.bank-details > div { grid-template-columns: 5rem 1fr; }
.waiver-details > div { grid-template-columns: 44% 1fr; }
.phone-item { white-space: nowrap; text-decoration: none; }

.moments, .stations, .reservation-steps { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.moments > li { padding: 2rem 0; border-top: 1px solid var(--rule); }
.moments > li:first-child { border-top: 0; padding-top: .6rem; }
.moment-number { font: 300 2.2rem/1 var(--serif); opacity: .55; margin: 0 0 .8rem; letter-spacing: .02em; }
.moments h3 { margin-top: 0; }
.stations li, .reservation-steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: 1rem; border-top: 1px solid var(--rule); padding: 1rem 0; }
.step-number { font: 300 1.6rem/1.3 var(--serif); opacity: .6; }

.itinerary { margin-top: 2.4rem; }
.itinerary summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .8rem; min-height: 48px; font: 400 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid rgba(242, 238, 228, .55); }
.itinerary summary::-webkit-details-marker { display: none; }
.itinerary summary::after { content: '+'; font-size: 1.1rem; font-weight: 300; transition: transform .3s var(--ease); }
.itinerary[open] summary::after { transform: rotate(45deg); }
.day { margin: 2.2rem 0 0; }
.day h3 { font-size: 1.35rem; margin: 0 0 1rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--rule); font-size: .9rem; line-height: 1.65; }
.timeline time { font-size: .72rem; font-weight: 400; letter-spacing: .06em; font-variant-numeric: tabular-nums; padding-top: .2rem; opacity: .8; }

.minor-contact { margin-top: 1.8rem; font-size: .82rem; opacity: .85; }

/* ------------------------------------------------------------
   EL PIE · el único bloque azul maya, al final, como la
   contraportada de la presentación.
   ------------------------------------------------------------ */
.site-footer { position: relative; z-index: 2; background: var(--ink); color: var(--paper); }
.footer-main { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; padding: 5rem var(--gutter) 3.5rem; }
.footer-logo { width: 220px; height: auto; margin-bottom: 1.6rem; }
.footer-brand p { font-size: .8rem; opacity: .85; }
.footer-map { display: flex; flex-direction: column; gap: .15rem; font-size: .8rem; opacity: .9; text-decoration: none; }
.footer-map-name { font-weight: 400; }
.footer-map-cta { margin-top: .6rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid rgba(242,238,228,.45); align-self: flex-start; padding-bottom: .15rem; }
.footer-map:hover .footer-map-cta { border-bottom-color: var(--paper); }
.footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; font-size: .82rem; }
.footer-contact a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.footer-contact .phones { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.footer-ig { gap: .55rem; }
.footer-ig svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.4rem calc(var(--gutter) + 9rem) 2.2rem var(--gutter); border-top: 1px solid var(--rule); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-direction: column; gap: .35rem; }
.footer-legal a { text-decoration-color: rgba(242, 238, 228, .5); }

.floating-whatsapp {
  position: fixed; z-index: 105; right: 1.25rem; bottom: 1.25rem;
  display: inline-flex; align-items: center; gap: .6rem; min-height: 46px; padding: .55rem 1rem;
  background: rgba(var(--ground), .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 238, 228, .25); color: var(--paper); text-decoration: none;
  font: 400 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  transition: background .25s, border-color .25s;
}
.floating-whatsapp:hover { background: rgba(var(--ground), .8); border-color: rgba(242, 238, 228, .5); }
.floating-whatsapp svg { width: 16px; height: 16px; fill: currentColor; }

/* ------------------------------------------------------------
   EL FORMULARIO
   ------------------------------------------------------------ */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.group-selector { margin: 2.4rem 0 .6rem; }
.group-selector legend { font: 300 1.7rem/1.2 var(--serif); margin-bottom: 1.1rem; }
.group-options { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.2rem; }
.group-options label { position: relative; cursor: pointer; }
.group-options input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.group-options span { display: flex; flex-direction: column; justify-content: center; min-height: 72px; padding: .7rem .2rem; border-bottom: 1px solid rgba(242, 238, 228, .4); font-size: .95rem; transition: background .25s, border-color .25s; }
.group-options small { font-size: .68rem; line-height: 1.5; opacity: .72; margin-top: .25rem; }
.group-options input:checked + span { background: rgba(242, 238, 228, .08); border-bottom: 2px solid var(--paper); }
.group-options input:focus-visible + span { outline: 2px solid var(--paper); outline-offset: 4px; }
.form-field { margin: 1.4rem 0; }
.form-field label { display: block; font-size: .8rem; letter-spacing: .02em; margin-bottom: .45rem; }
.form-field input, .form-field textarea, .form-field select {
  display: block; width: 100%; min-height: 46px; padding: .5rem .2rem;
  border: 0; border-bottom: 1px solid rgba(242, 238, 228, .4); border-radius: 0;
  background: transparent; color: var(--paper); font-size: 1rem; transition: border-color .25s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: none; border-bottom-color: var(--paper); }
.form-field textarea { resize: vertical; }
.form-field select option { color: var(--paper); background: #1c1a17; }
.form-field small, .field-note { font-size: .7rem; opacity: .72; }
.conditional-fields { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.conditional-fields legend { font: 300 1.4rem/1.2 var(--serif); }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-error { font-weight: 400; border-left: 1px solid var(--paper); padding-left: 1rem; }
.form-privacy { margin: 1.6rem 0 0; font-size: .74rem; line-height: 1.65; opacity: .78; max-width: 54ch; }
.quote-success { margin-block: 2.5rem; }
.error-page .body { min-height: 100svh; }

/* página legal · sin fotografía: el texto sobre el fondo oscuro, arranca arriba */
.legal-page .stage { position: absolute; inset: 0; height: 100%; }
.legal-page .body { margin-top: 0; min-height: 100svh; align-items: flex-start; padding-top: calc(var(--bar) + 3.5rem); background: none; }
.legal-page .column { width: min(60vw, 44rem); }
.legal-page h1 { margin-bottom: 1.6rem; }
.legal-page .prose > p { max-width: 68ch; }
.legal-date { margin-top: 2rem; font-size: .76rem; letter-spacing: .06em; opacity: .7; }

/* ------------------------------------------------------------
   MOVIMIENTO · discreto; el texto entra como se asienta la luz
   ------------------------------------------------------------ */
.enter { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.enter.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .enter { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------
   PANTALLAS MEDIANAS
   ------------------------------------------------------------ */
@media (max-width: 1100px) {
  :root { --column: min(50vw, 34rem); }
  .brand img { width: 156px; }
  .nav { gap: 1.1rem; font-size: .66rem; }
}

/* ------------------------------------------------------------
   CELULAR · la foto se ve completa arriba; el texto sube sobre
   ella con su propia oscuridad, que viaja con el texto.
   ------------------------------------------------------------ */
@media (max-width: 819px) {
  :root { --bar: 76px; --gutter: 1.35rem; --column: 100%; --stage-dim: .14; }
  body { font-size: .98rem; line-height: 1.7; }
  h1 { font-size: 2.35rem; }
  h2 { font-size: 2.05rem; }
  h3 { font-size: 1.4rem; }

  .brand img { width: 148px; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav {
    position: fixed; inset: 0; z-index: 150; height: auto; right: 0;
    display: none; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0;
    padding: 0 2rem;
    background: rgba(var(--ground), .82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    font-size: 1.05rem; letter-spacing: .1em;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--rule); width: 100%; }
  .nav .nav-quote { margin: 1rem 0 0; padding-left: 0; border-left: 0; }
  .nav .nav-close { display: inline-flex; position: absolute; top: 1.2rem; right: 1.35rem; width: auto; border: 0; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }
  body.menu-open { overflow: hidden; }

  .body, .scene--right .body {
    justify-content: flex-start; align-items: flex-start;
    padding: 58svh var(--gutter) 5rem;
    background: linear-gradient(to bottom,
      rgba(var(--ground), 0) 0%,
      rgba(var(--ground), 0) 44svh,
      rgba(var(--ground), calc(var(--veil) * .9)) 58svh,
      rgba(var(--ground), calc(var(--veil) * .98)) 100%);
  }
  .scene--one .body { justify-content: flex-end; }
  .hero .body { align-items: flex-end; padding: calc(var(--bar) + 1rem) var(--gutter) 3.2rem; }
  .hero .body, .scene--one .body {
    background: linear-gradient(to top, rgba(var(--ground), .86) 0%, rgba(var(--ground), .78) 38%, rgba(var(--ground), .35) 62%, rgba(var(--ground), 0) 100%);
  }
  .hero .column, .scene--form .column { width: 100%; }
  .scene--form .body { padding-top: 58svh; }
  .legal-page .body { padding-top: calc(var(--bar) + 2rem); background: none; }
  .legal-page .column { width: 100%; }
  .prose > p { max-width: none; }
  .requirements { grid-template-columns: 1fr; gap: 1.6rem; }
  .facts > div { grid-template-columns: 34% 1fr; gap: .8rem; }
  .waiver-details > div { grid-template-columns: 42% 1fr; }
  .bank-details > div { grid-template-columns: 4.2rem 1fr; }
  .group-options { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 2rem; padding-block: 3.5rem 2.5rem; }
  .footer-logo { width: 190px; }
  .footer-bottom { flex-direction: column; gap: .6rem; padding-right: var(--gutter); padding-bottom: 5rem; }
  .floating-whatsapp { right: .9rem; bottom: .9rem; padding: .55rem .85rem; }
  .floating-whatsapp span { display: none; }
}

/* pantallas muy altas en escritorio: el texto no se queda flotando en el centro de un muro */
@media (min-width: 820px) and (min-height: 1000px) {
  .body { align-items: flex-start; padding-top: calc(var(--bar) + 4rem); }
  .scene--one .body, .hero .body { align-items: center; }
}
