/* 10 Benches — brand stylesheet.
   Palette (brand kit): Bench Ink #181820 · Spark Orange #FF6B1A ·
   Spark Yellow #FFC531 · Bench Paper #FAF6EF · Card white #FFFFFF.
   Display: Space Grotesk. Body: Inter. */

:root {
  --ink: #181820;
  --ink-soft: #55555f;
  --spark: #FF6B1A;
  --yellow: #FFC531;
  --paper: #FAF6EF;
  --card: #FFFFFF;
  --line: #e7e0d2;
  --grad: linear-gradient(92deg, #FF6B1A 0%, #FFC531 100%);
  --radius: 14px;
  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.02em; }

a { color: var(--ink); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 22px; min-height: 64px;
}
.logo-lockup { height: 38px; width: auto; display: block; }
.logo-icon { height: 36px; width: 36px; border-radius: 9px; display: block; }
.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; }
.main-nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.main-nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover { color: var(--spark); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
}
.btn-primary { background: var(--grad); border: none; color: var(--ink); box-shadow: 0 6px 18px rgba(255, 107, 26, 0.28); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-dark { background: var(--ink); color: #fff; border: none; }
.btn-small { padding: 8px 16px; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.hero h1 { font-size: 56px; line-height: 1.02; margin: 0 0 18px; }
.hero h1 .grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .promise { font-size: 19px; color: var(--ink-soft); margin: 0 0 28px; max-width: 46ch; }
.hero .cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hero .fineprint { font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; }

/* demo moment card */
.demo-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 18px 44px rgba(24, 24, 32, 0.10);
}
.demo-label { font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.prompt-bubble {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 15.5px;
}
.demo-arrow { text-align: center; font-size: 22px; margin: 10px 0; color: var(--spark); font-weight: 700; }
.demo-result h3 { margin: 0 0 6px; font-size: 20px; }
.demo-result .sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 12px; }
.demo-result pre {
  background: var(--ink); color: #f5f1e8; border-radius: 10px; padding: 14px;
  font-family: var(--mono); font-size: 12px; line-height: 1.5; overflow-x: auto; margin: 0 0 12px;
  max-height: 240px; overflow-y: auto;
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12.5px; font-weight: 600; background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px;
}
.chip.hot { background: var(--grad); border: none; }

/* ---------- sections ---------- */
section.block { padding: 46px 0; }
section.block h2 { font-size: 32px; margin: 0 0 8px; }
section.block .lede { color: var(--ink-soft); font-size: 17px; margin: 0 0 26px; max-width: 62ch; }

.showcase {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.showcase h3 { margin-top: 0; font-size: 22px; }
.showcase table { width: 100%; border-collapse: collapse; font-size: 14px; }
.showcase th, .showcase td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.showcase th { font-family: var(--display); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.showcase pre {
  background: var(--ink); color: #f5f1e8; border-radius: 10px; padding: 14px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5; overflow: auto; max-height: 420px; margin: 0;
}

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
.plan.featured { border: 2px solid var(--spark); }
.plan .pname { font-family: var(--display); font-weight: 700; font-size: 18px; }
.plan .price { font-family: var(--display); font-size: 34px; font-weight: 700; }
.plan .price span { font-size: 15px; color: var(--ink-soft); font-weight: 500; }
.plan .credits { font-weight: 600; }
.plan p { color: var(--ink-soft); font-size: 14px; margin: 2px 0 12px; flex: 1; }
.plan .badge {
  align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; background: var(--grad); border-radius: 999px; padding: 3px 10px;
}
.pricing-note { color: var(--ink-soft); font-size: 14.5px; margin-top: 18px; }

/* ---------- make it real teaser ---------- */
.teaser {
  background: var(--ink); color: #f5f1e8; border-radius: var(--radius);
  padding: 34px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap;
}
.teaser h2 { color: #fff; margin: 0 0 6px; font-size: 28px; }
.teaser p { margin: 0; color: #c9c9d2; max-width: 58ch; }
.teaser .soon {
  margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 14px;
  border: 1px solid var(--yellow); color: var(--yellow); border-radius: 999px; padding: 8px 16px;
  text-transform: uppercase; letter-spacing: 0.07em;
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 40px; margin-top: 30px; }
.site-footer .wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.site-footer .small { color: var(--ink-soft); font-size: 13.5px; width: 100%; }

/* ---------- builder ---------- */
.builder-head { padding: 28px 0 6px; }
.builder-head h1 { font-size: 32px; margin: 0 0 6px; }
.builder-head p { color: var(--ink-soft); margin: 0; }
.credit-pill {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.credit-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); }
.account-bar { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.account-bar .who { font-size: 14px; color: var(--ink-soft); }

.chat-shell {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 18px 0 40px; display: flex; flex-direction: column; overflow: hidden;
}
.chat-log { padding: 22px; display: flex; flex-direction: column; gap: 16px; min-height: 320px; }
.msg { max-width: 88%; padding: 13px 16px; border-radius: 14px; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot strong { font-family: var(--display); }

.chat-form { border-top: 1px solid var(--line); padding: 14px; display: flex; gap: 10px; background: #fff; }
.chat-form textarea {
  flex: 1; min-width: 0; resize: none; font-family: var(--body); font-size: 15px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 12px; min-height: 46px; max-height: 120px;
}
.examples { padding: 0 22px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.examples .chip { cursor: pointer; background: #fff; }
.examples .chip:hover { border-color: var(--spark); color: var(--spark); }
.examples-label { width: 100%; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }

/* params + project cards (rendered inside chat) */
.card {
  align-self: stretch; max-width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { margin: 0 0 4px; font-size: 20px; overflow-wrap: anywhere; }
.account-bar .who { overflow-wrap: anywhere; }
/* Interactive chips are buttons: give them a real tap target. Decorative
   span chips (demo card) keep their compact size. */
button.chip { min-height: 44px; display: inline-flex; align-items: center; }
.card .sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 14px; }
.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-bottom: 6px; }
.param label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.param .help { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.param input[type="number"], .param select, .param input[type="text"], .text-input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--body); font-size: 14.5px; background: #fff;
}
.param.bool { display: flex; gap: 9px; align-items: flex-start; }
.param.bool input { margin-top: 3px; }
.param.bool label { margin: 0; }
.card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.cost-note { font-size: 13px; color: var(--ink-soft); }
.project-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.project-tabs .chip { cursor: pointer; background: var(--paper); }
.project-tabs .chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.project-pane pre {
  background: var(--ink); color: #f5f1e8; border-radius: 10px; padding: 14px;
  font-family: var(--mono); font-size: 12px; line-height: 1.55; overflow: auto; max-height: 430px; margin: 0;
}
.project-pane table { width: 100%; border-collapse: collapse; font-size: 14px; }
.project-pane th, .project-pane td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.project-pane ol { margin: 6px 0; padding-left: 20px; }
.project-pane li { margin-bottom: 6px; font-size: 14.5px; }

/* ---------- modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(24, 24, 32, 0.55);
  display: none; align-items: center; justify-content: center; z-index: 80; padding: 18px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); max-width: 430px; width: 100%;
  padding: 26px; max-height: 88vh; overflow-y: auto;
}
.modal.wide { max-width: 760px; }
.modal h2 { margin: 0 0 6px; font-size: 24px; }
.modal .sub { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 16px; }
.modal .field { margin-bottom: 13px; }
.modal .field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.modal .error { color: #b3261e; font-size: 14px; min-height: 20px; margin: 8px 0; }
.modal .switch { font-size: 14px; color: var(--ink-soft); margin-top: 14px; }
.modal .switch button { background: none; border: none; color: var(--spark); font-weight: 700; cursor: pointer; font-size: 14px; padding: 0; }
.modal .plans { grid-template-columns: repeat(2, 1fr); }
.demo-note {
  background: var(--paper); border: 1px dashed var(--spark); border-radius: 10px;
  padding: 10px 13px; font-size: 13px; color: var(--ink-soft); margin-bottom: 14px;
}

/* ---------- simulator ---------- */
.sim-panel h3 { margin: 0 0 4px; font-size: 20px; }
.sim-panel h4 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.sim-note {
  background: var(--paper); border: 1px dashed var(--spark); border-radius: 10px;
  padding: 10px 13px; font-size: 13.5px; color: var(--ink-soft); margin: 0 0 10px;
}
.sim-controls { display: flex; gap: 14px; align-items: center; margin: 12px 0 16px; flex-wrap: wrap; }
.sim-controls label { font-size: 13.5px; font-weight: 600; }
.sim-controls select {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--body); font-size: 14px; background: #fff;
}
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.sim-input { margin-bottom: 13px; font-size: 14px; }
.sim-input label { font-weight: 600; font-size: 13.5px; }
.sim-input input[type="range"] { width: 100%; accent-color: var(--spark); display: block; margin: 6px 0 2px; }
.sim-input input[type="checkbox"] { margin-right: 4px; }
.sim-input-value { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; }
.sim-out-row { display: flex; gap: 10px; align-items: center; margin: 7px 0; font-size: 14.5px; flex-wrap: wrap; }
.sim-out-label { color: var(--ink-soft); font-size: 13px; font-weight: 600; min-width: 118px; }
.sim-led {
  width: 17px; height: 17px; border-radius: 50%; background: #d9d3c3;
  border: 1px solid var(--line); display: inline-block; flex: none;
}
.sim-led.on { background: var(--yellow); border-color: #d9a400; box-shadow: 0 0 12px 3px rgba(255, 197, 49, 0.65); }
.sim-bar {
  height: 14px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; position: relative; overflow: hidden; margin: 8px 0 12px;
}
.sim-bar .fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--grad); }
.sim-bar .marker { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--ink); }
.sim-scene { border-radius: 10px; border: 1px solid var(--line); padding: 16px; min-height: 96px; margin-bottom: 12px; }
.sim-lamp {
  width: 28px; height: 28px; border-radius: 50%; background: #cfc9ba;
  border: 1px solid rgba(0, 0, 0, 0.25); margin-bottom: 10px;
}
.sim-lamp.on { background: var(--yellow); box-shadow: 0 0 30px 10px rgba(255, 197, 49, 0.8); }
.sim-scene-text { color: #f5f1e8; font-size: 13.5px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
.sim-log {
  font-family: var(--mono); font-size: 12px; background: var(--ink); color: #f5f1e8;
  border-radius: 10px; padding: 10px 12px; max-height: 148px; overflow-y: auto; line-height: 1.6;
}
.sim-graph { width: 100%; height: 64px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.sim-track {
  height: 20px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; position: relative; margin: 8px 0 12px;
}
.sim-zone { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(179, 38, 30, 0.30); border-radius: 999px 0 0 999px; }
.sim-obj {
  position: absolute; top: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); transform: translateX(-7px);
}
.sim-dial {
  width: 132px; height: 70px; border: 1px solid var(--line); border-bottom: none;
  border-radius: 132px 132px 0 0; background: var(--paper); position: relative; margin: 6px 0 12px;
}
.sim-arm {
  position: absolute; left: 50%; bottom: 0; width: 5px; height: 56px; margin-left: -2.5px;
  background: var(--spark); border-radius: 3px; transform-origin: 50% 100%;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .showcase { grid-template-columns: 1fr; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 42px; }
  .param-grid, .sim-grid { grid-template-columns: 1fr; }
  .msg { max-width: 96%; }
}
@media (max-width: 560px) {
  .plans, .modal .plans { grid-template-columns: 1fr; }
  .main-nav a:not(.btn) { display: none; }
  /* Builder header carries brand + credit pill + account bar: at phone
     widths that row cannot fit on one line, so let it wrap instead of
     overflowing horizontally. */
  .site-header .wrap { flex-wrap: wrap; gap: 8px 14px; padding-top: 8px; padding-bottom: 8px; }
  .main-nav { flex-wrap: wrap; gap: 10px; }
  .account-bar { flex-wrap: wrap; margin-left: 0; }
  .chat-log { padding: 14px; }
  .card { padding: 16px; }
  .project-pane table { font-size: 13px; }
}
