/*
 * BrainSync Frequency Library — freq.css
 * Shared styles for /frequencies/ hub and all individual frequency pages.
 * Brand tokens mirror web/style.css, web/player/player.css, web/blog/blog.css.
 * Self-contained: no external deps, no build step.
 *
 * Used by:
 *   web/frequencies/index.html        → <link rel="stylesheet" href="freq.css">
 *   web/frequencies/<slug>/index.html → <link rel="stylesheet" href="../freq.css">
 */

/* ─── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:      #070912;
  --bg2:     #0d1124;
  --card:    #121734;
  --line:    #222a52;
  --text:    #eef1ff;
  --muted:   #a3acd6;
  --accent:  #7c9cff;   /* blue   */
  --accent2: #5ad1c5;   /* teal   */
  --focus:   #c79bff;   /* violet */
  --measure: 68ch;
}

/* ─── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(1200px 800px at 50% -10%, #141a3a 0%, var(--bg) 55%) no-repeat, var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.wrap       { max-width: 1080px; margin: 0 auto; padding: 0 20px; width: 100%; }
.wrap-prose { max-width: var(--measure); margin: 0 auto; padding: 0 20px; width: 100%; }
main { flex: 1; }

/* ─── Nav ───────────────────────────────────────────────────────────────────── */
.freq-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.back-link:hover { color: var(--text); text-decoration: none; }
.back-link svg { width: 16px; height: 16px; }

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 14px var(--accent);
}

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(124,156,255,.08);
  border: 1px solid rgba(124,156,255,.2);
  border-radius: 9px;
  padding: 6px 12px;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.nav-cta:hover {
  background: rgba(124,156,255,.16);
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}
@media (max-width: 480px) { .nav-cta { display: none; } }

/* ─── Breadcrumb ─────────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 0;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: #3a4272; }

/* ─── Article header ─────────────────────────────────────────────────────────── */
.article-header {
  margin: 20px 0 32px;
}
.article-topic {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(124,156,255,.10);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.article-header h1 {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--muted);
}

/* ─── Prose body ─────────────────────────────────────────────────────────────── */
.prose {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.prose p { margin-bottom: 1.1em; }
.prose h2 {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  letter-spacing: -.2px;
  margin: 2em 0 .6em;
  color: var(--text);
}
.prose h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 1.6em 0 .5em;
  color: var(--text);
}
.prose ul, .prose ol {
  padding-left: 1.4em;
  margin-bottom: 1.1em;
}
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }

