/* =========================================================
   UltraPlanRun marketing site
   Visual language mirrors the iOS app:
     - Navy gradient on hero + feature accent panels
       (Color(red: 0.12, green: 0.16, blue: 0.38) → 0.06, 0.09, 0.22)
     - Light grey/white surface for body content
       (matches iOS's .systemGroupedBackground)
     - Blue accent (Apple SF default tint) for CTAs
     - Orange highlight for drop-bag callouts
     - SF-style system fonts via -apple-system stack
   ========================================================= */

:root {
  --navy-1: #1f2a61;
  --navy-2: #0f1738;
  --navy-3: #060a1a;
  --ink: #0c1326;
  --ink-soft: #1c2540;
  --surface: #f2f2f7;
  --surface-elev: #ffffff;
  --line: #e3e4ea;
  --muted: #6b7290;
  --accent: #0a84ff;          /* iOS systemBlue */
  --accent-hover: #006fdb;
  --orange: #ff8a3d;           /* drop-bag tint */
  --green: #34c759;
  --shadow-card: 0 10px 30px rgba(15, 23, 56, 0.10);
  --radius-card: 18px;
  --radius-pill: 999px;
  --max-w: 1140px;
  --gap-section: clamp(60px, 8vw, 110px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms ease;
}
a:hover, a:focus-visible { color: var(--accent-hover); }

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; }
h3 { font-size: 1.2rem; line-height: 1.25; }

