/* Kingdom Kids — landing page.
 *
 * Tokens copied from the Rails app (app/app/assets/stylesheets/application.css)
 * so the public page and the app people sign in to look like one thing; the
 * blue band with the gold wordmark is the parent portal's sign-in.
 *
 * The blue (#0A72E8) carries white text, 4.6:1. The gold (#F6BF19) is a FILL
 * colour only: on white it is 1.7:1 and fails contrast, so text on gold is
 * always the dark ink. The logo's own blue was brighter (#0093FF), on which
 * white text is too faint; the owner chose this one for everything, 2026-11-22.
 *
 * Everything is here, in this one file: the page's policy (_headers) allows
 * no inline style, no script and nothing from another origin, so the fonts
 * are served from fonts/ beside it (SIL Open Font License, fonts/OFL-*.txt).
 */
@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("fonts/nunito-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --surface: #EEF5FF;
  /* Kingdom Kids (the owner, 2026-11-22): the blue leads and carries white
     text; the gold is the crown's and marks the one thing to do next, with
     dark text on it, never white. */
  --brand: #0A72E8;
  --on-brand: #FFFFFF;
  --accent: #F6BF19;
  --ink: #0B2545;          /* text on gold, in both themes */
  --text: #0B2545;
  --body: #3D4F66;
  --muted: #52627A;
  --border: #D5DFEC;
  --line: #0B2545;         /* the classroom cards' outline */
  --contact-bg: #0B2545;
  --contact-text: #FFFFFF;
  --contact-body: #E6E7E8;
  --measure: 62ch;
  --display: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Dark, chosen with the switch in the masthead (theme.js, remembered on the
   device). Light is the default, whatever the device's own setting. */
:root[data-theme="dark"] {
  --bg: #14171A;
  --surface: #1D2125;
  --text: #F2F3F4;
  --body: #C9CDD1;
  --muted: #A8ADB3;
  --border: #333A41;
  --line: #5A6269;
  --contact-bg: #242A2F;
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3, .display { font-family: var(--display); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

/* The blue band, with the crowns faint on it ---------------------------------- */
.band { background: var(--brand) url("crown-pattern.svg") 0 0 / 195px 70px; color: var(--on-brand); padding: 0 24px; }

.masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
/* The Kingdom Kids wordmark in its gold on the blue, with the verse beneath
   it, which this logo carries (the owner, 2026-11-22). */
.brand .logo { display: inline-flex; flex-direction: column; align-items: center; flex: none; }
.brand .logo img { display: block; height: 60px; width: auto; }
.verse { margin-top: 1px; padding: 1px 12px; border-radius: 999px; background: #FFFFFF; color: #0B4FB8; font-weight: 800; font-size: 12px; line-height: 1.3; white-space: nowrap; }
.brand .rule { width: 1px; height: 32px; background: rgba(255, 255, 255, 0.45); flex: none; }
/* What the page is, beside the logo, which says the name. */
.wordmark { font-family: var(--sans); font-weight: 700; font-size: 16px; line-height: 1.2; }
/* On a phone the mark is a little smaller. */
@media (max-width: 480px) {
  .masthead { gap: 10px; }
  .brand { gap: 8px; }
  .brand .logo img { height: 46px; }
  .brand .rule { display: none; }
  .wordmark { font-size: 14px; }
  .actions { gap: 8px; }
  .lang { padding: 0 12px; }
}

/* Language switch: a pill, 44px tall so it is a real touch target. */
.lang {
  flex: none; display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 18px;
  border: 2px solid var(--on-brand); border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; color: var(--on-brand);
}
/* Hover only where there is one: on a phone a tap leaves :hover stuck on,
   and the control would stay filled after it. */
@media (hover: hover) {
  .lang:hover, .theme:hover { background: var(--on-brand); color: var(--brand); }
}
.lang:focus-visible, .theme:focus-visible { outline: 3px solid var(--on-brand); outline-offset: 2px; }

/* The masthead's two controls: the theme switch and the language. Where the
   name and they do not fit one line (a narrow phone, or a phone set to large
   text), they move to the next line, on the right, rather than over the name. */
.actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
/* The light or dark switch: an icon in a 44px circle, its name in aria-label
   (theme.js). Hidden until the script shows it; without it, it could not switch. */
.theme {
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
  border: 2px solid var(--on-brand); border-radius: 999px; background: transparent; color: var(--on-brand);
  cursor: pointer;
}
.theme svg { width: 20px; height: 20px; }
/* The moon in light, the sun in dark: the icon is the theme it switches to. */
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

.hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px; padding-block: 56px 72px; }
.hero-text { flex: 999 1 520px; min-width: 0; }
.hero h1 {
  margin: 0 0 20px; max-width: 13ch;
  font-weight: 900; font-size: clamp(36px, 5.2vw, 64px); line-height: 1.05; letter-spacing: -0.025em;
}
.hero p { margin: 0; max-width: 58ch; font-size: 19px; line-height: 1.6; }
/* A child in the Kingdom Kids shirt, standing on the band's lower edge, the
   crown above his head (the owner, 2026-11-22). Where the band has room for
   three columns he is its third; on a tablet he stands beside the times card;
   on a phone he comes after it, centred, so the times stay near the top. */
.hero-child { display: block; flex: none; align-self: flex-end; height: 300px; width: auto; margin: 0 auto -72px; }
@media (max-width: 1099px) { .hero-text { flex-basis: 100%; } }
@media (min-width: 1100px) {
  .hero { flex-wrap: nowrap; }
  .hero-text { flex: 1 1 480px; }
  .times-card { flex: 0 0 300px; align-self: center; }
  .hero-child { height: 430px; margin-inline: 0; }
}
/* The privacy page's band: a title and its lead, no card beside them. */
.hero.plain h1 { max-width: 20ch; }

/* The white card of Sunday times on the band. White in both themes: it sits
   on the blue, which does not change with the theme. */
.times-card {
  flex: 1 1 300px; min-width: 0;
  background: #FFFFFF; color: var(--ink); border-radius: 24px; padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.times-card .label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #5E5E5E; }
.times-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.times-card li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #E4E1DA; }
.times-card li:last-child { padding-bottom: 0; border-bottom: 0; }
.times-card b { font-family: var(--display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.times-card span { color: #5E5E5E; font-size: 15px; white-space: nowrap; }
/* The schedule's one rule, under the times: the card is the only place the
   times are listed. */
.times-card .note-times { margin: 0; padding-top: 14px; border-top: 1px solid #E4E1DA; font-size: 14px; line-height: 1.5; color: #4A4D4B; }

/* Sections ------------------------------------------------------------------ */
main { padding: 0 24px; }
section { padding-top: 88px; }
section:last-child { padding-bottom: 96px; }
section h2 { margin: 0; font-weight: 900; font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; }
section p { max-width: var(--measure); color: var(--body); }

/* A heading beside its content, stacking at phone width. */
.split { display: flex; flex-wrap: wrap; gap: 40px; }
.split > h2 { flex: 1 1 300px; min-width: 0; }
.split > .content { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split > .content > p { margin: 0; }

.rooms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.rooms li {
  border: 2px solid var(--line); border-radius: 18px; padding: 20px; min-height: 120px;
  display: flex; flex-direction: column; gap: 6px;
}
.rooms .age {
  align-self: flex-start; background: var(--accent); color: var(--ink);
  border-radius: 999px; padding: 2px 12px;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rooms .room { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.2; }
sup { font-size: 0.6em; }

.steps-title { margin-bottom: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.steps li { background: var(--surface); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.steps .n {
  width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: #FFFFFF;
  display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 20px;
}
.steps b { font-family: var(--display); font-weight: 800; font-size: 21px; }
.steps .text { color: var(--body); font-size: 16px; }
/* The release, the point of the system, on gold. */
.steps li.key { background: var(--accent); color: var(--ink); }
.steps li.key .text { color: var(--ink); }

/* Register your family: the link to the app, on the pilot's message (2026-11-06) */
.register .ready { margin: 0; padding-left: 1.3em; color: var(--body); }
.register .ready li { margin-bottom: 6px; }
/* Why the photographs (2026-11-11): beside what to have ready, on the
   surface with the gold edge the release step uses. */
.why-photos { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 20px; }
.why-photos p { margin: 0; font-size: 16px; }
.why-photos b { color: var(--text); }
.cta { display: inline-block; background: var(--accent); color: var(--ink); font-family: var(--display); font-weight: 800;
  font-size: 18px; text-decoration: none; padding: 14px 26px; border-radius: 999px; }
.cta:hover { text-decoration: underline; text-decoration-color: var(--ink); }
.cta:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
/* A button into the app while the page is shown before it is open (worker/index.js, REGISTRATION=closed). */
.cta-closed { opacity: 0.5; cursor: not-allowed; }
.cta-closed:hover { text-decoration: none; }
/* Dark: a near-black number on a dark card would vanish, so the numbers turn
   gold; the release's stays dark on its gold card. */
:root[data-theme="dark"] .steps .n { background: var(--accent); color: var(--ink); }
:root[data-theme="dark"] .steps li.key .n { background: var(--ink); color: #FFFFFF; }

/* The app on the device (2026-11-11): one card per device, as the steps'
   cards; the device's icon in the steps' dark square, gold in dark. */
.install-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.install-head p { margin: 0; }
.devices { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.devices > li { background: var(--surface); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.device-icon {
  width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: #FFFFFF;
  display: grid; place-items: center;
}
.device-icon svg { width: 24px; height: 24px; }
.devices h3 { margin: 0; font-weight: 800; font-size: 21px; line-height: 1.2; }
.devices ol { margin: 0; padding-left: 1.3em; color: var(--body); font-size: 16px; display: flex; flex-direction: column; gap: 8px; }
.devices ol b { color: var(--text); }
.devices .device-note { margin: 0; font-size: 14px; color: var(--muted); }
/* The share and install marks, drawn inside the sentence that names them. */
.glyph { width: 1.1em; height: 1.1em; vertical-align: -0.2em; }
:root[data-theme="dark"] .device-icon { background: var(--accent); color: var(--ink); }

.contact {
  background: var(--contact-bg); color: var(--contact-text); border-radius: 28px; padding: clamp(24px, 6vw, 44px);
  display: flex; flex-wrap: wrap; gap: 40px;
}
.contact h2 { flex: 1 1 260px; min-width: 0; color: var(--contact-text); }
.contact address { flex: 1 1 280px; min-width: 0; font-style: normal; color: var(--contact-body); }
.contact .reach { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.contact .reach a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--contact-text); font-weight: 700; text-decoration: none; overflow-wrap: anywhere;
}
/* The address and the email fit one line on a 390px phone at this size. */
@media (max-width: 480px) { .contact .reach a { font-size: 16px; } }
.contact .reach a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.contact svg { flex: none; width: 20px; height: 20px; }

/* The privacy pages: one column of text under the band, on the band's left
   edge; the lines keep to the measure. */
.article { max-width: 1120px; margin: 0 auto; }
.article > * { max-width: 72ch; }
.article section { padding-top: 48px; }
.article section h2 { font-size: 26px; margin-bottom: 12px; }
.article section p { color: var(--body); }
.article section p b { color: var(--text); }
.article ol { margin: 0; padding-left: 1.3em; color: var(--body); max-width: var(--measure); }
.article ol li { margin-bottom: 10px; }
.article ol b { color: var(--text); }

/* The "Spanish governs" line on the English privacy page. */
.note {
  font-size: 0.92rem; color: var(--muted);
  border-left: 3px solid var(--border);
  padding: 2px 0 2px 12px; margin-block: 32px 0;
}

/* Footer -------------------------------------------------------------------- */
footer { background: var(--surface); padding: 40px 24px 56px; }
footer .wrap { display: flex; flex-direction: column; gap: 12px; }
/* Whose ministry it is, by its logo, above the line that says so. */
footer .church { margin: 0 0 4px; }
footer .church img { display: block; height: 52px; width: auto; }
footer .church .on-dark { display: none; }
:root[data-theme="dark"] footer .church .on-light { display: none; }
:root[data-theme="dark"] footer .church .on-dark { display: block; }
/* The line Meta looks for. Not muted: it is the point of the page. */
footer .entity { margin: 0; max-width: 70ch; font-size: 16px; color: var(--text); }
footer .entity strong { font-weight: 700; }
footer .meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
footer .meta a { color: var(--text); font-weight: 600; }
footer .meta p { margin: 0; }

/* The running version (worker/index.js adds it to each page), bottom right as
   on the app's pages: small, on the page's own background so it reads over the
   dark footer too, never in the way of a tap, and off paper. */
.site-release {
  position: fixed; right: 8px; bottom: 6px; z-index: 1;
  margin: 0; padding: 2px 6px; border-radius: 4px;
  font: 11px/1.2 var(--sans); font-variant-numeric: tabular-nums;
  color: var(--muted); background: var(--bg); opacity: 0.85;
  pointer-events: none;
}
@media print { .site-release { display: none; } }
