:root {
  /* warm editorial paper palette */
  --bg: #f8f4ec;
  --surface: #fffdf8;
  --surface-2: #efe8da;
  --ink: #1c1813;
  --muted: #6c6457;
  --faint: #9b9082;
  --line: #e7ddcb;
  --line-strong: #d8cbb2;
  --accent: #bc4e2c;        /* ember / terracotta */
  --accent-ink: #a23f1f;
  --accent-soft: #f4e6dc;
  --amber: #d68a1e;
  --green: #3c7d49;
  /* dark "terminal" panel — kept dark on purpose for contrast */
  --code-bg: #16140f;
  --code-line: #2a261d;
  --c-key: #9ecf6b;
  --c-str: #e0a86b;
  --c-bool: #d98a1f;
  --c-punc: #8b8472;
  --radius: 11px;
  --radius-sm: 7px;
  --maxw: 1100px;
  --pad: clamp(1.1rem, 5vw, 3.5rem);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120c;
    --surface: #1e1a13;
    --surface-2: #26211a;
    --ink: #efe8da;
    --muted: #b3a895;
    --faint: #847a68;
    --line: #2b251b;
    --line-strong: #3a3327;
    --accent: #e0784f;
    --accent-ink: #ec916b;
    --accent-soft: #2a1c14;
    --amber: #e6a13c;
    --green: #6cbf74;
    --code-bg: #0f0d09;
    --code-line: #25211a;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
em { font-family: var(--display); font-style: italic; font-weight: 500; color: inherit; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-2); padding: 0.12em 0.42em; border-radius: 5px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 50; }
.skip:focus { left: 0; }
::selection { background: rgba(188,78,44,.18); }

.eyebrow { font-family: var(--mono); font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 1.1rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.005em; line-height: 1.1; }
.grad { color: var(--accent); font-style: italic; }

/* nav */
.nav { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem var(--pad); display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 600; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.01em; }
.brand .mark { flex: none; }
.nav-links { display: flex; align-items: center; gap: clamp(.9rem, 2.5vw, 1.9rem); font-size: .95rem; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }

/* buttons — refined, editorial rectangles */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font); font-weight: 600; font-size: .98rem; text-decoration: none; padding: .78rem 1.35rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .18s, border-color .18s, color .18s; }
.btn span { transition: transform .2s; }
.btn:hover span { transform: translateX(3px); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--pad); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 1rem; }

/* hero */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin: 0 0 1.4rem; font-weight: 500; line-height: 1.04; }
.lede { font-size: clamp(1.08rem, 2.1vw, 1.3rem); color: var(--muted); max-width: 48ch; margin: 0 0 2rem; line-height: 1.6; }
.lede strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-sub { margin: 1.7rem 0 0; font-size: .9rem; color: var(--faint); }

/* demo */
.demo { padding-top: 1.5rem; }
.demo-head { margin-bottom: 1.6rem; }
.demo-head h2 { margin: .2rem 0 .5rem; }
.presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { font-family: var(--mono); font-size: .82rem; font-weight: 500; padding: .42rem .85rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

.demo-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: stretch; }
.panel { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; min-height: 320px; box-shadow: 0 1px 2px rgba(28,24,19,.04); }
.panel-bar { display: flex; align-items: center; gap: .45rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.panel-title, .lang { font-family: var(--mono); font-size: .8rem; color: var(--faint); margin-left: .4rem; }
.badge { margin-left: auto; font-family: var(--mono); font-size: .72rem; padding: .15rem .5rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); }
textarea#raw { flex: 1; border: 0; resize: none; padding: 1rem; font-family: var(--mono); font-size: .85rem; line-height: 1.55; background: var(--surface); color: var(--ink); outline: none; }
.panel-out { background: var(--code-bg); border-color: var(--code-line); }
.panel-out .panel-bar { background: #0a0906; border-color: var(--code-line); }
.json { flex: 1; margin: 0; padding: 1rem; font-family: var(--mono); font-size: .85rem; line-height: 1.6; color: #d6cfbf; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.json .k { color: var(--c-key); } .json .s { color: var(--c-str); } .json .b { color: var(--c-bool); } .json .p { color: var(--c-punc); }

.flow-arrow { display: flex; align-items: center; justify-content: center; }
.process { display: inline-flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent-ink); font-family: var(--mono); font-weight: 500; font-size: .78rem; cursor: pointer; transition: all .15s; }
.process:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: scale(1.04); }
.process svg { transition: transform .2s; }
.process:hover svg { transform: translateX(2px); }
.demo-foot { margin: 1.1rem 0 0; font-size: .9rem; max-width: 62ch; color: var(--muted); }

