:root {
  --forest: #0b3d32;
  --forest-deep: #06261f;
  --amber: #e2b13c;
  --amber-soft: #f3d98a;
  --sky: #eef7f4;
  --ink: #14201c;
  --muted: #5d6f68;
  --line: rgba(11, 61, 50, 0.12);
  --coral: #e4572e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 45% at 0% 0%, rgba(226,177,60,.12), transparent 55%),
    linear-gradient(180deg, #f7fcfa 0%, #eef6f2 100%);
  min-height: 100vh;
}
body.popup-open { overflow: hidden; }
h1,h2,h3,h4 { font-family: Fraunces, Georgia, serif; letter-spacing: -.02em; margin: 0 0 .5rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 1.25rem)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar { background: var(--forest); color: #fff; font-size: .72rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .45rem 0; flex-wrap: wrap; }
.topbar-cta, .float-admit { background: var(--coral); color: #fff; border: 0; border-radius: 999px; font-weight: 700; cursor: pointer; }
.topbar-cta { padding: .35rem .8rem; font-size: .72rem; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; position: relative; }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand-text { min-width: 0; }
.brand strong { display: block; color: var(--forest); font-family: Fraunces, Georgia, serif; font-size: clamp(.95rem, 2.5vw, 1.1rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.brand small { display: block; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: .68rem; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(226,177,60,.35); flex-shrink: 0; }
.brand-fallback { width: 48px; height: 48px; border-radius: 50%; background: var(--forest); color: var(--amber-soft); display: grid; place-items: center; font-family: Fraunces, Georgia, serif; font-weight: 700; flex-shrink: 0; }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .5rem .9rem; font-weight: 600; color: var(--forest); }
.main-nav { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.main-nav a { padding: .4rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--forest); }
.main-nav a:hover, .main-nav a.active { background: var(--forest); color: var(--amber-soft); }

.btn-primary, .btn-ghost, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: 999px; padding: .85rem 1.25rem; font-weight: 700; border: 0; cursor: pointer; font: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--amber), #f0c75a); color: var(--forest-deep); box-shadow: 0 14px 34px rgba(226,177,60,.28); }
.btn-ghost { border: 1px solid rgba(255,255,255,.4); color: #fff; background: rgba(255,255,255,.08); }
.btn-outline { border: 1px solid var(--line); background: #fff; color: var(--forest); }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }

.hero-slider { position: relative; height: min(78vh, 860px); min-height: 420px; overflow: hidden; background: var(--forest-deep); color: #fff; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 8s ease-out forwards; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(6,38,31,.82), rgba(6,38,31,.35) 55%, rgba(6,38,31,.15)); }
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: flex-end; padding: 0 0 3.5rem; }
.hero-content h1 { font-size: clamp(2rem, 7vw, 4.6rem); line-height: 1.05; max-width: 14ch; }
.hero-content p { max-width: 34rem; color: rgba(255,255,255,.8); font-size: clamp(.95rem, 2.5vw, 1.1rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.2rem; }
.dots { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: .4rem; z-index: 3; }
.dots button { width: .65rem; height: .65rem; border-radius: 999px; border: 0; background: rgba(255,255,255,.45); cursor: pointer; }
.dots button.active { width: 2rem; background: var(--amber); }

.section { padding: clamp(2.8rem, 7vw, 5.5rem) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--forest); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 1.4rem; height: 2px; background: var(--amber); }
.eyebrow-light { color: var(--amber-soft); letter-spacing: .16em; text-transform: uppercase; font-size: .75rem; font-weight: 700; margin: 0; }
.card { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.25rem; box-shadow: 0 18px 50px rgba(6,38,31,.05); }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-hero { background: var(--forest-deep); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(226,177,60,.28), transparent 35%); }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
.dark-band { background: var(--forest-deep); color: #fff; padding: clamp(2.8rem, 6vw, 4rem) 0; }
.muted { color: var(--muted); line-height: 1.65; }
.table-wrap { overflow-x: auto; border-radius: 1rem; border: 1px solid var(--line); background: #fff; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { border: 1px solid var(--line); padding: .85rem 1rem; text-align: left; vertical-align: top; }
th { background: rgba(11,61,50,.05); color: var(--forest); width: 40%; }

.site-footer { background: var(--forest-deep); color: #fff; margin-top: auto; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.5fr 1fr 1fr; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.footer-grid a, .footer-grid p { display: block; color: rgba(255,255,255,.75); margin: .35rem 0; font-size: .92rem; }
.footer-grid h4 { color: var(--amber); letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; font-family: Outfit, sans-serif; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: 1rem 0; font-size: .75rem; color: rgba(255,255,255,.5); }

.float-admit {
  position: fixed; right: max(.8rem, env(safe-area-inset-right)); bottom: max(.8rem, env(safe-area-inset-bottom));
  z-index: 60; padding: .85rem 1.15rem; box-shadow: 0 12px 30px rgba(228,87,46,.35);
  animation: pulse 2.2s ease-in-out infinite;
}

/* IMPORTANT: do not set display:grid on the base class or close will fail */
.popup-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(6,38,31,.62); backdrop-filter: blur(6px);
  display: none; place-items: center; padding: .75rem;
}
.popup-backdrop.is-open { display: grid; }
.popup-card {
  width: min(540px, 100%); max-height: calc(100vh - 1.5rem); overflow: auto;
  background: #fff; border-radius: 1.35rem; box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
.popup-head {
  background: linear-gradient(135deg, #0b3d32, #1a6b52); color: #fff;
  padding: 1.15rem 1.25rem; display: flex; justify-content: space-between; gap: 1rem; position: sticky; top: 0;
}
.popup-close {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff;
  border-radius: 999px; width: 2.2rem; height: 2.2rem; cursor: pointer; flex-shrink: 0; font-size: 1rem;
}
.popup-form { padding: 1.15rem 1.25rem 1.35rem; display: grid; gap: .75rem; }
.popup-form label, .admin-form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 650; color: var(--forest); }
.popup-form input, .popup-form textarea, .admin-form input, .admin-form textarea, .admin-form select {
  width: 100%; border: 1px solid var(--line); border-radius: .8rem; padding: .75rem .9rem; font: inherit; background: #fff;
}
.popup-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .25rem; }

.admin-body { background: var(--sky); min-height: 100vh; }
.admin-wrap { width: min(1100px, calc(100% - 1.25rem)); margin: 0 auto; padding: 1.25rem 0 3rem; }
.admin-top { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 0; margin-bottom: 1rem; }
.admin-top-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; padding-top: 0; padding-bottom: 0; }
.admin-kicker { margin: 0; color: #1f6f6a; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.admin-top-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.admin-tabs a, .admin-tabs button {
  border-radius: 999px; padding: .45rem .9rem; border: 1px solid var(--line); background: #fff; color: var(--forest); font-weight: 650; font-size: .85rem; cursor: pointer;
}
.admin-tabs a.active { background: var(--forest); color: var(--amber-soft); border-color: var(--forest); }
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--forest-deep); color: #fff; padding: 1rem; }
.login-card { width: min(420px, 100%); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 1.5rem; padding: 1.6rem; }
.alert { padding: .8rem 1rem; border-radius: .8rem; background: #fff; border: 1px solid var(--line); margin: .75rem 0; }
.alert-error { background: #fff1f0; color: #9b1c1c; border-color: #f3c1c1; }
.alert-ok { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.switch-row { display: flex !important; align-items: flex-start; gap: .65rem; font-weight: 700; }
.switch-row input { width: auto !important; margin-top: .2rem; }
.logo-preview { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }
.media-card { padding: 0; overflow: hidden; }
.media-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.media-card-body { padding: 1rem; }
.link-danger { color: #b91c1c; background: none; border: 0; cursor: pointer; padding: 0; font: inherit; }
.badge-new { background: var(--coral); color: #fff; border-radius: 999px; padding: .1rem .5rem; font-size: .7rem; }
.enquiry-row, .disclosure-row { border-top: 1px solid var(--line); padding: 1rem 0; }
.disclosure-row { display: grid; gap: .75rem; grid-template-columns: 1fr auto; align-items: center; }
.disclosure-title { margin: .2rem 0; font-weight: 650; }

@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(228,87,46,.45); }
  50% { box-shadow: 0 0 0 12px rgba(228,87,46,0); }
}

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 1px);
    background: #fff; border-bottom: 1px solid var(--line); padding: .75rem;
    flex-direction: column; box-shadow: 0 16px 30px rgba(0,0,0,.08);
  }
  .main-nav.open { display: flex; }
  .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .hero-slider { min-height: 460px; height: 70vh; }
  .hero-content { padding-bottom: 3rem; }
  .disclosure-row { grid-template-columns: 1fr; }
  .leader-card { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .topbar-inner { justify-content: center; text-align: center; }
  .btn-primary, .btn-ghost, .btn-outline { width: 100%; }
  .hero-actions { width: 100%; }
  .float-admit { right: .7rem; bottom: .7rem; font-size: .8rem; padding: .7rem 1rem; }
  .popup-actions .btn-outline, .popup-actions .btn-primary { width: 100%; }
  .admin-tabs a { font-size: .78rem; }
}
