/* Bradford Private School — global styles */
:root {
  --navy: #1b2b4b;
  --navy-deep: #121d33;
  --maroon: #7a1d21;
  --maroon-bright: #8b1a1a;
  --white: #ffffff;
  --off-white: #f4f6fa;
  --text: #1a2233;
  --muted: #5c6578;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(18, 29, 51, 0.12);
  --shadow-sm: 0 8px 24px rgba(18, 29, 51, 0.08);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
}

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

html {
  scroll-behavior: smooth;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

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

a:hover {
  color: var(--navy);
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 62ch;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-hero {
  padding: calc(var(--header-h) + 2.5rem) 0 3rem;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, #2a3f66 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 80% 0%, rgba(122, 29, 33, 0.35), transparent 55%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--white);
  margin: 0 0 0.75rem;
}

.page-hero .lead {
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.section {
  padding: 4rem 0;
}

.section.alt {
  background: var(--white);
}

.section-title {
  margin: 0 0 0.5rem;
}

.section-intro {
  margin: 0 0 2rem;
  max-width: 60ch;
  color: var(--muted);
}

/* Header */
.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-inline: max(2vw, 12px);
  background: rgba(27, 43, 75, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.site-top.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(18, 29, 51, 0.98);
}

.site-header {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: transparent;
  border: none;
}

.header-inner {
  width: min(1280px, 100%);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.brand:hover {
  color: var(--white);
}

.brand-logo {
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.brand-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  position: relative;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-backdrop {
  display: none;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--white);
  margin-inline: auto;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.site-top.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-top.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-top.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.is-active {
  color: var(--white);
  background: rgba(122, 29, 33, 0.55);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--maroon);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(122, 29, 33, 0.35);
}

.btn-primary:hover {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(27, 43, 75, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

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

.btn-outline {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
}

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

.btn-nav-cta {
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
}

.nav-cta-group {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: 0.35rem;
}

.btn-portal {
  background: var(--whatsapp);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-portal:hover {
  background: var(--whatsapp-dark);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(29, 168, 81, 0.45);
}

/* Social links (Junior School etc.) */
.social-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(27, 43, 75, 0.08);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--text);
}

.social-link-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--white);
}

.social-link--whatsapp .social-link-icon {
  background: #25d366;
}

.social-link--facebook .social-link-icon {
  background: #1877f2;
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.social-link--instagram .social-link-icon {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.social-link--tiktok .social-link-icon {
  background: #010101;
}

.social-link-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.social-link-text strong {
  color: var(--navy);
  font-size: 1rem;
}

.social-link-text small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.footer-portal {
  width: min(1120px, 92vw);
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Hero home */
.hero {
  min-height: 88vh;
  display: grid;
  align-items: center;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
  position: relative;
  color: var(--white);
  background: var(--navy-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(105deg, rgba(18, 29, 51, 0.92) 0%, rgba(27, 43, 75, 0.75) 45%, rgba(122, 29, 33, 0.55) 100%),
    url("../assets/flyer.png");
  background-size: cover;
  background-position: center top;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(122, 29, 33, 0.5);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--white);
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 48ch;
  margin: 0 0 1.75rem;
}

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

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero-card h3 {
  color: var(--white);
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat {
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
}

.stat strong {
  display: block;
  font-size: 1.65rem;
  color: var(--white);
  font-weight: 800;
}

.stat span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Cards & grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(27, 43, 75, 0.06);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

.card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

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

.card-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--maroon);
}

.card-link:hover {
  color: var(--navy);
}

/* Quick links strip */
.quick-strip {
  background: var(--white);
  margin-top: -2rem;
  position: relative;
  z-index: 2;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.quick-strip a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  border: 1px solid transparent;
}

.quick-strip a:hover {
  background: var(--navy);
  color: var(--white);
}

.quick-strip a small {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.quick-strip a:hover small {
  color: rgba(255, 255, 255, 0.75);
}

/* Two column */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Lists */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  padding: 0.4rem 0 0.4rem 1.75rem;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--maroon);
  box-shadow: 0 0 0 3px rgba(122, 29, 33, 0.2);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag-list li {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(27, 43, 75, 0.08);
  color: var(--navy);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

table.simple {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.simple th,
table.simple td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(27, 43, 75, 0.08);
}

table.simple th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

table.simple tr:last-child td {
  border-bottom: none;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: none;
  padding: 0;
  width: 100%;
  background: var(--navy);
}

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

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(18, 29, 51, 0.9));
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
}

/* Blog / news */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(27, 43, 75, 0.06);
  text-align: left;
  transition: box-shadow 0.3s var(--ease);
}

.post-card:hover {
  box-shadow: var(--shadow);
}

@media (max-width: 600px) {
  .post-card {
    grid-template-columns: 1fr;
  }
}

.post-date {
  background: var(--maroon);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.post-date .day {
  font-size: 2rem;
}

.post-date .mon {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.post-body {
  padding: 1.25rem 1.5rem 1.5rem 0;
}

@media (max-width: 600px) {
  .post-body {
    padding: 0 1.25rem 1.25rem;
  }
}

.post-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.post-body p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Events calendar */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

.calendar-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.calendar-toolbar h2 {
  margin: 0;
  font-size: 1.25rem;
}

.cal-nav {
  display: flex;
  gap: 0.5rem;
}

.cal-nav button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(27, 43, 75, 0.15);
  background: var(--off-white);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--navy);
  transition: background 0.2s, border-color 0.2s;
}

.cal-nav button:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  min-height: 4.5rem;
  border: none;
  border-radius: 10px;
  background: var(--off-white);
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.4rem 0.35rem;
  text-align: left;
  gap: 0.2rem;
}

.cal-day--empty {
  min-height: 4.5rem;
  opacity: 0.25;
  cursor: default;
  background: transparent;
}

.cal-day-num {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}

.cal-day-label {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--maroon);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.cal-day.has-event {
  background: rgba(122, 29, 33, 0.08);
  border: 1px solid rgba(122, 29, 33, 0.15);
}

.cal-day:hover:not(:disabled) {
  background: rgba(122, 29, 33, 0.15);
  color: var(--text);
}

.cal-day:hover:not(:disabled) .cal-day-label {
  color: var(--navy-deep);
}

.cal-day.is-today {
  outline: 2px solid var(--maroon);
  outline-offset: -2px;
}

.cal-day.is-selected {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.cal-day.is-selected .cal-day-num,
.cal-day.is-selected .cal-day-label {
  color: var(--white);
}

.event-sidebar h3 {
  margin-top: 0;
  font-size: 1rem;
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-list li {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--off-white);
  border-left: 4px solid var(--maroon);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.event-list-date {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--maroon);
}

.event-list strong {
  display: block;
  color: var(--navy);
  font-size: 0.95rem;
}

.event-list-detail {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.event-list-empty {
  border-left-color: var(--muted);
  color: var(--muted);
  font-style: italic;
}

.event-sidebar {
  max-height: 520px;
  overflow-y: auto;
}

@media (max-width: 900px) {
  .cal-day {
    min-height: 3.5rem;
    padding: 0.3rem 0.2rem;
  }

  .cal-day-label {
    font-size: 0.55rem;
    -webkit-line-clamp: 2;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 15, 25, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(900px, 100%);
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox button {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.88);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.95);
}

.site-footer a:hover {
  color: var(--white);
}

.footer-grid {
  width: min(1120px, 92vw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.footer-brand strong {
  display: block;
  font-size: 1.1rem;
  color: var(--white);
}

.motto {
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #e8a0a3;
  margin: 0.35rem 0 0.5rem;
}

.footer-lead {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.footer-heading {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.75rem;
}

.footer-social {
  width: min(1120px, 92vw);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.footer-social .dot {
  opacity: 0.5;
}

.footer-copy {
  width: min(1120px, 92vw);
  margin: 1.25rem auto 0;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Contact cards */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--maroon);
}

.contact-card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.map-section {
  margin-top: 2.5rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.map-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.map-embed {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--off-white);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9;
  min-height: 280px;
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-caption {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

/* Mobile nav — iOS-safe: no backdrop-filter, menu fixed to viewport */
@media (max-width: 1024px) {
  .site-top {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #1b2b4b;
    padding-inline: 12px;
    padding-top: env(safe-area-inset-top, 0px);
    height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  }

  .site-top.is-scrolled {
    background: #121d33;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .nav-toggle {
    display: flex;
  }

  /* Nav/backdrop moved to <body> by JS — styles still apply */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(10, 15, 25, 0.6);
    -webkit-tap-highlight-color: transparent;
  }

  .nav-backdrop[hidden] {
    display: none !important;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    flex: none;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    gap: 0.5rem;
    background: #121d33;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  }

  .site-top.nav-open .site-nav,
  body.menu-open .site-nav {
    display: flex;
  }

  .nav-list {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    min-height: 0;
    overflow-y: visible;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    font-size: 1.1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  }

  .nav-cta-group {
    flex: 0 0 auto;
    flex-direction: column;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    gap: 0.65rem;
  }

  .btn-nav-cta {
    text-align: center;
    justify-content: center;
    width: 100%;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    white-space: normal;
  }

  .btn-portal.btn-nav-cta {
    border: none;
  }
}

@media (min-width: 1025px) {
  .nav-backdrop {
    display: none !important;
  }

  .site-header {
    flex: 0 0 auto;
  }

  .site-nav {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* Keep header CTAs side by side on medium desktops */
@media (max-width: 1024px) {
  .page-hero {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 2.5rem);
  }

  .hero {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 2rem);
  }
}

@media (min-width: 1025px) and (max-width: 1280px) {
  .nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.4rem;
  }

  .btn-nav-cta {
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
  }
}

/* Utilities */
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
