/* Familicity marketing site.
   Hand-written CSS, no build step, no external requests. Light palette on
   :root, dark overrides in one place at the bottom of the token block. */

:root {
  --bg:        #fdfaf7;
  --bg-alt:    #f6efe8;
  --surface:   #ffffff;
  --ink:       #1d1714;
  --ink-soft:  #5c514b;
  --line:      #e7dbd1;

  --brand:     #e2542c;
  --brand-ink: #ffffff;
  --brand-dim: #fbe7df;
  --accent:    #1f8a7a;
  --amber:     #e39a12;

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(29, 23, 20, .05), 0 12px 32px -12px rgba(29, 23, 20, .18);
  --wrap:      1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #17120f;
    --bg-alt:    #1f1815;
    --surface:   #241c18;
    --ink:       #f6efe9;
    --ink-soft:  #b9aaa1;
    --line:      #3a2e28;

    --brand:     #ff7a52;
    --brand-ink: #2a1006;
    --brand-dim: #33201a;
    --accent:    #45bfab;
    --amber:     #f0b544;

    --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* The nav is sticky and 64px tall, so anchored sections have to duck under it
   or their heading lands behind the bar. */
:target, section[id] { scroll-margin-top: 78px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }
a  { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: var(--brand-ink);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; z-index: 10;
}
.skip:focus { left: 0; }

/* ── Brand + nav ──────────────────────────────────────────────────────── */

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 27px; height: 27px; flex: none;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--brand), var(--amber));
  display: grid; place-items: center;
}
.brand-mark::before {
  content: "✓";
  color: #fff; font-size: 15px; font-weight: 800; line-height: 1;
}
.brand-name { font-weight: 650; letter-spacing: -.02em; font-size: 1.1rem; }

.nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .95rem; }
.nav-links a { text-decoration: none; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { color: var(--brand-ink); }
@media (max-width: 560px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; flex-direction: column; justify-content: center;
  background: var(--brand); color: var(--brand-ink);
  border-radius: 12px; padding: 10px 20px;
  text-decoration: none; font-weight: 600;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 7px 14px; font-size: .9rem; border-radius: 10px; }
.btn-lg { padding: 12px 24px; }
.btn-sub  { font-size: .72rem; font-weight: 500; opacity: .8; line-height: 1.2; }
.btn-main { font-size: 1.05rem; font-weight: 650; line-height: 1.25; }

.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }

/* Placeholder state for the not-yet-live App Store link. */
.is-soon { background: var(--brand-dim); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.is-soon:hover { filter: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.center-row { justify-content: center; }

.fineprint { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .74rem; font-weight: 650; color: var(--brand); margin: 0 0 14px;
}

/* Only the 404 page uses this so far — an example invite URL, which wants
   to be readable as something you could retype, character by character. */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em; white-space: nowrap;
  background: var(--brand-dim); color: var(--ink);
  padding: 2px 6px; border-radius: 6px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 7vw, 80px); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; }
/* Below the two-column breakpoint the copy leads and the phone follows it —
   a 560px-tall mock above the headline pushes the pitch off the first screen. */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding-bottom: 32px; }
  .phone { width: 250px; rotate: 0deg; }
}

/* ── Phone mock ───────────────────────────────────────────────────────── */

.hero-art { display: flex; justify-content: center; }
.phone {
  width: 300px; max-width: 74vw;
  aspect-ratio: 9 / 17.6;
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(160deg, #3a302b, #171210);
  box-shadow: var(--shadow), 0 40px 80px -40px rgba(226, 84, 44, .5);
  rotate: 2deg;
}
.phone-screen {
  height: 100%; border-radius: 31px; overflow: hidden;
  background: var(--bg-alt);
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px 12px 12px;
  font-size: 12px;
}
.app-bar { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px; }
.app-bar-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.app-bar-date { color: var(--ink-soft); font-size: 11px; }

.board {
  background: var(--surface); border-radius: 14px; padding: 10px 12px;
  border: 1px solid var(--line);
}
.board-label { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); }
.board-rows { margin-top: 8px; display: grid; gap: 7px; }
.board-row { display: grid; grid-template-columns: 20px 1fr auto auto; align-items: center; gap: 8px; }
.av {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.av-1 { background: var(--brand); }
.av-2 { background: var(--accent); }
.av-3 { background: var(--amber); }
.who { font-weight: 550; }
.flame { font-size: 10px; color: var(--ink-soft); }
.pts { font-weight: 700; font-variant-numeric: tabular-nums; }

.chores { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.chore {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.tick {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 11px; color: transparent;
}
.chore.done .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.chore.done .chore-name { color: var(--ink-soft); text-decoration: line-through; }
.chore-pts { font-size: 11px; font-weight: 700; color: var(--brand); }

.toast {
  margin-top: auto;
  background: var(--brand); color: var(--brand-ink);
  border-radius: 12px; padding: 10px 12px; font-size: 11px;
}

/* ── Bands + lists ────────────────────────────────────────────────────── */

.band { background: var(--bg-alt); border-block: 1px solid var(--line); padding: clamp(48px, 7vw, 80px) 0; }
.big { font-size: 1.1rem; color: var(--ink-soft); }
.section-title { margin-bottom: 1.2em; }

.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 30px; position: relative; color: var(--ink-soft); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}

/* ── Feature grid ─────────────────────────────────────────────────────── */

.features { padding: clamp(56px, 8vw, 96px) 0; }
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card .icon { font-size: 1.5rem; display: block; margin-bottom: 12px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ── Steps ────────────────────────────────────────────────────────────── */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  counter-reset: step;
}
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step-n {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 700; font-size: .9rem; margin-bottom: 14px;
}
.steps p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ── Download + footer ────────────────────────────────────────────────── */

.download { padding: clamp(56px, 8vw, 96px) 0; }

.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; background: var(--bg-alt); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: flex-start; justify-content: space-between;
  padding-bottom: 24px;
}
.footer-inner .fineprint { margin-top: 8px; }
.footer-links { display: flex; gap: 22px; font-size: .95rem; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.copyright { border-top: 1px solid var(--line); padding-top: 20px; }

/* ── Phones ───────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }

  /* Two stacked full-width buttons beat two half-width ones side by side. */
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { align-items: center; text-align: center; }

  .hero { padding-top: 36px; }
  .lede { font-size: 1.05rem; }

  .card, .steps li { padding: 20px; }
  .grid, .steps { gap: 14px; }

  .footer-inner { flex-direction: column; gap: 18px; }
  .footer-links { flex-wrap: wrap; gap: 18px; }
}

/* ── Long-form pages (privacy / support) ──────────────────────────────── */

.doc { padding: clamp(40px, 6vw, 72px) 0 80px; }
.doc h2 { margin-top: 2em; font-size: 1.35rem; }
.doc h2:first-of-type { margin-top: 1.2em; }
.doc ul { color: var(--ink-soft); padding-left: 22px; }
.doc li { margin-bottom: .5em; }
.doc .updated { color: var(--ink-soft); font-size: .9rem; }
.doc a { color: var(--brand); }
