/* Triumph Kids — website styles
   Colours, fonts and shapes come from the Triumph Kids design system. */

:root {
  /* Colours (from the badge logo) */
  --surface: #FFF8EC;     /* warm cream page background */
  --card: #FFFFFF;
  --ink: #173A78;         /* navy — all text */
  --ink-muted: #4F5B7A;
  --sky: #6FB3EC;
  --sky-deep: #0B5AB0;    /* buttons and links */
  --sky-tint: #D6ECFB;
  --sunshine: #FFB000;
  --sun-tint: #FFE3A3;
  --orange: #F7890C;
  --leaf: #3BAA35;
  --coral: #FF6B5B;
  --gold-tint: #FFF1CC;
  --gold-deep: #8A5200;

  /* Fonts */
  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;

  /* Shapes and space */
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --pill: 9999px;
  --space-section: 64px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 600;
}

img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 6vw, 62px); }
h2 { font-size: clamp(30px, 4vw, 40px); }
h3 { font-size: 24px; }
p { margin: 0; }
a { color: var(--sky-deep); }
a:hover { color: var(--ink); }
:focus-visible { outline: 4px solid var(--sunshine); outline-offset: 3px; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.section { padding-block: 0 var(--space-section); }
.lead { font-size: 20px; line-height: 1.5; color: var(--ink-muted); max-width: 34em; }
.muted { color: var(--ink-muted); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.center { text-align: center; align-items: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 12px 16px; border-radius: var(--radius-md); z-index: 10; }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 3px solid var(--sun-tint); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand span { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a { padding: 12px 16px; border-radius: var(--pill); font-weight: 800; text-decoration: none; color: var(--ink); }
.nav a:hover { background: var(--sun-tint); }
.nav a[aria-current="page"] { background: var(--sky-tint); }
.nav a.nav-parents { background: var(--sky-deep); color: #FFFFFF; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 0 28px; border-radius: var(--pill);
  font-family: var(--font-body); font-weight: 800; font-size: 19px;
  text-decoration: none; border: 3px solid transparent; cursor: pointer;
}
.btn svg { width: 24px; height: 24px; flex: none; }
.btn-sun { background: var(--sunshine); color: var(--ink); }
.btn-blue { background: var(--sky-deep); color: #FFFFFF; }
.btn-blue:hover { color: #FFFFFF; background: var(--ink); }
.btn-outline { background: var(--card); color: var(--sky-deep); border-color: var(--sky-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.tag {
  align-self: flex-start; display: inline-block; padding: 6px 16px; border-radius: var(--pill);
  font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- Home hero ---------- */
.hero { padding-block: 56px var(--space-section); }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-art { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
.blob {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / 1; border-radius: 48px;
  background: var(--sky); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.blob i { position: absolute; border-radius: var(--pill); }
.blob img { position: relative; width: 82%; }

/* ---------- Big picture buttons ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  padding: 36px 20px; border-radius: var(--radius-xl); text-decoration: none; color: var(--ink);
  transition: transform .15s ease;
}
.tile:hover { transform: translateY(-4px) rotate(-1deg); color: var(--ink); }
.tile .icon { width: 96px; height: 96px; border-radius: var(--pill); background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.tile .icon svg { width: 52px; height: 52px; }
.tile strong { font-family: var(--font-display); font-size: 32px; line-height: 1; }
.tile span { font-weight: 800; font-size: 18px; }

/* ---------- Video cards ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.video { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.video:hover { color: var(--sky-deep); }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--sky);
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .play {
  position: relative; width: 64px; height: 64px; border-radius: var(--pill); background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(23,58,120,.25);
}
.thumb .play svg { width: 30px; height: 30px; }
.thumb .len {
  position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: #FFFFFF;
  font-size: 14px; font-weight: 800; padding: 3px 10px; border-radius: var(--pill);
}
.video-title { font-size: 19px; line-height: 1.3; font-weight: 800; }

/* Watch page section chooser */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  min-height: 56px; padding: 0 24px; border-radius: var(--pill); border: 3px solid var(--c);
  background: var(--card); color: var(--ink); font-family: var(--font-body); font-weight: 800; font-size: 18px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--c); color: var(--chip-ink, var(--ink)); }
.sec-head { display: flex; align-items: center; gap: 14px; }
.dot { width: 28px; height: 28px; border-radius: var(--pill); flex: none; }

/* ---------- Cards & panels ---------- */
.card { background: var(--card); border-radius: var(--radius-xl); padding: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.band { padding-block: var(--space-section); }
.band-gold { background: var(--gold-tint); }
.band-blue { background: var(--sky-tint); }

/* ---------- Memory verse ---------- */
.verse-hero {
  background: var(--card); border: 4px solid var(--leaf); border-radius: 40px;
  padding: 48px 28px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.verse-text { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 5vw, 56px); line-height: 1.06; max-width: 18em; }
.verse-ref { font-size: 22px; font-weight: 800; color: var(--ink-muted); }
.verse-text .word { transition: background .2s, color .2s; border-radius: 8px; padding: 0 2px; }
.verse-text .word.hidden { color: transparent; background: var(--sun-tint); }
.verse-text .word.lit { background: var(--sunshine); }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day {
  aspect-ratio: 1 / 1; min-height: 56px; border-radius: 20px; border: 3px dashed var(--sky);
  background: var(--card); font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink);
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px;
}
.day svg { width: 28px; height: 28px; }
.day[aria-pressed="true"] { background: var(--sunshine); border: 3px solid var(--sunshine); }
.day[aria-pressed="false"] svg { opacity: .25; }
.cheer { font-family: var(--font-display); font-size: 26px; font-weight: 800; min-height: 1.3em; }

.motions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: step; }
.motion { background: var(--card); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.motion b { font-family: var(--font-display); font-size: 24px; line-height: 1.1; }

.verse-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.flip {
  min-height: 190px; border-radius: var(--radius-xl); border: 0; padding: 24px; cursor: pointer;
  font-family: var(--font-body); color: var(--ink); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--c);
}
.flip .front { font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1.1; }
.flip .back { font-size: 20px; font-weight: 800; line-height: 1.35; }
.flip .hint { font-size: 14px; font-weight: 800; opacity: .85; }
.flip[aria-pressed="false"] .back, .flip[aria-pressed="true"] .front { display: none; }

/* ---------- Parents ---------- */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 18px; }
.checks li::before {
  content: ""; flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: var(--pill);
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23173A78' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.ages { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.age { border-radius: var(--radius-xl); padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { background: var(--card); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.step .num { width: 44px; height: 44px; border-radius: var(--pill); background: var(--sunshine); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.faq details { background: var(--card); border-radius: var(--radius-lg); padding: 20px 24px; }
.faq details + details { margin-top: 12px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 19px; }
.faq details p { margin-top: 10px; color: var(--ink-muted); }

form.signup { display: flex; flex-direction: column; gap: 12px; }
form.signup label { font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.2; }
form.signup input {
  min-height: 56px; padding: 0 18px; border-radius: var(--radius-md); border: 2px solid var(--ink-muted);
  font-family: var(--font-body); font-size: 18px; color: var(--ink); background: #FFFFFF;
}
.gate { font-size: 15px; color: var(--ink-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #FFFFFF; padding-block: 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.site-footer a { color: #FFFFFF; }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand .logo-disc { width: 72px; height: 72px; border-radius: var(--pill); background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.foot-brand img { width: 64px; height: 64px; object-fit: contain; }
.foot-brand b { font-family: var(--font-display); font-size: 26px; display: block; line-height: 1.1; }
.foot-brand small, .foot-note { color: var(--sky-tint); font-size: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 800; }

/* Grown-up gate dialog */
.gate-dialog { border: 0; border-radius: var(--radius-xl); padding: 32px; max-width: 420px; width: calc(100% - 32px); color: var(--ink); font-family: var(--font-body); }
.gate-dialog::backdrop { background: rgba(23, 58, 120, .55); }
.gate-dialog h2 { font-size: 30px; }
.gate-dialog input { min-height: 56px; width: 100%; padding: 0 18px; border-radius: var(--radius-md); border: 2px solid var(--ink-muted); font-size: 22px; font-family: var(--font-body); }
.gate-dialog .err { color: #B42318; font-weight: 800; min-height: 1.4em; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (max-width: 560px) {
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .brand span { font-size: 24px; }
  .card { padding: 24px; }
}

/* On-site video player */
.player-dialog {
  border: 0; border-radius: var(--radius-xl); padding: 20px; width: min(960px, calc(100% - 24px)); max-width: none;
  background: var(--card); color: var(--ink); font-family: var(--font-body);
}
.player-dialog::backdrop { background: rgba(23, 58, 120, .8); }
.player-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.player-title { font-size: clamp(20px, 3vw, 28px); min-width: 0; }
.player-close { min-height: 52px; flex: none; }
.player-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-tip { margin-top: 10px; color: var(--ink-muted); font-weight: 700; text-align: center; }

/* ---------- Colouring page ---------- */
.pictures { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.pic-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px;
  background: var(--card); border: 4px solid transparent; border-radius: var(--radius-lg); cursor: pointer;
  font-family: var(--font-body); font-weight: 800; font-size: 16px; color: var(--ink);
}
.pic-btn svg { width: 100%; max-width: 120px; height: auto; pointer-events: none; }
.pic-btn[aria-pressed="true"] { border-color: var(--coral); }
.colour-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.colour-board-card { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.colour-tools { flex: 1 1 300px; min-width: 0; }
.board { width: 100%; max-width: 560px; }
.board svg { width: 100%; height: auto; display: block; touch-action: manipulation; }
.board .c { cursor: pointer; transition: fill .15s; }
.print-verse { font-size: 20px; font-weight: 700; }
.print-only { display: none; }
.palette { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.swatch {
  aspect-ratio: 1 / 1; min-height: 44px; border-radius: var(--pill); cursor: pointer;
  border: 3px solid rgba(23, 58, 120, .25);
}
.swatch[aria-pressed="true"] { border: 5px solid var(--ink); transform: scale(1.08); }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-row .btn { flex: 1 1 140px; }

@media print {
  @page { margin: 12mm; }
  body { background: #FFFFFF; }
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; padding: 0; box-shadow: none; }
  .print-area .board { max-width: 100%; }
  .print-only { display: block; font-size: 14px; color: #4F5B7A; }
}

/* ---------- Prayers page ---------- */
.night { background: var(--ink); padding-block: 48px var(--space-section); position: relative; overflow: hidden; }
.night-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; position: relative; }
.night-inner .hero-text { grid-column: 1 / -1; }
.night-sky { position: absolute; right: 0; top: -20px; width: min(420px, 70%); opacity: .9; pointer-events: none; }
.night .hero-text h1 { position: relative; }
.prayers { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.prayer { background: var(--c, var(--card)); border-radius: var(--radius-xl); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.prayer-night { background: #22508F; color: #FFFFFF; position: relative; }
.prayer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.prayer-head h2 { font-size: 30px; }
.prayer-text { font-size: 21px; line-height: 1.5; font-weight: 700; }
.listen { min-height: 52px; padding: 0 20px; font-size: 17px; }
.listen.is-playing { outline: 4px solid var(--sunshine); outline-offset: 2px; }
.builder-label { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.my-prayer { background: var(--gold-tint); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.my-prayer p { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; }
.listen-mine.is-playing { outline: 4px solid var(--sunshine); outline-offset: 2px; }

/* Family photo (About page) */
.family-photo { margin: 0; background: var(--card); border-radius: var(--radius-xl); padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.family-photo img { width: 100%; height: auto; border-radius: var(--radius-lg); display: block; }
.family-photo figcaption {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 3.4vw, 36px); line-height: 1.15;
  text-align: center; color: var(--ink); padding: 0 8px 8px; text-wrap: balance;
}
.family-photo figcaption b { font-weight: 800; color: var(--sky-deep); }

/* "Grown-ups: try this at home" box */
.home-tips {
  background: var(--gold-tint); border-radius: var(--radius-xl); padding: 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px 40px; align-items: start;
}
@media (max-width: 760px) { .home-tips { grid-template-columns: minmax(0, 1fr); padding: 24px; } }
.home-tips .checks li { font-size: 17px; }
.home-tips-link { grid-column: 1 / -1; font-weight: 800; font-size: 18px; color: var(--gold-deep); }

/* From Our Home page */
.story { background: var(--card); border-radius: var(--radius-xl); padding: clamp(24px, 5vw, 48px); display: flex; flex-direction: column; gap: 18px; max-width: 760px; margin: 0 auto; }
.story p { font-size: 19px; line-height: 1.7; }
.story .story-meta { font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-deep); }
.story blockquote { margin: 0; padding: 18px 22px; border-radius: var(--radius-lg); background: var(--sky-tint); font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.3; }
.story .helped { background: var(--sun-tint); border-radius: var(--radius-lg); padding: 20px 22px; }
.story .book-note { font-style: italic; color: var(--ink-muted); font-size: 16px; }
.coming { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.coming-card { background: var(--card); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 8px; border: 3px dashed var(--sun-tint); }
.coming-card b { font-family: var(--font-display); font-size: 22px; line-height: 1.15; }
