/* ============================================================================
   Martomato landing — styles.css
   Redesign 2026-06-12. Vanilla CSS, no preprocessor, no build step, no
   webfonts (system stacks only — first paint is instant on shared hosting).

   COMPONENT VOCABULARY (matches class names; reuse these, don't fork):
     .wrap        — 1120px content column
     .kicker      — numbered uppercase section eyebrow ("01 · The data path")
     .cta / .cta-ghost — primary / outline action
     .status-pill — live project-status chip
     .sec / .dkz  — section band; .dkz = dark zone (hero, canvas, SDK, closing)
     .zc-*        — zero-copy data-path diagram (the page's centrepiece)
     .jnode/.jchip— journey node: colour token (--nc) + BPMN shape class
                    (.s-event circle · .s-gate diamond · .s-task rounded square
                     · .s-goal ringed circle) — mirrors app/shell.css exactly
     .canvas-*    — static journey-canvas figure (dot grid + nodes + SVG edges)
     .capgrid     — spec-sheet capabilities grid (mono indices)
     .spec        — key/value spec table (SDK section)
     .seclist     — security & compliance rows
     .roadmap-*   — milestone timeline
     .faq-*       — details/summary accordion

   THEME MODEL: two zones. Light zones read from the semantic tokens below;
   dark zones (.dkz) re-point the SAME tokens, so every component works in
   both. prefers-color-scheme: dark re-points the light zone too — the page
   becomes all-dark with .dkz bands kept a step warmer for rhythm.
   ========================================================================= */

:root {
  /* brand */
  --accent: #c83a1e;        /* tomato — matches app --primary oklch(.584 .203 27.7) */
  --accent-hi: #e04826;     /* on dark surfaces */
  --accent-dark: #861d0e;

  /* fixed dark-zone palette (used by .dkz in BOTH schemes) */
  --dk: #211b16;
  --dk-2: #2b241d;
  --dk-line: #3d352c;
  --dk-text: #f6f1ea;
  --dk-mut: #b5aa9b;

  /* semantic zone tokens — light values */
  --bg: #fbf7f2;
  --bg-soft: #f3ede4;
  --card: #ffffff;
  --text: #1c1814;
  --mut: #57514a;
  --line: #e3dcd1;

  /* type — system stacks only (hard constraint: no webfonts) */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* journey node category tokens — LIGHT set, verbatim from app/shell.css.
     Single source of truth is the app; if the app changes, change these. */
  --node-trigger: oklch(0.60 0.13 150);
  --node-timing: oklch(0.70 0.12 78);
  --node-activity: oklch(0.60 0.10 195);
  --node-channel: oklch(0.56 0.12 250);
  --node-logic: oklch(0.54 0.15 300);
  --node-integration: oklch(0.52 0.045 280);
  --node-data: oklch(0.64 0.11 115);
  --node-goal: oklch(0.56 0.13 335);
  --node-terminal: oklch(0.50 0 0);
}

