/* ============================================================
   S.D. Kanya Mahavidyalya, Narwana — stylesheet
   ------------------------------------------------------------
   1. Tokens          6. Sections & layout
   2. Reset & base    7. Components
   3. Buttons         8. Forms
   4. Header & nav    9. Footer
   5. Hero & stats   10. Responsive
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  --maroon: #7d1935;
  --maroon-dark: #5c0f25;
  --maroon-deep: #430a1a;
  --gold: #c08a22;
  --gold-light: #e2b552;
  --ink: #241f1e;
  --body: #4a423e;
  --muted: #6f6560;
  --cream: #fbf8f4;
  --tint: #f5efe7;
  --line: #e6dcd0;
  --white: #ffffff;

  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1180px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(36, 31, 30, .06), 0 2px 8px rgba(36, 31, 30, .05);
  --shadow-md: 0 4px 12px rgba(36, 31, 30, .08), 0 12px 32px rgba(36, 31, 30, .07);
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { max-width: 100%; }
img { display: block; height: auto; }

a { color: var(--maroon); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--maroon-dark); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 600;
}

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.15em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.mt { margin-top: 2rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--maroon); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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

/* Type scale */
.h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.1rem); }
.h3 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.42rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .7em;
}

.prose { max-width: 66ch; }
.prose--lead { font-size: 1.1rem; color: var(--ink); }
.prose--strong { font-weight: 600; color: var(--ink); }

.fineprint { font-size: .87rem; color: var(--muted); max-width: 70ch; }

.textlink {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--gold-light);
  padding-bottom: 1px;
}
.textlink:hover { border-bottom-color: var(--maroon); }

/* ---------- 3. BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  padding: .82rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.btn--primary:hover { background: var(--maroon-dark); border-color: var(--maroon-dark); color: #fff; }

.btn--gold { background: var(--gold-light); color: var(--maroon-deep); border-color: var(--gold-light); }
.btn--gold:hover { background: #f0c869; color: var(--maroon-deep); }

.btn--ghost { background: transparent; color: var(--maroon); border-color: var(--maroon); }
.btn--ghost:hover { background: var(--maroon); color: #fff; }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.btn--outline-light:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }

/* ---------- 4. HEADER & NAV ---------- */
.topbar {
  background: var(--maroon-deep);
  color: #f0dfd4;
  font-size: .82rem;
}
.topbar__inner { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; align-items: center; padding-block: .5rem; }
.topbar__item { display: inline-flex; align-items: center; gap: .45rem; }
.topbar__item svg { width: 15px; height: 15px; fill: var(--gold-light); flex: none; }
.topbar a { color: #f7ece4; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar__item--push { margin-left: auto; color: #d8c0b4; }

.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .9rem;
}

