/* Joy To The World Schools — site styles */
@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;0,900;1,400&family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
  --ink: #17233a;
  --navy: #173e77;
  --navy-deep: #0f2a52;
  --sky: #0d69ac;
  --gold: #8a6d10;
  --gold-bright: #c9a228;
  --gold-soft: #f6eccf;
  --cream: #f7f9fc;
  --sand: #eaf1f8;
  --stone: #4f5b6d;
  --line: #d6e1ee;
  --white: #ffffff;
  --color-destructive: #b3261e;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-control: 999px;
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: min(1200px, 100% - 3rem);
  --shadow: 0 18px 40px -24px rgba(15, 42, 82, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; color: var(--navy-deep); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
p { margin: 0 0 1.1em; }
.wrap { width: var(--wrap); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }

/* kicker */
.kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: .9rem; display: block; }
.on-dark .kicker { color: var(--gold-bright); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.6rem; border-radius: var(--radius-control); font-weight: 700; font-size: .98rem; text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s; cursor: pointer; font-family: var(--sans); }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold-bright); color: var(--navy-deep); }
.btn-gold:hover { background: #d8b43c; color: var(--navy-deep); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.on-dark .btn-ghost { color: #fff; }
.on-dark .btn-ghost:hover { color: var(--gold-bright); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 242, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy-deep); }
.brand img { height: 48px; width: auto; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; line-height: 1.05; }
.brand-name small { display: block; font-family: var(--sans); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.nav .btn { padding: .6rem 1.3rem; }
.nav .btn-gold { color: var(--navy-deep); }
.nav-toggle { display: none; background: none; border: 0; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; padding: .5rem; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); flex-direction: column; align-items: flex-start; padding: 1.2rem 1.5rem 1.8rem; gap: 1rem; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
}

