/* =====================================================================
   basesite.com — "Mission-Critical Enterprise"
   Inspired by xyzreality.com's rhythm — full-bleed dark hero over live
   site linework, large proof metrics, caps category columns, carded
   product showcases, a bold full-bleed CTA strip, dark columned footer —
   executed entirely in the Basesite palette (electric purple on paper
   and ink). Standalone stylesheet — consumes tokens.css only.
   ===================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { overflow-x: clip; }
body.menu-open { overflow: hidden; }

::selection { background: var(--purple-200); color: var(--purple-900); }

a { color: inherit; text-decoration: none; cursor: pointer; }
img { display: block; max-width: 100%; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; padding: 0; }

[id] { scroll-margin-top: 96px; }

.wrap {
  max-width: 1216px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3.4vw, 44px);
}

/* ---------- type helpers ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--primary);
  flex: none;
}
.kicker.bare::before { display: none; }
.accent { color: var(--primary); }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  z-index: 380;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--purple-500), var(--purple-300));
}

/* ---------- skip link ---------- */
.skip {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 400;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              transform var(--dur-med) var(--ease-out);
}
.btn .arrow { display: inline-block; transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}
.btn.secondary {
  background: var(--surface-container-lowest);
  color: var(--on-surface);
  box-shadow: inset 0 0 0 1px var(--outline-variant);
}
.btn.secondary:hover { background: var(--surface-container-low); }
.btn.on-dark {
  background: var(--neutral-0);
  color: var(--neutral-900);
}
.btn.on-dark:hover { background: var(--neutral-100); transform: translateY(-1px); }
.btn.ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.btn.ghost-dark:hover { background: rgba(255, 255, 255, 0.16); }

/* =====================================================================
   NAV — transparent over the dark hero, paper once scrolled
   ===================================================================== */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 375;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px clamp(20px, 3.4vw, 44px);
  transition: background var(--dur-slow) var(--ease-out),
              box-shadow var(--dur-slow) var(--ease-out),
              padding var(--dur-slow) var(--ease-out),
              backdrop-filter var(--dur-slow) var(--ease-out);
}
.topnav .brand img {
  width: 102px;
  filter: invert(1);
  transition: filter var(--dur-med) var(--ease-out);
}
.topnav .spacer { flex: 1; }
.topnav .links { display: flex; gap: 4px; }
.topnav .links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  padding: 9px 14px;
  border-radius: var(--radius-full);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.topnav .links a:hover { color: white; background: rgba(255, 255, 255, 0.1); }
.topnav .btn { padding: 11px 20px; font-size: 14px; }

.topnav.scrolled {
  padding-top: 13px;
  padding-bottom: 13px;
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--ghost-border);
}
.topnav.scrolled .brand img { filter: none; }
.topnav.scrolled .links a { color: var(--neutral-600); }
.topnav.scrolled .links a:hover { color: var(--neutral-900); background: var(--surface-container); }

/* menu-open: light sheet behind the nav */
body.menu-open .topnav { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
body.menu-open .topnav .brand img { filter: none; }

/* burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  position: relative;
  z-index: 380;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  flex: none;
  transition: background var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.6px;
  background: white;
  border-radius: 2px;
  transition: transform var(--dur-med) var(--ease-out), top var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.topnav.scrolled .burger, body.menu-open .burger {
  box-shadow: inset 0 0 0 1px var(--outline-variant);
  background: var(--surface-container-lowest);
}
.topnav.scrolled .burger span, body.menu-open .burger span { background: var(--on-surface); }
.burger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* mobile menu — clean paper sheet */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 370;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 7vw, 56px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med);
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-med) var(--ease-out);
}
.mobile-menu nav { display: grid; }
.mobile-menu a.mlink {
  font-family: var(--font-display);
  font-size: clamp(26px, 7vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  padding: 18px 0;
  display: flex;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--ghost-border);
  color: var(--on-surface);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.mobile-menu.open a.mlink { opacity: 1; transform: none; }
.mobile-menu a.mlink .ix {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
}
.mobile-menu .m-foot {
  margin-top: 36px;
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out) 220ms, transform var(--dur-slow) var(--ease-out) 220ms;
}
.mobile-menu.open .m-foot { opacity: 1; transform: none; }
.mobile-menu .m-foot .btn { width: 100%; }
.mobile-menu .m-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
  text-align: center;
}

