/* ============================================================
   CAMPUS MATRIX — PUBLIC SITE STYLES
   Navbar · Announcement · Hero · Mockups · Footer
   ============================================================ */

/* Keep off-canvas navigation and decorative marketing elements from
   widening narrow viewports while preserving vertical page scrolling. */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

/* ---------- ANNOUNCEMENT BAR ---------- */
.announce { background: var(--navy-800); color: #dbe2ff; font-size: .85rem; overflow: hidden; position: relative; z-index: 60; }
.announce .container { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 40px; padding-block: 7px; }
.announce .an-track { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.announce .an-msg { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; animation: anFade .5s var(--ease); }
.announce .an-spark { color: var(--cyan-400); }
.announce a { color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.announce a:hover { color: var(--cyan-400); }
.announce .an-close { position: absolute; right: 14px; background: rgba(255,255,255,.08); border: none; color: #cdd6ff; width: 24px; height: 24px; border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.announce .an-close:hover { background: rgba(255,255,255,.16); }
@keyframes anFade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- NAVBAR ---------- */
.nav { position: sticky; top: 0; z-index: 90; transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; border-bottom: 1px solid transparent; }
.nav.solid { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(16px); border-bottom-color: var(--border); box-shadow: var(--sh-sm); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo { width: 40px; height: 40px; flex-shrink: 0; }
.brand .b-name { font-family: var(--font-display); font-weight: 800; font-size: 1.16rem; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.brand .b-sub { font-size: .66rem; color: var(--text-3); font-weight: 600; letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a, .nav-item > button { display: inline-flex; align-items: center; gap: 5px; padding: 9px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: .92rem; color: var(--text-2); background: none; border: none; cursor: pointer; font-family: var(--font); transition: color .2s, background .2s; position: relative; }
.nav-links > a:hover, .nav-item > button:hover { color: var(--text); background: var(--surface-3); }
.nav-links > a.active { color: var(--brand); }
.nav-links > a.active::after { content:""; position:absolute; left:14px; right:14px; bottom:2px; height:2px; background: var(--grad-brand); border-radius:2px; }
.nav-item { position: relative; }
.nav-item .caret { transition: transform .25s; }
.nav-item:hover .caret, .nav-item.open .caret { transform: rotate(180deg); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Dropdown */
.dropdown { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 12px; width: 620px; opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nav-item:hover .dropdown, .nav-item.open .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown.single { width: 320px; grid-template-columns: 1fr; }
.dd-link { display: flex; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); transition: background .2s; }
.dd-link:hover { background: var(--surface-3); }
.dd-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.dd-ico svg { width: 19px; height: 19px; }
.dd-txt strong { display: block; font-size: .9rem; color: var(--text); font-weight: 650; }
.dd-txt span { font-size: .78rem; color: var(--text-3); }
.dd-foot { grid-column: 1/-1; margin-top: 6px; padding: 12px 14px; background: var(--grad-brand-soft); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: space-between; }
.dd-foot span { font-size: .84rem; font-weight: 600; color: var(--text); }

.theme-toggle { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; display: grid; place-items: center; transition: all .2s; }
.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

.nav-burger { display: none; width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }

/* Mobile menu */
.mobile-menu { position: fixed; inset: 0; top: 0; width: 100%; max-width: 100vw; background: var(--surface); z-index: 95; transform: translateX(100%); transition: transform .38s var(--ease); overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; padding: 20px; }
.mobile-menu.open { transform: translateX(0); }
.mm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mm-links { display: flex; flex-direction: column; gap: 2px; }
.mm-links a { padding: 14px 12px; border-radius: var(--r-sm); font-weight: 600; color: var(--text); font-size: 1.02rem; display: flex; align-items: center; justify-content: space-between; }
.mm-links a:hover { background: var(--surface-3); }
.mm-group-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; padding: 16px 12px 6px; }

/* ---------- HERO ---------- */
.hero { position: relative; background: var(--grad-hero); overflow: hidden; padding: clamp(48px, 7vw, 84px) 0 clamp(60px, 8vw, 96px); }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 44px 44px; opacity: .5; mask-image: radial-gradient(circle at 50% 30%, #000, transparent 72%); z-index: 0; }
.hero .container { position: relative; z-index: 2; }
.hero-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; color: var(--text-3); font-size: .85rem; font-weight: 600; }
.hero-trust .ht { display: flex; align-items: center; gap: 7px; }
.hero-trust .ht svg { width: 16px; height: 16px; color: var(--success); }

/* Floating cards around dashboard */
.hero-visual { position: relative; }
.float-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-lg); padding: 13px 15px; z-index: 5; }
.float-card .fc-row { display: flex; align-items: center; gap: 10px; }
.float-card .fc-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.float-card .fc-label { font-size: .72rem; color: var(--text-3); font-weight: 600; }
.float-card .fc-value { font-size: 1.05rem; font-weight: 800; font-family: var(--font-display); color: var(--text); }

/* ---------- APP PREVIEW WINDOW (marketing mock) ---------- */
.mock-window { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-lg); overflow: hidden; }
.mock-topbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 11px; height: 11px; border-radius: 50%; }
.mock-dots i:nth-child(1){background:#ff5f57}.mock-dots i:nth-child(2){background:#febc2e}.mock-dots i:nth-child(3){background:#28c840}
.mock-url { flex: 1; background: var(--surface-3); border-radius: 8px; padding: 6px 12px; font-size: .78rem; color: var(--text-3); text-align: center; }
.mock-body { display: grid; grid-template-columns: 200px 1fr; min-height: 380px; }
.mock-side { background: var(--surface-2); border-right: 1px solid var(--border); padding: 14px 10px; }
.mock-side .ms-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; font-size: .82rem; color: var(--text-2); font-weight: 600; cursor: pointer; transition: all .2s; }
.mock-side .ms-item svg { width: 17px; height: 17px; }
.mock-side .ms-item.active { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-glow); }
.mock-side .ms-item:not(.active):hover { background: var(--surface-3); color: var(--text); }
.mock-main { padding: 18px; overflow: hidden; }
.mock-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 14px; }
.mock-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.mock-stat .ms-val { font-size: 1.3rem; font-weight: 800; font-family: var(--font-display); color: var(--text); }
.mock-stat .ms-lbl { font-size: .72rem; color: var(--text-3); font-weight: 600; }

/* Bar chart (pure CSS) */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.bars .bar { flex: 1; background: var(--grad-brand); border-radius: 6px 6px 3px 3px; min-height: 8px; transition: height 1s var(--ease); position: relative; opacity: .92; }
.bars .bar::after { content: attr(data-label); position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: .62rem; color: var(--text-3); }
.bars.pad { padding-bottom: 26px; }

/* Line chart / donut placeholders via svg handled in JS */
.donut { width: 120px; height: 120px; }

/* ---------- PHONE MOCKUP ---------- */
.phone { width: 280px; background: var(--navy-900); border-radius: 38px; padding: 12px; box-shadow: var(--sh-lg); border: 1px solid var(--border-strong); position: relative; }
.phone::before { content:""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90px; height: 6px; background: rgba(255,255,255,.15); border-radius: 6px; z-index: 3; }
.phone-screen { background: var(--bg); border-radius: 28px; overflow: hidden; height: 540px; }
.phone-status { height: 34px; }
.phone-app { padding: 14px; }

/* ---------- STATS STRIP ---------- */
.stat-tile { text-align: center; }
.stat-tile .st-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.9rem); background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.stat-tile .st-lbl { color: var(--text-3); font-weight: 600; font-size: .92rem; margin-top: 8px; }

