@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════ */
:root {
  /* backgrounds — deep blue-tinted dark */
  --bg:        #030312;
  --bg2:       #060619;
  --surface:   #09091e;
  --surface2:  #0d0d28;
  --surface3:  #111132;

  /* borders — cool blue-white tints */
  --border:       rgba(148,163,255,0.055);
  --border-md:    rgba(148,163,255,0.11);
  --border-accent:  rgba(139,92,246,0.32);
  --border-accent2: rgba(139,92,246,0.14);

  /* gradient — blue → purple → pink */
  --grad:      linear-gradient(135deg, #4A90D9 0%, #8B5CF6 55%, #EC4899 100%);
  --grad-btn:  linear-gradient(135deg, #5B9FE8 0%, #9B6FF8 55%, #F472B6 100%);
  --grad-text: linear-gradient(135deg, #93c5fd 0%, #c4b5fd 55%, #fbcfe8 100%);

  /* solid accent (purple mid-point, used as single-color fallback) */
  --accent:      #8B5CF6;
  --accent-lt:   #a78bfa;
  --accent-dim:  rgba(139,92,246,0.09);
  --accent-glow: rgba(139,92,246,0.22);

  /* gold → remapped to accent for backward-compat with inline styles */
  --gold:        #8B5CF6;
  --gold-lt:     #a78bfa;
  --gold-dim:    rgba(139,92,246,0.09);
  --gold-glow:   rgba(139,92,246,0.18);
  --border-gold:  rgba(139,92,246,0.32);
  --border-gold2: rgba(139,92,246,0.14);
  --shadow-gold:  0 8px 40px rgba(139,92,246,0.24);
  --shadow-deep:  0 20px 60px rgba(0,0,12,0.62);

  /* glow helpers — used by page-level inline styles */
  --glow-primary:   rgba(139,92,246,0.10);
  --glow-secondary: rgba(74,144,217,0.07);
  --glow-pink:      rgba(236,72,153,0.06);
  --grid-color:     rgba(139,92,246,0.022);

  /* text — slightly cooler white */
  --white:  #edeeff;
  --muted:  rgba(237,238,255,0.52);
  --muted2: rgba(237,238,255,0.28);
  --muted3: rgba(237,238,255,0.13);

  /* semantic */
  --green: #34d399;
  --red:   #f87171;

  /* fonts */
  --display: 'Playfair Display', 'Georgia', serif;
  --body:    'DM Sans', system-ui, sans-serif;
  --mono:    'DM Mono', monospace;

  /* radii */
  --r2: 2px; --r3: 3px; --r4: 4px; --r6: 6px; --r8: 8px; --r12: 12px;
}

/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* noise grain */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.022; pointer-events: none; mix-blend-mode: overlay;
}

/* ══════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════ */
h1,h2,h3,h4 { font-family: var(--display); line-height: 1.08; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.8rem, 5.5vw, 5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.65rem); }

.eyebrow {
  font-family: var(--body);
  font-size: 0.67rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-lt);
  display: inline-flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem;
}
.eyebrow::before { content: ''; width: 1.75rem; height: 1px; background: var(--grad); flex-shrink: 0; }

/* Gradient text on heading emphasis and key stat numbers */
h1 em, h2 em {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.h-pval em, .ci-val em, .hc-score, .sum-total-val {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  background: rgba(3,3,18,0.80);
  backdrop-filter: blur(28px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s, background 0.3s;
}
nav.scrolled { border-bottom-color: var(--border-md); background: rgba(3,3,18,0.94); }
/* Gradient accent strip along the top of nav */
nav::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--grad); z-index: 1; opacity: 0.65;
}

.nav-logo {
  font-family: var(--display); font-size: 1.2rem; font-weight: 700;
  color: var(--white); text-decoration: none; letter-spacing: 0.01em;
}
.nav-logo-dot { color: var(--gold); }