/* =====================================================================
   HERO — full-bleed ink over live site linework
   ===================================================================== */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 640px at 82% -10%, color-mix(in oklch, var(--purple-600) 36%, transparent), transparent 65%),
    radial-gradient(800px 560px at -10% 110%, color-mix(in oklch, var(--purple-700) 26%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, rgba(153, 133, 255, 0.055) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(153, 133, 255, 0.055) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(153, 133, 255, 0.05) 0 1px, transparent 1px 256px),
    repeating-linear-gradient(90deg, rgba(153, 133, 255, 0.05) 0 1px, transparent 1px 256px),
    var(--neutral-900);
  color: rgba(255, 255, 255, 0.93);
  padding: clamp(150px, 20vh, 200px) 0 clamp(56px, 7vw, 84px);
  overflow: clip;
}
#plot-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(100deg, transparent 26%, rgba(0,0,0,0.55) 52%, black 78%);
  mask-image: linear-gradient(100deg, transparent 26%, rgba(0,0,0,0.55) 52%, black 78%);
}
.hero .wrap { position: relative; }
.hero .kicker {
  color: var(--purple-200);
  margin-bottom: 26px;
}
.hero .kicker::before { background: var(--purple-300); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 74px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.02;
  margin: 0 0 26px;
  color: white;
}
.hero h1 em {
  font-style: normal;
  color: var(--purple-300);
}
.hero-sub {
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.66);
  margin: 0 0 36px;
  max-width: 54ch;
  text-wrap: pretty;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: clamp(56px, 8vw, 96px);
}

/* proof metrics inside the hero — engineering notation */
.hero-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
}
.hero-stats .stat {
  padding: clamp(24px, 2.8vw, 38px) clamp(18px, 2vw, 30px) 0 0;
  position: relative;
}
.hero-stats .stat + .stat { padding-left: clamp(18px, 2vw, 30px); }
.hero-stats .stat + .stat::before {
  content: "";
  position: absolute;
  left: 0; top: clamp(24px, 2.8vw, 38px); bottom: 4px;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.hero-stats .stat::after {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 28px;
  height: 3px;
  background: var(--purple-300);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-slow) var(--ease-out) calc(var(--rd, 0ms) + 300ms);
}
.hero-stats .stat + .stat::after { left: clamp(18px, 2vw, 30px); }
.hero-stats .stat.in::after { transform: scaleX(1); }
.hero-stats .stat .n {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: white;
  font-variant-numeric: tabular-nums;
}
.hero-stats .stat .n sup {
  font-size: 0.5em;
  line-height: 0;
  color: var(--purple-300);
  margin-left: 0.06em;
  font-variant-numeric: tabular-nums;
}
.hero-stats .stat .l {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 12px;
  max-width: 24ch;
}

/* ---------- word choreography: blur-rise per word ---------- */
.hero h1 .line { display: block; }
[data-words] .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.7em) rotate(-3deg) scale(0.96);
  filter: blur(10px);
  transform-origin: 0 100%;
  transition: opacity 600ms var(--ease-out),
              transform 850ms cubic-bezier(0.3, 1.36, 0.44, 1),
              filter 650ms var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 48ms + var(--wd, 0ms));
  will-change: transform, filter;
}
[data-words].in .word {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* ---------- scramble decode ---------- */
[data-scramble].scrambling { color: var(--purple-200); }

/* generic reveal — gentle */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}
[data-reveal="fade"] { transform: none; }
[data-reveal].in { opacity: 1; transform: none; }

/* clip-wipe entrance for the product cards */
[data-reveal="clip"] {
  opacity: 1;
  transform: translateY(48px) scale(0.985);
  clip-path: inset(6% 3% 36% 3% round var(--radius-xl));
  transition: clip-path 950ms var(--ease-in-out),
              transform 1050ms cubic-bezier(0.26, 1.2, 0.42, 1);
  transition-delay: var(--rd, 0ms);
  will-change: clip-path, transform;
}
[data-reveal="clip"].in {
  clip-path: inset(0 0 0 0 round var(--radius-xl));
  transform: none;
}

