/* Forge marketing site. Tokens mirror frontend/src/index.css and
   frontend/src/pages/LandingPage.tsx: ink on white, one #FFD60A accent moment,
   Barlow for display and body, IBM Plex Mono for uppercase labels, hairlines. */

:root {
  --ink: #0a0a0a;
  --yellow: #FFD60A;
  --green: #00704A;

  /* theme surfaces (light) */
  --bg: #FFFFFF;
  --bg-alt: #F3F3F3;
  --fg: #0a0a0a;
  --text: #3A3B36;
  --line: #E6E6E3;
  --field-bg: #FFFFFF;
  --btn-bg: #0a0a0a;
  --btn-fg: #FFFFFF;
  --arrow: var(--yellow);
  --focus: #0a0a0a;
  --card-bg: #0a0a0a;
  --card-line: #2A2B27;

  /* fixed dark-section tokens */
  --on-ink: #FFFFFF;
  --on-ink-text: #C9C9C3;
  --on-ink-muted: #9A9B94;
  --ink-line: #2A2B27;

  --display: Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: 20px;
  --maxw: 1440px;
}

@media (min-width: 768px) { :root { --pad: 40px; } }
@media (min-width: 1024px) { :root { --pad: 80px; } }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-alt: #171814;
    --fg: #FFFFFF;
    --text: #C9C9C3;
    --line: #2A2B27;
    --field-bg: #171814;
    --btn-bg: var(--yellow);
    --btn-fg: #0a0a0a;
    --arrow: #0a0a0a;
    --focus: var(--yellow);
    --card-bg: #171814;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--display);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--fg); font-weight: 800; letter-spacing: -.03em; }
