/*
 * camp.css — ADHD Field Camp for Adults
 * Shared design system. All pages import this.
 * Page-specific layout stays in each file's <style> block.
 *
 * ADHD DESIGN PRINCIPLES ENCODED HERE:
 *
 * 1. Lexend body font — engineered to reduce visual stress for readers with
 *    reading difficulties. ADHD and reading difficulties co-occur in ~45% of
 *    cases. Wider letter spacing, optimized character shapes reduce fatigue.
 *
 * 2. Barlow Condensed headlines — high-weight condensed type lets the brain
 *    categorize sections at a glance without reading every word. Reduces the
 *    eye travel and scanning time required to orient on a page.
 *
 * 3. Traffic-light color semantics — consistent meaning across all pages.
 *    Pink = stop/urgent. Yellow = active/now/CTA. Teal = go/done/success.
 *    After 2–3 interactions, readers stop reading color as decoration and
 *    process it as signal. Per-decision cognitive load drops measurably.
 *
 * 4. 5px accent bars on cards — color-coded categorization before any reading
 *    happens. ADHD brains scan for category before committing to body text.
 *
 * 5. Warm off-white (#F9F6E8) for light surfaces — reduces glare compared to
 *    pure white. Relevant for sensory-sensitive users and extended reading.
 *
 * 6. clamp() fluid scaling everywhere — consistent rhythm across screen sizes
 *    without discrete jumps. Users who switch between laptop and tablet keep
 *    the same visual structure.
 *
 * 7. Yellow (#F5E642) is NEVER a background color. Extended yellow causes eye
 *    fatigue and hyperactivation. It is a CTA and accent color only.
 */

/* ── FONTS ───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Lexend:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  /* Brand palette */
  --yellow: #F5E642;
  --pink:   #E8365D;
  --teal:   #3DBFA8;
  --black:  #1A1A1A;

  /* Dark surfaces */
  --surface-dark: #1A1A1A;
  --surface-mid:  #252525;
  --smid:         #222222;
  --s2:           #1E1E1E;
  --s3:           #2A2A2A;

  /* Light surfaces (used sparingly) */
  --surface-light: #F9F6E8;
  --surface-card:  #FFFFFF;

  /* Section accent colors */
  --bookclub: #E67E22;
  --patreon:  #F96854;
  --purple:   #9B59B6;
  --orange:   #F39C12;
  --blue:     #3498DB;

  /* Text */
  --slight: #F9F6E8;
  --tsec:   #5A5A5A;
  --tmuted: #888888;

  /* Discord explorer palette */
  --dc-bg:     #2B2D31;
  --dc-cat:    #949BA4;
  --dc-ch:     #949BA4;
  --dc-active: #ffffff;

  /* Type families */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Lexend', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Fluid spacing */
  --gap-sm: clamp(12px, 1.5vw, 20px);
  --gap-md: clamp(20px, 3vh,  36px);
  --gap-lg: clamp(32px, 5vh,  64px);
  --pad-x:  clamp(28px, 5vw,  72px);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE ────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--surface-dark);
  color: var(--slight);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */

/* Large display title — hero use */
.ct {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1;
  color: var(--slight);
  margin-bottom: 14px;
}

/* Medium display title — section use */
.ct-md {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.05;
  color: var(--slight);
  margin-bottom: 10px;
}

/* Italic subtitle / tagline */
.cs {
  font-size: clamp(16px, 1.8vw, 22px);
  color: var(--tmuted);
  font-style: italic;
  margin-bottom: var(--gap-md);
  line-height: 1.5;
}

/* Body prose */
.cb {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.75;
  color: var(--tmuted);
}
.cb p                { margin-bottom: clamp(14px, 2vh, 20px); }
.cb p:last-child     { margin-bottom: 0; }
.cb strong           { color: var(--slight); font-weight: 600; }
.cb ul               { margin: 10px 0 18px 22px; }
.cb li               { margin-bottom: 8px; }

/* Small caps label */
.clb {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tmuted);
}

/* Column label (above commands list or chat) */
.collbl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(13px, 1.3vw, 17px);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── LAYOUT ──────────────────────────────────────────────── */

/* Horizontal rule */
.sdiv {
  height: 1px;
  background: #2e2e2e;
  margin: var(--gap-md) 0;
}

/* Colored accent bar — top of content panels */
.ca {
  height: 5px;
  width: 100%;
  margin-bottom: var(--gap-sm);
  border-radius: 2px;
}

/* Header row with optional right-aligned pill */
.chrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

