/* freethink.space — thought-web theme. Same family as The Social Web (Syne + Figtree, dark first, glass cards),
   its own colors: spark amber into mint. Tokens first, then base, layout, components. No build step. */
:root {
  --spark: #ffb84d; --mint: #4de8c2; --rose: #ff6f91;
  --grad: linear-gradient(115deg, var(--spark), var(--mint));
  --bg: #080b10; --bg-2: #0d1219; --ink: #eef2f7; --muted: #97a1b4; --faint: #5f6a7e;
  --surface: rgba(18, 24, 34, .72); --surface-2: rgba(26, 34, 48, .82); --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.16);
  --accent: var(--spark); --accent-ink: #1a1203; --link: #6ff0d0; --glow: rgba(255,184,77,.35);
  --shadow: 0 12px 44px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.04) inset;
  --font-display: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;  /* same house font as thesocialweb.site */
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --radius: 20px; --page: 1080px; --gutter: 20px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f5ef; --bg-2: #efece3; --ink: #14171f; --muted: #556071; --faint: #8a93a3;
  --surface: rgba(255,255,255,.75); --surface-2: rgba(255,255,255,.95); --line: rgba(20,24,34,.1); --line-2: rgba(20,24,34,.2);
  --accent: #c76a00; --accent-ink: #fff; --link: #00806a; --glow: rgba(199,106,0,.28);
  --grad: linear-gradient(115deg, #e07b00, #00a58a);
  --shadow: 0 14px 40px rgba(40,36,20,.14), 0 1px 0 rgba(255,255,255,.7) inset;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.65 var(--font-body); color: var(--ink); background: var(--bg); min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background:
  radial-gradient(900px 560px at 8% -8%, rgba(255,184,77,.13), transparent 62%),
  radial-gradient(800px 560px at 108% 12%, rgba(77,232,194,.12), transparent 58%),
  radial-gradient(700px 600px at 50% 120%, rgba(255,111,145,.07), transparent 60%), var(--bg); }
[data-theme="light"] body::before { background:
  radial-gradient(900px 560px at 8% -8%, rgba(255,184,77,.28), transparent 62%),
  radial-gradient(800px 560px at 108% 12%, rgba(77,232,194,.22), transparent 58%), var(--bg); }
.web { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.08; margin: 0 0 .5em; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); } h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* --- header --- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.25rem var(--font-display); letter-spacing: -.02em; min-height: 44px; }
.brand img { width: 34px; height: 34px; transition: transform .6s var(--spring); }
.brand:hover img { transform: rotate(-24deg) scale(1.08); }
.brand span { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.theme { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: transform .25s var(--spring), border-color .2s; }
.theme:hover { transform: rotate(18deg) scale(1.06); border-color: var(--accent); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun { display: none; } [data-theme="light"] .theme .sun { display: block; } [data-theme="light"] .theme .moon { display: none; }

/* --- buttons / chips / cards --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 700 1rem var(--font-body); cursor: pointer; text-decoration: none; transition: transform .2s var(--spring), box-shadow .25s, border-color .2s; }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--grad); color: #10130f; border-color: transparent; box-shadow: 0 8px 28px var(--glow); }
[data-theme="light"] .btn.primary { color: #fff; }
.btn.primary:hover { box-shadow: 0 12px 36px var(--glow); }
.btn.small { min-height: 44px; padding: 0 18px; font-size: .92rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); font: 500 .72rem var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.chip.live { color: var(--mint); border-color: color-mix(in srgb, var(--mint) 45%, transparent); }
[data-theme="light"] .chip.live { color: #00806a; }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .3s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.card h3 { margin-bottom: .4em; } .card p:last-child { margin-bottom: 0; }

/* --- sections --- */
main { flex: 1; }
.hero { padding: clamp(56px, 11vw, 140px) 0 clamp(40px, 7vw, 90px); }
.hero h1 { font-size: clamp(2.3rem, 8.5vw, 4.8rem); line-height: 1; letter-spacing: -.035em; margin: 18px 0 26px; font-weight: 800; }
.hero h1 .line { display: block; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); max-width: 640px; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
section.block { padding: clamp(40px, 7vw, 84px) 0; }
.eyebrow { display: block; margin-bottom: 14px; color: var(--accent); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.band { text-align: center; padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px); background: linear-gradient(135deg, color-mix(in srgb, var(--spark) 12%, var(--surface)), color-mix(in srgb, var(--mint) 11%, var(--surface))); }
.band p { max-width: 600px; margin-left: auto; margin-right: auto; }
.band .cta { justify-content: center; }
.pagehead { padding: clamp(44px, 8vw, 96px) 0 clamp(18px, 3vw, 36px); }
.pagehead h1 { font-size: clamp(2.3rem, 7vw, 4.4rem); letter-spacing: -.03em; line-height: 1; margin: 14px 0 20px; }

/* manifesto */
.principles { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 64px 1fr; gap: 6px 22px; padding: 30px 0; border-top: 1px solid var(--line); }
.principles li:last-child { border-bottom: 1px solid var(--line); }
.principles li::before { content: counter(p, decimal-leading-zero); font: 600 1.05rem var(--font-mono); color: var(--accent); padding-top: .55em; }
.principles li > h3, .principles li > p { grid-column: 2; }
.principles li::before { grid-row: 1 / span 2; }
.principles h3 { font-size: clamp(1.4rem, 3.4vw, 2rem); margin-bottom: .3em; }
.principles p { color: var(--muted); margin: 0; max-width: 62ch; }

/* projects */
.project { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
.project .glyph { width: 88px; height: 88px; color: var(--accent); }
.project .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.note { margin-top: 20px; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--line-2); background: color-mix(in srgb, var(--bg) 40%, transparent); font-size: .95rem; color: var(--muted); }
.note b { color: var(--ink); }
.soon .chip { margin-bottom: 14px; }

/* prose (privacy, support copy) */
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; } .prose li { margin-bottom: .5em; }
.prose { color: var(--muted); } .prose strong, .prose h2 { color: var(--ink); }
.donate { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

/* footer */
.foot { margin-top: 40px; border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: .92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 36px; justify-content: space-between; align-items: flex-start; }
.foot a { color: var(--muted); } .foot a:hover { color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot li a { display: inline-flex; min-height: 44px; align-items: center; }
.foot b { color: var(--ink); font-family: var(--font-display); }

/* reveal: content is visible without JS; the .js class opts in to the entrance */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.hero h1 .line { animation: rise .9s var(--ease) both; } .hero h1 .line:nth-child(2) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

@media (min-width: 760px) {
  .project { grid-template-columns: auto 1fr; gap: 36px; }
  .project .glyph { width: 130px; height: 130px; }
  .principles li { grid-template-columns: 90px 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .nav { order: 3; width: 100%; margin-left: 0; padding-bottom: 8px; }
  .theme { margin-left: auto; }
  .principles li { grid-template-columns: 1fr; padding: 24px 0; }
  .principles li > h3, .principles li > p { grid-column: 1; }
  .principles li::before { grid-row: auto; }
  .principles li::before { padding-top: 0; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
