/* =====================================================================================
   Don Bosco College, Kohima — Public design system
   Palette "soft burgundy on ivory": ivory page · burgundy brand · deep wine headings · antique gold accents · ink text
   Layers: tokens → base → layout → components → chrome (header/nav/footer) → utilities
   ===================================================================================== */

@layer tokens, base, layout, components, chrome, utilities;

/* ----------------------------------------------------------------------------- tokens */
@layer tokens {
  :root {
    /* Brand colours */
    /* Brand colours ("maroon" names kept so every component follows the new palette) */
    --maroon:        #8C2A35;   /* soft burgundy: buttons, accents (7.6:1 on ivory) */
    --maroon-deep:   #74202B;
    --maroon-ink:    #5A1520;   /* deep wine: headings, strong text (11:1 on ivory) */
    --maroon-soft:   #A63D49;
    --maroon-tint:   #F5E6E3;   /* blush */
    --blush:         #EFDCD6;

    --cream:         #F7F0E6;   /* ivory page */
    --cream-alt:     #EFE5D6;
    --cream-line:    #E2D3BC;
    --paper:         #FFFCF7;
    --ivory:         #FBF6EE;   /* text on burgundy, never re-scoped */

    --gold:          #A8843F;   /* antique gold: rules, icons, large accents */
    --gold-bright:   #C9A55E;   /* gold on burgundy surfaces */
    --gold-deep:     #8C6C2E;   /* gold text on ivory (4.6:1) */
    --gold-ink:      #75591F;   /* small gold text on ivory (6:1) */

    --ink:           #231A17;   /* body text, warm black */
    --ink-soft:      #4E433D;
    --ink-muted:     #6F645C;
    --on-dark:       #FBF6EE;   /* text on burgundy (re-scoped to wine inside light chrome) */
    --on-dark-soft:  rgba(251, 246, 238, .82);

    --success:       #2F6B3A;
    --danger:        #A1232F;

    /* Typography */
    --font-display:  "Lora", Georgia, "Times New Roman", serif;
    --font-body:     "Lora", Georgia, "Times New Roman", serif;

    --fs-xs:   .78rem;
    --fs-sm:   .875rem;
    --fs-base: 1rem;
    --fs-md:   1.125rem;
    --fs-lg:   clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
    --fs-h4:   clamp(1.3rem, 1.15rem + .6vw, 1.6rem);
    --fs-h3:   clamp(1.6rem, 1.35rem + 1vw, 2.1rem);
    --fs-h2:   clamp(2rem, 1.6rem + 1.8vw, 3.1rem);
    --fs-h1:   clamp(2.5rem, 1.9rem + 2.8vw, 4.4rem);
    --fs-display: clamp(3rem, 2rem + 5vw, 6.5rem);

    --lh-tight: 1.1;
    --lh-snug:  1.3;
    --lh-body:  1.7;
    --tracking-caps: .16em;

    /* Spacing (8pt) */
    --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem;
    --sp-6: 2rem;   --sp-7: 3rem;  --sp-8: 4rem;   --sp-9: 6rem; --sp-10: 8rem;
    --section-y: clamp(3.5rem, 2rem + 6vw, 7.5rem);
    --gutter: clamp(1rem, .5rem + 2.5vw, 2.5rem);
    --container: 1280px;
    --container-narrow: 820px;

    /* Shape & depth */
    --radius-sm: 2px;
    --radius:    4px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 2px rgba(90, 21, 32, .05), 0 2px 8px rgba(90, 21, 32, .05);
    --shadow:    0 10px 30px rgba(90, 21, 32, .09), 0 2px 6px rgba(90, 21, 32, .05);
    --shadow-lg: 0 26px 70px rgba(90, 21, 32, .14), 0 6px 18px rgba(90, 21, 32, .06);
    --hairline: 1px solid var(--cream-line);
    --gold-rule: 1px solid rgba(168, 132, 63, .5);

    /* Motion */
    --ease-out:  cubic-bezier(.22, 1, .36, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --dur-fast: 160ms;
    --dur:      280ms;
    --dur-slow: 600ms;

    /* Chrome */
    --topbar-h: 40px;
    --header-h: 88px;           /* brand row */
    --header-h-compact: 68px;
    --navrow-h: 0px;            /* desktop nav strip, set below */
    --header-stack: calc(var(--header-h) + var(--navrow-h));
    --z-header: 100;
    --z-drawer: 200;
  }
  @media (min-width: 1200px) { :root { --navrow-h: 55px; } }
}

/* ------------------------------------------------------------------------------- base */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }

  /* The hidden attribute always wins, even over components that set display (e.g. filtered cards). */
  [hidden] { display: none !important; }

  html {
    overflow-x: clip;               /* global guard: decorative elements never widen the page (keeps sticky working) */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h-compact) + 1rem);
  }

  body {
    margin: 0;
    min-height: 100vh;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    font-feature-settings: "kern", "liga";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;               /* no horizontal scrolling, ever */
  }

  body.is-locked { overflow: hidden; }

  img, svg, video, picture { display: block; max-width: 100%; height: auto; }
  img { font-style: italic; }       /* alt text renders gracefully */

  h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--sp-4);
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--lh-tight);
    color: var(--maroon-ink);
    letter-spacing: -.01em;
    text-wrap: balance;
  }
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
  h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); color: var(--gold-ink); }
  h5, h6 { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 700; color: var(--gold-ink); letter-spacing: 0; }

  p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
  ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
  li + li { margin-top: .35em; }

  a {
    color: var(--maroon);
    text-decoration-line: underline;
    text-decoration-color: rgba(140, 42, 53, .3);
    text-decoration-thickness: 1px;
    text-underline-offset: .2em;
    transition: color var(--dur-fast), text-decoration-color var(--dur-fast);
  }
  a:hover { color: var(--maroon-soft); text-decoration-color: var(--gold); }

  strong, b { font-weight: 700; }
  small { font-size: var(--fs-sm); }
  hr { border: 0; border-top: var(--gold-rule); margin: var(--sp-6) 0; }

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

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

  button { font: inherit; color: inherit; cursor: pointer; }
  input, select, textarea { font: inherit; color: inherit; }

  table { border-collapse: collapse; width: 100%; }

  .skip-link {
    position: absolute; left: var(--sp-4); top: -100px; z-index: 1000;
    padding: var(--sp-3) var(--sp-5);
    background: var(--gold); color: var(--maroon-ink);
    font-weight: 700; text-decoration: none; border-radius: var(--radius);
  }
  .skip-link:focus { top: var(--sp-4); }

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