h3 { font-weight: 700; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
code, pre { font-family: var(--mono); }
p code, li code { font-size: .9em; background: var(--bg-alt); padding: 1px 6px; border-radius: 2px; color: var(--fg); }
::selection { background: var(--yellow); color: var(--ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.on-ink :focus-visible, footer.site :focus-visible { outline-color: var(--yellow); }
.band :focus-visible { outline-color: var(--ink); }

.skip {
  position: absolute; left: var(--pad); top: -80px; z-index: 10;
  background: var(--yellow); color: var(--ink); font-weight: 700; padding: 10px 16px; border-radius: 2px;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* Wordmark: "f" + live dot + "rge". Dot is 0.47em, per Wordmark.tsx. */
.wordmark {
  display: inline-flex; align-items: baseline; gap: 1px;
  font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--fg);
}
.wordmark i { display: inline-block; width: .47em; height: .47em; border-radius: 50%; background: var(--yellow); }
.wordmark.white { color: #fff; }

.label {
  font-family: var(--mono); font-size: 13px; line-height: 20px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text);
}
.label.yellow { color: var(--yellow); }
.status { display: flex; align-items: center; gap: 10px; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }
@media (prefers-color-scheme: dark) { .status::before { background: #2FBF8A; } }

/* Header */
header.site { border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { font-size: 34px; display: inline-flex; }
.navlinks { display: none; gap: 40px; font-weight: 500; font-size: 16px; }
.navlinks a { padding: 6px 0; }
.navlinks a:hover, .foot-col a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-login { font-weight: 500; color: var(--fg); padding: 8px 0; }
@media (min-width: 768px) { .nav { padding-top: 24px; padding-bottom: 24px; } .navlinks { display: flex; } .nav-actions { gap: 24px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 16px/24px var(--display); padding: 10px 18px; border-radius: 2px;
  border: 0; cursor: pointer; background: var(--btn-bg); color: var(--btn-fg);
}
.btn:hover { filter: brightness(1.15); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { filter: brightness(.95); }
.btn-lg { font-size: 18px; padding: 18px 28px; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink .arrow path { stroke: var(--yellow); }
.arrow path { stroke: var(--arrow); }
.link-ul { font-weight: 600; font-size: 18px; line-height: 24px; color: var(--fg); border-bottom: 2px solid var(--yellow); padding-bottom: 2px; }
.link-ul:hover { border-bottom-width: 4px; padding-bottom: 0; }
.nav-cta { display: none; }
@media (min-width: 480px) { .nav-cta { display: inline-flex; } }
.nav-cta.mobile-short { display: inline-flex; }

/* Sections */
.sec { padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 768px) { .sec { padding-top: 96px; padding-bottom: 96px; } }
.split { display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 1024px) { .split { flex-direction: row; gap: 64px; } .split > .lead { flex: 0 0 440px; } }
.lead { display: flex; flex-direction: column; gap: 20px; }
.lead p { font-size: 18px; line-height: 28px; }
h2 { font-size: clamp(36px, 4.5vw, 56px); line-height: 1; }
.section-head { display: flex; flex-direction: column; gap: 20px; max-width: 760px; margin-bottom: 40px; }
.section-head p { font-size: 18px; line-height: 28px; }
.rule-top { border-top: 2px solid var(--ink); }
@media (prefers-color-scheme: dark) { .rule-top { border-top-color: var(--fg); } }
.alt { background: var(--bg-alt); }

/* Hero */
.hero { padding-top: 48px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 48px; }
.hero-copy { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.hero h1 { font-size: clamp(56px, 9vw, 128px); line-height: .91; letter-spacing: -.035em; }
.hero .sub { max-width: 600px; font-size: 18px; line-height: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding-top: 8px; }
@media (min-width: 768px) { .hero { padding-top: 96px; padding-bottom: 112px; } .hero .sub { font-size: 22px; line-height: 34px; } }
@media (min-width: 1024px) {
  .hero { flex-direction: row; align-items: flex-end; gap: 64px; }
  .hero-copy { flex: 0 0 720px; }
  .term { flex: 1 1 0; }
}

/* Manifest card */
.term { min-width: 0; background: var(--card-bg); border-radius: 4px; border: 1px solid var(--card-line); color: #D8D8D2; }
.term-bar, .term-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); }
.term-bar { padding: 16px 24px; border-bottom: 1px solid var(--card-line); font-size: 13px; color: #fff; }
.term-bar span + span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-ink-muted); }
.term pre { padding: 24px; overflow-x: auto; font-size: 14px; line-height: 24px; color: #D8D8D2; }
.term-foot { padding: 18px 24px; border-top: 1px solid var(--card-line); font-size: 14px; color: #fff; }
.live { display: inline-flex; align-items: center; gap: 8px; background: var(--green); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 2px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* Product screenshots and the hero recording. */
.shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-alt); }
.hero { padding-bottom: 40px; }
.hero-media { padding-bottom: 64px; }
@media (min-width: 768px) { .hero { padding-bottom: 56px; } .hero-media { padding-bottom: 96px; } }
.demo figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.video-toggle { font-family: var(--mono); font-size: 13px; line-height: 20px; text-transform: uppercase; letter-spacing: .08em; color: var(--fg); background: none; border: 1px solid var(--line); border-radius: 2px; padding: 4px 10px; cursor: pointer; flex: none; white-space: nowrap; }
.shots { list-style: none; display: grid; grid-template-columns: 1fr; gap: 32px; }
.shots p { margin-top: 12px; font-size: 16px; line-height: 24px; }
.shots strong { color: var(--fg); }
@media (min-width: 1024px) { .shots { grid-template-columns: repeat(3, 1fr); } }

/* Problem: bill wall */
.bills { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.bill { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bill span { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.bill strong { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--fg); }
.bill em { font-style: normal; font-size: 15px; }
.bill-caption { margin-bottom: 20px; }
@media (min-width: 768px) { .bills { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .bills { grid-template-columns: repeat(6, 1fr); } }

/* Feature list (stack, catalogue, control plane) */
.grid-list { list-style: none; display: grid; grid-template-columns: 1fr; column-gap: 48px; flex: 1; }
.grid-list > li, .catalog-card, .trust-list li { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding: 20px 0; }
.grid-list h3, .catalog-card h3 { font-size: 20px; line-height: 28px; }
.grid-list p, .catalog-card p { font-size: 16px; line-height: 24px; }
.catalog-card > div { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 768px) { .grid-list, .catalog-grid { grid-template-columns: 1fr 1fr; } }
.catalog-grid { display: grid; grid-template-columns: 1fr; column-gap: 48px; }
.more { margin-top: 24px; }

/* Steps (home) */
.hstack { display: flex; flex-direction: column; gap: 40px; }
.hstack > * { flex: 1 1 0; }
@media (min-width: 768px) { .hstack { flex-direction: row; } }
.row-head { display: flex; flex-direction: column; gap: 24px; margin-bottom: 40px; }
.row-head p { max-width: 380px; font-size: 18px; line-height: 28px; }
@media (min-width: 768px) { .row-head { flex-direction: row; justify-content: space-between; align-items: flex-end; margin-bottom: 56px; } }
.how { list-style: none; }
.how li { display: flex; flex-direction: column; gap: 16px; border-top: 4px solid var(--ink); padding-top: 24px; }
.how li:last-child { border-top-color: var(--yellow); }
@media (prefers-color-scheme: dark) { .how li:not(:last-child) { border-top-color: var(--fg); } }
.how .n { font-size: clamp(64px, 7vw, 96px); line-height: .92; font-weight: 800; letter-spacing: -.04em; color: var(--fg); }
.how h3 { font-size: 24px; line-height: 32px; }
.how p { font-size: 17px; line-height: 26px; }
.control { margin-top: 56px; }
.control-grid { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0 32px; margin-top: 8px; }
.control-grid li { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding: 20px 0; }
.control-grid h3 { font-size: 18px; line-height: 26px; }
.control-grid p { font-size: 15px; line-height: 23px; }
@media (min-width: 600px) { .control-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .control-grid { grid-template-columns: repeat(4, 1fr); } }

/* Dark section: local by design */
.on-ink { background: var(--ink); color: var(--on-ink-text); }
.on-ink h2 { color: #fff; font-size: clamp(40px, 5vw, 72px); line-height: .97; }
.on-ink .lead p { font-size: 20px; line-height: 30px; }
.on-ink .label { color: var(--on-ink-muted); }
.on-ink .label.yellow { color: var(--yellow); }
.on-ink .split > .lead { flex-basis: 560px; }
.facts { flex: 1; border-bottom: 1px solid var(--ink-line); }
.facts > div { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--ink-line); padding: 28px 0; }
.facts dt { font-family: var(--mono); font-size: 13px; line-height: 30px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-ink-muted); flex: none; }
.facts dd { font-size: 20px; line-height: 30px; font-weight: 500; color: #fff; }
@media (min-width: 640px) { .facts > div { flex-direction: row; gap: 32px; } .facts dt { width: 120px; } .facts dd { font-size: 22px; } }

/* Self-host strip */
.install { display: block; background: var(--ink); color: #fff; border-radius: 4px; padding: 20px 24px; font-size: 14px; line-height: 24px; overflow-x: auto; margin-bottom: 32px; border: 1px solid var(--card-line); }
.install code { white-space: pre; }
.strip { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.strip p { font-size: 18px; line-height: 28px; max-width: 760px; }
.strip strong { color: var(--fg); }
.note { margin-top: 20px; font-size: 15px; }
.note a { color: var(--fg); border-bottom: 2px solid var(--yellow); }
@media (min-width: 768px) { .strip { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; } }

/* Trust */
.proof { border-top: 4px solid var(--yellow); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.proof h3 { font-size: 24px; line-height: 32px; }
.trust-list { list-style: none; }
.trust-list strong { display: block; color: var(--fg); font-size: 20px; line-height: 28px; font-weight: 700; }
.trust-list .d { font-size: 16px; line-height: 24px; }

/* Yellow band: contact / next step */
.band { background: var(--yellow); color: var(--ink); }
.band h2, .band h3 { color: var(--ink); font-size: clamp(40px, 5vw, 72px); line-height: .97; }
.band .label { color: var(--ink); }
.band p { color: var(--ink); font-size: 20px; line-height: 30px; font-weight: 500; }
.band-grid { display: flex; flex-direction: column; gap: 40px; }
.band-copy { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.band .alt-channel { font-size: 17px; }
.band .alt-channel a, .band p a { border-bottom: 2px solid var(--ink); font-weight: 700; }
@media (min-width: 1024px) { .band-grid { flex-direction: row; gap: 64px; align-items: center; justify-content: space-between; } .band-grid.form-side { align-items: flex-start; } .band-grid > form { flex: 0 0 520px; } }

.lead-form { display: grid; grid-template-columns: 1fr; gap: 16px; background: #fff; color: var(--ink); padding: 24px; border-radius: 4px; border: 2px solid var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #3A3B36; }
.field .opt { text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  font: 500 16px/24px var(--display); color: var(--ink); background: #fff; width: 100%;
  border: 1px solid #8A8B84; border-radius: 2px; padding: 10px 12px;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.lead-form .btn { background: var(--ink); color: #fff; padding: 16px 24px; font-size: 18px; }
.form-note { font-size: 14px !important; line-height: 20px !important; font-weight: 400 !important; color: #3A3B36 !important; }
@media (min-width: 600px) { .lead-form { grid-template-columns: 1fr 1fr; } .field-full, .lead-form .btn, .form-note { grid-column: 1 / -1; } }
.band .lead-form :focus-visible { outline-color: var(--ink); }

/* Inner page hero */
.page-hero { padding-top: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.page-hero .wrap { display: flex; flex-direction: column; gap: 24px; }
.page-hero h1 { font-size: clamp(40px, 6.5vw, 88px); line-height: .96; letter-spacing: -.035em; max-width: 1000px; }
.page-hero p { max-width: 720px; font-size: 20px; line-height: 30px; }
@media (min-width: 768px) { .page-hero { padding-top: 96px; padding-bottom: 88px; } }

/* Self-host steps */
.steps { display: flex; flex-direction: column; counter-reset: step; }
.step { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 16px; border-top: 1px solid var(--line); padding: 28px 0; }
.step::before { content: counter(step); font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--fg); }
.step > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 760px; }
.step h3 { font-size: 24px; line-height: 32px; }
.step p { font-size: 17px; line-height: 26px; }
.step a { color: var(--fg); border-bottom: 2px solid var(--yellow); }
.step pre { background: var(--ink); color: #fff; border-radius: 4px; padding: 16px 20px; overflow-x: auto; font-size: 14px; line-height: 24px; border: 1px solid var(--card-line); }
.step:last-child { border-bottom: 1px solid var(--line); }

/* Footer */
footer.site { background: var(--ink); color: var(--on-ink-text); padding-top: 56px; padding-bottom: 48px; }
.foot-cols { display: grid; grid-template-columns: 1fr; gap: 40px; }
.foot-brand { display: flex; flex-direction: column; gap: 16px; max-width: 360px; }
.fbrand { font-size: 32px; display: inline-flex; }
.foot-brand p { font-size: 15px; line-height: 22px; color: var(--on-ink-muted); }
.foot-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 22px; font-weight: 500; }
.foot-col h4 { font-family: var(--mono); font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--on-ink-muted); margin-bottom: 4px; }
.foot-col a { color: var(--on-ink-text); }
.foot { display: flex; flex-direction: column; gap: 6px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ink-line); font-size: 14px; color: var(--on-ink-muted); }
@media (min-width: 640px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .foot-cols { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .foot-brand { grid-column: auto; } .foot { flex-direction: row; justify-content: space-between; } }
.band-grid > div:first-child { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.band .link-ul { color: var(--ink); border-bottom-color: var(--ink); }
