/* ============================================================
   Second Brain Workshop — dark + cyan teaching site (Harry Sanders)
   Self-contained, offline-safe.
   ============================================================ */

@import url('fonts.css'); /* self-hosted, offline-safe */

:root {
  /* Brand */
  --picton-blue: #3DB7E9;
  --bright-aqua: #01FFFF;
  --cyan:        #22D3EE;
  --aqua:        #19E3F0;
  --pale-violet: #ADBAFF;
  --sunny:       #FECF40;
  --deep-black:  #070708;
  --panel:       #0C0D11;
  --panel-2:     #111319;
  --rule:        #1C1F24;
  --white:       #FFFFFF;
  --grey:        #C7CBD1;
  --grey-dim:    #868D98;
  --blue-grad:   linear-gradient(135deg, #3DB7E9, #01FFFF);
  --violet-grad: linear-gradient(135deg, #ADBAFF, #19E3F0);
  /* Type */
  --font-head: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1140px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--grey);
  background: var(--deep-black);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--white); line-height: 1.08; margin: 0 0 .4em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
strong { color: var(--white); font-weight: 600; }

/* Subtle dot grid on the whole page (brand: dark only) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
}
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; position: relative; z-index: 1; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,7,8,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.nav-logo { height: 26px; width: auto; }
.nav-wordmark { font-family: var(--font-head); font-weight: 700; color: var(--white);
  font-size: 1.06rem; letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.nav-wordmark:hover { text-decoration: none; color: var(--white); }
.nav-links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: var(--grey); font-size: .82rem; font-weight: 500; padding: 7px 11px;
  border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.06); text-decoration: none; }
.nav-toggle { display: none; }

/* ── Buttons ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body);
  font-weight: 700; padding: 13px 24px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 0; font-size: .92rem; transition: transform .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue-grad); color: var(--deep-black); }
.btn-ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.35); }

/* ── Eyebrow ─────────────────────────────────────────── */
.eyebrow { display: inline-block; font-weight: 700; text-transform: uppercase;
  letter-spacing: .18em; font-size: .72rem; color: var(--cyan); margin-bottom: 14px; }
.eyebrow.violet { color: var(--pale-violet); }
.eyebrow.sunny  { color: var(--sunny); }

/* ── Hero ────────────────────────────────────────────── */
.hero { position: relative; padding: 96px 0 70px; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; top: -160px; right: -160px; width: 540px; height: 540px;
  border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(34,211,238,.22), transparent 62%);
  pointer-events: none;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); letter-spacing: -.02em; }
