/* ==========================================================================
   QHANTÚ ECOLODGE — SISTEMA ÚNICO
   Un solo archivo: tokens, retícula, secciones a pantalla, componentes,
   formularios y capa de movimiento. Reemplaza style.css + pages.css.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Archivo:wght@400;500;600&display=swap');

/* ---------------------------------------------------------------- tokens */
:root {
  /* marca (muestreados del logotipo oficial) */
  --verde-profundo: #233824;
  --verde-oscuro:   #1b2a1c;
  --verde-medio:    #2f7d4a;
  --verde-claro:    #eaf0e9;
  --verde-menta:    #cfe0cf;
  --verde-linea:    #d7e0d4;
  --naranja:        #dd8037;
  --naranja-hover:  #e8933f;
  --naranja-claro:  #fbe8d6;
  --beige-claro:    #f6f1e8;
  --blanco:         #ffffff;
  --tinta:          #1a211a;
  --tinta-media:    #485148;
  --tinta-suave:    #656e65;
  --linea:          rgba(26,33,26,.14);

  /* alias de sistema */
  --bg: var(--blanco);
  --ink: var(--tinta);
  --muted: var(--tinta-suave);
  --action: var(--naranja);
  --focus: #233824;
  --g-alt: var(--verde-claro);
  --g-dark: var(--verde-profundo);

  /* tipografía */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --t-h1: clamp(38px, 1.9vw + 30px, 72px);
  --t-h2: clamp(30px, 1.25vw + 24px, 48px);
  --t-h3: clamp(22px, .55vw + 20px, 28px);
  --t-lead: clamp(17px, .21vw + 16px, 20px);
  --t-card: clamp(17px, .21vw + 16px, 20px);
  --t-body: 16px;
  --t-small: 14px;
  --t-label: 13px;
  --t-stat: clamp(28px, .7vw + 25px, 38px);

  /* ritmo */
  --nav: 72px;
  --padt: 120px;
  --padb: 72px;
  --gut: 80px;
  --hgap: 48px;
  --hpadb: 64px;
  --bar: 0px;
  --col-gap: 24px;

  /* forma */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-btn: 10px;
  --r-full: 999px;
  --btn-h: 48px;
  --sombra: 0 10px 40px rgba(26,33,26,.10);

  /* movimiento */
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-enter: cubic-bezier(.22,1,.36,1);
  --m-in: 150ms; --m-out: 120ms; --m-press: 90ms; --m-image: 600ms;
}

@media (max-width: 639px) {
  :root { --nav: 56px; --padt: 96px; --padb: 48px; --gut: 24px; --hgap: 40px; --hpadb: 24px; --col-gap: 12px; }
  body[data-bar] { --bar: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 0; scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  padding-bottom: var(--bar);
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--linea); margin: 0; }

/* Las superficies que pinta el navegador también son parte del diseño. */
::selection { background: var(--verde-menta); color: var(--verde-oscuro); }
:is(.s-dark, .hero, footer.closing) ::selection { background: var(--naranja); color: var(--verde-oscuro); }
html { scrollbar-color: var(--verde-menta) var(--verde-claro); scrollbar-width: thin; }
input, textarea, select { caret-color: var(--verde-medio); accent-color: var(--verde-medio); }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rows .v, .stat b, .hero__fact b { font-variant-numeric: tabular-nums; }

h1, h2 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -.015em; hyphens: auto; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-h3); line-height: 1.2; letter-spacing: -.01em; }
h4, h5 { font-family: var(--font-body); font-weight: 600; font-size: var(--t-card); line-height: 1.3; }
.lead { font-size: var(--t-lead); line-height: 1.6; color: var(--tinta-media); }
.small { font-size: var(--t-small); line-height: 1.5; }
.muted { color: var(--muted); }
.measure { max-width: 68ch; }
strong { font-weight: 600; }

.label {
  display: inline-block; font-size: var(--t-label); font-weight: 500;
  line-height: 1.3; color: #2d7747; letter-spacing: .01em;
}
.label--on-dark { color: #de8640; }

/* ---------------------------------------------------------------- retícula */
.wrap { width: min(100%, 1280px); margin-inline: auto; position: relative; z-index: 1; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; }
.c12 { grid-column: 1 / -1; }
.start7 { grid-column-start: 7; } .start8 { grid-column-start: 8; }

@media (max-width: 1023px) {
  .c3, .c4, .c5, .c6, .c7, .c8 { grid-column: 1 / -1; }
  .start7, .start8 { grid-column-start: 1; }
}

/* ---------------------------------------------------------------- secciones */
main > section,
footer.closing {
  position: relative;
  height: calc(var(--h, 1) * 100svh);
  padding: var(--padt) var(--gut) calc(var(--padb) + var(--bar));
  display: flex;
  flex-direction: column;
  overflow: clip;
}
main > section > .wrap,
footer.closing > .wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }

