/* FamilyHub public pages. Layout: a calm paper-and-ink page where the real
   screens carry the color; the four family-member colors from the app
   (Sam, Jordan, Maya, Leo) are the only accents, used as small markers. */
:root {
  --paper: #f6f5f1;
  --card: #ffffff;
  --ink: #1d2327;
  --muted: #5d666e;
  --line: #dcd9d1;
  --brand: #2e5d4b;        /* the app's menu-button green */
  --brand-ink: #ffffff;
  --sam: #c24d78;
  --jordan: #4a78ad;
  --maya: #d9a23f;
  --leo: #2f8070;
  --frame: #1f2428;
  --shadow: 0 1px 2px rgb(29 35 39 / 0.06), 0 12px 32px -12px rgb(29 35 39 / 0.25);
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15191c; --card: #1d2226; --ink: #ecebe6; --muted: #a4abb1; --line: #2f363b;
    --brand: #5fae8f; --brand-ink: #0f1a15; --frame: #0b0d0f;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15191c; --card: #1d2226; --ink: #ecebe6; --muted: #a4abb1; --line: #2f363b;
  --brand: #5fae8f; --brand-ink: #0f1a15; --frame: #0b0d0f;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--jordan); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 650; }
p { margin: 0; }
.wrap { max-width: var(--w); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.eyebrow { font: 600 0.78rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Top bar */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.25rem/1 var(--display); color: var(--ink); text-decoration: none; margin-right: auto; }
.logo-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 26px; height: 26px; }
.logo-mark span { border-radius: 3px; }
.logo-mark span:nth-child(1) { background: var(--sam); }
.logo-mark span:nth-child(2) { background: var(--jordan); }
.logo-mark span:nth-child(3) { background: var(--maya); }
.logo-mark span:nth-child(4) { background: var(--leo); }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; font-weight: 550; font-size: 0.97rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--brand); }
.nav a:hover { color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; font: 650 1rem/1 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
/* On the live site a demo button is a form (it starts a demo in one tap). */
.demo-form { display: contents; }
button.btn { font: 650 1rem/1 var(--body); }
.nav button.btn { font-size: 0.95rem; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-quiet { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-quiet:hover { border-color: var(--brand); }
.nav .btn { min-height: 40px; padding: 0 14px; border-radius: 10px; font-size: 0.95rem; }

/* Screens: the real app, framed like the device it runs on. */
.screen { background: var(--frame); padding: clamp(6px, 1.2vw, 14px); border-radius: clamp(12px, 1.8vw, 22px); box-shadow: var(--shadow); }
.screen img { border-radius: clamp(4px, 0.8vw, 10px); width: 100%; height: auto; }
.phone { background: var(--frame); padding: 9px; border-radius: 34px; box-shadow: var(--shadow); max-width: 300px; }
.phone img { border-radius: 26px; width: 100%; height: auto; }
.shot { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; }
figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 10px; }

/* Home: hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 48px); }
.hero .wrap { display: grid; gap: 28px; }
.hero h1 span { color: var(--brand); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-note { font-size: 0.92rem; color: var(--muted); }
.hero-screen { margin-top: 12px; }

/* The family strip: each person's color, as in the app */
.people { display: flex; gap: 8px; flex-wrap: wrap; }
.person { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 0.95rem; }
.person i { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 700 0.72rem/1 var(--body); font-style: normal; }

section { padding-block: clamp(40px, 6vw, 80px); }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(24px, 3.5vw, 40px); max-width: 46em; }
.band { background: var(--card); border-block: 1px solid var(--line); }

/* Feature cards (home) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.card { display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; }
.card:hover { border-color: var(--brand); }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--paper); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card .body { padding: 18px 20px 22px; display: grid; gap: 8px; align-content: start; }
.card p { color: var(--muted); font-size: 0.98rem; }

/* Day and night */
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }

/* Phones row */
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; justify-items: center; }
.phones figure { margin: 0; display: grid; justify-items: center; }

/* Features page: one block per feature */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-of-type(even) .copy { order: 2; }
.feature .copy { display: grid; gap: 14px; min-width: 0; }
.feature .tag { display: inline-flex; align-items: center; gap: 8px; font: 600 0.8rem/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.feature .tag::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--dot, var(--brand)); }
.feature .media { min-width: 0; }
.feature .media.phone-media { display: flex; justify-content: center; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 14px; height: 8px; border-left: 2.5px solid var(--dot, var(--brand)); border-bottom: 2.5px solid var(--dot, var(--brand)); transform: rotate(-45deg); }
.ticks b { font-weight: 650; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.mini-grid figure { margin: 0; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 550; }
.jump a:hover { border-color: var(--brand); color: var(--brand); }

/* How it works */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.step::before { counter-increment: step; content: counter(step); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 700 1.3rem/1 var(--display); background: var(--brand); color: var(--brand-ink); }
.step > div { display: grid; gap: 8px; min-width: 0; }
.step p { color: var(--muted); }
.connect { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.connect div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: grid; gap: 4px; }
.connect b { font-family: var(--display); font-size: 1.05rem; }
.connect span { color: var(--muted); font-size: 0.95rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(24px, 4vw, 48px); align-items: center; }

/* Closing call to action and footer */
.closing { text-align: left; }
.closing .wrap { display: grid; gap: 18px; justify-items: start; }
.site-foot { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--muted); font-size: 0.92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.site-foot a { color: var(--muted); }
.note { font-size: 0.88rem; color: var(--muted); }

@media (max-width: 760px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) .copy { order: 0; }
  body { font-size: 16px; }
  .step { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .btn, .jump a { transition: border-color 0.15s, filter 0.15s, color 0.15s; }
}
