/* Family365 promo site. Tokens match src/app/globals.css in the app. */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --border: #e6e2d9;
  --border-strong: #cfc9bd;
  --divider: #eeeae2;
  --muted-bg: #f1eee7;
  --ink: #1f2a2e;
  --ink-2: #3d4a4f;
  --muted: #5c6b70;
  --primary: #0f5e63;
  --primary-hover: #0b474b;
  --primary-tint: #dcefef;
  --primary-on-tint: #0b4f53;
  --accent: #c2492e;
  --accent-hover: #a63c24;
  --other: #e39a5b;
  --other-tint: #fbe3cc;
  --other-on-tint: #8a3f0c;
  --other-ink: #3a1a05;
  --ai: #5b21b6;
  --ai-tint: #f1ecfb;
  --success: #1f5f1c;
  --success-tint: #ddf1dc;
  --warm-tint: #fff8f1;
  --warm-border: #f3d9c0;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Nunito", "Inter", system-ui, sans-serif;
  --max: 1120px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

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

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); font-weight: 900; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100;
}
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
/* Logo lockup, as in the Family365 logo: mark on the left, name with the slogan under it. */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: 1.55rem; letter-spacing: -0.01em; }
.brand-slogan { font-weight: 600; font-size: 0.8rem; color: var(--ink-2); margin-top: 3px; }
@media (min-width: 720px) {
  .brand img { width: 56px; height: 56px; }
  .brand-name { font-size: 1.9rem; }
  .brand-slogan { font-size: 0.92rem; }
}
/* Logotype colours from the Family365 logo (logotypes are exempt from contrast rules). */
.brand-name { color: #16424A; }
.brand-365 { color: #67A600; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding: 10px 12px; border-radius: 10px;
}
.nav a:hover { background: var(--muted-bg); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.nav .btn { margin-left: 8px; padding: 10px 16px; min-height: 0; color: #fff; }
.nav .btn:hover { background: var(--accent-hover); color: #fff; }
.nav-links { display: none; }
@media (min-width: 880px) { .nav-links { display: flex; } }

/* Mobile menu using <details>, no JS */
.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
}
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: 52px; width: min(280px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px;
  box-shadow: 0 12px 32px rgba(31, 42, 46, 0.12);
  display: grid;
}
.menu-panel a { color: var(--ink); text-decoration: none; padding: 12px 14px; border-radius: 10px; font-weight: 500; }
.menu-panel a:hover { background: var(--muted-bg); }
@media (min-width: 880px) { .menu { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 22px; border-radius: 14px;
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-tint); color: var(--primary-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
@media (min-width: 900px) { section { padding: 104px 0; } }
.section-head { max-width: 46em; margin-bottom: 40px; }
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-dark { background: var(--ink); color: #fff; }
.band-dark h2 { color: #fff; }
.band-dark .lead, .band-dark p { color: #dfe7e8; }

/* Two columns: heading on the left, content on the right */
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 72px; } }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 56px; overflow: hidden; }
@media (min-width: 900px) { .hero { padding: 48px 0 88px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; } }
.hero-note { margin: 24px 0 0; color: var(--muted); font-size: 0.95rem; max-width: 34em; }

.hero-phones { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 4px; }
.hero-phones .phone:first-child { transform: rotate(-3deg); z-index: 2; }
.hero-phones .phone:last-child { transform: rotate(4deg) translateY(28px); }
@media (max-width: 520px) { .hero-phones .phone { width: 46vw; } }
@media (min-width: 900px) { .hero-phones .phone { width: clamp(180px, 19vw, 240px); } }

/* Signature: a real 2-2-5-5 fortnight, drawn like the app's custody layer */
.fortnight-wrap { margin: 48px auto 0; }
@media (min-width: 900px) { .fortnight-wrap { margin-top: 40px; } }
.fortnight { display: grid; grid-template-columns: repeat(14, 1fr); gap: clamp(3px, 0.6vw, 6px); }
.run {
  grid-column: span var(--days);
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  min-height: clamp(84px, 12vw, 136px);
  padding: clamp(10px, 1.4vw, 16px) 0 clamp(8px, 1vw, 12px);
  border-radius: clamp(10px, 1.6vw, 20px);
}
.run.home { background: var(--primary); color: #fff; }
.run.other { background: var(--other); color: var(--other-ink); }
.run .who {
  font-family: var(--font-display); font-weight: 900; line-height: 1;
  font-size: clamp(0.78rem, 2.3vw, 1.75rem);
  padding: 0 clamp(6px, 1.4vw, 18px);
  white-space: nowrap; overflow: hidden;
}
@media (max-width: 520px) { .run .who { padding: 0 4px; font-size: 0.72rem; letter-spacing: -0.01em; } }
.run .days { display: flex; }
.run .days b { flex: 1; text-align: center; font-weight: 600; font-size: clamp(0.68rem, 1.3vw, 0.9rem); opacity: 0.85; }
.fortnight-wrap figcaption { margin-top: 16px; color: var(--muted); font-size: 0.95rem; max-width: 40em; }

/* ---------- Phone frame ---------- */
.phone {
  width: 260px; flex: none;
  background: #1b2427; border-radius: 40px; padding: 10px;
  box-shadow: 0 30px 60px -20px rgba(31, 42, 46, 0.35);
  position: relative;
}
.phone::before {
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 20px; border-radius: 999px; background: #1b2427; z-index: 2;
}
/* The screenshots have no status bar, so the top padding gives the camera
   cutout an empty strip in the app's background colour, like a real phone. */
.phone img { border-radius: 31px; width: 100%; height: auto; padding-top: 34px; background: var(--bg); }
.phone.sm { width: 220px; border-radius: 34px; padding: 8px; }
.phone.sm img { border-radius: 27px; padding-top: 28px; }
.phone.sm::before { top: 15px; width: 60px; height: 16px; }

/* ---------- Problem statements ---------- */
.statements p { font-size: 1.08rem; color: var(--ink-2); margin-bottom: 1.4em; max-width: 34em; }
.statements p:last-child { margin-bottom: 0; }
.statements strong { display: block; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; margin-bottom: 4px; }

/* ---------- Feature rows ---------- */
.feature { display: grid; gap: 32px; align-items: center; padding: 32px 0; }
.feature + .feature { border-top: 1px solid var(--divider); }
.feature h3 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; padding: 56px 0; }
  .feature.flip .feature-media { order: -1; }
}
.feature-media { display: flex; justify-content: center; align-items: flex-start; gap: 20px; }
.feature-media .phone:nth-child(2) { margin-top: 48px; }
@media (max-width: 520px) {
  .feature-media .phone { width: 44vw; padding: 7px; border-radius: 28px; }
  .feature-media .phone img { border-radius: 22px; padding-top: 24px; }
  .feature-media .phone::before { top: 12px; width: 50px; height: 13px; }
}
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F5E63' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.tag {
  display: inline-block; font-family: var(--font-body); font-size: 0.75rem; font-weight: 700;
  padding: 2px 9px; border-radius: 6px; vertical-align: 3px; margin-left: 4px; white-space: nowrap; letter-spacing: 0;
}
.tag-coming { background: var(--other-tint); color: var(--other-on-tint); }
.tag-ai { background: var(--ai-tint); color: var(--ai); }

/* ---------- Gallery ---------- */
.gallery-section { padding-bottom: 40px; }
.gallery-section .section-head { margin-bottom: 24px; }
.gallery {
  display: flex; gap: 20px; overflow-x: auto; padding: 8px 16px 28px; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 720px) { .gallery { padding: 8px 32px 28px; } }
.gallery figure { margin: 0; scroll-snap-align: center; flex: none; }
.gallery figcaption { text-align: center; font-size: 0.9rem; color: var(--muted); margin-top: 12px; font-weight: 500; }
.gallery:focus-visible { outline-offset: -3px; }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.steps { display: grid; gap: 28px 32px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; border-top: 3px solid var(--other); padding-top: 18px; }
.steps li::before {
  content: counter(step); display: block;
  font-family: var(--font-display); font-weight: 900; font-size: 2.4rem; line-height: 1; color: var(--other); margin-bottom: 10px;
}
.steps h3 { color: #fff; }
.steps p { margin: 0; }

.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--warm-tint); border: 1px solid var(--warm-border); border-radius: 16px; padding: 18px 20px; color: var(--ink-2);
}
.notice svg { flex: none; color: var(--other-on-tint); margin-top: 3px; }
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--ink); }
.band-dark .notice { margin-top: 48px; }
.band-dark .notice p { color: var(--ink-2); }
.band-dark .notice a { color: var(--primary); }

