/* Design tokens from the approved prototype */
:root {
  /* Defaults. base.html overrides --primary, --accent, --ink and the --on-* colours from Site settings. */
  --ink: #0e1b3d;
  --primary: #1f3fbf;
  --accent: #ff8a2b;
  --on-primary: #ffffff;
  --on-accent: #0e1b3d;
  --primary-soft: color-mix(in srgb, var(--primary) 12%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 25%, #fff);
  --tint: color-mix(in srgb, var(--primary) 6%, #fff);
  --line: color-mix(in srgb, var(--ink) 14%, #fff);
  --line-strong: color-mix(in srgb, var(--ink) 30%, #fff);
  --muted: color-mix(in srgb, var(--ink) 78%, #fff);
  --on-dark-muted: color-mix(in srgb, #fff 78%, var(--ink));
  --dark-line: color-mix(in srgb, #fff 18%, var(--ink));
  --whatsapp: #0f7b43;
  --radius: 20px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: #fff; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.015em; line-height: 1.12; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 clamp(20px, 4.2vw, 56px); }
.section { padding: clamp(48px, 7vw, 80px) 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--ink); color: #fff; }
.section--flush-top { padding-top: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row-between { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

.eyebrow { font-size: 14px; font-weight: 600; color: var(--primary); }
.display { font-weight: 800; font-size: clamp(30px, 5vw + 8px, 56px); letter-spacing: -0.02em; line-height: 1.08; }
.h2 { font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 680px; }
.muted { color: var(--muted); }
.link-arrow { font-weight: 600; color: var(--primary); min-height: 44px; display: inline-flex; align-items: center; }
.link-arrow:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 12px; border: 0; font-weight: 600; font-size: 16px; cursor: pointer; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover, .btn--accent:hover { filter: brightness(0.92); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--pill { border-radius: 999px; }
.btn--block { width: 100%; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 76px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.brand__mark { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 22px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.nav a:not(.btn) { padding: 10px 0; font-weight: 500; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover { color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* Hero */
.hero { background: var(--tint); padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 80px); }
.hero__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero__copy { flex: 1 1 520px; display: flex; flex-direction: column; gap: 24px; }
.hero__media { flex: 1 1 420px; min-height: 420px; border-radius: 28px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 96px; color: var(--primary); overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.badge { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.search-card { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 10px 30px rgba(14, 27, 61, 0.08); }
.search-card .field { flex: 1 1 150px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.stat__value { font-family: var(--font-display); font-weight: 800; font-size: 40px; color: var(--primary); }
.stat__label { color: var(--muted); }

/* Cards */
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: border-color 0.15s, transform 0.15s; }
a.card:hover { border-color: var(--primary); transform: translateY(-2px); }
.card__media { height: 170px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 48px; background: var(--primary-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.card__title { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.25; }
.card__meta { font-size: 14px; color: var(--muted); }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--primary-soft); color: var(--primary); }
.tag--accent { background: var(--accent-soft); color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 14px; color: var(--muted); }
.facts strong { display: block; color: var(--ink); font-weight: 600; }

/* Process steps */
.step { padding: 24px; border: 1px solid var(--dark-line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; }
.step__n { font-family: var(--font-display); font-weight: 800; font-size: 32px; color: var(--accent); }
.step p { color: var(--on-dark-muted); font-size: 15px; line-height: 1.55; }

/* Course rows */
.course-row { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.course-row__main { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; }
.course-row:hover { border-color: var(--primary); }

/* Quote */
.quote { margin: 0; padding: 32px; border-radius: 24px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.3; }
.quote figcaption { font-size: 15px; color: var(--ink); font-weight: 600; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font-size: 16px; }
.field textarea { padding: 12px; min-height: 96px; }
.field .errorlist, .form-errors { margin: 0; padding: 0; list-style: none; color: #b3261e; font-size: 14px; font-weight: 600; }
.form-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.form-card .full { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.enquiry-split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.enquiry-split > * { flex: 1 1 420px; }

/* Filters, chips, pagination */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.chip:hover { border-color: var(--primary); }
.chip[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filters { flex: 0 1 280px; min-width: 240px; display: flex; flex-direction: column; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.listing { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.listing__main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; font-weight: 600; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line-strong); }
.pagination span[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination a:hover { border-color: var(--primary); }
.empty { padding: 40px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }

/* Page header band and prose */
.page-head { background: var(--tint); padding: clamp(40px, 5vw, 64px) 0; }
.prose { max-width: 720px; font-size: 18px; line-height: 1.75; color: color-mix(in srgb, var(--ink) 88%, #fff); }
.prose p + p { margin-top: 1.1em; }
.cta-band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding: 36px; border-radius: 24px; background: var(--accent-soft); }
.cta-band--dark { background: var(--ink); color: #fff; }
.cta-band h2 { font-size: 30px; max-width: 640px; }
.team-photo { height: 240px; border-radius: var(--radius); background: color-mix(in srgb, #fff 12%, var(--ink)); overflow: hidden; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 56px; color: var(--on-dark-muted); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.messages { list-style: none; margin: 0 0 16px; padding: 0; }
.messages li { padding: 12px 16px; border-radius: 12px; background: var(--primary-soft); font-weight: 600; }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 64px 0 32px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px 64px; justify-content: space-between; font-size: 15px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h3 { font-family: var(--font-body); font-size: 16px; color: #fff; margin-bottom: 4px; }
.footer-brand { flex: 1 1 280px; max-width: 360px; }
.footer-bottom { border-top: 1px solid var(--dark-line); margin-top: 40px; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }

/* WhatsApp + chat widget */
.float-dock { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; max-width: calc(100vw - 32px); }
.float-actions { display: flex; align-items: center; gap: 12px; }
.wa-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px; background: var(--whatsapp); color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(15, 123, 67, 0.35); }
.chat-fab { width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 24px rgba(14, 27, 61, 0.3); }
.chat { width: 368px; max-width: 100%; height: min(480px, 70vh); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 48px rgba(14, 27, 61, 0.22); overflow: hidden; }
.chat[hidden] { display: none; }
.chat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--primary); color: var(--on-primary); }
.chat__title { font-weight: 600; }
.chat__sub { font-size: 13px; opacity: 0.85; }
.chat__close { width: 44px; height: 44px; border: 0; background: transparent; color: var(--on-primary); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat__log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; background: var(--tint); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.msg--user { align-self: flex-end; background: var(--primary); color: var(--on-primary); }
.msg a { color: var(--whatsapp); font-weight: 600; text-decoration: underline; }
.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat__chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--primary); background: #fff; color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer; }
.chat__lead { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.chat__lead input { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; }
.chat__lead .error { color: #b3261e; font-size: 13px; font-weight: 600; }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat__form input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 14px; }
.chat__send { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }

@media (max-width: 640px) {
  .form-card { grid-template-columns: 1fr; padding: 20px; }
  .wa-btn span { display: none; }
  .wa-btn { padding: 0; width: 56px; justify-content: center; }
  .hero__media { min-height: 260px; }
  .cta-band { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

/* Notices */
.notice { display: flex; gap: 20px; align-items: flex-start; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color 0.15s; }
.notice:hover { border-color: var(--primary); }
.notice__date { flex: 0 0 72px; text-align: center; padding: 8px 0; border-radius: 12px; background: var(--primary-soft); font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.notice__date strong { display: block; font-family: var(--font-display); font-size: 28px; color: var(--primary); }
.notice__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.attachment { display: inline-flex; align-items: center; gap: 16px; align-self: flex-start; padding: 16px 22px; border: 2px solid var(--primary); border-radius: var(--radius); color: var(--primary); font-weight: 500; line-height: 1.4; }
.attachment:hover { background: var(--primary-soft); }
.attachment strong { color: var(--ink); }
@media (max-width: 640px) { .notice { flex-direction: column; gap: 12px; } .notice__date { flex-basis: auto; align-self: flex-start; padding: 8px 16px; } }

/* Responsive: tablet and phone */
body { overflow-wrap: break-word; }
.brand { min-width: 0; }
.brand span:last-child { overflow-wrap: anywhere; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }

@media (max-width: 960px) {
  .site-header__inner { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 18px; }
  .js .nav-toggle { display: flex; }
  .js .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: 4px 0 12px; max-height: calc(100vh - 80px); overflow-y: auto; }
  .js .nav.is-open { display: flex; }
  .js .nav a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--line); }
  .js .nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .js .nav .btn { margin-top: 12px; }
  .hero__grid, .enquiry-split { gap: 32px; }
  .hero__media { min-height: 320px; }
}

@media (max-width: 640px) {
  .lead { font-size: 17px; }
  .stat__value { font-size: 32px; }
  .row-between { align-items: flex-start; }
  .cta-band { flex-direction: column; align-items: stretch; }
  .cta-band .btn { width: 100%; }
  .cta-band h2 { font-size: 24px; }
  .quote { padding: 24px; }
  .quote blockquote { font-size: 22px; }
  .course-row { padding: 18px; }
  .course-row .btn { width: 100%; }
  .filters { flex-basis: 100%; }
  .chat { width: calc(100vw - 32px); height: min(480px, 75vh); }
  .site-footer { padding-bottom: 96px; } /* keeps footer text clear of the floating chat buttons */
  .footer-grid { gap: 32px; }
}

.map-embed {
  position: relative;
  width: 100%;
  height: clamp(300px, 45vw, 440px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--tint);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}