/* =========================================================
   Cala Escondida Experience
   Mundo visual: la hora dorada en la villa. Neblina ámbar,
   medio sol que se completa en su reflejo, siluetas negras.
   La página "se pone" a medida que bajas: del ámbar a la noche.
   ========================================================= */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Escala ámbar (de sol a noche) */
  --sol: #FFC24A;
  --sol-espejo: #FFD55A;
  --neblina: #E5A32B;
  --hondo: #C88A1E;
  --tierra: #6E4A0D;
  --noche: #1E1407;
  --noche-alta: #2A1D0A;
  --tinta: #0B0B0B;
  --palido: #FFE6AE;
  --palido-suave: #E9CB8C;

  /* Tipografía */
  --f: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --display-stretch: 62%;
  --t-hero: clamp(3.1rem, 1.6rem + 6.4vw, 6rem);
  --t-seccion: clamp(2.3rem, 1.4rem + 3.6vw, 4.4rem);
  --t-item: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  --t-cuerpo: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-pequeno: 0.875rem;

  /* Medidas */
  --cab: 72px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --linea: 1.5px;
  --sec-y: clamp(5rem, 3rem + 7vw, 9rem);

  /* Movimiento */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* entradas y salidas */
  --ease-inout: cubic-bezier(0.77, 0, 0.175, 1);  /* movimiento en pantalla */

  color-scheme: light;
}

