/* =========================================================
   ООУ „Ристе Ристески“ – Долно Косоврасти
   Premium school website stylesheet
   ========================================================= */

:root {
  --navy: #0d2340;
  --navy-deep: #081828;
  --blue: #1a4d73;
  --blue-soft: #2a5f86;
  --green: #3d5c48;
  --green-soft: #4a6d56;
  --green-mist: #e8efe9;
  --gold: #b8923f;
  --gold-soft: #d4b56a;
  --bg: #f5f6f4;
  --bg-alt: #eef0ee;
  --surface: #ffffff;
  --text: #1a2430;
  --text-muted: #5a6672;
  --border: rgba(13, 35, 64, 0.1);
  --shadow: 0 12px 40px rgba(8, 24, 40, 0.08);
  --shadow-sm: 0 4px 18px rgba(8, 24, 40, 0.06);
  --radius: 18px;
  --radius-sm: 14px;
  --radius-lg: 22px;
  --header-h: 72px;
  --font-display: "Manrope", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", "Manrope", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(61, 92, 72, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 20%, rgba(26, 77, 115, 0.05), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
  position: relative;
  width: 100%;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

html.menu-open,
html.menu-open body {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

address {
  font-style: normal;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible,
.nav-list a:focus-visible,
.text-link:focus-visible,
.brand:focus-visible,
.nav-toggle:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
  box-shadow: 0 8px 24px rgba(184, 146, 63, 0.28);
}

.btn-primary:hover {
  background: var(--gold-soft);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}

.btn-nav {
  background: var(--navy);
  color: #fff;
  min-height: 40px;
  padding: 0.55rem 1.15rem;
  font-size: 0.84rem;
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
}

.btn-nav:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

.btn-nav--mobile {
  display: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.95rem;
}

.text-link:hover span {
  transform: translateX(4px);
}

.text-link span {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(8, 24, 40, 0.06);
  border-bottom-color: rgba(13, 35, 64, 0.06);
}

.site-header.is-scrolled .brand-name {
  color: var(--navy);
}

.site-header.is-scrolled .brand-place {
  color: var(--text-muted);
}

.site-header.is-scrolled .brand-mark {
  color: var(--navy);
}

.site-header.is-scrolled .nav-list a {
  color: rgba(13, 35, 64, 0.72);
}

.site-header.is-scrolled .nav-toggle {
  border-color: rgba(13, 35, 64, 0.12);
  background: rgba(13, 35, 64, 0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  width: min(100% - 2rem, 1280px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  z-index: 110;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  color: #fff;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-mark--img,
img.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.015em;
  color: #fff;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.brand-place {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav {
  margin-left: auto;
  margin-right: 0.35rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav-list a {
  position: relative;
  display: block;
  padding: 0.5rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.86);
  border-radius: 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s var(--ease);
}

.nav-list a:hover,
.nav-list a.is-active {
  color: #fff;
  background: transparent;
}

.nav-list a:hover::after,
.nav-list a.is-active::after {
  transform: scaleX(1);
}

.site-header.is-scrolled .nav-list a:hover,
.site-header.is-scrolled .nav-list a.is-active {
  color: var(--navy);
  background: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  z-index: 110;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 11px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-toggle span {
  display: block;
  height: 1.75px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s ease, background 0.3s ease;
  transform-origin: center;
}

.site-header.is-scrolled .nav-toggle span,
.site-header.menu-open .nav-toggle span {
  background: var(--navy);
}

.nav-toggle[aria-expanded="true"] {
  border-color: rgba(13, 35, 64, 0.12);
  background: rgba(13, 35, 64, 0.04);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.75px) rotate(-45deg);
}

/* Transparent over hero */
.site-header:not(.is-scrolled):not(.menu-open) .brand-name,
.site-header:not(.is-scrolled):not(.menu-open) .nav-list a {
  color: #fff;
}

.site-header:not(.is-scrolled):not(.menu-open) .brand-place {
  color: rgba(255, 255, 255, 0.7);
}

.site-header:not(.is-scrolled):not(.menu-open) .brand-mark {
  color: #fff;
}

.site-header:not(.is-scrolled):not(.menu-open) .btn-nav--desktop {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  backdrop-filter: blur(8px);
}

.site-header:not(.is-scrolled):not(.menu-open) .btn-nav--desktop:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

.site-header.menu-open {
  z-index: 4000;
  background: #fff;
  border-bottom-color: rgba(13, 35, 64, 0.06);
}

.nav-close {
  display: none;
}

.site-header.menu-open .brand-name,
.site-header.menu-open .brand-mark {
  color: var(--navy);
}

.site-header.menu-open .brand-place {
  color: var(--text-muted);
}

/* Inner pages have no dark hero behind the bar */
body:not(.risteski-home) .site-header {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 28px rgba(8, 24, 40, 0.06);
  border-bottom-color: rgba(13, 35, 64, 0.06);
}

body:not(.risteski-home) .site-header:not(.menu-open) .brand-name,
body:not(.risteski-home) .site-header:not(.menu-open) .brand-mark,
body:not(.risteski-home) .site-header:not(.menu-open) .nav-list a:hover,
body:not(.risteski-home) .site-header:not(.menu-open) .nav-list a.is-active {
  color: var(--navy);
}

body:not(.risteski-home) .site-header:not(.menu-open) .brand-place {
  color: var(--text-muted);
}

body:not(.risteski-home) .site-header:not(.menu-open) .nav-list a {
  color: rgba(13, 35, 64, 0.78);
}

body:not(.risteski-home) .site-header:not(.menu-open) .nav-toggle {
  border-color: rgba(13, 35, 64, 0.12);
  background: rgba(13, 35, 64, 0.03);
}

body:not(.risteski-home) .site-header:not(.menu-open) .nav-toggle span {
  background: var(--navy);
}

body:not(.risteski-home) .site-header:not(.menu-open) .btn-nav--desktop,
body:not(.risteski-home) .site-header:not(.menu-open) .btn-nav--desktop:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  animation: heroZoom 18s ease-out forwards;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 24, 40, 0.55) 0%, rgba(8, 24, 40, 0.35) 35%, rgba(8, 24, 40, 0.72) 78%, rgba(8, 24, 40, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 24, 40, 0.45) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 0 8.5rem;
  max-width: 820px;
  margin-left: max(1.25rem, calc((100% - var(--max)) / 2));
  margin-right: auto;
  width: min(100% - 2.5rem, 820px);
  box-sizing: border-box;
}

.hero-label {
  display: inline-block;
  margin-bottom: 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.hero-brand {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.1rem;
  max-width: 34ch;
}

.hero-lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 42ch;
  margin-bottom: 1.85rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-panel {
  position: relative;
  z-index: 2;
  margin-top: auto;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  max-width: 920px;
  margin-inline: auto;
}

.hero-stats > div {
  background: rgba(13, 35, 64, 0.72);
  padding: 1.35rem 1.25rem 1.45rem;
  text-align: center;
}

.hero-stats dt {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.35rem;
}

.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.reveal-hero {
  opacity: 0;
  transform: translateY(22px);
  animation: riseIn 0.9s var(--ease) forwards;
}

.reveal-hero:nth-child(1) { animation-delay: 0.15s; }
.reveal-hero:nth-child(2) { animation-delay: 0.28s; }
.reveal-hero:nth-child(3) { animation-delay: 0.4s; }
.reveal-hero:nth-child(4) { animation-delay: 0.52s; }
.reveal-hero:nth-child(5) { animation-delay: 0.64s; }

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  position: relative;
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  max-width: 640px;
}

.section-head.centered {
  text-align: center;
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.section h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  color: var(--navy);
  margin-bottom: 0.85rem;
  text-wrap: balance;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
}

.demo-note {
  font-size: 0.95rem;
  font-style: italic;
}

/* ---------- About ---------- */
.about {
  background: var(--surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-heading h2 {
  margin-bottom: 2rem;
}

.year-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.year-line {
  width: 2px;
  height: 64px;
  background: linear-gradient(180deg, var(--gold), var(--green));
  border-radius: 2px;
}

.year-text {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.about-copy {
  font-size: 1.08rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
}

.about-copy p {
  margin-bottom: 1.25rem;
}

.about-copy p:first-child {
  color: var(--text);
  font-size: 1.15rem;
}

/* ---------- Timeline ---------- */
.timeline-section {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(184, 146, 63, 0.07), transparent 55%),
    linear-gradient(180deg, transparent, rgba(61, 92, 72, 0.04)),
    var(--bg);
  overflow: hidden;
  padding-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.timeline {
  --timeline-delay: 0.18s;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 6%;
  right: 6%;
  height: 2px;
  border-radius: 2px;
  background: rgba(13, 35, 64, 0.1);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.timeline.is-animated::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--green));
  box-shadow: 0 0 18px rgba(184, 146, 63, 0.35);
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.timeline-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  position: relative;
  z-index: 2;
  margin-bottom: 0.85rem;
}

.timeline-marker {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--gold);
  box-shadow: 0 0 0 0 rgba(184, 146, 63, 0.35);
  position: relative;
  transform: scale(0);
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s ease,
    background 0.3s ease,
    border-color 0.3s ease;
  transition-delay: calc(var(--i, 0) * var(--timeline-delay) + 0.35s);
}

.timeline-marker::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(184, 146, 63, 0.45);
  opacity: 0;
  transform: scale(0.6);
}

.timeline.is-animated .timeline-marker {
  transform: scale(1);
  opacity: 1;
  animation: markerPulse 2.4s ease-out calc(var(--i, 0) * var(--timeline-delay) + 0.9s) both;
}

.timeline.is-animated .timeline-marker::after {
  animation: markerRing 1.1s var(--ease) calc(var(--i, 0) * var(--timeline-delay) + 0.55s) both;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
  transition-delay: calc(var(--i, 0) * var(--timeline-delay) + 0.45s);
}

.timeline.is-animated .timeline-content {
  opacity: 1;
  transform: translateY(0);
}

.timeline-year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.42rem 0.9rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  letter-spacing: -0.02em;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.35s var(--ease);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-sm);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s ease,
    border-color 0.3s ease;
}