p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 36px);
}

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 242, 247, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(15, 23, 56, 0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 56, 0.15);
}
.brand-name span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 10px;
}
.nav-links a:hover { background: rgba(15, 23, 56, 0.05); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(10, 132, 255, 0.20), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(255, 138, 61, 0.10), transparent 60%),
    linear-gradient(135deg, var(--navy-1) 0%, var(--navy-2) 60%, var(--navy-3) 100%);
  color: #fff;
  padding: clamp(60px, 9vw, 110px) 0 clamp(70px, 10vw, 130px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.hero h1 { color: #fff; }
.hero h1 .accent { color: #ffb375; }
.hero .lead {
  color: rgba(255, 255, 255, 0.75);
  max-width: 540px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 30px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease;
  text-align: center;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--accent-hover);
  color: #fff;
}
.btn-primary[aria-disabled="true"] {
  background: rgba(10, 132, 255, 0.4);
  cursor: not-allowed;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.20);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* App Store coming-soon pill */
.appstore-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.appstore-soon strong {
  font-weight: 700;
  font-size: 1rem;
  display: block;
  letter-spacing: -0.01em;
}
.appstore-soon .apple-icon {
  font-size: 1.7rem;
  line-height: 1;
}

/* Hero phone preview */
.hero-phone {
  position: relative;
  width: clamp(220px, 32vw, 320px);
  margin-inline: auto;
}
.hero-phone img {
  border-radius: 38px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.40),
    0 10px 20px rgba(0, 0, 0, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.hero-phone::before {
  content: "";
  position: absolute;
  inset: -30px -50px;
  background: radial-gradient(closest-side, rgba(10, 132, 255, 0.25), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.hero-phone img { position: relative; z-index: 1; }

/* ---------- Stats strip ---------- */
.stats {
  background: var(--surface-elev);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.stat-num {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.84rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ---------- Section base ---------- */
.section {
  padding: var(--gap-section) 0;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Feature row ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  margin-bottom: clamp(60px, 8vw, 100px);
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feature-copy h2 { margin-bottom: 16px; }
.feature-copy p { color: var(--ink-soft); }
.feature-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.feature-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--ink);
}
.feature-list li:first-child { border-top: 0; }
.feature-list .dot {
  flex: none;
  margin-top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.feature-list .dot.orange { background: var(--orange); }
.feature-list .dot.green { background: var(--green); }

.phone {
  display: block;
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  border-radius: 38px;
  box-shadow: var(--shadow-card);
  background: #fff;
  padding: 0;
  overflow: hidden;
}

/* ---------- Feature cards grid ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card h3 { margin: 0; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 8px;
}
.card-icon.blue { background: var(--accent); }
.card-icon.orange { background: var(--orange); }
.card-icon.green { background: var(--green); }
.card-icon.navy { background: var(--ink); }
.card-icon.purple { background: #af52de; }
.card-icon.cyan { background: #32ade6; }

/* ---------- Gallery (screenshot carousel) ---------- */
.gallery-section {
  background:
    radial-gradient(700px 350px at 100% 100%, rgba(10, 132, 255, 0.15), transparent 60%),
    radial-gradient(500px 300px at 0% 0%, rgba(255, 138, 61, 0.08), transparent 60%),
    linear-gradient(180deg, var(--navy-1) 0%, var(--navy-2) 100%);
  color: #fff;
}
.gallery-section .section-head h2 { color: #fff; }
.gallery-section .section-head p { color: rgba(255, 255, 255, 0.7); }
.gallery-section .section-eyebrow { color: #ffb375; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.gallery figure {
  margin: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 200ms ease;
}
.gallery figure:hover { transform: translateY(-3px); }
.gallery img {
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.gallery figcaption {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  font-weight: 500;
}

/* ---------- Sample PDFs ---------- */
.pdfs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.pdf-card {
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.pdf-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: rgba(10, 132, 255, 0.35);
}
.pdf-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff6b3d 0%, #ff8a3d 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(255, 110, 60, 0.30);
}
.pdf-card h3 {
  margin: 6px 0 0;
  font-size: 1.05rem;
}
.pdf-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  flex: 1;
}
.pdf-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.pdf-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.pdf-actions .btn {
  font-size: 0.88rem;
  padding: 10px 14px;
  flex: 1;
}
.pdf-actions .btn-secondary {
  background: rgba(10, 132, 255, 0.08);
  color: var(--accent);
  border-color: transparent;
}
.pdf-actions .btn-secondary:hover {
  background: rgba(10, 132, 255, 0.15);
}
.pdfs-note {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 880px) {
  .pdfs { grid-template-columns: 1fr; }
}

/* ---------- Privacy callout ---------- */
.privacy-cta {
  background: var(--surface-elev);
}
.privacy-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #f7faff 0%, #eef3ff 100%);
  border: 1px solid #d8e2f6;
}
.privacy-card .lock {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}
.privacy-card h3 { margin: 0 0 4px; }
.privacy-card p { margin: 0; color: var(--ink-soft); }

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  background:
    radial-gradient(800px 400px at 50% 110%, rgba(10, 132, 255, 0.25), transparent 60%),
    linear-gradient(135deg, var(--navy-1) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: clamp(70px, 10vw, 120px) 0;
}
.final-cta h2 { color: #fff; max-width: 740px; margin-inline: auto; }
.final-cta p { color: rgba(255, 255, 255, 0.75); max-width: 600px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 50px 0 36px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}
.footer .brand { color: #fff; margin-bottom: 10px; }
.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  padding: 4px 0;
}
.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.50);
}

/* ---------- Privacy page ---------- */
.doc-page {
  background: var(--surface);
  padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 110px);
}
.doc-container {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 36px);
}
.doc-page h1 {
  margin-bottom: 12px;
}
.doc-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 36px;
}
.doc-page article {
  background: var(--surface-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(24px, 4vw, 44px);
}
.doc-page article h2 {
  margin-top: 1.6em;
  font-size: 1.4rem;
}
.doc-page article h2:first-child { margin-top: 0; }
.doc-page article h3 {
  margin-top: 1.4em;
  font-size: 1.08rem;
}
.doc-page article ul {
  margin: 0 0 1em;
  padding-left: 1.3em;
}
.doc-page article li { margin-bottom: 6px; }
.doc-page article p, .doc-page article li {
  color: var(--ink-soft);
}
.doc-page article strong { color: var(--ink); }

.callout {
  border-left: 4px solid var(--accent);
  background: #f1f7ff;
  padding: 16px 18px;
  margin: 1.2em 0;
  border-radius: 10px;
  color: var(--ink-soft);
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-badges { justify-content: center; }
  .cta-row { justify-content: center; }
  .hero-phone { margin-top: 12px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .feature-row, .feature-row.reverse { direction: ltr; grid-template-columns: 1fr; }
  .feature-row .feature-copy { order: 1; text-align: center; }
  .feature-row .feature-phone { order: 0; }
  .feature-list li { text-align: left; }

  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img { border-radius: 12px; }

  .privacy-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .privacy-card .lock { margin-inline: auto; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }

  .nav-links a:not(.btn) { display: none; }
  .nav-links a.btn { padding: 8px 14px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  h1 { font-size: 2rem; }
  .btn { padding: 12px 18px; font-size: 0.95rem; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