/* kicker rule draws itself */
.kicker::before {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 700ms var(--ease-in-out) 120ms;
}
.kicker.in::before { transform: scaleX(1); }

/* parallax targets inside product media */
.product-media > * {
  transform: translateY(var(--py, 0px));
  will-change: transform;
}

/* button shine sweep */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 36%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg) translateX(-220%);
  transition: transform 750ms var(--ease-out);
  pointer-events: none;
}
.btn:hover::before { transform: skewX(-20deg) translateX(420%); }
.btn > * { position: relative; }

/* the smooth wrapper carries the velocity skew */
#smooth { position: relative; will-change: transform; }
.hero .wrap, #plot-canvas { will-change: transform, opacity; }

/* ---------- connection spine: hero → ground ---------- */
#spine {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.section .wrap, .contact-strip .wrap { position: relative; z-index: 2; }
.sp-trunk { stroke: rgba(110, 86, 245, 0.6); stroke-width: 1.5; fill: none; stroke-linecap: round; }
.sp-glow { stroke: rgba(110, 86, 245, 0.12); stroke-width: 6; fill: none; stroke-linecap: round; }
.sp-branch {
  stroke: rgba(110, 86, 245, 0.45);
  stroke-width: 1.2;
  fill: none;
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}
.sp-node {
  fill: none;
  stroke: rgba(110, 86, 245, 0.85);
  stroke-width: 1.4;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.3);
  transition: opacity 450ms var(--ease-out), transform 600ms cubic-bezier(0.3, 1.4, 0.5, 1);
}
.sp-branch.on, .sp-node.on { opacity: 1; transform: none; }
.sp-ground path {
  stroke: rgba(110, 86, 245, 0.6);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.sp-ground {
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
}
.sp-ground.on { opacity: 1; }
.sp-tip { fill: #ffffff; opacity: 0; }
.sp-halo { fill: rgba(110, 86, 245, 0.3); opacity: 0; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section {
  padding: clamp(84px, 10vw, 136px) 0;
  position: relative;
}
.section.tinted {
  background:
    repeating-linear-gradient(0deg, rgba(13, 12, 21, 0.026) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(13, 12, 21, 0.026) 0 1px, transparent 1px 64px),
    var(--surface-container-lowest);
  border-top: 1px solid var(--ghost-border);
  border-bottom: 1px solid var(--ghost-border);
}
.section-head { max-width: 780px; margin-bottom: clamp(40px, 5.5vw, 64px); }
.section-head .kicker { margin-bottom: 18px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 50px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

/* =====================================================================
   § 01 WHO WE ARE
   ===================================================================== */
.who-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}
.who-grid h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 18px 0 0;
  text-wrap: balance;
}
.who-grid .body p {
  font-size: clamp(15.5px, 1.25vw, 17.5px);
  line-height: 1.68;
  color: var(--neutral-600);
  margin: 0;
  text-wrap: pretty;
}
.who-grid .body p + p { margin-top: 20px; }
.who-grid .body strong { color: var(--neutral-900); font-weight: 600; }

/* =====================================================================
   § 02 WHY BASESITE — caps category columns
   ===================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 56px);
}
.why-col {
  border-top: 2px solid var(--neutral-900);
  padding-top: 22px;
}
.why-col .ix {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 14px;
}
.why-col h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.45;
  margin: 0 0 16px;
  color: var(--neutral-900);
}
.why-col p {
  font-size: 14.5px;
  line-height: 1.66;
  color: var(--neutral-600);
  margin: 0;
  text-wrap: pretty;
}
.why-col p + p { margin-top: 12px; }

/* =====================================================================
   HOW IT WORKS — process steps
   ===================================================================== */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 2.8vw, 44px);
  position: relative;
  z-index: 2;
}
.flow-note {
  margin-top: clamp(28px, 3.6vw, 50px);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--neutral-500);
  max-width: 70ch;
  position: relative;
  z-index: 2;
}
.flow-note strong { color: var(--primary); font-weight: 600; }

/* =====================================================================
   WHERE WE FIT — build timeline on a datum line
   ===================================================================== */
