/* ============================================================
   Summit: brand tokens pulled from the Figma palette swatches
   ============================================================ */
:root {
  --snow:     #fffafb;  /* Rectangle 4 */
  --glacier:  #39b2e6;  /* Rectangle 3 */
  --summit:   #197ac8;  /* Rectangle 5 */
  --deep:     #003f83;  /* Rectangle 6 */
  --night:    #000e1d;  /* Rectangle 7 */

  --text:       var(--snow);
  --text-dim:   rgb(255 250 251 / 0.7);
  --glass:      rgb(255 250 251 / 0.06);
  --glass-line: rgb(255 250 251 / 0.14);

  --display: "Archivo", system-ui, sans-serif;
  --body: "Inter Tight", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Film grain for the cinematic feel */
.grain {
  position: fixed; inset: -50%;
  z-index: 100; pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ============================================================
   Intro
   ============================================================ */
.intro { display: none; }
.has-intro .intro,
.intro.is-active {
  display: block;
  position: fixed; inset: 0; z-index: 90;
  background: var(--night);
  cursor: pointer;
}
.has-intro body { overflow: hidden; }
.intro__logo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.intro__skip {
  position: absolute; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom));
  margin: 0; text-align: center;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  animation: fade-in 0.6s 1s forwards;
}
@keyframes fade-in { to { opacity: 1; } }

/* While the intro runs, the hero copy waits offstage */
.has-intro .hero__content,
.has-intro .nav,
.has-intro .hero__scroll { visibility: hidden; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
  background: linear-gradient(to bottom, rgb(0 14 29 / 0.75), transparent);
}
.nav__brand { display: block; }
/* The logo as an app icon: white square, rounded like iOS */
.nav__brand img {
  width: 44px; height: 44px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgb(255 250 251 / 0.12), 0 4px 14px rgb(0 0 0 / 0.35);
}
.nav__cta {
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 14px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s;
}
.nav__cta:hover { background: rgb(57 178 230 / 0.18); border-color: rgb(57 178 230 / 0.5); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px var(--gutter) 96px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
}

.hero__map { position: absolute; inset: 0; z-index: -3; }
#map { position: absolute; inset: 0; }
.mapboxgl-canvas { outline: none; }
/* Keep Mapbox's required attribution, just quieter */
.mapboxgl-ctrl-bottom-right, .mapboxgl-ctrl-bottom-left { opacity: 0.5; }
.has-intro .mapboxgl-control-container { visibility: hidden; }

/* Darken behind the copy so it always reads over the map */
.hero__scrim {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  transition: opacity 1.2s ease;
  background:
    linear-gradient(90deg, rgb(0 14 29 / 0.85) 0%, rgb(0 14 29 / 0.55) 32%, transparent 55%),
    linear-gradient(0deg, var(--night) 0%, transparent 18%);
}

