/* ==========================================================================
   Astray — marketing site stylesheet
   Dark-mode-first, matches the app's real palette.
   ========================================================================== */

:root {
  /* surfaces */
  --bg: #14161b;
  --bg-2: #171a20;
  --card: #1f232b;
  --card-2: #232836;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  /* text */
  --text: #f5f2ec;
  --muted: #9aa0ab;
  --faint: #6b717c;

  /* accents */
  --accent: #e8823b;      /* arrival orange, brightened for dark bg */
  --accent-deep: #d96b0d; /* app's arrival accent */
  --yellow: #f2c94c;      /* deviation / wrong-turn */
  --gold: #f2b840;        /* pro */
  --green: #3cca96;       /* success / user marker */
  --blue: #5aa7e0;        /* route */

  --gradient: linear-gradient(135deg, #ffc377 0%, #ffa36e 48%, #e8823b 100%);
  --gradient-soft: linear-gradient(180deg, rgba(255, 195, 119, 0.16), rgba(232, 130, 59, 0.05));

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  color: #14161b;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gradient); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* App Store style pill */
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--card);
}
.appstore-btn:hover { border-color: var(--accent); text-decoration: none; }
.appstore-btn .apple-logo { font-size: 1.5rem; line-height: 1; }
.appstore-btn .label { display: block; font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.appstore-btn .name { display: block; font-size: 1.12rem; font-weight: 600; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 22, 27, 0.8);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 0.94rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav-links a.active { color: var(--text); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 120%;
  background:
    radial-gradient(60% 55% at 20% 20%, rgba(232, 130, 59, 0.22), transparent 70%),
    radial-gradient(50% 50% at 82% 8%, rgba(242, 201, 76, 0.12), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero h1 .grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 0.82rem; color: var(--faint); }

/* --------------------------------------------------------------------------
   Phone mockup
   -------------------------------------------------------------------------- */
.phone {
  position: relative;
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
  background: #000;
  border-radius: 44px;
  border: 1px solid var(--border-strong);
  padding: 11px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 8px rgba(255, 255, 255, 0.03);
}
.phone-screen {
  position: relative;
  aspect-ratio: 9 / 19.2;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
/* Every phone on the site now holds a real device screenshot. Those carry real
   iOS type sizes, not the oversized type the old SVG mockups were drawn with, so
   they need a wider frame for their small text to stay legible. */
.phone--shot { width: 340px; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 620px; margin: 0 auto 52px; text-align: center; }
.section-head .kicker {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head p { color: var(--muted); }

/* Feature rows (alternating) */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 72px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-media { order: 2; }
.feature-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.tag-free { color: var(--green); background: rgba(60, 202, 150, 0.12); }
.tag-pro { color: var(--gold); background: rgba(242, 184, 64, 0.12); }
.feature-row h3 { font-size: 1.5rem; }
.feature-row p { color: var(--muted); }

/* Feature card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 16px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
}
.card h4 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  text-align: center;
  padding: 84px 0;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 0 auto 30px; }
.cta-band .hero-actions { justify-content: center; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 36ch; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); padding: 4px 0; font-size: 0.92rem; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--muted); }

/* --------------------------------------------------------------------------
   Legal / interior pages
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  background: var(--gradient-soft);
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { color: var(--muted); max-width: 60ch; }
.prose { max-width: 760px; margin: 0 auto; padding: 56px 0 88px; }
.prose h2 { font-size: 1.45rem; margin: 2.2em 0 0.6em; }
.prose h3 { margin: 1.6em 0 0.5em; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--text); }
.prose .updated {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--faint);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 32px;
}

/* Contact page */
.contact-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}
.contact-email {
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  word-break: break-all;
}
.contact-email:hover { color: var(--accent); text-decoration: none; }
.copy-btn {
  margin-top: 18px;
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.88rem;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.contact-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid, .feature-row { grid-template-columns: 1fr; gap: 40px; }
  .feature-row.reverse .feature-media { order: 0; }
  .hero { padding: 56px 0 56px; text-align: center; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section, .cta-band { padding: 64px 0; }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    gap: 2px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav .btn { margin-left: auto; }
  .nav-toggle {
    display: block;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
  }
  .phone, .phone--shot { width: 260px; }
}
