/* =====================================================================
   SCEPTERIX — premium design system (flag: designSystemV2)
   Loaded after main.css on every page; switching the flag off disables this whole file.
   Tokens first, then typography, rhythm and components. Brand palette and wordmark unchanged.
   ===================================================================== */
:root {
  /* type scale (fluid, 380 → 1440px) */
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-base: clamp(1rem, .96rem + .18vw, 1.0625rem);
  --fs-md: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  --fs-lg: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem);
  --fs-xl: clamp(1.375rem, 1.2rem + .8vw, 1.75rem);
  --fs-2xl: clamp(1.625rem, 1.3rem + 1.5vw, 2.5rem);
  --fs-3xl: clamp(2rem, 1.45rem + 2.4vw, 3.25rem);
  --fs-4xl: clamp(2.25rem, 1.5rem + 3.3vw, 4.25rem);
  /* spacing scale (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 128px;
  --section-y: clamp(72px, 5vw + 44px, 128px);
  --section-y-tight: clamp(56px, 3.5vw + 36px, 88px);
  /* radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
  /* elevation + glow */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -18px rgba(0, 0, 0, .7);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 24px 60px -30px rgba(0, 0, 0, .85);
  --glow-sm: 0 0 0 1px rgba(63, 224, 245, .28), 0 0 24px -8px rgba(63, 224, 245, .5);
  --glow-md: 0 0 0 1px rgba(63, 224, 245, .42), 0 18px 48px -16px rgba(63, 224, 245, .45);
  --ring: 0 0 0 3px rgba(125, 243, 255, .55);
  /* motion language, shared by CSS and JS (motion.js reads these) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-1: .16s; --dur-2: .28s; --dur-3: .5s; --dur-4: .8s;
  --measure: 68ch;
}

/* ---------- Typography ---------- */
body { font-size: var(--fs-base); line-height: 1.7; text-rendering: optimizeLegibility; }
h1, h2 { letter-spacing: .015em; text-wrap: balance; }
h1 { font-size: var(--fs-4xl); line-height: 1.02; }
h2 { font-size: var(--fs-3xl); line-height: 1.06; }
/* sub-headings in mixed case: calmer, faster to read, and product names keep their real casing */
h3 { text-transform: none; letter-spacing: -.005em; font-size: var(--fs-lg); line-height: 1.25; font-weight: 700; text-wrap: balance; }
h4 { text-transform: none; letter-spacing: 0; font-size: var(--fs-md); }
p, li { text-wrap: pretty; }
.lead { font-size: var(--fs-md); line-height: 1.65; max-width: 60ch; color: #C3D2E3; }
.section-head .lead, .page-hero .lead { max-width: 58ch; }
.prose, .card p, .flow-steps li, .roadmap p { max-width: var(--measure); }
.eyebrow { font-size: var(--fs-xs); letter-spacing: .24em; margin-bottom: var(--sp-4); }
.grad-text { filter: drop-shadow(0 0 14px rgba(63, 224, 245, .28)); }
strong { font-weight: 600; }

/* home hero: one clear hierarchy (slogan eyebrow → small wordmark line → headline) */
.hero__copy h1 { font-size: clamp(2rem, 1.15rem + 2.75vw, 3.35rem); line-height: 1.04; letter-spacing: .01em; }
.hero__copy h1 .brandline { font-size: .34em; letter-spacing: .42em; margin-bottom: .9em; opacity: .95; }
.hero__copy .lead { max-width: 52ch; }
.hero__hint { font-size: var(--fs-xs); letter-spacing: .02em; color: #8FA6C0; }

/* ---------- Rhythm ---------- */
.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }
.section-head { margin-bottom: clamp(var(--sp-6), 3vw, var(--sp-8)); }
.section-head h2 { margin-bottom: var(--sp-4); }
.grid { gap: clamp(var(--sp-4), 1.6vw, var(--sp-5)); }
.page-hero { padding-top: clamp(48px, 5vw + 20px, 104px); padding-bottom: clamp(32px, 3vw, 56px); }
@media (max-width: 767px) {
  .section { padding-block: 64px; }
  .section--tight { padding-block: 48px; }
}

/* ---------- Buttons: primary / secondary (ghost) / link ---------- */
.btn {
  min-height: 48px; padding: 13px 24px; border-radius: var(--r-pill);
  font-size: .9375rem; font-weight: 600; letter-spacing: .01em;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), background-color var(--dur-2), color var(--dur-2), border-color var(--dur-2);
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: var(--dur-1); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-primary {
  background: linear-gradient(180deg, #6FEFFF 0%, var(--cyan) 55%, #2FCBE6 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 28px -10px rgba(63, 224, 245, .75);
}
.btn-primary:hover { background: linear-gradient(180deg, #9AF6FF 0%, var(--aqua) 60%, #45DDF2 100%); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 16px 36px -10px rgba(63, 224, 245, .9); }
.btn-primary:focus-visible { box-shadow: var(--ring), 0 10px 28px -10px rgba(63, 224, 245, .75); }
.btn-ghost { background: rgba(15, 37, 71, .5); border-color: rgba(125, 243, 255, .32); }
.btn-ghost:hover { background: rgba(63, 224, 245, .08); border-color: var(--aqua); box-shadow: var(--glow-sm); }
.btn-sm { min-height: 40px; padding: 9px 18px; font-size: .875rem; }
.link-arrow { border-radius: var(--r-sm); transition: color var(--dur-2); }
.link-arrow:focus-visible { outline: none; box-shadow: var(--ring); }
.nav-link { transition: color var(--dur-2), background-color var(--dur-2); }
.nav-link:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- Cards ---------- */
.card {
  border-radius: var(--r-lg);
  border-color: rgba(125, 243, 255, .12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 38%),
    linear-gradient(160deg, rgba(17, 42, 80, .82), rgba(10, 26, 51, .78));
  box-shadow: var(--shadow-1);
  padding: clamp(22px, 1.6vw + 14px, 32px);
  transition: transform var(--dur-3) var(--ease-out), border-color var(--dur-2), box-shadow var(--dur-3) var(--ease-out);
  isolation: isolate;
}
/* pointer-following glow (position set by motion.js via --mx/--my; sits still at the top otherwise) */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(63, 224, 245, .10), transparent 60%);
  opacity: 0; transition: opacity var(--dur-3) var(--ease-out);
}
.card:hover::after, .card:focus-within::after { opacity: 1; }
.card:hover { border-color: rgba(125, 243, 255, .28); }
a.card:hover, .card--link:hover { transform: translateY(-4px); border-color: rgba(125, 243, 255, .5); box-shadow: var(--glow-md); }
a.card:focus-visible { outline: none; box-shadow: var(--ring), var(--glow-md); }
.card h3 { margin-bottom: var(--sp-3); }
.icon-tile { border-radius: var(--r-md); }
.product-card .sector { font-size: var(--fs-xs); letter-spacing: .16em; }
.pillar li { border-radius: var(--r-pill); font-size: var(--fs-xs); }

/* ---------- Badges ---------- */
.badge { padding: 6px 12px; font-size: .6875rem; letter-spacing: .12em; backdrop-filter: blur(6px); }

/* ---------- Forms ---------- */
.input, .select, .textarea {
  border-radius: var(--r-md); border-color: rgba(159, 179, 204, .24); background-color: rgba(5, 14, 31, .55);
  transition: border-color var(--dur-2), box-shadow var(--dur-2), background-color var(--dur-2);
}
.input:hover, .select:hover, .textarea:hover { border-color: rgba(159, 179, 204, .42); }
.input:focus, .select:focus, .textarea:focus { background-color: rgba(5, 14, 31, .8); box-shadow: 0 0 0 3px rgba(63, 224, 245, .18), 0 0 24px -10px rgba(63, 224, 245, .6); }
.field label, .field .label { font-weight: 500; letter-spacing: .005em; }
.field.is-valid .input, .field.is-valid .textarea, .field.is-valid .select { border-color: rgba(63, 224, 176, .55); }
/* checkbox rows: the tick sits beside its text (".field label" was forcing display:block) */
.field label.checkbox { display: flex; margin-bottom: 0; }
/* custom checkbox, same hit area */
.checkbox input {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 6px; margin-top: 2px;
  border: 1.5px solid rgba(159, 179, 204, .5); background: rgba(5, 14, 31, .6); display: grid; place-items: center; cursor: pointer;
  transition: background-color var(--dur-2), border-color var(--dur-2), box-shadow var(--dur-2);
}
.checkbox input::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--midnight); border-bottom: 2px solid var(--midnight); transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform var(--dur-2) var(--ease-out); }
.checkbox input:checked { background: var(--cyan); border-color: var(--cyan); }
.checkbox input:checked::after { transform: rotate(-45deg) scale(1); }
.checkbox input:focus-visible { outline: none; box-shadow: var(--ring); }
.field.has-error .checkbox input { border-color: #FF8A8A; }

/* ---------- Section pieces ---------- */
.cta-band { border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.demo { border-radius: var(--r-xl); }
.flow-steps li, .kpi, .corridors, .ds-row, .split-out div { border-radius: var(--r-md); }
.stat strong { letter-spacing: -.01em; }
.breadcrumb { font-size: var(--fs-sm); }
.dropdown { border-radius: var(--r-lg); }
.dropdown a { border-radius: var(--r-md); transition: background-color var(--dur-1); }
.dropdown a:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- Footer ---------- */
.footer-logo img { width: 190px; margin: -18px 0 6px -10px; }
.site-footer h2 { font-size: var(--fs-xs); }
.footer-links a { transition: color var(--dur-1); }
.social a { border-radius: var(--r-md); transition: border-color var(--dur-2), color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-2) var(--ease-out); }
.social a:hover { transform: translateY(-2px); }

/* ---------- Floating WhatsApp: smaller on phones so it never sits on top of text ---------- */
@media (max-width: 767px) {
  .wa-float { width: 48px; height: 48px; right: calc(12px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); }
  .wa-float svg { width: 24px; height: 24px; }
  .site-footer { padding-bottom: 72px; } /* the last footer line stays clear of the button */
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover, a.card:hover, .social a:hover { transform: none; }
}
