/* =====================================================================
   KtownBTC — shared site styles
   Loaded after each page's own <style> block, so rules here win.
   Brand: black, white/cream, gold. Fonts: Lora (serif) + Source Sans 3.
   ===================================================================== */

:root {
  --bg: #0B0B0C; --bg2: #141416; --bg3: #1F1F22; --paper: #17171A;
  --ink: #F0EAD8; --ink2: #C9C2B0; --ink3: #8C8573;
  --gold: #C9A227; --gold2: #E0B93D; --gold-lt: #241F0E;
  --orange: #C9A227; --orange2: #E0B93D; --orange-lt: #241F0E; /* legacy names = gold */
  --on-gold: #0B0B0C;
  --root: #1C130A; --trunk: #2A1D10;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, sans-serif;
}

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--on-gold); padding: .6rem 1rem; z-index: 1000; font-weight: 700; }
.skip-link:focus { left: 1rem; top: .5rem; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold2); outline-offset: 2px;
}

/* ── HEADER / NAV ─────────────────────────────────────────────────── */
nav.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,11,12,0.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bg3);
  padding: 0 1.5rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  animation: none;
}
.site-nav .nav-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.site-nav .nav-logo img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.site-nav .nav-logo-text { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -.01em; }
.site-nav .nav-logo-text span { color: var(--gold); }

.site-nav .nav-links { display: flex; gap: 1.6rem; list-style: none; align-items: center; margin: 0; padding: 0; }
.site-nav .nav-links li a {
  display: inline-block; font-family: var(--sans); font-size: .88rem; font-weight: 600;
  color: var(--ink2); text-decoration: none; letter-spacing: .02em; padding: .3rem 0;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.site-nav .nav-links li a:hover { color: var(--gold2); }
.site-nav .nav-links li a.active { color: var(--gold2); border-bottom-color: var(--gold); }

.site-nav .nav-toggle {
  display: none; background: transparent; border: 1px solid var(--bg3); color: var(--ink);
  border-radius: 8px; padding: .45rem .8rem; font-family: var(--sans); font-size: .85rem; font-weight: 600; cursor: pointer;
}
.site-nav .nav-toggle .bars { display: inline-block; width: 16px; height: 2px; background: currentColor; position: relative; vertical-align: middle; margin-right: .45rem; }
.site-nav .nav-toggle .bars::before, .site-nav .nav-toggle .bars::after { content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; }
.site-nav .nav-toggle .bars::before { top: -5px; } .site-nav .nav-toggle .bars::after { top: 5px; }

@media (max-width: 900px) {
  .js .site-nav .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0E0E10; border-bottom: 1px solid var(--bg3); padding: .5rem 0 1rem;
  }
  .js .site-nav.open .nav-links { display: flex; }
  .js .site-nav .nav-links li a { display: block; padding: .85rem 1.5rem; font-size: 1rem; border-bottom: none; }
  .js .site-nav .nav-links li a.active { background: var(--gold-lt); }
  /* No-JS fallback: links wrap under the logo rather than disappearing */
  html:not(.js) nav.site-nav { height: auto; flex-wrap: wrap; padding: .6rem 1rem; }
  html:not(.js) .site-nav .nav-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; width: 100%; }
}

/* ── BUTTON CONTRAST (dark text on gold everywhere) ───────────────── */
.btn-primary, .nav-cta, .cta-btn:not(.green), .grad-btn, .contact-btn, .submit-btn,
.lesson-num-badge, .phase-dot:not(.future), .lesson-card:hover .lc-num {
  color: var(--on-gold) !important;
}
.btn-primary:hover, .cta-btn:not(.green):hover, .grad-btn:hover, .contact-btn:hover { box-shadow: 0 6px 20px rgba(201,162,39,.25) !important; }
.lesson-nav-card:hover { box-shadow: 0 4px 18px rgba(201,162,39,.12) !important; }
.branch-pill, .branch-card { color: var(--on-gold) !important; }
.branch-pill .branch-subs, .branch-card .branch-subs { opacity: .85; }
.download-btn, .cta-btn.green { color: #fff; }

.btn { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: .92rem; padding: .8rem 1.7rem; border-radius: 100px; text-decoration: none; transition: all .2s; letter-spacing: .01em; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--bg3); }
.btn-ghost:hover { border-color: var(--ink2); background: var(--bg2); }