.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand__crest { flex: none; width: 52px; height: 52px; }
.brand__crest svg { width: 100%; height: 100%; }
.crest-shield { fill: var(--maroon); }
.crest-flame { fill: var(--gold-light); }
.crest-book { fill: #fff; }

.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-family: var(--serif);
  font-size: clamp(1.1rem, .95rem + .7vw, 1.55rem);
  font-weight: 600;
  color: var(--maroon);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.brand__sub { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }

.navtoggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 42px; padding: 0 10px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer;
}
.navtoggle span { display: block; height: 2px; background: var(--maroon); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mainnav { background: var(--maroon); position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow-sm); }
.mainnav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding-inline: 20px; }
.mainnav a {
  display: block;
  padding: .85rem 1.05rem;
  color: #f4e6dd;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.mainnav a:hover { background: var(--maroon-dark); color: #fff; }
.mainnav a.is-active { color: #fff; border-bottom-color: var(--gold-light); background: var(--maroon-dark); }

/* ---------- 5. HERO & STATS ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 12% 18%, rgba(224,181,82,.26), transparent 65%),
    radial-gradient(700px 380px at 88% 82%, rgba(255,255,255,.1), transparent 60%),
    linear-gradient(140deg, var(--maroon) 0%, var(--maroon-dark) 52%, var(--maroon-deep) 100%);
}
.hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 78%);
}
.hero__inner { position: relative; padding-block: clamp(3rem, 7vw, 5.6rem); max-width: 860px; }
.hero__eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 1rem;
}
.hero__title {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.6rem);
  color: #fff; margin-bottom: .5em; letter-spacing: -.015em;
}
.hero__lead { font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem); color: #f3e3da; max-width: 62ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.center-actions { justify-content: center; }
.hero__motto {
  margin: 2.4rem 0 0; padding-top: 1.3rem;
  border-top: 1px solid rgba(255,255,255,.2);
  font-size: .93rem; color: #e6cdbf;
}
.hero__motto span { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-light); margin-right: .6rem; }

.stats { background: var(--white); border-bottom: 1px solid var(--line); }
.stats--plain { background: transparent; border: 0; }
.stats--plain .stats__grid { padding-inline: 0; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); padding-block: 0;
}
.stats__grid--3 { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--white); padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .18rem; }
.stat__value { font-family: var(--serif); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); color: var(--maroon); line-height: 1.1; }
.stat__label { font-weight: 700; font-size: .93rem; color: var(--ink); }
.stat__note { font-size: .84rem; color: var(--muted); line-height: 1.5; }

/* ---------- 6. SECTIONS & LAYOUT ---------- */
.section { padding-block: clamp(2.6rem, 5vw, 4.4rem); }
.section--tint { background: var(--tint); border-block: 1px solid var(--line); }
.section__head { max-width: 62ch; margin-bottom: 2.2rem; }
.section__lead { color: var(--muted); }

.grid { display: grid; gap: clamp(1.8rem, 4vw, 3.2rem); }
.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.grid--6-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--middle { align-items: center; }

.pagehero {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: #fff;
  padding-block: clamp(2rem, 4.5vw, 3.2rem);
}
.pagehero__title { color: #fff; font-size: clamp(1.7rem, 1.25rem + 2.2vw, 2.7rem); margin-bottom: .35em; }
.pagehero__lead { color: #f0ded3; max-width: 62ch; margin: 0; }
.crumbs { font-size: .83rem; color: #e0c4b6; margin-bottom: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs a { color: var(--gold-light); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- 7. COMPONENTS ---------- */

/* Tick list */
.ticklist { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.ticklist li { position: relative; padding-left: 1.85rem; margin-bottom: .6rem; }
.ticklist li::before {
  content: '';
  position: absolute; left: 0; top: .52em;
  width: 11px; height: 6px;
  border-left: 2.5px solid var(--gold); border-bottom: 2.5px solid var(--gold);
  transform: rotate(-45deg);
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 1rem;
  background: var(--tint); border-radius: 12px;
}
.card__icon .icon { width: 24px; height: 24px; fill: var(--maroon); }
.card__title { font-size: 1.12rem; margin-bottom: .45em; }
.card__text { margin: 0; font-size: .94rem; color: var(--body); }
.card--plain { border-left: 4px solid var(--gold-light); }

/* Notice box (home page sidebar) */
.noticebox {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--maroon);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  align-self: start;
}
.noticebox__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.noticebox__head h2 { margin: 0; }
.noticebox__head a { font-size: .85rem; font-weight: 600; text-decoration: none; }
.noticebox__head a:hover { text-decoration: underline; }
.noticelist { list-style: none; margin: 0; padding: 0; }
.noticelist li { padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px dashed var(--line); }
.noticelist li:last-child { border: 0; padding-bottom: 0; margin-bottom: 0; }
.notice__meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .45rem; font-size: .8rem; color: var(--muted); }
.notice__title { font-size: 1.02rem; margin-bottom: .3em; }
.notice__text { margin: 0; font-size: .89rem; color: var(--muted); }

/* Tags */
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 99px;
  background: var(--tint); color: var(--maroon);
  border: 1px solid var(--line);
}
.tag--examination { background: #fdeeee; color: #99231f; border-color: #f4d3d1; }
.tag--event { background: #eef4fb; color: #1f4f85; border-color: #d2e2f2; }
.tag--scholarship { background: #f0f7ee; color: #2c6130; border-color: #d5e8d2; }
.tag--academic { background: #fdf4e4; color: #8a5a11; border-color: #f2e0bd; }

/* Portrait */
.portrait { text-align: center; }
.portrait__frame {
  width: min(260px, 100%); margin: 0 auto 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--white); padding: 10px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.portrait__frame svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.portrait__name { font-family: var(--serif); font-size: 1.18rem; color: var(--ink); margin: 0; }
.portrait__role { font-size: .87rem; color: var(--muted); margin: 0; }

.signature { font-family: var(--serif); font-size: 1.1rem; color: var(--maroon); margin-top: 1.6rem; }
.signature span { display: block; font-family: var(--sans); font-size: .83rem; color: var(--muted); margin-top: .2rem; }

/* Academic ladder */
.ladder { display: grid; gap: 1.1rem; }
.rung {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.3rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.rung__num {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  background: var(--maroon); color: #fff;
  font-family: var(--serif); font-size: 1.2rem;
  border-radius: 50%;
}
.rung__title { font-size: 1.15rem; margin-bottom: .35em; }
.rung__text { margin-bottom: .9em; font-size: .94rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-size: .8rem; font-weight: 500;
  padding: .28rem .7rem; border-radius: 99px;
  background: var(--tint); color: var(--ink); border: 1px solid var(--line);
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.3rem; counter-reset: s; }
.step {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm); position: relative;
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: .9rem;
  border: 2px solid var(--gold); color: var(--maroon);
  font-family: var(--serif); font-size: 1.05rem; border-radius: 50%;
}
.step__title { font-size: 1.05rem; margin-bottom: .4em; }
.step__text { margin: 0; font-size: .9rem; color: var(--body); }

/* Callout / factbox */
.callout {
  background: var(--white); border: 1px solid var(--line);
  border-left: 5px solid var(--gold); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.callout > :last-child { margin-bottom: 0; }

.factbox {
  background: var(--white); border: 1px solid var(--line);
  border-top: 4px solid var(--maroon); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow-sm); align-self: start;
}
.factbox__note { font-size: .83rem; color: var(--muted); margin-bottom: 1.1rem; }
.factlist { margin: 0; }
.factlist > div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: .8rem;
  padding: .55rem 0; border-bottom: 1px dashed var(--line);
}
.factlist > div:last-child { border: 0; }
.factlist dt { font-size: .85rem; color: var(--muted); }
.factlist dd { margin: 0; font-size: .9rem; font-weight: 600; color: var(--ink); }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.table { width: 100%; border-collapse: collapse; min-width: 480px; }
.table thead th {
  background: var(--maroon); color: #fff;
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  text-align: left; padding: .85rem 1.1rem;
}
.table th[scope="row"] {
  font-family: var(--serif); font-size: 1rem; font-weight: 600;
  color: var(--maroon); text-align: left; white-space: nowrap;
}
.table td, .table th[scope="row"] { padding: .85rem 1.1rem; border-top: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
.table tbody tr:nth-child(even) { background: #fdfaf7; }

/* FAQ */
.faq { display: grid; gap: .8rem; max-width: 860px; }
.faq__item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.faq__item summary {
  cursor: pointer; font-family: var(--serif); font-size: 1.05rem; color: var(--ink);
  font-weight: 600; list-style: none; position: relative; padding-right: 2rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  position: absolute; right: 0; top: -.15em;
  font-size: 1.4rem; color: var(--gold); line-height: 1;
}
.faq__item[open] summary::after { content: '\2212'; }
.faq__item p { margin: .9rem 0 0; font-size: .94rem; }

/* Timeline (notices page) */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.9rem; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: .6rem; bottom: .6rem; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding-bottom: 2rem; }
.timeline__item::before {
  content: ''; position: absolute; left: calc(-1.9rem + 1px); top: .55rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--cream);
}
.timeline__meta { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-size: .84rem; color: var(--muted); margin-bottom: .4rem; }
.timeline__title { font-size: 1.2rem; margin-bottom: .35em; }
.timeline__text { margin: 0; }

/* Notebar */
.notebar {
  background: #fdf5e6; border: 1px solid #f0dfb8; border-left: 5px solid var(--gold);
  border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 2rem;
  font-size: .9rem; color: #6b5420;
}
.notebar code { background: #fff; border: 1px solid #ecdcb9; border-radius: 4px; padding: .1rem .35rem; font-size: .88em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.shot {
  margin: 0; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shot figcaption { padding: .8rem 1rem; font-size: .87rem; color: var(--muted); }

/* CTA band */
.cta { background: linear-gradient(120deg, var(--maroon-dark), var(--maroon-deep)); color: #fff; }
.cta__inner {
  display: grid; grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 2rem; align-items: center;
  padding-block: clamp(2.2rem, 4vw, 3.2rem);
}
.cta h2 { color: #fff; }
.cta p { color: #f0dbd0; margin: 0; max-width: 60ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Contact blocks */
.contactblock { font-style: normal; display: grid; gap: .1rem; margin-bottom: 1.5rem; font-size: 1.02rem; color: var(--ink); }
.contactlist { margin: 0 0 1.5rem; }
.contactlist > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .8rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.contactlist dt { font-size: .85rem; color: var(--muted); }
.contactlist dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

.mapframe {
  margin-top: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--tint); box-shadow: var(--shadow-sm);
}
.mapframe iframe { display: block; width: 100%; height: 300px; border: 0; }

/* Alerts */
.alert { border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 1.6rem; font-size: .94rem; }
.alert strong { display: block; margin-bottom: .25rem; }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alert--ok { background: #eff7ee; border: 1px solid #cfe4cc; border-left: 5px solid #3f7a42; color: #2b5c2e; }
.alert--ok a { color: #2b5c2e; }
.alert--bad { background: #fdeeed; border: 1px solid #f3d2d0; border-left: 5px solid #ab2a24; color: #8d211c; }

/* Error pages */
.errorpage { padding-block: 2rem; }
.errorpage__code { font-family: var(--serif); font-size: clamp(3.5rem, 10vw, 6rem); color: var(--gold-light); line-height: 1; margin: 0 0 .2em; }
.errorpage .prose { margin-inline: auto; }

/* ---------- 8. FORMS ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field label span[aria-hidden] { color: #ab2a24; }
.optional { font-weight: 400; color: var(--muted); }

.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white);
  padding: .72rem .9rem;
  border: 1px solid #d3c7ba; border-radius: var(--radius);
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(125, 25, 53, .13);
}
.field input:invalid:not(:placeholder-shown) { border-color: #c9736d; }

/* ---------- 9. FOOTER ---------- */
.footer { background: var(--maroon-deep); color: #e3cfc4; margin-top: auto; font-size: .92rem; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, .85fr)) minmax(0, 1.1fr);
  gap: 2rem;
  padding-block: clamp(2.4rem, 5vw, 3.4rem);
}
.footer h2, .footer h3 { color: #fff; }
.footer__brand { font-size: 1.28rem; margin-bottom: .4em; }
.footer h3 { font-size: 1rem; letter-spacing: .02em; margin-bottom: .9em; }
.footer__motto { font-family: var(--serif); color: var(--gold-light); font-size: 1.05rem; margin-bottom: 1em; }
.footer__motto span { font-family: var(--sans); font-size: .82rem; color: #c8ada0; }
.footer__text { color: #cdb2a5; line-height: 1.65; margin: 0 0 1em; }
.footer__text--tight { font-size: .85rem; margin: .8rem 0 0; }

.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer__links a { color: #e8d6cb; text-decoration: none; overflow-wrap: anywhere; }
.footer__links a:hover { color: #fff; text-decoration: underline; }

.footer__address { font-style: normal; display: grid; gap: .12rem; margin-bottom: 1rem; color: #ddc5b8; }

.footer__bar { border-top: 1px solid rgba(255,255,255,.14); }
.footer__bar-inner {
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between;
  padding-block: 1.1rem; font-size: .83rem; color: #bb9d90;
}
.footer__bar p { margin: 0; }

/* ---------- 10. RESPONSIVE ---------- */
@media (max-width: 1040px) {
  .cards, .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid--7-5, .grid--5-7, .grid--6-6 { grid-template-columns: minmax(0, 1fr); }
  .grid--5-7 > .portrait { order: -1; }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta__inner { grid-template-columns: minmax(0, 1fr); }

  .navtoggle { display: flex; }
  .mainnav { position: static; display: none; }
  .mainnav.is-open { display: block; }
  .mainnav__list { flex-direction: column; padding-block: .5rem; }
  .mainnav a { border-bottom: 1px solid rgba(255,255,255,.12); border-left: 3px solid transparent; }
  .mainnav a.is-active { border-bottom-color: rgba(255,255,255,.12); border-left-color: var(--gold-light); }
  .topbar__item--push { margin-left: 0; width: 100%; }
}

@media (max-width: 620px) {
  .cards, .cards--3, .steps, .gallery { grid-template-columns: minmax(0, 1fr); }
  .stats__grid, .stats__grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .factlist > div, .contactlist > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .rung { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .brand__crest { width: 42px; height: 42px; }
  .hero__actions .btn, .cta__actions .btn { flex: 1 1 100%; text-align: center; }
}

@media print {
  .topbar, .mainnav, .navtoggle, .cta, .mapframe, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero__bg { display: none; }
  .hero, .pagehero, .footer { background: #fff !important; color: #000 !important; }
  .hero__title, .pagehero__title, .footer h2, .footer h3 { color: #000 !important; }
  .card, .rung, .step, .callout, .factbox { box-shadow: none; break-inside: avoid; }
}

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