/* =========================================================
   Wesley College — Design Tokens
   Palette:  --ink #16302A (deep pine, primary)
             --ink-light #23463A (secondary green)
             --cream #F2EDE1 (parchment background)
             --gold #B8923D (brass accent)
             --charcoal #23231F (body text)
             --rule #D8CFB8 (hairline rule on cream)
   Type:     Display — "Fraunces" (characterful serif, ledger headlines)
             Body    — "Source Sans 3" (quiet, legible sans)
             Mono/Utility — "IBM Plex Mono" (timetable + data, the "ledger" voice)
   Signature: the school day, rendered as a printed period-timetable strip
              that runs through the hero and recurs as a structural device.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,500&family=Source+Sans+3:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #4c1519;
  --ink-light: #f2a534;
  --cream: #F2EDE1;
  --cream-deep: #E9E2D0;
  --gold: #B8923D;
  --gold-bright: #D2AC5C;
  --charcoal: #23231F;
  --rule: #D8CFB8;
  --white: #FCFAF4;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;

  --max: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid rgba(184,146,61,0.35);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand img { width: 38px; height: 38px; }
.brand-text {
  font-family: var(--display);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand-text span {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--gold-bright);
  font-weight: 400;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--cream);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transition: right 0.25s ease;
}
.nav-links a:hover { color: var(--gold-bright); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--gold-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  border-radius: 4px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: var(--cream);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 18px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid rgba(184,146,61,0.35);
  }
  .nav-links.open { max-height: 360px; }
  .nav-links a {
    display: block;
    padding: 0.95rem var(--pad);
    border-top: 1px solid rgba(242,237,225,0.08);
  }
}


/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  max-width: var(--max);
  margin: 0 auto;
}
.hero-copy {
  padding: clamp(3rem, 8vw, 5.5rem) var(--pad) clamp(3rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin-bottom: 0.4em;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-bright);
}
.hero-lede {
  color: var(--cream-deep);
  font-size: 1.08rem;
  max-width: 36ch;
  margin-bottom: 1.8em;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-image {
  position: relative;
  min-height: 320px;
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-image::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, var(--ink) 0%, transparent 40%);
}
.hero-tag {
  position: absolute;
  bottom: 1.5rem; left: 1.5rem;
  background: rgba(22,48,42,0.88);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.85rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover { background: var(--gold-bright); }
.btn-ghost {
  border-color: rgba(242,237,225,0.4);
  color: var(--cream);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.btn-dark {
  background: var(--ink);
  color: var(--cream);
}
.btn-dark:hover { background: var(--ink-light); }

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head {
  max-width: 56ch;
  margin-bottom: 2.8rem;
}
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-head p { color: #5a564b; font-size: 1.05rem; }

.alt { background: var(--white); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.dark { background: var(--ink); color: var(--cream); }
.dark h2, .dark h3, .dark h4 { color: var(--white); }
.dark .section-head p { color: var(--cream-deep); }

/* ---------- Card grid ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image { min-height: 260px; }
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 2rem 1.75rem;
  position: relative;
}
.card .num {
  font-family: var(--mono);
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.25rem; }
.card p { color: #5a564b; font-size: 0.96rem; margin-bottom: 0; }

/* ---------- Notice board (index signature) ---------- */
.noticeboard {
  background: var(--cream-deep);
  border: 1px solid var(--rule);
}
.notice {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.3rem var(--pad);
  border-bottom: 1px solid var(--rule);
}
.notice:last-child { border-bottom: none; }
.notice-date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--gold);
  text-align: center;
  padding: 0.5rem 0.3rem;
  line-height: 1.3;
}
.notice-date b { display: block; font-size: 1.1rem; }
.notice h4 { margin: 0 0 0.2em; font-size: 1.05rem; }
.notice p { margin: 0; color: #5a564b; font-size: 0.9rem; }
.notice-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-light);
  border: 1px solid var(--ink-light);
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  text-transform: uppercase;
}
@media (max-width: 700px) {
  .notice { grid-template-columns: 64px 1fr; }
  .notice-tag { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(184,146,61,0.3);
  border-bottom: 1px solid rgba(184,146,61,0.3);
}
.stat {
  padding: 2.2rem 1.5rem;
  border-right: 1px solid rgba(184,146,61,0.3);
  text-align: center;
}
.stat:last-child { border-right: none; }
.stat .n {
  font-family: var(--display);
  font-size: 2.4rem;
  color: var(--gold-bright);
  display: block;
}
.stat .l {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-deep);
}
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom: 1px solid rgba(184,146,61,0.3); }
}

