/* The Lawrence School, Lovedale — tender design sample (Subhank Enterprises) */
/* Self-hosted fonts (SIL Open Font License) */
@font-face { font-family: "Libre Caslon Display"; src: url("../fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("../fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("../fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../fonts/libre-franklin-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../fonts/libre-franklin-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("../fonts/libre-franklin-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #17241d;
  --shola: #1e3a2c;
  --moss: #3f6b52;
  --mist: #edf1ee;
  --mist-2: #e1e8e3;
  --stone: #56625d;
  --line: #c9d4cd;
  --kurinji: #5a4fa0;
  --kurinji-dark: #463d82;
  --kurinji-soft: #e7e4f4;
  --paper: #ffffff;
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Libre Franklin", "Segoe UI", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--kurinji); text-underline-offset: 3px; }
a:hover { color: var(--kurinji-dark); }
:focus-visible { outline: 3px solid var(--kurinji); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-weight: 400; color: var(--shola); margin: 0; }
h1 { font-family: var(--display); line-height: 1.05; }
h2 { font-family: var(--display); font-size: clamp(30px, 3.4vw, 42px); line-height: 1.12; }
h3 { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
p { margin: 0 0 1em; }

/* Tender notice */
.sample-note {
  background: var(--kurinji);
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 6px var(--gutter);
}

/* Utility bar */
.utility { background: var(--shola); color: #dfe8e2; font-size: 14px; }
.utility .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.utility a { color: #dfe8e2; text-decoration: none; }
.utility a:hover { color: #fff; text-decoration: underline; }
.utility ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.utility .phone { opacity: .85; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--shola); }
.crest { width: 52px; height: 60px; object-fit: contain; }
.crest-fallback {
  width: 52px; height: 60px; display: grid; place-items: center;
  border: 1.5px solid var(--shola); border-radius: 0 0 26px 26px;
  font-family: var(--serif); font-size: 18px; color: var(--shola);
}
.brand-name { font-family: var(--serif); font-size: 21px; line-height: 1.15; }
.brand-name span { display: block; font-family: var(--sans); font-size: 13px; color: var(--stone); letter-spacing: .02em; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 10px 12px; text-decoration: none;
  color: var(--ink); font-weight: 500; font-size: 15px; border-radius: 4px;
}
.main-nav a:hover { background: var(--mist); color: var(--shola); }
.main-nav a[aria-current="page"] { color: var(--kurinji); box-shadow: inset 0 -2px 0 var(--kurinji); border-radius: 0; }
.main-nav .nav-cta a { background: var(--kurinji); color: #fff; margin-left: 8px; }
.main-nav .nav-cta a:hover { background: var(--kurinji-dark); color: #fff; }
.nav-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 4px; font-weight: 600;
  font-size: 16px; text-decoration: none; border: 1.5px solid transparent;
}
.btn-primary { background: var(--kurinji); color: #fff; }
.btn-primary:hover { background: var(--kurinji-dark); color: #fff; }
.btn-quiet { border-color: currentColor; color: var(--shola); }
.btn-quiet:hover { background: var(--shola); color: #fff; border-color: var(--shola); }

/* Photo slots: real School photos go in /images; contour fallback shows until then */
.photo {
  position: relative; overflow: hidden;
  background:
    url("../images/contour.svg") center / cover no-repeat,
    linear-gradient(160deg, #2c5640 0%, var(--shola) 70%);
}
.photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.photo .slot-label {
  position: absolute; left: 14px; bottom: 12px; z-index: 0;
  font-size: 12px; color: rgba(255,255,255,.75);
}

/* Hero */
.hero { position: relative; background: var(--shola); color: #fff; }
.hero .photo { position: absolute; inset: 0; }
.hero .photo img { opacity: .82; }
.hero .slot-label { left: auto; right: var(--gutter); bottom: 16px; }
.hero-inner { position: relative; z-index: 2; min-height: min(78vh, 680px); display: grid; align-items: end; padding: 120px 0 0; }
.hero-panel {
  background: var(--paper); color: var(--ink);
  max-width: 720px; padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px) 32px;
  border-top: 6px solid var(--kurinji);
}
.hero h1 { font-size: clamp(52px, 7.4vw, 100px); color: var(--shola); margin-bottom: 18px; letter-spacing: -.01em; }
.hero-lede { font-size: 19px; max-width: 34em; color: var(--ink); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero-facts {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0 28px;
  margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
}
.hero-facts dt { font-size: 13px; color: var(--stone); }
.hero-facts dd { margin: 0; font-family: var(--serif); font-size: 20px; color: var(--shola); }
.altitude {
  position: absolute; right: var(--gutter); top: 40px; z-index: 2;
  font-family: var(--serif); font-size: 15px; color: rgba(255,255,255,.9);
  writing-mode: vertical-rl; letter-spacing: .08em;
}
.altitude::after { content: ""; display: inline-block; width: 1px; height: 120px; background: rgba(255,255,255,.6); margin-top: 12px; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head p { color: var(--stone); max-width: 40em; margin: 10px 0 0; }

/* Paths */
.paths { background: var(--paper); border-bottom: 1px solid var(--line); }
.paths .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.path { padding: 34px 32px 34px 0; }
.path + .path { padding-left: 32px; border-left: 1px solid var(--line); }
.path h2 { font-family: var(--serif); font-size: 22px; margin-bottom: 12px; }
.path ul { list-style: none; padding: 0; margin: 0; }
.path li { padding: 6px 0; border-top: 1px solid var(--mist-2); }
.path li:first-child { border-top: 0; }
.path a { text-decoration: none; font-weight: 500; }
.path a:hover { text-decoration: underline; }

/* Welcome */
.welcome .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.welcome .photo { aspect-ratio: 4 / 5; border-radius: 2px; }
.welcome-text p { font-family: var(--serif); font-size: 19px; line-height: 1.7; max-width: 32em; }
.welcome-text h2 { margin-bottom: 22px; }
.signoff { font-family: var(--sans) !important; font-size: 15px !important; color: var(--stone); }

/* Schools */
.schools { background: var(--paper); }
.school-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.school .photo { aspect-ratio: 3 / 2; margin-bottom: 16px; }
.school h3 a { color: var(--shola); text-decoration: none; }
.school h3 a:hover { color: var(--kurinji); text-decoration: underline; }
.school p { color: var(--stone); font-size: 16px; margin-top: 6px; }

/* News + notices */
.updates .wrap { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(32px, 5vw, 64px); }
.news-item { display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding: 22px 0; border-top: 1px solid var(--line); }
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-item .photo { aspect-ratio: 4 / 3; }
.news-item time { font-size: 14px; color: var(--stone); }
.news-item h3 { margin: 4px 0 8px; }
.news-item h3 a { color: var(--shola); text-decoration: none; }
.news-item h3 a:hover { color: var(--kurinji); text-decoration: underline; }
.news-item p { font-size: 16px; color: var(--stone); margin: 0; }
.notices { background: var(--paper); padding: 28px; border-top: 6px solid var(--shola); align-self: start; }
.notices h2 { font-size: 30px; margin-bottom: 14px; }
.notices ul { list-style: none; margin: 0 0 20px; padding: 0; }
.notices li { padding: 12px 0; border-top: 1px solid var(--mist-2); }
.notices li a { font-weight: 500; text-decoration: none; color: var(--ink); }
.notices li a:hover { color: var(--kurinji); text-decoration: underline; }
.notices .meta { display: block; font-size: 13px; color: var(--stone); }
.file-tag { font-size: 12px; font-weight: 600; color: var(--kurinji); border: 1px solid var(--kurinji-soft); background: var(--kurinji-soft); padding: 1px 6px; border-radius: 3px; margin-left: 6px; }

/* Life at Lovedale */
.life { background: var(--shola); color: #e7eee9; position: relative; overflow: hidden; }
.life::before { content: ""; position: absolute; inset: 0; background: url("../images/contour.svg") right center / 900px auto no-repeat; opacity: .35; }
.life .wrap { position: relative; display: grid; grid-template-columns: 4fr 7fr; gap: clamp(32px, 6vw, 80px); }
.life h2 { color: #fff; margin-bottom: 18px; }
.life p { color: #cfdcd3; }
.life a { color: #fff; }
.activity-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.activity-cols h3 { color: #fff; font-size: 19px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.25); }
.activity-cols ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.activity-cols li { padding: 4px 0; }
.activity-cols li a { color: #e7eee9; text-decoration: none; }
.activity-cols li a:hover { color: #fff; text-decoration: underline; }

/* Alumni */
.alumni .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.alumni h2 { max-width: 16em; }
.alumni p { color: var(--stone); max-width: 36em; margin-top: 12px; }

/* Footer */
.site-footer { background: #142a1f; color: #c3d1c8; font-size: 15px; padding: 56px 0 24px; }
.site-footer a { color: #e7eee9; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 4fr 3fr 3fr 3fr; gap: 32px; }
.site-footer h2 { font-family: var(--serif); font-size: 18px; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.motto { font-family: var(--display); font-size: 30px; color: #fff; margin-bottom: 10px; }
.footer-base { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* Inner pages */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 28px 0 36px; }
.breadcrumb ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--stone); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb a { color: var(--stone); }
.page-head h1 { font-size: clamp(40px, 5.5vw, 68px); }
.page-head .lede { font-family: var(--serif); font-size: 20px; max-width: 36em; margin-top: 14px; color: var(--ink); }
.page-body .wrap { display: grid; grid-template-columns: 260px 1fr; gap: clamp(32px, 5vw, 64px); padding-top: 48px; padding-bottom: 80px; }
.side-nav { align-self: start; position: sticky; top: 110px; }
.side-nav h2 { font-family: var(--serif); font-size: 18px; margin-bottom: 10px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.side-nav a { display: block; padding: 6px 14px; text-decoration: none; color: var(--ink); font-size: 15px; margin-left: -2px; border-left: 2px solid transparent; }
.side-nav a:hover { color: var(--kurinji); border-left-color: var(--kurinji-soft); }
.side-nav a[aria-current="page"] { color: var(--kurinji); font-weight: 600; border-left-color: var(--kurinji); }
.side-nav details summary { display: none; }

.content { max-width: 760px; }
.content > p, .content li { font-size: 18px; }
.content h2 { font-size: 34px; margin: 48px 0 16px; }
.content figure { margin: 0 0 32px; }
.content figure .photo { aspect-ratio: 16 / 9; }
.content figcaption { font-size: 14px; color: var(--stone); margin-top: 8px; }
.cms-note { font-size: 14px; color: var(--kurinji-dark); background: var(--kurinji-soft); padding: 10px 14px; border-radius: 4px; margin: 0 0 24px; }
.at-glance { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 8px 0 24px; border-top: 1px solid var(--line); }
.at-glance div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.at-glance dt { font-size: 14px; color: var(--stone); }
.at-glance dd { margin: 2px 0 0; font-family: var(--serif); font-size: 19px; color: var(--shola); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery .photo { aspect-ratio: 1; }
.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.downloads li:last-child { border-bottom: 1px solid var(--line); }
.page-meta { margin-top: 48px; font-size: 14px; color: var(--stone); }

/* Disclosure table */
.doc-table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 16px; }
.doc-table caption { text-align: left; font-family: var(--serif); font-size: 22px; color: var(--shola); padding: 0 0 12px; }
.doc-table th, .doc-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table thead th { background: var(--shola); color: #fff; font-weight: 600; font-size: 14px; }
.doc-table td:first-child { color: var(--stone); width: 48px; }
.doc-table td:last-child { white-space: nowrap; }
.doc-table tbody tr:hover { background: var(--mist); }
.doc-search { display: flex; gap: 10px; margin: 0 0 20px; }
.doc-search input { flex: 1; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.empty-row { display: none; color: var(--stone); padding: 18px 14px; }

/* Responsive */
@media (max-width: 1080px) {
  .main-nav ul { gap: 0; }
  .main-nav a { padding: 10px 8px; font-size: 14px; }
  .school-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600;
    background: none; border: 1.5px solid var(--shola); color: var(--shola); padding: 8px 14px; border-radius: 4px; cursor: pointer;
  }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .main-nav a { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--mist-2); border-radius: 0; }
  .main-nav .nav-cta a { margin: 12px 0 0; text-align: center; border-radius: 4px; }
  .site-header { position: sticky; }
  .site-header .wrap { position: static; }
  .paths .wrap { grid-template-columns: 1fr; }
  .path, .path + .path { padding: 24px 0; border-left: 0; }
  .path + .path { border-top: 1px solid var(--line); }
  .welcome .wrap, .updates .wrap, .life .wrap { grid-template-columns: 1fr; }
  .welcome .photo { aspect-ratio: 16 / 10; }
  .activity-cols { grid-template-columns: 1fr 1fr; }
  .page-body .wrap { grid-template-columns: 1fr; padding-top: 24px; }
  .side-nav { position: static; }
  .side-nav details summary { display: block; cursor: pointer; font-weight: 600; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
  .side-nav details:not([open]) ul { display: none; }
  .side-nav details[open] ul { margin-top: 10px; }
  .side-nav h2 { display: none; }
  .altitude { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .utility .phone { display: none; }
  .utility ul { gap: 14px; }
  .brand-name { font-size: 17px; }
  .crest, .crest-fallback { width: 42px; height: 48px; }
  .hero-inner { padding-top: 220px; min-height: 0; }
  .hero .hero-inner { padding-left: 0; padding-right: 0; }
  .hero-panel { border-top-width: 5px; }
  .hero .slot-label { top: 14px; bottom: auto; left: var(--gutter); right: auto; }
  .hero-facts { grid-template-columns: repeat(2, auto); gap: 12px 28px; }
  .school-list { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 12px; }
  .news-item .photo { aspect-ratio: 16 / 9; }
  .activity-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .at-glance { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .doc-table thead { display: none; }
  .doc-table tr { display: grid; grid-template-columns: 40px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .doc-table td { border: 0; padding: 4px 8px; }
  .doc-table td:last-child { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
.brand-name .since { display: inline; font-size: inherit; color: inherit; letter-spacing: inherit; }
@media (max-width: 600px) { .brand-name .since { display: none; } .utility { font-size: 13px; } }
.photo img + .slot-label { display: none; }
