/* Factory Planner — landing page */
/* Geist (SIL OFL 1.1, see fonts/OFL.txt): variable, latin subset */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #111318;
  --ink-2: #3b404a;
  --muted: #5b616e;
  --subtle: #6b717d;
  --faint: #8a909c;
  --line: #eceef1;
  --surface: #f7f8fa;
  --panel: #f4f6fa;
  --blue: #2b59c3;
  --blue-hover: #244ea9;
  --blue-soft: #eef2fb;
  --blue-tint: #dbe4fa;
  --pad: clamp(20px, 5vw, 40px);
  --section: clamp(112px, 14vw, 176px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
main:focus { outline: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--pad); }
.anchor { scroll-margin-top: 64px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 50;
  padding: 10px 14px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
}
.skip:focus { left: 16px; text-decoration: none; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 0;
  font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1;
  white-space: nowrap; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--blue); color: #fff; gap: 8px; box-shadow: 0 1px 2px rgba(17,19,24,.12), 0 8px 20px -8px rgba(43,89,195,.6); }
.btn-primary:hover { background: var(--blue-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--blue); }
.text-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: var(--ink); white-space: nowrap;
}
.text-link:hover { color: var(--blue); text-decoration: none; }
.inline-link { color: var(--blue); font-weight: 500; white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid #f0f1f4;
}
.header-row { height: 64px; display: flex; align-items: center; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600;
  color: var(--ink); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.nav { flex: 1; display: flex; justify-content: center; gap: 28px; }
.nav a { font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--ink); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.header-signin { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.header-signin:hover { color: var(--blue); text-decoration: none; }
.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin: 0 -8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer;
}
.menu-btn:hover { background: #f4f5f7; }
.mobile-menu { display: flex; flex-direction: column; background: #fff; padding: 4px var(--pad) 20px; }
.mobile-menu a { display: flex; align-items: center; height: 48px; font-size: 17px; color: var(--ink); }
.mobile-menu a:hover { color: var(--blue); text-decoration: none; }
@media (max-width: 819px) { .nav { display: none; } .menu-btn { display: inline-flex; } }
@media (min-width: 820px) { .mobile-menu { display: none !important; } }
@media (max-width: 419px) { .header-signin { display: none; } }

/* Hero */
.hero { background: radial-gradient(ellipse 70% 55% at 50% 0%, var(--blue-soft) 0%, rgba(238,242,251,0) 72%); }
.hero-inner {
  padding-block: clamp(72px, 11vw, 136px) clamp(96px, 12vw, 160px);
  display: flex; flex-direction: column; align-items: center; gap: clamp(56px, 8vw, 88px);
}
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; max-width: 760px; }
.hero h1 { font-size: clamp(42px, 6.6vw, 76px); line-height: 1; font-weight: 600; letter-spacing: -.045em; text-wrap: balance; }
.lede { max-width: 560px; font-size: clamp(17px, 1.8vw, 19px); line-height: 1.55; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 8px; }
.note { font-size: 13.5px; color: var(--subtle); }

.demo {
  width: 100%; max-width: 880px; min-width: 0;
  border-radius: 24px; background: #fafbfc; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(17,19,24,.06), 0 2px 4px rgba(17,19,24,.03), 0 48px 96px -48px rgba(17,19,24,.32);
}
.demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 12px 16px 0 24px; font-size: 13.5px; color: var(--muted);
}
.demo-bar .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar .right { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.demo-bar strong { color: var(--ink); font-weight: 600; }
.optimise {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--blue); color: #fff; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 500;
}
.optimise:hover { background: var(--blue-hover); }
.demo-body { padding: clamp(4px, 1.5vw, 12px) clamp(8px, 2vw, 20px) clamp(8px, 2vw, 20px); }
.demo svg, .panel svg { display: block; width: 100%; height: auto; }
#hero-plan { user-select: none; -webkit-user-select: none; }
.machine { cursor: grab; touch-action: none; outline: none; }
.machine.dragging { cursor: grabbing; }
.machine .body { fill: #fff; stroke: #e1e4ea; stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(17,19,24,.08)); }
.machine.dragging .body { fill: var(--blue-soft); stroke: var(--blue); }
.machine text { font: 500 10px "Geist", system-ui, sans-serif; fill: var(--ink-2); pointer-events: none; }
.machine .ring { fill: none; stroke: var(--blue); stroke-width: 2; opacity: 0; }
.machine:focus-visible .ring { opacity: 1; }

/* Sections */
.eyebrow { font-size: 14px; font-weight: 500; color: var(--blue); }
.h2 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.05; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 600px; margin-bottom: clamp(48px, 6vw, 72px); }

.how { padding-bottom: var(--section); }
.steps {
  display: grid; grid-template-columns: 1fr; gap: clamp(40px, 5vw, 56px) clamp(32px, 4vw, 48px);
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 560px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { display: flex; flex-direction: column; gap: 12px; }
.step svg { margin-bottom: 10px; }
.step h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.step p { font-size: 15px; line-height: 1.6; color: var(--muted); }

.features { padding-bottom: var(--section); display: flex; flex-direction: column; gap: clamp(96px, 12vw, 160px); }
.feature { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 7vw, 96px); }
.feature.reverse { flex-direction: row-reverse; }
.feature-copy { flex: 1 1 320px; min-width: 0; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.feature h3 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.1; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.feature-copy p { font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.panel {
  flex: 1 1 420px; min-width: 0; border-radius: 28px; background: var(--panel);
  padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px);
}
.shadowed { filter: drop-shadow(0 1px 2px rgba(17,19,24,.1)); }
.stats { display: flex; flex-wrap: wrap; gap: 12px 40px; font-variant-numeric: tabular-nums; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat > span { font-size: 13px; color: var(--muted); }
.stat strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--faint); }
.stat.accent > span { color: var(--blue); }
.stat.accent strong { color: var(--ink); }
.formats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.formats .accent { color: var(--blue); }
.formats .ready { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 400; color: var(--muted); }

.faq { padding-bottom: var(--section); display: flex; flex-wrap: wrap; gap: 40px clamp(40px, 7vw, 96px); }
.faq-head { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 14px; }
.faq-list { flex: 2 1 460px; min-width: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 0; font-size: 17px; font-weight: 500; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; }
.faq .plus-v { transform-origin: 7px 7px; transition: transform .2s; }
.faq details[open] .plus-v { transform: scaleY(0); }
.faq details p { margin: 0 0 24px; max-width: 600px; font-size: 15.5px; line-height: 1.65; color: var(--muted); }
.faq-more { margin-top: 28px; font-size: 15px; line-height: 1.6; color: var(--muted); }

.cta-section { background: radial-gradient(ellipse 60% 70% at 50% 100%, var(--blue-soft) 0%, rgba(238,242,251,0) 72%); }
.cta {
  padding-block: clamp(64px, 8vw, 96px) var(--section);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px;
}
.cta h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1.02; font-weight: 600; letter-spacing: -.045em; text-wrap: balance; }
.cta p { max-width: 440px; font-size: 17px; line-height: 1.6; color: var(--muted); }