.nav-links {
  display: flex; align-items: center; gap: 0.1rem;
}
.nav-links a {
  font-size: 0.73rem; font-weight: 500; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; padding: 0.45rem 0.9rem; border-radius: var(--r2);
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--white); background: var(--surface2); }
.nav-links a.active {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%);
  width: 55%; height: 1.5px;
  background: var(--grad);
  border-radius: 2px;
}

.nav-sep {
  width: 1px; height: 14px;
  background: var(--border-md);
  margin: 0 0.35rem;
  flex-shrink: 0;
  align-self: center;
}

.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta {
  font-family: var(--body); font-size: 0.73rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  background: var(--grad-btn); color: #fff;
  padding: 0.5rem 1.2rem; border-radius: var(--r2);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.nav-cta:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(139,92,246,0.32); }
.nav-cta.active { box-shadow: 0 0 0 2px rgba(139,92,246,0.5), 0 4px 20px rgba(139,92,246,0.32); filter: brightness(1.08); }

.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; width: 34px; height: 34px;
}
.hamburger span { display: block; height: 1.5px; background: var(--white); border-radius: 2px; transition: all 0.3s; }
.hamburger span:nth-child(1) { width: 20px; }
.hamburger span:nth-child(2) { width: 14px; }
.hamburger span:nth-child(3) { width: 20px; }

.mobile-nav {
  display: flex; flex-direction: column;
  position: fixed; top: 62px; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border-md);
  z-index: 499;
  max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
  transition: max-height 0.32s ease, opacity 0.22s ease;
}
.mobile-nav.open { max-height: 640px; opacity: 1; pointer-events: auto; }
.mobile-nav a {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  padding: 0.95rem 2rem; border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.mobile-nav a:hover { color: var(--white); background: var(--surface2); }
.mobile-nav a.active {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  border-left: 2px solid var(--accent);
  padding-left: calc(2rem - 2px);
}
.mobile-nav a.cta-link {
  margin: 1rem 1.5rem 1.25rem;
  padding: 0.78rem 1.5rem;
  background: var(--grad-btn); color: #fff;
  border: none; border-radius: var(--r4);
  text-align: center; font-weight: 600;
  transition: filter 0.2s, transform 0.15s;
}
.mobile-nav a.cta-link:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: var(--body); font-weight: 600;
  font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: none;
  padding: 0.8rem 1.7rem; border-radius: var(--r2);
  transition: all 0.22s; white-space: nowrap; position: relative; overflow: hidden;
}
.btn-gold { background: var(--grad-btn); color: #fff; }
.btn-gold:hover { filter: brightness(1.12); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(139,92,246,0.36); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid var(--border-md); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-lt); background: var(--accent-dim); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); font-size: 0.71rem; padding: 0.55rem 1.1rem; }
.btn-ghost:hover { color: var(--white); border-color: var(--border-md); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.71rem; }
.btn-lg { padding: 0.95rem 2rem; font-size: 0.82rem; }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r4);
  transition: border-color 0.3s, transform 0.25s, box-shadow 0.3s;
}
.card:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: 0 4px 24px rgba(139,92,246,0.12); }

/* ══════════════════════════════════════════
   TAGS / BADGES
══════════════════════════════════════════ */
.tag {
  display: inline-flex; align-items: center;
  background: var(--accent-dim); color: var(--accent-lt);
  border: 1px solid var(--border-accent2);
  padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.67rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.tag-green { background: rgba(52,211,153,0.09); color: var(--green); border-color: rgba(52,211,153,0.2); }

/* ══════════════════════════════════════════
   DIVIDERS
══════════════════════════════════════════ */
.divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-md) 25%, var(--border-md) 75%, transparent 100%);
}
.divider-gold {
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(139,92,246,0.35) 25%, rgba(236,72,153,0.25) 75%, transparent 100%);
}

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: 0.67rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.38rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.75rem 0.95rem;
  background: var(--surface2); border: 1px solid var(--border-md);
  color: var(--white); font-family: var(--body); font-size: 0.87rem;
  border-radius: var(--r2); outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: var(--surface3);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted2); }
