/* ============================================================
   OpenSeed — editorial-technical "ink on paper"
   Instrument Serif (display) · IBM Plex Sans (body) · IBM Plex Mono (code)
   ============================================================ */

:root {
  --paper:      #f4f1e9;   /* warm paper            */
  --paper-2:    #ece7da;   /* recessed panel        */
  --ink:        #1c1a16;   /* near-black warm        */
  --ink-soft:   #4a463d;   /* secondary text        */
  --ink-faint:  #8c8576;   /* tertiary / labels      */
  --line:       #d8d1c0;   /* hairlines             */
  --pine:       #1f6b46;   /* primary accent        */
  --pine-deep:  #154d32;
  --pine-soft:  #e3ecdf;   /* accent wash           */
  --clay:       #b4541f;   /* secondary accent (code in) */
  --ok:         #1f6b46;
  --radius:     4px;
  --maxw:       1140px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* faint dot-grid ledger texture */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .35;
  pointer-events: none;
  z-index: 0;
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .nav, .foot { position: relative; z-index: 2; }

code { font-family: var(--mono); font-size: .9em; }
em { font-style: italic; }

/* ---------- shared ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pine);
  margin-bottom: 1.1rem;
}
section { padding: clamp(3.5rem, 8vw, 7rem) clamp(1.25rem, 5vw, 3rem); }
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  max-width: 18ch;
}
h2 em, h1 em { color: var(--pine); }
.section-lede { max-width: 60ch; color: var(--ink-soft); margin-top: 1.4rem; font-size: 1.06rem; }

.btn {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--mono); font-size: .85rem; font-weight: 500;
  padding: .68em 1.2em; border-radius: var(--radius);
  text-decoration: none; border: 1px solid var(--ink);
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--pine); border-color: var(--pine); transform: translateY(-2px); box-shadow: 0 6px 0 var(--pine-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* command chip */
.cmd {
  display: inline-flex; align-items: center; gap: .6em; flex-wrap: wrap;
  font-family: var(--mono); font-size: .9rem;
  background: var(--ink); color: #f4f1e9;
  padding: .8em 1.1em; border-radius: var(--radius);
  cursor: pointer; user-select: none;
  border: 1px solid var(--ink);
  transition: box-shadow .15s ease, transform .15s ease;
}
.cmd:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--pine-deep); }
.cmd__prompt { color: var(--pine); opacity: .9; }
.cmd__text { color: #f4f1e9; }
.cmd__hint { font-size: .68rem; color: #a59f8e; letter-spacing: .04em; }
.cmd.copied .cmd__hint::after { content: " — copied!"; color: #9fd3b3; }
.cmd--center { display: flex; justify-content: center; margin: 2rem auto 0; width: max-content; max-width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem clamp(1.25rem, 5vw, 3rem);
  background: rgba(244,241,233,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { font-family: var(--mono); font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.nav__brand .ver { color: var(--ink-faint); font-weight: 400; font-size: .8rem; }
.seed { font-size: .95em; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a { font-family: var(--mono); font-size: .85rem; color: var(--ink-soft); text-decoration: none; }
.nav__links a:hover { color: var(--pine); }
.nav__links .btn { padding: .5em 1em; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: clamp(3rem, 7vw, 6rem);
  max-width: var(--maxw); margin: 0 auto;
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.8rem, 6.4vw, 5.2rem); line-height: .98; letter-spacing: -.015em;
  margin: .2rem 0 1.4rem;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 52ch; }
.lede strong { color: var(--ink); font-weight: 600; }
.lede code { background: var(--paper-2); padding: .08em .35em; border-radius: 3px; color: var(--clay); }
.hero__cta { display: flex; gap: .8rem; margin: 1.8rem 0 1.3rem; flex-wrap: wrap; }

/* ---------- demo card ---------- */
.demo {
  background: #fbfaf5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem 1.1rem 1.3rem;
  box-shadow: 14px 14px 0 -2px var(--paper-2), 14px 14px 0 -1px var(--line);
  position: sticky; top: 96px;
}
.demo__head { display: flex; align-items: center; gap: .45rem; padding-bottom: .9rem; border-bottom: 1px dashed var(--line); margin-bottom: 1rem; }
.demo__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.demo__dot:first-child { background: var(--clay); } .demo__dot:nth-child(2){ background:#caa83e;} .demo__dot:nth-child(3){background:var(--pine);}
.demo__title { font-family: var(--mono); font-size: .72rem; color: var(--ink-faint); margin-left: .4rem; letter-spacing: .04em; }
.demo__step { display: flex; align-items: center; gap: .7rem; margin: .2rem 0 .6rem; }
.demo__num { font-family: var(--mono); font-weight: 600; font-size: .72rem; color: var(--paper); background: var(--ink); width: 1.7em; height: 1.7em; display: grid; place-items: center; border-radius: 3px; }
.demo__label { font-family: var(--mono); font-size: .76rem; color: var(--ink-soft); }
.demo__label code { color: var(--clay); }
.demo__arrow { text-align: center; color: var(--pine); font-size: 1.3rem; line-height: 1; margin: -.2rem 0 .4rem; }

.seedmd {
  font-family: var(--mono); font-size: .76rem; line-height: 1.65;
  background: var(--paper); border: 1px solid var(--line); border-radius: 5px;
  padding: .9rem 1rem; overflow-x: auto; color: var(--ink-soft);
  white-space: pre; margin-bottom: 1rem;
}
.seedmd .h1 { color: var(--ink); font-weight: 600; }
.seedmd .h2 { color: var(--pine); font-weight: 600; }
.seedmd .q  { color: var(--ink-faint); font-style: italic; }
.seedmd .dim{ color: var(--ink-faint); }

/* widget */
.widget { background: var(--pine-soft); border: 1px solid #bcd3c2; border-radius: 6px; padding: 1rem 1.1rem; }
.widget__title { font-family: var(--mono); font-weight: 600; font-size: .85rem; color: var(--pine-deep); display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; flex-wrap: wrap; }
.widget__badge { font-weight: 500; font-size: .64rem; letter-spacing: .03em; color: #fff; background: var(--pine); padding: .25em .6em; border-radius: 20px; }
.widget__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .65rem; }
.widget__row label { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--ink-faint); }
.widget input {
  font-family: var(--mono); font-size: .95rem; width: 8.5em; text-align: right;
  background: #fbfaf5; border: 1px solid #bcd3c2; border-radius: 4px; padding: .4em .6em; color: var(--ink);
}
.widget input:focus { outline: 2px solid var(--pine); border-color: var(--pine); }
.stepper { display: flex; align-items: center; gap: .2rem; background: #fbfaf5; border: 1px solid #bcd3c2; border-radius: 4px; }
.stepper button { font-family: var(--mono); font-size: 1.1rem; width: 2em; height: 2em; border: none; background: transparent; color: var(--pine-deep); cursor: pointer; line-height: 1; }
.stepper button:hover { background: var(--pine); color: #fff; }
.stepper span { font-family: var(--mono); min-width: 1.6em; text-align: center; font-size: .95rem; }
.widget__out { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed #bcd3c2; }
.widget__outlabel { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; color: var(--ink-faint); }
.widget__amount { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--pine-deep); }
.widget__covers { font-family: var(--mono); font-size: .7rem; color: var(--pine); }
.demo__foot { font-size: .72rem; color: var(--ink-faint); margin-top: 1rem; line-height: 1.5; }
.demo__foot code { color: var(--clay); }

/* ---------- thesis banner ---------- */
.banner { background: var(--ink); color: var(--paper); text-align: center; }
.banner p { max-width: 60ch; margin: 0 auto; font-size: 1.1rem; color: #cfc9b8; }
.banner__big { display: block; font-family: var(--serif); font-size: clamp(1.9rem, 4.5vw, 3.1rem); line-height: 1.1; color: var(--paper); margin-bottom: .8rem; }

/* ---------- format ---------- */
.format { max-width: var(--maxw); margin: 0 auto; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 2.6rem; }
@media (max-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--paper); padding: 1.5rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; transition: background .2s ease; position: relative; }
.card:hover { background: #fbfaf5; }
.card .tok { font-family: var(--mono); font-size: .82rem; color: var(--pine); }
.card--opt .tok { color: var(--clay); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1; }
.card p { font-size: .92rem; color: var(--ink-soft); flex: 1; }
.req { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.req--opt { color: var(--clay); }
.format__foot { margin-top: 1.6rem; font-size: .9rem; color: var(--ink-soft); max-width: 70ch; }
.format__foot code { color: var(--pine); background: var(--paper-2); padding: .06em .35em; border-radius: 3px; }

/* ---------- capabilities ---------- */
.caps { max-width: var(--maxw); margin: 0 auto; }
.caps > h2 { margin-bottom: 1rem; }
.cap { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 3vw, 2.4rem); padding: 2.4rem 0; border-top: 1px solid var(--line); }
.cap:first-of-type { border-top: 2px solid var(--ink); margin-top: 2rem; }
.cap__n { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4rem); color: var(--line); line-height: .8; }
.cap__body h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.05; margin-bottom: .7rem; max-width: 22ch; }
.cap__body > p { max-width: 64ch; color: var(--ink-soft); }
.cap__note { font-size: .9rem; color: var(--ink-faint); font-style: italic; margin-top: .9rem; }
.cap code { color: var(--clay); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.2rem 0; }
.chips span { font-family: var(--mono); font-size: .74rem; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--line); padding: .3em .7em; border-radius: 20px; }
.mini { font-family: var(--mono); font-size: .78rem; line-height: 1.7; background: var(--ink); color: #d7d2c2; padding: .9rem 1.1rem; border-radius: 6px; overflow-x: auto; white-space: pre; margin-top: 1rem; }
.mini .ok { color: #7fc99b; } .mini .dim { color: #8c8676; }

.badges { list-style: none; display: flex; flex-direction: column; gap: .7rem; margin: 1.2rem 0 0; }
.badges li { display: flex; flex-direction: column; gap: .15rem; padding-left: 1.4rem; position: relative; }
.badges li::before { content: "✓"; position: absolute; left: 0; top: .05rem; color: var(--pine); font-weight: 600; }
.badges strong { font-family: var(--mono); font-size: .88rem; font-weight: 600; }
.badges span { font-size: .86rem; color: var(--ink-faint); }

/* ---------- plow ---------- */
.plow { max-width: var(--maxw); margin: 0 auto; }
.plow__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; margin-top: 2.4rem; }
.pcard { background: #fbfaf5; border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem; }
.pcard h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin-bottom: .5rem; }
.pcard p { font-size: .9rem; color: var(--ink-soft); }
.plow__foot { text-align: center; font-size: .82rem; color: var(--ink-faint); margin-top: 1.6rem; max-width: 64ch; margin-left: auto; margin-right: auto; }

/* ---------- final ---------- */
.final { text-align: center; }
.final h2 { margin: 0 auto 1.8rem; max-width: none; }
.final .hero__cta { justify-content: center; }
.final__note { margin-top: 1.6rem; font-size: .9rem; color: var(--ink-faint); }
.final__note a { color: var(--pine); }

/* ---------- footer ---------- */
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.6rem clamp(1.25rem, 5vw, 3rem); border-top: 1px solid var(--line); font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); }
.foot nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--pine); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal .7s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .demo { position: static; box-shadow: 8px 8px 0 -2px var(--paper-2), 8px 8px 0 -1px var(--line); }
  h2 { max-width: none; }
  .nav__links a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .cap { grid-template-columns: 1fr; gap: .4rem; }
  .cap__n { font-size: 2.4rem; }
  .cmd { font-size: .78rem; }
}