@media (max-width: 639px) {
  /* En móvil la sección crece con su contenido, pero nunca baja de una pantalla. */
  main > section:not(.hero), footer.closing {
    height: auto;
    min-height: calc(var(--hm, 1) * 100lvh);
  }
  /* Un bloque con listado propio mantiene su alto y desplaza por dentro. */
  main > section.s-fixed { height: calc(var(--hm, 1) * 100lvh); }
}

/* dos grupos en dos pantallas */
.g2 > .wrap { display: grid; grid-template-rows: 1fr 1fr; gap: var(--padt); }
@media (max-width: 639px) { .g2 > .wrap { gap: var(--padt); } }

/* fondos */
.s-alt { background: var(--verde-claro); }
.s-beige { background: var(--beige-claro); }
.s-dark { background: var(--verde-profundo); color: var(--blanco); }
:is(.s-dark, footer.closing) :is(p, .lead, li, dd, dt) { color: rgba(255,255,255,.84); }
:is(.s-dark, footer.closing) .muted, :is(.s-dark, footer.closing) .note { color: rgba(255,255,255,.70); }
:is(.s-dark, footer.closing) :is(h1, h2, h3, h4, h5) { color: var(--blanco); }
/* una caja blanca dentro de un fondo oscuro vuelve a la tinta normal */
.formcard, .formcard :is(p, .lead, li, label, h1, h2, h3, h4, h5) { color: var(--ink); }
:is(.s-dark, footer.closing, .hero) .formcard :is(p, .lead, li, label, h1, h2, h3, h4, h5) { color: var(--ink); }
:is(.s-dark, footer.closing, .hero) .formcard :is(.note, .muted, .form__status) { color: var(--tinta-media); }

.head { margin-bottom: 48px; }
.head h2 + .lead { margin-top: 16px; max-width: 58ch; }
@media (max-width: 639px) { .head { margin-bottom: 32px; } }