/* ----------------------------------------------------------------------------- layout */
@layer layout {
  .container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

  .section { padding-block: var(--section-y); position: relative; }
  .section--tight { padding-block: calc(var(--section-y) * .6); }
  .section--alt { background: var(--cream-alt); }
  .section--paper { background: var(--paper); }
  .section--maroon {
    background:
      radial-gradient(120% 80% at 100% 0%, rgba(201, 165, 94, .16), transparent 55%),
      linear-gradient(165deg, var(--maroon) 0%, var(--maroon-deep) 100%);
    color: var(--on-dark);
  }
  /* Burgundy surfaces: lift gold so it stays readable on the darker ground */
  .section--maroon, .panel--maroon, .topbar, .site-footer, .mega__feature, .cta-band, .facilities,
  .value-tile, .dept-card, .vm-card--maroon, .cta-inline, .contact-card, .plate--year {
    --gold: #C9A55E; --gold-bright: #E6CD94; --gold-deep: #C9A55E;
  }
  /* Light chrome: components written for dark grounds read wine on ivory here */
  .site-header, .drawer__panel, .hero, .page-hero, .stats.section--maroon {
    --on-dark: var(--maroon-ink); --on-dark-soft: var(--ink-soft);
    --gold: #A8843F; --gold-deep: #8C6C2E;
    --gold-bright: var(--maroon); --btn-light-hover-fg: var(--ivory);
    --btn-gold: var(--maroon); --btn-gold-fg: var(--ivory);
  }
  .section--maroon h1, .section--maroon h2, .section--maroon h3, .section--maroon h4 { color: var(--gold); }
  .section--maroon a:not(.btn) { color: var(--gold-bright); }
  .section--maroon .eyebrow { color: var(--gold-bright); }

  .section-head { max-width: 760px; margin-bottom: var(--sp-7); }
  .section-head--center { margin-inline: auto; text-align: center; }
  .section-head--split {
    max-width: none; display: flex; flex-wrap: wrap; gap: var(--sp-5);
    align-items: flex-end; justify-content: space-between;
  }
  .section-head p { color: var(--ink-soft); font-size: var(--fs-md); }
  .section--maroon .section-head p { color: var(--on-dark-soft); }

  .grid { display: grid; gap: var(--grid-gap, var(--sp-6)); }
  .grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
  .grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
  .grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

  /* Interior page: article + section navigation */
  .content-grid {
    display: grid;
    gap: var(--sp-7);
    grid-template-columns: minmax(0, 1fr);
  }
  @media (min-width: 992px) {
    .content-grid--with-nav { grid-template-columns: 280px minmax(0, 1fr); gap: var(--sp-8); }
    .content-grid--with-nav .content-grid__nav { position: sticky; top: calc(var(--header-h-compact) + var(--sp-5)); align-self: start; }
  }
  .content-grid__main { min-width: 0; }
  @media (max-width: 991px) { .content-grid__nav { order: 2; } }   /* phones/tablets: content first */

  .stack > * + * { margin-top: var(--stack-gap, var(--sp-5)); }
}

