/* Freedom World School -- navy and gold from the school crest. */
:root {
  --navy: #24304d;
  --navy-2: #2f3d62;
  --navy-3: #3b4b78;
  --gold: #f2cf72;
  --gold-deep: #9a6f0e;   /* gold for text on light backgrounds (4.6:1 on cream) */
  --cream: #faf7f0;
  --paper: #ffffff;
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #e6e1d4;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(36, 48, 77, 0.25);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.15s, background 0.15s; font-family: var(--sans); }
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #f6dc8f; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn--line { border-color: var(--navy); color: var(--navy); }

/* Top bar and header */
.topbar { background: var(--navy); color: #d9deea; font-size: 0.82rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar__links { display: flex; gap: 18px; }
.header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { border-radius: 50%; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--serif); font-size: 1.25rem; }
.brand__text small { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.brand--light { color: #fff; }
.brand--light .brand__text small { color: #b8c0d4; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 8px 12px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; border-radius: 8px; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--navy); background: #f3efe3; }
.nav__login { margin-left: 8px; padding: 10px 18px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: transform 0.2s, opacity 0.2s; }

/* Hero */
.hero { position: relative; color: #fff; background: var(--navy); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background:
  radial-gradient(circle at 85% 20%, rgba(242, 207, 114, 0.18), transparent 45%),
  linear-gradient(135deg, rgba(36, 48, 77, 0.96), rgba(47, 61, 98, 0.86)),
  var(--hero-img, none) center / cover; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding: 88px 0 96px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero__lead { font-size: 1.15rem; color: #dde3f0; max-width: 34em; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.eyebrow { display: inline-block; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--gold-deep); margin-bottom: 12px; }
.hero .eyebrow, .section--navy .eyebrow { color: var(--gold); }
.hero__crest { justify-self: center; width: min(340px, 80%); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 10px rgba(242, 207, 114, 0.15), 0 30px 60px -20px rgba(0, 0, 0, 0.5); }

/* Facts strip */
.facts { background: var(--paper); border-bottom: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 26px 20px; text-align: center; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact strong { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--navy); }
.fact span { color: var(--muted); font-size: 0.9rem; }

/* Sections */
.section { padding: 84px 0; }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy); color: #dde3f0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section__head { max-width: 680px; margin-bottom: 40px; }
.section__head--center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split--reverse > :first-child { order: 2; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card__icon { width: 46px; height: 46px; border-radius: 12px; background: #f3efe3; display: grid; place-items: center; color: var(--navy); margin-bottom: 14px; font-size: 1.4rem; }
.card p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.section--navy .card { background: var(--navy-2); border-color: var(--navy-3); box-shadow: none; }
.section--navy .card p { color: #c9d0e0; }
.section--navy .card__icon { background: rgba(242, 207, 114, 0.15); color: var(--gold); }

/* Stages */
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stage { background: var(--paper); border-radius: var(--radius); padding: 24px; border-top: 4px solid var(--gold); box-shadow: var(--shadow); }
.stage small { color: var(--gold-deep); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }
.stage p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* Photos (placeholders until the school's own photos are added) */
.photo { border-radius: var(--radius); overflow: hidden; background: #ebe5d6; aspect-ratio: 4 / 3; position: relative; box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 3 / 4; }
.photo--wide { aspect-ratio: 16 / 9; }
.photo--placeholder { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #efe9da, #efe9da 14px, #ebe4d2 14px, #ebe4d2 28px); color: #8a7f63; text-align: center; padding: 20px; font-size: 0.9rem; }
.photo--placeholder::before { content: ''; width: 44px; height: 44px; margin: 0 auto 8px; display: block; background: currentColor; opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h3l2-2h6l2 2h3a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm8 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h3l2-2h6l2 2h3a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm8 3a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery .photo:first-child { grid-row: span 2; aspect-ratio: auto; }

/* Quote */
.quote { background: var(--paper); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); position: relative; }
.quote::before { content: '\201C'; font-family: var(--serif); font-size: 6rem; color: var(--gold); position: absolute; top: -10px; left: 24px; line-height: 1; }
.quote p { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); }
.quote footer { color: var(--muted); font-size: 0.95rem; }

/* Lists and steps */
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding: 6px 0 6px 32px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2324304d' d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center / 13px no-repeat; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: var(--gold); font-family: var(--serif); font-weight: 700; margin-bottom: 12px; }
.steps strong { display: block; color: var(--navy); margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 0.95rem; }

/* FAQ */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--gold-deep); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); }

/* Enquiry form */
.form { background: var(--paper); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-3); outline: none; box-shadow: 0 0 0 3px rgba(59, 75, 120, 0.15); }
.form__hp { position: absolute; left: -5000px; }
.form__note { color: var(--muted); font-size: 0.85rem; }
.form__msg { padding: 14px 16px; border-radius: 10px; margin-top: 12px; display: none; }
.form__msg--ok { display: block; background: #e8f5ec; color: #1d6b3a; }
.form__msg--err { display: block; background: #fdecec; color: #a32020; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; color: var(--navy); }
.map { border: 0; width: 100%; height: 420px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Page banner (inner pages) */
.banner { background: var(--navy); color: #dde3f0; padding: 64px 0 56px; position: relative; overflow: hidden; }
.banner::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 207, 114, 0.22), transparent 70%); }
.banner h1 { color: #fff; margin-bottom: 8px; }
.banner p { max-width: 640px; font-size: 1.1rem; margin: 0; }
.crumbs { font-size: 0.85rem; margin-bottom: 14px; }
.crumbs a { color: var(--gold); text-decoration: none; }

/* App promo */
.app-promo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.phone-mock { justify-self: center; width: 260px; aspect-ratio: 9 / 18; border-radius: 36px; background: var(--navy-2); border: 10px solid #111827; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); }
.phone-mock div { background: rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 12px; color: #e5e9f2; font-size: 0.82rem; }
.phone-mock b { color: var(--gold); display: block; font-size: 0.9rem; }

/* CTA band and footer */
.cta-band { background: linear-gradient(135deg, var(--gold), #f6dc8f); }
.cta-band__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 44px 0; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 4px; }
.cta-band p { margin: 0; color: var(--navy-2); }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn--gold { background: var(--navy); color: #fff; }
.cta-band .btn--ghost { border-color: var(--navy); color: var(--navy); }
.footer { background: #1a2338; color: #b8c0d4; padding: 56px 0 0; font-size: 0.95rem; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer h3 { color: #fff; font-family: var(--sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.footer a { color: #e2e7f2; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { padding: 4px 0; }
.footer__note { margin-top: 14px; font-size: 0.88rem; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid #2c3754; margin-top: 40px; padding: 18px 0; font-size: 0.85rem; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.35); z-index: 60; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s, transform 0.6s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Tablet and phone */
@media (max-width: 980px) {
  .hero__inner, .split, .app-promo, .contact-grid { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .hero__crest { width: 200px; order: -1; justify-self: start; }
  .stages, .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 12px; }
  .nav__login { margin: 8px 0 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .topbar__links a[href^="mailto"], .topbar__inner > span:first-child { display: none; }
  .topbar__inner { justify-content: center; }
  .hero__inner { padding: 56px 0 64px; gap: 28px; }
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section { padding: 60px 0; }
  .stages, .steps, .form__row, .footer__grid, .gallery { grid-template-columns: 1fr; }
  .gallery .photo:first-child { grid-row: auto; aspect-ratio: 4 / 3; }
  .form, .quote { padding: 24px; }
  .brand__text strong { font-size: 1.05rem; }
  .map { height: 300px; }
}

/* The school's campus photo (a wide strip): shown at its own proportions. */
.photo--campus { aspect-ratio: 4 / 3; }
.photo--campus img { object-position: 100% 50%; }
.hero__bg { background-position: center; }

/* Gallery: the campus panorama and small photos of school moments shown at
   their own size (they come from the school's banner, so are small). */
.photo--panorama { aspect-ratio: auto; }
.photo--panorama img { height: auto; }
.gallery-band { display: flex; flex-direction: column; gap: 28px; }
.gallery-band .photo--campus { aspect-ratio: auto; }
.gallery-band .photo--campus img { height: auto; }
.moments { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.moment { margin: 0; background: #fff; padding: 10px 10px 14px; border-radius: 6px; box-shadow: var(--shadow); transform: rotate(-1.5deg); }
.moment:nth-child(3) { transform: rotate(1.5deg); }
.moment--tilt { transform: rotate(1deg) translateY(10px); }
.moment img { width: 190px; height: 230px; object-fit: cover; border-radius: 3px; }
.moment figcaption { text-align: center; margin-top: 10px; font-family: var(--serif); color: var(--navy); font-weight: 600; }
.moment.reveal.is-in { opacity: 1; }
.crest-card { margin: 0; justify-self: center; width: min(320px, 80%); }
.crest-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 10px rgba(242, 207, 114, 0.25), var(--shadow); }
.insta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--paper); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.insta h2 { margin-bottom: 6px; }
.insta .lead { margin: 0; }
@media (max-width: 640px) {
  .moments { gap: 18px; }
  .moment img { width: 150px; height: 182px; }
}
