/* SensorFlow — same design system as FlowMarket (tokens, type, components). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --background: 42 28% 96%;
  --bg-2: 42 24% 93%;
  --foreground: 40 8% 9%;
  --card: 0 0% 100%;
  --primary: 40 8% 9%;
  --primary-foreground: 42 28% 97%;
  --muted: 40 22% 92%;
  --muted-foreground: 36 6% 38%;
  --accent: 78 85% 62%;            /* lime, shared with FlowMarket */
  --accent-deep: 78 85% 26%;       /* accent as text: 4.6:1 on the ground */
  --accent-foreground: 40 8% 9%;
  --border: 38 18% 86%;
  --ink-2: 40 8% 18%;

  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --radius: .875rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 2px hsl(40 8% 9% / .05);
  --shadow-md: 0 8px 30px hsl(40 8% 9% / .08);
  --shadow-lg: 0 24px 60px hsl(40 8% 9% / .12);
  /* used by the embedded search UI (assets/fm-search.css) */
  --gradient-hero: linear-gradient(135deg, hsl(var(--foreground)), hsl(var(--ink-2)));
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: hsl(var(--foreground));
  background:
    radial-gradient(70rem 48rem at 78% -8%, hsl(var(--accent) / .22), transparent 62%),
    radial-gradient(50rem 40rem at -10% 12%, hsl(var(--accent) / .07), transparent 55%),
    hsl(var(--background));
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.03em; font-weight: 700; line-height: 1.05; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 74rem; margin: 0 auto; padding-inline: 1.5rem; }
.serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; }
.hl { position: relative; isolation: isolate; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .08em;
  height: .34em; background: hsl(var(--accent)); z-index: -1; border-radius: 2px;
}
:focus-visible { outline: 3px solid hsl(var(--accent-deep)); outline-offset: 2px; border-radius: 4px; }

/* ---------- nav ---------- */
.nav-outer { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; padding-block: .9rem; }
.nav {
  display: flex; align-items: center; gap: 1.25rem;
  background: hsl(var(--card) / .92); backdrop-filter: blur(10px);
  border: 1px solid hsl(var(--border)); border-radius: 9999px;
  padding: .55rem .7rem .55rem 1rem; box-shadow: var(--shadow-sm);
}
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.02em; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
/* Links are centred in the bar, so a wide gap falls either side of them —
   the same separation the FlowMarket nav gets (32px between links, a long
   run of space before the language switch). */
.nav-links { display: flex; gap: 2rem; margin-inline: auto; }
.nav-links a { font-size: 1rem; font-weight: 500; color: hsl(var(--muted-foreground)); }
.nav-links a:hover { color: hsl(var(--foreground)); }

.nav-cta { display: flex; align-items: center; gap: 1rem; }
/* The language switch is not a menu item: smaller, wider-tracked, and fenced
   off by a hairline so the two never read as one list. */
.lang { position: relative; display: flex; align-items: center; gap: .4rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .07em;
  color: hsl(var(--muted-foreground)); padding-left: 1.15rem; }
.lang::before { content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 1px; height: 1.15rem; background: hsl(var(--border)); }
.lang .sep { opacity: .45; font-weight: 400; }
.lang a { padding-bottom: 2px; border-bottom: 2px solid transparent; }
.lang a:hover { color: hsl(var(--foreground)); }
.lang a[aria-current="true"] { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--accent)); }