/* ------------------------------------------------------------------------- components */
@layer components {

  /* Eyebrow: small caps label with a gold rule */
  .eyebrow {
    display: inline-flex; align-items: center; gap: .75rem;
    margin-bottom: var(--sp-4);
    font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
    letter-spacing: var(--tracking-caps); text-transform: uppercase;
    color: var(--gold-ink);
  }
  .eyebrow::before { content: ""; width: 2.25rem; height: 1px; background: currentColor; opacity: .8; }
  .section-head--center .eyebrow::after { content: ""; width: 2.25rem; height: 1px; background: currentColor; opacity: .8; }

  .lead { font-size: var(--fs-lg); line-height: 1.6; color: var(--ink-soft); }
  .display { font-family: var(--font-display); font-size: var(--fs-display); line-height: 1; font-weight: 600; }
  .serif-italic { font-family: var(--font-display); font-style: italic; font-weight: 500; }

  /* Ornamental divider */
  .ornament {
    display: flex; align-items: center; gap: var(--sp-4);
    color: var(--gold); margin-block: var(--sp-6);
  }
  .ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 40%, var(--gold) 60%, transparent); }
  .ornament svg { width: 18px; height: 18px; flex: none; }

  /* Buttons ---------------------------------------------------------------- */
  .btn {
    --btn-bg: var(--maroon); --btn-fg: var(--ivory); --btn-border: var(--maroon);
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 48px; padding: .8rem 1.6rem;
    border: 1px solid var(--btn-border); border-radius: var(--radius-sm);
    background: var(--btn-bg); color: var(--btn-fg);
    font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
    transition: color var(--dur) var(--ease-out), border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-out);
  }
  .btn::before {   /* gold sweep on hover */
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: var(--btn-hover-bg, var(--gold));
    transform: scaleX(0); transform-origin: right;
    transition: transform var(--dur) var(--ease-out);
  }
  .btn:hover { color: var(--btn-hover-fg, var(--maroon-ink)); border-color: var(--btn-hover-bg, var(--gold)); box-shadow: var(--shadow); }
  .btn:hover::before { transform: scaleX(1); transform-origin: left; }
  .btn:active { transform: translateY(1px); }
  .btn svg { width: 1.05em; height: 1.05em; transition: transform var(--dur) var(--ease-out); }
  .btn:hover svg { transform: translateX(3px); }

  .btn--gold { --btn-bg: var(--btn-gold, #C9A55E); --btn-fg: var(--btn-gold-fg, var(--maroon-ink)); --btn-border: var(--btn-gold, #C9A55E); --btn-hover-bg: var(--maroon-ink); --btn-hover-fg: var(--ivory); }
  .btn--outline { --btn-bg: transparent; --btn-fg: var(--maroon); --btn-border: var(--maroon); --btn-hover-bg: var(--maroon); --btn-hover-fg: var(--ivory); }
  .btn--light { --btn-bg: transparent; --btn-fg: var(--on-dark); --btn-border: color-mix(in srgb, var(--on-dark) 45%, transparent); --btn-hover-bg: var(--on-dark); --btn-hover-fg: var(--btn-light-hover-fg, var(--maroon)); }
  .btn--sm { min-height: 38px; padding: .45rem 1rem; font-size: var(--fs-xs); }
  .btn--block { width: 100%; }

  /* Text link with arrow */
  .link-arrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--maroon); text-decoration: none;
    background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
    padding-bottom: 2px;
    transition: background-size var(--dur) var(--ease-out), color var(--dur-fast);
  }
  .link-arrow:hover { background-size: 100% 1px; color: var(--maroon-soft); }
  .link-arrow svg { width: 1em; height: 1em; transition: transform var(--dur) var(--ease-out); }
  .link-arrow:hover svg { transform: translateX(4px); }
  .section--maroon .link-arrow, .panel--maroon .link-arrow { color: var(--gold-bright); }
  .panel--maroon a:not(.btn):not(.link-arrow) { color: var(--gold-bright); }

  /* Cards ------------------------------------------------------------------- */
  .card {
    position: relative; display: flex; flex-direction: column;
    background: var(--paper); border: var(--hairline); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur);
  }
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(168, 132, 63, .6); }
  .card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-alt); }
  .card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
  .card:hover .card__media img { transform: scale(1.06); }
  .card__media::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
    background: var(--gold); transform: scaleX(0); transform-origin: left;
    transition: transform var(--dur-slow) var(--ease-out);
  }
  .card:hover .card__media::after { transform: scaleX(1); }
  .card__body { display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; padding: var(--sp-5) var(--sp-5) var(--sp-6); }
  .card__meta { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }
  .card__title { margin: 0; font-size: var(--fs-h4); color: var(--maroon); }
  .card__title a { color: inherit; text-decoration: none; }
  .card__title a::after { content: ""; position: absolute; inset: 0; }   /* whole card clickable */
  .card__text { margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); }
  .card__footer { margin-top: auto; padding-top: var(--sp-3); }
  .card--placeholder .card__media {
    display: grid; place-items: center;
    background:
      radial-gradient(circle at 30% 20%, rgba(168, 132, 63, .25), transparent 60%),
      linear-gradient(135deg, var(--maroon), var(--maroon-deep));
  }
  .card--placeholder .card__media span {
    font-family: var(--font-display); font-size: 3.5rem; font-weight: 600; color: var(--gold);
  }

  /* Feature / quote panel */
  .panel {
    position: relative; padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
    background: var(--paper); border: var(--hairline); border-radius: var(--radius);
  }
  .panel--maroon { background: var(--maroon); color: var(--on-dark); border-color: transparent; }
  .panel--maroon h2, .panel--maroon h3, .panel--maroon h4 { color: var(--gold); }
  .panel--framed::before {
    content: ""; position: absolute; inset: 10px; border: var(--gold-rule); border-radius: var(--radius-sm); pointer-events: none;
  }

  .quote {
    position: relative; margin: 0; padding-left: var(--sp-6);
    font-family: var(--font-display); font-size: var(--fs-h4); font-style: italic; line-height: 1.45; color: var(--maroon);
    border-left: 2px solid var(--gold);
  }
  .quote cite { display: block; margin-top: var(--sp-4); font-family: var(--font-body); font-size: var(--fs-sm); font-style: normal; font-weight: 700; color: var(--gold-ink); letter-spacing: .06em; }

  /* Badges -------------------------------------------------------------------- */
  .badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .15rem .55rem; border-radius: 999px;
    font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    background: var(--maroon); color: var(--on-dark);
  }
  .badge--gold { background: var(--gold); color: var(--maroon-ink); }
  .badge--outline { background: transparent; color: var(--gold-ink); border: 1px solid var(--gold); }
  .badge--new { background: var(--danger); color: #fff; animation: badge-pulse 2.4s ease-in-out infinite; }
  @keyframes badge-pulse { 50% { box-shadow: 0 0 0 4px rgba(161, 35, 47, .18); } }

  /* Notice / document lists -------------------------------------------------- */
  .item-list { list-style: none; margin: 0; padding: 0; border-top: var(--hairline); }
  .item-list > li { margin: 0; border-bottom: var(--hairline); }
  .item-list__link {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center;
    padding: var(--sp-4) var(--sp-2);
    color: var(--ink); text-decoration: none;
    transition: background var(--dur-fast), padding var(--dur) var(--ease-out);
  }
  .item-list__link:hover { background: var(--paper); padding-inline: var(--sp-4); color: var(--maroon); }
  .item-list__title { font-weight: 600; line-height: 1.45; }
  .item-list__meta { display: block; margin-top: .15rem; font-size: var(--fs-xs); color: var(--ink-muted); letter-spacing: .02em; }
  .item-list__icon {
    display: grid; place-items: center; width: 44px; height: 44px; flex: none;
    border-radius: var(--radius); background: var(--maroon-tint); color: var(--maroon);
  }
  .item-list__icon svg { width: 20px; height: 20px; }
  .item-list__action { color: var(--gold-ink); }
  .item-list__action svg { width: 18px; height: 18px; }

  /* Date block (events) */
  .date-block {
    display: grid; place-items: center; width: 64px; min-height: 68px; padding: .4rem;
    background: var(--maroon); color: var(--on-dark); border-radius: var(--radius); text-align: center; line-height: 1;
  }
  .date-block__day { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--gold); font-variant-numeric: lining-nums; }
  .date-block__month { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

  /* People -------------------------------------------------------------------- */
  .person { text-align: center; }
  .person__photo {
    position: relative; width: min(180px, 100%); aspect-ratio: 1; margin: 0 auto var(--sp-4);
    border-radius: 50%; overflow: hidden; background: var(--cream-alt);
    box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--gold);
  }
  .person__photo img { width: 100%; height: 100%; object-fit: cover; }
  .person__photo--initials {
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
    font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: var(--gold);
  }
  .person__name { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--maroon); line-height: 1.25; }
  .person__role { margin: .25rem 0 0; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }

  /* Data tables ---------------------------------------------------------------- */
  .table-wrap { overflow-x: auto; border: var(--hairline); border-radius: var(--radius); background: var(--paper); }
  .table { font-size: var(--fs-sm); }
  .table th, .table td { padding: .85rem 1rem; text-align: left; border-bottom: var(--hairline); vertical-align: top; }
  .table thead th {
    background: var(--maroon); color: var(--on-dark);
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid var(--gold);
  }
  .table tbody tr:nth-child(even) { background: rgba(243, 234, 215, .45); }
  .table tbody tr:hover { background: var(--maroon-tint); }
  .table tbody tr:last-child td { border-bottom: 0; }

  /* Tabs ------------------------------------------------------------------------ */
  .tabs__list { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-6); border-bottom: var(--hairline); }
  .tabs__tab {
    position: relative; padding: .8rem 1.2rem; border: 0; background: none;
    font-size: var(--fs-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
  }
  .tabs__tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform var(--dur) var(--ease-out); }
  .tabs__tab[aria-selected="true"] { color: var(--maroon); }
  .tabs__tab[aria-selected="true"]::after, .tabs__tab:hover::after { transform: scaleX(1); }

  /* Forms --------------------------------------------------------------------- */
  .field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: var(--sp-5); }
  .field label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
  .field .req { color: var(--danger); }
  .input, .field input, .field select, .field textarea {
    width: 100%; min-height: 48px; padding: .75rem 1rem;
    background: var(--paper); border: 1px solid var(--cream-line); border-radius: var(--radius-sm);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  }
  .field textarea { min-height: 140px; resize: vertical; }
  .input:focus, .field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168, 132, 63, .25);
  }
  .field-error, .field-validation-error { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
  .input-validation-error { border-color: var(--danger) !important; }

  .alert { padding: var(--sp-4) var(--sp-5); border-radius: var(--radius); border-left: 4px solid; background: var(--paper); }
  .alert--success { border-color: var(--success); }
  .alert--error { border-color: var(--danger); }
  .alert--info { border-color: var(--gold); }

  /* Rich text from the CMS ----------------------------------------------------- */
  .prose { font-size: 1.0625rem; color: var(--ink); max-width: 72ch; }
  .prose > :first-child { margin-top: 0; }
  .prose h2 { font-size: var(--fs-h3); margin-top: var(--sp-7); }
  .prose h3 { font-size: var(--fs-h4); margin-top: var(--sp-6); }
  .prose h4 { margin-top: var(--sp-5); }
  .prose ul { list-style: none; padding-left: 0; }
  .prose ul > li { position: relative; padding-left: 1.6rem; }
  .prose ul > li::before {
    content: ""; position: absolute; left: .2rem; top: .7em; width: 7px; height: 7px;
    background: var(--gold); transform: rotate(45deg);
  }
  .prose ol > li::marker { color: var(--gold-ink); font-weight: 700; }
  .prose blockquote { margin: var(--sp-6) 0; padding: var(--sp-4) var(--sp-5); border-left: 3px solid var(--gold); background: var(--paper); font-family: var(--font-display); font-size: var(--fs-lg); font-style: italic; color: var(--maroon); }
  .prose img, .prose figure { margin: var(--sp-6) 0; border-radius: var(--radius); }
  .prose figcaption { font-size: var(--fs-sm); color: var(--ink-muted); margin-top: var(--sp-2); }
  .prose table { margin: var(--sp-5) 0; font-size: var(--fs-sm); background: var(--paper); }
  .prose th, .prose td { padding: .7rem .9rem; border: var(--hairline); text-align: left; }
  .prose th { background: var(--maroon); color: var(--on-dark); }
  .prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }

  /* Interior page hero ------------------------------------------------------------ */
  .page-hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
    background:
      radial-gradient(70% 140% at 100% 0%, rgba(140, 42, 53, .12), transparent 60%),
      radial-gradient(60% 120% at 0% 100%, rgba(168, 132, 63, .12), transparent 60%),
      linear-gradient(120deg, var(--paper), var(--cream) 55%, var(--maroon-tint));
    color: var(--on-dark);
    border-bottom: var(--hairline);
  }
  .page-hero__bg { position: absolute; inset: 0; z-index: -2; }
  .page-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .14; filter: saturate(.6) sepia(.15); mix-blend-mode: multiply; }
  .page-hero::after {   /* fine gold rule at the bottom */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-bright) 50%, var(--gold) 80%, transparent);
  }
  .page-hero__pattern {
    position: absolute; inset: 0; z-index: -1; opacity: .18; pointer-events: none;
    background-image: radial-gradient(var(--gold) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(90deg, transparent, #000 60%);
  }
  .page-hero h1 { margin: var(--sp-3) 0 0; color: var(--maroon-ink); max-width: 24ch; }
  .page-hero__subtitle { max-width: 62ch; margin: var(--sp-4) 0 0; font-size: var(--fs-md); color: var(--on-dark-soft); }

  /* Breadcrumbs */
  .breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: 0; padding: 0; list-style: none; }
  .breadcrumbs li { margin: 0; display: inline-flex; align-items: center; gap: .6rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
  .breadcrumbs li + li::before { content: ""; width: 5px; height: 5px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); transform: rotate(45deg); }
  .breadcrumbs a { color: var(--on-dark-soft); text-decoration: none; }
  .breadcrumbs a:hover { color: var(--gold-bright); }
  .breadcrumbs [aria-current] { color: var(--gold-bright); }

  /* Section sub-navigation (interior pages) */
  .subnav { background: var(--paper); border: var(--hairline); border-top: 3px solid var(--maroon); border-radius: var(--radius); }
  .subnav__title {
    margin: 0; padding: var(--sp-5) var(--sp-5) var(--sp-3);
    font-size: 1.5rem; color: var(--maroon);
  }
  .subnav__group { padding: var(--sp-3) var(--sp-5) 0; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
  .subnav ul { list-style: none; margin: 0; padding: 0 0 var(--sp-3); }
  .subnav li { margin: 0; }
  .subnav a {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    padding: .6rem var(--sp-5); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
    border-left: 3px solid transparent; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
  }
  .subnav a:hover { background: var(--cream); color: var(--maroon); border-left-color: var(--gold); }
  .subnav a[aria-current="page"] { background: var(--maroon-tint); color: var(--maroon); font-weight: 700; border-left-color: var(--maroon); }
  .subnav svg { width: 14px; height: 14px; opacity: .55; flex: none; }

  /* Empty state */
  .empty-state { padding: var(--sp-7) var(--sp-5); text-align: center; background: var(--paper); border: 1px dashed var(--cream-line); border-radius: var(--radius); color: var(--ink-muted); }
  .empty-state h2, .empty-state h3 { color: var(--maroon); font-size: var(--fs-h4); }

  /* Pagination */
  .pagination { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-7); list-style: none; padding: 0; }
  .pagination li { margin: 0; }
  .pagination a, .pagination span {
    display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .75rem;
    border: var(--hairline); border-radius: var(--radius-sm); background: var(--paper);
    font-weight: 700; font-size: var(--fs-sm); color: var(--ink); text-decoration: none;
  }
  .pagination a:hover { border-color: var(--gold); color: var(--maroon); }
  .pagination [aria-current="page"] { background: var(--maroon); border-color: var(--maroon); color: var(--on-dark); }

  /* Icon sizing helper */
  .icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .icon--fill { fill: currentColor; stroke: none; }
}

