/* ============================================================
   IdeaClyst.com — shared stylesheet
   Brand: warm editorial paper, ember spark, Claude=terracotta, Codex=pine.
   Type: Fraunces (display), Newsreader (body), JetBrains Mono (labels).
   ============================================================ */

:root {
  --paper: #f3ede1;
  --paper-2: #ece4d4;
  --card: #fbf7ee;
  --ink: #1d160d;
  --ink-soft: #463c30;
  --muted: #8a7d6b;
  --line: #d8cdb8;
  --line-strong: #c4b69b;
  --ember: #d6451f;
  --ember-dark: #b3360f;
  --ember-soft: #f0b8a4;
  --claude: #b8542f;
  --claude-bg: #f6e3d8;
  --codex: #2f6f5e;
  --codex-bg: #dcebe3;
  --gold: #9a7a1e;
  --ink-deep: #181208;
  --shadow-sm: 0 1px 0 rgba(255,255,255,.6) inset, 0 14px 32px -22px rgba(40,28,12,.5);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.6) inset, 0 30px 60px -30px rgba(40,28,12,.55);
  --display: "Fraunces", Georgia, serif;
  --body: "Newsreader", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(60rem 40rem at 105% -10%, rgba(47,111,94,.07), transparent 60%),
    radial-gradient(55rem 38rem at -10% 0%, rgba(214,69,31,.08), transparent 55%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* grain texture */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.5rem); }

/* ---------------- Header ---------------- */
header.site {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(1.4) blur(10px);
  background: rgba(243,237,225,.78);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--display); font-weight: 900; font-size: 1.45rem; letter-spacing: -.02em; color: var(--ink); }
.logo .clyst { color: var(--ember); }
.logo .spark { color: var(--ember); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--ember); text-decoration: none; }
.nav-links .btn { text-transform: none; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .02em;
  padding: .72rem 1.25rem; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--ember); color: #fff; box-shadow: 0 12px 26px -12px rgba(214,69,31,.7); }
.btn-primary:hover { background: var(--ember-dark); transform: translateY(-2px); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); text-decoration: none; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------------- Shared section bits ---------------- */
section { padding: clamp(4rem, 9vw, 7rem) 0; }
.eyebrow {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ember); display: inline-flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--ember); }
h2.head { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 5vw, 3.4rem); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 1rem; max-width: 18ch; overflow-wrap: break-word; hyphens: auto; }
.sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 56ch; }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(3.5rem, 8vw, 6rem); }
.hero-spark {
  position: absolute; top: -12rem; right: -10rem; width: 46rem; height: 46rem; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(214,69,31,.22), rgba(214,69,31,0) 60%);
  filter: blur(8px); animation: pulse 7s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.12); opacity: 1; } }
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--ember); }
h1.hero-title {
  font-family: var(--display); font-weight: 900; letter-spacing: -.04em; line-height: .94;
  font-size: clamp(2.3rem, 8.2vw, 6.4rem); margin: 1.3rem 0 0; max-width: 16ch;
  overflow-wrap: break-word; hyphens: auto;
}
h1.hero-title .clyst { color: var(--ember); }
.hero-lede { font-size: clamp(1.2rem, 2.6vw, 1.7rem); line-height: 1.4; color: var(--ink-soft); max-width: 40ch; margin: 1.6rem 0 0; }
.hero-lede em { font-style: italic; color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2.4rem; }
.pill { font-family: var(--mono); font-size: .72rem; padding: .4rem .8rem; border: 1px solid var(--line-strong); border-radius: 100px; background: var(--card); color: var(--ink-soft); }
.pill b { color: var(--ember); }

/* council preview in hero */
.council-art { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.2rem; }
.agent {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.agent.claude { border-top: 4px solid var(--claude); }
.agent.codex { border-top: 4px solid var(--codex); }
.agent .role { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; }
.agent.claude .role { color: var(--claude); }
.agent.codex .role { color: var(--codex); }
.agent h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin: .5rem 0 .4rem; letter-spacing: -.01em; }
.agent p { font-size: .96rem; color: var(--ink-soft); margin: 0; }
.agent .vs { position: absolute; }
@media (max-width: 640px) { .council-art { grid-template-columns: 1fr; } }