/* Tonos por sección: el día baja hacia la noche */
.t-haze  { --bg: var(--neblina); --fg: var(--tinta); --fg-suave: #2B1F08; --regla: rgba(11,11,11,.85); --duo: var(--sol); --foco: var(--tinta); }
.t-deep  { --bg: var(--hondo);   --fg: var(--tinta); --fg-suave: #22180A; --regla: rgba(11,11,11,.85); --duo: var(--neblina); --foco: var(--tinta); }
.t-ground{ --bg: var(--tierra);  --fg: var(--palido); --fg-suave: var(--palido-suave); --regla: rgba(255,230,174,.55); --duo: var(--neblina); --foco: var(--sol); }
.t-night { --bg: var(--noche);   --fg: var(--palido); --fg-suave: var(--palido-suave); --regla: rgba(255,230,174,.4); --duo: var(--hondo); --foco: var(--sol); }

.t-haze, .t-deep, .t-ground, .t-night { background-color: var(--bg); color: var(--fg); }
.t-ground, .t-night { color-scheme: dark; }

/* Modo oscuro del sistema: la fiesta empieza ya de noche */
@media (prefers-color-scheme: dark) {
  .t-haze  { --bg: var(--tierra); --fg: var(--palido); --fg-suave: var(--palido-suave); --regla: rgba(255,230,174,.55); --duo: var(--neblina); --foco: var(--sol); color-scheme: dark; }
  .t-deep  { --bg: #4E3409; --fg: var(--palido); --fg-suave: var(--palido-suave); --regla: rgba(255,230,174,.5); --duo: var(--neblina); --foco: var(--sol); color-scheme: dark; }
  .t-ground{ --bg: #33230A; }
  :root { --sol-espejo: #FFC24A; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--cab) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--f);
  font-size: var(--t-cuerpo);
  line-height: 1.55;
  background: var(--noche);
  color: var(--tinta);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--tinta); color: var(--sol); }
.t-ground ::selection, .t-night ::selection { background: var(--sol); color: var(--tinta); }
html { scrollbar-color: var(--hondo) var(--noche); }

:focus-visible { outline: 2px solid var(--foco, var(--tinta)); outline-offset: 3px; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--tinta); color: var(--sol); padding: .7rem 1rem; text-decoration: none; }
.skip:focus { top: 12px; }

.envoltorio { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Marcador de dato pendiente: [[...]] */
.ph {
  display: inline;
  padding: 0 .3em;
  border: 1.5px dashed currentColor;
  font-size: .92em;
  font-style: normal;
  opacity: .9;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Titulares */
.titulo-seccion, .hero__titulo, .contacto__titulo, .servicio__item h3, .evento__nombre, .paso h3, .marca__texto, .pie__marca, .paso-form__titulo, .estado__t {
  font-stretch: var(--display-stretch);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.titulo-seccion { font-size: var(--t-seccion); max-width: 16ch; }

/* Subtítulos: registro más tranquilo (minúsculas, menos condensado) */
.servicio__item h3, .paso h3, .evento__nombre {
  text-transform: none;
  font-stretch: 78%;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

/* ---------- Botones ---------- */
.btn {
  --b-bg: transparent; --b-fg: currentColor; --b-borde: currentColor;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: 0 1.4rem;
  background: var(--b-bg); color: var(--b-fg);
  border: var(--linea) solid var(--b-borde);
  border-radius: 0;
  font-weight: 600; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .16s var(--ease-out);
}
.btn--sol { --b-bg: var(--sol); --b-fg: var(--tinta); --b-borde: var(--tinta); }
.t-night .btn--sol, .t-ground .btn--sol { --b-borde: var(--sol); }
.btn--sm { min-height: 42px; padding: 0 1rem; font-size: .875rem; }
.btn--texto { border-color: transparent; padding-inline: .4rem; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled] { opacity: .6; cursor: progress; }
@media (hover: hover) {
  .btn--sol:hover { --b-bg: var(--tinta); --b-fg: var(--sol); }
  .t-night .btn--sol:hover, .t-ground .btn--sol:hover { --b-bg: var(--palido); --b-fg: var(--tinta); }
  .btn--linea:hover { --b-bg: var(--fg, var(--tinta)); --b-fg: var(--bg, var(--sol)); }
  .btn--texto:hover { text-decoration: underline; }
}

/* ---------- Fotos en duotono ámbar ---------- */
.duo { position: relative; overflow: hidden; background-color: var(--duo); isolation: isolate; }
.duo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.25) brightness(1.08);
  mix-blend-mode: multiply;
}
.etiqueta-ejemplo {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  padding: .2rem .5rem;
  background: var(--tinta); color: var(--sol);
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  pointer-events: none;
}
.sin-etiquetas .etiqueta-ejemplo { display: none; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--cab);
  color: var(--tinta);
  transition: background-color .25s ease, box-shadow .25s ease, color .25s ease;
}
.cabecera.es-solida { background: var(--sol); box-shadow: 0 var(--linea) 0 var(--tinta); }
@media (prefers-color-scheme: dark) {
  .cabecera { color: var(--palido); }
  .cabecera.es-solida { background: var(--noche); color: var(--palido); box-shadow: 0 1px 0 rgba(255,230,174,.3); }
  .cabecera .btn--sol { --b-borde: var(--sol); }
}
.cabecera__in {
  height: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}
.marca { text-decoration: none; display: flex; align-items: center; flex: none; }
.marca img { height: 40px; width: auto; }
.marca__sello, .pie__marca .marca__sello {
  display: block; flex: none; width: 46px; height: 46px; margin-right: .75rem;
  background: currentColor;
  -webkit-mask: url("../assets/logo-sello.png") center / contain no-repeat;
          mask: url("../assets/logo-sello.png") center / contain no-repeat;
}
.marca__texto { font-size: 1.35rem; line-height: .86; letter-spacing: 0; }
.marca__texto span { display: block; font-weight: 500; font-stretch: 100%; font-size: .6875rem; letter-spacing: .28em; margin-top: .25rem; }

.nav { margin-left: auto; }
.nav__lista { display: flex; gap: clamp(1rem, 2vw, 2rem); }
.nav__lista a { text-decoration: none; font-size: .9rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: .5rem 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .25s var(--ease-out); }
@media (hover: hover) { .nav__lista a:hover { background-size: 100% 1.5px; } }

.nav__cta { display: none; }
.cabecera__acciones { display: flex; align-items: center; gap: 1rem; }
.idioma { display: flex; border: var(--linea) solid currentColor; }
.idioma__btn { background: none; border: 0; min-width: 44px; min-height: 40px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; }
.idioma__btn[aria-pressed="true"] { color: var(--sol); background: var(--tinta); }
@media (prefers-color-scheme: dark) { .idioma__btn[aria-pressed="true"] { color: var(--tinta); background: var(--palido); } }

.menu-btn { display: none; width: 44px; height: 44px; background: none; border: 0; position: relative; }
.menu-btn__lineas, .menu-btn__lineas::before { position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; content: ""; transition: transform .2s var(--ease-out); }
.menu-btn__lineas { top: 17px; }
.menu-btn__lineas::before { left: 0; right: 0; top: 8px; }
.menu-btn[aria-expanded="true"] .menu-btn__lineas { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__lineas::before { transform: translateY(-8px) rotate(-90deg); }

@media (max-width: 1099px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--cab) 0 auto 0; margin: 0;
    background: var(--sol); color: var(--tinta);
    border-bottom: var(--linea) solid var(--tinta);
    padding: 1rem var(--gutter) 2rem;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), visibility 0s .2s;
  }
  .nav.abierta { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__lista { flex-direction: column; gap: 0; }
  .nav__lista a { display: block; padding: .9rem 0; font-stretch: 62%; font-weight: 900; font-size: 2rem; letter-spacing: 0; border-bottom: 1px solid rgba(11,11,11,.25); background: none; }
  .nav__cta { display: block; padding-top: 1.25rem; }
  .nav__lista .nav__cta a { background: var(--tinta); color: var(--sol); display: inline-flex; width: 100%; padding: 0 1.4rem; font-stretch: 100%; font-weight: 600; font-size: 1rem; letter-spacing: .04em; border: var(--linea) solid var(--tinta); }
  .cabecera__acciones { margin-left: auto; }
}
@media (max-width: 1099px) and (prefers-color-scheme: dark) {
  .nav { background: var(--noche); color: var(--palido); border-color: rgba(255,230,174,.3); }
  .nav__lista a { border-color: rgba(255,230,174,.2); }
  .nav__lista .nav__cta a { background: var(--sol); color: var(--tinta); border-color: var(--sol); }
}
@media (max-width: 560px) {
  .cabecera__cta { display: none; }
  .cabecera__acciones { gap: .5rem; }
}

/* ---------- Portada ---------- */
.hero {
  --cielo: 60svh;
  --sol-d: clamp(240px, 36vw, 560px);
  --sol-x: 74%;
  position: relative;
  display: grid;
  grid-template-rows: minmax(var(--cielo), max-content) 1fr;
  min-height: 100svh;
  overflow: hidden;
}
.hero__cielo { position: absolute; inset: 0; pointer-events: none; }
.centinela { position: absolute; top: 24px; left: 0; width: 1px; height: 1px; pointer-events: none; }
.hero__cielo::before { /* resplandor de la neblina alrededor del sol */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60vmax 38vmax at var(--sol-x) var(--cielo), rgba(255,213,90,.55), rgba(255,213,90,0) 70%);
}
.sol, .reflejo { position: absolute; left: calc(var(--sol-x) - var(--sol-d) / 2); width: var(--sol-d); height: calc(var(--sol-d) / 2); overflow: hidden; }
.sol { top: calc(var(--cielo) - var(--sol-d) / 2); }
.sol__disco, .reflejo__disco { width: var(--sol-d); height: var(--sol-d); border-radius: 50%; background: var(--sol-espejo); }
.reflejo { top: calc(var(--cielo) + 2px); filter: url(#ondas); opacity: 1;
  /* reflejo en el agua: franjas que se abren y se apagan hacia abajo */
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 7px, transparent 7px 11px), linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 50%, transparent 100%);
          mask-image: repeating-linear-gradient(to bottom, #000 0 7px, transparent 7px 11px), linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 50%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect; }
.reflejo__disco { transform: translateY(-50%); }
.horizonte { position: absolute; left: 0; right: 0; top: var(--cielo); height: var(--linea); background: var(--tinta); opacity: .9; }
@media (prefers-color-scheme: dark) { .horizonte { background: var(--palido); opacity: .5; } }

.hero__foto {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--cielo) + 8svh);
  background: transparent; isolation: auto;
}
/* La máscara va en la imagen (no en el contenedor) para que el multiplicado
   se funda con el ámbar del cielo en lugar de quedar aislado en blanco. */
.hero__foto img {
  object-position: center 45%;
  filter: grayscale(1) contrast(1.3) brightness(1.15);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 38%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 38%);
}
.hero__foto .etiqueta-ejemplo { top: auto; bottom: 10px; left: auto; right: 10px; }

