/* Kitchen Vision — public site.
 *
 * One external stylesheet, deliberately. It means the CSP can be
 * `style-src 'self'` with no hashes and no 'unsafe-inline', which in turn
 * means no `style="..."` attribute anywhere in the HTML — a strict CSP blocks
 * those too. Presentation attributes on SVG (fill, stroke) are not affected
 * and are used instead.
 *
 * Palette values are the ones already validated in src/api/static/dashboard.html,
 * so the marketing page and the product look like the same company.
 * --muted is deliberately NOT used for body text: it is ~2.8:1 on the light
 * plane. All secondary text uses --text-secondary (~7.5:1).
 */

:root {
  color-scheme: light;
  --plane: #f9f9f7;
  --surface-1: #fcfcfb;
  --surface-2: #f1f0ec;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --border: rgba(11, 11, 11, 0.12);
  --border-strong: rgba(11, 11, 11, 0.22);
  --accent: #1f5fa8;
  --accent-text: #ffffff;
  --accent-wash: rgba(42, 120, 214, 0.08);
  --warn-wash: rgba(184, 130, 15, 0.10);
  --warn-edge: #8a6209;
  --rule: #e1e0d9;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --plane: #0d0d0d;
    --surface-1: #1a1a19;
    --surface-2: #222221;
    --text-primary: #ffffff;
    --text-secondary: #c9c8bd;
    --border: rgba(255, 255, 255, 0.14);
    --border-strong: rgba(255, 255, 255, 0.28);
    --accent: #6fb0f5;
    --accent-text: #0b0b0b;
    --accent-wash: rgba(57, 135, 229, 0.14);
    --warn-wash: rgba(250, 178, 25, 0.12);
    --warn-edge: #fab219;
    --rule: #2c2c2a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --plane: #0d0d0d;
  --surface-1: #1a1a19;
  --surface-2: #222221;
  --text-primary: #ffffff;
  --text-secondary: #c9c8bd;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.28);
  --accent: #6fb0f5;
  --accent-text: #0b0b0b;
  --accent-wash: rgba(57, 135, 229, 0.14);
  --warn-wash: rgba(250, 178, 25, 0.12);
  --warn-edge: #fab219;
  --rule: #2c2c2a;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--plane);
  color: var(--text-primary);
  font: 17px/1.62 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* The whole page is built to fit; this is a guard, not a layout tool. */
  overflow-x: hidden;
}

/* ---- skip link ---- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface-1);
  color: var(--text-primary);
  padding: 10px 14px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  z-index: 10;
}
.skip:focus { left: 12px; top: 12px; }

/* ---- links, focus ---- */
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- shell ---- */
.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 22px;
}
.prose { max-width: 68ch; }

/* ---- header ---- */
.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--surface-1);
}
.head-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
}
.brand svg { display: block; flex: none; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}
.site-nav a { color: var(--text-secondary); text-decoration: none; }
.site-nav a:hover { color: var(--text-primary); text-decoration: underline; }

/* ---- hero ---- */
.hero { padding: 62px 0 46px; }
h1 {
  font-size: clamp(30px, 5.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 660;
  margin: 0 0 22px;
  max-width: 22ch;
}
.lede {
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 30px;
  max-width: 60ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 20px;
  min-height: 46px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.cta-note { font-size: 15px; color: var(--text-secondary); }

/* ---- sections ---- */
section { padding: 44px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }
h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 640;
  margin: 0 0 8px;
  max-width: 30ch;
}
h3 {
  font-size: 17px;
  font-weight: 650;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.kicker {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
.after-h2 { margin-top: 18px; }

ul.plain, ul.checks { padding-left: 0; list-style: none; margin: 0 0 16px; }
ul.checks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  max-width: 66ch;
}
ul.checks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
}
ol.steps {
  margin: 18px 0 0;
  padding-left: 24px;
  max-width: 66ch;
}
ol.steps li { margin-bottom: 14px; padding-left: 4px; }

/* ---- cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 18px 20px;
}
.card p { font-size: 15.5px; color: var(--text-secondary); }

/* ---- the example report line ---- */
figure.report {
  margin: 24px 0 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 18px 20px;
  max-width: 62ch;
}
figure.report p {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 10px;
}
figure.report p + p { border-top: 1px solid var(--rule); padding-top: 12px; }
figcaption {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-top: 14px;
}

/* ---- the pipeline (HTML, not SVG: it reflows and the text stays real text) ---- */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.pipeline > li {
  flex: 1 1 190px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.pipeline .stage {
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.pipeline .what { font-size: 15.5px; margin: 0; }
.pipeline .onsite { border-color: var(--border-strong); background: var(--accent-wash); }
.pipeline-legend {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-top: 14px;
}

/* ---- the "in pilot" panel ---- */
.panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 20px 22px;
  background: var(--surface-2);
  margin-top: 22px;
  max-width: 70ch;
}
.panel.warn { background: var(--warn-wash); border-color: var(--warn-edge); }
.tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--warn-edge);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 12px;
}