/* ---------------------------------------------------------------- enlace de salto */
.skip-link {
  position: absolute; left: 0; top: 0; z-index: 50;
  transform: translateY(-120%);
  background: var(--verde-profundo); color: #fff;
  padding: 12px 20px; border-radius: 0 0 var(--r-sm) 0; font-size: var(--t-small);
}
.skip-link:focus { transform: none; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.s-dark, .hero, footer.closing, .nav, .sheet { --focus: #ffffff; }
.formcard { --focus: #233824; }

/* ---------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h); padding: 0 24px;
  font-family: var(--font-body); font-size: 16px; font-weight: 500; line-height: 1;
  border-radius: var(--r-btn); border: 1px solid transparent;
  text-align: center; white-space: nowrap;
  transition: background-color var(--m-out) var(--ease), color var(--m-out) var(--ease),
              border-color var(--m-out) var(--ease), transform var(--m-press) var(--ease);
}
.btn--primary { background: var(--naranja); color: var(--tinta); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--linea); }
.s-dark .btn--secondary, .hero .btn--secondary, footer.closing .btn--secondary { color: #fff; border-color: rgba(255,255,255,.46); }
.formcard .btn--secondary { color: var(--ink); border-color: var(--linea); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 639px) {
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
}
.link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; color: var(--verde-medio);
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.s-dark .link { color: var(--naranja); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--nav); background: var(--verde-profundo);
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.nav { padding-inline: var(--gut); }
.nav > .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.nav__logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav__logo img { height: 36px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links > a, .nav__trigger {
  font-size: 15px; font-weight: 500; white-space: nowrap;
  position: relative; padding: 6px 0; color: rgba(255,255,255,.88);
  transition: color var(--m-in) var(--ease);
}
.nav__links > a:hover, .nav__trigger:hover { color: #fff; }
.nav__links a[aria-current="page"] { color: #fff; }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--naranja);
}
.nav__item { position: relative; display: flex; align-items: center; }
.nav__trigger { display: inline-flex; align-items: center; gap: 6px; }
.nav__panel {
  position: fixed; left: 0; right: 0; top: var(--nav);
  background: var(--verde-profundo); border-bottom: 1px solid rgba(255,255,255,.12);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--m-close) var(--ease), transform var(--m-close) var(--ease), visibility var(--m-close);
}
.nav__item:hover .nav__panel,
.nav__item:focus-within .nav__panel { opacity: 1; visibility: visible; transform: none; transition-duration: 200ms; }
.nav__panel { padding-inline: var(--gut); }
.nav__panel .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 32px 0 36px; }
.nav__panel h3 { font-size: 17px; font-family: var(--font-body); font-weight: 600; margin-bottom: 12px; color: #fff; }
.nav__panel a.sub { display: block; font-size: 14px; color: rgba(255,255,255,.72); padding: 5px 0; transition: color var(--m-in) var(--ease); }
.nav__panel a.sub:hover { color: var(--naranja); }
.nav__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; transition: transform var(--m-in) var(--ease), opacity var(--m-in); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1023px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}
@media (max-width: 639px) { .nav .btn { display: none; } .nav__logo img { height: 30px; } }

.sheet {
  position: fixed; inset: var(--nav) 0 0 0; z-index: 19;
  background: var(--verde-profundo); color: #fff;
  padding: 24px var(--gut) 48px; overflow-y: auto;
  display: none;
}
.sheet[data-open] { display: block; }
.sheet a { display: flex; align-items: center; min-height: 56px; font-size: 17px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sheet a.sub { padding-left: 16px; font-size: 15px; color: rgba(255,255,255,.76); min-height: 48px; }
.sheet .btn { margin-top: 24px; border-bottom: 0; }

/* barra de acción en móvil */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 18;
  display: none; gap: 12px; padding: 8px var(--gut) calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--blanco); border-top: 1px solid var(--linea);
}
.actionbar .btn { flex: 1; min-height: 48px; padding: 0 12px; font-size: 15px; }
@media (max-width: 639px) { .actionbar { display: flex; } .actionbar[hidden] { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero {
  --h: 1; --hm: 1;
  padding: calc(var(--nav) + var(--hgap)) var(--gut) calc(var(--hpadb) + var(--bar));
  justify-content: center;
  color: #fff; background: var(--verde-profundo);
}
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, rgba(20,30,20,.88) 0%, rgba(20,30,20,.72) 42%, rgba(20,30,20,.30) 100%);
}
.hero > .wrap { justify-content: center; }
.hero__text { max-width: 760px; }
.hero h1 { color: #fff; }
.hero .hero__lead { margin-top: 20px; font-size: var(--t-lead); line-height: 1.55; color: rgba(255,255,255,.88); max-width: 54ch; }
.hero .btn-row { margin-top: 32px; }
.hero__note { margin-top: 16px; font-size: var(--t-small); color: rgba(255,255,255,.72); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 40px; }
.hero__fact b { display: block; font-family: var(--font-display); font-size: var(--t-stat); font-weight: 500; line-height: 1; color: #fff; }
.hero__fact span { display: block; margin-top: 6px; font-size: var(--t-small); color: rgba(255,255,255,.72); }
@media (max-width: 639px) {
  .hero__facts { gap: 20px 28px; margin-top: 28px; }
  .hero .btn-row { margin-top: 24px; }
}

/* cabecera de página interior */
.pagehead { --h: 1; justify-content: flex-end; color: #fff; background: var(--verde-profundo); }
.pagehead .hero__bg { position: absolute; inset: 0; }
.pagehead::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,30,20,.78) 0%, rgba(20,30,20,.55) 50%, rgba(20,30,20,.82) 100%);
}
.pagehead h1 { color: #fff; }
.pagehead .lead { color: rgba(255,255,255,.85); margin-top: 18px; max-width: 56ch; }
.crumbs { font-size: var(--t-small); color: rgba(255,255,255,.72); margin-bottom: 16px; }
.crumbs a { border-bottom: 1px solid rgba(255,255,255,.4); }
.crumbs span { margin: 0 8px; }

/* ---------------------------------------------------------------- tarjetas */
.cards { display: grid; gap: var(--col-gap); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) {
  .cards--2, .cards--3, .cards--4 { grid-template-columns: 1fr; }
  /* En móvil la ficha con foto apila la fotografía sobre los datos, a ancho completo. */
  .cards .tile { display: grid; gap: 8px; }
  .cards .tile__shot { border-radius: var(--r-md); aspect-ratio: 3 / 2; }
  .cards .tile p, .cards .tile .card__go { display: none; }
  .cards .tile h3 { font-size: 17px; }
}

.card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 28px; background: var(--blanco);
  border: 1px solid var(--linea); border-radius: var(--r-lg);
  transition: transform var(--m-out) var(--ease), border-color var(--m-out) var(--ease);
}
.card h3, .card h4 { font-family: var(--font-body); font-weight: 600; font-size: var(--t-card); }
.card p { font-size: 15px; line-height: 1.6; color: var(--tinta-media); }
.card__go { margin-top: auto; padding-top: 12px; font-size: 15px; font-weight: 500; color: var(--verde-medio); }
a.card:hover { transform: translateY(-2px); border-color: var(--verde-menta); }
.s-dark .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.s-dark .card p { color: rgba(255,255,255,.76); }

.card__ic { width: 40px; height: 40px; color: var(--verde-medio); }
.s-dark .card__ic { color: var(--naranja); }

/* fichas con foto */
.tile { display: flex; flex-direction: column; gap: 14px; }
.tile__shot { position: relative; overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 4 / 3; background: var(--verde-claro); }
.tile__shot img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-image) var(--ease); }
a.tile:hover .tile__shot img, .tile a:hover .tile__shot img { transform: scale(1.03); }
.tile h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--t-card); }
.tile p { font-size: 15px; color: var(--tinta-media); }

