/* kiomigo landing — the "night atlas" stage.
   Layers on top of the shared brand shell (kiomigo.css). */

body.landing { overflow: hidden; }

/* ---------- slide stage ---------- */
.stage { position: fixed; inset: 0; }
.slide {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 84px 24px 40px;
  opacity: 0; visibility: hidden; transform: translateX(6vw);
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.slide.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .45s ease, transform .45s ease;
}
.slide.leaving-back { transform: translateX(-6vw); }

.eyebrow {
  font-family: var(--sans); font-size: .74rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--kio); font-weight: 600; margin: 0 0 14px;
}
h1 {
  font-family: var(--sans);
  font-size: clamp(1.9rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.025em;
  line-height: 1.08; margin: 0 0 12px; text-align: center; text-wrap: balance;
}
.sub {
  font-family: var(--body);
  color: var(--muted); font-size: clamp(.98rem, 2vw, 1.1rem); margin: 0; text-align: center; max-width: 52ch;
}

/* ---------- slide 1 · world map ---------- */
.map-wrap {
  width: min(1080px, 94vw); margin-top: 2.5vh;
  flex: 1 1 auto; min-height: 0; display: flex; justify-content: center;
  perspective: 1400px; /* the unfolded globe gently bends toward the cursor */
}
.worldmap {
  width: 100%; height: 100%; display: block; overflow: visible;
  transform-style: preserve-3d; will-change: transform;
  transition: transform .5s cubic-bezier(.22, .8, .3, 1);
}
.worldmap.tilting { transition: transform .12s ease-out; }
/* hovering one region: the rest fades back and blurs (not while zoomed).
   The small transition delay absorbs quick hover swaps at shared borders,
   so crossing Europe/Asia does not strobe the whole map. */
.worldmap:not(.zoomed):has(.continent:hover) .continent:not(:hover) path {
  filter: url(#wc) blur(2.5px) saturate(.55) brightness(.75);
  opacity: .55;
  transition-delay: .09s;
}
.worldmap:not(.zoomed):has(.continent:hover) .continent:not(:hover) .c-label {
  opacity: .25;
  transition: opacity .7s ease .09s;
}
/* zoomed into one continent: everything else recedes */
.worldmap.zoomed .continent:not(.zoom-active) path {
  filter: url(#wc) blur(4px) saturate(.4) brightness(.6);
  opacity: .16; pointer-events: none;
}
.worldmap.zoomed .continent:not(.zoom-active) .c-label { opacity: 0; }
.worldmap.zoomed .continent.zoom-active { cursor: default; }
/* in step 2 the chosen continent is at its brightest, hover or not */
.worldmap.zoomed .continent.zoom-active path,
.worldmap.zoomed .continent.zoom-active:hover path {
  transform: none;
  filter: url(#wc) brightness(1.2) saturate(1.2) drop-shadow(0 12px 28px rgba(3, 18, 33, .6));
}
.worldmap.zoomed .continent.zoom-active .c-label { opacity: 0; }
/* the flashlight: a soft veil with a bright, cursor-following hole. Clicking
   inside the lit continent plants the ROI right there; outside steps back. */
.spotlight {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
  opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%),
    rgba(3, 18, 33, 0) 0 90px, rgba(3, 18, 33, .38) 150px, rgba(3, 18, 33, .6) 320px);
}
.spotlight.on { opacity: 1; }
.worldmap.zoomed { cursor: crosshair; }
/* the hint and chips float above the veil and stay fully readable */
.map-hint, .subregion-bar { position: relative; z-index: 6; }
.subregion-bar { display: flex; gap: 10px; margin-top: 1.6vh; flex-wrap: wrap; justify-content: center; }
.sub-chip {
  font-family: var(--sans); font-size: .85rem; font-weight: 700; cursor: pointer;
  padding: 9px 16px; border-radius: 20px; border: 1px solid var(--kio);
  background: rgba(59, 179, 193, .12); color: #fff;
}
.sub-chip:hover { background: rgba(59, 179, 193, .3); }
.sub-chip.ghosty { border-color: rgba(238, 246, 251, .25); background: none; color: var(--muted); }

/* mobile first: the pins must be big, readable and easy to hit on a phone */
@media (max-width: 640px) {
  .sub-chip { padding: 12px 18px; font-size: .95rem; }
  .subregion-bar { gap: 8px; padding: 0 8px; }
  .map-hint { padding: 0 12px; text-align: center; }
}
.continent { cursor: pointer; outline: none; }
.continent path {
  stroke: rgba(238, 246, 251, .22); stroke-width: .8;
  transition: filter .7s ease, opacity .7s ease, transform .25s ease, stroke .25s ease;
  transform-box: fill-box; transform-origin: center;
  filter: url(#wc) drop-shadow(0 5px 16px rgba(3, 18, 33, .5));
}
/* the world reads kio → mi → go, west to east */
.continent[data-continent="north_america"] path { fill: url(#g-north_america); }
.continent[data-continent="south_america"] path { fill: url(#g-south_america); }
.continent[data-continent="europe"]        path { fill: url(#g-europe); }
.continent[data-continent="africa"]        path { fill: url(#g-africa); }
.continent[data-continent="asia"]          path { fill: url(#g-asia); }
.continent[data-continent="australia"]     path { fill: url(#g-australia); }
/* quiet, editorial labels: matches the page's letterspaced eyebrow style */
.continent .c-label {
  font-family: var(--sans);
  font-size: 13.5px; font-weight: 600; letter-spacing: .18em; text-anchor: middle;
  text-transform: uppercase;
  fill: rgba(255, 255, 255, .88); pointer-events: none;
  transition: opacity .25s ease;
  filter: drop-shadow(0 1px 3px rgba(3, 18, 33, .9)) drop-shadow(0 0 8px rgba(3, 18, 33, .45));
}
/* hover lift is light-only (no transform): moving geometry under the cursor
   made the hover flicker at continent borders */
.continent:hover path, .continent:focus-visible path {
  filter: url(#wc) brightness(1.2) saturate(1.2) drop-shadow(0 12px 28px rgba(3, 18, 33, .6));
  stroke: rgba(255, 255, 255, .5);
}
.continent:hover .c-label, .continent:focus-visible .c-label { opacity: 1; }
.continent:focus-visible path { stroke-width: 2.5; }
.map-hint {
  margin-top: 2vh; font-family: var(--sans); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.map-hint .pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--mi); margin-right: 10px; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(245,121,79,.5);} 50% { box-shadow: 0 0 0 9px rgba(245,121,79,0);} }

/* ---------- slide 2 · journeys ---------- */
.tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  width: min(1120px, 94vw); margin-top: 4vh;
}
.tile {
  position: relative; border: 1px solid var(--line); border-radius: 18px;
  background: var(--night-2); min-height: 300px; padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; overflow: hidden; text-align: left; color: var(--ink);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tile:hover, .tile:focus-visible { transform: translateY(-5px); border-color: rgba(234,242,245,.28); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
.tile .art { position: absolute; inset: 0; opacity: .9; }
.tile .art::after { /* readability scrim */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10, 20, 31, .92) 82%);
}
.tile .route-deco { position: absolute; top: 26px; left: 18px; right: 18px; height: 60px; }
.tile .pick-chip {
  position: absolute; top: 12px; right: 12px;
  background: rgba(238, 190, 78, .92); color: #123; font-weight: 800; font-size: .68rem;
  padding: 4px 10px; border-radius: 12px; letter-spacing: .04em;
}
.tile h3 { position: relative; margin: 0 0 2px; font-size: 1.18rem; font-weight: 800; letter-spacing: -.015em; }
.tile .meta { position: relative; font-family: var(--sans); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile .desc { position: relative; font-family: var(--body); color: #B9C8D2; font-size: .86rem; margin: 8px 0 0; line-height: 1.45; }
.tile.custom {
  border-style: dashed; border-color: rgba(234,242,245,.22); background: transparent;
  align-items: center; justify-content: center; text-align: center;
}
.tile.custom .plus {
  width: 58px; height: 58px; border-radius: 50%; border: 2px dashed var(--kio);
  display: grid; place-items: center; font-size: 30px; color: var(--kio); margin-bottom: 14px;
}
.tile.custom h3 { font-size: 1.15rem; }
.tile.custom .desc { text-align: center; }

/* ---------- wizard ---------- */
.panel {
  width: min(620px, 94vw); background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 34px 36px; margin-top: 3.5vh;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
.field { margin: 0 0 22px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.field .help { font-family: var(--body); color: var(--muted); font-size: .8rem; margin-top: 6px; }
input[type="text"], input[type="date"], select {
  width: 100%; padding: 13px 15px; border-radius: 12px; font-size: 1rem;
  background: var(--night); color: var(--ink); border: 1px solid rgba(234,242,245,.16);
  font-family: var(--sans); color-scheme: dark;
}
input:focus-visible, select:focus-visible, .stepper button:focus-visible {
  outline: 2px solid var(--kio); outline-offset: 1px;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.stepper { display: flex; align-items: center; gap: 0; border: 1px solid rgba(234,242,245,.16); border-radius: 12px; overflow: hidden; width: fit-content; }
.stepper button {
  width: 46px; height: 46px; border: none; background: var(--night); color: var(--ink);
  font-size: 20px; cursor: pointer; font-weight: 700;
}
.stepper button:hover { background: #16293d; }
.stepper output {
  min-width: 64px; text-align: center; font-weight: 800; font-size: 1.1rem;
  font-variant-numeric: tabular-nums; background: var(--night); align-self: stretch;
  display: grid; place-items: center; border-inline: 1px solid rgba(234,242,245,.12);
}
.kids-ages { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.kid-age { display: flex; flex-direction: column; gap: 5px; }
.kid-age span { font-family: var(--sans); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kid-age select { width: 108px; padding: 9px 10px; }

/* vibe cards */
.vibes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; }
.vibe {
  border: 1px solid rgba(234,242,245,.14); border-radius: 14px; background: var(--night);
  padding: 16px 10px 13px; text-align: center; cursor: pointer; color: var(--ink);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.vibe svg { width: 30px; height: 30px; display: block; margin: 0 auto 8px; stroke: var(--muted); fill: none; stroke-width: 1.6; transition: stroke .2s ease; }
.vibe span { font-size: .82rem; font-weight: 600; }
.vibe:hover { transform: translateY(-2px); border-color: rgba(234,242,245,.3); }
.vibe[aria-pressed="true"] { border-color: var(--kio); background: rgba(59, 179, 193, .12); }
.vibe[aria-pressed="true"] svg { stroke: var(--kio); }

/* wizard nav + progress */
.wiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }
.btn-primary {
  border: none; border-radius: 12px; padding: 14px 26px; font-size: 1rem; font-weight: 700;
  background: linear-gradient(120deg, var(--mi), #e2603b); color: #fff; cursor: pointer;
  font-family: var(--sans); transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245, 121, 79, .35); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-back {
  background: none; border: none; color: var(--muted); font-size: .92rem; cursor: pointer;
  font-family: var(--sans); padding: 10px 6px;
}
.btn-back:hover { color: var(--ink); }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.dots i { width: 26px; height: 4px; border-radius: 4px; background: rgba(234,242,245,.15); transition: background .3s ease; }
.dots i.on { background: var(--kio); }

/* step header inside wizard slides */
.step-eyebrow { text-align: center; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .vibes { grid-template-columns: repeat(2, 1fr); }
  .stage { position: static; }
  body.landing { overflow: hidden; }         /* the active step owns the viewport and scrolls internally */
  .slide { position: relative; }
  .slide:not(.active) { display: none; }
  #slide-world { min-height: 100svh; }        /* the map step keeps its own full-height flow */

  /* Every form step fills the viewport as a flex column: a compact header, a
     scrollable body, and the Back/Continue nav pinned to the SAME spot at the
     bottom on every step. The page itself never scrolls or overflows. */
  .slide.active:not(#slide-world) {
    height: 100vh; height: 100dvh;
    justify-content: flex-start;
    padding: 14px 10px calc(10px + env(safe-area-inset-bottom));
  }
  .slide.active:not(#slide-world) > .eyebrow { margin-bottom: 6px; }
  .slide.active:not(#slide-world) > h1 { font-size: clamp(1.4rem, 6vw, 2rem); margin-bottom: 6px; }
  .slide.active:not(#slide-world) > .sub { font-size: .88rem; margin-bottom: 0; }

  /* the panel becomes the scroll area; full width, minimal side margin */
  .slide.active .panel {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    width: 100%; max-width: 560px; margin: 12px auto 0; padding: 18px 16px;
    display: flex; flex-direction: column;
  }
  /* the journeys step has no panel: its tiles scroll instead */
  .slide.active #tiles {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    align-content: start; margin-top: 12px; width: 100%;
  }

  /* nav pinned at the bottom, identical position on every step */
  .slide.active .wiz-nav {
    position: sticky; bottom: 0; margin-top: auto;
    background: var(--panel); padding: 12px 0 2px;
  }
  .slide.active > .wiz-nav { background: transparent; }  /* journeys nav sits on the stage, no card */
  .dots { display: none; }                                /* the "step X of 5" eyebrow already shows progress */
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .panel { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .tile, .vibe, .continent path, .btn-primary { transition: none !important; }
  .map-hint .pulse { animation: none; }
}

/* ---- travel style step: A/B choice rows ---- */
.style-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.style-label { flex: 1; min-width: 120px; font-size: .88rem; font-weight: 600; }
.style-choices { display: flex; gap: 8px; }
.style-opt {
  padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(14, 29, 46, .4); color: var(--muted);
  font: inherit; font-size: .84rem; cursor: pointer; transition: all .15s;
}
.style-opt.on {
  border-color: var(--kio); color: #fff;
  background: rgba(59, 179, 193, .18); font-weight: 600;
}
@media (max-width: 560px) {
  .style-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .style-choices { width: 100%; }
  .style-opt { flex: 1; }
}

/* travel style v2: interest-chip look, two questions per row on wide screens */
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
@media (max-width: 640px) { .style-grid { grid-template-columns: 1fr; } }
.style-q { display: block; }
.style-q .style-label { display: block; margin-bottom: 8px; font-size: .88rem; font-weight: 600; }
.style-q .style-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.style-q .style-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(14, 29, 46, .4); color: var(--muted);
  font: inherit; font-size: .8rem; cursor: pointer; transition: all .15s; opacity: 1;
}
.style-q .style-opt .material-icons { font-size: 1.7rem; color: var(--muted); transition: color .15s; }
.style-q .style-opt.on { border-color: var(--kio); color: #fff; background: rgba(59, 179, 193, .16); font-weight: 600; }
.style-q .style-opt.on .material-icons { color: var(--kio); }