.btn { font-family: var(--font-body); font-weight: 600; cursor: pointer; white-space: nowrap; border: 0;
  border-radius: 9999px; display: inline-flex; align-items: center; gap: .5rem; transition: transform .1s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn-ink { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: .62rem 1.15rem; font-size: .92rem; box-shadow: var(--shadow-sm); }
.btn-ink:hover { opacity: .9; }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); padding: .6rem .9rem; font-size: .95rem; font-weight: 500; border: 1px solid hsl(var(--border)); }
.btn-ghost:hover { border-color: hsl(var(--foreground) / .35); }
.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; }
.btn-accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.disc { width: 1.6rem; height: 1.6rem; border-radius: 9999px; display: grid; place-items: center; flex: none; }
.btn-ink .disc { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-accent .disc { background: hsl(var(--primary)); color: hsl(var(--accent)); }

/* ---------- hero ---------- */
/* Both columns bottom-align: the headline sits above the search box on the
   left, the description and stats sit beside them on the right, and the slack
   falls as open space above. */
/* No forced viewport height: that left the hero taller than its content and,
   with the columns bottom-aligned, piled all the slack under the nav. The hero
   takes its own height and sits close under the bar. */
.hero { display: flex; align-items: stretch; padding-block: 5.5rem 3.5rem; }
.hero > .wrap { width: 100%; display: flex; flex-direction: column; }
.hero-grid > div { display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(1.75rem, 4.6vh, 4.5rem); }
.eyebrow { align-self: flex-start; }
.hero-grid { flex: 1; display: grid; grid-template-columns: 1.62fr minmax(19rem, .72fr);
  gap: 2.75rem; align-items: stretch; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: hsl(var(--muted-foreground));
  background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 9999px; padding: .45rem .9rem; }
.pulse { width: .5rem; height: .5rem; border-radius: 9999px; background: hsl(var(--accent)); box-shadow: 0 0 0 4px hsl(var(--accent) / .22); }
h1 { margin-top: 0; font-size: clamp(2.3rem, min(7.5vw, 11.2vh), 6.8rem); line-height: .93; letter-spacing: -.035em; }
.hero-side-top { display: flex; flex-direction: column; gap: .8rem; }
.hero-sub { border-left: 3px solid hsl(var(--accent)); padding-left: 1.1rem; font-size: 1.05rem; line-height: 1.65; color: hsl(var(--muted-foreground)); }
.hero-sub b { color: hsl(var(--foreground)); font-weight: 600; }
.btn-wide { width: 100%; justify-content: space-between; padding: .95rem 1rem .95rem 1.5rem;
  font-size: 1rem; margin-top: 1.5rem; }
.hero-note { margin-top: .8rem; font-size: .84rem; color: hsl(var(--muted-foreground)); }
.hero-note a { text-decoration: underline; text-decoration-color: hsl(var(--accent)); text-underline-offset: 3px; }

.stats { flex: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin-top: 1.9rem;
  border-top: 1px solid hsl(var(--border)); padding-top: 1.1rem; }
.stats > * + * { border-left: 1px solid hsl(var(--border)); padding-left: 1.1rem; }
.stat-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stat-lbl { font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-top: .45rem; }


/* ---------- sections ---------- */
section { scroll-margin-top: 6rem; }
.sec { padding-block: 4.5rem; }
.sec-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.sec-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .74rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: hsl(var(--accent-deep)); margin-bottom: .9rem; }
.sec-eyebrow::before { content: ""; width: .45rem; height: .45rem; border-radius: 9999px; background: hsl(var(--accent)); }
.sec-head h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
.sec-head p { color: hsl(var(--muted-foreground)); line-height: 1.7; font-size: 1rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg); overflow: hidden; background: hsl(var(--card)); }
.step { padding: 2rem 1.6rem; border-right: 1px solid hsl(var(--border)); }
.step:last-child { border-right: 0; }
.step-num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; letter-spacing: -.04em; }
.step h3 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
.step p { font-size: .95rem; line-height: 1.65; color: hsl(var(--muted-foreground)); }
.step code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em;
  background: hsl(var(--muted)); border-radius: 5px; padding: .1rem .35rem; color: hsl(var(--foreground)); }