/* dark zones re-point the semantic tokens + use the app's DARK node set */
.dkz {
  --bg: var(--dk);
  --bg-soft: var(--dk-2);
  --card: var(--dk-2);
  --text: var(--dk-text);
  --mut: var(--dk-mut);
  --line: var(--dk-line);
  --node-trigger: oklch(0.72 0.15 150);
  --node-timing: oklch(0.80 0.13 82);
  --node-activity: oklch(0.74 0.11 195);
  --node-channel: oklch(0.68 0.14 250);
  --node-logic: oklch(0.68 0.16 300);
  --node-integration: oklch(0.66 0.05 280);
  --node-data: oklch(0.76 0.12 115);
  --node-goal: oklch(0.70 0.14 335);
  --node-terminal: oklch(0.66 0 0);
  background: var(--bg);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171310;
    --bg-soft: #1e1813;
    --card: #211c16;
    --text: #f3ede4;
    --mut: #b1a698;
    --line: #342d25;
    /* node tokens flip to the app's dark set page-wide */
    --node-trigger: oklch(0.72 0.15 150);
    --node-timing: oklch(0.80 0.13 82);
    --node-activity: oklch(0.74 0.11 195);
    --node-channel: oklch(0.68 0.14 250);
    --node-logic: oklch(0.68 0.16 300);
    --node-integration: oklch(0.66 0.05 280);
    --node-data: oklch(0.76 0.12 115);
    --node-goal: oklch(0.70 0.14 335);
    --node-terminal: oklch(0.66 0 0);
  }
  /* keep the dark bands one warm step apart from the page for rhythm */
  .dkz { --bg: #211b16; }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.92em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 48px; }

::selection { background: color-mix(in oklab, var(--accent) 25%, transparent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- type scale (direction C: heavy sans, tight tracking) ---------- */
.display {
  font-weight: 800;
  font-size: clamp(52px, 7.4vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.h2 {
  font-weight: 750;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 22ch;
  text-wrap: balance;
}
.hot { color: var(--accent); }
.dkz .hot { color: var(--accent-hi); }

.kicker {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.dkz .kicker { color: var(--accent-hi); }
.kicker .n { font-family: var(--mono); font-weight: 600; letter-spacing: 0.04em; color: var(--mut); }

.sub { font-size: 17px; color: var(--mut); max-width: 60ch; margin-top: 18px; text-wrap: pretty; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 22px 48px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -0.03em; }
.brand-mark {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--accent-hi), var(--accent) 62%, var(--accent-dark));
}
.site-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 550; color: var(--mut); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta { color: var(--accent); }

/* ---------- buttons & pills ---------- */
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 650; font-size: 15px;
  padding: 14px 24px; border-radius: 10px;
  transition: background 0.15s ease;
}
.cta:hover { background: var(--accent-hi); }
.cta-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none; font-weight: 550; font-size: 15px;
  padding: 14px 20px; border-radius: 10px; border: 1px solid var(--line);
  transition: border-color 0.15s ease;
}
.cta-ghost:hover { border-color: var(--mut); }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--mut);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-hi); }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 38px; }

/* ---------- sections ---------- */
.sec { padding: 92px 0; }
main > .sec + .sec:not(.dkz) { border-top: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { padding: 86px 0 92px; }
.hero .asks {
  font-size: 17px; color: var(--mut); margin-bottom: 22px;
}
.hero .asks q { font-family: var(--serif); font-style: italic; color: var(--text); quotes: "\201C" "\201D"; }
.hero .lede {
  font-size: 18.5px; line-height: 1.62; color: var(--mut);
  max-width: 58ch; margin-top: 30px; text-wrap: pretty;
}
.hero .lede b { color: var(--text); font-weight: 600; }

/* ---------- zero-copy diagram (.zc) — the centrepiece ---------- */
.zc {
  display: grid;
  grid-template-columns: 1.15fr auto 1fr auto 0.85fr;
  align-items: stretch;
  margin-top: 48px;
}
.zc-zone { display: flex; flex-direction: column; gap: 10px; }
.zc-tag {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--mut);
  margin-bottom: 2px;
}
.zc-box { padding: 15px 17px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.zc-box strong { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 3px; }
.zc-box span { display: block; font-size: 12.5px; line-height: 1.5; color: var(--mut); }
.zc-box.mono { font-family: var(--mono); font-size: 12px; line-height: 1.65; color: var(--mut); background: var(--bg-soft); }
.zc-box.mono b { color: var(--accent); font-weight: 600; }
/* the boundary — the one element this page exists to make unmissable */
.zc-bound { position: relative; width: 76px; display: flex; align-items: center; justify-content: center; }
.zc-bound::before {
  content: ""; position: absolute; top: -10px; bottom: -10px; left: 50%;
  border-left: 3px dashed var(--accent); opacity: 0.9;
}
.zc-bound span {
  position: relative; background: var(--bg); color: var(--accent);
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  writing-mode: vertical-rl; padding: 10px 2px; text-align: center;
}
.zc-arrow { width: 56px; display: flex; align-items: center; justify-content: center; color: var(--mut); font-size: 18px; }
.zc-cross { font-size: 12px; color: var(--mut); line-height: 1.5; margin-top: 8px; max-width: 36ch; }
.zc-cross b { color: var(--text); font-weight: 650; }
.zc-cap {
  font-family: var(--serif); font-style: italic; font-size: 15px;
  color: var(--mut); text-align: center; margin-top: 30px;
}

/* ---------- journey node language (.jnode/.jchip) — mirrors the app ---------- */
.t-trigger { --nc: var(--node-trigger); }
.t-timing { --nc: var(--node-timing); }
.t-activity { --nc: var(--node-activity); }
.t-channel { --nc: var(--node-channel); }
.t-logic { --nc: var(--node-logic); }
.t-integration { --nc: var(--node-integration); }
.t-data { --nc: var(--node-data); }
.t-goal { --nc: var(--node-goal); }
.t-terminal { --nc: var(--node-terminal); }

.jchip {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--nc) 16%, transparent);
  border: 1.5px solid color-mix(in oklab, var(--nc) 55%, transparent);
}
.jchip::after { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--nc); }
.jchip.s-task { border-radius: 9px; }                          /* task: rounded square */
.jchip.s-event { border-radius: 50%; }                         /* event: circle */
.jchip.s-event::after { border-radius: 50%; }
.jchip.s-end { border-radius: 50%; box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4.5px var(--nc); } /* exit: bold double ring */
.jchip.s-end::after { border-radius: 50%; }
.jchip.s-gate { border-radius: 7px; transform: rotate(45deg); } /* gateway: diamond */
.jchip.s-gate::after { transform: rotate(-45deg); }
.jchip.s-goal { border-radius: 50%; }
.jchip.s-goal::after { border-radius: 50%; box-shadow: 0 0 0 2.5px color-mix(in oklab, var(--nc) 35%, transparent); }