/* ---------------- Feature / value grid ---------------- */
.grid { display: grid; gap: 1.1rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .grid.three, .grid.five { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid.three, .grid.two, .grid.five { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .k { font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ember); }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: .6rem 0 .5rem; letter-spacing: -.01em; }
.card p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* tinted band */
.band { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------------- Steps ---------------- */
.steps { position: relative; margin-top: 2.5rem; }
.steps::before { content: ""; position: absolute; left: 27px; top: 24px; bottom: 24px; width: 2px; background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 1.3rem; margin-bottom: 1.1rem; }
.step .dot { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 1.4rem; color: #fff; box-shadow: 0 10px 22px -10px rgba(40,28,12,.6); z-index: 1; }
.dot.claude { background: var(--claude); } .dot.codex { background: var(--codex); } .dot.go { background: var(--ember); }
.step.go .body { border-left: 3px solid var(--ember); }
.step .body { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); }
.step.claude .body { border-left: 3px solid var(--claude); }
.step.codex .body { border-left: 3px solid var(--codex); }
.step .who { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; }
.step.claude .who { color: var(--claude); } .step.codex .who { color: var(--codex); }
.step h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin: .35rem 0 .45rem; letter-spacing: -.01em; }
.step p { font-size: .96rem; color: var(--ink-soft); margin: 0; }

/* ---------------- CTA band ---------------- */
.cta-band { background: var(--ink-deep); color: #f2e9d8; border-radius: 28px; padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(40rem 24rem at 50% -30%, rgba(214,69,31,.45), transparent 60%); pointer-events: none; }
.cta-band h2 { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -.03em; line-height: 1; margin: 0 0 1rem; position: relative; }
.cta-band h2 .clyst { color: var(--ember-soft); }
.cta-band p { color: #cbbfa9; max-width: 46ch; margin: 0 auto 2rem; position: relative; }
.cta-band .btn-ghost { color: #f2e9d8; border-color: rgba(242,233,216,.35); }
.cta-band .btn-ghost:hover { border-color: #f2e9d8; }
.cta-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------------- Footer ---------------- */
footer.site { border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; margin-top: 2rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.foot-brand .logo { font-size: 1.6rem; }
.foot-tag { color: var(--muted); font-size: .95rem; margin-top: .6rem; max-width: 30ch; }
.foot-nav { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }
.foot-col a { display: block; color: var(--ink-soft); font-size: .95rem; padding: .2rem 0; }
.foot-col a:hover { color: var(--ember); text-decoration: none; }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.powered a { color: var(--ember); font-weight: 700; }
.powered a:hover { color: var(--ember-dark); }

/* ---------------- Legal / doc pages ---------------- */
.doc { padding: clamp(3rem, 7vw, 5rem) 0 4rem; }
.doc-wrap { max-width: 760px; }
.doc h1 { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 6vw, 3.6rem); letter-spacing: -.03em; line-height: 1.02; margin: .6rem 0 .4rem; overflow-wrap: break-word; hyphens: auto; }
.doc .updated { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.doc h2 { font-family: var(--display); font-weight: 600; font-size: 1.55rem; letter-spacing: -.01em; margin: 2.6rem 0 .6rem; }
.doc h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 1.8rem 0 .4rem; }
.doc p, .doc li { color: var(--ink-soft); font-size: 1.02rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: .35rem 0; }
.doc address { font-style: normal; line-height: 1.7; }
.doc .lead { font-size: 1.15rem; color: var(--ink); }
.callout { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; padding: 1.1rem 1.3rem; margin: 1.6rem 0; font-size: .95rem; box-shadow: var(--shadow-sm); }
.callout strong { color: var(--ink); }
.back { font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; }

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.load { opacity: 0; transform: translateY(20px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .load { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .hero-spark { animation: none; }
}