.hero .lede { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--grey); max-width: 720px; font-weight: 300; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-meta { margin-top: 30px; font-size: .82rem; color: var(--grey-dim); letter-spacing: .04em; }
.accent { color: var(--cyan); }
.accent-grad { background: var(--blue-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Sections ────────────────────────────────────────── */
.section { padding: 84px 0; position: relative; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.01em; }
.section-head .tagline { font-size: 1.12rem; color: var(--grey); margin: 0; }
.lead-num { font-family: var(--font-head); font-weight: 700; color: var(--rule);
  font-size: 1rem; letter-spacing: .3em; margin-bottom: 10px; }

/* ── Cards / grids ───────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px; position: relative;
}
.card.cyan { border-color: rgba(34,211,238,.4); }
.card .k { font-family: var(--font-head); font-weight: 700; color: var(--white); font-size: 1.08rem; margin-bottom: 6px; }
.card .d { font-size: .96rem; color: var(--grey); margin: 0; }
.card .num { font-family: var(--font-head); font-weight: 700; color: var(--cyan); font-size: 1.5rem; }

/* "How it works" ordered steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li { position: relative; padding: 18px 22px 18px 64px; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 12px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 16px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: .9rem;
  background: var(--blue-grad); color: var(--deep-black);
}
.steps li b { color: var(--white); font-weight: 600; display: block; margin-bottom: 2px; }
.steps li span { color: var(--grey); font-size: .95rem; }

/* Checklist (get started) */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 32px; color: var(--grey); }
.checklist li::before { content: "›"; position: absolute; left: 8px; top: -1px; color: var(--cyan); font-weight: 700; font-size: 1.1rem; }

/* Why-it-matters trio */
.why { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 8px; }
.why .card { border-left: 3px solid var(--cyan); }

/* Callout */
.callout { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px;
  background: linear-gradient(180deg, rgba(34,211,238,.07), rgba(34,211,238,.02));
  border: 1px solid rgba(34,211,238,.28); border-radius: 12px; padding: 18px 20px; }
.callout .ico { flex: 0 0 auto; font-size: 1.2rem; line-height: 1.4; }
.callout p { margin: 0; color: var(--grey); font-size: .96rem; }
.callout.privacy { border-color: rgba(254,207,64,.34); background: linear-gradient(180deg, rgba(254,207,64,.07), rgba(254,207,64,.02)); }

/* Repo / link chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600;
  color: var(--white); background: var(--panel-2); border: 1px solid var(--rule);
  border-radius: 999px; padding: 8px 16px; }
.chip:hover { border-color: var(--cyan); text-decoration: none; }
.chip svg { width: 15px; height: 15px; }

/* subhead inside a section block */
.subhead { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 700;
  color: var(--grey-dim); margin: 32px 0 14px; }

/* ── Stack-at-a-glance diagram wrap ─────────────────── */
.diagram-wrap { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 28px; overflow-x: auto; }
.diagram-wrap svg { display: block; width: 100%; height: auto; min-width: 560px; }
.diagram-cap { color: var(--grey-dim); font-size: .82rem; margin-top: 12px; text-align: center; }

/* ── Comparison table ───────────────────────────────── */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; font-size: .95rem; vertical-align: top; border-bottom: 1px solid var(--rule); }
.cmp thead th { background: var(--panel-2); color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.cmp thead th.c1 { color: var(--cyan); }
.cmp thead th.c2 { color: var(--pale-violet); }
.cmp td:first-child { color: var(--grey-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .76rem; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp td.col1 { color: var(--white); }

/* ── Tiers (build your own) ──────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.tier { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; position: relative; }
.tier .badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.tier.t1 { border-top: 3px solid var(--cyan); }
.tier.t2 { border-top: 3px solid var(--pale-violet); }
.tier.t3 { border-top: 3px solid var(--sunny); }
.tier.t1 .badge { background: rgba(34,211,238,.14); color: var(--cyan); }
.tier.t2 .badge { background: rgba(173,186,255,.14); color: var(--pale-violet); }
.tier.t3 .badge { background: rgba(254,207,64,.14); color: var(--sunny); }
.tier h3 { font-size: 1.25rem; }
.tier .when { color: var(--grey-dim); font-size: .82rem; margin-bottom: 14px; }

/* Toolbox */
.tools { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; margin-top: 8px; }
.tool { display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 18px; }
.tool .name { color: var(--white); font-weight: 600; }
.tool .role { color: var(--grey-dim); font-size: .85rem; }
.tool .cost { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--cyan); white-space: nowrap; padding: 4px 10px; border: 1px solid rgba(34,211,238,.3); border-radius: 999px; }

/* ── Prompt library ──────────────────────────────────── */
.module { margin-top: 40px; }
.module-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.module-head h3 { font-size: 1.28rem; margin: 0; }
.tier-pill { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tier-pill.t1 { background: rgba(34,211,238,.14); color: var(--cyan); }
.tier-pill.t2 { background: rgba(173,186,255,.14); color: var(--pale-violet); }
.tier-pill.t3 { background: rgba(254,207,64,.14); color: var(--sunny); }
.module-intro { color: var(--grey); margin: 2px 0 16px; max-width: 760px; }
.module-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; counter-reset: ms; }
.module-steps li { position: relative; padding-left: 30px; color: var(--grey); font-size: .95rem; counter-increment: ms; }
.module-steps li::before { content: counter(ms); position: absolute; left: 0; top: 0; width: 20px; height: 20px;
  border-radius: 50%; background: var(--rule); color: var(--white); font-size: .72rem; font-weight: 700;
  display: grid; place-items: center; font-family: var(--font-head); }
.module-steps li b { color: var(--white); font-weight: 600; }

.prompt { background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.prompt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.prompt-title { font-family: var(--font-head); font-weight: 700; color: var(--white); font-size: 1rem; }
.prompt-tool { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rule); color: var(--grey); white-space: nowrap; }
.prompt-tool.code { color: var(--cyan); border-color: rgba(34,211,238,.4); }
.prompt-tool.obs { color: var(--pale-violet); border-color: rgba(173,186,255,.4); }
.prompt-tool.chat { color: var(--grey-dim); }
.prompt-copy { margin-left: auto; background: rgba(255,255,255,.08); color: var(--white); border: 0;
  border-radius: 7px; padding: 7px 14px; cursor: pointer; font-weight: 700; font-size: .8rem; font-family: var(--font-body); }
.prompt-copy:hover { background: rgba(255,255,255,.16); }
.prompt-copy.copied { background: var(--bright-aqua); color: var(--deep-black); }
.prompt-when { color: var(--grey-dim); font-size: .85rem; margin: 0 0 10px; }
.prompt pre { background: var(--deep-black); border: 1px solid var(--rule); border-radius: 8px;
  padding: 14px 16px; margin: 0; overflow-x: auto; }
.prompt pre code { font-family: var(--font-mono); font-size: .86rem; color: #d6e9ee; white-space: pre-wrap;
  word-break: break-word; line-height: 1.5; }
.quickstart { counter-reset: qs; list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.quickstart li { position: relative; padding: 16px 18px 16px 58px; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 12px; counter-increment: qs; }
.quickstart li::before { content: counter(qs); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--blue-grad); color: var(--deep-black); font-family: var(--font-head);
  font-weight: 700; display: grid; place-items: center; }
.quickstart li b { color: var(--white); display: block; margin-bottom: 2px; }
.quickstart li span { color: var(--grey); font-size: .95rem; }

/* ── Footer ──────────────────────────────────────────── */
.footer { padding: 60px 0 70px; border-top: 1px solid var(--rule); color: var(--grey-dim); font-size: .9rem; }
.footer .foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-end; }
.footer h4 { color: var(--white); font-size: 1.1rem; }

/* ── Reveal-on-scroll (progressive enhancement) ──────────
   Hidden ONLY when JS is active (html.js). No JS = visible. */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 860px) {
  .grid-2, .grid-3, .why, .tiers, .tools { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--deep-black); border-bottom: 1px solid var(--rule); padding: 10px 26px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 8px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav-toggle { display: inline-grid; place-items: center; margin-left: auto; width: 40px; height: 40px;
    background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; color: var(--white); cursor: pointer; font-size: 1.1rem; }
  .section { padding: 60px 0; }
}
