@charset "utf-8";
/* ==========================================================================
   ST. THOMAS SCHOOL, HALLAUR — DESIGN SYSTEM
   --------------------------------------------------------------------------
   PALETTE SOURCE — the school itself, in this order of authority:

     1. The crest (welcome/sps_logo.png)  gold ring, red stars, green ribbon
     2. The uniform (prospectus, verified) DARK MAROON check, maroon blazer
     3. Campus imagery (assembly + stthomas.png)  cream/white blocks, green
        trees and lawns, yellow buses, deep blue sky
     4. The reference layout, for composition and rhythm only — NOT its colours

   The result is an institutional, not a playful, palette:

     navy-deep   #0f2742   the founding colour: hero and footer ground
     navy        #1b3f66   primary — header, buttons, bands, headings
     school-red  #9b1c2e   secondary — the maroon of the uniform
     gold        #e8a319   accent — the crest ring, the lamp flame, the buses
     paper       #f8f2e7   warm ivory page ground
     cream       #f1e7d6   the tinted band
     green       #256b45   supporting — the seedling and the ribbon
     ink         #1f2d3d   charcoal-navy body text

   CONTRAST — every text-bearing pair was measured, none ships below WCAG AA:
     ink/paper 12.6  ·  white/navy 10.8  ·  white/navy-deep 15.1
     white/school-red 8.1  ·  gold-700/paper 5.3  ·  ink/gold-fill 6.2
     gold/navy-deep 8.4  ·  muted/paper 5.2  ·  white/green 6.4

   No purple, no violet, no purple-blue gradient, no rainbow. Colour carries
   meaning: navy = the institution, maroon = the school's own, gold = honour,
   green = growth. Motifs: the ruled page, the open book, the seedling.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* --- the named palette (the nine the brief asks for) --- */
  --navy:       #0a2d57;   /* sampled from the reference: strip, card, headline */
  --navy-deep:  #061d3a;   /* the darker ground under the hero and footer   */
  --school-red: #bb1a2a;   /* sampled: the CTA red / the uniform check       */
  --gold:       #f0a413;   /* sampled: the crest ring, the lamp, the buses   */
  --cream:      #f1e7d6;
  --paper:      #f8f2e7;
  --green:      #256b45;
  --ink:        #1f2d3d;
  --muted:      #556879;

  /* channel forms, for gradients and scrims */
  --paper-rgb:  248,242,231;
  --navy-rgb:   10,45,87;
  --deep-rgb:   6,29,58;

  /* --- ink & ground --- */
  --ink-soft:   #4a5f74;   /* secondary prose            (5.9:1 on paper) */
  --ink-mute:   var(--muted);
  --paper-2:    var(--cream);
  --paper-3:    #e7d9c2;
  --line:       #e4d8c3;
  --line-soft:  #efe6d6;
  --white:      #ffffff;

  /* --- primary: navy. `--brand` stays the working name throughout. --- */
  --brand:      var(--navy);
  --brand-700:  var(--navy-deep);
  --brand-500:  #16447a;
  --brand-300:  #8fa9c2;   /* decorative only — rules, dividers, line art */
  --brand-100:  #d3e0ec;
  --brand-50:   #eaf1f7;

  /* --- accent: warm golden yellow --- */
  --gold-700:   #8a5a06;   /* gold as TEXT on paper      (5.3:1) */
  --gold-500:   #c98910;
  --gold-300:   #f1c943;   /* sampled: the open-book icon on the navy card   */
  --gold-50:    #fdf4e2;
  --on-gold:    #22303f;   /* ink used ON a gold fill    (6.2:1) */

  /* --- secondary: the uniform maroon --- */
  --red:        var(--school-red);
  --red-700:    #96101e;
  --red-300:    #e8949c;
  --red-50:     #fbeced;

  /* --- supporting green --- */
  --green-700:  #1a4f33;
  --green-400:  #3e8c64;   /* sampled: the decorative leaf icon             */
  --green-300:  #8dbfa4;
  --green-50:   #e9f3ed;

  /* --- one-off accent: used to call out a single featured card --- */
  --orange:     #c2410c;   /* white text on this fill        (5.2:1) */

  /* --- semantic --- */
  --ok:         var(--green);
  --warn:       var(--gold-700);
  --err:        var(--red-700);

  /* --- type --- */
  --f-display: "Fraunces", "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --f-body:    "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* fluid type scale — 375px → 1440px */
  --t-xs:   0.75rem;
  --t-sm:   0.8125rem;
  --t-base: clamp(0.95rem, 0.90rem + 0.20vw, 1.0625rem);
  --t-lg:   clamp(1.05rem, 0.98rem + 0.30vw, 1.1875rem);
  --t-xl:   clamp(1.20rem, 1.08rem + 0.50vw, 1.4375rem);
  --t-2xl:  clamp(1.45rem, 1.24rem + 0.90vw, 1.875rem);
  --t-3xl:  clamp(1.75rem, 1.38rem + 1.60vw, 2.625rem);
  --t-4xl:  clamp(2.10rem, 1.50rem + 2.55vw, 3.500rem);
  --t-5xl:  clamp(2.50rem, 1.60rem + 3.80vw, 4.500rem);

  /* --- space --- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 48px; --s-10: 64px;
  --s-11: 80px; --s-12: 104px;
  --gutter: clamp(18px, 4vw, 40px);
  --section-y: clamp(56px, 8vw, 112px);
  --maxw: 1240px;
  --maxw-narrow: 780px;

  /* --- shape --- */
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px; --r-xl: 32px; --r-pill: 999px;
  /* EVERY photograph on the site uses this one radius — no asymmetric masks */
  --r-img: 20px;

  /* restrained elevation — the spec bans shadow-heavy cards */
  --sh-1: 0 1px 2px rgba(10,45,87,.08);
  --sh-2: 0 6px 20px -8px rgba(10,45,87,.22);
  --sh-3: 0 18px 44px -20px rgba(10,45,87,.34);

  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: .38s;

  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