/* filas de datos */
.rows { width: 100%; }
.rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.rows dt, .rows .k { font-size: 15px; color: var(--tinta-media); }
.rows dd, .rows .v { margin: 0; font-weight: 600; text-align: right; }
.s-dark .rows div { border-color: rgba(255,255,255,.18); }
.s-dark .rows .k { color: rgba(255,255,255,.72); }

/* cifras */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--col-gap); }
@media (max-width: 639px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; } }
.stat b { display: block; font-family: var(--font-display); font-weight: 500; font-size: var(--t-stat); line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: var(--t-small); color: var(--tinta-media); }
.s-dark .stat span { color: rgba(255,255,255,.72); }

/* muro de imágenes */
.wall { display: grid; gap: var(--col-gap); }
.wall--3 { grid-template-columns: repeat(3, 1fr); }
.wall--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .wall--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 639px) {
  .wall--3, .wall--4 { grid-template-columns: 1fr; }
  /* En móvil el muro muestra las cuatro primeras: más abajo la página se vuelve interminable. */
  .wall--3 figure:nth-child(n+5), .wall--4 figure:nth-child(n+5) { display: none; }
}
.wall figure { margin: 0; overflow: hidden; aspect-ratio: 4 / 3; background: var(--verde-claro); border-radius: var(--r-lg); }
.wall img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-image) var(--ease); }
.wall figure:hover img { transform: scale(1.03); }