/* ── SHARED CONTENT COMPONENTS (new pages) ────────────────────────── */
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.page-hero { padding: 4rem 0 2.5rem; }
.eyebrow { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; }
.page-title { font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 700; line-height: 1.15; color: var(--ink); margin-bottom: 1rem; letter-spacing: -.01em; }
.lead { font-size: 1.08rem; color: var(--ink2); line-height: 1.8; font-weight: 300; max-width: 660px; }
.block { padding: 3rem 0; }
.block-alt { background: var(--bg2); }
.h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; color: var(--ink); line-height: 1.2; margin-bottom: .9rem; }
.h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-bottom: .4rem; line-height: 1.3; }
.prose p, .prose li { color: var(--ink2); line-height: 1.85; font-size: 1rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--ink); }
.prose a, .text-link { color: var(--gold2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose h2 { font-family: var(--serif); font-size: 1.45rem; color: var(--ink); margin: 2.2rem 0 .8rem; line-height: 1.25; }
.prose h3 { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin: 1.6rem 0 .5rem; }

.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }

.card { background: var(--paper); border: 1px solid var(--bg3); border-radius: 12px; padding: 1.4rem 1.5rem; }
a.card { display: block; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
a.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card .num { font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .45rem; }
.card p { font-size: .9rem; color: var(--ink2); line-height: 1.65; }
.card .more { display: inline-block; margin-top: .8rem; font-size: .82rem; font-weight: 700; color: var(--gold2); }

.notice { background: var(--gold-lt); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: 1.1rem 1.4rem; margin: 1.5rem 0; }
.notice p { font-size: .92rem; color: var(--ink); line-height: 1.7; margin: 0; }
.notice p + p { margin-top: .6rem; }
.notice strong { color: var(--gold2); }
.muted-note { font-size: .82rem; color: var(--ink3); font-style: italic; line-height: 1.6; }

/* Provider cards */
.provider { background: var(--paper); border: 1px solid var(--bg3); border-radius: 14px; padding: 1.8rem; margin-bottom: 1.5rem; }
.provider-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.provider-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.provider-type { font-size: .82rem; color: var(--ink3); margin-top: .2rem; }
.status { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .32rem .8rem; border-radius: 100px; white-space: nowrap; border: 1px solid; }
.status-evaluating { color: var(--ink2); border-color: var(--ink3); background: transparent; }
.status-referral { color: var(--gold2); border-color: var(--gold); background: var(--gold-lt); }
.status-partner { color: var(--on-gold); border-color: var(--gold); background: var(--gold); }
.status-reference { color: #9FB6CC; border-color: #4A5A6A; background: transparent; }
.provider-intro { color: var(--ink2); line-height: 1.8; margin-bottom: 1.2rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem 1.6rem; margin-bottom: 1.2rem; }
.facts h4 { font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .4rem; }
.facts ul { list-style: none; margin: 0; padding: 0; }
.facts li { font-size: .9rem; color: var(--ink2); line-height: 1.55; padding-left: 1.1rem; position: relative; margin-bottom: .35rem; }
.facts li::before { content: '–'; position: absolute; left: 0; color: var(--ink3); }
.facts p { font-size: .9rem; color: var(--ink2); line-height: 1.6; }
.provider-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--bg3); padding-top: 1rem; }
.provider-foot .disclose { font-size: .8rem; color: var(--ink3); font-style: italic; flex: 1; min-width: 220px; }
.ext::after { content: ' ↗'; }

/* Status legend */
.legend { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; font-size: .82rem; color: var(--ink3); margin: 1rem 0 0; }

/* Learn strip on lessons index */
.learn-strip { max-width: 900px; margin: 0 auto; padding: 0 2rem 1rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; font-size: .88rem; }
.learn-strip a { color: var(--gold2); text-decoration: none; font-weight: 600; }
.learn-strip a:hover { text-decoration: underline; }
.learn-strip span { color: var(--ink3); }

/* Lesson education note + next-steps sidebar card */
.edu-note { font-size: .82rem; color: var(--ink3); font-style: italic; line-height: 1.6; margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--bg3); }
.edu-note a { color: var(--ink2); }
.next-steps-card { background: var(--paper); border: 1px solid var(--gold); border-radius: 12px; padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.next-steps-card .sidebar-label { color: var(--gold); }
.next-steps-card p { font-size: .8rem; color: var(--ink2); line-height: 1.6; margin-bottom: .9rem; }
.next-steps-card .small { font-size: .72rem; color: var(--ink3); font-style: italic; margin: .8rem 0 0; }
.next-steps-card a.grad-btn { display: block; }

/* Curriculum status badges */
.status-badge { display: inline-block; font-family: var(--sans); font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 100px; margin-bottom: .8rem; }
.status-now { background: var(--gold); color: var(--on-gold); }
.status-dev { background: transparent; color: var(--ink2); border: 1px solid var(--ink3); }
.tree-legend { text-align: center; font-size: .8rem; color: var(--ink2); margin: 1.2rem auto 0; max-width: 620px; line-height: 1.7; }
.tree-legend a { color: var(--gold2); }

/* ── FOOTER ───────────────────────────────────────────────────────── */
footer.site-footer { background: var(--root); padding: 3rem 1.5rem 2rem; text-align: center; border-top: 1px solid rgba(255,255,255,.06); margin-top: 0; position: relative; z-index: 1; }
.site-footer .footer-logo { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: rgba(255,255,255,.85); margin-bottom: .35rem; }
.site-footer .footer-logo span { color: var(--gold2); }
.site-footer .footer-motto { font-size: .78rem; color: rgba(255,255,255,.5); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.4rem; }
.site-footer .footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1.6rem; margin: .6rem 0; list-style: none; padding: 0; }
.site-footer .footer-links a, .site-footer .linkish { font-size: .82rem; color: rgba(255,255,255,.62); text-decoration: none; background: none; border: none; cursor: pointer; font-family: var(--sans); padding: 0; }
.site-footer .footer-links a:hover, .site-footer .linkish:hover { color: var(--gold2); }
.site-footer .footer-links.secondary a, .site-footer .footer-links.secondary .linkish { font-size: .76rem; color: rgba(255,255,255,.45); }
.site-footer .footer-disclose { max-width: 640px; margin: 1.4rem auto .8rem; font-size: .74rem; color: rgba(255,255,255,.42); line-height: 1.6; }
.site-footer .footer-disclose a { color: rgba(255,255,255,.6); }
.site-footer .footer-tagline { font-size: .72rem; color: rgba(255,255,255,.35); letter-spacing: .1em; font-style: italic; }

/* ── CONSENT BANNER ───────────────────────────────────────────────── */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 500; max-width: 560px; margin: 0 auto; background: #121214; border: 1px solid var(--gold); border-radius: 14px; padding: 1.2rem 1.3rem; box-shadow: 0 10px 40px rgba(0,0,0,.5); font-family: var(--sans); }
.consent p { font-size: .86rem; color: var(--ink2); line-height: 1.6; margin: 0 0 .9rem; }
.consent a { color: var(--gold2); }
.consent .row { display: flex; gap: .6rem; flex-wrap: wrap; }
.consent button { font-family: var(--sans); font-weight: 700; font-size: .85rem; padding: .55rem 1.2rem; border-radius: 100px; cursor: pointer; border: 2px solid var(--gold); }
.consent .accept { background: var(--gold); color: var(--on-gold); }
.consent .decline { background: transparent; color: var(--ink); border-color: var(--bg3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Lessons on phones: read the lesson first, sidebar after */
@media (max-width: 900px) {
  .lesson-sidebar { order: 1 !important; position: static !important; }
}

/* Book-a-call buttons stay hidden until js/site.js has a booking link */
[data-booking][hidden] { display: none !important; }