html { scroll-padding-top: calc(var(--header-h) + 20px); }

body {
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

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

::selection { background: var(--gold-300); color: var(--ink); }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 40;
}
h1 { font-size: var(--t-4xl); }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-xl); line-height: 1.25; }
h4 { font-size: var(--t-lg); line-height: 1.3; }

p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

strong, b { font-weight: 700; }

.lede { font-size: var(--t-lg); color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--ink-mute); }
.small { font-size: var(--t-sm); }

/* Eyebrow — small caps label with a short rule, used to open every section */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-family: var(--f-body);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; background: var(--gold); flex: none;
}
.eyebrow.is-light { color: var(--gold-300); }
.eyebrow.is-centered { justify-content: center; }

/* Display heading that lets one phrase carry the accent */
.accent { color: var(--gold-700); }
.accent-red { color: var(--red-700); }
.on-dark .accent { color: var(--gold-300); }

/* Serif pull-quote — used for Vision / Mission */
.quote {
  font-family: var(--f-display);
  font-size: var(--t-2xl);
  line-height: 1.35;
  font-weight: 500;
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 40;
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: var(--maxw-narrow); }
/* edge-to-edge container: the utility strip, the header and the hero use this */
.wrap-full { width: 100%; max-width: none; margin-inline: auto;
             padding-inline: clamp(18px, 4.4vw, 68px); }
.section { padding-block: var(--section-y); position: relative; }
.section-tight { padding-block: clamp(40px, 5vw, 72px); }

.grid { display: grid; gap: var(--s-7); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

.stack > * + * { margin-top: var(--s-4); }
.flow > * + * { margin-top: var(--s-5); }

/* Editorial split — deliberately asymmetric so sections don't all centre */
.split { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split-7-5 { grid-template-columns: 7fr 5fr; }
.split-5-7 { grid-template-columns: 5fr 7fr; }
.split-6-6 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) {
  .split-7-5, .split-5-7, .split-6-6 { grid-template-columns: 1fr; }
  .split-5-7 > .split-media { order: -1; }
}

.section-head { max-width: 640px; margin-bottom: var(--s-9); }
.section-head.is-centered { margin-inline: auto; text-align: center; }
.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-7); margin-bottom: var(--s-9); flex-wrap: wrap;
}
.section-head-row .section-head { margin-bottom: 0; }

