/* =========================================================
   CampusTrack — Home Page Styles
   Theme: light blue & white, with amber (verification) accent
   ========================================================= */

:root {
  /* Color tokens */
  --white: #ffffff;
  --sky-50: #F3F9FD;
  --sky-100: #E4F2FB;
  --sky-200: #D2EAF8;
  --sky-300: #A9D8F0;
  --blue-600: #0E7AB8;
  --blue-700: #0B5E8F;
  --blue-800: #094A72;
  --ink-900: #0E2438;
  --ink-700: #24455C;
  --ink-500: #5C7C90;
  --line: #CFE6F6;
  --amber-500: #F2A93B;
  --amber-700: #B97F1E;
  --teal-600: #17A673;
  --shadow-sm: 0 1px 2px rgba(14, 36, 56, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 78, 118, 0.10);
  --shadow-lg: 0 20px 48px rgba(14, 78, 118, 0.16);

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: var(--ink-900); line-height: 1.15; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-500); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--blue-700); color: #fff;
  padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin: 0 0 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid transparent;
  padding: 12px 22px;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--blue-700); box-shadow: var(--shadow-md); }

.btn-dark {
  background: var(--ink-900);
  color: #fff;
}
.btn-dark:hover { background: #16324a; box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--blue-700);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--sky-100); border-color: var(--sky-300); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink-900);
  flex-shrink: 0;
}
.brand-badge { width: 30px; height: 30px; }
.brand-name em { font-style: normal; color: var(--blue-600); }

.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-700);
  padding: 8px 2px;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--blue-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a:hover { color: var(--blue-700); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.nav-toggle span { display: block; height: 2px; width: 18px; margin: 0 auto; background: var(--ink-900); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.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); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 480px at 82% -10%, var(--sky-200) 0%, transparent 60%),
    linear-gradient(180deg, var(--sky-50) 0%, var(--white) 78%);
  padding: 76px 0 60px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 14px 0 20px;
  color: var(--ink-900);
}
.text-accent-line {
  position: relative;
  color: var(--blue-700);
}
.text-accent-line::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 10px;
  background: var(--amber-500);
  opacity: 0.35;
  z-index: -1;
}
.hero-lead {
  font-size: 1.08rem;
  color: var(--ink-700);
  max-width: 46ch;
  margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 36px;
  margin: 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stats dt { font-size: 0.78rem; color: var(--ink-500); margin-bottom: 6px; }
.hero-stats dd { margin: 0; font-size: 1.5rem; font-weight: 600; color: var(--blue-700); }

/* Hero visual: verification badge card */
.hero-visual { position: relative; display: flex; justify-content: center; }
.badge-card {
  width: 280px;
  background: linear-gradient(165deg, #ffffff 0%, var(--sky-50) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  position: relative;
}
.badge-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.badge-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  color: var(--teal-600); background: rgba(23,166,115,0.1);
  padding: 4px 10px; border-radius: 999px;
}
.badge-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-600); animation: pulse 1.6s ease-in-out infinite; }

.badge-scan-area {
  position: relative;
  width: 120px; height: 120px;
  margin: 6px auto 18px;
}
.badge-scan-area svg { position: absolute; top: 0; left: 0; }
.badge-scanline { animation: scan 2.4s ease-in-out infinite; }

.badge-status { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.status-row { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--ink-700); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-done { background: var(--teal-600); }
.dot-pulse { background: var(--amber-500); animation: pulse 1.4s ease-in-out infinite; }

.badge-card-bottom {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  font-size: 0.75rem;
  color: var(--ink-500);
  letter-spacing: 0.04em;
}

.floating-pin {
  position: absolute;
  bottom: -6px; right: 6px;
  display: flex; align-items: center; gap: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-700);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
@keyframes scan {
  0% { transform: translateY(-34px); opacity: 0; }
  15% { opacity: 1; }
  50% { transform: translateY(34px); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(-34px); opacity: 0; }
}

/* ---------- Trust strip ---------- */
.trust-strip { padding: 30px 0; border-bottom: 1px solid var(--line); }
.trust-strip .wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.trust-strip p { font-size: 0.82rem; color: var(--ink-500); font-weight: 600; white-space: nowrap; }
.trust-strip ul { display: flex; gap: 26px; flex-wrap: wrap; }
.trust-strip li { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-700); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--sky-50); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-bottom: 14px; }
.section-lead { color: var(--ink-700); font-size: 1.02rem; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sky-300); }
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: var(--sky-100);
  border-radius: 12px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature-card p { color: var(--ink-500); font-size: 0.92rem; }