.timeline-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
  transition-delay: calc(var(--i, 0) * var(--timeline-delay) + 0.7s);
}

.timeline.is-animated .timeline-card::before {
  transform: scaleX(1);
}

.timeline-card h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.65rem;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * var(--timeline-delay) + 0.65s);
}

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  flex: 1;
  transform: translateY(10px);
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.55s var(--ease);
  transition-delay: calc(var(--i, 0) * var(--timeline-delay) + 0.78s);
}

.timeline.is-animated .timeline-card h3,
.timeline.is-animated .timeline-card p {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:hover .timeline-marker,
.timeline-item:focus-within .timeline-marker {
  background: var(--gold);
  border-color: var(--gold);
}

.timeline-item:hover .timeline-year,
.timeline-item:focus-within .timeline-year {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  transform: translateY(-2px);
}

.timeline-item:hover .timeline-card,
.timeline-item:focus-within .timeline-card {
  transform: translateY(-8px);
  box-shadow: 0 18px 44px rgba(8, 24, 40, 0.12);
  border-color: rgba(26, 77, 115, 0.2);
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 146, 63, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(184, 146, 63, 0); }
}

@keyframes markerRing {
  0% { opacity: 0.8; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(1.85); }
}

/* ---------- Mission ---------- */
.mission {
  background: var(--bg-alt);
  padding-top: clamp(2.5rem, 5vw, 3.75rem);
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mission-card {
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  min-height: 100%;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease);
}

