/* AGV Simulation Studio public pages (home and cookie policy). Colours come from
   these tokens only; the light palette follows the visitor's system preference.
   The plant drawing reuses the app canvas roles: yellow paths, green pickups,
   rose drop-offs, violet zones. */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --wrap: 1180px;
  --gutter: 32px;

  --bg: #101214;
  --bg-alt: #15181b;
  --surface: #181b1f;
  --rule: #272c31;
  --rule-strong: #3a4147;
  --text: #d5d9dc;
  --text-strong: #f3f4f5;
  --muted: #9ba3aa;
  --faint: #858e95;
  --accent: #5eead4;
  --accent-hover: #99f6e4;
  --on-accent: #06201d;
  --link: #5eead4;
  --path: #facc15;
  --pick: #34d399;
  --drop: #fb7185;
  --charge: #60a5fa;
  --zone: #a78bfa;
  --cad: #4d565e;
  --grid: #1c2024;
  --shadow: #000000;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f8;
    --bg-alt: #eceff1;
    --surface: #ffffff;
    --rule: #dde1e4;
    --rule-strong: #c2c8cd;
    --text: #262c31;
    --text-strong: #0d1114;
    --muted: #525b63;
    --faint: #5c656d;
    --accent: #0f766e;
    --accent-hover: #0b5d56;
    --on-accent: #ffffff;
    --link: #0b6b64;
    --path: #d97706;
    --pick: #059669;
    --drop: #e11d48;
    --charge: #2563eb;
    --zone: #7c3aed;
    --cad: #a3abb2;
    --grid: #eef0f2;
    --shadow: #0d1114;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, svg { display: block; max-width: 100%; }
