/*
 * navacationapp.com — built from the Figma wireframe "Waitlist - Logos"
 * (frames 30:178, 30:179, 33:238; a 393 x 852 phone). Sizes below are the
 * wireframe's own values.
 */
:root {
  /* Soft palette: deep ink on a barely-there blue-to-green mist. */
  --text: #13213b;
  --muted: rgba(19, 33, 59, 0.42);
  --field: rgba(255, 255, 255, 0.8);
  --placeholder: rgba(19, 33, 59, 0.5);
  --bg-top: #f7f6fc;
  --bg-bottom: #f3f8f4;
  /* Brand gradient (used as subtly as the wireframe does). */
  --blue: #331cb4;
  --green: #1fb551;
  --card-w: min(314px, calc(100vw - 79px));
  --card-h: calc(var(--card-w) * 473 / 314);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg-top); }
html, body { margin: 0; color: var(--text); }
body { background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed; min-height: 100vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.page {
  max-width: 393px;
  margin: 0 auto;
  padding: 18px 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
}

/* --- Tabs: Contact · App · About, with a sliding line ------------------ */
.tabs { position: relative; display: flex; justify-content: center; }
.tab {
  width: 80px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.28px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tab[aria-current='page'] { color: var(--text); }
.tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 4px; }
.indicator {
  position: absolute;
  top: 25px;
  left: 0;
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
  transform: translateX(var(--x, 108px));
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 17px;
  font-size: 32px;
  font-weight: 400;
  line-height: 40px;
  letter-spacing: -0.64px;
  text-align: center;
}

.title-logo { width: 40px; height: 40px; border-radius: 9px; flex: none; }

.panel { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* --- Carousel --------------------------------------------------------------- */
.stage { position: relative; width: var(--card-w); height: var(--card-h); }
.sliver {
  position: absolute;
  top: calc(var(--card-h) * 13 / 473);
  width: 20px;
  height: calc(var(--card-h) * 456 / 473);
  pointer-events: none;
}
/* --left / --right run 1 → 0 as you swipe toward that side's slide (site.js). */
.sliver-left {
  left: -25px;
  transform-origin: left center; /* grows rightward, into the card */
  opacity: var(--left, 1);
  transform: translateX(calc((1 - var(--left, 1)) * 30px)) scaleX(calc(1 + (1 - var(--left, 1)) * 3));
  filter: blur(calc((1 - var(--left, 1)) * 6px));
}
.sliver-right {
  right: -25px;
  transform-origin: right center; /* grows leftward, into the card */
  opacity: var(--right, 1);
  transform: translateX(calc((1 - var(--right, 1)) * -30px)) scaleX(calc(1 + (1 - var(--right, 1)) * 3));
  filter: blur(calc((1 - var(--right, 1)) * 6px));
}

.carousel {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: center;
  user-select: none;
}
/* While a slide is on its way in (or out), it carries the sliver's blue-green
   tint and a sheen that sweeps across; both clear as it settles (--away → 0). */
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: calc(var(--away, 0) * 0.7);
  background:
    linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.6) 50%, transparent 62%)
      calc(50% + var(--d, 0) * 140%) 0 / 260% 100% no-repeat,
    linear-gradient(90deg, rgba(51, 28, 180, 0.38), rgba(31, 181, 81, 0.32));
}
@media (prefers-reduced-motion: reduce) {
  .slide::after { display: none; }
  .sliver-left, .sliver-right { filter: none; }
  .sliver-left, .sliver-right { transform: none; }
}

/* The promotional photo (one of three, picked at random). */
.promo-photo { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.promo-text {
  position: absolute;
  margin: 0;
  width: calc(var(--card-w) * 244 / 314);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  line-height: normal;
  color: #fff;
}
.promo-place {
  position: absolute;
  margin: 0;
  width: 65px;
  font-size: 10px;
  font-weight: 300;
  line-height: normal;
  letter-spacing: -0.7px;
  text-align: center;
  color: #fff;
}
/* Positions per photo, from each Figma frame (as % of the card so it scales). */
.promo[data-variant='madrid'] .promo-text { right: 3.18%; top: 42.7%; text-align: right; font-size: 20px; letter-spacing: -1.4px; }
.promo[data-variant='madrid'] .promo-place { left: 50%; transform: translateX(-50%); top: 83.1%; }
.promo[data-variant='nara'] .promo-text { right: 3.18%; top: 33.2%; text-align: right; font-size: 18px; letter-spacing: -1.26px; }
.promo[data-variant='nara'] .promo-place { left: 79.3%; top: 86.0%; }
.promo[data-variant='yosemite'] .promo-text { left: 2.55%; top: 51.8%; text-align: left; font-size: 18px; letter-spacing: -1.26px; }
.promo[data-variant='yosemite'] .promo-place { left: 78.3%; top: 92.8%; }

/* App previews, App Store style: headline over a phone. */
.preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    linear-gradient(160deg, rgba(51, 28, 180, 0.08), rgba(31, 181, 81, 0.07)),
    #fff;
}
.preview-headline {
  margin: 28px 20px 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.9px;
  text-align: center;
}
.phone {
  position: absolute;
  top: calc(var(--card-h) * 0.26);
  width: 70%;
  aspect-ratio: 1170 / 2532;
  padding: 6px;
  border-radius: 30px;
  background: #111;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.22);
}
.phone img { width: 100%; height: 100%; display: block; border-radius: 24px; object-fit: cover; object-position: top; pointer-events: none; }