.field select option { background: var(--surface2); }
.field textarea { resize: vertical; min-height: 88px; line-height: 1.65; }
.field-error { font-size: 0.7rem; color: var(--red); margin-top: 0.28rem; display: none; }
.field input.err, .field select.err { border-color: var(--red); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }

/* ══════════════════════════════════════════
   SECTION WRAPPERS
══════════════════════════════════════════ */
/* Ensure all page content sits above the z-index:0 animated canvas */
section, footer, .divider { position: relative; z-index: 1; }
.section-pad { padding: 6rem 3rem; }
.section-pad-sm { padding: 4rem 3rem; }

/* ══════════════════════════════════════════
   SCHOOL PILLS
══════════════════════════════════════════ */
.school-pill {
  background: var(--surface2); border: 1px solid var(--border);
  padding: 0.3rem 0.85rem; border-radius: 20px;
  font-size: 0.71rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--muted); transition: all 0.22s; cursor: default;
}
.school-pill:hover { border-color: var(--border-accent); color: var(--accent-lt); background: var(--accent-dim); }

/* ══════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════ */
.sr { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.sr.in { opacity: 1; transform: translateY(0); }
.sr-d1 { transition-delay: 0.08s; }
.sr-d2 { transition-delay: 0.16s; }
.sr-d3 { transition-delay: 0.24s; }
.sr-d4 { transition-delay: 0.32s; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 3rem;
  position: relative;
}
footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: var(--grad); opacity: 0.28;
}
.footer-inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 2rem;
}
.footer-logo { font-family: var(--display); font-size: 1.05rem; font-weight: 700; color: var(--white); }
.footer-logo-dot { color: var(--gold); }
.footer-tagline { font-size: 0.7rem; color: var(--muted2); margin-top: 0.2rem; letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 1.75rem; justify-content: center; flex-wrap: wrap; }
.footer-links a { font-size: 0.7rem; color: var(--muted); text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-lt); }
.footer-right { text-align: right; font-size: 0.7rem; color: var(--muted2); line-height: 1.8; }
.footer-right a { color: var(--accent-lt); text-decoration: none; }

