/* Wander Join — landing / lista de espera
   Tokens: docs/design_system/Wander Join/tokens.css (night/sky/lagoon/dawn). */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #0b2530;
  --surface: #f7f3ea;
  --surface-raised: #ffffff;
  --surface-sunken: #efe9dc;
  --ink: #0b2530;
  --ink-muted: #5b6870;
  --ink-on-dark: #a7b6bd;
  --line: #e2ddd0;
  --line-strong: #8a949a;
  --line-dark: #24485a;
  --sky: #1668c7;
  --on-sky: #ffffff;
  --lagoon: #13b5a3;
  --lagoon-soft: #d3f2ee;
  --dawn: #e6f57a;
  --on-accent: #0b2530;
  --coral: #e5734f;
  --error: #b3261e;
  --error-soft: #fdecea;
  --scrim-from: rgba(11, 37, 48, 0.92);
  --scrim-to: rgba(11, 37, 48, 0);

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-card: 0 12px 32px rgba(11, 37, 48, 0.08);
  --shadow-form: 0 24px 60px rgba(11, 37, 48, 0.14);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* height:auto para que los atributos width/height solo reserven proporción (sin CLS)
   y no anulen aspect-ratio. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); }
a:hover { color: var(--night); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }
[hidden] { display: none !important; }

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--night); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 16px; color: #fff; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* ---------- Tipografía ---------- */
.eyebrow {
  margin: 0 0 10px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sky);
}
.on-dark .eyebrow { color: var(--dawn); }

.h-display {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1; font-weight: 800; letter-spacing: -0.03em;
  text-wrap: balance;
}
.h-section {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.05; font-weight: 800; letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead { margin: 0; max-width: 560px; font-size: 19px; line-height: 30px; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--radius-pill);
  font: 700 17px var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(0.96); }
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }
.btn-launch { background: var(--dawn); color: var(--on-accent); }
.btn-launch:hover { color: var(--on-accent); }
.btn-primary { min-height: 44px; padding: 0 20px; font-size: 15px; font-weight: 600; background: var(--sky); color: var(--on-sky); }
.btn-primary:hover { color: var(--on-sky); }
.btn-outline {
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink);
  font: 600 15px var(--font-sans);
}
.btn[aria-busy="true"] { cursor: progress; opacity: .75; }

/* ---------- Header (fijo arriba) ---------- */
html { scroll-padding-top: 96px; } /* los anclajes y el foco no quedan bajo la barra */
.site-header {
  position: sticky; top: 0; z-index: 20;
  container-type: scroll-state; container-name: site-header;
}
.header-bar {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
/* Con la barra pegada arriba: línea y sombra suaves (Chrome); el resto la ve igual pero sin sombra. */
@container site-header scroll-state(stuck: top) {
  .header-bar { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(11, 37, 48, 0.08); }
}
.header-bar .wrap {
  display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 14px; padding-bottom: 14px;
}
.site-header .logo { flex: none; }
.site-header .logo img { width: 160px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 8px 22px; font-size: 15px; font-weight: 600; }
.site-nav a:not(.btn):not(.store) { color: var(--ink); text-decoration: none; padding: 10px 0; white-space: nowrap; }
.site-nav a:not(.btn):not(.store):hover { color: var(--sky); }
.lang-switch {
  min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--ink); font: 700 14px var(--font-sans); cursor: pointer;
}
.stores { display: flex; gap: 8px; }
.store {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px 0 12px; border-radius: 12px;
  background: var(--night); color: #fff; text-decoration: none; white-space: nowrap;
}
.store:hover { color: #fff; background: #17394a; }
.store svg { flex: none; }
.store-txt { display: flex; flex-direction: column; font: 700 14px/1.1 var(--font-sans); }
.store-txt small { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; opacity: .85; }
@media (max-width: 1180px) { .site-nav .nav-link { display: none; } }
@media (max-width: 620px) {
  .site-header .logo img { width: 128px; }
  .site-nav { gap: 8px; }
  .store { width: 44px; padding: 0; justify-content: center; }
  .store-txt { display: none; }
}
@media (max-width: 400px) {
  .site-header .logo img { width: 112px; }
  .site-nav .btn-primary { padding: 0 14px; }
}

/* ---------- Hero ---------- */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-copy { flex: 1 1 460px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--radius-pill); padding: 8px 14px; font-size: 14px; font-weight: 700;
}
.chip-dawn { background: var(--dawn); }
.chip-lagoon { background: var(--lagoon-soft); }
.hero-photos { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; }
.hero-photos img { width: calc((100% - 24px) / 3); aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius-md); background: var(--surface-sunken); }
.hero-photos img:nth-child(2) { margin-top: 32px; }

