/* ==========================================================================
   Adorable British College — Design tokens
   Palette: Oxford navy, brass gold, parchment, quad forest green
   Type: Fraunces (display/serif) + Source Sans 3 (body) + IBM Plex Mono (eyebrows)
   Signature motif: the "House Bar" — a ruled strip of house colours used as
   a recurring divider, echoing the school-house system referenced throughout
   the Student Life section.
   #a32c30
   ========================================================================== */

:root {
  --navy: #a31419;
  --navy-light: #d9182b;
  --navy-deep: #8a1517;
  --navy: #122442;
  --navy-deep: #0b1830;
  /*--gold: #ecad3c;*/
  --gold: #c9973d;
  --gold-light: #e3c179;
  --forest: #2f5233;
  --parchment: #f6f1e4;
  --parchment-dark: #ece3cd;
  --ink: #1a1d24;
  --ink-soft: #4a4f5c;
  --white: #ffffff;
  --rule: rgba(18, 36, 66, 0.14);
  --shadow: 0 12px 30px rgba(11, 24, 48, 0.12);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --radius: 6px;
  --container: 1180px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy-deep);
}
p { margin: 0 0 1em; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-deep); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- House Bar (signature element) ---------- */
.house-bar {
  display: flex;
  width: 100%;
  height: 6px;
}
.house-bar span { flex: 1; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 7px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
}
.brand-crest {
  width: 42px;
  height: 42px;
  /*border-radius: 50%;
  bord*/er: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 400;
  margin-top: 2px;
}
.logo-icon {

}
.logo-title {

}
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  border-color: var(--gold);
}
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  color: var(--white);
  padding: 8px 10px;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 6px 0 18px;
}
.mobile-nav a {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  font-weight: 600;
}

@media (max-width: 900px) {
  .logo-title { display: none; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .mobile-nav.is-open { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 34px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding: 96px 0 76px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  margin-bottom: 20px;
}
.hero p.lede {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.82);
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-panel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 26px;
  backdrop-filter: blur(2px);
}
.hero-panel dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0;
}
.hero-panel .stat-row { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,0.2); padding-bottom: 12px; }
.hero-panel dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-light); }
.hero-panel dd { margin: 0; font-family: var(--font-display); font-size: 1.4rem; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 48px; }
}

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--parchment); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2 { color: var(--white); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-foot { margin-top: 40px; }

/* ---------- Grids & Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-media { aspect-ratio: 4/3; overflow: hidden; background: var(--parchment-dark); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px; }
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  background: rgba(47,82,51,0.1);
  padding: 4px 9px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }

.value-card { padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--white); }
.value-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--navy); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; margin-bottom: 14px;
}

/* ---------- Filter bar (htmx targets) ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px;
}
.filter-chip {
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--white);
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-chip.active,
.filter-chip:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.htmx-indicator { opacity: 0; transition: opacity 0.15s ease; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }
#gallery-grid, #facilities-grid, #news-list { min-height: 120px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.85rem; font-weight: 600; color: var(--navy-deep); }
.field-input {
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}
.field-input:focus { border-color: var(--gold); }
.field-checkbox { width: 18px; height: 18px; margin-right: 8px; }
.checkbox-row { display: flex; align-items: center; }
.form-errors { color: #b3261e; font-size: 0.82rem; margin-top: 4px; }
.form-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-success {
  background: rgba(47,82,51,0.08);
  border: 1px solid rgba(47,82,51,0.3);
  color: var(--forest);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
}
.form-success h3 { color: var(--forest); }

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  padding: 18px 4px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  color: var(--navy-deep);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--gold); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 4px 20px; color: var(--ink-soft); }
.faq-search { margin-bottom: 24px; }

/* ---------- Timeline (admissions steps) ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 860px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }
.timeline-step { position: relative; padding-top: 44px; }
.timeline-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  position: absolute; top: 0; left: 0;
  border-top: 2px solid var(--gold);
  padding-top: 10px;
  width: 100%;
}

/* ---------- Staff / People ---------- */
.people-card { text-align: center; }
.people-photo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--parchment-dark);
  margin: 0 auto 14px;
  max-width: 160px;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}
.people-photo img { width: 100%; height: 100%; object-fit: cover; }
.people-role { color: var(--gold); font-size: 0.85rem; font-weight: 600; }

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: var(--white);
  border-left: 3px solid var(--gold);
  padding: 26px;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.testimonial-quote { font-family: var(--font-display); font-size: 1.05rem; color: var(--navy-deep); margin-bottom: 14px; }
.testimonial-author { font-weight: 700; font-size: 0.9rem; }
.testimonial-role { color: var(--ink-soft); font-size: 0.82rem; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--parchment-dark); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(11,24,48,0.82), transparent);
  color: var(--white); font-size: 0.78rem; padding: 22px 10px 8px;
}

/* ---------- Facts strip ---------- */
.facts-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 700px) { .facts-strip { grid-template-columns: repeat(2, 1fr); } }
.fact { padding: 26px 20px; text-align: center; border-right: 1px solid var(--rule); }
.fact:last-child { border-right: none; }
.fact strong { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--navy); }
.fact span { font-size: 0.8rem; color: var(--ink-soft); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.75); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.footer-grid a { display: block; padding: 5px 0; font-size: 0.88rem; color: rgba(255,255,255,0.68); }
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.78rem;
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}
.social-row a:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Breadcrumb / page header ---------- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 54px 0 44px;
}
.page-header h1 { color: var(--white); margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.75); max-width: 60ch; margin-bottom: 0; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.muted { color: var(--ink-soft); }
.badge-gold {
  display: inline-block;
  background: rgba(201,151,61,0.15);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}
