/* =========================================================
   Nelion Preparatory School — Design tokens
   Palette: Navy #202e48 (trust/authority), Blue #055286 (primary
   accent), Grey #8d8e89 (quiet neutral). Sky, Mist and the deep
   navy are tints/shades derived from those three so text stays
   readable on both light and dark surfaces.
   Display: Fraunces (characterful serif) · Body: Work Sans
   Utility/mono: Space Mono (stats, labels, form meta)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,500;1,9..144,600&family=Work+Sans:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root{
  /* Brand colours */
  --navy: #202e48;
  --blue: #055286;
  --grey: #8d8e89;
  /* Derived from the brand colours */
  --navy-2: #2b3b5a;      /* hover / raised surfaces on navy */
  --navy-deep: #141d2e;   /* footer + topbar */
  --navy-tint: #e6eaf1;   /* light navy wash (badges, success box) */
  --blue-dark: #043f69;   /* hover for blue */
  --sky: #8fc1e6;         /* light blue accent for use on dark surfaces */
  --sky-dark: #6aa8d8;    /* hover for sky */
  --grey-dark: #6b6c68;   /* grey that passes contrast with white text */
  --mist: #f1f3f6;        /* alternate section background */
  --paper: #ffffff;
  --ink: #202e48;
  --ink-soft: #4b5569;
  --line: #d9dad7;
  --white: #ffffff;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-soft: 0 20px 45px -25px rgba(32, 46, 72, 0.45);
  --shadow-card: 0 12px 30px -18px rgba(32, 46, 72, 0.4);
  --container: 1200px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; width:100%; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  width:100%;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ font-family: var(--font-display); margin:0 0 0.5em; line-height:1.12; color: var(--navy); font-weight:600; }
p{ margin:0 0 1em; color: var(--ink-soft); }
.container{ max-width: var(--container); margin:0 auto; padding:0 24px; }

