/* Foreline — Line Intelligence
   Shared design system. Palette per site brief (approved).
   Pure CSS, no external dependencies, no CDN fonts. */

:root{
  --navy:#0e1b2c;      /* deep graphite-navy: dark sections, wordmark, footer */
  --navy-2:#14273d;    /* slightly lighter navy for panels on dark */
  --accent:#2a78d6;    /* electric blue: accents, buttons, links, graphics */
  --accent-ink:#1c5aa8;/* accent text on light chips */
  --green:#008300;     /* positive / confirmation: CLV, checks */
  --amber:#eda100;     /* alerts in product examples */
  --red:#e34948;       /* critical elements in alert examples only */
  --ink:#12181f;       /* primary text on light */
  --ink2:#52514e;      /* secondary text */
  --ink3:#8a887f;      /* muted text */
  --surface:#fcfcfb;   /* light surface */
  --card:#ffffff;      /* cards */
  --line:#e6e4dd;      /* hairlines */
  --line-2:#eef0ee;    /* softer hairline */
  --radius:14px;
  --maxw:1160px;
  --pad:24px;
}

*{box-sizing:border-box;margin:0}
html{scroll-behavior:smooth}
body{
  background:var(--surface);
  color:var(--ink);
  font:16px/1.6 "Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img,svg{max-width:100%}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
::selection{background:#cfe0f6}

.wrap{max-width:var(--maxw);margin:0 auto;padding-left:var(--pad);padding-right:var(--pad)}
.section{padding:76px 0;border-bottom:1px solid var(--line)}
.section:last-of-type{border-bottom:none}
.kicker{display:block;font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--accent);font-weight:700;margin-bottom:14px}
h1{font-size:clamp(30px,5vw,46px);line-height:1.12;font-weight:750;letter-spacing:-.015em}
h2{font-size:clamp(24px,3.4vw,33px);line-height:1.18;font-weight:750;letter-spacing:-.01em}
h3{font-size:19px;line-height:1.25;font-weight:700;letter-spacing:-.005em}
p{max-width:70ch}
.lead{font-size:clamp(16.5px,2vw,19px);color:var(--ink2);max-width:64ch;margin-top:16px}
.muted{color:var(--ink2)}
.small{font-size:13.5px;color:var(--ink3)}
.center{text-align:center}
.mt-s{margin-top:12px}.mt{margin-top:22px}.mt-l{margin-top:34px}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:50;background:rgba(252,252,251,.9);
  backdrop-filter:saturate(1.1) blur(8px);border-bottom:1px solid var(--line)}
.nav{display:flex;align-items:center;gap:20px;height:64px}
.brand{display:inline-flex;align-items:center;gap:10px;font-weight:750;font-size:19px;
  color:var(--navy);letter-spacing:-.01em}
.brand:hover{text-decoration:none}
.brand .mark{height:28px;width:auto;display:block}
.brand .tl{font-weight:500;font-size:12.5px;color:var(--ink3);letter-spacing:.02em;
  border-left:1px solid var(--line);padding-left:10px;margin-left:2px}
.nav-links{display:flex;align-items:center;gap:22px;margin-left:auto}
.nav-links a{color:var(--ink2);font-size:15px;font-weight:500}
.nav-links a:hover{color:var(--ink);text-decoration:none}
.lang{display:inline-flex;gap:6px;font-size:13.5px;color:var(--ink3);
  border-left:1px solid var(--line);padding-left:18px}
.lang a{color:var(--ink3);font-weight:600}
.lang a[aria-current="true"]{color:var(--navy)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--accent);color:#fff;font-weight:650;font-size:15px;
  padding:10px 18px;border-radius:10px;border:1px solid var(--accent);cursor:pointer;
  transition:background .15s ease}