/* ----------------------------------------------------------------- chrome: top bar */
@layer chrome {
  .topbar {
    position: relative; z-index: calc(var(--z-header) + 1);
    background: var(--maroon); color: var(--on-dark-soft);
    font-size: var(--fs-xs); letter-spacing: .02em;
    border-bottom: 1px solid rgba(168, 132, 63, .25);
  }
  .topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); min-height: var(--topbar-h); }
  .topbar__contact, .topbar__links { display: flex; align-items: center; gap: var(--sp-5); margin: 0; padding: 0; list-style: none; }
  .topbar li { margin: 0; }
  .topbar a { display: inline-flex; align-items: center; gap: .45rem; color: var(--on-dark-soft); text-decoration: none; transition: color var(--dur-fast); }
  .topbar a:hover { color: var(--gold-bright); }
  .topbar .icon { width: 14px; height: 14px; color: var(--gold); }
  .topbar__social { display: flex; gap: var(--sp-3); padding-left: var(--sp-4); border-left: 1px solid rgba(251, 245, 233, .15); }
  .topbar__social .icon { width: 15px; height: 15px; color: currentColor; }
  .topbar__admission {
    padding: .2rem .8rem; border-radius: 999px;
    background: var(--gold); color: var(--maroon-ink) !important; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .68rem;
  }
  .topbar__admission:hover { background: var(--gold-bright); }
  @media (max-width: 767px) {
    .topbar__hide-sm { display: none !important; }
    .topbar__inner { justify-content: center; }
  }
  @media (max-width: 1099px) { .topbar__links .topbar__hide-md { display: none; } }

  /* ------------------------------------------------------------------- header */
  .site-header {
    position: sticky; top: 0; z-index: var(--z-header);
    background: rgba(255, 252, 247, .94);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
    color: var(--on-dark);
    border-bottom: 1px solid rgba(168, 132, 63, .35);
    transition: background var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur);
  }
  .site-header.is-scrolled { box-shadow: 0 10px 30px rgba(90, 21, 32, .10); }
  .site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); height: var(--header-h); transition: height var(--dur) var(--ease-out); }
  .site-header.is-scrolled .site-header__inner { height: var(--header-h-compact); }
  .site-header__actions { display: flex; align-items: center; gap: var(--sp-4); flex: none; }
  .site-header__util {
    display: none; align-items: center; gap: .45rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--on-dark-soft); text-decoration: none; transition: color var(--dur-fast);
  }
  .site-header__util:hover { color: var(--gold-bright); }
  .site-header__util .icon { width: 16px; height: 16px; color: var(--gold); }

  /* Row 2: navigation strip (desktop only) */
  .site-header__navrow { display: none; border-top: 1px solid rgba(168, 132, 63, .28); }
  @media (min-width: 1200px) {
    .site-header__navrow { display: block; }
    .site-header__util { display: inline-flex; }
  }

  /* Over a full-bleed hero (home page): transparent until scrolled */
  .has-hero .site-header:not(.is-scrolled):not(.menu-open) {
    background: linear-gradient(180deg, rgba(255, 252, 247, .78), rgba(255, 252, 247, 0));
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-bottom-color: rgba(168, 132, 63, .22);
  }
  .has-hero .site-header { position: fixed; left: 0; right: 0; top: var(--header-offset, var(--topbar-h)); }
  .has-hero .site-header.is-scrolled { top: 0; }

  /* Brand lockup */
  .brand { display: flex; align-items: center; gap: .9rem; min-width: 0; flex: 0 1 auto; color: var(--on-dark); text-decoration: none; }
  .brand:hover { color: var(--on-dark); }
  .brand__mark { width: 60px; height: 60px; flex: none; transition: width var(--dur) var(--ease-out), height var(--dur) var(--ease-out); }
  .is-scrolled .brand__mark { width: 50px; height: 50px; }
  .brand__mark img { width: 100%; height: 100%; object-fit: contain; }
  .brand__monogram {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
    border: 1.5px solid var(--gold); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(168, 132, 63, .5);
    font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--gold); letter-spacing: .02em;
  }
  .brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
  .brand__name { font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600; white-space: nowrap; color: var(--on-dark); }
  .brand__place { margin-top: .3rem; font-size: .66rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-ink); white-space: nowrap; }   /* small text: 6:1 on ivory */

  /* --------------------------------------------------------------- desktop nav */
  .nav { display: none; }
  @media (min-width: 1200px) {
    .nav { display: block; }
    .nav-toggle { display: none !important; }
  }
  .nav__list { display: flex; align-items: stretch; justify-content: space-between; height: 54px; margin: 0 calc(-1 * clamp(.45rem, .1rem + .45vw, .9rem)); padding: 0; list-style: none; }
  .nav__item { position: static; display: flex; margin: 0; }
  .nav__item--dropdown { position: relative; }
  .nav__link {
    position: relative; display: inline-flex; align-items: center; gap: .3rem;
    padding: 0 clamp(.45rem, .1rem + .45vw, .9rem);
    border: 0; background: none;
    font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
    color: var(--on-dark); text-decoration: none;
  }
  .nav__link::after {
    content: ""; position: absolute; left: clamp(.45rem, .1rem + .45vw, .9rem); right: clamp(.45rem, .1rem + .45vw, .9rem); bottom: 12px;
    height: 1.5px; background: var(--gold); transform: scaleX(0); transform-origin: left;
    transition: transform var(--dur) var(--ease-out);
  }
  .nav__link:hover, .nav__item.is-open > .nav__link, .nav__link.is-active { color: var(--gold-bright); }
  .nav__link:hover::after, .nav__item.is-open > .nav__link::after, .nav__link.is-active::after { transform: scaleX(1); }
  .nav__link .icon { width: 12px; height: 12px; opacity: .75; transition: transform var(--dur) var(--ease-out); }
  .nav__item.is-open > .nav__link .icon { transform: rotate(180deg); }

  /* Panels: shared reveal */
  .mega, .dropdown {
    position: absolute; top: 100%;
    visibility: hidden; opacity: 0; pointer-events: none;
    transform: translateY(10px);
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
  }
  .nav__item.is-open > .mega, .nav__item.is-open > .dropdown {
    visibility: visible; opacity: 1; pointer-events: auto; transform: none;
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s;
  }

  /* Mega menu */
  .mega {
    left: 0; right: 0;
    background: var(--cream); color: var(--ink);
    border-top: 3px solid var(--gold);
    box-shadow: 0 30px 60px rgba(90, 21, 32, .25);
    clip-path: inset(0 0 100% 0);
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), clip-path 420ms var(--ease-out), visibility 0s linear 420ms;
  }
  .nav__item.is-open > .mega { clip-path: inset(0 0 0 0); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), clip-path 420ms var(--ease-out), visibility 0s; }
  .mega__inner { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-7); padding-block: var(--sp-6) var(--sp-7); }
  .mega__cols { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--sp-6); }
  .mega__heading {
    margin: 0 0 var(--sp-3); padding-bottom: var(--sp-2);
    font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--gold-deep);
    border-bottom: var(--gold-rule);
  }
  .mega__links { margin: 0; padding: 0; list-style: none; }
  .mega__links li { margin: 0; }
  .mega__links a {
    display: flex; align-items: center; gap: .55rem; padding: .42rem 0;
    font-size: .92rem; font-weight: 500; color: var(--ink); text-decoration: none;
    transition: color var(--dur-fast), transform var(--dur) var(--ease-out);
  }
  .mega__links a::before { content: ""; width: 0; height: 1px; background: var(--gold); transition: width var(--dur) var(--ease-out); }
  .mega__links a:hover, .mega__links a.is-active { color: var(--maroon); }
  .mega__links a:hover::before, .mega__links a.is-active::before { width: 14px; }
  .mega__links a.is-active { font-weight: 700; }
  .mega__links .icon { width: 12px; height: 12px; opacity: .6; }
  .mega__feature {
    position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 260px; padding: var(--sp-6);
    background:
      radial-gradient(100% 70% at 100% 0%, rgba(168, 132, 63, .25), transparent 60%),
      linear-gradient(160deg, var(--maroon), var(--maroon-deep));
    color: var(--on-dark); border-radius: var(--radius); text-decoration: none;
  }
  .mega__feature img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .35; transition: transform 1.2s var(--ease-out); }
  .mega__feature:hover img { transform: scale(1.06); }
  .mega__feature-title { margin: 0 0 var(--sp-2); font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--gold); line-height: 1.1; }
  .mega__feature p { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); color: var(--on-dark-soft); }
  .mega__feature .link-arrow { color: var(--gold-bright); }
  .mega__feature:hover { color: var(--on-dark); }

  /* Dropdown */
  .dropdown {
    left: 50%; translate: -50% 0; min-width: 270px; padding: var(--sp-3) 0;
    background: var(--cream); border-top: 3px solid var(--gold); border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 24px 48px rgba(90, 21, 32, .22);
    list-style: none; margin: 0;
  }
  .dropdown li { margin: 0; position: relative; }
  .dropdown a, .dropdown span {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
    padding: .55rem var(--sp-5); font-size: .9rem; font-weight: 500; color: var(--ink); text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast), padding var(--dur) var(--ease-out);
  }
  .dropdown a:hover, .dropdown a.is-active { background: var(--paper); color: var(--maroon); padding-left: calc(var(--sp-5) + 6px); }
  .dropdown a.is-active { font-weight: 700; }
  .dropdown .icon { width: 12px; height: 12px; opacity: .6; }

  .nav__cta { display: none; white-space: nowrap; }
  @media (min-width: 768px) { .nav__cta { display: inline-flex; } }

  /* --------------------------------------------------------------- mobile nav */
  .nav-toggle {
    display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
    border: 1px solid rgba(168, 132, 63, .55); border-radius: var(--radius-sm); background: transparent; color: var(--gold);
  }
  .nav-toggle .icon { width: 24px; height: 24px; }

  .drawer {
    position: fixed; inset: 0; z-index: var(--z-drawer);
    visibility: hidden; pointer-events: none;
    transition: visibility 0s linear var(--dur-slow);
  }
  .drawer.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
  .drawer__backdrop {
    position: absolute; inset: 0; background: rgba(58, 12, 19, .55); backdrop-filter: blur(2px);
    opacity: 0; transition: opacity var(--dur-slow) var(--ease-out);
  }
  .drawer.is-open .drawer__backdrop { opacity: 1; }
  .drawer__panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
    display: flex; flex-direction: column;
    background:
      radial-gradient(80% 40% at 100% 0%, rgba(140, 42, 53, .10), transparent 60%),
      var(--paper);
    color: var(--on-dark);
    transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-out);
    box-shadow: -20px 0 60px rgba(90, 21, 32, .18);
  }
  .drawer.is-open .drawer__panel { transform: none; }
  .drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid rgba(168, 132, 63, .3); }
  .drawer__head .brand__mark { width: 44px; height: 44px; }
  .drawer__head .brand__name { font-size: 1.15rem; }
  .drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--sp-3) 0 var(--sp-6); }
  .drawer__foot { padding: var(--sp-5); border-top: 1px solid rgba(168, 132, 63, .3); display: grid; gap: var(--sp-3); }

  .mnav, .mnav ul { list-style: none; margin: 0; padding: 0; }
  .mnav li { margin: 0; }
  .mnav__row { display: flex; align-items: stretch; border-bottom: 1px solid rgba(90, 21, 32, .08); }
  .mnav__link {
    flex: 1; display: flex; align-items: center; min-height: 52px; padding: .55rem var(--sp-5);
    color: var(--on-dark); text-decoration: none; font-weight: 600;
  }
  .mnav > li > .mnav__row .mnav__link { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
  .mnav__link.is-active { color: var(--gold-bright); }
  .mnav__heading { padding: var(--sp-4) var(--sp-5) var(--sp-2); font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
  .mnav__toggle { justify-content: space-between; gap: var(--sp-4); width: 100%; border: 0; background: none; text-align: left; }
  .mnav__toggle .icon { width: 16px; height: 16px; color: var(--gold); transition: transform var(--dur) var(--ease-out); }
  .mnav__toggle[aria-expanded="true"] { color: var(--gold-bright); }
  .mnav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .mnav__sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur) var(--ease-out); background: rgba(140, 42, 53, .05); }
  .mnav__sub > div { overflow: hidden; }
  .mnav__sub.is-open { grid-template-rows: 1fr; }
  .mnav__sub .mnav__link { min-height: 44px; padding-left: calc(var(--sp-5) + var(--sp-4)); font-weight: 500; font-size: .95rem; color: var(--on-dark-soft); }
  .mnav__sub .mnav__sub .mnav__link { padding-left: calc(var(--sp-5) + var(--sp-6)); }
  .mnav__sub .mnav__heading { padding-left: calc(var(--sp-5) + var(--sp-4)); }

  .drawer__close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(168, 132, 63, .5); border-radius: var(--radius-sm); background: none; color: var(--gold); }
  .drawer__close .icon { width: 20px; height: 20px; }
  .drawer__contact { display: flex; align-items: center; gap: .6rem; color: var(--on-dark-soft); text-decoration: none; font-size: var(--fs-sm); }
  .drawer__contact .icon { color: var(--gold); width: 16px; height: 16px; }

  /* ------------------------------------------------------------------- footer */
  .site-footer {
    position: relative; isolation: isolate; overflow: hidden;
    padding-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
    background:
      radial-gradient(60% 50% at 50% 0%, rgba(230, 205, 148, .16), transparent 70%),
      radial-gradient(40% 60% at 100% 100%, rgba(201, 165, 94, .10), transparent 70%),
      repeating-linear-gradient(135deg, rgba(230, 205, 148, .025) 0 1px, transparent 1px 22px),
      linear-gradient(175deg, var(--maroon) 0%, var(--maroon-deep) 55%, #64192A 100%);
    color: var(--on-dark-soft); font-size: var(--fs-sm);
    border-top: 3px solid var(--gold);
  }
  .site-footer::before {   /* motto watermark */
    content: attr(data-motto);
    position: absolute; left: 50%; bottom: 5.5rem; z-index: -1; translate: -50% 0;
    font-family: var(--font-display); font-style: italic; font-weight: 600;
    font-size: clamp(5rem, 13vw, 13rem); line-height: 1; white-space: nowrap;
    color: rgba(230, 205, 148, .045); pointer-events: none;
  }
  .site-footer__glow {   /* soft halo behind the crest */
    position: absolute; z-index: -1; left: 50%; top: -120px; width: 520px; height: 320px; translate: -50% 0;
    background: radial-gradient(closest-side, rgba(230, 205, 148, .22), transparent); pointer-events: none;
  }

  /* Crest: seal between two gold rules, then the college name and motto */
  .site-footer__crest { display: flex; align-items: center; justify-content: center; gap: var(--sp-5); }
  .site-footer__rule { flex: 1; max-width: 320px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 70%, var(--gold-bright)); }
  .site-footer__rule:last-child { background: linear-gradient(90deg, var(--gold-bright), var(--gold) 30%, transparent); }
  .site-footer__seal {
    position: relative; display: grid; place-items: center; width: 104px; aspect-ratio: 1; flex: none; border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 0 0 4px rgba(230, 205, 148, .35), 0 0 0 5px var(--gold), 0 0 40px 6px rgba(230, 205, 148, .25), 0 18px 40px rgba(40, 8, 14, .35);
    transition: transform .8s var(--ease-out);
  }
  .site-footer__seal::after {   /* slowly turning dashed gold orbit */
    content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(230, 205, 148, .45);
    animation: orbit 40s linear infinite;
  }
  .site-footer__seal:hover { transform: rotateY(360deg); }
  .site-footer__seal img { width: 92%; height: 92%; object-fit: contain; border-radius: 50%; }
  .site-footer__intro { text-align: center; margin-top: var(--sp-5); }
  .site-footer__name { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); font-weight: 600; color: var(--ivory); letter-spacing: .01em; }
  .site-footer__motto { margin: .3rem 0 0; font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--gold-bright); }

  .site-footer__grid {
    display: grid; gap: var(--sp-7);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) clamp(2.5rem, 2rem + 2vw, 3.5rem);
    margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); border-top: 1px solid rgba(230, 205, 148, .18);
  }
  @media (min-width: 1100px) { .site-footer__grid { grid-template-columns: 1.35fr 1fr 1fr 1.3fr; } }
  .site-footer h2 {
    display: flex; align-items: center; gap: .6rem; margin: 0 0 var(--sp-5);
    font-size: .78rem; font-family: var(--font-body); font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-bright);
  }
  .site-footer h2::before { content: ""; width: 7px; height: 7px; flex: none; rotate: 45deg; background: var(--gold); }
  .site-footer h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(230, 205, 148, .4), transparent); }
  .site-footer p { color: var(--on-dark-soft); line-height: 1.75; }
  .site-footer ul { list-style: none; margin: 0; padding: 0; }
  .site-footer li { margin: 0; }
  .site-footer__links { display: grid; gap: .15rem; }
  .site-footer__links a {
    position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .32rem 0;
    color: var(--on-dark-soft); text-decoration: none; transition: color var(--dur), padding var(--dur) var(--ease-out);
  }
  .site-footer__links a::before {   /* gold dash that grows on hover */
    content: ""; width: 0; height: 1px; background: var(--gold-bright); transition: width var(--dur) var(--ease-out);
  }
  .site-footer__links a:hover { color: var(--ivory); }
  .site-footer__links a:hover::before { width: 16px; }
  .site-footer__ext { width: 12px; height: 12px; color: var(--gold); opacity: .8; }

  .site-footer__panel {
    padding: var(--sp-6); border-radius: 14px;
    background: linear-gradient(150deg, rgba(255, 245, 225, .09), rgba(255, 245, 225, .03));
    border: 1px solid rgba(230, 205, 148, .28);
    box-shadow: inset 0 1px 0 rgba(255, 240, 210, .12), 0 20px 50px rgba(40, 8, 14, .25);
  }
  .site-footer__contact li { display: flex; gap: .8rem; padding: .45rem 0; }
  .site-footer__contact .icon { width: 18px; height: 18px; margin-top: .25rem; flex: none; color: var(--gold-bright); }
  .site-footer__contact address { font-style: normal; }
  .site-footer__contact a { color: var(--ivory); text-decoration: none; }
  .site-footer__contact a:hover { color: var(--gold-bright); }
  .site-footer__cta { margin-top: var(--sp-5); }
  .social { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
  .social a {
    display: grid; place-items: center; width: 42px; height: 42px;
    border: 1px solid rgba(201, 165, 94, .5); border-radius: 50%; color: var(--gold-bright);
    transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur) var(--ease-out);
  }
  .social a:hover { background: var(--gold-bright); color: var(--maroon-ink); transform: translateY(-3px); }
  .social .icon { width: 18px; height: 18px; }

  /* Developer signature: gold rules either side of a shimmering, highlighted name */
  .site-footer__signature { display: flex; align-items: center; justify-content: center; gap: var(--sp-5); padding-bottom: var(--sp-6); }
  .site-footer__sig-line { flex: 1; max-width: 220px; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 205, 148, .6)); position: relative; }
  .site-footer__sig-line:last-child { background: linear-gradient(90deg, rgba(230, 205, 148, .6), transparent); }
  .site-footer__sig-line::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; rotate: 45deg; background: var(--gold-bright); right: -3px; }
  .site-footer__sig-line:last-child::after { right: auto; left: -3px; }
  .credit {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: .25rem .7rem; margin: 0; text-align: center;
    padding: .7rem 1.6rem; border-radius: 999px;
    background: linear-gradient(150deg, rgba(255, 245, 225, .10), rgba(255, 245, 225, .02));
    border: 1px solid rgba(230, 205, 148, .38);
    box-shadow: 0 0 30px rgba(230, 205, 148, .10), inset 0 1px 0 rgba(255, 240, 210, .15);
  }
  .credit__prefix { font-size: .7rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: rgba(251, 246, 238, .72); }
  .credit__name {
    display: inline-flex; align-items: center; gap: .4rem;
    font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem);
    text-decoration: none;
    background: linear-gradient(100deg, #C9A55E 0%, #F4E2B4 25%, #E6CD94 45%, #FFF6DC 55%, #C9A55E 75%, #E6CD94 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: credit-sheen 6s ease-in-out infinite;
    border-bottom: 1px solid transparent; transition: border-color var(--dur);
  }
  a.credit__name:hover { border-bottom-color: rgba(230, 205, 148, .7); }
  .credit__ext { width: 13px; height: 13px; color: var(--gold-bright); flex: none; }
  @keyframes credit-sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
  .motion-reduced .credit__name, .motion-reduced .site-footer__seal::after { animation: none; }

  .site-footer__bottom { border-top: 1px solid rgba(201, 165, 94, .25); background: rgba(40, 8, 14, .22); }
  .site-footer__bottom-inner { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); justify-content: space-between; align-items: center; padding-block: var(--sp-5); padding-right: calc(var(--gutter) + 64px); font-size: var(--fs-xs); letter-spacing: .04em; }
  .site-footer__legal { display: inline-flex; align-items: center; gap: .8rem; }
  .site-footer__legal > span { font-size: .5rem; color: var(--gold); }
  .site-footer__bottom a { color: var(--on-dark-soft); text-decoration: none; }
  .site-footer__bottom a:hover { color: var(--gold-bright); }
  @media (max-width: 767px) {
    .site-footer__sig-line, .site-footer__rule { max-width: 60px; }
    .credit { border-radius: 18px; padding: .8rem 1.1rem; }
    .site-footer__bottom-inner { justify-content: center; text-align: center; padding-right: var(--gutter); }
  }

  .back-to-top {
    position: fixed; right: var(--sp-5); bottom: var(--sp-5); z-index: 90;
    display: grid; place-items: center; width: 48px; height: 48px;
    border: 1px solid var(--gold); border-radius: 50%; background: var(--maroon); color: var(--gold);
    box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity var(--dur), transform var(--dur) var(--ease-out), background var(--dur-fast);
  }
  .back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
  .back-to-top:hover { background: var(--gold); color: var(--maroon-ink); }
  .back-to-top .icon { width: 20px; height: 20px; transform: rotate(180deg); }
}

