/* beta.familty.app: Lagon palette (x-specs/FAMILTY_DESIGN_SYSTEM.md §2), Fredoka for titles and buttons, Nunito for
   text. The button colour is the app's pressed coral, not its resting one: white on #FF6B57 is 2.8:1, below what a
   button label needs; on #E04F3B it is 3.9:1 at a bold 19 px. */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #FFFAF0; --surface: #FFFFFF; --ink: #3A3350; --muted: #675F80; --outline: #F0E8D8; --field: #FFFFFF;
  --action: #E04F3B; --action-shadow: #B33A28; --coral: #FF6B57; --sun: #FFC93C; --night: #2B2445; --night-2: #362D57;
  --turq: #21B8A6; --turq-bg: #DCF5F2; --lilac: #8F7FF0; --lilac-bg: #EAE6FD; --positive: #219A72; --warn: #B3261E;
  --sun-bg: #FFF3CF; --coral-bg: #FFE6E1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #19152A; --surface: #241E38; --ink: #F3EFFF; --muted: #BDB5D6; --outline: #3A3156; --field: #1E1930;
    --turq-bg: #173D3A; --lilac-bg: #2E2853; --positive: #4FD3A8; --warn: #F28B82; --sun-bg: #3D3214; --coral-bg: #43221F;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.55 "Nunito", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2, h3, .btn, .brand, .pill, legend { font-family: "Fredoka", "Nunito", -apple-system, sans-serif; }
h1 { font-size: 2.05rem; line-height: 1.15; font-weight: 700; margin: 0 0 14px; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; line-height: 1.2; font-weight: 600; margin: 0 0 14px; }
h3 { font-size: 1.1rem; line-height: 1.25; font-weight: 600; margin: 0 0 4px; }
p { margin: 0 0 12px; }
a { color: var(--action); font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a:not(.btn):not(.brand) { color: #FF8A78; } }
[hidden] { display: none !important; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar and hero: the night purple of the video's opening, with its sun rays. */
.hero { position: relative; color: #fff; padding: 0 0 96px; overflow: hidden;
  background: repeating-conic-gradient(from -4deg at 50% 115%, var(--night) 0deg 7deg, var(--night-2) 7deg 14deg); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.45rem; font-weight: 700; }
.brand img { width: 40px; height: 40px; background: #fff; border-radius: 12px; padding: 4px; }
.pill { display: inline-block; border-radius: 999px; padding: 5px 12px; font-size: .88rem; font-weight: 600; }
.pill.sun { background: var(--sun); color: var(--night); }
.pill.ghost { background: rgba(255,255,255,.12); color: #fff; }
.hero-body { padding-top: 36px; text-align: center; }
.hero h1 { color: #fff; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero .lead { color: #EDE8FF; font-size: 1.08rem; max-width: 34em; margin: 0 auto 22px; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.facts li { background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 12px; font-size: .9rem; font-weight: 700; color: #fff; }

.btn { display: inline-block; border: 0; border-radius: 14px; padding: 14px 26px; font-size: 1.2rem; font-weight: 600;
  background: var(--action); color: #fff; text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--action-shadow);
  transition: transform .08s ease, box-shadow .08s ease; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--action-shadow); }
.btn:focus-visible, .chip input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 3px; }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.secondary { background: var(--surface); color: var(--ink); box-shadow: 3px 3px 0 var(--outline); border: 2px solid var(--outline); }
a.btn { color: #fff; }
a.btn.secondary { color: var(--ink); }

/* The video sits across the hero's lower edge. */
.video-card { position: relative; margin: -76px auto 0; max-width: 440px; background: var(--surface); border-radius: 22px;
  padding: 10px; box-shadow: 4px 4px 0 var(--sun); }
.video-card video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 14px; background: var(--coral); }
.video-card p { text-align: center; margin: 8px 0 2px; font-size: .9rem; }

.hero.small { padding-bottom: 72px; }
.hero.small .hero-body { padding-top: 26px; }
.card.lifted { position: relative; margin-top: -48px; }

section { padding: 40px 0 0; }
.card { background: var(--surface); border-radius: 18px 18px 22px 22px; padding: 22px 18px; box-shadow: 3px 3px 0 var(--outline); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: 18px 18px 22px 22px;
  padding: 14px; box-shadow: 3px 3px 0 var(--outline); }
.steps img { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 99px 99px 14px 14px; padding: 6px; }
.steps li:nth-child(4n+1) img { background: var(--turq-bg); }
.steps li:nth-child(4n+2) img { background: var(--lilac-bg); }
.steps li:nth-child(4n+3) img { background: var(--sun-bg); }
.steps li:nth-child(4n+4) img { background: var(--coral-bg); }
.steps p { margin: 0; color: var(--muted); }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--sun-bg); font-weight: 700; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .15em; width: 22px; height: 22px; border-radius: 99px;
  background: var(--turq) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.checklist strong { font-weight: 800; }

/* Forms */
form { margin: 0; }
fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
legend { font-size: 1.15rem; font-weight: 600; margin: 0 0 10px; padding: 0; }
.field { margin: 0 0 14px; }
.field > label, .label { display: block; font-weight: 800; margin: 0 0 6px; }
.req { color: var(--action); }
.hint { display: block; font-size: .9rem; color: var(--muted); margin: 6px 0 0; font-weight: 600; }
input[type=text], input[type=email], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--field); border: 2px solid var(--outline);
  border-radius: 12px; padding: 11px 12px; min-height: 48px; }
textarea { min-height: 130px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23675F80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 3px var(--lilac-bg); }
.invalid input, .invalid select, .invalid textarea, input.invalid { border-color: var(--warn); }
.error { color: var(--warn); font-weight: 700; font-size: .92rem; margin: 6px 0 0; }

/* Segmented choice (Android / iPhone) and chips (several answers) */
.seg, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label, .chip { position: relative; }
.seg input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span, .chip span { display: inline-block; padding: 10px 16px; border: 2px solid var(--outline); border-radius: 999px;
  background: var(--field); font-weight: 800; cursor: pointer; min-height: 44px; }
.seg input:checked + span, .chip input:checked + span { border-color: var(--lilac); background: var(--lilac-bg); }
.chip input:checked + span::before { content: "\2713\00a0"; color: var(--lilac); }

.adult { border: 2px solid var(--outline); border-radius: 18px; padding: 14px; margin: 0 0 12px; }
.adult-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; }
.adult-head h3 { margin: 0; }
.link-btn { background: none; border: 0; color: var(--action); font: inherit; font-weight: 800; cursor: pointer; padding: 6px; }
.add-adult { width: 100%; border: 2px dashed var(--outline); background: transparent; color: var(--ink); border-radius: 14px;
  padding: 12px; font: inherit; font-weight: 800; cursor: pointer; }