/* ---------- journey canvas figure ---------- */
.canvas-frame {
  margin-top: 48px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-soft); overflow-x: auto;
}
.canvas-stage {
  position: relative; width: 1020px; height: 440px; margin: 0 auto;
  background-image: radial-gradient(color-mix(in oklab, var(--text) 14%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: 13px 13px;
}
.canvas-stage .edges { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-stage .edges path { fill: none; stroke: color-mix(in oklab, var(--text) 32%, transparent); stroke-width: 1.5; }
.cnode {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 14px 10px 10px; min-width: 158px;
  box-shadow: 0 1px 2px rgba(20, 12, 4, 0.05);
}
.dkz .cnode { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.cnode strong { display: block; font-size: 13px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.cnode em { display: block; font-style: normal; font-size: 11px; color: var(--mut); line-height: 1.3; }
.branch-tag {
  position: absolute; font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line);
}
.branch-tag.no { color: var(--accent-hi); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
/* taxonomy legend under the canvas */
.jlegend { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-top: 30px; }
.jlegend .jl { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--mut); }
.jlegend .jchip { width: 22px; height: 22px; flex-basis: 22px; }
.jlegend .jchip::after { width: 7px; height: 7px; border-radius: 2px; }
.jlegend .jl b { color: var(--text); font-weight: 600; }

/* ---------- capabilities grid (spec-sheet treatment, direction B) ---------- */
.capgrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-right: 0; border-bottom: 0;
  background: var(--card); margin-top: 44px;
}
.capcell { padding: 24px 22px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.capcell .idx { font-family: var(--mono); font-size: 11px; color: var(--accent); display: block; margin-bottom: 16px; }
.capcell h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 7px; }
.capcell p { font-size: 13.5px; line-height: 1.55; color: var(--mut); }

/* ---------- SDK / developers ---------- */
.sdk-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: start; margin-top: 44px; }
.codecard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.codecard .codehead {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mut); padding: 10px 18px; border-bottom: 1px solid var(--line);
}
.codecard pre { margin: 0; padding: 20px 18px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--text); }
.codecard .c { color: var(--mut); }                 /* comment   */
.codecard .s { color: var(--node-trigger); }        /* string    */
.codecard .k { color: var(--accent-hi); }           /* tag/key   */
.spec { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec .sphead {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mut); padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.sprow { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sprow:last-child { border-bottom: 0; }
.sprow .k { color: var(--mut); }
.sprow .v { font-family: var(--mono); font-size: 12.5px; text-align: right; }
.sprow .v.hot { color: var(--accent-hi); }

/* ---------- security & compliance rows ---------- */
.seclist { margin-top: 44px; border-top: 1px solid var(--line); }
.secrow {
  display: grid; grid-template-columns: 56px 300px 1fr; gap: 26px;
  padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.secrow .n { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.secrow h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.015em; }
.secrow p { font-size: 14.5px; color: var(--mut); }
.secrow p code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 12px; }

/* ---------- roadmap ---------- */
.roadmap-list { list-style: none; padding: 0; margin: 44px 0 0; border-top: 1px solid var(--line); }
.roadmap-item {
  display: grid; grid-template-columns: 130px 1fr; gap: 26px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.roadmap-when { font-family: var(--mono); font-size: 13px; color: var(--mut); padding-top: 3px; }
.roadmap-item.is-current .roadmap-when { color: var(--accent); font-weight: 700; }
.roadmap-item h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 5px; }
.roadmap-item p { font-size: 14.5px; color: var(--mut); max-width: 62ch; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 44px; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 22px 4px; font-size: 17px; font-weight: 650; letter-spacing: -0.015em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--mono); font-size: 18px; color: var(--accent); flex: 0 0 auto; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-body { padding: 0 4px 24px; }
.faq-body p { font-size: 15px; color: var(--mut); max-width: 70ch; }
.faq-body code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; }

/* ---------- closing ---------- */
.closing { text-align: left; }
.closing .asks { font-size: 17px; color: var(--mut); margin-bottom: 20px; }
.closing .asks q { font-family: var(--serif); font-style: italic; color: var(--text); quotes: "\201C" "\201D"; }
.closing .lede { font-size: 17px; color: var(--mut); max-width: 58ch; margin-top: 24px; }

/* ---------- cookie / consent banner (gates GA4 in the EU) ----------
   Shown only when no prior consent choice is stored. GA4 is loaded ONLY
   after an explicit Accept; Decline keeps analytics off. The first-party
   m.js collector is unaffected — it has its own consent gate. */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; box-shadow: 0 8px 30px rgba(20, 12, 4, 0.18);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 13px; color: var(--mut); line-height: 1.5; flex: 1 1 240px; margin: 0; }
