/* Public Reason Project — light industrial. Shares ORP's palette (orange #FF5D2A,
   Funnel Display + IBM Plex Mono, hexagon, 90px grid) but inverted to white. */

:root {
  --bg:       #FFFFFF;
  --bg-2:     #FAFAF7;   /* warm off-white panel */
  --text:     #14161A;   /* near-black */
  --muted:    #4C525A;
  --muted-2:  #9AA0A8;
  --line:     #E8E7E1;   /* hairline */
  --line-2:   #D8D7D0;
  --accent:   #FF5D2A;
  --accent-dim:#C9431C;
  --cell:     90px;
  --pad:      clamp(22px, calc(var(--cell) * 2), 180px);
  --display:  'Funnel Display', -apple-system, system-ui, sans-serif;
  --sans:     'Funnel Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:     'IBM Plex Mono', Menlo, monospace;
}

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

/* ── grid canvas + one roaming light ───────────────────────────── */
.canvas { position: relative;
  background:
    linear-gradient(to right, rgba(20,22,26,.045) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    linear-gradient(to bottom, rgba(20,22,26,.045) 1px, transparent 1px) 0 0 / var(--cell) var(--cell),
    var(--bg);
}
.canvas::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(255,93,42,.12), rgba(255,93,42,0) 60%);
  background-repeat: no-repeat; background-size: 70vmin 70vmin;
  mix-blend-mode: multiply; animation: drift 38s ease-in-out infinite;
}
@keyframes drift {
  0%   { background-position: 8vw 12vh; opacity: .6; }
  33%  { background-position: 72vw 30vh; opacity: 1; }
  66%  { background-position: 36vw 82vh; opacity: .7; }
  100% { background-position: 8vw 12vh; opacity: .6; }
}
.wrap { position: relative; z-index: 1; max-width: none; padding: 0 var(--pad); }

/* ── header ────────────────────────────────────────────────────── */
header { position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .005em; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-family: var(--display); font-size: 14.5px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--accent); }
.nav-links a.ext::after { content: ' ↗'; color: var(--muted-2); }
.nav-links .btn { color: #fff; }

/* ── primitives ────────────────────────────────────────────────── */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2); }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.tag::before { content: '＋'; color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 500; font-size: 15px; padding: 11px 20px; border: 1px solid var(--line-2); border-radius: 6px; transition: .15s; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.accent { color: var(--accent); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

section { padding: 84px 0; border-top: 1px solid transparent; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0; }

/* ── hero ──────────────────────────────────────────────────────── */
.hero { padding: 136px 0 112px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); max-width: 18ch; text-wrap: balance; margin: 20px 0 0; }
.hero .lead { font-size: 1.22rem; color: var(--muted); max-width: 56ch; margin: 28px 0 36px; }

/* ── problem ───────────────────────────────────────────────────── */
.problem h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); max-width: 20ch; }
.problem p { color: var(--muted); max-width: 64ch; margin: 18px 0 0; }
.quote { font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.2; letter-spacing: -.02em; max-width: 24ch; margin: 48px 0 0; border-left: 3px solid var(--accent); padding-left: 26px; text-wrap: balance; }

/* ── frameworks grid ───────────────────────────────────────────── */
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
.grid4 .cell { background: var(--bg); padding: 26px; }
.grid4 .cell .k { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--accent); }
.grid4 .cell h4 { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 8px 0 8px; }
.grid4 .cell p { color: var(--muted); font-size: .98rem; margin: 0; }
.note { color: var(--muted-2); font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em; margin-top: 22px; }

/* ── REE principles ────────────────────────────────────────────── */
.ree { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
.ree .p { background: var(--bg); padding: 28px; display: flex; gap: 18px; }
.ree .p .n { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.ree .p h4 { font-family: var(--display); font-weight: 700; font-size: 1.12rem; margin: 0 0 6px; }
.ree .p p { color: var(--muted); font-size: .98rem; margin: 0; }
.ree .p:last-child { grid-column: 1 / -1; }

/* ── the work ──────────────────────────────────────────────────── */
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
.work a, .work .item { background: var(--bg); padding: 30px; display: block; transition: background .15s; }
.work a:hover { background: var(--bg-2); }
.work .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.work h3 { font-size: 1.5rem; margin: 10px 0 8px; }
.work p { color: var(--muted); font-size: 1rem; margin: 0; }
.work .go { color: var(--accent); font-family: var(--display); font-weight: 500; margin-top: 14px; display: inline-block; }

/* ── commitments ───────────────────────────────────────────────── */
.commit { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.commit .c h3 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.commit .c h3 .hex { width: 20px; height: 20px; }
.commit .c p { color: var(--muted); margin: 14px 0 0; }

/* ── get involved / footer ─────────────────────────────────────── */
.involve h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); max-width: 18ch; }
.involve .links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted-2); font-size: 13.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
footer a:hover { color: var(--accent); }