.field > .consent, .consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; margin: 0; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--action); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.pick { display: inline-block; border: 2px dashed var(--outline); border-radius: 14px; padding: 12px 18px; font-weight: 800;
  cursor: pointer; background: var(--field); }
#shots:focus-visible + .pick { outline: 3px solid var(--sun); outline-offset: 3px; }
.pick.off { opacity: .5; cursor: default; pointer-events: none; }
.shots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.shots figure { margin: 0; position: relative; }
.shots img { width: 86px; height: 120px; object-fit: cover; border-radius: 10px; border: 2px solid var(--outline); display: block; }
.shots button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 99px; border: 0;
  background: var(--night); color: #fff; font-weight: 800; cursor: pointer; line-height: 28px; padding: 0; }

.done { text-align: center; }
.done img { width: 88px; height: 88px; }
.done h2 { margin-top: 8px; }
.share { display: grid; gap: 10px; margin-top: 18px; }

footer { padding: 40px 0 48px; text-align: center; font-size: .9rem; color: var(--muted); }
footer p { margin: 0 0 8px; }

/* How it works: one card per phone, side by side on a wide screen, then the app steps across both. */
.how-grid { display: grid; gap: 12px; margin-top: 4px; }
.how h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.tag { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: .82rem; font-weight: 700; color: var(--ink); }
.how.android .tag { background: var(--turq-bg); }
.how.ios .tag { background: var(--lilac-bg); }
.numbered { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.numbered li { counter-increment: step; position: relative; padding-left: 40px; }
.numbered li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 99px;
  background: var(--sun-bg); color: var(--ink); font: 700 .95rem/28px "Fredoka", "Nunito", sans-serif; text-align: center; }
.how.android .numbered li::before { background: var(--turq-bg); }
.how.ios .numbered li::before { background: var(--lilac-bg); }
.how-app h3 { margin-bottom: 12px; }
.w-full { margin: 10px 0 0; }
.done .done-next { text-align: left; background: var(--bg); border-radius: 16px; padding: 14px 16px; margin: 14px 0 0; }
.done-next h3 { margin-bottom: 10px; }
.share-card h2 { margin-bottom: 6px; }

/* The owner's counters page */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.board-head p { margin: 0; }
.board-head .btn { padding: 8px 16px; font-size: 1rem; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: 3px 3px 0 var(--outline); min-width: 0; }
.stat-value { font: 700 1.9rem/1.1 "Fredoka", "Nunito", sans-serif; font-variant-numeric: tabular-nums; }
.stat-label { font-weight: 800; margin-top: 4px; }
.stat-sub { color: var(--muted); font-size: .82rem; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.place + .place { margin-top: 18px; }
.place-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
.bar { height: 12px; border-radius: 99px; background: var(--outline); overflow: hidden; }
.bar-fill { height: 100%; background: var(--turq); border-radius: 99px; }
.bar-fill.full { background: var(--action); }
.table-card { padding: 6px 6px; overflow-x: auto; }
table.days { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
.days th, .days td { padding: 8px 4px; text-align: right; white-space: nowrap; }
@media (max-width: 400px) { table.days { font-size: .84rem; } .days thead th { font-size: .7rem; } }
.days th:first-child, .days tbody th { text-align: left; font-weight: 700; }
.days thead th { font-size: .78rem; color: var(--muted); font-weight: 800; }
.days tbody tr th, .days tbody tr td { border-top: 1px solid var(--outline); }
.days td.zero { color: var(--muted); }
.kv { list-style: none; margin: 0; padding: 6px 16px; }
.kv li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; }
.kv li + li { border-top: 1px solid var(--outline); }
.two { display: grid; gap: 0 12px; }
.two h2 { margin-top: 0; }
.about { margin-top: 28px; }
.about p:last-child { margin-bottom: 0; }

@media (min-width: 560px) {
  h1 { font-size: 2.6rem; }
  .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 28px 26px; }
  .two { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
/* On a wide screen the two phones sit side by side, a little wider than the reading column. */
@media (min-width: 940px) {
  .how-grid { grid-template-columns: 1fr 1fr; margin: 4px -140px 0; }
  .how-app { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