/* ---------- Pull quote ---------- */
.pull {
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 2rem 0;
}
.pull cite {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #8a8470;
  margin-top: 0.6em;
}

/* ---------- Timeline (about page) ---------- */
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--rule);
}
.timeline-item { position: relative; padding-bottom: 2.4rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute; left: -2.2rem; top: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--gold);
}
.timeline-item .yr {
  font-family: var(--mono);
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}
.timeline-item h4 { margin: 0.2em 0 0.3em; }
.timeline-item p { color: #5a564b; margin: 0; }

/* ---------- Values grid ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.value {
  background: var(--white);
  padding: 2rem 1.5rem;
}
.value .letter {
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.4rem;
}
.value h4 { font-size: 1.05rem; margin-bottom: 0.4em; }
.value p { font-size: 0.9rem; color: #5a564b; margin: 0; }
@media (max-width: 900px) {
  .values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .values { grid-template-columns: 1fr; }
}

/* ---------- People ---------- */
.person {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: center;
}
.person img { border: 1px solid var(--rule); }
.person .eyebrow { margin-bottom: 0.6em; }
@media (max-width: 700px) {
  .person { grid-template-columns: 1fr; }
  .person img { max-width: 220px; }
}

/* ---------- Steps (enrollment) ---------- */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--rule);
}
.step:last-child { border-bottom: none; }
.step .stepnum {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 600;
}
.step h4 { margin-bottom: 0.3em; }
.step p { color: #5a564b; margin: 0; }

/* ---------- Tables (tuition / requirements) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; background: var(--white); }
th, td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
thead th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  background: var(--cream-deep);
}
tbody tr:last-child td { border-bottom: none; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--rule);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

input, select, textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 0.97rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule);
  background: var(--cream);
  color: var(--charcoal);
  border-radius: 2px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
}
textarea { resize: vertical; min-height: 120px; }

.field-error {
  color: #9c3b2e;
  font-size: 0.82rem;
  margin-top: 0.4rem;
  display: none;
  font-family: var(--mono);
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #9c3b2e; }
.field.invalid .field-error { display: block; }

.form-note {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #8a8470;
  margin-top: 1.2rem;
}

.form-success {
  display: none;
  background: var(--ink);
  color: var(--cream);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.6rem;
  border-left: 3px solid var(--gold);
  font-size: 0.95rem;
}
.form-success.show { display: block; }

/* ---------- Contact info blocks ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.info-list li:last-child { border-bottom: none; }
.info-list .k {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.map-frame {
  border: 1px solid var(--rule);
  height: 100%;
  min-height: 320px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; min-height: 320px; }

/* ---------- FAQ (accordion) ---------- */
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.3rem 0;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q .icon {
  font-family: var(--mono);
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-q[aria-expanded="true"] .icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: #5a564b;
}
.faq-a p { padding-bottom: 1.3rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream-deep);
  padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(242,237,225,0.12);
}
.footer-brand { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer-brand img { width: 34px; height: 34px; }
.footer-brand span { font-family: var(--display); color: var(--white); font-size: 1.1rem; }
.footer-grid p { font-size: 0.9rem; color: #b9c2bb; }
.footer-col h5 {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.65rem; }
.footer-col a { text-decoration: none; color: var(--cream-deep); font-size: 0.92rem; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: #8a9890;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Page banner (interior pages) ---------- */
.page-banner {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(2.8rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 2.8rem);
}
.page-banner h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.3em; }
.page-banner p { color: var(--cream-deep); max-width: 50ch; margin: 0; }
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--cream-deep); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-bright); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--gold);
  color: var(--ink);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}
.cta-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.cta-band h2 { color: var(--ink); margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band .btn-dark:hover { background: var(--charcoal); }