/* división texto + visual */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--col-gap); align-items: start; }
.split > *, .cards > *, .grid > *, .steps > *, .wall > *, .hero__grid > * { min-width: 0; }
@media (max-width: 1023px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split--pad { gap: 48px; }
.shot { width: 100%; overflow: hidden; border-radius: var(--r-lg); background: var(--verde-claro); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot--tall { aspect-ratio: 4 / 5; }
.shot--wide { aspect-ratio: 3 / 2; }
/* dentro de un bloque que ocupa el alto de la sección, la foto se adapta */
.split.fill { height: 100%; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.split.fill > .shot { aspect-ratio: auto; height: 100%; min-height: 0; }
@media (max-width: 1023px) { .split.fill { height: auto; align-items: start; } .split.fill > .shot { aspect-ratio: 3 / 2; height: auto; } }
@media (max-width: 639px) { .split.fill > .shot { aspect-ratio: 4 / 5; } }
.fill { flex: 1; min-height: 0; }
.fill img { width: 100%; height: 100%; object-fit: cover; }

/* lista de puntos */
.points { display: grid; gap: 20px; }
.points li { display: block; }
.points svg { display: block; width: 22px; height: 22px; color: #2d7747; margin-bottom: 8px; }
.s-dark .points svg { color: var(--naranja); }
.points b { display: block; font-weight: 600; font-size: 16px; }
.points p { font-size: 15px; color: var(--tinta-media); margin-top: 2px; }

/* preguntas */
.faq { border-top: 1px solid var(--linea); }
.faq__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; text-align: left; font-family: var(--font-body); font-weight: 600; font-size: 17px; border-bottom: 1px solid var(--linea); }
.faq__q svg { flex: none; transition: transform var(--m-in) var(--ease); }
.faq__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq__a { padding: 0 0 22px; border-bottom: 1px solid var(--linea); font-size: 16px; line-height: 1.7; color: var(--tinta-media); max-width: 70ch; }
.faq__a[hidden] { display: none; }

/* cinta de datos */
.band { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--linea); border-radius: var(--r-full); font-size: var(--t-small); }
.s-dark .chip { border-color: rgba(255,255,255,.26); }

/* nota */
.note { font-size: var(--t-small); line-height: 1.6; color: var(--muted); }
.s-dark .note { color: rgba(255,255,255,.6); }

/* ---------------------------------------------------------------- formularios */
.form { display: grid; gap: 16px; }
.form--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 639px) { .form--2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: var(--t-small); font-weight: 500; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 12px 14px; font-family: var(--font-body); font-size: 16px;
  color: var(--ink); background: var(--blanco);
  border: 1px solid var(--linea); border-radius: var(--r-sm);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b4452a; }
.field__error { font-size: var(--t-small); color: #b4452a; }
.field__error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-small); line-height: 1.5; color: var(--tinta-media); }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.check a { border-bottom: 1px solid currentColor; }
.form__status { font-size: var(--t-small); color: var(--tinta-media); }
.s-dark .field label { color: rgba(255,255,255,.90); }
.s-dark .check { color: rgba(255,255,255,.80); }
.formcard .field label { color: var(--ink); }
.formcard .check { color: var(--tinta-media); }
.formcard { background: var(--blanco); color: var(--ink); border-radius: var(--r-lg); padding: 32px; }
@media (max-width: 639px) { .formcard { padding: 24px; } }

/* ---------------------------------------------------------------- pie */
footer.closing { background: var(--verde-profundo); color: #fff; }
footer.closing > .wrap { display: grid; grid-template-rows: 1fr auto; gap: 48px; }
.closing__cta { display: flex; flex-direction: column; justify-content: center; max-width: 720px; }
.closing__cta h2 { color: #fff; }
.closing__cta .lead { margin-top: 16px; }
.closing__cta .btn-row { margin-top: 32px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-top: 40px; }
@media (max-width: 1023px) { .foot { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .foot { grid-template-columns: 1fr; gap: 24px; } }
.foot img { height: 34px; width: auto; }
.foot h3 { font-family: var(--font-body); font-size: var(--t-label); font-weight: 600; letter-spacing: .04em; text-transform: none; color: rgba(255,255,255,.62); margin-bottom: 12px; }
.foot a { display: block; padding: 5px 0; font-size: 15px; color: rgba(255,255,255,.82); transition: color var(--m-in) var(--ease); }
.foot a:hover { color: var(--naranja); }
.foot p { font-size: 15px; color: rgba(255,255,255,.72); margin-top: 14px; max-width: 42ch; }
.legal { margin-top: 32px; font-size: var(--t-small); line-height: 1.8; color: rgba(255,255,255,.72); }
.legal + .legal { margin-top: 6px; }
.legal a { color: rgba(255,255,255,.72); border-bottom: 1px solid transparent; }
.legal a:hover { color: #fff; border-bottom-color: currentColor; }
.legal img { height: 20px; }
.legal__holding { display: inline-flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- páginas */
/* galería de tipología */
.gallery { display: grid; grid-template-columns: 1fr; gap: 2px; }
.gallery__main { aspect-ratio: 16 / 9; overflow: hidden; background: var(--verde-claro); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; }
.gallery__thumbs button { aspect-ratio: 4 / 3; overflow: hidden; background: var(--verde-claro); opacity: .62; transition: opacity var(--m-in) var(--ease); }
.gallery__thumbs button[aria-current="true"] { opacity: 1; }
.gallery__thumbs button:hover { opacity: 1; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 639px) { .gallery__thumbs { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; } }

/* plano con marcadores */
.plan { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--verde-claro); }
.plan img { width: 100%; height: auto; }
.pin {
  position: absolute; width: 26px; height: 26px; border-radius: 50%;
  background: var(--naranja); color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%); border: 2px solid #fff;
  transition: transform var(--m-in) var(--ease);
}
.pin:hover, .pin[aria-pressed="true"] { transform: translate(-50%, -50%) scale(1.18); }

/* leyenda */
.legend { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: var(--t-small); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------------------------------------------------------------- movimiento */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn--primary:hover { background: var(--naranja-hover); }
  .btn--secondary:hover { border-color: currentColor; }
  .btn:active { transform: translateY(1px) scale(.985); }
  .link:hover { color: var(--naranja); }
}

/* entrada del hero: una vez, al cargar */
/* El estado oculto solo existe cuando el script marca la página: sin JS se ve completa. */
.m-enter:not(.m-enter-done) [data-enter] .hero__text > * { opacity: 0; transform: translateY(14px); }
[data-enter].is-in .hero__text > * {
  opacity: 1; transform: none;
  transition: opacity 520ms var(--ease-enter), transform 520ms var(--ease-enter);
}
[data-enter].is-in .hero__text > *:nth-child(2) { transition-delay: 70ms; }
[data-enter].is-in .hero__text > *:nth-child(3) { transition-delay: 140ms; }
[data-enter].is-in .hero__text > *:nth-child(4) { transition-delay: 200ms; }
[data-enter].is-in .hero__text > *:nth-child(5) { transition-delay: 250ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-enter] .hero__text > * { opacity: 1 !important; transform: none !important; }
  .wall figure:hover img, a.tile:hover .tile__shot img { transform: none; }
}

/* ---------------------------------------------------------------- hero partido */
.hero--split::after { display: none; }
.hero--split > .wrap { justify-content: stretch; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--col-gap); align-items: start; height: 100%; }
.hero__shot { height: 100%; max-height: 100%; overflow: hidden; border-radius: var(--r-lg); background: #1b2a1c; align-self: stretch; }
.hero__shot img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: 1fr; gap: 24px; align-content: center; }
  .hero__shot { min-height: 180px; }
}
@media (max-width: 639px) { .hero__shot { display: none; } }
/* En pantallas muy estrechas el hero crece para que nada quede bajo la barra fija. */
@media (max-width: 360px) {
  .hero { height: auto; min-height: 100svh; }
  .hero h1 { font-size: 32px; }
  .hero__facts { gap: 16px 24px; }
}