/* ---------- Privacy facts ---------- */
.facts { margin: 0; display: grid; gap: 28px 40px; }
@media (min-width: 620px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts dt { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--ink-2); }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 16px; align-items: stretch; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 28px 24px; display: flex; flex-direction: column;
}
.band .plan { background: var(--bg); }
.plan.featured { background: var(--surface); border: 2px solid var(--primary); }
.plan .badge { margin: 0 0 6px; color: var(--primary); font-weight: 700; font-size: 0.9rem; line-height: 1.5; }
/* Reserve the badge's line on every plan so prices line up across the row */
@media (min-width: 760px) { .plan:not(.featured)::before { content: ""; display: block; height: calc(0.9rem * 1.5 + 6px); } }
.plan h3 { font-size: 1.4rem; margin-bottom: 4px; }
.plan .for { color: var(--muted); font-size: 0.95rem; line-height: 1.5; min-height: 3em; }
@media (min-width: 1100px) { .plan .for { min-height: 4.5em; } }
.price { font-family: var(--font-display); font-weight: 900; font-size: 2.8rem; line-height: 1; margin: 16px 0 4px; }
.price small { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.price-alt { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }
.plan .ticks { margin-bottom: 24px; font-size: 0.95rem; }
.plan .btn { margin-top: auto; width: 100%; }

.compare { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 0.95rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--divider); vertical-align: top; }
.compare thead th { background: var(--muted-bg); font-weight: 600; }
.compare tbody th { font-weight: 600; }
.compare tr.us td, .compare tr.us th { background: var(--primary-tint); color: var(--primary-on-tint); }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 48px 20px 0; font-weight: 600; font-size: 1.05rem; position: relative; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px; margin-top: -8px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
.faq .answer { padding: 0 0 20px; color: var(--ink-2); max-width: 44em; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */
.cta-section { padding-top: 0; }
.cta { background: var(--primary); color: #fff; border-radius: 28px; padding: 40px 24px; }
@media (min-width: 760px) { .cta { padding: 64px; } }
.cta h2 { color: #fff; max-width: 18em; }
.cta p { color: #d6ecec; max-width: 36em; }
.cta .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.cta .btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- Prose pages ---------- */
.page-head { padding: 56px 0 24px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--muted); font-size: 0.92rem; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { font-size: 0.95rem; font-family: var(--font-body); font-weight: 600; color: var(--ink-2); margin-bottom: 10px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; }
.site-footer a { color: var(--ink-2); }
.site-footer li a { display: inline-block; padding: 8px 0; }
.cta .alt { margin: 18px 0 0; font-size: 0.95rem; }
.cta .alt a { color: #fff; }
.nowrap { white-space: nowrap; }

/* The fortnight sits under the two-homes heading, before the feature rows */
#two-homes .fortnight-wrap { margin: 0 0 32px; }

/* Self-hosted licence card beside its note */
@media (min-width: 760px) { .plans-solo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
@media (min-width: 1100px) { .plans-solo { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.plans-solo .notice { margin-top: 0; }
.plans-solo .plan::before { display: none; }