/* --- Dots -------------------------------------------------------------------
   Every dot is the same 12px circle; the inactive ones are scaled down with a
   transform (smooth, GPU-composited) instead of animating width and height. */
.dots { display: flex; align-items: center; gap: 2px; height: 12px; margin: 9px 0 0; }
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(19, 33, 59, 0.16);
  transform: scale(0.58) translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.dot.on { transform: scale(1) translateZ(0); background: rgba(19, 33, 59, 0.5); }

/* --- Get the app (App Store button) ---------------------------------------- */
.get { display: flex; flex-direction: column; align-items: center; margin-top: 28px; }
.store-badge { display: block; line-height: 0; border-radius: 9px; }
.store-badge img { width: 150px; height: 50px; display: block; }
.store-badge:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.get-note { margin-top: 10px; font-size: 14px; color: rgba(19, 33, 59, 0.7); }

/* --- Join the waitlist (no longer on the page; kept for reference) ---------- */
.join { display: flex; flex-direction: column; align-items: center; margin-top: 28px; }
.join-label { font-size: 16px; letter-spacing: -0.32px; margin-bottom: 8px; }
.field { position: relative; width: 264px; }
.field input {
  width: 100%;
  height: 30px;
  padding: 0 34px 0 16px;
  border: 1px solid var(--text);
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px keeps iPhones from zooming in */
  letter-spacing: -0.32px;
}
.field input::placeholder { color: var(--placeholder); }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51, 28, 180, 0.12); }
/* The send arrow only shows once something is typed. */
.send {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  font-size: 14px;
  line-height: 24px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.field input:not(:placeholder-shown) + .send { opacity: 1; pointer-events: auto; }
.send[disabled] { opacity: 0.5; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.result { max-width: 300px; min-height: 20px; margin-top: 12px; font-size: 14px; text-align: center; color: var(--text); }
.result.error { color: #b42318; }

/* --- About / Contact -------------------------------------------------------- */
.copy { width: var(--card-w); font-size: 15px; line-height: 1.55; color: rgba(19, 33, 59, 0.85); }
.copy h2 {
  margin: 8px 0 16px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--text);
}
.copy p { margin: 0 0 14px; }
.copy .note { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.contact-list li { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(19, 33, 59, 0.08); }
.contact-list span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.contact-list a { font-size: 16px; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* --- Footer, and the Privacy / Terms / Support pages ------------------------ */
.footer { margin-top: auto; padding-top: 40px; display: flex; gap: 18px; font-size: 12px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

.doc { align-items: stretch; padding: 24px 16px 32px; max-width: 640px; }
.doc footer { margin-top: 48px; display: flex; gap: 16px; font-size: 13px; color: rgba(0, 0, 0, 0.5); }
.doc footer a { color: rgba(0, 0, 0, 0.5); }

/* --- Invite link landing page ---------------------------------------------- */
.invite-page .title { margin-top: 24px; color: var(--text); }
.invite-page .copy { margin-top: 24px; }
.cta {
  display: block;
  margin: 24px 0;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.cta:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }


/* Legal pages: Inter throughout, centred logo, calm reading column */
.doc { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; max-width: 680px; padding: 32px 20px 48px; }
.doc header { display: flex; justify-content: center; margin-bottom: 40px; }
.doc .brand { display: inline-flex; align-items: center; gap: 10px; color: #000; font-weight: 600; font-size: 22px; letter-spacing: -0.3px; text-decoration: none; }
.doc .brand img { width: 36px; height: 36px; border-radius: 8px; }
.doc h1 { font-weight: 700; font-size: 32px; letter-spacing: -0.8px; line-height: 1.15; color: var(--text); margin: 0 0 8px; }
.doc h2 { font-weight: 600; font-size: 20px; letter-spacing: -0.3px; color: var(--text); margin: 40px 0 10px; padding-top: 24px; border-top: 1px solid rgba(19, 33, 59, 0.1); }
.doc h3 { font-weight: 600; font-size: 16px; color: var(--text); margin: 24px 0 6px; }
.doc p, .doc li { font-size: 15px; line-height: 1.65; color: rgba(19, 33, 59, 0.82); overflow-wrap: anywhere; }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--blue); }
.doc strong { color: var(--text); font-weight: 600; }
.doc .table-wrap { overflow-x: auto; margin: 12px 0 20px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 13px; }
.doc th, .doc td { border: 1px solid rgba(19, 33, 59, 0.12); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: #f4f3fb; font-weight: 600; }
.doc .credit { font-size: 12px; color: rgba(19, 33, 59, 0.45); margin-top: 32px; }
.doc footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(19, 33, 59, 0.1); display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.doc footer span, .doc footer a { color: rgba(19, 33, 59, 0.5); text-decoration: none; }
.doc footer a:hover { color: var(--text); }
