/* Fingerpost landing — design tokens pulled from the app's Theme.swift
   (coral/teal "day" palette, Fredoka display + Figtree body). */
:root {
  --accent: #FF5A3C;      /* coral — primary action */
  --accent-ink: #E5462B;
  --teal: #1FB6C9;
  --sun: #FFC23C;
  --wood: #A9714B;
  --good: #2EAD6B;

  --ink: #20242B;
  --ink-2: #3D434D;
  --muted: #6B7280;
  --panel: #FFFFFF;
  --cream: #FFFDF6;

  --stop-1: #FFE9C7;      /* the app's 3-stop "stage" wash */
  --stop-2: #FFD9D0;
  --stop-3: #CFEFF2;

  --radius-card: 26px;
  --radius-lg: 34px;
  --shadow-card: 0 18px 36px -18px rgba(30, 20, 50, .28);
  --shadow-soft: 0 10px 24px -16px rgba(30, 20, 50, .30);
  --maxw: 1400px;

  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(255, 194, 60, .28), transparent 60%),
    linear-gradient(150deg, var(--stop-1) 0%, var(--stop-2) 48%, var(--stop-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }

a { color: inherit; }

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

/* ─── Buttons & badges ─── */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: .6rem 1.15rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-ghost {
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(20, 20, 30, .08);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-1px); background: #fff; box-shadow: var(--shadow-soft); }

.badge-link { display: inline-block; transition: transform .15s ease, filter .15s ease; }
.badge-link:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .25)); }
.badge-link img { height: auto; }

/* ─── Top bar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem clamp(1rem, 4vw, 2rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(255, 248, 235, .85), rgba(255, 248, 235, 0));
  backdrop-filter: blur(6px);
  -webkit-mask: linear-gradient(to bottom, #000 55%, transparent);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand-mark { border-radius: 9px; box-shadow: var(--shadow-soft); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }

/* ─── Layout ─── */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

section { padding: clamp(3rem, 8vw, 6rem) 0; }

.section-head { text-align: center; max-width: 36rem; margin: 0 auto clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: .6rem 0 0; }

/* ─── Hero ─── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  color: var(--accent-ink);
  margin: 0 0 1rem;
}
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); font-weight: 700; }
.hero .lede {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-2);
  margin: 1.2rem 0 1.8rem;
  max-width: 30rem;
}
.cta-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cta-note { color: var(--muted); font-size: .95rem; font-weight: 500; }

/* ─── Phone frame ─── */
.phone {
  margin: 0;
  width: 100%;
  max-width: 300px;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(150deg, #2b2f37, #14161b);
  box-shadow: var(--shadow-card), 0 2px 4px rgba(0, 0, 0, .3);
}
.phone img { width: 100%; border-radius: 34px; display: block; }
.hero-shot { display: flex; justify-content: center; }
.hero-shot .phone { max-width: 320px; transform: rotate(2deg); }

/* ─── The idea ─── */
.idea-grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.steps li {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--panel);
  border-radius: var(--radius-card);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.step-no {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 90, 60, .12);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
.steps h3 { font-size: 1.2rem; margin-bottom: .25rem; }
.steps p { margin: 0; color: var(--muted); }
.idea-shot { display: flex; justify-content: center; }

/* ─── Features ─── */
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.feature {
  background: var(--panel);
  border-radius: var(--radius-card);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -20px rgba(30, 20, 50, .35); }
.f-ico {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid rgba(20, 20, 30, .05);
  margin-bottom: .9rem;
}
.feature h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.feature p { margin: 0; color: var(--muted); }

/* ─── Gallery ─── */
/* full-bleed so the phone row uses the whole viewport width and never clips */
.gallery {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.shots-row {
  display: flex;
  gap: clamp(1rem, 3vw, 1.8rem);
  overflow-x: auto;
  /* `safe center` centers the phones when they fit, and falls back to
     scrollable start-alignment when they overflow (no clipped first item) */
  justify-content: safe center;
  padding: .5rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots-row .phone { flex: 0 0 auto; max-width: 250px; scroll-snap-align: center; }

/* ─── Closing CTA ─── */
.closer {
  text-align: center;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: clamp(3rem, 8vw, 5rem);
}
.closer-mark { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 1.2rem; box-shadow: var(--shadow-soft); }
.closer h2 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); max-width: 18ch; margin: 0 auto; }
.closer p { font-family: var(--font-display); font-weight: 600; color: var(--accent-ink); font-size: 1.3rem; margin: .6rem 0 1.8rem; }
.closer .badge-link { display: inline-block; }

/* ─── Footer ─── */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  border-top: 1px solid rgba(20, 20, 30, .08);
}
.foot-brand { display: flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 700; }
.foot-brand img { border-radius: 7px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-left: auto; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.foot-links a:hover { color: var(--accent-ink); }
.foot-fine { width: 100%; color: var(--muted); font-size: .85rem; margin: .5rem 0 0; }

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-copy { order: 1; }
  .hero-shot { order: 2; }
  .idea-grid { grid-template-columns: 1fr; }
  .idea-shot { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.1rem; }
  .foot-links { margin-left: 0; width: 100%; }
  .hero-shot .phone { transform: none; }
}

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