/* pasos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--col-gap); counter-reset: paso; }
@media (max-width: 639px) { .steps { grid-template-columns: 1fr; gap: 20px; } }
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 2px solid var(--naranja); }
.step b { font-size: var(--t-label); font-weight: 600; color: #b3601e; }
.step h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--t-card); }
.step p { font-size: 15px; color: var(--tinta-media); }
.s-dark .step p { color: rgba(255,255,255,.76); }

/* precio en la ficha */
.tile__price { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; color: var(--tinta-media); }
.tile__price b { color: var(--ink); font-weight: 600; }

/* preguntas abiertas (sin acordeón) */
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 40px var(--col-gap); align-content: start; }
@media (max-width: 1023px) { .qa { grid-template-columns: 1fr; gap: 28px; } }
.qa__item h3 { font-family: var(--font-body); font-weight: 600; font-size: 17px; }
.qa__item p { margin-top: 8px; font-size: 15px; line-height: 1.7; color: var(--tinta-media); max-width: 60ch; }

/* sectores del mapa de lotes */
.sectores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px var(--col-gap); align-content: start; overflow-y: auto; }
@media (max-width: 1023px) { .sectores { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .sectores { grid-template-columns: 1fr; } }
.sector h3 { font-family: var(--font-body); font-weight: 600; font-size: 17px; }
.sector .rows div { padding: 9px 0; }
.sector .rows .k, .sector .rows .v { font-size: 14px; }
.pin--sector { width: 34px; height: 34px; font-size: 14px; background: var(--verde-profundo); }
.pin--sector[aria-pressed="false"] { background: var(--tinta-suave); }
button.chip { transition: background-color var(--m-in) var(--ease), border-color var(--m-in) var(--ease); }
button.chip[aria-pressed="true"] { background: var(--verde-profundo); color: #fff; border-color: var(--verde-profundo); }
button.chip:hover { border-color: var(--verde-medio); }

/* documento legal */
.doc { overflow-y: auto; padding-right: 8px; max-width: 72ch; }
.doc h3 { font-family: var(--font-body); font-weight: 600; font-size: 17px; margin-top: 28px; }
.doc h3:first-child { margin-top: 0; }
.doc p { margin-top: 10px; font-size: 15px; line-height: 1.75; color: var(--tinta-media); }
.doc a { color: var(--verde-medio); border-bottom: 1px solid currentColor; }


/* alto mínimo de 44px para los enlaces fuera del texto corrido en móvil */
@media (max-width: 639px) {
  .hero { justify-content: flex-start; }
  .foot a, .rows a, .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .foot a { padding: 0; }
  .nav__logo img { height: 26px; }
  .legal { gap: 0 18px; }
}

/* fichas horizontales: foto a un lado, texto al otro */
.hcards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--col-gap); }
@media (max-width: 639px) { .hcards { grid-template-columns: 1fr; } }
.card.hcard { display: grid; grid-template-columns: 44% 1fr; gap: 20px; align-items: center; padding: 0; border: 0; background: transparent; }
.hcard__shot { overflow: hidden; border-radius: var(--r-md); aspect-ratio: 4 / 3; background: var(--verde-claro); }
.hcard__shot img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-image) var(--ease); }
a.hcard:hover .hcard__shot img { transform: scale(1.03); }
a.card.hcard:hover { transform: translateY(-2px); border: 0; }
.hcard h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--t-card); }
.hcard p { margin-top: 6px; font-size: 15px; color: var(--tinta-media); }
.hcard__go { display: block; margin-top: 10px; font-size: 15px; font-weight: 500; color: #2d7747; }
@media (max-width: 639px) {
  /* En móvil la ficha apila la fotografía sobre el texto, a ancho completo. */
  .card.hcard { grid-template-columns: 1fr; gap: 10px; }
  .hcard p, .hcard__go { display: none; }
}

}