/* ---------- LOGO CLOUD ---------- */
.logo-cloud { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.school-logo { display: flex; align-items: center; gap: 12px; padding: 14px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); transition: all .3s var(--ease); filter: grayscale(1); opacity: .7; }
.school-logo:hover { filter: none; opacity: 1; transform: translateY(-3px); box-shadow: var(--sh-md); }
.school-logo .sl-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-family: var(--font-display); }
.school-logo .sl-name { font-weight: 700; font-size: .92rem; color: var(--text); line-height: 1.1; }
.school-logo .sl-name span { display: block; font-size: .68rem; color: var(--text-3); font-weight: 500; }

/* ---------- BEFORE / AFTER ---------- */
.ba-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: stretch; }
.ba-col { border-radius: var(--r-lg); padding: 28px; border: 1px solid var(--border); }
.ba-before { background: var(--surface-2); }
.ba-after { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--sh-glow); }
.ba-after h3, .ba-after .ba-item { color: #fff; }
.ba-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; font-weight: 550; }
.ba-item svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.ba-before .ba-item svg { color: var(--danger); }
.ba-after .ba-item svg { color: #fff; }
.ba-arrow { display: grid; place-items: center; }
.ba-arrow div { width: 54px; height: 54px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--brand); box-shadow: var(--sh-md); }

