/* ==========================================================================
   Where/When — Refined Design System
   Colors derived from app icon: lime green, orange, dark charcoal
   Typography: Instrument Serif + Manrope, with mono reserved for metadata
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* The site has a single dark theme; tell the browser so scrollbars and
     form controls match it. */
  color-scheme: dark;

  /* Typography */
  --font-display: 'Instrument Serif', 'Iowan Old Style', 'Baskerville', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Colors — from app icon */
  --color-lime: #C8E619;
  --color-lime-dark: #a8c214;
  --color-orange: #FF6B00;
  --color-orange-glow: rgba(255, 107, 0, 0.4);
  --color-charcoal: #3C3C3C;
  --color-dark: #0a0f1a;

  --color-text-light: #fbfaf3;
  --color-text-muted: rgba(235, 241, 239, 0.68);
  --color-text-subtle: rgba(235, 241, 239, 0.5);
  --color-text-dark: #1a1a1a;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--color-text-light);
  background-color: var(--color-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- Map Background ---------- */
#map {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  max-width: 1000px;
  width: 100%;
  text-align: center;
}

.hero__content {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(200, 230, 25, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(7, 39, 38, 0.82), rgba(15, 24, 48, 0.88));
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  backdrop-filter: blur(28px) saturate(125%);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 32px 28px;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero__app-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 19px;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 32px rgba(200, 230, 25, 0.1);
}

.hero__phone {
  flex-shrink: 0;
}

/* ---------- Typography ---------- */
.hero__eyebrow {
  margin-bottom: 10px;
  color: rgba(235, 241, 239, 0.72);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Each item wraps as a unit, so a narrow screen never strands one word. */
.hero__eyebrow-item {
  white-space: nowrap;
}

.hero__eyebrow-separator {
  display: inline-block;
  margin: 0 0.45em;
  color: var(--color-lime);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 6.4vw, 5.25rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.94;
  margin-bottom: 22px;
  color: var(--color-text-light);
  text-wrap: balance;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.24);
}

.hero__tagline {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: -0.012em;
  line-height: 1.65;
  margin-bottom: 28px;
  margin-inline: auto;
  max-width: 460px;
}

/* Emphasis uses weight and color only; underlines are reserved for links. */
.hero__tagline strong {
  color: var(--color-text-light);
  font-weight: 600;
}

.hero__requirements {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ---------- Feature Chips ---------- */
.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.065em;
  line-height: 1.2;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(245, 247, 243, 0.76);
  background: rgba(255, 255, 255, 0.055);
  white-space: nowrap;
  text-transform: uppercase;
}

.chip::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color-lime);
  box-shadow: 0 0 10px rgba(200, 230, 25, 0.5);
  content: '';
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.045em;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  text-decoration: none;
  line-height: 1.5;
}

.btn:focus-visible {
  outline: 3px solid var(--color-lime);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--color-lime);
  color: var(--color-text-dark);
  border-color: var(--color-lime);
}

.btn--primary:hover {
  background-color: var(--color-lime-dark);
  border-color: var(--color-lime-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 230, 25, 0.35);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text-light);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn--secondary:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
  background-color: rgba(255, 107, 0, 0.08);
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Hero Links (Privacy / Terms) ---------- */
.hero__links {
  display: flex;
  gap: var(--space-4);
  margin-top: 22px;
  justify-content: center;
}

.hero__links a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  transition: color var(--transition);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.hero__links a:hover {
  color: var(--color-orange);
}

.hero__links a:focus-visible {
  outline: 2px solid var(--color-lime);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Phone Mockup ---------- */
.phone-mockup {
  width: 220px;
  margin: 0 auto;
}

.phone-mockup__frame {
  position: relative;
  border-radius: 40px;
  background: #2a2a3e;
  padding: 10px;
  border: 2px solid rgba(200, 230, 25, 0.25);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(200, 230, 25, 0.12);
}

.phone-mockup__frame::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 22px;
  background: #000;
  border-radius: 11px;
  z-index: 2;
}