.mission-card:hover {
  transform: translateY(-5px);
}

.mission-card--dark {
  background:
    radial-gradient(circle at top right, rgba(184, 146, 63, 0.18), transparent 45%),
    linear-gradient(160deg, var(--navy) 0%, #163557 100%);
  color: #fff;
}

.mission-card--green {
  background:
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(160deg, #edf3ee 0%, #d8e5db 100%);
  color: var(--navy);
  border-color: rgba(61, 92, 72, 0.12);
}

.mission-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--gold);
}

.mission-card--green .mission-icon {
  color: var(--green);
}

.mission-icon svg {
  width: 100%;
  height: 100%;
}

.mission-card h3 {
  font-size: 1.75rem;
  margin-bottom: 1.35rem;
}

.mission-card ul {
  display: grid;
  gap: 1rem;
}

.mission-card li {
  position: relative;
  padding-left: 1.15rem;
  line-height: 1.65;
  font-size: 1.02rem;
}

.mission-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.mission-card--green li::before {
  background: var(--green);
}

.mission-card--dark li {
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- Numbers ---------- */
.numbers {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}

.numbers::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(184, 146, 63, 0.18), transparent 35%),
    radial-gradient(circle at 85% 70%, rgba(61, 92, 72, 0.22), transparent 40%);
  pointer-events: none;
}