.hero__snow {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* The copy column never covers the map area it doesn't need */
.hero__content {
  position: relative;
  width: min(46vw, 640px);
  pointer-events: none;
}
.hero__content > * { pointer-events: auto; }

/*
  Headline: the widest line ("ONE WORLD,") is ~7.1em in Archivo 900 at 108% width.
  The size is derived from the copy column so every line always fits:
  font-size = column width / 7.4 (7.1em of text + the line's 0.06em edge padding + slack).
*/
.hero__title {
  margin: 0 0 24px;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 108%;
  text-transform: uppercase;
  --col: min(46vw, 640px);
  font-size: clamp(34px, calc(var(--col) / 7.4), 86px);
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.line { display: block; overflow: hidden; padding: 0.04em 0.06em 0.06em 0; margin-bottom: -0.06em; }
.line__inner { display: block; will-change: transform; white-space: nowrap; }
.accent {
  background: linear-gradient(100deg, var(--snow) 0%, var(--glacier) 45%, var(--summit) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero__lede {
  margin: 0 0 32px;
  max-width: 460px;
  font-size: clamp(16px, 1.35vw, 19px);
  color: var(--text-dim);
}

/* ------------------------------------------------------------
   Map pins + tags (Mapbox markers)
   ------------------------------------------------------------ */
.pin { width: 14px; height: 14px; }
.pin__inner { position: absolute; inset: 0; transition: opacity 0.8s; }
.is-intro-pins .pin__inner,
.is-intro-pins .hero__scrim { opacity: 0; }
.pin__dot {
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: #bfeaff;
  box-shadow: 0 0 6px 2px var(--glacier), 0 0 18px 6px rgb(57 178 230 / 0.55);
}
.pin__dot::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--glacier);
  animation: pin-ring 2.4s ease-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes pin-ring {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

.pin__tag {
  position: absolute; top: 50%; left: calc(100% + 10px);
  transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  font: 500 13px/1.2 var(--body); white-space: nowrap;
  color: var(--text);
  background: rgb(0 14 29 / 0.55);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.35);
  transition: opacity 0.35s;
  pointer-events: none;
}
.pin.is-left .pin__tag { left: auto; right: calc(100% + 10px); }
.pin.is-hidden-tag .pin__tag { opacity: 0; }

/* ------------------------------------------------------------
   Download on the App Store: Apple's own badge art (assets/app-store-badge.svg),
   unaltered. Apple asks for at least 40px tall on screen and clear space of a
   quarter of its height on every side; the margin above keeps that clear.
   ------------------------------------------------------------ */
.store-badge {
  display: inline-block;
  margin: 14px 0 0;
  border-radius: 10px;
  transition: transform 0.3s var(--ease-out), filter 0.3s;
}
.store-badge img { display: block; height: 54px; width: auto; }
.store-badge:hover { transform: translateY(-1px); filter: drop-shadow(0 8px 26px rgb(57 178 230 / 0.45)); }
.store-badge:focus-visible { outline: 2px solid var(--glacier); outline-offset: 4px; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 24px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-dim);
  pointer-events: none;
}
.hero__scroll i {
  width: 1px; height: 40px;
  background: linear-gradient(var(--glacier), transparent);
  animation: drip 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes drip {
  0%   { transform: scaleY(0); opacity: 1; }
  60%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ============================================================
   Final CTA: compact, centred, the same App Store badge as the hero
   ============================================================ */
.final {
  position: relative;
  padding: clamp(72px, 10vw, 120px) var(--gutter);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
}
.final:focus { outline: none; } /* focus target for the tour's Skip link */
/* A glacier glow rising from below, echoing the globe's halo */
.final::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; bottom: 0;
  width: min(1100px, 140vw); aspect-ratio: 2 / 1;
  transform: translate(-50%, 55%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(57 178 230 / 0.28), rgb(0 63 131 / 0.16) 55%, transparent);
}
.final__inner { max-width: 720px; margin: 0 auto; }
.final__title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 900; font-stretch: 108%;
  text-transform: uppercase;
  font-size: clamp(32px, 5.2vw, 64px);
  line-height: 0.95; letter-spacing: -0.02em;
  text-wrap: balance;
}
.final__lede { margin: 0 auto 28px; max-width: 440px; font-size: clamp(16px, 1.35vw, 18px); color: var(--text-dim); }
.final .store-badge { margin: 0; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  padding: 56px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--glass-line);
  background: linear-gradient(#001a36, var(--night));
}
.footer__inner { max-width: 1200px; margin: 0 auto; }
.footer a:focus-visible { outline: 2px solid var(--glacier); outline-offset: 3px; border-radius: 6px; }

.footer__top {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--glass-line);
}
.footer__brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.footer__brand img {
  width: 40px; height: 40px; border-radius: 9px;
  box-shadow: 0 0 0 1px rgb(255 250 251 / 0.12), 0 4px 14px rgb(0 0 0 / 0.35);
}
.footer__brand b {
  display: block;
  font: 900 18px/1.1 var(--display); font-stretch: 110%;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.footer__brand em { display: block; font-style: normal; font-size: 13px; color: var(--text-dim); }

.footer__social { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.footer__social a {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}
.footer__social a:hover {
  background: rgb(57 178 230 / 0.18); border-color: rgb(57 178 230 / 0.5);
  transform: translateY(-2px);
}
.footer__social a:focus-visible { border-radius: 50%; }
.footer__social svg { width: 18px; height: 18px; fill: currentColor; }
.footer__social svg.is-stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.footer__social svg.is-stroke .dot { fill: currentColor; stroke: none; }

.footer__bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px;
  padding-top: 24px;
  font-size: 14px; color: var(--text-dim);
}
.footer__email {
  color: var(--text); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgb(57 178 230 / 0.5);
  transition: color 0.3s, border-color 0.3s;
}
.footer__email:hover { color: var(--glacier); border-color: var(--glacier); }
.footer__legal { display: flex; gap: 20px; }
.footer__legal a { color: var(--text-dim); text-decoration: none; transition: color 0.3s; }
.footer__legal a:hover { color: var(--text); }
.footer__copy { margin: 0 0 0 auto; }
.footer__credit { margin: 20px 0 0; font-size: 11px; color: rgb(255 250 251 / 0.35); }

@media (max-width: 600px) {
  .footer { padding-top: 44px; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer__copy { margin: 0; }
}

/* ============================================================
   Phone / narrow: globe on top, copy underneath
   ============================================================ */
@media (max-width: 860px) {
  .hero {
    align-items: flex-end;
    padding-top: 96px;
    padding-bottom: 36px;
  }
  .hero__scrim {
    background: linear-gradient(180deg, transparent 38%, rgb(0 14 29 / 0.8) 55%, var(--night) 75%);
  }
  .hero__content { width: 100%; }
  .nav__brand img { height: 38px; }
  .hero__title { --col: calc(100vw - 2 * var(--gutter)); font-size: clamp(30px, calc(var(--col) / 7.4), 86px); margin-bottom: 18px; }
  .hero__lede { margin-bottom: 24px; }
  .pin__tag { font-size: 11px; padding: 5px 10px; }
  .hero__scroll { display: none; }
}

@media (max-width: 420px) {
  .nav__cta { padding: 8px 12px; font-size: 13px; }
}

/* ============================================================
   Reduced motion: keep everything visible and still
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .grain,
  .pin__dot::after,
  .hero__scroll i { animation: none; }
}