/* live demo (email it for real) */
.live { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.live-copy h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: .1rem 0 .7rem; }
.live-copy .muted { margin: 0 0 1.3rem; font-size: .96rem; max-width: 42ch; }
.live-addr { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.live-addr code { font-family: var(--mono); font-size: .92rem; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .55rem .8rem; color: var(--accent-ink); }
.live-status { margin: 1rem 0 0; font-size: .9rem; color: var(--muted); min-height: 1.3rem; }
.live-panel { min-height: 260px; }

/* problem */
.problem-grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.problem-body p { color: var(--muted); margin: 0 0 1rem; }
.problem-body strong { color: var(--ink); }

/* how */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; background: var(--surface); }
.step-no { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 7px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-family: var(--mono); margin-bottom: .9rem; }
.step h3 { font-size: 1.25rem; margin: 0 0 .4rem; }
.step p { color: var(--muted); font-size: .96rem; margin: 0; }

/* recipes */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; background: var(--surface); transition: border-color .18s, transform .18s, box-shadow .18s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(28,24,19,.07); }
.card h3 { font-size: 1.25rem; margin: 0 0 .45rem; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.recipes-more { margin: 1.6rem 0 0; font-family: var(--mono); font-size: .9rem; }
.recipes-more a { color: var(--accent-ink); text-decoration: none; }
.recipes-more a:hover { text-decoration: underline; }

/* snippet */
.code-block { background: var(--code-bg); color: #d6cfbf; border: 1px solid var(--code-line); border-radius: var(--radius); padding: 1.4rem; font-family: var(--mono); font-size: .9rem; line-height: 1.7; overflow: auto; margin-top: 1.5rem; }
.code-block .k { color: var(--c-key); } .code-block .s { color: var(--c-str); } .code-block .b { color: var(--c-bool); }

/* pricing */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.9rem; background: var(--surface); position: relative; }
.tier-feature { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tier-tag { position: absolute; top: -.7rem; left: 1.9rem; background: var(--accent); color: #fff; font-family: var(--mono); font-size: .68rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; padding: .22rem .6rem; border-radius: 999px; }
.tier h3 { font-size: 1.2rem; margin: 0 0 .3rem; }
.price { font-family: var(--display); font-size: 2.4rem; font-weight: 500; letter-spacing: -.01em; margin: 0 0 1rem; }
.price span { font-family: var(--font); font-size: 1rem; font-weight: 500; color: var(--muted); }
.tier ul { list-style: none; padding: 0; margin: 0; }
.tier li { padding: .4rem 0 .4rem 1.5rem; position: relative; color: var(--muted); font-size: .96rem; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.credits-note { text-align: center; margin: 1.5rem auto 0; max-width: 52ch; font-size: .95rem; }

/* waitlist */
.waitlist { text-align: center; }
.waitlist .muted { max-width: 48ch; margin: 0 auto 1.6rem; }
.waitform { display: flex; gap: .6rem; max-width: 470px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.waitform input { flex: 1; min-width: 220px; padding: .8rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 1rem; outline: none; transition: border-color .15s; }
.waitform input:focus { border-color: var(--accent); }
.waitmsg { min-height: 1.4rem; margin: 1rem 0 0; font-size: .95rem; color: var(--green); font-weight: 500; }

/* footer */
.foot { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem var(--pad) 4rem; border-top: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.brand-foot { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.foot-brand .muted { margin: .5rem 0 0; font-size: .92rem; }
.foot-meta { text-align: right; max-width: 30rem; }
.built { display: inline-flex; align-items: center; color: var(--muted); font-weight: 500; font-size: .92rem; text-decoration: none; }
.built svg { transition: transform .2s; }
.built:hover { color: var(--ink); }
.built:hover svg { transform: translateX(2px); }
.foot-links { margin: 1rem 0 .6rem; font-size: .92rem; color: var(--faint); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-fine { font-size: .82rem; color: var(--faint); margin: 0; }
.foot-fine a { color: var(--accent-ink); }

@media (max-width: 820px) {
  .demo-grid { grid-template-columns: 1fr; }
  .live { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: .2rem 0; }
  .problem-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .foot { flex-direction: column; }
  .foot-meta { text-align: left; }
  .foot-links { justify-content: flex-start; }
}
/* legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 3rem var(--pad) 1rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.01em; margin: .4rem 0 .6rem; }
.legal .updated { color: var(--faint); font-size: .9rem; margin: 0 0 2.2rem; }
.legal h2 { font-size: 1.3rem; margin: 2.3rem 0 .6rem; }
.legal p, .legal li { color: var(--muted); line-height: 1.75; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin: 0 0 .4rem; }
.legal a { color: var(--accent-ink); }
.legal strong { color: var(--ink); }
.legal .back { display: inline-block; margin-bottom: 1.5rem; color: var(--muted); text-decoration: none; font-size: .92rem; font-family: var(--mono); }
.legal .back:hover { color: var(--ink); }

/* 404 */
.lost .code span { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