.numbers .eyebrow {
  color: var(--gold-soft);
}

.numbers h2 {
  color: #fff;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  width: 100%;
}

.number-item {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.number-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 0.15rem;
  line-height: 1.05;
}

.number-value--text {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  padding-top: 0.35rem;
}

.number-item p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.3;
}

/* ---------- Schools ---------- */
.schools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.school-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
}

.school-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.school-image {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.school-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.school-card:hover .school-image img {
  transform: scale(1.06);
}

.school-body {
  position: relative;
  padding: 1.5rem 1.4rem 1.75rem;
}

.school-tag {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.school-body h3 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.school-place {
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 0.75rem !important;
}

.school-body > p:last-of-type {
  color: var(--text-muted);
  font-size: 0.98rem;
  padding-right: 1.5rem;
}

.school-arrow {
  position: absolute;
  right: 1.35rem;
  bottom: 1.5rem;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--navy);
  font-size: 1.1rem;
  transition: transform 0.35s var(--ease), background 0.35s ease, color 0.35s ease;
}

.school-card:hover .school-arrow {
  transform: translateX(4px);
  background: var(--navy);
  color: #fff;
}

/* ---------- Values ---------- */
.values {
  background: var(--surface);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.value-card {
  padding: 1.75rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  border-color: rgba(61, 92, 72, 0.25);
  box-shadow: var(--shadow-sm);
}

.value-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1.1rem;
  color: var(--blue);
}

.value-icon svg {
  width: 100%;
  height: 100%;
}

.value-card h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.55rem;
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ---------- School life ---------- */
.life-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 220px;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}

.life-item {
  position: relative;
  grid-column: span 4;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}

.life-item--lg {
  grid-column: span 8;
  grid-row: span 2;
}

.life-item--wide {
  grid-column: span 8;
}

.life-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.life-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 24, 40, 0.78) 100%);
  opacity: 0.85;
  transition: opacity 0.35s ease;
}

.life-caption {
  position: absolute;
  left: 1.15rem;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 1;
  color: #fff;
  transform: translateY(8px);
  opacity: 0.92;
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
}

.life-caption span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.3rem;
}

.life-caption strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.life-item:hover img {
  transform: scale(1.07);
}

.life-item:hover::after {
  opacity: 1;
}

.life-item:hover .life-caption {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Patron ---------- */
.patron {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  padding: 6rem 0;
}

.patron-bg {
  position: absolute;
  inset: 0;
}

.patron-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(8%);
}

.patron-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 24, 40, 0.88) 0%, rgba(8, 24, 40, 0.72) 48%, rgba(8, 24, 40, 0.45) 100%),
    linear-gradient(180deg, rgba(8, 24, 40, 0.2), rgba(8, 24, 40, 0.55));
}

.patron-content {
  position: relative;
  max-width: 640px;
}

.patron-date {
  display: inline-block;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(184, 146, 63, 0.55);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.patron h2 {
  color: #fff;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 1.25rem;
}

.patron p:last-child {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.84);
  max-width: 48ch;
}

/* ---------- News ---------- */
.news {
  background: var(--bg);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.news-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.news-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(8, 24, 40, 0.82) 100%);
}

