/* ==========================================================================
   Pre-Uni New College — Epping Branch
   Design language: exam paper. Ink navy, marking-red pen, ruled notebook
   lines and graph-paper grids — the material world of a tutoring college.
   ========================================================================== */

:root {
  --ink:       #16243D;   /* pen ink / uniform navy   */
  --ink-soft:  #4A5670;   /* secondary text           */
  --paper:     #FBFAF7;   /* answer-booklet white     */
  --white:     #FFFFFF;
  --rule:      #C9D8EE;   /* notebook rule blue       */
  --grid:      #E8EDF5;   /* graph-paper grid         */
  --red:       #C13A32;   /* teacher's marking pen    */
  --red-soft:  #F7E9E7;
  --navy-deep: #0F1A2E;

  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body:    "Schibsted Grotesk", "Segoe UI", sans-serif;
  --font-mono:    "Spline Sans Mono", Consolas, monospace;

  --container: 1120px;
  --radius: 10px;
  --shadow: 0 2px 6px rgba(22, 36, 61, 0.06), 0 12px 32px rgba(22, 36, 61, 0.08);
  --header-h: 76px;
}

/* ---------- Reset ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

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

a { color: var(--ink); }

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

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

/* ---------- Type helpers ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 2px;
  background: var(--red);
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 700;
  max-width: 22ch;
}

.section-lead {
  color: var(--ink-soft);
  max-width: 58ch;
  font-size: 1.05rem;
}

/* Red-pen underline — the marker's stroke under a key word */
.pen-word { position: relative; white-space: nowrap; }

.pen-word svg {
  position: absolute;
  left: -2%;
  bottom: -0.18em;
  width: 104%;
  height: 0.32em;
  overflow: visible;
}

.pen-word path {
  fill: none;
  stroke: var(--red);
  stroke-width: 7;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: no-preference) {
  .pen-word path {
    stroke-dasharray: 320;
    stroke-dashoffset: 320;
    animation: pen-draw 0.7s ease-out 0.45s forwards;
  }
  @keyframes pen-draw { to { stroke-dashoffset: 0; } }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.9em 1.5em;
  border-radius: 6px;
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--ink); color: var(--white); }
.btn-solid:hover { background: var(--navy-deep); border-color: var(--navy-deep); }

.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

.btn-red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-red:hover { background: #A82F28; border-color: #A82F28; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grid);
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled { box-shadow: 0 4px 20px rgba(22, 36, 61, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-right: auto;
}

.brand-logo {
  height: 62px;
  width: auto;
  border-radius: 8px;
  border: 1px solid var(--grid);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a:not(.nav-call) {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.5em 0.7em;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:not(.nav-call):hover { color: var(--ink); background: var(--grid); }

.site-nav a.active {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--red);
  border-radius: 6px 6px 0 0;
}

.nav-call { display: none; }
.header-call { padding: 0.75em 1.2em; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--grid);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--grid);
  overflow: hidden;
}

.hero::after {
  /* fade the grid out toward the bottom so content sections start clean */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(transparent, var(--paper));
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 3.9rem);
  font-weight: 800;
  margin-bottom: 0.4em;
}

.hero-copy p {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-note {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.hero-note a { color: var(--red); font-weight: 500; }

/* Exam cover-sheet card — the page's signature artifact */
.exam-slip {
  position: relative;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 1.75rem 3rem;
  transform: rotate(1.2deg);
}

.exam-slip::before {
  /* the red margin line of an answer booklet */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2.1rem;
  width: 1.5px;
  background: var(--red);
  opacity: 0.55;
}

.exam-slip-head {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 0.35rem;
}

.exam-slip dl { margin: 0; }

.exam-slip .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--rule);
}

.exam-slip .row:last-of-type { border-bottom: none; }

.exam-slip dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.exam-slip dd {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: right;
}

.exam-stamp {
  position: absolute;
  right: -14px;
  top: -16px;
  width: 74px;
  height: 74px;
  border: 2.5px solid var(--red);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--white);
  transform: rotate(9deg);
  line-height: 1.3;
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.section-alt { background: var(--white); border-block: 1px solid var(--grid); }

.section-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }

/* ---------- Course cards ---------- */

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

.course-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.course-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 4px;
  padding: 0.35em 0.7em;
  align-self: flex-start;
  margin-bottom: 1.1rem;
}

.course-card h3 { font-size: 1.28rem; font-weight: 700; }

.course-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex-grow: 1;
}

.course-more {
  margin-top: 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--red);
}

/* ---------- Downloads (ruled answer-sheet list) ---------- */

.download-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.download-group {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.download-group h3 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem 1.5rem;
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
}

.download-group h3 small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rule);
}

.download-list { position: relative; padding-left: 1.1rem; }

.download-list::before {
  /* answer-booklet red margin */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.1rem;
  width: 1px;
  background: var(--red);
  opacity: 0.4;
}

.download-list a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.download-list a:last-child { border-bottom: none; }
.download-list a:hover { background: var(--paper); }
.download-list a:hover .dl-name { color: var(--red); }