/* hero */
.hero { position: relative; min-height: min(88vh, 820px); display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 42, 82, .55) 0%, rgba(15, 42, 82, .6) 45%, rgba(15, 42, 82, .9) 100%); }
.hero .inner { position: relative; z-index: 1; padding: 8rem 0 5rem; max-width: 860px; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.hero .kicker, .page-hero .kicker { text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.hero p.lead { font-size: 1.2rem; max-width: 640px; color: rgba(255, 255, 255, .92); margin-bottom: 2rem; }
.page-hero { position: relative; color: #fff; overflow: hidden; }
.page-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 42, 82, .92) 0%, rgba(15, 42, 82, .7) 60%, rgba(15, 42, 82, .5) 100%); }
.page-hero .inner { position: relative; z-index: 1; padding: 7rem 0 4.5rem; max-width: 760px; }
.page-hero h1 { color: #fff; }
.page-hero p { font-size: 1.15rem; color: rgba(255, 255, 255, .9); }
.page-hero.plain { background: var(--navy-deep); }
.page-hero.plain::after { display: none; }

/* sections */
section.band { padding: clamp(4rem, 8vw, 7rem) 0; }
.band.sand { background: var(--sand); }
.band.navy { background: var(--navy-deep); color: rgba(255, 255, 255, .9); }
.band.navy h2, .band.navy h3 { color: #fff; }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; margin: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.wide { aspect-ratio: 16 / 9; }
figcaption { font-size: .85rem; color: var(--stone); margin-top: .6rem; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.lede { font-size: 1.2rem; color: var(--stone); }

/* ministry cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .25s, box-shadow .25s; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.card .media { aspect-ratio: 16 / 10; background: var(--sand); overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 1.5rem 1.6rem 1.8rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card h3 { margin: 0; }
.card p { color: var(--stone); margin: 0; font-size: .98rem; }
.card .more { margin-top: auto; padding-top: .8rem; font-weight: 700; color: var(--gold); font-size: .92rem; }
.card.text-only { padding: 2rem; border-top: 4px solid var(--gold-bright); gap: .5rem; }

/* quote */
.quote { font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.25; font-style: italic; color: #fff; max-width: 900px; margin: 0 auto; text-align: center; }
.quote cite { display: block; margin-top: 1.2rem; font-family: var(--sans); font-style: normal; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); }
.rule { width: 64px; height: 2px; background: var(--gold-bright); border: 0; margin: 0 auto 2rem; }

/* values */
.values { display: flex; flex-wrap: wrap; gap: .7rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.values li { padding: .5rem 1.1rem; border: 1px solid var(--gold); color: var(--navy-deep); border-radius: var(--radius-control); font-weight: 600; font-size: .92rem; background: var(--white); }

/* ministry detail rows */
.ministry { padding: clamp(3rem, 6vw, 5rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.ministry:last-child { border-bottom: 0; }
.ministry ul { padding-left: 1.2rem; color: var(--stone); }

/* give strip */
.give-band { background: linear-gradient(120deg, var(--navy-deep), var(--navy)); color: #fff; border-radius: var(--radius-lg); padding: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center; }
.give-band h2 { color: #fff; margin-bottom: .3em; }
.give-band p { color: rgba(255, 255, 255, .85); margin: 0; }
.give-band .kicker { color: var(--gold-bright); }
@media (max-width: 760px) { .give-band { grid-template-columns: 1fr; } }

/* forms (shipped renderer, class hooks) */
.form { display: grid; gap: 1.2rem; }
.form-fields { display: grid; gap: 1.1rem; }
.form-field { display: grid; gap: .4rem; }
.form-label { font-weight: 700; font-size: .95rem; color: var(--navy-deep); }
.form-required { color: var(--gold); }
.form-control, .form-field input[type="text"], .form-field input[type="email"], .form-field textarea, .form-field select { width: 100%; font: inherit; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--ink); }
.form-field textarea { min-height: 130px; }
.form-control:focus, .form-field input:focus, .form-field textarea:focus { border-color: var(--navy); outline: none; }
.form-choices { display: grid; gap: .5rem; }
.form-choice { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-md); background: #fff; cursor: pointer; }
.form-choice--selected { border-color: var(--navy); background: var(--gold-soft); }
.form-choice input { accent-color: var(--navy); }
.form-choice-image { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); }
.form-help, .form-file-note { font-size: .84rem; color: var(--stone); }
.form-error, .form-form-error { color: var(--color-destructive); font-size: .88rem; font-weight: 600; }
.form-actions { display: flex; gap: .8rem; justify-content: flex-start; }
.form-submit, .form-next { padding: .9rem 2rem; border-radius: var(--radius-control); border: 0; background: var(--navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.form-submit:hover, .form-next:hover { background: var(--navy-deep); }
.form-back { padding: .9rem 1.6rem; border-radius: var(--radius-control); border: 1.5px solid var(--navy); background: transparent; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.form-success { padding: 1.6rem; background: var(--gold-soft); border-radius: var(--radius-md); font-weight: 600; color: var(--navy-deep); }
.form-loading { min-height: 200px; }

/* contact */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.contact-list strong { display: block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

/* footer */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .78); padding: 4.5rem 0 2rem; font-size: .95rem; }
.site-footer a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer .tag { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--gold-bright); }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 3rem; padding-top: 1.5rem; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
/* gallery */
.gallery { columns: 3 260px; column-gap: 1.4rem; }
.gallery figure { break-inside: avoid; margin: 0 0 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { padding: .7rem 1rem .9rem; margin: 0; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
@media (max-width: 980px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pillars { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .7rem; }
.checklist li { padding-left: 1.6rem; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .55em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--gold); }

/* Layout polish */
h1, h2, h3 { text-wrap: balance; }
.lede, .section-head p { text-wrap: pretty; }
/* Two plain (cream) bands in a row read as one: drop the doubled gap */
section.band:not(.sand):not(.navy) + section.band:not(.sand):not(.navy) { padding-top: 0; }
/* ---- Schools theme ---- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.18; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.3; }
body { font-size: 1.075rem; }
.site-header { background: rgba(15, 42, 82, .97); border-bottom: 3px solid var(--gold-bright); }
.site-header .bar { min-height: 80px; }
.brand { color: #fff; }
.brand img { height: 58px; }
.brand-name { font-size: 1.15rem; color: #fff; letter-spacing: .01em; }
.brand-name small { color: var(--gold-bright); font-size: .66rem; margin-top: .25rem; }
.nav { gap: 1.35rem; }
.nav a { color: rgba(255, 255, 255, .9); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-bright); }
.nav-toggle { color: #fff; }
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy-deep); flex-direction: column; align-items: flex-start; padding: 1.2rem 1.5rem 1.8rem; gap: 1rem; border-bottom: 3px solid var(--gold-bright); }
  .nav.open { display: flex; }
}
.hero::after { background: linear-gradient(180deg, rgba(15, 42, 82, .45) 0%, rgba(15, 42, 82, .6) 45%, rgba(15, 42, 82, .92) 100%); }
.quote { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.4; }
.site-footer .tag { font-size: 1.1rem; }
.site-footer .crest { width: 92px; height: auto; margin-bottom: 1rem; }
.card .body { gap: .5rem; }
.card .more { color: var(--sky); }
.card.text-only { border-top-color: var(--sky); }
.kicker { color: var(--sky); }
.contact-list strong { color: var(--sky); }
.band.navy .kicker { color: var(--gold-bright); }
.band.navy p { color: rgba(255, 255, 255, .86); }
.band.navy .card { color: var(--ink); }
.band.navy .card p { color: var(--stone); }
.band.navy .card h3 { color: var(--navy-deep); }

/* facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.facts div { background: var(--white); padding: 1.4rem 1.5rem; }
.facts strong { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--navy-deep); }
.facts span { font-size: .92rem; color: var(--stone); }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; font-size: .97rem; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--navy); color: #fff; font-weight: 700; font-size: .88rem; letter-spacing: .02em; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data tbody th { font-weight: 600; color: var(--navy-deep); }
.note { font-size: .92rem; color: var(--stone); margin-top: .9rem; }

/* two-column info lists */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
@media (max-width: 760px) { .info-grid { grid-template-columns: 1fr; } }
.info { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem 1.7rem; }
.info h3 { margin-bottom: .6rem; }
.info p:last-child, .info ul:last-child { margin-bottom: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.2rem; margin: 0; }
.dl dt { font-weight: 700; color: var(--navy-deep); }
.dl dd { margin: 0; color: var(--stone); }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: .5rem; } }

/* steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.steps li { counter-increment: step; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem 1.5rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: .9rem; }
.steps h3 { margin-bottom: .4rem; }
.steps p { margin: 0; color: var(--stone); font-size: .98rem; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* subject chips */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; padding: 0; margin: 0; list-style: none; }
.chips li { padding: .45rem .95rem; border-radius: var(--radius-control); background: var(--sand); color: var(--navy-deep); font-weight: 600; font-size: .93rem; }

/* downloads */
.doc-links { margin-top: auto; padding-top: 1rem; gap: .6rem; }
.doc-links .btn { padding: .65rem 1.2rem; font-size: .92rem; }
.btn-ghost.on-light, .doc-links .btn-ghost { color: var(--navy); }
.doc-links .btn-ghost:hover, .btn-ghost.on-light:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

/* crest panel */
.crest-panel { background: var(--navy-deep); border-radius: var(--radius-lg); display: grid; place-items: center; padding: clamp(2rem, 5vw, 3.5rem); box-shadow: var(--shadow); }
.crest-panel img { width: min(260px, 70%); height: auto; }
.verse { font-family: var(--serif); font-style: italic; color: var(--navy-deep); font-size: 1.2rem; border-left: 3px solid var(--gold-bright); padding-left: 1.2rem; margin: 1.6rem 0; }
.verse cite { display: block; font-style: normal; font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: .5rem; }

/* form steps */
.form-step-title { font-family: var(--serif); font-size: 1.25rem; color: var(--navy-deep); margin: 0; }
.form-step-count { font-size: .85rem; color: var(--stone); font-weight: 600; }
.form-field input[type="date"], .form-field input[type="tel"] { width: 100%; font: inherit; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.form-field--checkbox .form-choice, .form-field--checkbox label { align-items: flex-start; }
.form-field--file input[type="file"] { font: inherit; }
.nav a.btn-gold, .nav a.btn-gold[aria-current="page"], .nav a.btn-gold:hover { color: var(--navy-deep); }