/* Tonal grounds */
.on-tint { background: var(--paper-2); }
.on-dark { background: var(--ink); color: #e9f0f2; }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark .lede, .on-dark p { color: #c2d2d7; }
.on-brand { background: var(--brand); color: #e4f0f2; }
.on-brand h1, .on-brand h2, .on-brand h3 { color: #fff; }

/* --------------------------------------------------------------------------
   5. MOTIFS — the ruled page, the flame, the seedling
   -------------------------------------------------------------------------- */

/* Faint notebook ruling, used behind quiet sections */
.ruled {
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 31px, var(--line-soft) 31px 32px);
}
.ruled-tint { background-color: var(--paper-2); }

/* A single hand-drawn underline beneath a heading */
.underline-mark { position: relative; display: inline-block; }
.underline-mark::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -.12em; height: .34em;
  background: var(--gold-300);
  opacity: .55;
  border-radius: var(--r-pill);
  z-index: -1;
}

/* Corner rule used on editorial blocks instead of a card border */
.rule-left { border-left: 3px solid var(--gold); padding-left: var(--s-6); }
.rule-top  { border-top: 2px solid var(--line); padding-top: var(--s-6); }

/* --------------------------------------------------------------------------
   6. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-7);
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: var(--t-sm);
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* primary = the school red of the reference CTA (white on it: 6.4:1) */
.btn-primary { background: var(--school-red); color: #fff; border-color: var(--school-red); }
.btn-primary:hover { background: var(--red-700); border-color: var(--red-700); }

/* the gold fill, kept for secondary calls to action on dark grounds */
.btn-gold { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--on-gold); }

.btn-brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-brand:hover { background: var(--brand-700); border-color: var(--brand-700); }

.btn-ghost { border-color: var(--brand-300); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.btn-ghost-light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--navy); border-color: #fff; }

.btn-sm { min-height: 40px; padding: 0 var(--s-5); font-size: var(--t-xs); }

/* Text link that grows an underline */
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: 700; font-size: var(--t-sm);
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size var(--dur) var(--ease);
}
.link-arrow:hover { background-size: 100% 2px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.on-dark .link-arrow { color: var(--gold-300); }

/* --------------------------------------------------------------------------
   7. IMAGE TREATMENT
   -------------------------------------------------------------------------- */
/* ONE radius for every photograph on the site. The asymmetric leaf/arch
   masks were removed on request: they cut portraits unevenly (a fully curved
   top with a square bottom-left). `.ph-leaf` / `.ph-arch` are kept as aliases
   only so existing markup keeps working — they are no longer a shape. */
.ph { position: relative; overflow: hidden; background: var(--paper-3);
      border-radius: var(--r-img); }
.ph img { width: 100%; height: 100%; object-fit: cover; }

.ph-r, .ph-xl, .ph-leaf, .ph-arch { border-radius: var(--r-img); }

.ph-4x3  { aspect-ratio: 4/3; }
.ph-3x2  { aspect-ratio: 3/2; }
.ph-16x9 { aspect-ratio: 16/9; }
.ph-1x1  { aspect-ratio: 1/1; }
.ph-4x5  { aspect-ratio: 4/5; }

.ph-zoom img { transition: transform .8s var(--ease); }
a:hover .ph-zoom img, .ph-zoom:hover img { transform: scale(1.045); }

/* readable scrim for text sitting on a photograph */
.ph-scrim::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(26,42,54,.93) 0%, rgba(26,42,54,.74) 28%,
    rgba(26,42,54,.22) 62%, rgba(26,42,54,0) 100%);
}
.ph-scrim > * { position: relative; z-index: 2; }

/* --------------------------------------------------------------------------
   8. FORMS
   -------------------------------------------------------------------------- */
.field { display: block; }
.field + .field { margin-top: var(--s-5); }
.label {
  display: block; font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: var(--s-2);
}
.label .req { color: var(--red); }

.input, .textarea, .select {
  width: 100%;
  min-height: 50px;
  padding: 12px var(--s-4);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.textarea { min-height: 140px; resize: vertical; padding-top: var(--s-3); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--err); box-shadow: 0 0 0 3px var(--red-50);
}
.field-err { display: block; margin-top: 6px; font-size: var(--t-xs); color: var(--err); font-weight: 600; }
.hint { margin-top: 6px; font-size: var(--t-xs); color: var(--ink-mute); }

.alert {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  border-left: 4px solid;
  font-size: var(--t-sm);
  margin-bottom: var(--s-6);
}
.alert-ok  { background: #eef7f1; border-color: var(--ok);  color: #1d5537; }
.alert-err { background: var(--red-50); border-color: var(--err); color: #7d2314; }
.alert-info{ background: var(--brand-50); border-color: var(--brand); color: var(--brand-700); }

/* --------------------------------------------------------------------------
   9. UTILITIES
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; translate: -50% -120%;
  z-index: 2000; background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 700; font-size: var(--t-sm);
  transition: translate .2s var(--ease);
}
.skip-link:focus { translate: -50% 0; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.hide { display: none !important; }
@media (max-width: 900px) { .hide-md { display: none !important; } }
@media (max-width: 620px) { .hide-sm { display: none !important; } }

/* --------------------------------------------------------------------------
   10. MOTION — restrained, and fully disabled on request
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   11. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .btn, .to-top, .offcanvas { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 16px; }
}