/* una ficha que ocupa el alto de la sección: la fotografía toma lo que sobra */
.split.fill > .tile { height: 100%; }
.split.fill > .rows div { padding: 11px 0; }
.split.fill > .tile .tile__shot { aspect-ratio: auto; flex: 1; min-height: 0; }
@media (max-width: 1023px) { .split.fill > .tile { height: auto; } .split.fill > .tile .tile__shot { aspect-ratio: 4 / 3; flex: none; } }

/* una columna que reparte su contenido sin dejar huecos */
.stack { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; height: 100%; }
@media (max-width: 1023px) { .stack { height: auto; } }
.foot__holding { display: inline-block; margin-top: 18px; opacity: .85; transition: opacity var(--m-in) var(--ease); }
.foot__holding:hover { opacity: 1; }
.foot__holding img { height: 34px; width: auto; }

/* un plano grande que se abre a tamaño completo */
.planshot { display: block; overflow: hidden; border-radius: var(--r-lg); background: var(--verde-claro); }
.planshot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-image) var(--ease); }
a.planshot:hover img { transform: scale(1.02); }
/* dentro de una sección a pantalla, el plano se ajusta al alto y conserva su proporción */
.split.fill > .planshot { height: 100%; width: auto; max-width: 100%; aspect-ratio: 2400 / 3394; margin-inline: auto; }
@media (max-width: 1023px) { .split.fill > .planshot { height: auto; width: 100%; } }

/* la leyenda numerada del plano */
.numlist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px var(--col-gap); align-content: start; counter-reset: none; }
@media (max-width: 1023px) { .numlist { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .numlist { grid-template-columns: 1fr; gap: 8px; } }
.numlist li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--tinta-media); padding: 7px 0; border-bottom: 1px solid var(--linea); }
.numlist b { flex: none; width: 24px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--verde-profundo); }

/* ---------------------------------------------------------------- mapa del trayecto
   Dibujo a escala: 1 px del viewBox equivale a 50 m. Los dos extremos están
   en su posición real; el trazo de la carretera es esquemático. */