.dl-name { flex-grow: 1; }

.dl-type {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.25em 0.55em;
  flex: none;
}

.featured-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.featured-download .fd-text { flex: 1 1 280px; }

.featured-download h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 0.2em; }

.featured-download p {
  color: var(--rule);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Feature list (why us) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.feature-tick {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 50%;
  margin-top: 0.15rem;
}

.feature-tick svg { width: 15px; height: 15px; }

.feature h3 { font-size: 1.05rem; margin-bottom: 0.25em; }
.feature p { color: var(--ink-soft); font-size: 0.93rem; }

/* ---------- Contact strip / info cards ---------- */

.contact-strip {
  background: var(--navy-deep);
  color: var(--white);
}

.contact-strip .section-title { color: var(--white); }
.contact-strip .section-lead { color: var(--rule); }

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.contact-card {
  border: 1px solid rgba(201, 216, 238, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-card h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rule);
  margin-bottom: 0.75rem;
}

.contact-card a, .contact-card p {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  font-family: var(--font-display);
}

.contact-card a:hover { color: #E89B95; }

.contact-card small {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--rule);
}

/* ---------- Page hero (subpages) ---------- */

.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid var(--grid);
}

.page-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 800;
  max-width: 20ch;
}

.page-hero .section-lead { font-size: 1.08rem; }

/* ---------- Prose blocks ---------- */

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); }

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Fact sheet (about page sidebar) */
.fact-sheet {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.fact-sheet h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.fact-sheet .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
}

.fact-sheet .row:last-child { border-bottom: none; }
.fact-sheet .row span { color: var(--ink-soft); }
.fact-sheet .row strong { text-align: right; }

/* ---------- Course detail blocks ---------- */

.course-detail {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.course-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.course-detail-head h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }

.course-detail > p { color: var(--ink-soft); max-width: 62ch; }

.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.subject {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
}

.subject h3 { font-size: 1rem; margin-bottom: 0.3em; }
.subject p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.check-list li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.check-list li::before {
  content: "✓";
  color: var(--red);
  font-weight: 700;
  flex: none;
  line-height: 1.5;
}

/* ---------- Steps (new students) ---------- */

.steps { counter-reset: step; display: grid; gap: 1.25rem; }

.step {
  counter-increment: step;
  display: flex;
  gap: 1.5rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--red);
  flex: none;
  line-height: 1.2;
}

.step h3 { font-size: 1.15rem; margin-bottom: 0.3em; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }
.step .btn { margin-top: 0.9rem; }

/* ---------- Hours tables ---------- */

.hours-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.hours-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.hours-card h3 {
  margin: 0;
  padding: 1rem 1.5rem;
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
}

.hours-card.holiday h3 { background: var(--red); }

.hours-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hours-card td {
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.hours-card tr:last-child td { border-bottom: none; }

.hours-card td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.hours-card .closed td:last-child { color: var(--red); }

.map-embed {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 2rem;
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* ---------- Notice box ---------- */

.notice {
  display: flex;
  gap: 0.9rem;
  background: var(--red-soft);
  border: 1px solid #E5C4C0;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.notice strong { color: var(--red); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: var(--rule);
  padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
  margin-top: auto;
}

body { display: flex; flex-direction: column; min-height: 100vh; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(201, 216, 238, 0.2);
}

.footer-logo {
  display: block;
  margin-bottom: 0.9rem;
}

.footer-logo img {
  height: 80px;
  width: auto;
  border-radius: 8px;
}

.footer-brand p { font-size: 0.9rem; max-width: 34ch; }

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8FA3C4;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--rule);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.22rem 0;
}

.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-col p { font-size: 0.92rem; margin-top: 0.5rem; }
.footer-hours { line-height: 1.9; }

.footer-bottom {
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #8FA3C4;
}

/* ---------- Reveal on scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .exam-slip { max-width: 460px; transform: rotate(0.8deg); }
  .card-grid, .contact-cards { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .fact-sheet { position: static; }
  .header-call { display: none; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grid);
    box-shadow: 0 16px 32px rgba(22, 36, 61, 0.12);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }

  .site-nav.open { display: flex; }

  .site-nav a:not(.nav-call) {
    padding: 0.9em 0.5em;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--grid);
    border-radius: 0;
  }

  .site-nav a.active { box-shadow: inset 3px 0 0 var(--red); padding-left: 1em; }

  .nav-call {
    display: inline-flex;
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  :root { --header-h: 66px; }

  .brand-logo { height: 52px; }

  .card-grid,
  .contact-cards,
  .download-groups,
  .feature-grid,
  .hours-grid,
  .subject-grid { grid-template-columns: 1fr; }

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

  .hero-actions .btn { flex: 1 1 100%; }

  .step { flex-direction: column; gap: 0.6rem; padding: 1.35rem; }

  .exam-slip { padding: 1.4rem 1.25rem 1.4rem 2.4rem; }
  .exam-slip::before { left: 1.7rem; }
  .exam-stamp { right: -8px; top: -14px; width: 64px; height: 64px; }

  .map-embed iframe { height: 300px; }
}
