/* =========================================================================
   Cerebrum Systems — Grant Finder styles
   ========================================================================= */

:root {
  --ink: #0e1730;
  --ink-soft: #43506b;
  --ink-faint: #6b7894;
  --bg: #f6f8fc;
  --card: #ffffff;
  --line: #e3e9f2;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --accent: #06b6d4;
  --grad: linear-gradient(100deg, #4f46e5, #7c3aed 55%, #06b6d4);
  --green: #0e9f6e;
  --green-bg: #e7f7f0;
  --amber: #b45309;
  --amber-bg: #fdf3e3;
  --red: #dc2626;
  --radius: 18px;
  --shadow: 0 4px 24px rgba(14, 23, 48, 0.07);
  --shadow-lg: 0 14px 44px rgba(14, 23, 48, 0.13);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Sora", var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; margin-top: 36px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-text-light {
  background: linear-gradient(100deg, #a5b4fc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fade-in { animation: fadeUp 0.45s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Views ---------------- */
.view { display: none; }
.view.active { display: block; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: 999px;
  font-weight: 600; font-size: 16px;
  padding: 13px 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(79, 70, 229, 0.45); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); background: #fff;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); }
.btn-lg { padding: 16px 34px; font-size: 17.5px; }
.btn-sm { padding: 9px 18px; font-size: 14.5px; }
.btn-block { width: 100%; justify-content: center; }
.btn-arrow { transition: transform 0.15s; }
.btn:hover .btn-arrow { transform: translateX(3px); }
.link-btn {
  background: none; border: none; color: var(--brand);
  font-weight: 600; font-size: 15px; padding: 4px 0;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.subtle { color: var(--ink-faint); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 248, 252, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand-mark {
  background: var(--grad); color: #fff;
  width: 32px; height: 32px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.3px; }
.brand-name span { color: var(--brand); }
.header-nav { display: flex; align-items: center; gap: 18px; }
.nav-link { background: none; border: none; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.nav-link:hover { color: var(--brand); }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(124, 58, 237, 0.13), transparent 60%),
    radial-gradient(700px 380px at -5% 30%, rgba(6, 182, 212, 0.11), transparent 60%);
  padding: 84px 0 70px;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  display: inline-block; font-size: 13.5px; font-weight: 600;
  color: var(--brand); background: #eef0ff;
  border: 1px solid #dfe3ff; border-radius: 999px;
  padding: 6px 14px; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.12; letter-spacing: -1.2px; font-weight: 800;
  margin-bottom: 20px;
}
.hero-sub { font-size: 19px; color: var(--ink-soft); max-width: 56ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14.5px; color: var(--ink-faint); font-weight: 500; }

/* Floating cards panel */
.hero-panel { position: relative; height: 420px; }
.float-card {
  position: absolute;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 22px 24px;
  width: 250px; border: 1px solid var(--line);
  animation: floaty 6s ease-in-out infinite;
}
.fc-1 { top: 16px; right: 8px; animation-delay: 0s; }
.fc-2 { top: 158px; left: 0; animation-delay: 1.6s; }
.fc-3 { bottom: 18px; right: 36px; animation-delay: 3.1s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.fc-amount { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.fc-label { color: var(--ink-soft); font-size: 14px; margin: 4px 0 10px; }
.fc-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 3px 11px;
}
.fc-badge.open { background: var(--green-bg); color: var(--green); }
.fc-badge.ongoing { background: #eef0ff; color: var(--brand); }

/* ---------------- Sections ---------------- */
.section { padding: 76px 24px; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.8px; text-align: center; margin-bottom: 14px;
}
.section-title.light { color: #fff; }
.section-sub {
  text-align: center; color: var(--ink-soft); font-size: 18px;
  max-width: 64ch; margin: 0 auto 46px;
}
.section-sub.left { text-align: left; margin: 0 0 8px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-num {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; margin-bottom: 16px;
}
.step h3 { font-size: 17.5px; margin-bottom: 8px; letter-spacing: -0.2px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* Band (dark strip) */
.band {
  background: linear-gradient(135deg, #101736, #1c1145 60%, #0d2438);
  padding: 72px 0;
}
.ticker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px; margin: 14px 0 36px;
}
.ticker-card {
  text-align: left; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px; padding: 18px;
  transition: background 0.15s, transform 0.15s;
}
.ticker-card:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-3px); }
.tc-amount { color: #8ee7f7; font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.tc-name { color: #fff; font-weight: 700; font-size: 14.5px; margin: 2px 0 6px; }
.tc-tag { color: rgba(255, 255, 255, 0.66); font-size: 13px; line-height: 1.45; }

/* Why grid */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow);
}
.why-icon { font-size: 30px; margin-bottom: 14px; }
.why-card h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.2px; }
.why-card p { color: var(--ink-soft); font-size: 15px; }

/* ---------------- Wizard ---------------- */
.wizard-shell { max-width: 760px; padding-top: 36px; padding-bottom: 90px; }
.wizard-top { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.progress-wrap { flex: 1; }
.progress-bar {
  height: 8px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--grad); border-radius: 999px;
  transition: width 0.4s ease; width: 0;
}
.progress-label { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; margin-top: 6px; text-align: center; }
.wizard-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: 46px 48px; min-height: 420px;
}
.wiz-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.6px; margin-bottom: 10px;
}
.wiz-help { color: var(--ink-soft); font-size: 16px; margin-bottom: 28px; max-width: 60ch; }
.opt-grid { display: grid; gap: 12px; }
.opt-grid.compact { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 16px;
  width: 100%; text-align: left;
  background: #fbfcfe; border: 2px solid var(--line);
  border-radius: 16px; padding: 17px 20px;
  font-size: 16px; transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.opt:hover { border-color: #b9c0f5; background: #fff; transform: translateY(-1px); }
.opt.selected { border-color: var(--brand); background: #f3f2ff; }
.opt-icon { font-size: 24px; flex-shrink: 0; }
.opt-text { display: flex; flex-direction: column; flex: 1; }
.opt-label { font-weight: 600; }
.opt-sub { font-size: 13.5px; color: var(--ink-faint); margin-top: 1px; }
.opt-check {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; opacity: 0; transform: scale(0.5);
  transition: opacity 0.15s, transform 0.15s; flex-shrink: 0;
}
.opt.selected .opt-check { opacity: 1; transform: scale(1); }
.wiz-next-row { margin-top: 28px; text-align: right; }

/* Calculating */
.calc { text-align: center; padding: 70px 0; }
.calc-spinner {
  width: 58px; height: 58px; margin: 0 auto 28px;
  border-radius: 50%;
  border: 5px solid var(--line); border-top-color: var(--brand);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Results ---------------- */
.results-shell { max-width: 980px; padding-top: 52px; padding-bottom: 90px; }
.results-hero { text-align: center; margin-bottom: 50px; }
.results-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.results-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px); letter-spacing: -1px; margin-bottom: 16px;
}
.results-sub { font-size: 19px; color: var(--ink-soft); max-width: 62ch; margin: 0 auto; }
.tier-title {
  font-family: var(--font-display); font-size: 21px;
  display: flex; align-items: center; gap: 12px;
  margin: 38px 0 18px; letter-spacing: -0.3px;
}
.tier-badge {
  font-size: 12.5px; font-weight: 700; border-radius: 999px;
  padding: 5px 14px; letter-spacing: 0.3px; font-family: var(--font);
}
.tier-badge.strong { background: var(--green-bg); color: var(--green); }
.tier-badge.possible { background: var(--amber-bg); color: var(--amber); }
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.result-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 26px;
}
.result-card.tier-strong { border-top: 4px solid var(--green); }
.result-card.tier-possible { border-top: 4px solid #e3a23c; }
.result-card-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.rc-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.rc-full { color: var(--ink-faint); font-size: 13px; margin-top: 1px; }
.rc-amount {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  white-space: nowrap; color: var(--brand);
}
.rc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 14px; }
.rc-status { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.rc-reasons { list-style: none; margin-bottom: 14px; }
.rc-reasons li { font-size: 14.5px; padding: 4px 0 4px 26px; position: relative; color: var(--ink-soft); }
.rc-reasons li.yes::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 800; }
.rc-reasons li.note::before { content: "•"; position: absolute; left: 6px; color: var(--amber); font-weight: 800; }

/* Pills & status dots */
.pill {
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 12px;
}
.pill-grant { background: var(--green-bg); color: var(--green); }
.pill-loan { background: #e8f1fe; color: #1d4ed8; }
.pill-tax { background: #f3e8ff; color: #7e22ce; }
.pill-training { background: #fff1e6; color: #c2580c; }
.pill-closed { background: #f1f2f6; color: var(--ink-faint); }
.pill-level { background: #eef1f7; color: var(--ink-soft); }
.status-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
}
.status-dot.ongoing { background: var(--brand); }
.status-dot.verify, .status-dot.paused, .status-dot.window { background: #e3a23c; }
.status-dot.closed { background: #b7bdca; }

/* Lead card */
.lead-card {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px;
  background: linear-gradient(135deg, #131b3d, #251353 60%, #0e2a44);
  border-radius: 26px; padding: 46px;
  margin: 52px 0 24px; color: #fff;
  box-shadow: var(--shadow-lg);
}
.lead-copy h2 { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.7px; margin-bottom: 14px; }
.lead-copy p { color: rgba(255, 255, 255, 0.82); margin-bottom: 20px; }
.lead-points { list-style: none; }
.lead-points li { padding: 5px 0; color: rgba(255, 255, 255, 0.9); font-size: 15.5px; }
.lead-form {
  background: #fff; border-radius: 18px; padding: 30px; color: var(--ink);
  display: flex; flex-direction: column; gap: 14px;
}
.lead-form h3 { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.3px; margin-bottom: 2px; }
.lead-form label { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); display: flex; flex-direction: column; gap: 5px; }
.lead-form .optional { font-weight: 400; color: var(--ink-faint); }
.lead-form input {
  font-family: inherit; font-size: 15.5px;
  border: 1.5px solid var(--line); border-radius: 11px;
  padding: 12px 14px; outline: none; transition: border-color 0.15s;
}
.lead-form input:focus { border-color: var(--brand); }
.form-fine { font-size: 12.5px; color: var(--ink-faint); text-align: center; }
.lead-success { grid-column: 1 / -1; text-align: center; padding: 30px 10px; }
.success-icon { font-size: 46px; margin-bottom: 14px; }
.lead-success h2 { font-family: var(--font-display); font-size: 28px; margin-bottom: 10px; }
.lead-success p { color: rgba(255, 255, 255, 0.85); max-width: 52ch; margin: 0 auto; }
.lead-success a { color: #8ee7f7; }

/* Out details */
.out-details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 24px; margin-top: 20px;
}
.out-details summary { font-weight: 600; color: var(--ink-soft); cursor: pointer; font-size: 15px; }
.out-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.out-row { display: flex; gap: 16px; font-size: 14.5px; border-top: 1px solid var(--line); padding-top: 10px; }
.out-name { font-weight: 700; min-width: 110px; color: var(--ink-soft); }
.out-reason { color: var(--ink-faint); }
.results-actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.results-disclaimer {
  text-align: center; font-size: 12.5px; color: var(--ink-faint);
  max-width: 78ch; margin: 26px auto 0;
}

/* ---------------- Browse ---------------- */
.browse-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 28px; margin-bottom: 30px; flex-wrap: wrap;
}
.browse-title { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.9px; margin-bottom: 10px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  border: 1.5px solid var(--line); background: #fff;
  border-radius: 999px; padding: 8px 18px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.grant-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.grant-card {
  text-align: left; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.grant-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c8cef5; }
.grant-card.is-closed { opacity: 0.62; }
.gc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gc-status { font-size: 12px; font-weight: 600; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; }
.gc-amount { font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: -0.6px; }
.gc-name { font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.gc-tagline { color: var(--ink-soft); font-size: 14px; flex: 1; }
.gc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.gc-level { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.gc-more { color: var(--brand); font-weight: 700; font-size: 14px; }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 23, 48, 0.55);
  backdrop-filter: blur(5px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 5vh 20px; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 24px;
  max-width: 660px; width: 100%;
  padding: 42px 44px; position: relative;
  box-shadow: 0 30px 80px rgba(14, 23, 48, 0.35);
  animation: fadeUp 0.3s ease both;
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--bg); color: var(--ink-soft);
  font-size: 15px;
}
.modal-close:hover { background: var(--line); }
.modal-pills { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.modal-head h2 { font-family: var(--font-display); font-size: 25px; letter-spacing: -0.6px; line-height: 1.25; margin-bottom: 8px; }
.modal-amount { font-family: var(--font-display); font-weight: 800; font-size: 21px; color: var(--brand); margin-bottom: 16px; }
.modal-amount span { font-family: var(--font); font-weight: 500; font-size: 14.5px; color: var(--ink-faint); }
.modal-plain { color: var(--ink-soft); margin-bottom: 22px; }
.modal h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); margin: 20px 0 10px; }
.modal-check { list-style: none; }
.modal-check li { padding: 5px 0 5px 28px; position: relative; font-size: 15.5px; }
.modal-check li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
.modal-body-text { font-size: 15.5px; color: var(--ink-soft); }
.modal-caveat {
  background: var(--amber-bg); color: var(--amber);
  border-radius: 12px; padding: 13px 16px;
  font-size: 14.5px; font-weight: 500; margin-top: 18px;
}
.modal-pairs { display: flex; gap: 8px; flex-wrap: wrap; }
.pair-chip {
  border: 1.5px solid var(--line); background: var(--bg);
  border-radius: 999px; padding: 7px 16px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.pair-chip:hover { border-color: var(--brand); color: var(--brand); }
.modal-cta {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ---------------- Footer ---------------- */
.site-footer { background: #0e1730; color: rgba(255, 255, 255, 0.75); padding: 54px 0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.footer-brand strong { color: #fff; font-family: var(--font-display); }
.footer-brand p { font-size: 14px; margin-top: 12px; }
.footer-note p { font-size: 12.5px; line-height: 1.65; color: rgba(255, 255, 255, 0.55); margin-bottom: 10px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .lead-card { grid-template-columns: 1fr; padding: 32px 26px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 52px 0 44px; }
  .section { padding: 54px 18px; }
  .steps { grid-template-columns: 1fr; }
  .wizard-card { padding: 30px 22px; min-height: 0; }
  .opt-grid.compact { grid-template-columns: 1fr; }
  .modal { padding: 32px 24px; }
  .header-nav .nav-link { display: none; }
  .browse-head { flex-direction: column; }
}

/* =========================================================================
   FX LAYER — scroll, 3D, and hover effects (appended; overrides above rules)
   ========================================================================= */

/* ---- Scroll progress + header morph ---- */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 3px; width: 0; background: var(--grad);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.55);
}
.site-header { transition: background 0.3s ease, box-shadow 0.3s ease; }
.header-inner { transition: height 0.3s ease; }
.site-header.scrolled { background: rgba(255, 255, 255, 0.78); box-shadow: 0 6px 26px rgba(14, 23, 48, 0.09); }
.site-header.scrolled .header-inner { height: 56px; }
.nav-link { position: relative; padding-bottom: 3px; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--brand); }
#how, #programs, #why { scroll-margin-top: 86px; }

/* ---- Animated gradient text ---- */
.grad-text, .grad-text-light { background-size: 200% auto; animation: shimmer 7s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }

/* ---- Hero: aurora blobs + dot grid + staggered entrance ---- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(79, 70, 229, 0.16) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(640px 420px at 72% 28%, #000 30%, transparent 75%);
  mask-image: radial-gradient(640px 420px at 72% 28%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; }
.aurora { position: absolute; inset: 0; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(85px); opacity: 0.5; }
.aurora .a1 { width: 560px; height: 560px; background: #c7d2fe; top: -180px; right: -90px; animation: drift1 16s ease-in-out infinite alternate; }
.aurora .a2 { width: 460px; height: 460px; background: #a5f3fc; bottom: -170px; left: -130px; animation: drift2 21s ease-in-out infinite alternate; }
.aurora .a3 { width: 330px; height: 330px; background: #e9d5ff; top: 26%; left: 36%; animation: drift3 18s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-70px, 60px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(80px, -50px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-50px, -60px) scale(1.2); } }
.hero-copy > * { animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero-copy > :nth-child(1) { animation-delay: 0.05s; }
.hero-copy > :nth-child(2) { animation-delay: 0.14s; }
.hero-copy > :nth-child(3) { animation-delay: 0.24s; }
.hero-copy > :nth-child(4) { animation-delay: 0.34s; }
.hero-copy > :nth-child(5) { animation-delay: 0.44s; }

/* ---- Hero 3D parallax panel ---- */
.hero-panel { perspective: 1200px; }
.panel-3d {
  position: relative; height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(var(--pry, 0deg)) rotateX(var(--prx, 0deg));
  transition: transform 0.35s ease-out;
  animation: fadeUp 0.9s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.depth { position: absolute; transform-style: preserve-3d; }
.depth.d1 { top: 16px; right: 8px; transform: translateZ(75px); }
.depth.d2 { top: 158px; left: 0; transform: translateZ(28px); }
.depth.d3 { bottom: 18px; right: 36px; transform: translateZ(115px); }
.depth .float-card { position: static; }

/* ---- Stats strip ---- */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 30px 36px; margin-top: -30px;
  position: relative; z-index: 2;
}
.stat { text-align: center; }
.stat-num {
  display: block; font-family: var(--font-display);
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--ink-faint); font-size: 13.5px; font-weight: 600; }

/* ---- Reveal-on-scroll ---- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---- 3D tilt + cursor spotlight ---- */
[data-tilt] {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
[data-tilt]:hover {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.reveal[data-tilt] {
  transform: perspective(900px) translateY(30px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.reveal.in-view[data-tilt] {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
[data-shine] { position: relative; }
[data-shine]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--shine-color, rgba(99, 102, 241, 0.13)), transparent 65%);
}
[data-shine]:hover::after { opacity: 1; }
.band [data-shine] { --shine-color: rgba(255, 255, 255, 0.16); }
.step h3, .step p, .step .step-num, .why-card * { position: relative; z-index: 1; }

/* ---- Magnetic buttons ---- */
[data-magnet] {
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  transition: transform 0.2s ease-out, box-shadow 0.2s ease;
}
[data-magnet]:hover {
  transform: translate(var(--tx, 0px), var(--ty, 0px));
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.5);
}

/* ---- Band ticker → infinite marquee ---- */
.ticker {
  display: flex; overflow: hidden; margin: 14px 0 36px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track {
  display: flex; gap: 16px; width: max-content; padding-right: 16px;
  animation: marquee 48s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker-card { flex: 0 0 250px; }
.ticker-card:hover { transform: translateY(-4px) scale(1.03); border-color: rgba(255, 255, 255, 0.35); }

/* ---- Modal 3D pop ---- */
.modal-overlay { perspective: 1200px; }
.modal { animation: modalPop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(34px) rotateX(7deg) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ---- Wizard polish ---- */
.wizard-card { animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.opt:hover { transform: translateY(-2px) scale(1.012); box-shadow: 0 8px 22px rgba(14, 23, 48, 0.07); }
.opt:active { transform: scale(0.985); }
.opt.selected .opt-check { animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes checkPop { 0% { transform: scale(0.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* ---- Responsive + reduced motion ---- */
@media (max-width: 920px) {
  .spy-link { display: none; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ticker { overflow-x: auto; }
  .ticker-track { animation: none; }
}

/* =========================================================================
   AI BRAND + DYNAMIC BACKGROUND LAYER
   ========================================================================= */

/* ---- Neural mesh canvas + scroll-reactive orbs (behind everything) ---- */
html { background: var(--bg); }
body { background: transparent; }
#bg-neural {
  position: fixed; top: 0; left: 0; z-index: -1;
  pointer-events: none;
}
.bg-orb {
  position: fixed; z-index: -1; pointer-events: none;
  border-radius: 50%; filter: blur(64px);
}
.orb-1 {
  width: 56vmax; height: 56vmax; top: -26vmax; right: -18vmax;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.13), transparent 62%);
  transform: translate3d(0, calc(var(--scrollp, 0) * 34vh), 0) rotate(calc(var(--scrollp, 0) * 50deg));
}
.orb-2 {
  width: 48vmax; height: 48vmax; bottom: -24vmax; left: -16vmax;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.11), transparent 62%);
  transform: translate3d(0, calc(var(--scrollp, 0) * -28vh), 0) rotate(calc(var(--scrollp, 0) * -35deg));
}

/* The hero paints its own gradients; let the mesh show through instead. */
.hero { background: transparent; }

/* ---- Neural "circuit brain" logo ---- */
.logo-svg { display: block; flex-shrink: 0; }
.logo-edges {
  stroke-dasharray: 5 9;
  animation: synapse 8s linear infinite;
  opacity: 0.85;
}
.brand:hover .logo-edges { animation-duration: 2s; }
@keyframes synapse { to { stroke-dashoffset: -140; } }
.logo-nodes circle { animation: nodeGlow 3.4s ease-in-out infinite; }
.logo-nodes circle:nth-child(odd) { animation-delay: 1.2s; }
.logo-nodes circle:nth-child(3n) { animation-delay: 2.3s; }
@keyframes nodeGlow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.brand-name span {
  background: var(--grad); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}
.footer-brand .logo-sm { display: inline-block; vertical-align: -7px; margin-right: 4px; }

/* Hero copy drifts and fades on scroll (driven by fx.js) */
.hero-copy, .hero-panel { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  .bg-orb { transform: none; }
  .logo-edges, .logo-nodes circle { animation: none; }
}

/* Logo refinement: solid base outline + travelling signal pulse on top */
.logo-base { opacity: 0.32; }
.logo-edges { stroke-dasharray: 7 21; animation-duration: 3.6s; }