/* -------------------------------------------------------------------------- utilities */
@layer utilities {
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .text-center { text-align: center; }
  .text-muted { color: var(--ink-muted); }
  .text-maroon { color: var(--maroon); }
  .text-gold { color: var(--gold-ink); }
  .mt-0 { margin-top: 0 !important; }
  .mb-0 { margin-bottom: 0 !important; }
  .mt-6 { margin-top: var(--sp-6); }
  .mt-7 { margin-top: var(--sp-7); }
  .mb-6 { margin-bottom: var(--sp-6); }
  .flex-wrap-gap { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
}

/* ------------------------------------------------------------------ opening screen */
/* Shown only while <html> has .preloading (set by preloader.js on the first page of a session). */
.preloader { display: none; }
html.preloading .preloader, .preloader.is-done {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 42%, rgba(230, 205, 148, .18), transparent 70%),
    repeating-linear-gradient(135deg, rgba(230, 205, 148, .03) 0 1px, transparent 1px 22px),
    linear-gradient(165deg, #9A3440 0%, #8C2A35 45%, #6E1F2A 100%);
  color: #FBF6EE;
  transition: clip-path 1.1s cubic-bezier(.76, 0, .24, 1), opacity .6s ease .5s;
  clip-path: inset(0 0 0 0 round 0);
}
/* Safety net: if the script stalls, the screen fades away by itself. */
html.preloading .preloader { animation: preloader-failsafe .6s ease 6s forwards; }
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; } }
.preloader.is-done { clip-path: inset(0 0 100% 0 round 0 0 50% 50%); pointer-events: none; }
.preloader.is-done .preloader__inner { transform: translateY(-40px); opacity: 0; }
html.preloader-skip .preloader { display: none !important; }