.benefits { display: grid; grid-template-columns: 2.5rem 1fr 1fr; gap: 1.1rem 1.5rem; }
.benefit { display: contents; }
.b-n { font-size: .8rem; color: hsl(var(--muted-foreground)); padding-top: .35rem; font-variant-numeric: tabular-nums; }
.b-t { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.25; }
.b-d { font-size: .97rem; line-height: 1.65; color: hsl(var(--muted-foreground)); }
.benefits > * { border-top: 1px solid hsl(var(--border)); padding-top: 1.1rem; }
.benefits > :nth-child(-n+3) { border-top: 0; padding-top: 0; }

/* ---------- dark ---------- */
.dark { background:
    radial-gradient(45rem 30rem at 85% 0%, hsl(var(--accent) / .16), transparent 60%),
    linear-gradient(135deg, hsl(var(--foreground)), hsl(var(--ink-2)));
  color: hsl(var(--background)); border-radius: var(--radius-lg); padding: 3.5rem 2.5rem; }
.dark h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 2.5rem;
  border-top: 1px solid hsl(0 0% 100% / .14); padding-top: 1.75rem; }
.cmp h4 { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: hsl(0 0% 100% / .5); margin-bottom: .7rem; font-weight: 600; }
.cmp p { line-height: 1.7; font-size: .98rem; color: hsl(0 0% 100% / .78); }
.cmp .before p { text-decoration: line-through; text-decoration-color: hsl(0 0% 100% / .35); color: hsl(0 0% 100% / .45); }

/* ---------- faq ---------- */
.faq { max-width: 46rem; }
.faq details { border-top: 1px solid hsl(var(--border)); }
.faq details:last-child { border-bottom: 1px solid hsl(var(--border)); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 0; font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: hsl(var(--accent-deep)); font-size: 1.3rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 1.25rem; color: hsl(var(--muted-foreground)); line-height: 1.7; max-width: 42rem; }

/* ---------- cta + footer ---------- */
.cta { text-align: left; }
.cta .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 2rem; }
.cta .accent-line { color: hsl(var(--accent)); }
footer { border-top: 1px solid hsl(var(--border)); margin-top: 4.5rem; padding-block: 2rem 3rem; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .9rem; color: hsl(var(--muted-foreground)); }
.foot-links a:hover { color: hsl(var(--foreground)); }
.foot small { font-size: .85rem; color: hsl(var(--muted-foreground)); }

@media (max-width: 900px) {
  .hero-grid, .sec-head, .cmp { grid-template-columns: 1fr; gap: 2rem; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid hsl(var(--border)); }
  .step:last-child { border-bottom: 0; }
  .benefits { grid-template-columns: 1.8rem 1fr; }
  .benefits > :nth-child(-n+3) { border-top: 1px solid hsl(var(--border)); padding-top: 1.1rem; }
  .benefits > :nth-child(-n+2) { border-top: 0; padding-top: 0; }
  .b-d { grid-column: 2; margin-top: -.6rem; }
  .nav-links { display: none; }
  .hero { min-height: 0; padding-block: 2rem 3rem; align-items: flex-start; }
  .hero-grid > div { display: block; }
  .stats { margin-top: 1.5rem; }
  h1 { margin-top: 1.4rem; }
  .dark { padding: 2.5rem 1.5rem; }
}

@media (max-width: 560px) {
  /* the nav pill has to hold brand + language + CTA on a 375px screen */
  .nav { gap: .5rem; padding: .45rem .5rem .45rem .75rem; }
  .brand { font-size: 1rem; gap: .45rem; }
  .brand svg { width: 1.7rem; height: 1.7rem; }
  .nav-cta { gap: .45rem; margin-left: auto; }
  .nav-cta .btn-ink { padding: .5rem .8rem; font-size: .82rem; }
  .lang { font-size: .72rem; gap: .3rem; padding-left: 0; }
  .lang::before { display: none; }
  h1 { font-size: clamp(2.1rem, 11vw, 2.9rem); }
  .sec { padding-block: 3rem; }
  .cta .row { flex-direction: column; align-items: flex-start; }
}