.hero__contenido {
  position: relative; z-index: 2;
  grid-row: 1 / -1;
  display: grid;
  grid-template-rows: minmax(var(--cielo), max-content) 1fr;
}
.hero__texto { align-self: end; padding: calc(var(--cab) + 1.5rem) 0 clamp(1.5rem, 4svh, 2.75rem); }
.hero__titulo { font-size: var(--t-hero); max-width: 10ch; }
.hero__sub {
  margin-top: clamp(1rem, 2.5svh, 1.5rem);
  max-width: 36ch;
  font-size: clamp(1.05rem, 1rem + .35vw, 1.3rem);
  line-height: 1.4;
  color: var(--fg-suave);
}

/* Barra de reserva del hero: la acción en su forma real */
.arranque {
  align-self: end;
  margin: clamp(2rem, 6svh, 4rem) 0 clamp(1.5rem, 5svh, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr auto;
  background: var(--sol);
  color: var(--tinta);
  border: var(--linea) solid var(--tinta);
}
.arranque__campo { display: flex; flex-direction: column; justify-content: center; padding: .7rem 1rem .6rem; border-right: var(--linea) solid var(--tinta); min-width: 0; }
.arranque__campo label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.arranque__campo input, .arranque__campo select {
  width: 100%; min-height: 40px; padding: 0; background: transparent; border: 0;
  font-size: 1.05rem; font-weight: 500; color: var(--tinta); color-scheme: light;
  -webkit-appearance: none; appearance: none;
}
.arranque__campo select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") right center / 16px no-repeat; padding-right: 22px; }
.arranque__campo input::placeholder { color: #5A4310; opacity: 1; }
.arranque__campo input:focus-visible, .arranque__campo select:focus-visible { outline: none; }
.arranque__campo:focus-within { background: var(--palido); }
.arranque__acciones { display: flex; }
.arranque__acciones .btn { min-height: 100%; border: 0; }
.arranque__acciones .btn--sol { --b-bg: var(--tinta); --b-fg: var(--sol); }
.arranque__acciones .btn--linea { border-left: var(--linea) solid var(--tinta); }
@media (hover: hover) {
  .arranque__acciones .btn--sol:hover { --b-bg: var(--noche-alta); --b-fg: var(--palido); }
  .arranque__acciones .btn--linea:hover { --b-bg: var(--palido); --b-fg: var(--tinta); }
}

@media (max-width: 1099px) {
  .hero { --cielo: 44svh; --sol-x: 74%; --sol-d: clamp(200px, 50vw, 380px); }
  .arranque { grid-template-columns: 1fr 1fr; }
  .arranque__campo--ancho { grid-column: 1 / -1; border-top: var(--linea) solid var(--tinta); border-right: 0; }
  .arranque__campo:nth-child(2) { border-right: 0; }
  .arranque__acciones { grid-column: 1 / -1; border-top: var(--linea) solid var(--tinta); }
  .arranque__acciones .btn { flex: 1; min-height: 56px; }
  .arranque__acciones .btn--linea { flex: 0 0 auto; }
}
@media (max-width: 480px) {
  .arranque__acciones .btn--linea { padding-inline: 1.1rem; }
  .arranque__wa-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .arranque__acciones .btn--linea .ico { width: 1.6em; height: 1.6em; }
}

/* ---------- Qué hacemos ---------- */
.servicio { padding-block: var(--sec-y); }
.servicio__rejilla { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2.5vw, 2.5rem); row-gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.servicio__titulo { grid-column: 1 / -1; max-width: 18ch; }
.servicio__foto { grid-column: 1 / span 6; aspect-ratio: 4 / 5; }
.servicio__lista { grid-column: 8 / -1; display: grid; gap: 0; align-self: center; }
.servicio__item { padding-block: 1.6rem 1.9rem; border-top: var(--linea) solid var(--regla); }
.servicio__item:last-child { border-bottom: var(--linea) solid var(--regla); }
.servicio__item h3 { font-size: var(--t-item); margin-bottom: .7rem; }
.servicio__item p { color: var(--fg-suave); max-width: 46ch; }
@media (max-width: 860px) {
  .servicio__foto, .servicio__lista { grid-column: 1 / -1; }
  .servicio__foto { aspect-ratio: 4 / 3; }
}

/* ---------- Tipos de evento ---------- */
.eventos { padding-block: var(--sec-y); }
.eventos .titulo-seccion { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.eventos__rejilla {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(1.25rem, 2.2vw, 2rem) clamp(1rem, 2vw, 1.75rem);
}
.evento--grande { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.evento__enlace { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.evento__foto { display: block; aspect-ratio: 4 / 3; }
.evento--grande .evento__foto { aspect-ratio: auto; flex: 1; min-height: 360px; }
.evento--grande .evento__foto img { position: absolute; inset: 0; }
.evento__texto { display: block; padding-top: .9rem; }
.evento__nombre { display: block; font-size: var(--t-item); }
.evento__desc { display: block; margin-top: .35rem; color: var(--fg-suave); font-size: .98rem; }
.evento__foto img { transition: filter .4s ease, transform .5s var(--ease-out); }
.evento__foto { transition: background-color .4s ease; }

@media (max-width: 860px) {
  .eventos__rejilla {
    grid-template-columns: none; grid-template-rows: none;
    grid-auto-flow: column; grid-auto-columns: min(78vw, 340px);
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding-bottom: 1rem; scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .evento, .evento--grande { grid-column: auto; grid-row: auto; scroll-snap-align: start; }
  .evento--grande .evento__foto { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
  .evento--grande .evento__foto img { position: static; }
}

/* ---------- Cómo trabajamos ---------- */
.proceso { padding-block: var(--sec-y); }
.proceso .titulo-seccion { margin-bottom: clamp(3rem, 6vw, 5rem); }
.proceso__linea {
  --pos: 0;
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(1rem, 2vw, 2rem);
  padding-top: 2.75rem;
  counter-reset: paso;
}
.proceso__linea::before { /* el horizonte */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--linea); background: var(--regla);
}
.proceso__linea::after { /* el sol que recorre la noche */
  content: ""; position: absolute; top: calc(var(--linea) / 2); left: 0;
  width: 26px; height: 13px; border-radius: 26px 26px 0 0; background: var(--sol-espejo);
  transform: translate(calc(var(--pos) * (100cqw - 26px)), -100%);
}
.proceso__linea { container-type: inline-size; }
.paso { position: relative; }
.paso::before { content: ""; position: absolute; top: calc(-2.75rem - 4px); left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: var(--linea) solid var(--fg); }
.paso__num { display: block; font-stretch: 62%; font-weight: 900; font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: 1; color: var(--sol); margin-bottom: 1rem; }
.paso h3 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); margin-bottom: .6rem; }
.paso p { color: var(--fg-suave); font-size: .98rem; }

@media (max-width: 860px) {
  .proceso__linea { grid-template-columns: 1fr; padding-top: 0; padding-left: 2.25rem; gap: 2.25rem; }
  .proceso__linea::before { left: 4px; right: auto; top: 0; bottom: 0; width: var(--linea); height: auto; }
  .proceso__linea::after { display: none; }
  .paso::before { top: .9rem; left: calc(-2.25rem); }
}

/* ---------- Galería ---------- */
.galeria { padding-block: 0 var(--sec-y); }
.galeria .titulo-seccion { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.galeria__nota { margin: calc(clamp(2rem, 4vw, 3.5rem) * -0.5) 0 clamp(2rem, 4vw, 3rem); max-width: 70ch; font-size: var(--t-pequeno); color: var(--fg-suave); }
.galeria__nota:empty, .sin-etiquetas .galeria__nota { display: none; }
.pieza figcaption:empty { display: none; }
.galeria__rejilla {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, clamp(180px, 17vw, 250px)) clamp(220px, 21vw, 320px);
  grid-template-areas:
    "a a a b b f"
    "a a a d d f"
    "e e c c g g";
  gap: clamp(1.75rem, 2.4vw, 2.25rem) clamp(.75rem, 1.5vw, 1.25rem);
}
.pieza { display: flex; flex-direction: column; min-height: 0; }
.pieza .duo { flex: 1; min-height: 0; }
.pieza figcaption { padding-top: .5rem; font-size: var(--t-pequeno); color: var(--fg-suave); }
.pieza--a { grid-area: a; } .pieza--b { grid-area: b; } .pieza--c { grid-area: c; } .pieza--d { grid-area: d; }
.pieza--e { grid-area: e; } .pieza--f { grid-area: f; } .pieza--g { grid-area: g; }
.pieza .duo img { transition: filter .4s ease, transform .5s var(--ease-out); }
.pieza .duo { transition: background-color .4s ease; }

@media (max-width: 860px) {
  .galeria__rejilla {
    grid-template-columns: 1fr 1fr; grid-template-rows: none;
    grid-template-areas: "a a" "b d" "f c" "f e" "g g";
    grid-auto-rows: auto;
  }
  .pieza .duo { aspect-ratio: 4 / 3; }
  .pieza--a .duo, .pieza--g .duo { aspect-ratio: 16 / 10; }
  .pieza--f .duo { aspect-ratio: auto; height: 100%; }
}

/* Fotos de prueba en color real con un punto cálido; el duotono ámbar
   queda para la atmósfera (portada y servicio). */
.evento__foto, .pieza .duo { background-color: var(--noche); }
.evento__foto img, .pieza .duo img {
  mix-blend-mode: normal;
  filter: sepia(.18) saturate(1.05) contrast(1.04) brightness(.97);
}
/* Al pasar por encima: la foto se acerca un poco */
@media (hover: hover) and (pointer: fine) {
  .evento__enlace:hover .evento__foto img, .pieza:hover .duo img { filter: sepia(.08) saturate(1.1) contrast(1.04) brightness(1); transform: scale(1.03); }
  .evento__enlace:hover .evento__nombre { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
}
.evento__enlace:focus-visible { outline-offset: 6px; }

/* ---------- Presupuesto ---------- */
.presupuesto { padding-block: var(--sec-y); border-top: 1px solid rgba(255,230,174,.12); }
.presupuesto__rejilla { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2.5vw, 2.5rem); row-gap: 2.5rem; align-items: start; }
.presupuesto__intro { grid-column: 1 / span 4; position: sticky; top: calc(var(--cab) + 2rem); }
.presupuesto__lead { margin-top: 1.25rem; color: var(--fg-suave); max-width: 36ch; }
.presupuesto__garantia { margin-top: .9rem; font-weight: 600; color: var(--sol); max-width: 36ch; }
.via-rapida { margin-top: 2.5rem; padding-top: 1.5rem; border-top: var(--linea) solid var(--regla); }
.via-rapida__t { font-weight: 700; }
.via-rapida__d { color: var(--fg-suave); margin: .3rem 0 1rem; max-width: 34ch; }
.tarjeta-form {
  grid-column: 6 / -1;
  background: var(--noche-alta);
  border: var(--linea) solid rgba(255,230,174,.28);
  padding: clamp(1.25rem, 3vw, 2.75rem);
  min-height: 560px;
  display: flex; flex-direction: column;
}
@media (max-width: 960px) {
  .presupuesto__intro, .tarjeta-form { grid-column: 1 / -1; }
  .presupuesto__intro { position: static; }
  .tarjeta-form { min-height: 0; }
}

/* Progreso */
.progreso { margin-bottom: 2.75rem; }
.progreso__pasos { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--palido-suave); }
.progreso__pasos li { opacity: .55; transition: opacity .25s ease, color .25s ease; }
.progreso__pasos li.activo, .progreso__pasos li.hecho { opacity: 1; }
.progreso__pasos li.activo { color: var(--sol); }
.progreso__linea { position: relative; height: var(--linea); background: rgba(255,230,174,.3); margin-top: .9rem; }
.progreso__linea::before { content: ""; position: absolute; inset: 0; background: var(--sol); transform-origin: left; transform: scaleX(var(--avance, .125)); transition: transform .45s var(--ease-inout); }
.progreso__sol { position: absolute; top: 0; left: 0; width: 18px; height: 9px; border-radius: 18px 18px 0 0; background: var(--sol-espejo); transform: translate(calc(var(--avance, .125) * (var(--ancho, 0px)) - 9px), -100%); transition: transform .45s var(--ease-inout); }
.progreso__movil { display: none; }
@media (max-width: 520px) {
  .progreso { margin-bottom: 1.75rem; }
  .progreso__pasos { display: none; }
  .progreso__movil { display: block; margin: -1.1rem 0 1.75rem; order: -1; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sol); }
  .progreso__linea { margin-top: 1rem; }
}

/* Campos */
.formulario { display: flex; flex-direction: column; flex: 1; }
.paso-form { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 1.6rem; align-content: start; }
.paso-form__titulo { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); margin-bottom: 1.25rem; padding: 0; float: left; width: 100%; }
.paso-form__titulo + * { clear: both; }
.campo { display: grid; gap: .45rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.campo > label, .campo > legend { font-weight: 600; font-size: .95rem; padding: 0; }
.campo-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 1.25rem; }
@media (max-width: 600px) { .campo-doble { grid-template-columns: 1fr; } }
.formulario input[type="text"], .formulario input[type="email"], .formulario input[type="tel"], .formulario input[type="date"], .formulario select, .formulario textarea {
  width: 100%; min-height: 52px; padding: .75rem .9rem;
  background: var(--noche); color: var(--palido);
  border: var(--linea) solid rgba(255,230,174,.5);
  border-radius: 0;
  font-size: 1rem;
  transition: border-color .2s ease, background-color .2s ease;
}
.formulario select { -webkit-appearance: none; appearance: none; background: var(--noche) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23FFE6AE' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") right .9rem center / 16px no-repeat; padding-right: 2.5rem; }
.formulario textarea { resize: vertical; min-height: 104px; }
.formulario input:hover, .formulario select:hover, .formulario textarea:hover { border-color: var(--palido); }
.formulario input:focus-visible, .formulario select:focus-visible, .formulario textarea:focus-visible { outline: 2px solid var(--sol); outline-offset: 0; border-color: var(--sol); }
.formulario input:disabled { opacity: .45; }
.formulario [aria-invalid="true"] { border-color: #FF9D7A; }
.ayuda { font-size: var(--t-pequeno); color: var(--palido-suave); }
.error { font-size: var(--t-pequeno); color: #FFB49A; font-weight: 600; }

.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { -webkit-appearance: none; appearance: none; flex: none; width: 22px; height: 22px; margin: .1rem 0 0; border: var(--linea) solid var(--palido); background: transparent; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--sol); border-color: var(--sol); }
.check input:checked::after { content: ""; width: 12px; height: 7px; border: 2.5px solid var(--tinta); border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg); }
.check--priv { margin-top: .2rem; color: var(--palido-suave); }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.1rem; border: var(--linea) solid rgba(255,230,174,.5); font-weight: 600; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .16s var(--ease-out); }
.chip:active span { transform: scale(.97); }
.chip input:checked + span { background: var(--sol); color: var(--tinta); border-color: var(--sol); }
.chip input:focus-visible + span { outline: 2px solid var(--sol); outline-offset: 3px; }
@media (hover: hover) { .chip:hover span { border-color: var(--palido); } }

/* Resumen */
.resumen__lista { display: grid; grid-template-columns: max-content 1fr auto; gap: 0 1.25rem; }
.resumen__lista dt, .resumen__lista dd { padding: .85rem 0; border-top: 1px solid rgba(255,230,174,.2); }
.resumen__lista dt { color: var(--palido-suave); font-size: .9rem; }
.resumen__lista dd { font-weight: 600; overflow-wrap: anywhere; }
.resumen__lista .editar { background: none; border: 0; padding: 0; color: var(--sol); font-size: .85rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; align-self: center; }
@media (max-width: 520px) {
  .resumen__lista { grid-template-columns: 1fr auto; }
  .resumen__lista dt { grid-column: 1 / -1; padding-bottom: 0; }
  .resumen__lista dd { border-top: 0; padding-top: .2rem; }
}

.botonera { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: auto; padding-top: 2.5rem; }
.botonera #btn-siguiente { margin-left: auto; }
.btn.cargando .btn__label::after { display: inline-block; width: 1.4em; text-align: left; animation: puntos 1.2s steps(4, end) infinite; content: "..."; overflow: hidden; vertical-align: bottom; }
@keyframes puntos { 0% { width: 0; } 100% { width: 1.4em; } }

/* Estados finales */
.estado { display: grid; gap: 1rem; justify-items: start; align-content: center; flex: 1; padding-block: 2rem; }
.estado:focus { outline: none; }
.estado__sol { width: 120px; height: 60px; border-radius: 120px 120px 0 0; background: var(--sol-espejo); box-shadow: 0 var(--linea) 0 var(--palido); margin-bottom: 1rem; }
.estado__t { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.estado__d { color: var(--palido-suave); max-width: 40ch; }
.estado__acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

/* ---------- Contacto ---------- */
.contacto { position: relative; overflow: hidden; padding-block: var(--sec-y) clamp(4rem, 8vw, 7rem); }
.contacto__cielo { position: absolute; inset: auto 0 0 0; height: 100%; pointer-events: none; }
.ocaso { /* el sol ya casi en el agua */
  position: absolute; left: 50%; bottom: 0;
  width: clamp(360px, 60vw, 900px); height: clamp(70px, 9vw, 140px);
  transform: translateX(-50%); overflow: hidden;
}
.ocaso::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--sol); opacity: .95; }
.contacto__in { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2.5vw, 2.5rem); row-gap: 3rem; padding-bottom: clamp(5rem, 10vw, 9rem); }
.contacto__cabeza { grid-column: 1 / span 6; }
.contacto__titulo { font-size: clamp(2.8rem, 1.6rem + 5vw, 6rem); max-width: 9ch; }
.contacto__acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.contacto__lista { grid-column: 8 / -1; align-self: end; }
.contacto__lista li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--regla); }
.contacto__lista li:last-child { border-bottom: 1px solid var(--regla); }
.contacto__k { display: inline-flex; align-items: center; gap: .55rem; color: var(--palido-suave); font-size: .9rem; }
.contacto__v { font-weight: 600; overflow-wrap: break-word; }
.contacto__v a { text-decoration: underline; }
@media (max-width: 860px) {
  .contacto__cabeza, .contacto__lista { grid-column: 1 / -1; }
  .contacto__lista li { grid-template-columns: 1fr; gap: .3rem; }
}