/* ---------- ROLE CARDS ---------- */
.role-card { cursor: pointer; overflow: hidden; position: relative; }
.role-card .rc-top { display: flex; align-items: center; gap: 14px; }
.role-card .rc-avatar { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; flex-shrink: 0; }
.role-card .rc-detail { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.role-card.open .rc-detail { max-height: 400px; }
.role-card .rc-chevron { margin-left: auto; transition: transform .3s; color: var(--text-3); }
.role-card.open .rc-chevron { transform: rotate(180deg); color: var(--brand); }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--brand), var(--accent-3)); opacity: .3; }
.tl-step { display: flex; gap: 22px; padding-bottom: 30px; position: relative; }
.tl-step:last-child { padding-bottom: 0; }
.tl-num { width: 56px; height: 56px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); color: var(--brand); flex-shrink: 0; z-index: 2; transition: all .3s; }
.tl-step.in .tl-num { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--sh-glow); }

/* ---------- TESTIMONIAL CAROUSEL ---------- */
.tcarousel { overflow: hidden; }
.tcarousel-track { display: flex; transition: transform .5s var(--ease); }
.tslide { min-width: 100%; padding: 4px; }
@media(min-width:860px){ .tslide { min-width: 50%; } }
.tcard { height: 100%; }
.tcard .stars { display: flex; gap: 3px; margin-bottom: 14px; }
.tcard .quote { font-size: 1.05rem; color: var(--text); font-weight: 500; line-height: 1.6; margin-bottom: 18px; }
.tcard .t-person { display: flex; align-items: center; gap: 12px; }
.carousel-nav { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 26px; }
.carousel-dots { display: flex; gap: 7px; }
.carousel-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--border-strong); cursor: pointer; transition: all .3s; padding: 0; }
.carousel-dots button.active { width: 26px; border-radius: 5px; background: var(--grad-brand); }
.carousel-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text-2); transition: all .2s; }
.carousel-arrow:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--sh-md); }

/* ---------- PRICING ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: transparent; box-shadow: var(--sh-lg); }
.price-card.featured::before { content:""; position:absolute; inset:-1px; border-radius: inherit; padding: 1.5px; background: var(--grad-brand); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.price-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.price-amount { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--text); }
.price-feat { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: .9rem; color: var(--text-2); }
.price-feat svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* ---------- CTA BAND ---------- */
.cta-band { background: var(--grad-brand); border-radius: var(--r-xl); padding: clamp(36px, 6vw, 64px); text-align: center; color: #fff; position: relative; overflow: hidden; box-shadow: var(--sh-glow); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); }
.cta-band::before { content:""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 34px 34px; mask-image: radial-gradient(circle at 50% 50%, #000, transparent 70%); }
.cta-band > * { position: relative; z-index: 2; }

/* ---------- FOOTER ---------- */
.footer { background: var(--navy-900); color: #b9c3e6; padding: 60px 0 26px; margin-top: 40px; }
:root[data-theme="dark"] .footer { background: #05081a; border-top: 1px solid var(--border); }
.footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 16px; }
.footer a { color: #9aa6cf; font-size: .9rem; display: block; padding: 5px 0; }
.footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 34px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.09); }
.footer-brand .b-name { color: #fff; }
.footer-brand .b-sub { color: #8592bf; }
.footer .newsletter { display: flex; gap: 8px; margin-top: 14px; }
.footer .newsletter input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-sm); padding: 11px 14px; color: #fff; font-family: var(--font); font-size: .88rem; }
.footer .newsletter input::placeholder { color: #7683ad; }
.footer .newsletter input:focus { outline: none; border-color: var(--indigo-400); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.06); display: grid; place-items: center; padding: 0; transition: all .2s; }
.footer-social a:hover { background: var(--grad-brand); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; flex-wrap: wrap; font-size: .84rem; color: #7683ad; }
.footer-bottom .fb-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- PAGE HEADER (inner pages) ---------- */
.page-hero { background: var(--grad-hero); padding: clamp(48px, 7vw, 90px) 0 clamp(40px, 5vw, 64px); position: relative; overflow: hidden; text-align: center; }
.page-hero .hero-grid-bg { opacity: .4; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-3); justify-content: center; margin-bottom: 18px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--brand); }

/* ---------- FEATURE SPLIT ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.split.rev .split-visual { order: -1; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .hero-layout { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; margin-inline: auto; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.rev .split-visual { order: 0; }
  .price-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .ba-grid { grid-template-columns: 1fr; }
  .ba-arrow div { transform: rotate(90deg); }
  .nav-links, .nav-actions .desktop-only { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-side { display: none; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-visual .float-card { max-width: calc(100% - 16px); }
  .hero-visual .float-attendance { left: 8px !important; }
  .hero-visual .float-fees { right: 8px !important; }
  .hero-visual .float-admission { left: 8px !important; }
}