.btn:hover{background:#2468bd;text-decoration:none;color:#fff}
.btn.ghost{background:transparent;color:var(--accent)}
.btn.ghost:hover{background:#eef4fc;color:var(--accent-ink)}
.btn.on-dark{background:#fff;color:var(--navy);border-color:#fff}
.btn.on-dark:hover{background:#e9eef4;color:var(--navy)}
.btn.lg{padding:13px 24px;font-size:16px}
.nav-toggle{display:none;margin-left:auto;background:none;border:1px solid var(--line);
  border-radius:8px;width:42px;height:38px;cursor:pointer;color:var(--navy)}
.nav-toggle svg{display:block;margin:auto}

/* ---------- Hero (dark) ---------- */
.hero{background:var(--navy);color:#fff;border-bottom:none;
  padding:96px 0 88px}
.hero .kicker{color:#7db2ee}
.hero h1{color:#fff;max-width:18ch}
.hero .lead{color:#c3ccd6;max-width:60ch}
.hero-tags{display:flex;flex-wrap:wrap;gap:9px;margin-top:30px}
.hero-cta{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:34px}
.hero-cta .note{font-size:13.5px;color:#8ea0b3}

/* ---------- Tags / chips ---------- */
.tag{display:inline-block;border-radius:99px;padding:5px 13px;font-size:13px;font-weight:600;
  background:#eef4fc;color:var(--accent-ink)}
.tag.green{background:#eaf4ea;color:#0f6b0f}
.hero-tags .tag{background:rgba(125,178,238,.14);color:#cfe0f6;border:1px solid rgba(125,178,238,.28)}
.hero-tags .tag.green{background:rgba(70,170,90,.16);color:#bfe6c4;border-color:rgba(70,170,90,.3)}

/* ---------- Grids & cards ---------- */
.grid{display:grid;gap:20px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:24px}
.card h3{margin-bottom:8px}
a.card{color:inherit;display:block;transition:border-color .15s ease,box-shadow .15s ease}
a.card:hover{text-decoration:none;border-color:#cfd8e6;box-shadow:0 6px 22px rgba(14,27,44,.06)}
.card .role{font-size:13px;color:var(--ink3);margin-top:14px;
  display:flex;align-items:center;gap:8px}
.card .role .dot{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.card .more{font-size:14px;font-weight:650;color:var(--accent);margin-top:16px;display:inline-block}

/* ---------- Stats ---------- */
.stat .v{font-size:clamp(32px,4vw,42px);font-weight:800;letter-spacing:-.02em;color:var(--navy)}
.stat .v.green{color:var(--green)}
.stat .l{color:var(--ink2);font-size:15px;margin-top:8px}
.stat .src{color:var(--ink3);font-size:12px;margin-top:14px;padding-top:12px;
  border-top:1px solid var(--line-2)}

/* ---------- Bulleted lists ---------- */
ul.b{list-style:none;padding:0;margin:6px 0 0}
ul.b li{padding:10px 0 10px 30px;position:relative;font-size:16.5px;max-width:74ch}
ul.b li::before{content:"";position:absolute;left:4px;top:18px;width:9px;height:9px;
  border-radius:50%;background:var(--accent)}
ul.b.check li::before{content:"";left:2px;top:15px;width:14px;height:8px;border:0;border-radius:0;
  background:transparent;border-left:2.5px solid var(--green);border-bottom:2.5px solid var(--green);
  transform:rotate(-45deg)}
ul.b li b{font-weight:650}

/* ---------- Product detail blocks ---------- */
.prod{padding-top:30px;margin-top:30px;border-top:1px solid var(--line)}
.prod:first-of-type{border-top:none;margin-top:20px;padding-top:0}
.prod .eyebrow{font-size:13px;font-weight:700;color:var(--accent);letter-spacing:.04em;
  text-transform:uppercase;margin-bottom:6px}

/* ---------- Alert example ---------- */
.alert{border:1px solid #f0d9a3;border-left:4px solid var(--amber);background:#fffaf0;
  border-radius:12px;padding:18px 20px;font-size:15.5px;max-width:640px}
.alert .hd{font-weight:700;color:var(--ink);display:flex;gap:8px;align-items:baseline}
.alert .hd .ic{color:var(--amber)}
.alert .row{margin-top:8px;color:var(--ink)}
.alert .row .em{font-weight:700}
.alert .row .neg{color:var(--red);font-weight:700}
.alert .act{margin-top:12px;padding-top:12px;border-top:1px dashed #f0d9a3;
  color:var(--ink2);font-size:14.5px}

/* ---------- Steps ---------- */
.steps{counter-reset:s;margin-top:26px;display:grid;gap:6px}
.steps .step{counter-increment:s;padding:14px 0 14px 56px;position:relative;font-size:16.5px;
  max-width:74ch}
.steps .step::before{content:counter(s);position:absolute;left:0;top:12px;width:36px;height:36px;
  border-radius:50%;background:var(--accent);color:#fff;font-weight:700;font-size:16px;
  display:flex;align-items:center;justify-content:center}
.steps .step b{font-weight:650}
.steps .step .sub{display:block;color:var(--ink2);font-size:14.5px;margin-top:3px}

/* ---------- Positioning strip ---------- */
.strip{background:var(--navy-2);color:#e7edf4;border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius);padding:26px 28px}
.strip.on-light{background:#0e1b2c;color:#e7edf4}

/* ---------- Contact form ---------- */
.form{display:grid;gap:16px;max-width:560px;margin-top:26px}
.field{display:grid;gap:6px}
.field label{font-size:13.5px;font-weight:600;color:var(--ink2)}
.field input,.field textarea{font:inherit;font-size:15px;color:var(--ink);
  background:var(--card);border:1px solid var(--line);border-radius:10px;padding:11px 13px}
.field input:focus,.field textarea:focus{outline:none;border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(42,120,214,.14)}
.field textarea{min-height:120px;resize:vertical}
.form .actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:4px}
.form .or{font-size:14px;color:var(--ink3)}

/* ---------- Cascade SVG figure ---------- */
figure{margin:30px 0 0}
.figbox{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:26px;overflow-x:auto}
figcaption{font-size:14px;color:var(--ink2);margin-top:14px;max-width:74ch}

/* ---------- Footer ---------- */
.site-footer{background:var(--navy);color:#c3ccd6;padding:56px 0 40px}
.site-footer a{color:#c3ccd6}
.site-footer a:hover{color:#fff}
.footer-top{display:flex;flex-wrap:wrap;gap:30px;justify-content:space-between;
  align-items:flex-start}
.footer-brand .brand{color:#fff}
.footer-brand .tl{color:#8ea0b3;border-color:rgba(255,255,255,.16)}
.footer-links{display:flex;flex-wrap:wrap;gap:26px;font-size:14.5px}
.footer-lang{font-size:13.5px;color:#8ea0b3}
.footer-lang a[aria-current="true"]{color:#fff;font-weight:600}
.disclaimer{margin-top:34px;padding-top:22px;border-top:1px solid rgba(255,255,255,.12);
  font-size:12.5px;color:#8ea0b3;max-width:80ch}
.copyline{margin-top:14px;font-size:12.5px;color:#7c8ea2}

/* ---------- Section intro helper ---------- */
.section-head{max-width:74ch}

/* ---------- Anchor offset for sticky header ---------- */
:target{scroll-margin-top:84px}

/* ---------- Responsive ---------- */
@media (max-width:1160px){
  .section{padding:64px 0}
}
@media (max-width:768px){
  .nav-links{position:fixed;inset:64px 0 auto 0;background:var(--surface);
    border-bottom:1px solid var(--line);flex-direction:column;align-items:stretch;
    gap:0;padding:8px 0;display:none;box-shadow:0 12px 24px rgba(14,27,44,.08)}
  .nav-links.open{display:flex}
  .nav-links a{padding:13px var(--pad);border-bottom:1px solid var(--line-2)}
  .nav-links .lang{border-left:none;padding:13px var(--pad)}
  .nav-links .btn{margin:10px var(--pad)}
  .nav-toggle{display:inline-flex;align-items:center;justify-content:center}
  .g2,.g3,.g4{grid-template-columns:1fr}
  .hero{padding:64px 0 60px}
  .section{padding:52px 0}
  .footer-top{flex-direction:column;gap:22px}
}
@media (max-width:380px){
  :root{--pad:18px}
  .brand .tl{display:none}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none!important}
}

/* =====================================================================
   POLISH LAYER — premium effects & motion
   All motion is gated on html.js + (prefers-reduced-motion: no-preference),
   so with JS off OR reduced-motion on, everything is fully visible & static.
   ===================================================================== */

/* Header elevation on scroll */
.site-header{transition:box-shadow .25s ease, background .25s ease}
.site-header.scrolled{box-shadow:0 6px 24px rgba(14,27,44,.08);
  background:rgba(252,252,251,.95)}
.brand .mark{transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.brand:hover .mark{transform:translateY(-1px) rotate(-2deg)}

/* Buttons: lift + soft shadow */
.btn{position:relative;box-shadow:0 1px 2px rgba(14,27,44,.06);
  transition:background .15s ease, transform .15s ease, box-shadow .2s ease}
.btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(42,120,214,.28)}
.btn:active{transform:translateY(0)}
.btn.on-dark:hover{box-shadow:0 10px 24px rgba(0,0,0,.28)}
.btn.ghost{box-shadow:none}
.btn.ghost:hover{box-shadow:none;transform:translateY(-1px)}

/* Cards: lift on hover */
a.card,.card{transition:border-color .18s ease, box-shadow .25s ease, transform .25s cubic-bezier(.2,.7,.2,1)}
a.card:hover{transform:translateY(-3px)}

/* Product chips shimmer on hover (subtle) */
.tag{transition:transform .15s ease}
a.card:hover .more{text-decoration:none}
.more{transition:transform .18s ease}
a.card:hover .more{transform:translateX(3px)}

/* ---- Hero background: layered brand glow + fine grid + accent rule ---- */
.hero{position:relative;overflow:hidden;isolation:isolate}
.hero>.wrap{position:relative;z-index:2}
.hero::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(42,120,214,.30), transparent 60%),
    radial-gradient(680px 420px at 8% 108%, rgba(0,131,90,.16), transparent 60%),
    radial-gradient(520px 360px at 96% 96%, rgba(34,211,190,.10), transparent 60%);}
.hero::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;opacity:.5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size:44px 44px;
  -webkit-mask-image:radial-gradient(120% 100% at 50% 0%, #000 40%, transparent 78%);
          mask-image:radial-gradient(120% 100% at 50% 0%, #000 40%, transparent 78%);}
/* brand accent rule echoing the logo gradient, at the base of the hero */
.hero .wrap::after{content:"";display:block;height:3px;margin-top:40px;max-width:120px;border-radius:2px;
  background:linear-gradient(90deg,#00c46a,#22d3c0 45%,#2a78d6);}

/* Footer brand mark hover parity */
.site-footer .brand:hover .mark{transform:translateY(-1px) rotate(-2deg)}

/* ---- Scroll-reveal (must mirror SEL list in main.js exactly) ---- */
@media (prefers-reduced-motion: no-preference){
  html.js .hero .kicker,
  html.js .hero h1,
  html.js .hero .lead,
  html.js .hero-tags,
  html.js .hero-cta,
  html.js .section-head,
  html.js .prod,
  html.js figure,
  html.js .alert,
  html.js .form,
  html.js .grid>*,
  html.js .steps>.step,
  html.js .wrap>ul.b{
    opacity:0;transform:translateY(20px);
    transition:opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
    will-change:opacity, transform;}
  html.js .is-in{opacity:1 !important;transform:none !important}

  /* stagger inside grids and step lists */
  html.js .grid>*:nth-child(2){transition-delay:.09s}
  html.js .grid>*:nth-child(3){transition-delay:.18s}
  html.js .grid>*:nth-child(4){transition-delay:.27s}
  html.js .steps>.step:nth-child(2){transition-delay:.08s}
  html.js .steps>.step:nth-child(3){transition-delay:.16s}
  html.js .steps>.step:nth-child(4){transition-delay:.24s}
  /* gentle hero entrance stagger */
  html.js .hero h1{transition-delay:.06s}
  html.js .hero .lead{transition-delay:.12s}
  html.js .hero-tags{transition-delay:.18s}
  html.js .hero-cta{transition-delay:.24s}

  /* cascade diagram draws itself in when the figure reveals */
  html.js figure .figbox svg line{stroke-dasharray:140;stroke-dashoffset:140;
    transition:stroke-dashoffset .9s ease .35s}
  html.js figure.is-in .figbox svg line{stroke-dashoffset:0}
  html.js figure .figbox svg rect,
  html.js figure .figbox svg text{opacity:0;transition:opacity .6s ease}
  html.js figure.is-in .figbox svg rect,
  html.js figure.is-in .figbox svg text{opacity:1}
  html.js figure.is-in .figbox svg rect{transition-delay:.05s}
}

/* Count-up numbers use tabular figures to avoid width jitter */
.stat .v{font-variant-numeric:tabular-nums}
