/* Friendbe marketing + legal pages. One theme system, light/dark via tokens.
   Radius rule: cards 18px, buttons pill, images 22px. Accent: ember, locked. */

:root {
  --canvas: #f8f4ec;
  --surface: #fffdf8;
  --surface-2: #f1ead9;
  --ink: #26221b;
  --ink-2: #6d665a;
  --ink-3: #9a9284;
  --ember: #e4572e;
  --ember-deep: #c94a24;
  --ember-grad: linear-gradient(120deg, #e4572e, #f0924a);
  --teal: #2b7a72;
  --hairline: rgba(38, 34, 27, 0.12);
  --radius-card: 18px;
  --radius-img: 22px;
  --shadow: 0 18px 50px rgba(120, 84, 40, 0.13);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #17130e;
    --surface: #201b14;
    --surface-2: #2a231a;
    --ink: #f2ece1;
    --ink-2: #b0a795;
    --ink-3: #7d7566;
    --ember: #f0703f;
    --ember-deep: #f58a55;
    --teal: #4fb3a9;
    --hairline: rgba(242, 236, 225, 0.14);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */

header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px;
}

.brand-mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--ember-grad); display: inline-block;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-block; border-radius: 999px; text-decoration: none;
  font-weight: 700; letter-spacing: -0.01em;
  padding: 13px 26px; font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--ember-grad); color: #fff; box-shadow: 0 8px 24px rgba(228, 87, 46, 0.32); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(228, 87, 46, 0.42); }
.btn-quiet { color: var(--ember-deep); padding: 13px 10px; }
.nav .btn { padding: 10px 20px; font-size: 0.92rem; }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 40px; }

.hero-grid {
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: 56px; align-items: center;
}

h1 {
  font-size: clamp(2.5rem, 5.2vw, 3.9rem);
  line-height: 1.04; letter-spacing: -0.03em; font-weight: 800;
}

h1 .accent {
  background: var(--ember-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero p.lede {
  margin-top: 20px; font-size: 1.16rem; color: var(--ink-2); max-width: 34ch;
}

.hero-ctas { margin-top: 32px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.phone {
  justify-self: center;
  width: min(340px, 82vw);
  border-radius: 40px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow);
  transform: rotate(1.6deg);
}
.phone img { width: 100%; display: block; border-radius: 30px; }

/* Entrances use fill-mode backwards so content is ALWAYS visible if animations
   never run (static renderers, reader modes); the from-state only exists
   during the animation itself. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
  .hero .phone { animation: rise-phone 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
  }
  @keyframes rise-phone {
    from { opacity: 0; transform: translateY(26px) rotate(3deg); }
  }
}

/* ---------- Sections ---------- */

section { padding: 88px 0; }

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  letter-spacing: -0.025em; line-height: 1.12; font-weight: 800;
  max-width: 22ch;
}

.section-body { margin-top: 14px; color: var(--ink-2); max-width: 58ch; font-size: 1.05rem; }

/* Steps: numbered flow, single column, big numerals */
.steps { margin-top: 44px; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 96px 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--hairline);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--hairline); }
.step-num {
  font-size: 3rem; font-weight: 800; letter-spacing: -0.04em;
  color: var(--ember); line-height: 1;
}
.step h3 { font-size: 1.25rem; letter-spacing: -0.015em; margin-bottom: 6px; }
.step p { color: var(--ink-2); max-width: 52ch; }

/* Split feature */
.split {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center;
}
.split.flip { grid-template-columns: 1.1fr 0.9fr; }
.split .phone { transform: rotate(-1.4deg); animation: none; opacity: 1; }

.feature-list { margin-top: 26px; display: grid; gap: 18px; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.feature-list .tick {
  width: 22px; height: 22px; border-radius: 50%; margin-top: 3px;
  background: color-mix(in srgb, var(--teal) 16%, transparent);
  color: var(--teal); font-size: 0.8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.feature-list b { display: block; letter-spacing: -0.01em; }
.feature-list span.d { color: var(--ink-2); font-size: 0.97rem; }

/* Safety band: same theme family, tinted surface */
.band { background: var(--surface-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.band ul { margin-top: 22px; display: grid; gap: 14px; list-style: none; color: var(--ink-2); }
.band ul b { color: var(--ink); }

/* CTA close */
.close { text-align: left; }
.close .card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-card); padding: 52px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center;
  box-shadow: var(--shadow);
}
.close .card p { color: var(--ink-2); margin-top: 12px; max-width: 44ch; }
.close .card .btn { justify-self: start; }

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 44px 0 56px; color: var(--ink-2); font-size: 0.95rem;
}
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 24px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- Legal / prose pages ---------- */

.prose { max-width: 720px; margin: 0 auto; padding: 64px 24px 96px; }
.prose h1 { font-size: 2.2rem; margin-bottom: 8px; }
.prose .meta { color: var(--ink-3); margin-bottom: 40px; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; max-width: none; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 22px; margin: 12px 0; }
.prose li { margin: 8px 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--ember-deep); }

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
  .hero { padding: 44px 0 24px; }
  .hero-grid, .split, .split.flip, .band-grid, .close .card { grid-template-columns: 1fr; gap: 36px; }
  .split .phone { order: -1; }
  section { padding: 60px 0; }
  .step { grid-template-columns: 56px 1fr; gap: 16px; }
  .step-num { font-size: 2.1rem; }
  .nav-links a.hide-m { display: none; }
  .close .card { padding: 32px; }
}