p { margin: 0; }
code { font: .92em var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--rule); background: var(--bg); }
.nav { display: flex; align-items: center; gap: 32px; height: 64px; }
.nav > .brand { margin-right: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex-shrink: 0; }
.brand-bg { fill: var(--accent); }
.brand-a { fill: none; stroke: var(--on-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav-links a { color: var(--muted); font-size: 14px; text-decoration: none; }
.nav-links a:hover { color: var(--text-strong); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang { color: var(--muted); font: 600 12px var(--mono); letter-spacing: .06em; text-decoration: none; }
.lang:hover { color: var(--text-strong); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 6px; font: 600 15px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn svg { width: 16px; height: 16px; transition: transform .15s; }
.btn:hover svg { transform: translateX(2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-line { border-color: var(--rule-strong); color: var(--text-strong); background: transparent; }
.btn-line:hover { border-color: var(--text); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }

/* Hero */
.hero { padding: 72px 0 0; }
h1 { max-width: 20ch; margin: 0; color: var(--text-strong); font: 600 clamp(40px, 5.6vw, 68px)/1.02 var(--font-display); letter-spacing: -.032em; }
.hero-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: end; margin-top: 32px; }
.lede { max-width: 580px; color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; }
.hero-actions { justify-self: end; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-note { margin-top: 12px; color: var(--faint); font-size: 13px; }

/* The plant drawing: a CAD sheet with an AGV network and a title strip */
.sheet-figure { margin: 56px 0 0; }
.sheet { border: 1px solid var(--rule-strong); border-radius: 4px; background: var(--surface); overflow: hidden; }
.sheet svg { width: 100%; height: auto; }
.s-grid { stroke: var(--grid); stroke-width: 1; }
.s-frame { fill: none; stroke: var(--rule-strong); stroke-width: 1; }
.s-tick { stroke: var(--rule-strong); stroke-width: 1; }
.s-ref { fill: var(--faint); font: 10px var(--mono); text-anchor: middle; dominant-baseline: central; }
.s-cad { fill: none; stroke: var(--cad); stroke-width: 1; }
.s-cad-fill { fill: color-mix(in srgb, var(--cad) 16%, transparent); stroke: var(--cad); stroke-width: 1; }
.s-col { fill: var(--cad); }
.s-dim { fill: none; stroke: var(--faint); stroke-width: .8; }
.s-dim-text { fill: var(--faint); font: 10px var(--mono); text-anchor: middle; }
.s-area { fill: var(--faint); font: 600 10px var(--mono); letter-spacing: .1em; }
.s-path { fill: none; stroke: var(--path); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.s-path.two-way { stroke-dasharray: 9 7; stroke-linecap: butt; }
.s-arrow { fill: var(--path); }
.s-heat { fill: none; stroke: var(--drop); stroke-width: 14; stroke-linecap: round; opacity: .28; }
.s-zone { fill: color-mix(in srgb, var(--zone) 9%, transparent); stroke: var(--zone); stroke-width: 1.2; stroke-dasharray: 5 4; }
.s-zone-label { fill: var(--zone); font: 600 10px var(--mono); letter-spacing: .06em; }
.st-pick { fill: var(--pick); }
.st-drop { fill: var(--drop); }
.st-frame { fill: none; stroke: var(--charge); stroke-width: 1.5; }
.st-charge { fill: var(--charge); }
.st-label { fill: var(--muted); font: 600 10px var(--mono); }
.agv-body { fill: var(--accent); }
.agv-front { fill: var(--on-accent); }
.agv-load { fill: var(--path); }

.titleblock { display: grid; grid-template-columns: 1.25fr 1.5fr 1fr 1fr 1fr .8fr; margin: 0; border-top: 1px solid var(--rule-strong); }
.titleblock div { min-width: 0; padding: 10px 16px 12px; border-left: 1px solid var(--rule); }
.titleblock div:first-child { border-left: 0; }
.titleblock dt { color: var(--faint); font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.titleblock dd { margin: 3px 0 0; overflow: hidden; color: var(--text-strong); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.titleblock dd.mono { font: 600 14px/1.6 var(--mono); }
.titleblock small { margin-left: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
.sheet-note { padding: 12px 0 0; color: var(--faint); font-size: 13px; }

/* Spec strip under the drawing */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 48px 0 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; }
.strip li { padding: 18px 24px 0 0; }
.strip li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.strip b { display: block; color: var(--faint); font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.strip span { display: block; margin-top: 4px; color: var(--text); font-size: 15px; }

/* Sections: a label column and a content column */
.section { padding: 112px 0 0; }
.section-grid { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px 48px; padding-top: 20px; }
.section-grid::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--rule-strong); }
.label { color: var(--muted); font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.label span { margin-right: 10px; color: var(--faint); }
h2 { max-width: 22ch; margin: 0; color: var(--text-strong); font: 600 clamp(28px, 3vw, 38px)/1.12 var(--font-display); letter-spacing: -.022em; }
.intro { max-width: 640px; margin-top: 16px; color: var(--muted); font-size: 17px; }
h3 { margin: 0; color: var(--text-strong); font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -.005em; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 48px 0 0; padding: 0; list-style: none; counter-reset: step; }
.step { padding: 0 28px 0 0; counter-increment: step; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--rule); }
.step-art { width: 100%; height: 100px; margin-bottom: 24px; }
.step h3::before { content: counter(step) "  "; color: var(--faint); font: 600 13px var(--mono); white-space: pre; }
.step p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.a-cad { fill: none; stroke: var(--cad); stroke-width: 1; }
.a-path { fill: none; stroke: var(--path); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.a-handle { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.a-node { fill: var(--surface); stroke: var(--rule-strong); stroke-width: 1; }
.a-node.on { stroke: var(--accent); }
.a-wire { fill: none; stroke: var(--faint); stroke-width: 1.2; }
.a-text { fill: var(--text); font: 11px var(--font); }
.a-meta { fill: var(--faint); font: 9px var(--mono); letter-spacing: .06em; }
.a-bar { fill: var(--rule-strong); }
.a-bar.best { fill: var(--accent); }
.a-axis { stroke: var(--rule-strong); stroke-width: 1; }

/* Use cases */
.questions { margin: 40px 0 0; padding: 0; list-style: none; }
.question { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 40px; padding: 24px 0; border-top: 1px solid var(--rule); }
.question:last-child { border-bottom: 1px solid var(--rule); }
.question h3 { font-size: 19px; }
.question p { color: var(--muted); font-size: 15px; }

/* Specifications */
.specs { width: 100%; margin: 40px 0 0; border-collapse: collapse; }
.specs th, .specs td { padding: 14px 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 1px solid var(--rule); }
.specs th { width: 190px; padding-right: 24px; color: var(--faint); font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.specs td { color: var(--text); font-size: 15px; }
.limits { max-width: 720px; margin: 28px 0 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--path); color: var(--muted); font-size: 15px; }
.limits strong { color: var(--text-strong); font-weight: 600; }

/* FAQ */
.faq { margin-top: 32px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 18px 0; color: var(--text-strong); font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; color: var(--faint); font: 400 20px/1 var(--mono); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover::after { color: var(--text-strong); }
.faq details p { max-width: 680px; padding: 0 0 20px; color: var(--muted); }

/* Closing call to action */
.closing { padding: 112px 0; }
.closing-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 64px; align-items: end; padding-top: 40px; border-top: 1px solid var(--rule-strong); }
.closing h2 { max-width: 24ch; }
.closing p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.closing .cta-row { justify-content: flex-end; }

/* Footer */
.site-footer { padding: 28px 0 40px; border-top: 1px solid var(--rule); background: var(--bg-alt); color: var(--faint); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.footer-row .brand { font-size: 14px; }
.footer-row .brand svg { width: 22px; height: 22px; }
.footer-row .legal { color: var(--faint); font-size: 13px; white-space: nowrap; }
.footer-row nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.footer-row nav a, .link-button { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; text-decoration: none; cursor: pointer; }
.footer-row nav a:hover, .link-button:hover { color: var(--text-strong); text-decoration: underline; }

/* Cookie policy page */
.policy { padding: 64px 0 112px; }
.policy-body { max-width: 760px; }
.policy h1 { max-width: none; font-size: clamp(34px, 4vw, 48px); }
.policy .updated { margin-top: 12px; color: var(--faint); font-size: 14px; }
.policy h2 { max-width: none; margin-top: 56px; font-size: 24px; }
.policy p, .policy li { color: var(--text); }
.policy p + p, .policy h2 + p, .policy p + ul, .policy ul + p { margin-top: 14px; }
.policy ul { margin: 14px 0 0; padding-left: 20px; }
.policy li + li { margin-top: 6px; }
.storage-table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 14px; }
.storage-table th, .storage-table td { padding: 10px 16px 10px 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.storage-table tr:last-child td { border-bottom: 1px solid var(--rule); }
.storage-table th { color: var(--faint); font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.storage-table td:first-child { width: 190px; color: var(--text-strong); font: 13px/1.6 var(--mono); overflow-wrap: anywhere; }
.policy .btn { margin-top: 20px; }

/* Cookie notice: non-blocking, bottom left, above the page but never a wall */
.consent { position: fixed; left: 24px; bottom: 24px; z-index: 90; width: min(440px, calc(100vw - 32px)); padding: 20px 20px 18px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); box-shadow: 0 18px 50px -12px color-mix(in srgb, var(--shadow) 45%, transparent); color: var(--text); font-size: 14px; line-height: 1.55; }
.consent[hidden] { display: none; }
.consent h2 { max-width: none; margin: 0 32px 8px 0; font: 600 16px/1.35 var(--font); letter-spacing: 0; outline: none; }
.consent p { color: var(--muted); }
.consent p a { color: var(--link); }
.consent-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.consent-close:hover { background: var(--bg-alt); color: var(--text-strong); }
.consent-close svg { width: 16px; height: 16px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.consent-actions .btn { flex: 1 1 0; min-width: 0; height: 38px; padding: 0 12px; font-size: 14px; }
.consent-actions .btn:only-child { flex: 0 0 auto; min-width: 104px; }
.consent-actions .btn-choice { border-color: var(--rule-strong); background: var(--bg-alt); color: var(--text-strong); }
.consent-actions .btn-choice:hover { border-color: var(--text); }
.consent-actions .btn-more { flex: 1 1 100%; height: 32px; border: 0; background: none; color: var(--muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.consent-actions .btn-more:hover { color: var(--text-strong); }
.consent-categories { margin: 14px 0 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; }
.consent-categories li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.consent-categories strong, .consent-categories label { color: var(--text-strong); font-weight: 600; }
.consent-categories span { grid-column: 1; color: var(--muted); font-size: 13px; }
.consent-categories .state { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--faint); font-size: 13px; white-space: nowrap; }
.consent-switch { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; width: 40px; height: 22px; margin: 0; appearance: none; -webkit-appearance: none; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--bg-alt); cursor: pointer; transition: background-color .15s, border-color .15s; }
.consent-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .15s, background-color .15s; }
.consent-switch:checked { border-color: var(--accent); background: var(--accent); }
.consent-switch:checked::after { transform: translateX(18px); background: var(--on-accent); }

@media (max-width: 1080px) {
  .titleblock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .titleblock div:nth-child(4) { border-left: 0; }
  .titleblock div:nth-child(n + 4) { border-top: 1px solid var(--rule); }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip li:nth-child(3) { padding-left: 0; border-left: 0; }
  .strip li:nth-child(n + 3) { margin-top: 18px; border-top: 1px solid var(--rule); }
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { padding-top: 48px; }
  .hero-row, .closing-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-actions { justify-self: start; }
  .closing .cta-row { justify-content: flex-start; }
  .section { padding-top: 80px; }
  .steps { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
  .step, .step + .step { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0 24px; padding: 24px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .step-art { grid-row: span 2; height: 80px; margin: 0; }
  .question { grid-template-columns: minmax(0, 1fr); }
  .closing { padding: 80px 0; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .nav { gap: 12px; height: 56px; }
  .brand-name { display: none; }
  .hero { padding-top: 36px; }
  .cta-row .btn { flex: 1 1 100%; }
  .sheet-figure { margin-top: 40px; }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock div:nth-child(4) { border-left: 1px solid var(--rule); }
  .titleblock div:nth-child(odd) { border-left: 0; }
  .titleblock div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .titleblock div { padding: 8px 12px 10px; }
  .titleblock dd { white-space: normal; }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip li, .strip li + li, .strip li:nth-child(n + 3) { margin-top: 0; padding: 14px 0; border-left: 0; }
  .strip li + li { border-top: 1px solid var(--rule); }
  .step, .step + .step { grid-template-columns: minmax(0, 1fr); }
  .step-art { grid-row: auto; height: 80px; margin-bottom: 16px; }
  .specs th, .specs td { display: block; width: auto; padding: 0; border: 0; }
  .specs th { padding-top: 14px; border-top: 1px solid var(--rule); }
  .specs td { padding: 4px 0 14px; }
  .specs tr:last-child td { border-bottom: 1px solid var(--rule); }
  .storage-table thead { display: none; }
  .storage-table tr { display: block; padding: 10px 0; border-top: 1px solid var(--rule); }
  .storage-table td { display: block; width: auto; padding: 2px 0; border: 0; }
  .storage-table td[data-label]::before { content: attr(data-label) ": "; color: var(--faint); }
  .storage-table tr:last-child td { border-bottom: 0; }
  .footer-row nav { margin-left: 0; }
  .consent { left: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .consent, .skip { display: none; }
}