/* 3-column grid */
.g3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
}

/* 2-column grid */
.g2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
}

/* Two-column prose layout */
.bcols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  margin-bottom: var(--gap-md);
}

/* ── CARDS ───────────────────────────────────────────────── */
/*
 * Card accent bars: the 5px top bar provides instant visual categorization
 * before any reading. ADHD brains scan for category before body text.
 * This reduces time-to-understanding and lets readers skip sections that
 * aren't relevant without feeling like they missed something.
 */

.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.card-dark {
  background: var(--smid);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #333;
}

/* Clickable card with hover lift */
.camp-card {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  display: block;
}
.camp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

.ct2 { height: 7px; width: 100%; }                           /* Thick card accent */
.cb2 { padding: clamp(14px, 1.6vw, 22px); }                 /* Card body padding */

.cl2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(14px, 1.4vw, 18px);
  margin-bottom: 8px;
}

.cx {
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.6;
}

/* ── NEED / CTA CARDS ────────────────────────────────────── */
.need-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
  margin-top: var(--gap-md);
}

.need-card {
  background: var(--smid);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  text-decoration: none;
  display: block;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.need-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  border-color: #555;
}

.nc-top  { height: 5px; width: 100%; }
.nc-body { padding: clamp(16px, 2vw, 24px); }

.nc-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(17px, 1.7vw, 21px);
  color: var(--slight);
  margin-bottom: 8px;
}

.nc-desc {
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--tmuted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.nc-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── COMMANDS ────────────────────────────────────────────── */
.cmd {
  background: var(--smid);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.cn {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.cd {
  font-size: clamp(11px, 1vw, 14px);
  color: var(--tmuted);
}

/* ── CHAT BUBBLES ────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; gap: 8px; }

.bbl {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.5;
  max-width: 92%;
  word-wrap: break-word;
}

.bbot { align-self: flex-start; }
.busr { align-self: flex-end; background: var(--smid) !important; color: var(--slight) !important; }
.bmod { align-self: flex-start; background: #2a2030 !important; color: #b59ecf !important; }

/* ── CHANNEL TAGS ────────────────────────────────────────── */
.chp {
  background: var(--s3);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.1vw, 14px);
  color: var(--tmuted);
}

.chl { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }

/* ── TABLES ──────────────────────────────────────────────── */
.ctbl { width: 100%; border-collapse: collapse; font-size: clamp(14px, 1.3vw, 17px); }

.ctbl th {
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(12px, 1.1vw, 15px);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--yellow);
  background: var(--smid);
}

.ctbl td { padding: 14px 16px; }
.ctbl tr:nth-child(odd)  td { background: var(--smid); }
.ctbl tr:nth-child(even) td { background: var(--s2); }

.cnum { color: var(--teal);  font-weight: 700; text-align: right; }
.clab { color: var(--slight); font-weight: 600; }
.cdet { color: var(--tmuted); }

/* ── INFO / NOTIFICATION ITEMS ───────────────────────────── */
.ni  { display: flex; flex-direction: column; gap: 10px; }
.nitem { background: var(--smid); border-radius: 10px; overflow: hidden; display: flex; }
.nacc  { width: 8px; flex-shrink: 0; }
.nbdy  { padding: clamp(14px, 1.8vh, 20px) clamp(16px, 2vw, 24px); }

.ntit {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--slight);
  margin-bottom: 5px;
}

.ntxt { font-size: clamp(13px, 1.2vw, 16px); color: var(--tmuted); line-height: 1.6; }

/* ── CHANNEL PREVIEW ─────────────────────────────────────── */
.ch-preview {
  background: var(--smid);
  border-radius: 12px;
  padding: clamp(16px, 2vh, 24px);
  margin-top: clamp(20px, 3vh, 32px);
}