/* ---------- Formulario lista de espera ---------- */
.waitlist {
  flex: 1 1 400px; max-width: 520px; min-width: 0;
  background: var(--surface-raised); border-radius: var(--radius-xl);
  padding: 28px; box-shadow: var(--shadow-form);
  scroll-margin-top: 24px;
}
@media (max-width: 480px) { .waitlist { padding: 20px; } }
.waitlist form { display: flex; flex-direction: column; gap: 18px; }
.waitlist h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.01em; }
.waitlist .sub { margin: 0; font-size: 15px; color: var(--ink-muted); }

.segmented {
  margin: 0; padding: 4px; border: 0; border-radius: 16px;
  background: var(--surface-sunken); display: flex; gap: 4px;
}
.segmented label {
  flex: 1 1 0; position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 6px; border-radius: var(--radius-sm); text-align: center;
  font: 600 15px/1.2 var(--font-sans); color: var(--ink); cursor: pointer;
}
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--night); color: #fff; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }

.row { display: flex; flex-wrap: wrap; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.field > label { font: 600 14px var(--font-sans); color: var(--ink); }
.field .optional { font-weight: 500; color: var(--ink-muted); }
.field input, .field select {
  min-height: 48px; width: 100%; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--ink); font: 500 16px var(--font-sans);
}
.field select { appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230B2530' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.field input:focus, .field select:focus { outline: 2px solid var(--sky); outline-offset: 2px; }
.field input::placeholder { color: #7b868c; }

.error-msg { display: none; margin: 0; font-size: 14px; line-height: 20px; color: var(--error); }
.error-msg::before { content: "⚠ "; }
:is(input, select):is(:user-invalid, .user-invalid-fallback) { border-color: var(--error); background-color: var(--error-soft); }
:is(input, select):is(:user-invalid, .user-invalid-fallback) ~ .error-msg { display: block; }

fieldset.group { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.consent input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--sky); }
.consent-wrap .error-msg { margin-top: 6px; }
.consent-wrap:has(input:user-invalid) .error-msg { display: block; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  margin: 0; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--error-soft); color: var(--error); font-size: 15px; font-weight: 500;
}
.small-print { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink-muted); }

.success { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 12px 0; }
.success:focus { outline: none; }
.success-icon { width: 56px; height: 56px; border-radius: 28px; background: var(--lagoon); display: flex; align-items: center; justify-content: center; }
.success h2 { margin: 0; }
.success p { margin: 0; font-size: 16px; line-height: 24px; color: var(--ink-muted); }

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
.section-head { max-width: 760px; margin-bottom: 32px; }
.on-dark { background: var(--night); color: #fff; }
.on-sky { background: var(--sky); color: #fff; }
@media (max-width: 600px) { .section { padding: 56px 0; } }

.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.card {
  flex: 1 1 300px; background: var(--surface-raised); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column;
}
.card img { width: 100%; height: 220px; object-fit: cover; background: var(--surface-sunken); }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 24px; }
.checks svg { flex: none; margin-top: 2px; }

.steps { display: flex; flex-wrap: wrap; gap: 32px; }
.step { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; }
.step-n {
  width: 56px; height: 56px; border-radius: 28px; background: var(--dawn); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 24px; font-weight: 800;
}
.step h3 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.step p { margin: 0; font-size: 17px; line-height: 26px; color: var(--ink-on-dark); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.tile { position: relative; min-height: 260px; border-radius: var(--radius-lg); overflow: hidden; background: var(--night); color: #fff; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 30% 0 0; background: linear-gradient(to top, var(--scrim-from), var(--scrim-to)); }
.tile-text { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 1; }
.tile h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.tile p { margin: 0; font-size: 15px; line-height: 22px; color: rgba(255, 255, 255, 0.9); }

.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split-copy { flex: 1 1 440px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.split-photo { flex: 1 1 400px; max-width: 560px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-xl); }
.host-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 18px; line-height: 27px; }
.host-list li { display: flex; gap: 12px; }
.host-list svg { flex: none; margin-top: 2px; }

.story-photo { flex: 1 1 360px; max-width: 460px; margin: 0; }
.story-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-xl); }
.story-photo figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-muted); }
.story p.body { margin: 0; font-size: 18px; line-height: 29px; color: var(--ink-muted); }
.story .sign { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; }