/* ---------- Snapshot / graph ---------- */
.snapshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.snapshot-list { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.snapshot-list li { color: var(--ink-700); font-size: 0.98rem; }
.snapshot-list strong { color: var(--blue-700); font-family: var(--font-mono); margin-right: 6px; }

.snapshot-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 26px;
}
.snapshot-card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.9rem; font-weight: 600; margin-bottom: 18px; color: var(--ink-900);
}
.bar-chart { width: 100%; height: auto; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-bars rect { fill: var(--blue-600); transition: height 1s ease, y 1s ease; }
.chart-bars rect.bar-muted { fill: var(--sky-300); }
.chart-labels text { fill: var(--ink-500); font-size: 9px; text-anchor: middle; }

/* ---------- Login portals ---------- */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.portal-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.portal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.portal-card-strip { height: 8px; background: linear-gradient(90deg, var(--blue-600), var(--sky-300)); }
.portal-card-strip.strip-admin { background: linear-gradient(90deg, var(--amber-700), var(--amber-500)); }
.portal-card-body { padding: 34px 30px; }

.portal-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px;
  background: var(--sky-100);
  border-radius: 14px;
  margin-bottom: 18px;
}
.portal-icon-admin { background: #FCEFD8; }

.portal-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.portal-card > .portal-card-body > p { color: var(--ink-700); margin-bottom: 18px; }

.portal-points { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.portal-points li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: var(--ink-700);
}
.portal-points li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--blue-600);
}
.portal-card-admin .portal-points li::before { background: var(--amber-500); }

/* ---------- Steps (how it works) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
}
.step::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(220px 120px at 100% 0%, rgba(255,255,255,0.06), transparent 70%);
  pointer-events: none;
}
.step-index {
  display: block;
  font-size: 0.78rem;
  color: var(--sky-300);
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}
.step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 11px;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.02rem; margin-bottom: 8px; color: #fff; }
.step p { font-size: 0.88rem; color: #BFD6E5; }
.step:nth-child(2) { background: var(--blue-700); }
.step:nth-child(2) .step-index { color: #CDEBFA; }
.step:nth-child(3) { background: var(--blue-600); }
.step:nth-child(3) .step-index { color: #E4F5FF; }
.step:nth-child(4) { background: var(--teal-600); }
.step:nth-child(4) .step-index { color: #DCF7EC; }
.step:nth-child(4) p { color: #DCF7EC; }
.step:nth-child(3) p { color: #E4F5FF; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue-700), var(--blue-800)); padding: 60px 0; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: 1.7rem; margin-bottom: 8px; }
.cta-band p { color: #CFE6F6; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: #C7DAE7; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 36px;
  padding: 64px 0 44px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p { margin: 14px 0 18px; font-size: 0.9rem; color: #9FBAC9; max-width: 32ch; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-name em { color: var(--sky-300); }

.social-row { display: flex; gap: 10px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 9px;
  color: #C7DAE7;
  transition: background 0.15s ease, color 0.15s ease;
}
.social-row a:hover { background: var(--blue-600); color: #fff; }

.footer-col h4 { color: #fff; font-size: 0.86rem; margin-bottom: 16px; letter-spacing: 0.03em; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 0.9rem; color: #9FBAC9; transition: color 0.15s ease; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem; color: #7F9DAF;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 90;
}
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--blue-700); }

/* ---------- Reveal-on-scroll ----------
   Visible by default (progressive enhancement): content must never
   depend on JavaScript running to be readable. JS opts elements into
   the hidden->visible transition via .reveal-armed. */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.reveal-armed { opacity: 0; transform: translateY(18px); }
.reveal.reveal-armed.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .snapshot-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav ul { flex-direction: column; padding: 14px 24px 22px; gap: 4px; }
  .main-nav a { display: block; padding: 12px 4px; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }

  .hero { padding: 44px 0 44px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-stats { flex-wrap: wrap; gap: 22px 30px; }

  .feature-grid { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; padding: 48px 0 32px; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
  .section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge-live i, .dot-pulse, .badge-scanline { animation: none; }
  .reveal, .reveal.reveal-armed { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
