/* =====================================================
   ONLYFLOW — Shared Stylesheet
   Used across all pages. Edit here to change globally.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #000003;
  --bg-elev: #02060d;
  --bg-card: #030c1a;
  --border: rgba(148, 184, 238, 0.08);
  --border-strong: rgba(148, 184, 238, 0.16);
  --text: #e8eef9;
  --text-muted: #8ea4c7;
  --text-dim: #5d749a;
  --accent: #4a9eff;
  --accent-glow: rgba(74, 158, 255, 0.10);
  --premium: #5ed4d4;
  --premium-soft: rgba(94, 212, 212, 0.08);
  --premium-strong: rgba(94, 212, 212, 0.22);
  --green: #22c5a0;
  --red: #e85d5d;
  --grid-line: rgba(74, 158, 255, 0.038);
}
[data-theme="light"] {
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(10, 22, 40, 0.08);
  --border-strong: rgba(10, 22, 40, 0.16);
  --text: #0a1628;
  --text-muted: #4a5a73;
  --text-dim: #8095b0;
  --accent: #1e6dd1;
  --accent-glow: rgba(30, 109, 209, 0.08);
  --premium: #138a8a;
  --premium-soft: rgba(19, 138, 138, 0.08);
  --premium-strong: rgba(19, 138, 138, 0.20);
  --green: #0f8c6f;
  --grid-line: rgba(10, 22, 40, 0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: inherit; }

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at var(--cursor-x, 50%) var(--cursor-y, 40%), black 30%, transparent 75%);
}
.cursor-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, var(--accent-glow, rgba(59,130,246,0.07)) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  will-change: left, top;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ============ NAV ============ */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.logo-wordmark {
  display: none;
}
.logo-wordmark em {
  font-style: italic;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .logo-wordmark {
  background: linear-gradient(120deg, #5b4fcf, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: none;
}

.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 14px;
  border-radius: 100px;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--text); background: var(--accent-glow); }
.nav-links a.active { color: var(--text); background: var(--accent-glow); }
.nav-links a.premium {
  color: #fff;
  background: #a855f7;
  border: 1px solid #a855f7;
  margin-left: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav-links a.premium:hover, .nav-links a.premium.active {
  background: #c084fc;
  border-color: #c084fc;
  color: #fff;
}
[data-theme="light"] .nav-links a.premium {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
[data-theme="light"] .nav-links a.premium:hover,
[data-theme="light"] .nav-links a.premium.active {
  background: #1558a8;
  border-color: #1558a8;
  color: #fff;
}

.icon-link {
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}
.icon-link:hover { color: var(--text); background: var(--accent-glow); }
.icon-link svg { width: 18px; height: 18px; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 100px;
  cursor: pointer;
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ============ TYPOGRAPHY ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-glow);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow.premium-eyebrow {
  color: var(--premium);
  background: var(--premium-soft);
}
h1.display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(52px, 7.5vw, 90px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}
h1.display em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}
.section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}
h2.section-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 760px;
}
h2.section-title em { font-style: normal; font-weight: 900; color: var(--accent); }

/* ============ BUTTONS ============ */
.btn {
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-premium {
  background: var(--premium);
  color: #062424;
}
.btn-premium:hover { transform: translateY(-1px); }

/* ============ SECTIONS ============ */
.section { padding: 100px 0; position: relative; }
.section-sm { padding: 60px 0; }
.section-head {
  margin-bottom: 60px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.section-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  transition: all 0.2s;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); }

/* ============ PAGE HERO (for inner pages) ============ */
.page-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}
.page-hero .eyebrow { margin-bottom: 24px; }
.page-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  max-width: 880px;
}
.page-hero h1 em { font-style: normal; font-weight: 900; color: var(--accent); }
.page-hero .lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.65;
}

/* ============ CARDS ============ */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ============ FOOTER ============ */
footer.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.foot-brand .logo { font-size: 28px; margin-bottom: 16px; }
.foot-brand .logo .logo-img { width: 44px; height: 44px; }
.foot-brand p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.foot-socials { display: flex; gap: 8px; }
.foot-socials a {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.foot-socials a:hover { color: var(--accent); border-color: var(--accent); }
.foot-socials svg { width: 16px; height: 16px; }
.foot-col h5 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 500;
}
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: 10px; }
.foot-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* ============ ANIMATIONS ============ */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes strikeIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes iridescent {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.fade-up { animation: fadeUp 0.8s ease both; }
.fade-up-1 { animation: fadeUp 0.8s ease 0.1s both; }
.fade-up-2 { animation: fadeUp 0.8s ease 0.2s both; }
.fade-up-3 { animation: fadeUp 0.8s ease 0.3s both; }
.fade-up-4 { animation: fadeUp 0.8s ease 0.4s both; }

/* ============ SCROLL REVEAL ============ */
body.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
body.js-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  body.js-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ RESPONSIVE ============ */
/* ============ JUMP PILLS (shared — education + psychology) ============ */
.jump-pill {
  padding: 7px 18px;
  border-radius: 100px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.jump-pill:hover { color: var(--text); border-color: var(--border-strong); }
.jump-pill.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

/* ============ HAMBURGER MENU ============ */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.menu-btn:hover { background: var(--accent-glow); }
.menu-btn span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none;
  position: fixed;
  top: 61px; left: 0; right: 0;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 15px 24px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text); background: var(--accent-glow); }
.mobile-menu a.m-premium { color: #a78bfa; }
.mobile-menu a.m-premium:hover { background: rgba(167,139,250,0.08); color: #c084fc; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .foot-grid { grid-template-columns: 1fr; gap: 40px; }
  .container, .container-narrow { padding: 0 20px; }
  .section { padding: 70px 0; }
  .page-hero { padding: 50px 0 40px; }
  .section-jump-outer { top: 61px; }
  .section-jump { gap: 6px; padding: 8px 16px; }
  .jump-pill { padding: 5px 13px; font-size: 12px; }
}

/* ============ SEARCH BUTTON ============ */
.search-btn {
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 100px;
  background: transparent;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.search-btn:hover { color: var(--text); background: var(--accent-glow); }
.search-btn svg { width: 18px; height: 18px; }

/* ============ SEARCH OVERLAY ============ */
.search-overlay {
  position: fixed; inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-modal {
  width: 100%; max-width: 640px;
  margin: 0 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.search-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none; border: none; outline: none;
  font-size: 16px; color: var(--text);
  font-family: 'Inter', sans-serif;
}
.search-input::placeholder { color: var(--text-dim); }
.search-esc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-dim);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 3px 7px;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.search-results { max-height: 420px; overflow-y: auto; }
.sr-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 14px 20px;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  cursor: pointer;
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover, .sr-item.focused { background: var(--bg-card); }
.sr-badge {
  grid-row: 1 / 3;
  align-self: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 4px;
  border: 1px solid;
  white-space: nowrap; height: fit-content;
}
.sr-title { font-size: 14px; font-weight: 600; color: var(--text); }
.sr-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 2px; }
.sr-empty { padding: 32px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.search-hint {
  padding: 10px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
  text-align: right;
}