/* ── findings (ORP vs real AI datasets) ────────────────────────── */
.finds { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
.finds .f { background: var(--bg); padding: 28px; display: flex; flex-direction: column; }
.finds .f .d-name { font-family: var(--mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted-2); }
.finds .f h3 { font-size: 1.3rem; margin: 6px 0 2px; }
.finds .f .powers { color: var(--muted); font-size: .95rem; margin: 0 0 18px; }
.finds .f .stat { font-family: var(--display); font-weight: 700; font-size: 2.2rem; color: var(--accent); line-height: 1.02; letter-spacing: -.02em; }
.finds .f .stat small { display: block; font-family: var(--sans); font-weight: 400; font-size: .96rem; color: #23262B; margin-top: 10px; letter-spacing: 0; }
.finds .f .go { color: var(--accent); font-family: var(--display); font-weight: 500; margin-top: auto; padding-top: 18px; }
.finds .f .go:hover { text-decoration: underline; }
.finds-meta { font-family: var(--mono); font-size: 12px; color: var(--muted-2); letter-spacing: .03em; margin-top: 18px; }
.finds-meta a:hover { text-decoration: underline; }
@media (max-width: 820px) { .finds { grid-template-columns: 1fr; } }

/* ── findings rows (scannable) on the foundations page ─────────────────── */
.f-lead { color: var(--muted); font-size: 1.1rem; line-height: 1.6; max-width: 58ch; margin: 14px 0 0; }
.f-rows { margin-top: 26px; }
.f-row { display: grid; grid-template-columns: 11.5rem 1fr; gap: 22px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); color: inherit; }
.f-row:last-child { border-bottom: 1px solid var(--line); }
.f-row .f-d { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); transition: color .15s; }
.f-row:hover .f-d { color: var(--accent); }
.f-row .f-t { color: #23262B; font-size: 1.03rem; line-height: 1.5; }
.f-row .f-t b { color: var(--accent); font-weight: 700; }
@media (max-width: 620px) { .f-row { grid-template-columns: 1fr; gap: 5px; } }

/* ── foundations hero: a dark "slide" borrowed from the ORP slideshow ──── */
.f-hero { padding: 46px 0 56px; }
.f-hero-card {
  position: relative; overflow: hidden; border-radius: 12px; color: #F5F4F0;
  padding: clamp(30px, 4.6vw, 60px);
  background:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 62px 62px,
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 62px 62px,
    #0B0C0E;
}
.f-hero-top { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: clamp(28px, 4vw, 48px); }
.f-hero-body { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.f-hero-left h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.3rem, 4.8vw, 4rem); line-height: 1.03; letter-spacing: -.03em; color: #F5F4F0; margin: 0; max-width: 13ch; text-wrap: balance; }
.f-hero-list { list-style: none; margin: 0; padding: 0; }
.f-hero-list li { opacity: 0; transform: translateY(12px); animation: fhIn .6s cubic-bezier(.22,.72,.2,1) forwards; border-top: 1px solid rgba(255,255,255,.12); }
.f-hero-list li:last-child { border-bottom: 1px solid rgba(255,255,255,.12); }
.f-hero-list a { display: flex; align-items: baseline; gap: 18px; padding: 15px 4px; color: #E7E5E1; transition: color .15s, padding-left .2s; }
.f-hero-list a:hover { color: #fff; padding-left: 10px; }
.f-hero-list .n { font-family: var(--mono); font-size: 13px; color: var(--accent); flex-shrink: 0; }
.f-hero-list .nm { font-family: var(--display); font-weight: 500; font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
@keyframes fhIn { to { opacity: 1; transform: none; } }
@media (max-width: 820px) {
  .f-hero-body { grid-template-columns: 1fr; gap: 30px; }
  .f-hero-left h1 { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .f-hero-list li { opacity: 1; transform: none; animation: none; } }

/* ── foundations (five layers) ─────────────────────────────────── */
.foundations-toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 8px; }
.foundations-toc a { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.foundations-toc a:hover { border-color: var(--accent); color: var(--accent); }
.layer { max-width: 44rem; margin: 0 auto; padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.layer:first-of-type { border-top: none; }
.layer-head { display: flex; align-items: baseline; gap: 16px; }
.layer-head .lid { font-family: var(--mono); font-size: 14px; color: var(--accent); font-weight: 500; }
.layer-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.layer .def { font-family: var(--display); font-weight: 500; font-size: 1.22rem; line-height: 1.45; color: var(--muted); margin: 14px 0 26px; border-left: 3px solid var(--accent); padding-left: 20px; }
.layer p { color: #23262B; margin: 0 0 18px; }
.layer p strong { color: var(--text); }

/* self-critique: article ⇄ "where this could be wrong" slides across the column;
   a tall slim arrow in the right margin flips it. Panels near-full-width so the
   focused side reads comfortably; the other sits as a slim dimmed peek. */
.lf { position: relative; margin-top: 8px; }
.lf-view { overflow: hidden; }
.lf-track { display: flex; gap: 3%; transition: transform .6s cubic-bezier(.22,.72,.2,1); }
.lf-panel { flex: 0 0 90%; min-width: 0; transition: opacity .5s ease; }
.lf-panel.lf-a p:first-child { margin-top: 0; }
.lf-c { opacity: .28; cursor: pointer; }
.lf.is-open .lf-track { transform: translateX(-93%); }
.lf.is-open .lf-a { opacity: .28; cursor: pointer; }
.lf.is-open .lf-c { opacity: 1; cursor: default; }
.lf-c .lf-c-label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.lf-c ul { margin: 0; padding: 0; list-style: none; }
.lf-c li { color: #23262B; margin: 0 0 18px; padding-left: 22px; position: relative; line-height: 1.55; }
.lf-c li::before { content: '?'; position: absolute; left: 0; top: 0; color: var(--accent); font-family: var(--display); font-weight: 700; }

/* tall slim arrow, out in the right margin */
.lf-arrow { position: absolute; top: 50%; right: -56px; transform: translateY(-50%); width: 40px; height: 76px; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; color: var(--muted-2); transition: color .15s, border-color .15s, transform .55s cubic-bezier(.22,.72,.2,1); z-index: 3; }
.lf-arrow:hover { color: var(--accent); border-color: var(--accent); }
.lf-arrow svg { width: 13px; height: 38px; }
.lf.is-open .lf-arrow { transform: translateY(-50%) rotate(180deg); }
@media (max-width: 1120px) { .lf-arrow { right: 2px; } }
@media (max-width: 680px) {
  .lf-panel { flex: 0 0 100%; }
  .lf.is-open .lf-track { transform: translateX(-100%); }
  .lf-arrow { width: 34px; height: 60px; }
}

/* honest schematic: where distortion enters the pipeline */
.pipe { display: flex; align-items: stretch; gap: 0; margin: 10px 0 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-family: var(--mono); background: var(--bg-2); }
.pipe .step { flex: 1; padding: 18px 16px; border-right: 1px solid var(--line); position: relative; }
.pipe .step:last-child { border-right: none; }
.pipe .step .s-k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.pipe .step .s-t { font-size: 13px; color: var(--text); margin-top: 6px; }
.pipe .step .s-l { font-size: 10px; color: var(--accent); margin-top: 10px; }
@media (max-width: 760px) { .pipe { flex-direction: column; } .pipe .step { border-right: none; border-bottom: 1px solid var(--line); } }

/* findings placeholder */
.findings-card { border: 1px dashed var(--line-2); border-radius: 10px; padding: 34px; background: var(--bg-2); }
.findings-card .soon { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* ── manifesto page ────────────────────────────────────────────── */
.doc { max-width: 42rem; margin: 0 auto; padding: 100px 0 80px; }
.doc .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 16px 0 6px; text-wrap: balance; }
.doc .sub { font-family: var(--display); font-weight: 500; font-size: 1.4rem; color: var(--muted); margin: 0 0 10px; }
.doc h2 { font-size: 1.6rem; margin: 48px 0 14px; }
.doc p { color: #23262B; margin: 0 0 20px; }
.doc hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }
.doc strong { color: var(--text); }
.doc em { color: var(--muted); }
.doc .end { font-family: var(--mono); font-size: 13px; color: var(--muted-2); }
.doc .sig { font-family: var(--display); font-weight: 500; font-size: 1.2rem; color: var(--text); margin: 30px 0 0; }
.doc .sig span { color: var(--muted-2); font-weight: 400; }

@media (max-width: 820px) {
  .grid4, .ree, .work, .commit { grid-template-columns: 1fr; }
  .ree .p:last-child { grid-column: auto; }
  .hero { padding: 96px 0 72px; }
  .nav-links a:not(.btn) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .canvas::before { animation: none; } }