/* ---------- Barra fija en móvil ---------- */
.barra-movil { display: none; }
@media (max-width: 767px) {
  .barra-movil {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; gap: .5rem;
    padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
    background: var(--noche); border-top: 1px solid rgba(255,230,174,.25);
    transform: translateY(110%);
    transition: transform .25s var(--ease-out);
  }
  .barra-movil.visible { transform: none; }
  .barra-movil .btn--sol { flex: 1; --b-borde: var(--sol); }
  .barra-movil .btn--linea { color: var(--palido); padding-inline: 1.1rem; }
  .barra-movil .btn--linea .ico { width: 1.5em; height: 1.5em; }
  .pie { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* ---------- Pie ---------- */
.pie { border-top: var(--linea) solid var(--sol); padding-block: 2rem calc(2rem + env(safe-area-inset-bottom)); }
.pie__in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.pie__marca { font-size: 1.4rem; display: flex; align-items: center; }
.pie__marca .marca__sello { width: 60px; height: 60px; margin-right: 1rem; }
.pie__marca span span { margin-left: .5em; font-weight: 500; font-stretch: 100%; font-size: .8rem; letter-spacing: .3em; }
.pie__legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: var(--t-pequeno); color: var(--palido-suave); }

/* =========================================================
   MOVIMIENTO
   Una sola gramática: la luz sube y baja como un sol.
   El contenido es visible por defecto; solo se oculta para
   animar cuando JS marca <html class="anima">.
   ========================================================= */

/* --- 1. Entrada de la portada: el sol asoma sobre el horizonte --- */
@keyframes sol-asoma    { from { transform: translateY(55%); } to { transform: none; } }
@keyframes reflejo-in   { from { opacity: 0; transform: translateY(-50%) scaleY(.6); } to { opacity: 1; transform: translateY(-50%); } }
@keyframes horizonte-in { from { transform: scaleX(0); } to { transform: none; } }
@keyframes sube         { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes telon        { from { clip-path: inset(0 0 100% 0); transform: translateY(.18em); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes aparece      { from { opacity: 0; } to { opacity: 1; } }
@keyframes sol-sale     { from { clip-path: inset(100% 0 0 0); transform: translateY(30%); } to { clip-path: inset(0 0 0 0); transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .sol__disco     { animation: sol-asoma 1.4s var(--ease-out) .1s both; }
  .reflejo__disco { animation: reflejo-in 1.2s var(--ease-out) .5s both; }
  .horizonte      { transform-origin: left; animation: horizonte-in 1.1s var(--ease-inout) both; }
  .hero__titulo   { animation: telon .9s var(--ease-inout) .25s both; }
  .hero__sub      { animation: sube .7s var(--ease-out) .55s both; }
  .arranque       { animation: sube .7s var(--ease-out) .7s both; }
  .hero__foto img { animation: aparece 1.4s ease .3s both; }
}

/* --- 2. El sol se pone mientras bajas (CSS ligado al scroll, sin JS) --- */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes sol-se-pone      { to { transform: translateY(58%); } }
    @keyframes reflejo-se-apaga { to { transform: scaleY(.55); opacity: .35; } }
    .sol     { animation: sol-se-pone linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
    .reflejo { transform-origin: top; animation: reflejo-se-apaga linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }

    /* En «Cómo trabajamos», un pequeño sol recorre el horizonte de 01 a 05 */
    .proceso__linea { view-timeline-name: --linea-noche; }
    @keyframes sol-recorre { from { transform: translate(0, -100%); } to { transform: translate(calc(100cqw - 26px), -100%); } }
    .proceso__linea::after { animation: sol-recorre linear both; animation-timeline: --linea-noche; animation-range: cover 25% cover 75%; }

    /* El ocaso del final termina de hundirse al llegar abajo */
    @keyframes ocaso-baja { from { transform: translateY(-35%); } to { transform: none; } }
    .ocaso::before { animation: ocaso-baja linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  }
}

/* --- 3. Apariciones al hacer scroll (una sola vez) --- */
@media (prefers-reduced-motion: no-preference) {
  .anima [data-revela] {
    transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), clip-path .8s var(--ease-inout);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .anima [data-revela="sube"]:not(.visible)  { opacity: 0; transform: translateY(24px); }
  .anima [data-revela="telon"]:not(.visible) { clip-path: inset(0 0 100% 0); transform: translateY(.15em); }
  .anima [data-revela="foto"] { transition: clip-path 1s var(--ease-inout); transition-delay: calc(var(--i, 0) * 70ms); }
  .anima [data-revela="foto"]:not(.visible) { clip-path: inset(100% 0 0 0); }
}

/* --- 4. Formulario: estados finales y errores --- */
@media (prefers-reduced-motion: no-preference) {
  .estado:not([hidden]) .estado__sol { animation: sol-sale 1s var(--ease-out) both; }
  .estado:not([hidden]) .estado__t,
  .estado:not([hidden]) .estado__d,
  .estado:not([hidden]) .estado__acciones,
  .estado:not([hidden]) > .btn { animation: sube .6s var(--ease-out) both; }
  .estado:not([hidden]) .estado__t { animation-delay: .25s; }
  .estado:not([hidden]) .estado__d { animation-delay: .32s; }
  .estado:not([hidden]) .estado__acciones,
  .estado:not([hidden]) > .btn { animation-delay: .4s; }
  .error:not([hidden]) { animation: sube .2s var(--ease-out) both; }
}

/* --- Movimiento reducido: menos y más suave (solo opacidad) --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anima [data-revela] { transition: opacity .4s ease; }
  .anima [data-revela]:not(.visible) { opacity: 0; }
  .reflejo { filter: none; }
  .btn:active, .chip:active span { transform: none; }
  .evento__enlace:hover .evento__foto img, .pieza:hover .duo img { transform: none; }
}
.pie__legal a { color: inherit; text-underline-offset: .2em; }
@media (hover: hover) and (pointer: fine) { .pie__legal a:hover { color: var(--sol); } }
.check--priv a { color: inherit; font-weight: 700; text-underline-offset: .15em; }

/* ---------- Páginas legales (aviso legal, privacidad, cookies) ---------- */
.legal-cab { border-bottom: var(--linea) solid var(--regla); }
.legal-cab__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--cab); }
.legal-cab .marca { color: inherit; }
.legal-cab__volver { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--t-pequeno); font-weight: 700; color: inherit; text-underline-offset: .2em; }
.legal-cab__der { display: flex; align-items: center; gap: 1.25rem; }
.legal { padding-block: clamp(2.5rem, 6vw, 5rem) var(--sec-y); }
.legal__doc { max-width: 72ch; }
.legal__doc h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); margin-bottom: .75rem; }
.legal__fecha { color: var(--fg-suave); font-size: var(--t-pequeno); margin-bottom: 2.5rem; }
.legal__doc h2 { font-size: 1.35rem; margin: 2.5rem 0 .75rem; padding-top: 1.25rem; border-top: var(--linea) solid var(--regla); }
.legal__doc p, .legal__doc li { line-height: 1.6; margin-bottom: .75rem; }
.legal__doc ul { padding-left: 1.2rem; list-style: disc; }
.legal__doc a { color: inherit; font-weight: 700; text-underline-offset: .15em; }
.legal__doc table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: var(--t-pequeno); }
.legal__doc th, .legal__doc td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-bottom: 1px solid var(--regla); }
.legal__datos { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 1rem 0 1.5rem; }
.legal__datos dt { font-weight: 700; }
@media (max-width: 560px) { .legal__datos { grid-template-columns: 1fr; gap: .1rem; } .legal__datos dd { margin-bottom: .6rem; } .legal__doc table { display: block; overflow-x: auto; } }
[data-solo-lang][hidden] { display: none !important; }