.fit-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 40px);
  margin-top: clamp(36px, 4.5vw, 60px);
  position: relative;
  z-index: 2;
}
.fit-rail::before {
  content: "";
  position: absolute;
  top: 6px; left: 4px; right: 4px;
  height: 1px;
  background: var(--outline-variant);
}
.fit-phase { position: relative; padding-top: 30px; }
.fit-phase::before {
  content: "";
  position: absolute;
  top: 1px; left: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--primary);
}
.fit-phase .ph-when {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.fit-phase h3 {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 10px;
  text-wrap: balance;
}
.fit-phase p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--neutral-600);
  margin: 0;
  text-wrap: pretty;
}
.fit-note {
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: 22px;
  border-top: 1px solid var(--ghost-border);
  font-size: clamp(15px, 1.3vw, 17.5px);
  line-height: 1.55;
  color: var(--neutral-700);
  max-width: 62ch;
  position: relative;
  z-index: 2;
}
.fit-note strong { color: var(--neutral-900); font-weight: 600; }

@media (max-width: 960px) {
  .flow-grid { grid-template-columns: 1fr 1fr; gap: 30px 24px; }
  .fit-rail { grid-template-columns: 1fr; gap: 0; }
  .fit-rail::before { top: 4px; bottom: 4px; left: 5px; right: auto; width: 1px; height: auto; }
  .fit-phase { padding-top: 0; padding-left: 30px; padding-bottom: 30px; }
  .fit-phase::before { top: 3px; }
  .fit-phase:last-child { padding-bottom: 0; }
}
@media (max-width: 640px) {
  .flow-grid { grid-template-columns: 1fr; gap: 0; }
  .flow-grid .why-col { padding-bottom: 24px; }
}

/* =====================================================================
   § 03 PRODUCTS — carded showcases
   ===================================================================== */
.product-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 0 0 1px var(--ghost-border), var(--shadow-ambient-sm);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: stretch;
  transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.product-card:hover {
  box-shadow: inset 0 0 0 1px var(--ghost-border), var(--shadow-ambient-lg);
  transform: translateY(-3px);
}
.product-card + .product-card { margin-top: clamp(18px, 2.2vw, 28px); }
.product-card.flip .product-copy { order: 2; }
.product-card.flip .product-media { order: 1; }

.product-copy {
  padding: clamp(28px, 3.6vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.product-copy .kicker { color: var(--primary); }
.product-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin: 16px 0 12px;
  text-wrap: balance;
}
.product-copy .tagline {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--neutral-800);
  margin: 0 0 16px;
  max-width: 44ch;
}
.product-copy .desc p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--neutral-600);
  margin: 0 0 12px;
  max-width: 52ch;
  text-wrap: pretty;
}
.product-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.product-meta .m {
  min-width: 150px;
  border-top: 2px solid var(--surface-container-high);
  padding-top: 10px;
}
.product-meta .k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}
.product-meta .v {
  font-size: 14px;
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: -0.005em;
}

.product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 3vw, 44px);
  min-height: 360px;
}
.product-media.media-ink {
  background:
    radial-gradient(120% 120% at 90% 0%, color-mix(in oklch, var(--purple-600) 30%, transparent), transparent 60%),
    var(--neutral-900);
}
.product-media.media-tint {
  background: var(--purple-50);
  box-shadow: inset 1px 0 0 var(--ghost-border);
}
.product-card.flip .product-media.media-tint { box-shadow: inset -1px 0 0 var(--ghost-border); }
.product-media > * { width: 100%; max-width: 560px; }
.product-media .phone-stage { width: auto; }