.cookie-banner p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cookie-actions button {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--line);
}
.cookie-accept { background: var(--accent); color: #fff; border-color: var(--accent); }
.cookie-accept:hover { background: var(--accent-hi); }
.cookie-decline { background: transparent; color: var(--text); }
.cookie-decline:hover { border-color: var(--mut); }

/* ---------- footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 30px 48px 40px;
  font-size: 13px; color: var(--mut);
}
.site-footer a { color: inherit; }

/* ---------- entrance reveal (progressive enhancement; content visible w/o JS) ----------
   Hidden state is gated behind the `.js` class (added by an inline head script) so
   that if JS never runs — or a bundler defers body insertion past observer setup —
   content stays fully visible. */
@media (prefers-reduced-motion: no-preference) {
  html.js .fade-in { opacity: 0.001; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
  html.js .fade-in.visible { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .wrap { padding: 0 28px; }
  .site-header { padding: 18px 28px; }
  .site-nav a:not(.nav-cta) { display: none; }
  .sec { padding: 64px 0; }
  .zc { grid-template-columns: 1fr; gap: 0; }
  .zc-bound { width: auto; height: 64px; margin: 4px 0; }
  .zc-bound::before { border-left: 0; border-top: 3px dashed var(--accent); left: -8px; right: -8px; top: 50%; bottom: auto; }
  .zc-bound span { writing-mode: horizontal-tb; padding: 2px 10px; }
  .zc-arrow { width: auto; height: 40px; transform: rotate(90deg); }
  .capgrid { grid-template-columns: 1fr; }
  .sdk-grid { grid-template-columns: 1fr; gap: 28px; }
  .secrow { grid-template-columns: 40px 1fr; }
  .secrow p { grid-column: 2; }
  .roadmap-item { grid-template-columns: 92px 1fr; gap: 18px; }
}