.ch-preview-lbl {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tmuted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ch-preview-lbl::after { content: ''; display: block; flex: 1; height: 1px; background: #333; }

/* ── BUTTONS ─────────────────────────────────────────────── */
/*
 * Yellow primary button: maximum affordance for the primary CTA.
 * Never use yellow as a background on large surfaces — but a button
 * is bounded, purposeful, and benefits from the brand's most distinct color.
 * The hover shadow uses yellow at 30% opacity for contextual glow.
 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #ffe600;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,230,66,.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--slight);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-secondary:hover {
  border-color: #888;
  background: rgba(255,255,255,.05);
}

/* ── PILLS ───────────────────────────────────────────────── */
.pill-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid #3a3a3a;
  color: var(--tmuted);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: var(--font-body);
  text-decoration: none;
}
.pill-nav:hover {
  background: rgba(255,255,255,.1);
  color: var(--slight);
  border-color: #666;
}

/* ── PREV/NEXT PAGE NAV ──────────────────────────────────── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  margin-top: clamp(36px, 6vh, 60px);
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid #2a2a2a;
}
.pn-btn {
  background: var(--smid);
  border: 1px solid #333;
  border-radius: 10px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--tmuted);
  flex: 1;
  max-width: 300px;
  text-align: left;
  text-decoration: none;
}
.pn-btn:hover   { background: #2d2d2d; border-color: #555; color: var(--slight); }
.pn-next        { flex-direction: row-reverse; text-align: right; margin-left: auto; }
.pn-spacer      { flex: 1; max-width: 300px; }
.pn-arrow       { font-size: 20px; flex-shrink: 0; line-height: 1; transition: transform .15s; color: #555; }
.pn-btn:hover .pn-arrow  { color: var(--teal); }
.pn-prev:hover .pn-arrow { transform: translateX(-3px); }
.pn-next:hover .pn-arrow { transform: translateX(3px); }
.pn-label  { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pn-dir    { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-family: var(--font-display); font-weight: 700; opacity: .5; line-height: 1; }
.pn-name   { font-size: clamp(13px, 1.2vw, 15px); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }

/* ── RATIONALE PILL (explorer) ───────────────────────────── */
.pill-rat {
  position: relative;
  background: rgba(61,191,168,.12);
  border: 1px solid rgba(61,191,168,.3);
  color: var(--teal);
  border-radius: 20px;
  padding: 5px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  font-family: var(--font-body);
  flex-shrink: 0;
}
.pill-rat:hover { background: rgba(61,191,168,.22); }
.pill-rat::after {
  content: "Click here to dive deeper";
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #bbb;
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  padding: 5px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s .1s;
  border: 1px solid #333;
  z-index: 500;
}
.pill-rat:hover::after { opacity: 1; }

/* ── RATIONALE MODAL ─────────────────────────────────────── */
#rat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1000;
  backdrop-filter: blur(3px);
}
#rat-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  z-index: 1001;
  background: #1a1b1e;
  border: 1px solid #3a3b3e;
  border-radius: 14px;
  padding: clamp(24px,3.5vh,40px) clamp(24px,3vw,40px);
  width: min(680px, calc(100vw - 32px));
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
#rat-modal::-webkit-scrollbar { width: 4px; }
#rat-modal::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

#rat-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
#rat-modal-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px,2.4vw,28px);
  color: var(--slight);
  line-height: 1.1;
}
#rat-close {
  background: none;
  border: 1px solid #333;
  color: var(--tmuted);
  border-radius: 50%;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
  line-height: 1;
}
#rat-close:hover { border-color: #666; color: var(--slight); }

#rat-accent { height: 3px; border-radius: 2px; margin-bottom: 20px; }

#rat-body { font-size: clamp(14px,1.35vw,17px); line-height: 1.8; color: var(--tmuted); }
#rat-body p                { margin-bottom: 14px; }
#rat-body p:last-child     { margin-bottom: 0; }
#rat-body strong           { color: var(--slight); }
#rat-body ul               { margin: 8px 0 14px 20px; }
#rat-body li               { margin-bottom: 6px; }

@keyframes rat-in {
  from { opacity:0; transform: translate(-50%,-47%); }
  to   { opacity:1; transform: translate(-50%,-50%); }
}
#rat-modal.show  { display:block; animation: rat-in .2s ease; }
#rat-overlay.show { display:block; }

/* ── BOOK COVER FLOAT ────────────────────────────────────── */
.book-cover-float {
  float: right;
  width: clamp(130px, 16vw, 185px);
  margin: 0 0 20px 32px;
}
.book-cover-float img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  display: block;
}
.overview-clearfix::after { content:''; display:table; clear:both; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .bcols       { grid-template-columns: 1fr; }
  .g3          { grid-template-columns: 1fr 1fr; }
  .g2          { grid-template-columns: 1fr; }
  .need-grid   { grid-template-columns: repeat(2, 1fr); }
  .book-cover-float {
    float: none;
    width: clamp(110px, 40vw, 150px);
    margin: 0 auto 20px;
    display: block;
  }
}
@media (max-width: 480px) {
  .g3        { grid-template-columns: 1fr; }
  .need-grid { grid-template-columns: 1fr; }
}