/* ════════════════════════════════════════════════
   Inner pages — Privacy / Terms / Support
   ════════════════════════════════════════════════ */
.page-hero { text-align: center; padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-hero .eyebrow { margin-bottom: .6rem; }
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 700; }
.page-hero .sub { color: var(--ink-2); font-size: clamp(1.02rem, 2.4vw, 1.2rem); max-width: 40rem; margin: 1rem auto 0; }
.updated { color: var(--muted); font-size: .9rem; font-weight: 500; margin-top: 1rem; }

/* Article layout with optional sticky table of contents */
.article { padding-top: 1rem; }
/* keep legal/support text at a comfortable reading width even on the wide layout */
.article-grid { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; max-width: 1040px; margin: 0 auto; }
.toc {
  position: sticky;
  top: 84px;
  background: var(--panel);
  border-radius: var(--radius-card);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-card);
}
.toc h4 {
  font-family: var(--font-display);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 .7rem;
}
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: .3rem 0; font-size: .95rem; }
.toc a:hover, .toc a.active { color: var(--accent-ink); }

.prose {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 5vw, 3rem);
  box-shadow: var(--shadow-card);
}
.prose section + section { margin-top: 2.2rem; }
.prose h2 { font-size: 1.5rem; margin-bottom: .6rem; scroll-margin-top: 84px; }
.prose h3 { font-size: 1.12rem; margin: 1.3rem 0 .4rem; }
.prose p { color: var(--ink-2); margin: .5rem 0; }
.prose ul { color: var(--ink-2); padding-left: 1.2rem; margin: .6rem 0; }
.prose li { margin: .35rem 0; }
.prose a.inline { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid rgba(255, 90, 60, .35); }
.prose a.inline:hover { border-bottom-color: var(--accent-ink); }

/* Support page */
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  max-width: 1040px;
}
.help-card { background: var(--panel); border-radius: var(--radius-card); padding: 1.6rem; box-shadow: var(--shadow-card); }
.help-card .h-ic {
  width: 3rem; height: 3rem; display: grid; place-items: center;
  border-radius: 16px; background: rgba(255, 90, 60, .12); color: var(--accent-ink); margin-bottom: .9rem;
}
.help-card .h-ic svg { width: 22px; height: 22px; stroke: currentColor; }
.help-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.help-card p { color: var(--muted); margin: 0; }

.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: linear-gradient(135deg, var(--accent), #ff7a52);
  color: #fff; border-radius: var(--radius-lg); padding: clamp(1.8rem, 5vw, 2.8rem);
  box-shadow: var(--shadow-card); margin: 0 auto clamp(2rem, 5vw, 3rem); max-width: 1040px;
}
.contact-card h2 { color: #fff; font-size: 1.6rem; }
.contact-card p { margin: .5rem 0 0; opacity: .95; max-width: 34rem; }
.contact-card .email { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.contact-card .email a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .5); text-decoration: none; }
.contact-card .btn-light {
  background: #fff; color: var(--accent-ink); border-radius: 999px;
  padding: .8rem 1.4rem; font-family: var(--font-display); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.contact-card .btn-light:hover { transform: translateY(-1px); }

.faq { display: grid; gap: .8rem; max-width: 48rem; margin: 0 auto; }
.faq details {
  background: var(--panel); border-radius: var(--radius-card); padding: 0 1.4rem; box-shadow: var(--shadow-card); overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer; font-family: var(--font-display); font-weight: 600;
  padding: 1.1rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent-ink); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { color: var(--ink-2); padding: 0 0 1.2rem; margin-top: -.2rem; }

@media (max-width: 760px) {
  .article-grid { grid-template-columns: 1fr; }
  .toc { display: none; }
  .help-grid { grid-template-columns: 1fr; }
}