/* ---------- product visuals ---------- */
/* dark instrument panel (FacilityConnect) */
.instrument {
  background: color-mix(in oklch, var(--neutral-900) 55%, transparent);
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 1.8vw, 22px);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1),
              0 24px 60px -28px rgba(13, 12, 21, 0.8);
  backdrop-filter: blur(6px);
}
.instrument > * { position: relative; }
.inst-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.inst-head .crumb {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.inst-head h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 6px 0 0;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--live-ok);
  white-space: nowrap;
}
.live-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live-ok);
  box-shadow: 0 0 8px var(--live-ok);
  animation: pip 1.8s ease-in-out infinite;
}
@keyframes pip { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.kpi {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.kpi .lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255, 255, 255, 0.42);
}
.kpi .v {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.kpi .v.warn { color: var(--live-warn); }
.kpi .v.ok { color: var(--live-ok); }
.kpi .d {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}
.netcard {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 15px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.bars { display: grid; gap: 12px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(82px, auto) 1fr 52px;
  gap: 12px;
  align-items: center;
}
.bar-row .nm {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}
.bar-row .track {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.bar-row .fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--purple-400), var(--purple-300));
  transition: width 900ms var(--ease-out);
}
.bar-row .fill.warn { background: linear-gradient(90deg, #d9952a, var(--live-warn)); }
.bar-row .fill.ok { background: linear-gradient(90deg, #3cb878, var(--live-ok)); }
.bar-row .pct {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-align: right;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

/* white plotter sheet (Facility Designer) */
.plot-sheet {
  background: var(--neutral-0);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 1.6vw, 22px);
  box-shadow: inset 0 0 0 1px var(--ghost-border), var(--shadow-ambient-md);
  position: relative;
  overflow: hidden;
  color: var(--on-surface);
}
.plot-sheet .inst-head .crumb { color: var(--neutral-400); }
.plot-sheet svg { width: 100%; height: auto; display: block; }
.plot-sheet .node {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  transition: transform 480ms var(--ease-out);
  transition-delay: var(--nd, 0ms);
}
.draw-scope.drawn .node { transform: scale(1); }
.deltas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.delta {
  border-top: 2px solid var(--surface-container-high);
  padding-top: 10px;
}
.delta .k {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--neutral-500);
}
.delta .v {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.4vw, 21px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.delta .v.ok { color: var(--signal-success); }

/* phone (InstallInsights) */
.phone-stage {
  display: flex;
  justify-content: center;
  position: relative;
}
.phone {
  position: relative;
  width: min(290px, 76vw);
  border-radius: 44px;
  background: #17161f;
  padding: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16),
              inset 0 0 0 4px rgba(0, 0, 0, 0.6),
              var(--shadow-ambient-lg);
}
.phone-screen {
  border-radius: 34px;
  background:
    radial-gradient(140% 60% at 80% -10%, color-mix(in oklch, var(--purple-600) 26%, transparent), transparent 60%),
    var(--neutral-900);
  color: rgba(255, 255, 255, 0.93);
  overflow: hidden;
  padding: 15px 15px 11px;
  display: grid;
  gap: 11px;
}
.phone-statusbar {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  padding: 2px 5px 0;
}
.phone-top .crumb {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 11px;
}
.phone-top h5 {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.012em;
  font-weight: 600;
  margin: 4px 0 10px;
}
.phone-prog { display: flex; align-items: center; gap: 10px; }
.phone-prog .bar {
  flex: 1;
  height: 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  display: block;
}
.phone-prog .bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--purple-400), var(--purple-300));
  transition: width 1000ms var(--ease-out) 300ms;
}
.in .phone-prog .bar i { width: var(--prog, 68%); }
.phone-prog .pct {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.phone-list { display: grid; gap: 6px; }
.inst {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.inst .t { font-size: 12px; font-weight: 600; letter-spacing: -0.005em; }
.inst .s { font-family: var(--font-mono); font-size: 9.5px; color: rgba(255, 255, 255, 0.42); margin-top: 3px; }
.chip {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.chip.done { color: var(--live-ok); background: color-mix(in oklch, var(--live-ok) 15%, transparent); }
.chip.prog { color: var(--purple-200); background: color-mix(in oklch, var(--purple-400) 25%, transparent); }
.chip.hold { color: var(--live-warn); background: color-mix(in oklch, var(--live-warn) 15%, transparent); }
.phone-tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 9px 8px 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.phone-tabbar svg { width: 18px; height: 18px; stroke-width: 1.8; color: rgba(255, 255, 255, 0.4); }
.phone-tabbar .tab[data-on] svg { color: var(--purple-300); }

/* =====================================================================
   § 04 CONTACT — full-bleed ink strip
   ===================================================================== */
.contact-strip {
  background:
    radial-gradient(1000px 560px at 88% -20%, color-mix(in oklch, var(--purple-600) 36%, transparent), transparent 65%),
    repeating-linear-gradient(0deg, rgba(153, 133, 255, 0.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(153, 133, 255, 0.05) 0 1px, transparent 1px 64px),
    var(--neutral-900);
  color: rgba(255, 255, 255, 0.93);
  padding: clamp(84px, 10vw, 132px) 0;
  position: relative;
  overflow: clip;
}
.contact-strip .kicker { color: rgba(255, 255, 255, 0.55); }
.contact-strip .kicker::before { background: var(--purple-300); }
#contact-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, rgba(0,0,0,0.6) 55%, black 80%);
  mask-image: linear-gradient(100deg, transparent 30%, rgba(0,0,0,0.6) 55%, black 80%);
}
.contact-strip .wrap { position: relative; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.contact-strip h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.07;
  margin: 18px 0 18px;
  max-width: 22ch;
  color: white;
  text-wrap: balance;
}
.contact-strip p.note {
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 30px;
  max-width: 52ch;
  text-wrap: pretty;
}
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.contact-aside {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: clamp(24px, 3vw, 44px);
  display: grid;
  gap: 22px;
}
.contact-aside .k {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.contact-aside a.mail {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: white;
  margin-top: 8px;
  border-bottom: 2px solid var(--purple-300);
  padding-bottom: 4px;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.contact-aside a.mail:hover { color: var(--purple-200); border-color: var(--purple-200); }
.contact-aside .sign {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
}

/* =====================================================================
   FOOTER — dark, columned
   ===================================================================== */
.footer {
  background: var(--neutral-900);
  color: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer .ftop {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: clamp(48px, 6vw, 76px) 0 clamp(36px, 5vw, 56px);
}
.footer .colhead {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 14px; }
.footer li a { color: rgba(255, 255, 255, 0.65); transition: color var(--dur-fast) var(--ease-out); }
.footer li a:hover { color: white; }
.footer .lead img { width: 106px; filter: invert(1); }
.footer .lead p {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  max-width: 36ch;
  margin: 18px 0 0;
}
.footer .fbottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 0 28px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1080px) {
  .who-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 960px) {
  .topnav .links, .topnav > .btn { display: none; }
  .burger { display: block; }
  #spine { display: none; }

  .hero { padding-top: 128px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat:nth-child(odd) { padding-left: 0; }
  .hero-stats .stat:nth-child(odd)::before { display: none; }
  .hero-stats .stat:nth-child(odd)::after { left: 0; }
  .hero-stats .stat:nth-child(n+3) { box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1); margin-top: 8px; }

  .why-grid { grid-template-columns: 1fr; gap: 28px; }

  .product-card, .product-card.flip { grid-template-columns: 1fr; }
  .product-card .product-media { order: -1; min-height: 300px; }
  .product-card .product-media.media-tint { box-shadow: inset 0 -1px 0 var(--ghost-border); }
  .product-card.flip .product-media.media-tint { box-shadow: inset 0 -1px 0 var(--ghost-border); }
  .product-card .product-copy { order: 1; }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 26px; }

  .footer .ftop { grid-template-columns: 1fr 1fr; }
  .footer .lead { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero { padding-top: 116px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .kpis { gap: 6px; }
  .deltas { grid-template-columns: 1fr 1fr; gap: 12px 10px; }
  .bar-row { grid-template-columns: 72px 1fr 46px; gap: 8px; }
  .bar-row .nm { white-space: normal; }
  .product-media { padding: 20px; min-height: 0; }
  .contact-actions .btn { flex: 1 1 100%; }
  .footer .ftop { grid-template-columns: 1fr; }
  .fbottom { flex-direction: column; }
}

@media (hover: none) {
  .product-card:hover, .btn:hover { transform: none; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-badge::before { animation: none; }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  [data-reveal="clip"] { clip-path: none !important; }
  [data-words] .word {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .kicker::before { transform: scaleX(1); transition: none; }
  .btn::before { display: none; }
  #smooth { transform: none !important; }
  .product-media > * { transform: none !important; }
  .plot-sheet .node { transform: scale(1); transition: none; }
  .bar-row .fill, .phone-prog .bar i { transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; }
}