.route { display: flex; flex-direction: column; gap: 16px; height: 100%; min-height: 0; }
.route__fig {
  flex: 1; min-height: 0; display: flex;
  height: 100%; width: 100%;
  padding: 24px 20px; background: var(--blanco); border-radius: var(--r-lg);
}
.route__map { width: 100%; height: 100%; }
.route__road { fill: none; stroke: var(--verde-profundo); stroke-width: 8; stroke-linecap: round; opacity: .14; }
.route__lane { fill: none; stroke: var(--verde-profundo); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 10 8; opacity: .72; }
.route__stop circle { fill: var(--blanco); stroke: var(--verde-profundo); stroke-width: 2.6; }
.route__stop--end circle { fill: var(--naranja); stroke: var(--verde-profundo); }
.route__stop line { stroke: var(--verde-profundo); stroke-width: 1; opacity: .3; }
.route__stop text { font-family: var(--font-body); font-size: 17px; font-weight: 600; fill: var(--verde-profundo); }
.route text.route__sub { font-size: 13.5px; font-weight: 400; fill: var(--tinta-media); }
.route__fact { font-family: var(--font-display); font-size: 30px; font-weight: 500; fill: var(--verde-profundo); }
.route__north path { fill: var(--verde-profundo); stroke: var(--verde-profundo); stroke-width: 1.4; }
.route__north text { font-family: var(--font-body); font-size: 13px; font-weight: 600; fill: var(--verde-profundo); }
.route__scale line { stroke: var(--verde-profundo); stroke-width: 1.4; }
.route__scale text { font-family: var(--font-body); font-size: 13px; fill: var(--tinta-media); }
.route__car rect { fill: var(--naranja); }
.route__car .route__glass { fill: #fff; opacity: .9; }
.route__car-run { opacity: 0; }
.route.is-on .route__car-run { opacity: 1; }
.route.is-on .route__car-rest { opacity: 0; }
.route__toggle {
  align-self: flex-start; min-height: 44px; padding: 0 18px;
  font-size: 15px; font-weight: 500; color: var(--verde-profundo);
  border: 1px solid var(--linea); border-radius: var(--r-btn); background: var(--blanco);
  transition: border-color var(--m-in) var(--ease), color var(--m-in) var(--ease);
}
.route__toggle:hover { border-color: var(--verde-medio); }
@media (max-width: 1023px) { .route { height: auto; } .route__fig { height: 70vh; max-height: 620px; } }

/* ================================================================
   Paginas de documento: privacidad, terminos y libro de reclamaciones
   Estas paginas son de lectura y de formulario, no de pantalla fija:
   las secciones crecen con su contenido y la columna se limita a un
   ancho comodo de lectura, alineada con el titulo.
   ================================================================ */

/* ---- Texto legal: privacidad y terminos -------------------------- */
body.pg-legal main > section:not(.hero) {
  height: auto;
  min-height: 0;
  overflow: visible;
  padding-block: clamp(56px, 6vw, 88px);
}
body.pg-legal main > section:not(.hero) > .wrap { flex: none; }
body.pg-legal .head { max-width: 72ch; margin-bottom: 36px; }
body.pg-legal .doc {
  overflow: visible;
  flex: none;
  max-width: 72ch;
  padding-right: 0;
}
body.pg-legal .doc p { font-size: 16px; line-height: 1.8; }
body.pg-legal .doc h3 { font-size: 19px; margin-top: 38px; }
body.pg-legal .doc h3:first-child { margin-top: 0; }

/* ---- Libro de reclamaciones -------------------------------------- */
body.pg-form main > section:not(.hero) {
  height: auto;
  min-height: 0;
  overflow: visible;
  padding-block: clamp(56px, 6vw, 88px);
}
body.pg-form main > section:not(.hero) > .wrap { flex: none; }
body.pg-form .cards.fill,
body.pg-form .form.fill { flex: none; }
body.pg-form .form { max-width: 860px; }
body.pg-form .rows { max-width: 860px; margin-top: 44px; }
body.pg-form .rows div {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 24px;
  align-items: baseline;
}
body.pg-form .rows .v { text-align: left; }
@media (max-width: 639px) {
  body.pg-form .rows div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- Indice lateral de las paginas legales ----------------------- */
body.pg-legal .doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 72ch) minmax(200px, 300px);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
body.pg-legal .doc-grid > .doc { max-width: none; }
body.pg-legal .doc h3 { scroll-margin-top: 104px; }
.doc-toc {
  position: sticky;
  top: 104px;
  border-left: 1px solid var(--linea);
  padding-left: 22px;
}
.doc-toc b {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--tinta-media);
  margin-bottom: 14px;
}
.doc-toc a {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  padding: 7px 0;
  color: var(--tinta-media);
  border-bottom: 0;
}
.doc-toc a:hover, .doc-toc a:focus-visible { color: var(--verde-medio); }
@media (max-width: 1023px) {
  body.pg-legal .doc-grid { grid-template-columns: 1fr; }
  .doc-toc { display: none; }
}