:focus-visible{ outline: 3px solid var(--blue); outline-offset: 3px; }
.topbar :focus-visible, .hero-panel :focus-visible, .section-navy :focus-visible, .site-footer :focus-visible, .cta-band :focus-visible, .page-hero :focus-visible, .portal-standalone :focus-visible{ outline-color: var(--sky); }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Eyebrow / labels ---------- */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom: 14px;
}
.eyebrow::before{
  content:"";
  width: 22px; height:2px; background: var(--blue);
  display:inline-block;
}
.section-navy .eyebrow, .hero-panel .eyebrow{ color: var(--sky); }
.section-navy .eyebrow::before, .hero-panel .eyebrow::before{ background: var(--sky); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight:700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-accent{ background: var(--sky); color: var(--navy); }
.btn-accent:hover{ background: var(--sky-dark); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn-outline{ background: transparent; color: var(--paper); border-color: rgba(255,255,255,0.55); }
.btn-outline:hover{ background: rgba(255,255,255,0.12); border-color: var(--paper); transform: translateY(-2px); }
.btn-navy{ background: var(--navy); color: var(--paper); }
.btn-navy:hover{ background: var(--navy-2); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn-primary{ background: var(--blue); color: var(--paper); }
.btn-primary:hover{ background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn-ghost-dark{ background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost-dark:hover{ background: var(--navy); color: var(--paper); }
.btn-sm{ padding: 10px 18px; font-size: 0.85rem; }
.btn[disabled]{ opacity: .55; cursor: not-allowed; }

/* ---------- Topbar (quick contact details) ---------- */
.topbar{
  background: var(--navy); color: var(--paper);
  font-family: var(--font-mono); font-size:0.76rem;
  padding: 8px 24px;
}
.topbar-inner{
  max-width: var(--container); margin:0 auto;
  display:flex; justify-content:flex-end; align-items:center;
  flex-wrap:wrap; gap:18px;
}
.topbar-inner a{
  color: rgba(241,243,246,0.85); display:inline-flex; align-items:center; gap:6px;
  transition: color .15s ease;
}
.topbar-inner a:hover{ color: var(--sky); }
.topbar-inner svg{ width:13px; height:13px; flex-shrink:0; }
@media (max-width: 600px){ .topbar{ display:none; } }

/* ---------- Floating social icons ---------- */
.social-float{
  position:fixed; right:20px; top:50%; transform:translateY(-50%);
  z-index:120; display:flex; flex-direction:column; gap:10px;
}
.social-float a{
  width:42px; height:42px; border-radius:50%; background: var(--navy); color: var(--paper);
  display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow-card);
  transition: transform .15s ease, background .15s ease;
}
.social-float a:hover{ transform: scale(1.08); background: var(--sky); color: var(--navy); }
.social-float svg{ width:19px; height:19px; }
.social-float a.whatsapp{ background: #25D366; color:#fff; }
.social-float a.whatsapp:hover{ background:#1DA851; color:#fff; }
@media (max-width: 600px){
  .social-float{ top:auto; bottom:18px; right:14px; transform:none; gap:8px; }
  .social-float a{ width:40px; height:40px; }
  .social-float svg{ width:18px; height:18px; }
}

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky; top:0; z-index: 200;
  border-bottom: 1px solid var(--line);
}
.site-header::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background: rgba(241,243,246, 0.92);
  backdrop-filter: blur(10px);
}
.nav-wrap{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 24px;
  max-width: var(--container); margin:0 auto;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{ width:44px; height:44px; flex-shrink:0; }
.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-text .name{ font-family: var(--font-display); font-weight:700; font-size:1.18rem; color: var(--navy); }
.brand-text .tag{
  font-family: var(--font-mono); font-size:0.6rem; letter-spacing:0.12em; text-transform:uppercase; color: var(--blue);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px;
}

.site-footer .brand-text .tag{ color: var(--sky); }
.site-footer .brand-text .name{ color: var(--white); }

.nav-links{ display:flex; align-items:center; gap: 30px; }
.nav-links a{
  font-weight:600; font-size: 0.94rem; color: var(--ink);
  position:relative; padding: 6px 0;
}
.nav-links a.active{ color: var(--navy); }
.nav-links a::after{
  content:""; position:absolute; left:0; bottom:0; height:2px; width:0;
  background: var(--blue); transition: width .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after{ width:100%; }

/* ---------- Nav dropdowns (Admissions / Updates) ---------- */
.nav-item{ position:relative; display:flex; align-items:center; }
.nav-top{
  display:flex; align-items:center; gap:6px; cursor:pointer;
  background:none; border:none; font:inherit; font-weight:600; font-size:0.94rem; color: var(--ink);
  padding:6px 0; position:relative;
}
.nav-top::after{
  content:""; position:absolute; left:0; bottom:0; height:2px; width:0;
  background: var(--blue); transition: width .2s ease;
}
.nav-item.active .nav-top{ color: var(--navy); }
.nav-item.active .nav-top::after, .nav-item:hover .nav-top::after{ width:100%; }
.nav-caret{ width:13px; height:13px; flex-shrink:0; transition: transform .2s ease; }
.nav-item:hover .nav-caret, .nav-item.open .nav-caret{ transform: rotate(180deg); }
.nav-dropdown{
  position:absolute; top: calc(100% + 16px); left:50%;
  transform:translateX(-50%) translateY(4px);
  background: var(--paper); border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  min-width:230px; padding:8px; opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  display:flex; flex-direction:column; z-index:210;
}
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown, .nav-item.open .nav-dropdown{
  opacity:1; visibility:visible; pointer-events:auto; transform:translateX(-50%) translateY(0);
}
.nav-dropdown a{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 14px; border-radius:8px; font-weight:600; font-size:0.9rem; color: var(--ink-soft);
}
.nav-dropdown a:hover, .nav-dropdown a:focus-visible{ background: var(--mist); color: var(--navy); }
.nav-dropdown a.active{ color: var(--navy); background: var(--navy-tint); }
.nav-dropdown a::after{ display:none; }
.nav-dropdown .soon{
  font-family: var(--font-mono); font-size:0.6rem; letter-spacing:0.05em; text-transform:uppercase;
  background: var(--navy-tint); color: var(--navy); padding:2px 7px; border-radius:999px; flex-shrink:0;
}

.nav-actions{ display:flex; align-items:center; gap:12px; position:relative; z-index:160; }
.nav-toggle{
  display:none; background:none; border:none; cursor:pointer; padding:6px;
  width:38px; height:38px; position:relative;
}
.nav-toggle span{
  display:block; width:26px; height:2px; background: var(--navy); margin:5px auto;
  transition: transform .25s ease, opacity .2s ease;
}
/* Hamburger -> X, driven by the aria-expanded state the existing JS already sets */
.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); }

@media (max-width: 980px){
  .nav-links{
    position:fixed; top:0; right:-100%; left:auto; bottom:auto;
    width: min(320px, 86vw);
    max-height: calc(100vh - 20px);
    background: var(--paper); box-shadow: -8px 10px 34px rgba(0,0,0,0.24);
    flex-direction:column; align-items:flex-start; padding: 100px 26px 26px;
    gap: 20px; transition: right .3s ease;
    overflow-y:auto; z-index:150;
    border-radius: 0 0 0 var(--radius);
  }
  .nav-links.open{ right:0; }
  .nav-links a{ font-size:1.1rem; }
  .nav-item{ width:100%; flex-direction:column; align-items:flex-start; }
  .nav-top{ width:100%; justify-content:space-between; font-size:1.1rem; padding:8px 0; }
  .nav-dropdown{
    position:static; transform:none; opacity:1; visibility:visible; pointer-events:auto;
    box-shadow:none; padding:0; margin:0; min-width:0; width:100%;
    max-height:0; overflow:hidden; transition: max-height .25s ease;
  }
  .nav-item.open .nav-dropdown{ max-height:280px; padding:4px 0 6px; transform:none; }
  .nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown{ transform:none; }
  .nav-dropdown a{ padding:10px 8px; font-size:1rem; }
  .nav-links .nav-portal-btn{
    background: var(--navy); color: var(--paper) !important;
    padding: 14px 20px; border-radius: 999px; text-align:center; width:100%;
    font-weight:700;
  }
  .nav-links .nav-portal-btn::after{ display:none; }
  .nav-actions .btn-sm.hide-mobile{ display:none; }
  .nav-toggle{ display:block; }
}
@media (min-width: 981px){ .nav-links{ display:flex !important; } .hide-desktop{ display:none; } }

/* Header's "Apply Now" is redundant with the hero's own Apply CTA right
   below it on narrow phones, and there isn't room for the full brand
   name + tag + this button + the hamburger all at once below ~430px —
   confirmed by measuring actual layout overflow at 320-375px widths. */
@media (max-width: 430px){
  .nav-actions a.btn-primary.btn-sm{ display:none; }
}

/* ---------- Hero / Slider ---------- */
.hero{
  position:relative;
  min-height: 92vh;
  display:flex; align-items:flex-end;
  overflow:hidden;
  background: var(--navy);
}
.slider{ position:absolute; inset:0; }
.slide{
  position:absolute; inset:0;
  opacity:0; visibility:hidden;
  transition: opacity 1.1s ease;
  display:flex; align-items:center; justify-content:center;
}
.slide.is-active{ opacity:1; visibility:visible; }
.slide img{ width:100%; height:100%; object-fit:cover; object-position:center; }
.hero-inner{
  position:relative; z-index:5;
  width:100%;
  padding: 120px 24px 48px;
  max-width: var(--container); margin:0 auto;
  color: var(--paper);
}
/* Solid content panel: the photo stays untinted, text sits on navy */
.hero-panel > :last-child{ margin-bottom:0; }
.hero-panel{
  background: var(--navy);
  max-width: 660px;
  padding: 40px 44px 34px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.hero-caption{
  font-family: var(--font-mono); font-size:0.72rem; letter-spacing:0.14em;
  text-transform:uppercase; color: var(--sky); margin-bottom:16px;
  min-height: 1.2em;
}
.hero h1{
  color: var(--paper); font-size: clamp(2.3rem, 5.5vw, 4.1rem);
  max-width: 780px; margin-bottom: 0.35em;
}
.hero h1 em{ font-style: italic; color: var(--sky); font-weight:500; }
.hero-sub{
  color: rgba(241,243,246,0.92); max-width: 560px; font-size: 1.08rem; margin-bottom: 30px;
}
.hero-actions{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom: 30px; }
.slider-dots{ display:flex; gap:10px; }
.slider-dots button{
  width:32px; height:4px; border-radius:2px; border:none; padding:0;
  background: rgba(241,243,246,0.35); cursor:pointer; transition: background .2s ease;
}
.slider-dots button.is-active{ background: var(--sky); }

/* ---------- Sections ---------- */
section{ padding: 96px 0; }
.section-mist{ background: var(--mist); }
.section-navy{ background: var(--navy); color: var(--paper); }
.section-navy h2, .section-navy h3{ color: var(--paper); }
.section-navy p{ color: rgba(241,243,246,0.82); }
.section-head{ max-width: 640px; margin-bottom: 56px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size: clamp(1.8rem, 3.4vw, 2.6rem); }

/* ---------- Pathway (signature element) ---------- */
.pathway{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  position:relative;
  counter-reset: stage;
}
.stage{
  position:relative; z-index:1; text-align:left;
}
.stage-media{ position:relative; margin-bottom: 50px; }
.stage-media img{
  width:100%; height:180px; object-fit:cover; border-radius: var(--radius);
  display:block; box-shadow: var(--shadow-soft);
}
.stage-dot{
  position:absolute; left:20px; bottom:-30px;
  width:84px; height:84px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-weight:700; font-size:0.85rem;
  color: var(--paper); text-align:center;
  box-shadow: var(--shadow-card);
  border: 4px solid var(--paper);
  z-index:2;
}
.stage:nth-child(1) .stage-dot{ background: var(--blue); }
.stage:nth-child(2) .stage-dot{ background: var(--navy); }
.stage:nth-child(3) .stage-dot{ background: var(--grey-dark); }
.stage{ padding: 0 20px; }
.stage h3{ font-size:1.25rem; margin-bottom:0.3em; }
.stage .age{ font-family: var(--font-mono); font-size:0.75rem; color: var(--blue); text-transform:uppercase; letter-spacing:.08em; display:block; margin-bottom:10px;}
.stage p{ font-size:0.95rem; }
.stage ul{ margin-top:12px; }
.stage li{ font-size:0.88rem; color: var(--ink-soft); padding-left:18px; position:relative; margin-bottom:6px; }
.stage li::before{ content:"—"; position:absolute; left:0; color: var(--blue); }

@media (max-width: 860px){
  .pathway{ grid-template-columns: 1fr; gap: 44px; }
}

/* ---------- Cards / grids ---------- */
.grid{ display:grid; gap: 28px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){ .grid-3, .grid-4{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .grid-3, .grid-4, .grid-2{ grid-template-columns: 1fr; } }

.card{
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card .icon{ width:46px; height:46px; margin-bottom:18px; color: var(--navy); }
.card h3{ font-size:1.15rem; }
.card p{ font-size:0.94rem; margin-bottom:0; }

/* ---------- Empty state (backend-fed pages not yet connected) ---------- */
.empty-state{
  background: var(--mist); border:1px dashed var(--line); border-radius: var(--radius);
  padding: 56px 32px; text-align:center; max-width:640px; margin:0 auto;
}
.empty-state .icon-badge{
  width:56px; height:56px; border-radius:14px; background: var(--navy-tint);
  display:flex; align-items:center; justify-content:center; margin:0 auto 20px;
}
.empty-state .icon-badge svg{ width:26px; height:26px; color: var(--navy); }
.empty-state h2{ font-size:1.4rem; margin-bottom:10px; }
.empty-state p{ color: var(--ink-soft); margin-bottom:24px; }
.empty-state .empty-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

.tba-table{ width:100%; border-collapse:collapse; margin: 0 auto 48px; max-width: 760px; }
.tba-table th, .tba-table td{ text-align:left; padding:14px 18px; border-bottom:1px solid var(--line); }
.tba-table th{ font-family: var(--font-mono); font-size:0.72rem; letter-spacing:0.08em; text-transform:uppercase; color: var(--ink-soft); }
.tba-table td{ font-weight:600; }
.tba-table .pill-tba{
  font-family: var(--font-mono); font-size:0.72rem; letter-spacing:0.05em; text-transform:uppercase;
  background: var(--navy-tint); color: var(--navy); padding:4px 10px; border-radius:999px; font-weight:600;
}

/* ---------- News (dynamic, from the backend) ---------- */
.news-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:26px; margin-bottom:8px; }
.news-card{ background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; }
.news-card .thumb{ width:100%; height:170px; object-fit:cover; background:var(--mist); }
.news-card .body{ padding:20px 22px 22px; display:flex; flex-direction:column; flex:1; }
.news-card .date{ font-family:var(--font-mono); font-size:0.72rem; text-transform:uppercase; letter-spacing:0.06em; color:var(--ink-soft); margin-bottom:8px; }
.news-card h3{ font-size:1.08rem; margin-bottom:8px; }
.news-card p{ font-size:0.92rem; flex:1; }
.news-card .read-more{ font-weight:700; font-size:0.88rem; color:var(--blue); align-self:flex-start; background:none; border:none; padding:0; cursor:pointer; font-family:var(--font-body); }
.news-card .read-more:hover{ text-decoration:underline; }

/* ---------- Gallery (dynamic, from the backend) ---------- */
.gallery-filters{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:28px; }
.gallery-filter-btn{
  font-family:var(--font-mono); font-size:0.76rem; text-transform:uppercase; letter-spacing:0.04em;
  padding:8px 16px; border-radius:999px; border:1px solid var(--line); background:var(--paper); color:var(--ink-soft);
  cursor:pointer; font-weight:600;
}
.gallery-filter-btn.active, .gallery-filter-btn:hover{ background:var(--navy); color:var(--white); border-color:var(--navy); }
.gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:16px; }
.gallery-item{ position:relative; border-radius:var(--radius-sm); overflow:hidden; cursor:pointer; border:1px solid var(--line); background:var(--mist); }
.gallery-item img{ width:100%; height:180px; object-fit:cover; display:block; transition:transform .3s ease; }
.gallery-item:hover img{ transform:scale(1.05); }
.gallery-item .cap{
  position:absolute; left:0; right:0; bottom:0; padding:10px 12px; font-size:0.8rem; color:var(--white);
  background:linear-gradient(to top, rgba(20,29,46,0.85), transparent);
}

/* ---------- Lightbox / article modal (shared) ---------- */
.nelion-modal-overlay{
  position:fixed; inset:0; background:rgba(20,29,46,0.82); z-index:500;
  display:none; align-items:center; justify-content:center; padding:24px;
}
.nelion-modal-overlay.is-open{ display:flex; }
.nelion-modal-box{
  background:var(--paper); border-radius:var(--radius); max-width:640px; width:100%;
  max-height:86vh; overflow-y:auto; padding:34px 34px 30px; position:relative;
}
.nelion-modal-box img{ width:100%; border-radius:var(--radius-sm); margin-bottom:18px; max-height:340px; object-fit:cover; }
.nelion-modal-close{
  position:absolute; top:16px; right:16px; width:34px; height:34px; border-radius:50%;
  border:none; background:var(--mist); color:var(--navy); font-size:1.1rem; cursor:pointer;
}
.nelion-modal-box .date{ font-family:var(--font-mono); font-size:0.72rem; text-transform:uppercase; letter-spacing:0.06em; color:var(--ink-soft); margin-bottom:8px; }

.mv-card{
  background: var(--navy); color: var(--paper);
  border-radius: var(--radius); padding: 40px;
  position:relative; overflow:hidden;
}
.mv-card.alt{ background: var(--blue); }
.mv-card.alt .eyebrow{ color: var(--white); }
.mv-card.alt .eyebrow::before{ background: var(--white); }
.mv-card .eyebrow{ color: var(--sky); }
.mv-card .eyebrow::before{ background: var(--sky); }
.mv-card h3{ color: var(--paper); font-size:1.6rem; }
.mv-card p{ color: rgba(241,243,246,0.9); font-size:1.02rem; }

/* ---------- Stats ---------- */
.stats{ display:flex; flex-wrap:wrap; gap: 40px; justify-content:space-between; }
.stat{ flex:1; min-width:150px; }
.stat .num{ font-family: var(--font-mono); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--sky); font-weight:700; }
.stat .label{ font-family: var(--font-mono); font-size:0.72rem; letter-spacing:.08em; text-transform:uppercase; color: rgba(241,243,246,0.75); }

/* ---------- Split sections ---------- */
.split{ display:grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items:center; }
@media (max-width: 900px){ .split{ grid-template-columns: 1fr; gap: 40px; } }
.split img, .split svg{ border-radius: var(--radius); width:100%; box-shadow: var(--shadow-soft); }
.split-form{ grid-template-columns: 1.5fr 1fr; gap: 48px; }
@media (max-width: 900px){ .split-form{ grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.quote-card{
  background: var(--paper); border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 28px 30px;
  box-shadow: var(--shadow-card);
}
.quote-card p{ font-family: var(--font-display); font-style:italic; font-size:1.08rem; color: var(--ink); }
.quote-by{ font-family: var(--font-mono); font-size:0.78rem; color: var(--blue); text-transform:uppercase; letter-spacing:.06em; }

/* ---------- CTA band ---------- */
.cta-band{
  background: var(--blue);
  border-radius: var(--radius);
  padding: 56px;
  display:flex; align-items:center; justify-content:space-between; gap:30px; flex-wrap:wrap;
}
.cta-band h2{ margin-bottom:6px; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--white); }
.cta-band p{ color: rgba(255,255,255,0.9); margin-bottom:0; }
.cta-actions{ display:flex; gap:14px; flex-wrap:wrap; }

/* ---------- Footer ---------- */
.site-footer{ background: var(--navy-deep); color: rgba(241,243,246,0.82); padding: 72px 0 28px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; margin-bottom: 56px; }
@media (max-width: 860px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }
.site-footer h4{ color: var(--paper); font-family: var(--font-body); font-size:0.85rem; text-transform:uppercase; letter-spacing:.08em; margin-bottom:18px; }
.site-footer a{ color: rgba(241,243,246,0.75); font-size:0.92rem; display:block; margin-bottom:10px; transition: color .15s ease; }
.site-footer a:hover{ color: var(--sky); }
.footer-brand p{ color: rgba(241,243,246,0.7); font-size:0.92rem; max-width:280px; }
.footer-bottom{
  border-top: 1px solid rgba(241,243,246,0.12); padding-top: 24px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  font-size:0.82rem; color: var(--grey);
}
.social-row{ display:flex; gap:12px; }
.social-row a{
  width:36px; height:36px; border-radius:50%; border:1px solid rgba(241,243,246,0.25);
  display:flex; align-items:center; justify-content:center; margin:0;
}
.social-row a:hover{ background: var(--sky); border-color: var(--sky); color: var(--navy); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero{
  background: var(--navy);
  color: var(--paper);
  padding: 150px 0 64px;
  position:relative;
  overflow:hidden;
}
.page-hero-media{ position:absolute; inset:0; z-index:0; }
.page-hero-media img{ width:100%; height:100%; object-fit:cover; object-position:center; }
.page-hero .container{ position:relative; z-index:2; }
/* When a page hero has a photo, push the panel down so the photo shows above it */
.page-hero.has-media{ padding: 210px 0 48px; }
.page-hero.has-media .hero-panel{ max-width: 700px; }
.page-hero .eyebrow{ color: var(--sky); }
.page-hero .eyebrow::before{ background: var(--sky); }
.page-hero h1{ color: var(--paper); font-size: clamp(2rem, 4.5vw, 3.2rem); max-width:700px;  }
.page-hero p.lead{ max-width:600px; font-size:1.08rem; color: rgba(241,243,246,0.9); }
.breadcrumb{ font-family: var(--font-mono); font-size:0.75rem; text-transform:uppercase; letter-spacing:.08em; color: rgba(241,243,246,0.6); margin-bottom:20px; }
.breadcrumb span{ color: var(--sky); }

/* ---------- Timeline (About) ---------- */
.timeline{ position:relative; padding-left: 32px; }
.timeline::before{ content:""; position:absolute; left:6px; top:6px; bottom:6px; width:2px; background: var(--line); }
.tl-item{ position:relative; padding-bottom: 40px; }
.tl-item::before{
  content:""; position:absolute; left:-32px; top:4px; width:14px; height:14px; border-radius:50%;
  background: var(--sky); border:3px solid var(--navy);
}
.tl-item .yr{ font-family: var(--font-mono); color: var(--blue); font-size:0.85rem; }
.tl-item h4{ margin: 4px 0 6px; color: var(--navy); font-family: var(--font-body); font-weight:700; font-size:1.05rem; }
.tl-item p{ font-size:0.94rem; margin:0; }

/* ---------- Values grid icons ---------- */
.value{ text-align:left; }
.value .icon-badge{
  width:52px; height:52px; border-radius:50%; background: var(--navy-tint);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.value .icon-badge svg{ width:24px; height:24px; color: var(--navy); }

/* ---------- Forms ---------- */
.form-card{
  background: var(--paper); border:1px solid var(--line); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow-card);
}
.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap:20px; }
@media (max-width:620px){ .form-row{ grid-template-columns: 1fr; } }
.field{ margin-bottom: 20px; }
.field label{
  display:block; font-family: var(--font-mono); font-size:0.72rem; letter-spacing:.06em;
  text-transform:uppercase; color: var(--navy); margin-bottom:8px;
}
.field input, .field select, .field textarea{
  width:100%; padding: 13px 14px; border-radius: var(--radius-sm); border:1.5px solid var(--line);
  font-family: var(--font-body); font-size:0.95rem; background: var(--mist); color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{ border-color: var(--sky); background: var(--paper); outline:none; }
.field textarea{ resize: vertical; min-height:110px; }
.form-note{ font-size:0.85rem; color: var(--ink-soft); margin-top:6px; }
.form-success{
  display:none; background: var(--navy-tint); border:1px solid var(--navy); border-radius: var(--radius-sm);
  padding:18px 20px; font-size:0.92rem; color: var(--navy); margin-bottom:20px; font-weight:600;
}
.form-success.show{ display:block; }
.form-error{
  display:none; background: var(--danger-bg, #fbeae7); border:1px solid #d9695a; border-radius: var(--radius-sm);
  padding:14px 18px; font-size:0.88rem; color:#9a2f1f; margin-bottom:18px; font-weight:600;
}
.form-error.show{ display:block; }
.btn[disabled]{ opacity:0.65; cursor:not-allowed; }

/* ---------- Contact info cards ---------- */
.info-strip{ display:flex; gap:18px; align-items:flex-start; padding: 24px 0; border-bottom:1px solid var(--line); }
.info-strip:last-child{ border-bottom:none; }
.info-strip .icon-badge{ width:44px; height:44px; border-radius:12px; background: var(--navy-tint); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.info-strip .icon-badge svg{ width:20px; height:20px; color: var(--navy); }
.info-strip h4{ margin:0 0 4px; font-family: var(--font-body); font-size:1rem; color: var(--navy); }
.info-strip p{ margin:0; font-size:0.92rem; }

/* ---------- Portal (popup modal) ---------- */
.portal-overlay{
  position:fixed; inset:0; z-index:300;
  background: rgba(16,24,38,0.72);
  backdrop-filter: blur(6px);
  display:flex; align-items:center; justify-content:center;
  padding: 20px;
  opacity:0; visibility:hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.portal-overlay.is-open{ opacity:1; visibility:visible; }
body.no-scroll{ overflow:hidden; }

.portal-modal{
  background: var(--paper); border-radius: var(--radius);
  max-width: 400px; width:100%;
  padding: 40px 34px 34px;
  position:relative;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,0.55);
  transform: translateY(14px) scale(0.97);
  transition: transform .28s ease;
  max-height: 90vh; overflow-y:auto;
}
.portal-overlay.is-open .portal-modal{ transform: translateY(0) scale(1); }

.portal-modal-close{
  position:absolute; top:14px; right:14px; width:34px; height:34px; border-radius:50%;
  border:none; background: var(--mist); color: var(--navy); cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:1rem; line-height:1;
  transition: background .15s ease;
}
.portal-modal-close:hover{ background: var(--sky); }

.portal-brand{ display:flex; align-items:center; gap:10px; margin-bottom:24px; }
.portal-brand img{ width:36px; height:36px; }
.portal-brand span{ font-family:'Fraunces',serif; font-weight:700; color:var(--navy); font-size:1.05rem; }

.portal-tabs{ display:flex; gap:6px; margin-bottom:26px; background: var(--mist); padding:6px; border-radius:999px; }
.portal-tabs button{
  flex:1; min-width:0; border:none; background:transparent; padding:10px 6px; border-radius:999px; font-family: var(--font-body);
  font-weight:700; font-size:0.82rem; cursor:pointer; color: var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.portal-tabs button.is-active{ background: var(--navy); color: var(--paper); }
.portal-foot{ text-align:center; margin-top:16px; font-size:0.85rem; color: var(--ink-soft); }
.portal-foot a{ color: var(--blue); font-weight:600; }

/* Standalone /portal/ page: just centers the same modal on a simple branded backdrop */
.portal-standalone{
  min-height: 100vh; display:flex; align-items:center; justify-content:center;
  background: var(--navy); padding: 24px; position:relative; overflow:hidden;
}
.portal-standalone::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(circle at 15% 20%, rgba(143,193,230,0.14), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(5,82,134,0.35), transparent 45%);
}
.portal-standalone .portal-modal{ position:relative; z-index:2; }

/* ---------- Mobile refinements ---------- */
@media (max-width: 600px){
  section{ padding: 64px 0; }
  .hero{ min-height: 78vh; align-items:flex-end; }
  .hero-inner{ padding: 0 16px 16px; }
  .hero-panel{ padding: 24px 20px 20px; max-width:100%; }
  .hero-caption{ font-size:0.62rem; margin-bottom:8px; }
  .hero h1{ font-size:1.6rem; line-height:1.2; margin-bottom:12px; max-width:100%; }
  .hero-sub{ display:none; }
  .hero-actions{ gap:10px; margin-bottom:16px; flex-wrap:nowrap; }
  .hero-actions .btn{ flex:1; width:auto; padding:12px 10px; font-size:0.8rem; white-space:normal; }
  .slider-dots{ margin-top:2px; }
  .page-hero{ padding: 120px 0 48px; }
  .page-hero.has-media{ padding: 150px 0 16px; }
  .page-hero.has-media .hero-panel{ padding: 24px 20px 22px; }
  .form-card{ padding: 26px 20px; }
  .cta-band{ padding: 36px 24px; }
  .portal-modal{ padding: 30px 22px 26px; }
  .mv-card{ padding: 30px 24px; }
  .section-head{ margin-bottom: 36px; }
  .stats{ gap: 28px; }
  .nav-wrap{ padding: 12px 18px; }
  .cta-actions .btn{ width:100%; }
  .portal-tabs{ gap:4px; padding:5px; }
  .portal-tabs button{ padding:9px 4px; font-size:0.76rem; }
}

/* ---------- Utility ---------- */
.mt-0{ margin-top:0; } .mb-0{ margin-bottom:0; }
.text-center{ text-align:center; }
.tag-pill{
  display:inline-block; font-family: var(--font-mono); font-size:0.7rem; letter-spacing:.05em;
  text-transform:uppercase; padding:5px 12px; border-radius:999px; background: var(--navy-tint); color: var(--navy); margin-bottom:12px;
}