/* ══════════════════════════════════════════
   MOBILE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  nav { padding: 0 1.4rem; }
  .nav-links { display: none; }
  .nav-right .nav-cta { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 880px) {
  .section-pad { padding: 4rem 1.4rem; }
  .section-pad-sm { padding: 3rem 1.4rem; }
  footer { padding: 2rem 1.4rem; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; }
  .footer-links { justify-content: center; }
  .footer-right { text-align: center; }
  .field-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   FLOATING SIDE BUTTONS (help + report)
══════════════════════════════════════════ */
.help-float-btn,
.report-float-btn {
  position: fixed;
  right: 1.25rem;
  z-index: 600;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 2rem;
  height: 2.6rem;
  padding: 0 0.75rem;
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  overflow: hidden;
  max-width: 2.6rem;
  transition: max-width 0.3s ease, gap 0.3s ease, background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.help-float-btn {
  top: 20%;
  background: var(--surface);
  border: 1.5px solid var(--border-gold);
  color: var(--gold);
  text-decoration: none;
}
.help-float-btn:hover {
  max-width: 140px;
  gap: 0.45rem;
  background: var(--gold-dim);
  box-shadow: 0 6px 28px rgba(139,92,246,0.3);
}
.report-float-btn {
  top: calc(20% + 3.4rem);
  background: var(--surface);
  border: 1.5px solid rgba(251,146,60,0.55);
  color: #fb923c;
  appearance: none;
  -webkit-appearance: none;
}
.report-float-btn:hover {
  max-width: 148px;
  gap: 0.45rem;
  background: rgba(251,146,60,0.08);
  box-shadow: 0 6px 28px rgba(251,146,60,0.2);
}
.hfb-icon, .rfb-icon {
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
  width: 1.1rem;
  text-align: center;
}
.hfb-text, .rfb-text {
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.15s 0.15s;
  font-size: 0.76rem;
}
.help-float-btn:hover .hfb-text,
.report-float-btn:hover .rfb-text { opacity: 1; }

/* ── Report issue modal ── */
.report-modal-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.report-modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r8);
  padding: 2rem;
  width: 100%; max-width: 420px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.report-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--muted);
  font-size: 1.1rem; cursor: pointer; padding: 0.2rem 0.4rem;
  border-radius: var(--r2); transition: color 0.2s;
}
.report-modal-close:hover { color: var(--white); }
.report-modal-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.4rem; }
.report-modal-icon { font-size: 1.6rem; flex-shrink: 0; }
.report-modal-title { font-family: var(--display); font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.report-modal-sub { font-size: 0.78rem; color: var(--muted); }
.report-field { margin-bottom: 0.9rem; }
.report-label { display: block; font-size: 0.67rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.report-select,
.report-textarea {
  width: 100%; padding: 0.65rem 0.85rem;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--white); font-family: var(--body); font-size: 0.875rem;
  border-radius: var(--r2); transition: border-color 0.2s;
}
.report-select:focus,
.report-textarea:focus { outline: none; border-color: rgba(251,146,60,0.6); }
.report-textarea { resize: vertical; min-height: 90px; }
.report-submit-btn {
  width: 100%; padding: 0.78rem;
  background: rgba(251,146,60,0.15); border: 1.5px solid rgba(251,146,60,0.5);
  color: #fb923c; font-family: var(--body); font-size: 0.82rem; font-weight: 700;
  cursor: pointer; border-radius: var(--r2); transition: all 0.2s; margin-top: 0.25rem;
}
.report-submit-btn:hover:not(:disabled) { background: rgba(251,146,60,0.25); }
.report-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.report-result { padding: 1rem; border-radius: var(--r4); text-align: center; font-size: 0.88rem; font-weight: 600; }
.report-result-success { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.3); color: #34d399; }
.report-result-error   { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }

@media (max-width: 880px) {
  .help-float-btn   { right: 0.85rem; top: auto; bottom: 4.4rem; }
  .report-float-btn { right: 0.85rem; top: auto; bottom: 1.5rem; }
}

/* ══════════════════════════════════════════
   SKELETON LOADING (Netflix-style shimmer)
══════════════════════════════════════════ */
@keyframes skl-shimmer {
  0%   { background-position: -400% 0; }
  100% { background-position:  400% 0; }
}
.skl {
  background: linear-gradient(
    90deg,
    var(--surface)  25%,
    var(--surface2) 50%,
    var(--surface)  75%
  );
  background-size: 400% 100%;
  animation: skl-shimmer 1.6s ease infinite;
  border-radius: var(--r2);
  display: block;
}
.skl-line   { height: 0.82em; margin-bottom: 0.5em; }
.skl-sm     { height: 0.65em; margin-bottom: 0.4em; }
.skl-circle { border-radius: 50% !important; }
.skl-price  { height: 1.3em; width: 5rem; display: inline-block; vertical-align: middle; }

/* ── Svc-row skeleton (book.html service list) ── */
.svc-row-skel {
  display: grid;
  grid-template-columns: 1.2rem 1.1rem 1fr auto;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.2rem;
  border-radius: var(--r4);
}
.svc-row-skel + .svc-row-skel { margin-top: 0.55rem; }

/* ── Sblk skeleton (services.html service blocks) ── */
.sblk-skel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r4);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.sblk-skel-l { padding: 2.5rem; border-right: 1px solid var(--border); }
.sblk-skel-r { padding: 2.5rem; }

@media (max-width: 880px) {
  .svc-row-skel { grid-template-columns: 1.2rem 1.1rem 1fr; }
  .sblk-skel { grid-template-columns: 1fr; }
  .sblk-skel-l { border-right: none; border-bottom: 1px solid var(--border); }
}