.preloader__glow {
  position: absolute; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(230, 205, 148, .16), transparent);
  animation: preloader-breathe 3.2s ease-in-out infinite;
}
.preloader__inner {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 2rem; text-align: center;
  transition: transform .8s cubic-bezier(.76, 0, .24, 1), opacity .5s ease;
  animation: preloader-rise .9s cubic-bezier(.22, 1, .36, 1) both;
}
.preloader__seal {
  position: relative; display: grid; place-items: center; width: 116px; aspect-ratio: 1; margin-bottom: .6rem; border-radius: 50%;
  background: #FFFCF7;
  box-shadow: 0 0 0 4px rgba(230, 205, 148, .35), 0 0 0 5px #C9A55E, 0 0 50px 10px rgba(230, 205, 148, .22), 0 20px 40px rgba(40, 8, 14, .35);
}
.preloader__seal img { width: 92%; height: 92%; object-fit: contain; border-radius: 50%; }
.preloader__mono { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: #8C2A35; }
.preloader__orbit {
  position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed rgba(230, 205, 148, .55);
  animation: orbit 12s linear infinite;
}
.preloader__orbit::after {   /* gold bead travelling round the orbit */
  content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: #E6CD94; box-shadow: 0 0 12px 3px rgba(230, 205, 148, .7);
}
.preloader__name { margin: 0; font-family: var(--font-display); font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); font-weight: 600; letter-spacing: .04em; color: #FBF6EE; }
.preloader__tag { margin: 0; font-family: var(--font-body); font-size: .74rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: #E6CD94; }
.preloader__bar { position: relative; width: min(240px, 60vw); height: 2px; margin-top: 1.1rem; border-radius: 2px; background: rgba(230, 205, 148, .2); overflow: hidden; }
.preloader__bar span {
  position: absolute; inset: 0; transform: scaleX(.12); transform-origin: 0 50%;
  background: linear-gradient(90deg, #C9A55E, #F4E2B4, #E6CD94); transition: transform .35s ease-out;
}
@keyframes preloader-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes preloader-breathe { 50% { transform: scale(1.12); opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .preloader__orbit, .preloader__glow, .preloader__inner { animation: none; }
  html.preloading .preloader, .preloader.is-done { transition: opacity .4s ease; clip-path: none; }
  .preloader.is-done { opacity: 0; }
}
