/* =========================================================
   Northbridge Academy - main stylesheet
   To change the brand colours, edit the values just below.
   ========================================================= */
:root {
  --ink: #1f2421;
  --ink-soft: #3a403c;
  --terracotta: #b4532a;
  --terracotta-dark: #96421f;
  --cream: #f4eee4;
  --paper: #fbf8f3;
  --sand: #e8dfd0;
  --line: #ddd3c4;
  --muted: #5b605c;
  --white: #ffffff;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--terracotta-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 7vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--ink); color: var(--white); padding: 8px 12px; z-index: 100; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  font-weight: 600;
  margin-bottom: 1rem;
}
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--terracotta); color: var(--white); }
.btn-primary:hover { background: var(--terracotta-dark); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 243, 0.96);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 500; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.97rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--terracotta-dark); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-nav .btn { color: var(--white); text-decoration: none; padding: 0.6rem 1.1rem; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 68px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 20px 24px;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .site-nav li:last-child a { border: 0; margin-top: 16px; text-align: center; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-cream { background: var(--cream); }
.section-ink { background: var(--ink); color: var(--cream); }
.section-ink h2, .section-ink h3 { color: var(--white); }
.section-ink .eyebrow { color: #e3a07f; }
.section-ink a:not(.btn) { color: #f0b597; }
.section-head { max-width: 40em; margin-bottom: 2.5rem; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--terracotta); }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }
.page-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }

@media (max-width: 860px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 380px; }
  .section { padding: 56px 0; }
}

/* ---------- Subject list (numbered, editorial) ---------- */
.subjects { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.subject { padding: 28px 28px 32px 0; border-right: 1px solid var(--line); }
.subject + .subject { padding-left: 28px; }
.subject:last-child { border-right: 0; }
.subject .num { font-family: var(--font-head); font-size: 0.95rem; color: var(--terracotta); display: block; margin-bottom: 18px; }
.subject p { color: var(--ink-soft); }
@media (max-width: 860px) {
  .subjects { grid-template-columns: 1fr; }
  .subject, .subject + .subject { padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Two-column split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.panel-ink { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.panel-ink h3 { color: var(--white); }
.panel .tag {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; background: var(--cream); color: var(--terracotta-dark); margin-bottom: 14px;
}
.panel-ink .tag { background: rgba(244, 238, 228, 0.12); color: #f0b597; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .panel { padding: 24px; } }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--terracotta); padding-top: 20px; }
.steps li::before { content: "Step " counter(step); display: block; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Ticks list ---------- */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px;
  border-left: 2px solid var(--terracotta); border-bottom: 2px solid var(--terracotta); transform: rotate(-45deg);
}
.two-col-list { grid-template-columns: 1fr 1fr; column-gap: 40px; }
@media (max-width: 760px) { .two-col-list { grid-template-columns: 1fr; } }

/* ---------- Programme cards ---------- */
.level-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--ink); padding-bottom: 14px; margin-bottom: 28px; }
.level-head h2 { margin: 0; }
.programmes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.programme { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.programme h3 { margin-bottom: 0.4em; }
.programme dl { margin: 18px 0 0; display: grid; gap: 12px; font-size: 0.95rem; }
.programme dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.programme dd { margin: 2px 0 0; }
.programme .btn { margin-top: auto; align-self: flex-start; }
.programme .fee { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); margin-bottom: 18px; font-weight: 600; }
@media (max-width: 960px) { .programmes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .programmes { grid-template-columns: 1fr; } .programme { padding: 22px; } }

/* ---------- Values / feature grid ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--ink-soft); margin: 0; }
.section-ink .feature p { color: #cfc8bc; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Placeholder profile cards ---------- */
.profile { border: 1px dashed var(--terracotta); border-radius: var(--radius); padding: 24px; background: var(--white); }
.profile .avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--cream); color: var(--terracotta-dark);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 1.4rem; margin-bottom: 14px;
}

/* ---------- Callout band ---------- */
.band { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.band .btn-row { justify-content: flex-end; margin: 0; }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } .band .btn-row { justify-content: flex-start; } }

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; gap: 32px; } }
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
@media (max-width: 640px) { .form { padding: 22px; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* stops iPhones zooming in on tap */
  padding: 12px 14px;
  border: 1px solid #c9bfae;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(180, 83, 42, 0.18); }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.checks input { width: 18px; height: 18px; accent-color: var(--terracotta); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--terracotta); flex: none; }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f0e4; color: #24451d; }
.form-status.err { background: #f7e3dc; color: #7a2e12; }
.form .btn { width: 100%; }
@media (min-width: 641px) { .form .btn { width: auto; } }

.contact-card { border-top: 2px solid var(--ink); padding-top: 20px; }
.contact-card dl { margin: 0; display: grid; gap: 18px; }
.contact-card dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-card dd { margin: 4px 0 0; font-size: 1.05rem; }

/* ---------- Note box (used for honest notes and fees) ---------- */
.note { background: var(--cream); border-left: 3px solid var(--terracotta); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; }
.note p:last-child { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc8bc; padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer a { color: #cfc8bc; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h2 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: #e3a07f; font-weight: 600; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 12px; }
.footer-brand svg { width: 32px; height: 32px; }
.footer-bottom { border-top: 1px solid #3a403c; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 0.85rem; color: #9d978c; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Keeps headings visible below the sticky header when jumping to a section */
[id] { scroll-margin-top: 84px; }

/* ---------- Crest and motto ---------- */
.crest-panel { background: var(--cream); border-radius: 8px; padding: 32px 24px 26px; text-align: center; }
.crest-panel svg { width: 100%; max-width: 300px; margin: 0 auto; }
.motto-en { font-family: var(--font-head); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); margin: 14px 0 0; }
.footer-motto { font-family: var(--font-head); font-style: italic; color: #e3a07f; }
.crest-about { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: center; }
.crest-small-wrap svg { width: 100%; }
@media (max-width: 760px) {
  .crest-about { grid-template-columns: 1fr; gap: 24px; }
  .crest-small-wrap { max-width: 200px; }
}
@media (max-width: 860px) {
  .hero-art { order: -1; max-width: none; }
  .crest-panel { padding: 22px 16px 18px; }
  .crest-panel svg { max-width: 210px; }
  .motto-en { font-size: 1rem; }
}