.faq { background: var(--surface-raised); }
.faq .wrap { max-width: 860px; }
.faq details { border-bottom: 1.5px solid var(--line); padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-display); font-size: 20px; font-weight: 700; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; color: var(--sky); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; font-size: 17px; line-height: 26px; color: var(--ink-muted); }

.final .wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.final img { width: 72px; height: 72px; border-radius: 18px; }
.final p { margin: 0; max-width: 560px; font-size: 18px; line-height: 28px; color: var(--ink-on-dark); }

.site-footer { padding: 32px 0; background: var(--night); color: var(--ink-on-dark); border-top: 1px solid var(--line-dark); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }
.site-footer img { width: 130px; height: auto; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.footer-links .ig { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.site-footer a { color: var(--ink-on-dark); }
.site-footer a:hover { color: #fff; }

/* ---------- Historia: slider de viaje ---------- */
.trips { flex: 1 1 360px; max-width: 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.trips-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  aspect-ratio: 4 / 5; border-radius: var(--radius-xl); background: var(--surface-sunken);
  scrollbar-width: none; touch-action: pan-x pan-y;
}
.trips-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .trips-track { scroll-behavior: smooth; } }
.trips-slide { flex: 0 0 100%; scroll-snap-align: center; }
.trips-slide img { width: 100%; height: 100%; object-fit: cover; }
.trips-controls { display: flex; align-items: center; gap: 8px; }
.trips-btn {
  flex: none; width: 44px; height: 44px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line-strong); background: #fff; color: var(--ink); cursor: pointer; touch-action: manipulation;
}
.trips-btn:hover { border-color: var(--ink); }
#trips-pause { margin-left: auto; }
#trips-pause .i-play, #trips-pause[data-paused="true"] .i-pause { display: none; }
#trips-pause[data-paused="true"] .i-play { display: block; }
.trips-dots { display: flex; align-items: center; justify-content: center; flex: 1; gap: 2px; }
.trips-dots button {
  width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation;
}
.trips-dots button::before {
  content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); transition: width .2s ease;
}
.trips-dots button[aria-current="true"]::before { width: 20px; background: var(--night); }
.trips-caption { margin: 0; font-size: 15px; color: var(--ink-muted); }
.trips-caption a { font-weight: 600; }

.route { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.route li {
  padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface-sunken);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.route li.now { background: var(--lagoon-soft); }
.award {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px;
  border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: var(--shadow-card);
}
.award-icon { flex: none; width: 48px; height: 48px; border-radius: 24px; background: var(--dawn); display: flex; align-items: center; justify-content: center; }
.award p { margin: 0; font-size: 17px; line-height: 26px; color: var(--ink); }

/* ---------- Página legal ---------- */
.legal { padding: 24px 0 80px; }
.legal .wrap { max-width: 800px; }
.legal h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; margin: 16px 0 8px; }
.legal h2 { font-family: var(--font-display); font-size: 22px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 17px; line-height: 27px; color: var(--ink-muted); }
.legal a { font-weight: 600; }
.legal .updated { margin-top: 0; font-size: 15px; }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--ink); }
.legal .summary {
  margin: 28px 0 8px; padding: 22px 24px; border-radius: var(--radius-md);
  background: var(--surface-raised); box-shadow: var(--shadow-card); border-left: 6px solid var(--lagoon);
}
.legal .summary h2 { margin-top: 0; }
.legal .summary p, .legal .summary li { color: var(--ink); }
.legal .table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; background: var(--surface-raised); border-radius: var(--radius-sm); overflow: hidden; font-size: 16px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--surface-sunken); font-weight: 700; }
.legal code { font-size: 15px; white-space: nowrap; }
.legal .summary > :last-child { margin-bottom: 0; }
.legal hr { border: 0; border-top: 1.5px solid var(--line); margin: 48px 0; }