.phone-mockup__screen {
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 393 / 852;
}

.phone-mockup__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Product Story ---------- */
.feature-story {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-4) 96px;
}

.feature-story__panel {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 40px var(--space-4) var(--space-6);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(10, 15, 26, 0.78);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  backdrop-filter: blur(28px) saturate(125%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.feature-story__header {
  width: min(680px, 100%);
  margin: 0 auto 40px;
  text-align: center;
}

.feature-story__eyebrow {
  margin-bottom: var(--space-3);
  color: var(--color-lime);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feature-story__header h2 {
  margin-bottom: var(--space-3);
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;
}

.feature-story__header > p:last-child {
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.65;
}

.feature-story__grid {
  display: grid;
  gap: var(--space-4);
}

.feature-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.feature-card__copy {
  min-height: 176px;
  padding: var(--space-6);
}

.feature-card__step {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--color-orange);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.feature-card h3 {
  margin-bottom: var(--space-2);
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-size: 1.35rem;
  line-height: 1.2;
}

.feature-card p {
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.55;
}

.feature-card__media {
  display: block;
  width: calc(100% - 24px);
  max-height: 560px;
  margin: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
}

.feature-card__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
}

/* ---------- Legal Pages ---------- */
.legal {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 64px var(--space-6) var(--space-8);
}

.legal__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.legal__brand {
  display: inline-block;
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.legal__brand:hover,
.legal__brand:focus-visible {
  color: var(--color-lime);
}

.legal__brand:focus-visible,
.legal__body a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--color-lime);
  outline-offset: 2px;
}

.legal__header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--color-text-light);
}

.legal__body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  text-align: left;
}

.legal__body p {
  margin-bottom: var(--space-4);
}

.legal__body strong {
  color: var(--color-text-light);
  font-weight: 600;
}

.legal__body h2 {
  margin: var(--space-8) 0 var(--space-3);
  color: var(--color-text-light);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.legal__body ul {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.legal__body li {
  margin-bottom: var(--space-2);
}

/* Links are underlined so they don't rely on color alone. */
.legal__body a {
  color: var(--color-lime);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition);
}

.legal__body a:hover {
  color: var(--color-orange);
}

.legal__footer {
  text-align: center;
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.legal__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
}

.legal__nav a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition);
}

.legal__nav a:hover {
  color: var(--color-lime);
}

.legal__nav a[aria-current="page"] {
  color: var(--color-text-light);
  text-decoration: none;
}

.legal__nav a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--color-lime);
  outline-offset: 2px;
}

/* ---------- Error Page ---------- */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-6);
  text-align: center;
}

.error-page__content {
  max-width: 560px;
  padding: 48px var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(10, 15, 26, 0.8);
}

.error-page__code {
  margin-bottom: var(--space-3);
  color: var(--color-lime);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.error-page h1 {
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.035em;
  font-size: clamp(2rem, 8vw, 4rem);
}

.error-page p:not(.error-page__code) {
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
  font-size: 1.125rem;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
/* Below this width the two eyebrow items no longer fit on one line. */
@media (max-width: 479px) {
  .hero__eyebrow-item {
    display: block;
  }

  .hero__eyebrow-separator {
    display: none;
  }
}

@media (min-width: 768px) {
  .hero__inner {
    flex-direction: row;
    text-align: left;
    gap: 48px;
  }

  .hero__tagline {
    margin-inline: 0;
  }

  .hero__app-icon {
    margin-left: 0;
  }

  .hero__content {
    padding: 40px;
  }

  .hero__chips {
    justify-content: flex-start;
  }

  .btn-group {
    justify-content: flex-start;
  }

  .hero__links {
    justify-content: flex-start;
  }

  .phone-mockup {
    width: 260px;
  }

  .feature-story__panel {
    padding: 56px var(--space-6) var(--space-6);
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    gap: 80px;
  }

  .phone-mockup {
    width: 300px;
  }

  .feature-story__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