/* ─── Key-takeaways box ──────────────────────────────────────────────────────── */
.takeaways {
  background: linear-gradient(180deg, var(--card), #0e1330);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 1.4em 0 1.8em;
}
.takeaways h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.takeaways ul { padding-left: 1.2em; }
.takeaways li {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: .5em;
}
.takeaways li strong { color: var(--text); }
.takeaways li a { color: var(--accent); }

/* ─── Tone player widget ─────────────────────────────────────────────────────── */
.tone-widget {
  background: linear-gradient(180deg, var(--card), #0c1130);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 1.6em 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tone-widget-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--accent);
}
.tone-widget-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
/* Headphone hint — shown near binaural buttons */
.headphone-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(124,156,255,.06);
  border: 1px solid rgba(124,156,255,.14);
  border-radius: 9px;
  padding: 9px 13px;
}
.headphone-hint svg { width: 16px; height: 16px; flex: none; color: var(--accent); }

/* ─── Play-tone button ───────────────────────────────────────────────────────── */
.play-tone {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #06122b;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 13px 22px;
  cursor: pointer;
  transition: filter .15s, transform .12s;
  font-family: inherit;
  letter-spacing: .1px;
  width: 100%;
  justify-content: center;
}
.play-tone:hover  { filter: brightness(1.08); transform: translateY(-1px); }
.play-tone:active { transform: translateY(0); filter: brightness(.96); }
.play-tone:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.play-tone[aria-pressed="true"] {
  background: linear-gradient(120deg, #1e2a5e, #162d4a);
  color: var(--accent);
  border: 1px solid var(--accent);
}
.play-tone .tone-icon { font-size: 18px; line-height: 1; flex: none; }
.play-tone .tone-countdown {
  font-size: 12px;
  font-weight: 500;
  opacity: .75;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* ─── Disclaimer box ─────────────────────────────────────────────────────────── */
.disclaimer {
  background: rgba(163,172,214,.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 2em 0 1em;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.disclaimer strong { color: var(--text); }

/* ─── Mid-article CTA ────────────────────────────────────────────────────────── */
.mid-cta {
  background: linear-gradient(135deg, #16204e, #101533);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  margin: 2em 0;
  text-align: center;
}
.mid-cta h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}
.mid-cta p {
  font-size: 14px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 18px;
  line-height: 1.6;
}

/* ─── End-of-article CTA ─────────────────────────────────────────────────────── */
.end-cta {
  background: linear-gradient(135deg, #16204e, #101533);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 24px;
  margin: 2.4em 0 1em;
  text-align: center;
}
.end-cta h2 {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -.2px;
  margin-bottom: 10px;
}
.end-cta p {
  font-size: 15px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 22px;
  line-height: 1.6;
}

/* ─── Store badges (shared across mid-cta and end-cta) ───────────────────────── */
.cta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #000;
  border: 1px solid #2a2f55;
  border-radius: 13px;
  padding: 10px 16px;
  transition: transform .15s, border-color .15s;
  text-decoration: none;
  color: var(--text);
}
.store-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  text-decoration: none;
}
.store-badge svg { width: 24px; height: 24px; flex: none; }
.store-badge .b-sm { font-size: 10.5px; color: #c9cdf0; line-height: 1; display: block; }
.store-badge .b-lg { font-size: 16px; font-weight: 600; line-height: 1.2; display: block; }

/* ─── Related / sibling links ────────────────────────────────────────────────── */
.related-section {
  margin: 2.4em 0 1em;
}
.related-section h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  background: linear-gradient(180deg, var(--card), #0e1330);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, transform .12s;
  display: block;
}
.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.r-topic {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.related-card h3 {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

/* ─── Hub: frequency group sections ──────────────────────────────────────────── */
.freq-section {
  margin: 2em 0;
}
.freq-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.freq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.freq-card {
  background: linear-gradient(180deg, var(--card), #0e1330);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .15s, transform .12s;
}
.freq-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.freq-card .fc-hz {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.freq-card .fc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.freq-card .fc-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── Hub hero ───────────────────────────────────────────────────────────────── */
.freq-hero {
  text-align: center;
  padding: 40px 0 28px;
}
.freq-hero h1 {
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.freq-hero p {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  margin-top: auto;
  text-align: center;
}
.footer-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer-fine {
  font-size: 12.5px;
  color: #6b73a0;
  line-height: 1.7;
}
.footer-fine a { color: var(--muted); text-decoration: underline; }
.footer-disclaimer {
  font-size: 12px;
  color: #5a607c;
  max-width: 600px;
  margin: 10px auto 0;
  line-height: 1.6;
}
.footer-disclaimer strong { color: #7a80a0; }

/* ─── Sticky mobile CTA ──────────────────────────────────────────────────────── */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(8,10,22,.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  gap: 10px;
  z-index: 50;
}
.sticky-cta a {
  flex: 1;
  text-align: center;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #06122b;
  font-weight: 700;
  border-radius: 11px;
  padding: 12px;
  font-size: 14px;
  transition: filter .15s;
  text-decoration: none;
}
.sticky-cta a:hover { filter: brightness(1.08); text-decoration: none; }
@media (max-width: 640px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 66px; }
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .freq-hero { padding: 24px 0 16px; }
  .tone-widget { padding: 16px 16px; }
  .end-cta { padding: 24px 16px; }
}