/* ---- term / detail lists ----
 * These replaced two-column tables. A table at 390px either clips its second
 * column inside a scroll container — which is how the reader silently loses
 * the end of every sentence — or squeezes both columns into ribbons. A `dl`
 * laid out on a grid looks like a table on a desktop and stacks by itself on a
 * phone, with the term/detail pairing intact in both. Found by rendering at
 * 390px, not by any test.
 */
.defs-note {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin: 18px 0 0;
}
.defs {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  margin: 18px 0 0;
  font-size: 15.5px;
}
.defs dt {
  grid-column: 1;
  font-weight: 650;
  padding: 12px 22px 12px 0;
  border-top: 1px solid var(--rule);
}
.defs dd {
  grid-column: 2;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  color: var(--text-secondary);
  /* The detail column is otherwise ~85 characters at 940px, which is past the
     point where the eye reliably finds the next line. */
  max-width: 62ch;
}
.defs dd .lead { color: var(--text-primary); }

@media (max-width: 700px) {
  .defs { display: block; }
  .defs dt {
    padding: 16px 0 4px;
    font-size: 16.5px;
  }
  .defs dd { padding: 0 0 16px; border-top: 0; }
}

/* ---- form ---- */
.enquire { background: var(--surface-1); border-top: 1px solid var(--rule); }
form { max-width: 620px; margin-top: 24px; }
.field { margin-bottom: 18px; }
label {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.hint { font-weight: 400; color: var(--text-secondary); }
input[type="text"], input[type="email"], select, textarea {
  font: inherit;
  font-size: 16px;
  width: 100%;
  color: var(--text-primary);
  background: var(--plane);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 46px;
}
textarea { min-height: 110px; resize: vertical; }
select { min-height: 46px; }

.notice {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 18px 18px 20px;
  margin: 26px 0 22px;
  background: var(--plane);
}
.notice h3 { font-size: 16px; }
.notice p, .notice li { font-size: 15px; color: var(--text-secondary); }
.notice ul { margin: 0 0 14px; padding-left: 22px; }
.notice li { margin-bottom: 7px; }

.form-status {
  margin: 16px 0 0;
  font-size: 15.5px;
  max-width: 60ch;
}
.form-status:empty { margin: 0; }
.fallback { font-size: 15px; color: var(--text-secondary); margin-top: 14px; }

/* ---- footer ---- */
.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--surface-1);
  padding: 30px 0 40px;
  font-size: 15px;
  color: var(--text-secondary);
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
}
.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-foot p { margin: 0; max-width: 46ch; }

/* Email addresses and other unbreakable strings must never widen the page. */
.brk { overflow-wrap: anywhere; }

/* ---- narrow ---- */
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .hero { padding: 40px 0 34px; }
  section { padding: 34px 0; }
  h1 { max-width: none; }
  .wrap { padding: 0 18px; }
  .pipeline > li { flex-basis: 100%; }
  .btn { width: 100%; text-align: center; }
  .cta-row { align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