/* Legal pages (privacy, terms) */
.legal { max-width: 720px; padding-block: clamp(56px, 8vw, 96px) var(--section); }
.legal-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(40px, 5vw, 56px); }
.legal-head p { font-size: 15px; color: var(--subtle); }
.legal h2 { margin: 48px 0 14px; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 14px; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .inline-link { white-space: normal; }
.legal-summary { padding: 20px 24px; border-radius: 14px; background: var(--panel); }

/* Footer */
.site-footer { background: var(--surface); }
.site-footer .wrap { padding-block: clamp(56px, 7vw, 80px) 32px; display: flex; flex-direction: column; gap: clamp(48px, 6vw, 64px); }
.support { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 48px; }
.support svg { flex: none; }
.support-copy { flex: 1 1 360px; min-width: 0; max-width: 620px; display: flex; flex-direction: column; gap: 10px; }
.support h2 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.support p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.foot-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding-top: 28px; border-top: 1px solid #e6e8ec; font-size: 13.5px; color: var(--subtle);
}
.footer-slim .wrap { padding-block: 32px; }
.footer-slim .foot-bottom { padding-top: 0; border-top: 0; }
.foot-bottom .brand { gap: 6px; font-size: 13px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-nav a { color: var(--muted); }
.foot-nav a:hover { color: var(--ink); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq .plus-v { transition: none; }
}