.news-image-title {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.9rem;
  z-index: 1;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.post-date {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-body {
  padding: 1.4rem 1.35rem 1.6rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.news-cat {
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.news-body h3 {
  font-size: 1.18rem;
  color: var(--navy);
  margin-bottom: 0.65rem;
  text-wrap: balance;
}

.news-body h3 a {
  color: inherit;
  text-decoration: none;
}

.news-body h3 a:hover {
  color: var(--blue);
}

.news-body > p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: inset 0 12px 28px rgba(8, 24, 40, 0.03);
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  align-items: stretch;
}

.contact-main {
  background:
    radial-gradient(circle at top right, rgba(184, 146, 63, 0.16), transparent 45%),
    linear-gradient(160deg, var(--navy) 0%, #163557 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.contact-main h3 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin-bottom: 1rem;
  color: #fff;
}

.contact-main address {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
  font-size: 1.02rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  row-gap: 0.2rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(26, 77, 115, 0.16);
}

.contact-card-icon {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  color: var(--blue);
}

.contact-card-icon svg {
  width: 100%;
  height: 100%;
}

.contact-card-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.contact-card-value {
  margin: 0;
  color: var(--text);
  font-weight: 500;
  font-size: 0.98rem;
}

.placeholder-field {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(26, 77, 115, 0.06);
  border: 1px solid rgba(13, 35, 64, 0.12);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.contact .map-frame {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #e7ece8;
}

.school-map {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.map-external {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(13, 35, 64, 0.1);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, transform 0.2s ease;
}

.map-external:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  align-items: start;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: #fff;
}

.footer-logo .brand-mark {
  width: 42px;
  height: 42px;
  color: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
}

.footer-logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  line-height: 1.2;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 !important;
}

.footer-place {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
}

.footer-muted {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 !important;
  font-size: 0.92rem;
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem !important;
  font-size: 0.95rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.48);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .nav-list a {
    padding: 0.45rem 0.42rem;
    font-size: 0.78rem;
  }

  .brand-name {
    font-size: 0.86rem;
  }
}

/* Collapse nav early — Macedonian labels are long */
@media (max-width: 1120px) {
  .nav-toggle {
    display: flex;
  }

  .header-actions {
    margin-left: auto;
  }

  .btn-nav--desktop {
    display: none;
  }

  .btn-nav--mobile {
    display: inline-flex;
    width: 100%;
    margin-top: 1.25rem;
    min-height: 48px;
    font-size: 0.95rem;
    background: var(--navy);
    color: #fff;
    border: 0;
  }

  .nav-close {
    display: flex;
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: 0.85rem;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(13, 35, 64, 0.18);
    border-radius: 12px;
    background: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .nav-close span {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
  }

  .nav-close span:first-child {
    transform: rotate(45deg);
  }

  .nav-close span:last-child {
    transform: rotate(-45deg);
  }

  .nav {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: 100%;
    margin: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: calc(var(--header-h) + 1.25rem) 1.5rem 2rem;
    transform: translate3d(100%, 0, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.35s ease, visibility 0.35s;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .brand,
  .header-actions {
    position: relative;
    z-index: 1100;
  }

  .site-header.menu-open .nav-toggle,
  .site-header.is-scrolled .nav-toggle {
    border-color: rgba(13, 35, 64, 0.2);
    background: #fff;
  }

  .site-header.menu-open .nav-toggle span,
  .site-header.is-scrolled .nav-toggle span {
    background: var(--navy);
  }

  .nav.is-open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .nav-list a {
    color: var(--navy) !important;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 0.95rem 0.85rem;
    border-radius: 14px;
    white-space: normal;
  }

  .nav-list a::after {
    display: none;
  }

  .nav-list a:hover,
  .nav-list a.is-active {
    background: rgba(13, 35, 64, 0.05) !important;
    color: var(--navy) !important;
  }

  .nav-list a.is-active {
    background: rgba(26, 77, 115, 0.08) !important;
    box-shadow: inset 3px 0 0 var(--gold);
  }
}

@media (max-width: 980px) {
  .about-grid,
  .mission-grid,
  .news-grid,
  .schools-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  /* Vertical timeline for tablet/phone */
  .timeline {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 560px;
    margin-inline: auto;
  }

  .timeline::before {
    top: 10px;
    bottom: 24px;
    left: 11px;
    right: auto;
    width: 2px;
    height: auto;
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .timeline.is-animated::before {
    transform: scaleY(1);
    background: linear-gradient(180deg, var(--blue), var(--gold), var(--green));
    box-shadow: 0 0 16px rgba(184, 146, 63, 0.3);
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 1rem;
    align-items: start;
    padding-bottom: 1.35rem;
  }

  .timeline-item:last-child {
    padding-bottom: 0;
  }

  .timeline-rail {
    height: auto;
    margin: 0;
    padding-top: 0.45rem;
    justify-content: center;
    align-items: flex-start;
  }

  .timeline-content {
    align-items: flex-start;
    transform: translateX(28px);
  }

  .timeline.is-animated .timeline-content {
    transform: translateX(0);
  }

  .timeline-year {
    margin-bottom: 0.75rem;
  }

  .timeline-card {
    min-height: 0;
  }

  .timeline-item:hover .timeline-card,
  .timeline-item:focus-within .timeline-card {
    transform: translateY(-4px);
  }

  .numbers-grid,
  .values-grid {
    grid-template-columns: 1fr 1fr;
  }

  .numbers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .life-grid {
    grid-auto-rows: 240px;
  }

  .life-item,
  .life-item--lg,
  .life-item--wide {
    grid-column: span 6;
    grid-row: span 1;
    min-height: 0;
  }


  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.75rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.25rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .hero-stats > div {
    padding: 1.15rem 0.85rem;
  }

  .hero-stats dd {
    font-size: 1.15rem;
  }

  .hero-content {
    padding-bottom: 2rem;
  }

  .hero-panel {
    margin-top: 2rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .header-inner {
    width: min(100% - 1.25rem, 1280px);
  }

  .hero-content {
    margin-left: auto;
    margin-right: auto;
    width: min(100% - 1.5rem, 820px);
    padding-top: 3rem;
    padding-bottom: 2rem;
  }

  .brand-place {
    display: none;
  }

  .brand-name {
    font-size: 0.82rem;
    max-width: 46vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    max-width: 360px;
    border-radius: var(--radius);
  }

  .hero-stats > div {
    padding: 1rem 1.15rem;
    text-align: left;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
  }

  .hero-stats dt {
    margin-bottom: 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .header-actions .btn {
    width: auto;
  }

  .timeline,
  .numbers-grid,
  .values-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding-top: 2.75rem;
  }

  .footer-grid {
    gap: 1.75rem;
    padding-bottom: 2rem;
  }

  .footer-brand {
    grid-column: auto;
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .footer-bottom {
    text-align: center;
    padding: 1.1rem 0;
  }

  .footer-bottom p {
    margin: 0;
    line-height: 1.5;
  }

  .timeline {
    max-width: none;
  }

  .contact-panel {
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .school-map {
    height: 260px;
  }

  .timeline-item {
    column-gap: 0.85rem;
    padding-bottom: 1.15rem;
  }

  .timeline-card {
    padding: 1.25rem 1.15rem;
  }

  .timeline-card h3 {
    font-size: 1.08rem;
  }

  .timeline-card p {
    font-size: 0.95rem;
  }

  .life-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
    gap: 0.85rem;
  }

  .life-item,
  .life-item--lg,
  .life-item--wide {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 0;
    height: 220px;
  }




  .section {
    padding: 2.75rem 0;
  }

  .timeline-section {
    padding-bottom: 1.5rem;
  }

  .mission {
    padding-top: 1.5rem;
  }

  .mission .section-head {
    margin-bottom: 1.5rem;
  }

  .section-head {
    margin-bottom: 1.75rem;
  }

  .hero-brand {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-hero {
    opacity: 1;
    transform: none;
  }

  .timeline::before,
  .timeline-item,
  .timeline-marker,
  .timeline-content,
  .timeline-card h3,
  .timeline-card p,
  .timeline-card::before {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .timeline-marker::after {
    display: none;
  }

  .hero-media img {
    transform: none;
  }
}


/* ---------- Inner pages ---------- */
.page-content .section-head { margin-bottom: 1.5rem; }
.page-content .entry-content { max-width: 72ch; }
.page-content .entry-content > *:first-child { margin-top: 0; }
.page-content .entry-content a { color: var(--blue); }

