/* ============================================================
   TEKRA v2 — 2026 design system
   Dark indigo · bento · kinetic type · scroll effects
   Brand: #7356EC → #5A61ED → #2E8BF5 (from the logo kit)
   ============================================================ */

:root {
  --bg:            oklch(0.115 0.018 285);
  --bg-deep:       oklch(0.09 0.015 285);
  --surface:       oklch(0.155 0.022 283);
  --surface-2:     oklch(0.19 0.025 283);
  --line:          oklch(0.28 0.03 282);
  --line-soft:     oklch(0.21 0.025 283);
  --ink:           oklch(0.97 0.004 280);
  --ink-soft:      oklch(0.84 0.015 280);
  --muted:         oklch(0.71 0.025 280);

  --violet:        #7356EC;
  --indigo:        #5A61ED;
  --blue:          #2E8BF5;
  --accent:        oklch(0.74 0.15 277);            /* readable indigo for text/links */
  --accent-strong: oklch(0.64 0.2 273);
  --grad:          linear-gradient(100deg, #7356EC 0%, #5A61ED 45%, #2E8BF5 100%);
  --glow:          oklch(0.6 0.2 275 / 0.4);
  --on-brand:      #ffffff;

  --font-display: "Sora", sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --text-xs: 0.8rem;
  --text-sm: 0.9rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.3vw, 3.2rem);

  --space-section: clamp(5rem, 4rem + 6vw, 10rem);
  --space-gutter: clamp(1.25rem, 4vw, 3rem);
  --container: 76rem;

  --z-nav: 100;
  --z-menu: 110;
  --z-progress: 120;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
p  { max-width: 68ch; text-wrap: pretty; }
.lead { font-size: var(--text-lg); color: var(--ink-soft); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: var(--text-sm); }
.accent { color: var(--accent); }

.container {
  width: min(var(--container), 100% - 2 * var(--space-gutter));
  margin-inline: auto;
}
section { padding-block: var(--space-section); position: relative; }
.section-tight { padding-block: calc(var(--space-section) * 0.55); }

::selection { background: var(--indigo); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Scroll progress */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--grad);
  z-index: var(--z-progress);
  box-shadow: 0 0 14px var(--glow);
}

/* Film grain */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); }
  60% { transform: translate(-2%,-2%); }
  80% { transform: translate(3%,3%); }
}

/* Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-a { width: 36rem; height: 36rem; background: oklch(0.45 0.18 285 / 0.4); top: -14rem; right: -10rem; }
.orb-b { width: 28rem; height: 28rem; background: oklch(0.5 0.16 255 / 0.32); bottom: -12rem; left: -8rem; animation-delay: -9s; }
@keyframes drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(4rem,2.5rem) scale(1.12); }
}

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: var(--z-nav);
  background: oklch(0.115 0.018 285 / 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; height: 76px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 34px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.02em;
  transition: color 0.2s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.2s;
}
.btn-primary { background: var(--grad); color: var(--on-brand); }
.btn-primary:hover { box-shadow: 0 10px 40px var(--glow); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: oklch(0.15 0.02 283 / 0.5); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 1.05rem 2.2rem; font-size: 1rem; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-block: 10rem 5rem;
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.3;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(90rem 50rem at 72% -10%, oklch(0.35 0.14 280 / 0.4), transparent 60%),
    linear-gradient(to bottom, oklch(0.115 0.018 285 / 0.5), var(--bg) 92%);
}
.hero h1 {
  font-size: clamp(2.5rem, 1.1rem + 6.3vw, 5.8rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  max-width: 15ch;
  margin-bottom: 1.6rem;
}
.hero .lead { max-width: 52ch; margin-bottom: 2.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 2rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.24rem 0.75rem; white-space: nowrap;
}
.hero-badges .tag {
  background: oklch(0.16 0.025 283 / 0.6);
  backdrop-filter: blur(6px);
}
.hero-badges .tag::before { content: "◆ "; color: var(--accent); font-size: 0.6rem; }

.hero-ticker {
  margin-top: 4.5rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.4rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 2.4rem;
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--muted); letter-spacing: 0.04em;
}
.hero-ticker b { color: var(--accent); font-weight: 500; }

/* Kinetic type */
.kinetic .word { display: inline-block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; white-space: nowrap; }
.kinetic .char { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  html.js .kinetic .char {
    opacity: 0;
    transform: translateY(110%) rotate(4deg);
    transition: opacity 0.55s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: calc(var(--i) * 26ms);
  }
  html.js .kinetic.play .char { opacity: 1; transform: none; }
}

/* Marquee */
.band {
  border-block: 1px solid var(--line-soft);
  padding: 1.1rem 0;
  overflow: hidden;
  background: var(--bg-deep);
}
.band-track {
  display: flex; gap: 3.5rem; width: max-content;
  animation: marquee 36s linear infinite;
  font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted);
}
.band-track span { white-space: nowrap; }
.band-track span::after { content: "·"; margin-left: 3.5rem; color: var(--accent-strong); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scrub band */
.scrub-band {
  overflow: hidden;
  padding: 3.2rem 0;
  border-block: 1px solid var(--line-soft);
  background: var(--bg-deep);
}
.scrub-line {
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1.5px oklch(0.42 0.09 280);
  will-change: transform;
}
.scrub-line b { color: var(--accent); -webkit-text-stroke: 0; }

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(11.5rem, auto);
  gap: 1.1rem;
}
.tile {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  padding: 1.7rem 1.8rem;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none;
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  isolation: isolate;
}
.tile:hover {
  transform: translateY(-5px);
  border-color: oklch(0.45 0.12 278);
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.45), 0 0 44px oklch(0.6 0.2 275 / 0.1);
}
.tile h3 { font-size: var(--text-lg); margin: 0 0 0.4rem; }
.tile p { margin: 0; color: var(--muted); font-size: var(--text-sm); max-width: 46ch; }
.tile .tile-kicker {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: auto; padding-bottom: 1.6rem;
}
.tile-img { position: absolute; inset: 0; z-index: -1; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; transition: transform 0.8s var(--ease-out), opacity 0.5s; }
.tile:hover .tile-img img { transform: scale(1.06); opacity: 0.5; }
.tile-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, oklch(0.13 0.02 283 / 0.96) 22%, oklch(0.13 0.02 283 / 0.15));
}
.tile-mini {
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.8;
  color: var(--ink-soft);
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.2rem;
  overflow: hidden;
}
.tile-mini .g { color: oklch(0.8 0.16 150); }
.tile-mini .y { color: oklch(0.85 0.13 90); }
.tile-mini .k { color: var(--accent); }
.tile-mini .c { color: var(--muted); }

/* Featured tile — animated gradient border */
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.tile-featured { padding: 0; border: none; background: none; }
.tile-featured::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--spin), #7356EC, oklch(0.3 0.04 283) 25%, oklch(0.3 0.04 283) 45%, #2E8BF5 60%, oklch(0.3 0.04 283) 75%, #7356EC);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: spin-border 6s linear infinite;
}
@keyframes spin-border { to { --spin: 360deg; } }
.tile-featured .tile-core {
  position: relative;
  border-radius: inherit;
  background: var(--surface);
  padding: 1.7rem 1.8rem;
  height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.span-2x2 { grid-column: span 3; grid-row: span 2; }
.span-3w  { grid-column: span 3; }
.span-2w  { grid-column: span 2; }
.span-4w  { grid-column: span 4; }
.span-6w  { grid-column: span 6; }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-2x2, .span-3w, .span-2w, .span-4w, .span-6w { grid-column: span 2; }
}

/* Tilt + magnetic */
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .tilt {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.25s ease-out;
    will-change: transform;
  }
  .magnetic { transform: translate(var(--mx, 0px), var(--my, 0px)); transition: transform 0.2s ease-out; }
}

/* Split feature */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.checklist { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: grid; gap: 0.8rem; }
.checklist li { display: flex; gap: 0.8rem; align-items: baseline; color: var(--ink-soft); }
.checklist li::before { content: "◆"; color: var(--accent); font-family: var(--font-mono); font-size: 0.7rem; flex: none; }

/* Mock windows */
.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.5);
}
.mock-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
}
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); font-style: normal; }
.mock-bar i:first-child { background: oklch(0.65 0.18 25); }
.mock-bar i:nth-child(2) { background: oklch(0.8 0.15 90); }
.mock-bar i:nth-child(3) { background: oklch(0.75 0.17 150); }
.mock-body {
  padding: 1.2rem 1.4rem;
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.9;
  color: var(--ink-soft);
  overflow-x: auto;
}
.mock-body .c { color: var(--muted); }
.mock-body .k { color: var(--accent); }
.mock-body .g { color: oklch(0.8 0.16 150); }
.mock-body .y { color: oklch(0.85 0.13 90); }

/* Dashboard mock */
.dash { display: grid; gap: 1px; background: var(--line-soft); }
.dash-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.2rem; background: var(--surface);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
}
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); }
.dash-kpi { background: var(--surface); padding: 1rem 1.2rem; }
.dash-kpi b { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.dash-kpi span { font-size: 0.72rem; font-family: var(--font-mono); color: var(--muted); }
.dash-kpi em { font-style: normal; font-size: 0.72rem; font-family: var(--font-mono); color: oklch(0.8 0.16 150); }
.dash-rows { background: var(--surface); padding: 0.6rem 1.2rem 1rem; font-family: var(--font-mono); font-size: 0.75rem; }
.dash-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px dashed var(--line-soft);
  color: var(--ink-soft);
}
.dash-row:last-child { border-bottom: 0; }
.dash-row .ok { color: oklch(0.8 0.16 150); }
.dash-row .low { color: oklch(0.85 0.13 90); }
.dash-row .crit { color: oklch(0.7 0.19 25); }
.dash-bar { height: 5px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin-top: 4px; }
.dash-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

/* Active grid */
.active-grid { display: flex; flex-direction: column; }
.active-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2.4rem 1.4rem;
  border-top: 1px solid var(--line-soft);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: padding 0.4s var(--ease-out);
}
.active-row:last-child { border-bottom: 1px solid var(--line-soft); }
.active-row h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  transition: transform 0.4s var(--ease-out), color 0.3s;
}
.active-row .row-sub { color: var(--muted); font-size: var(--text-sm); margin: 0.4rem 0 0; max-width: 60ch; }
.active-row .row-metric {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: var(--text-sm);
  white-space: nowrap;
  text-align: right;
}
.active-row .row-img { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.45s var(--ease-out); }
.active-row .row-img img { width: 100%; height: 100%; object-fit: cover; }
.active-row .row-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right, oklch(0.115 0.018 285 / 0.95) 30%, oklch(0.115 0.018 285 / 0.5));
}
@media (hover: hover) {
  .active-row:hover { padding-left: 2.4rem; }
  .active-row:hover .row-img { opacity: 1; }
  .active-row:hover h3 { color: var(--accent); transform: translateX(6px); }
}

/* Numbers */
.numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line-soft);
  gap: 1px;
}
.numbers > div { background: var(--bg-deep); padding: 2rem 1.6rem; }
.numbers b {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--accent);
  display: block; line-height: 1; margin-bottom: 0.5rem;
}
.numbers span { color: var(--muted); font-size: var(--text-sm); }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 0; margin-top: 3rem; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px dashed var(--line);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent-strong);
  font-weight: 800;
}
.step h3 { font-size: var(--text-lg); margin-bottom: 0.4rem; }
.step p { margin: 0; color: var(--muted); }

/* Case study */
.case {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  padding-block: 3.5rem;
  border-top: 1px solid var(--line-soft);
  align-items: center;
}
.case img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 11;
  object-fit: cover;
  width: 100%;
}
.case-results { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 1.6rem; font-family: var(--font-mono); font-size: var(--text-sm); }
.case-results b { color: var(--accent); display: block; font-size: 1.35rem; font-family: var(--font-display); font-weight: 700; }
.case-results span { color: var(--muted); font-size: 0.78rem; }

/* Quote */
.quote {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(2rem, 4vw, 3.4rem);
}
.quote blockquote { margin: 0 0 1.4rem; font-size: var(--text-lg); line-height: 1.5; color: var(--ink); max-width: 46ch; }
.quote cite { font-style: normal; color: var(--muted); font-size: var(--text-sm); }
.quote cite b { color: var(--ink-soft); display: block; }

/* CTA */
.cta {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  background: var(--grad);
  color: var(--on-brand);
  padding: clamp(3rem, 6vw, 5.5rem);
  text-align: center;
  isolation: isolate;
}
.cta::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(42rem 20rem at 12% 0%, oklch(1 0 0 / 0.22), transparent 55%),
    radial-gradient(42rem 24rem at 92% 115%, oklch(0.2 0.1 285 / 0.5), transparent 60%);
}
.cta h2 { max-width: 24ch; margin-inline: auto; }
.cta p { margin: 1rem auto 2.2rem; max-width: 48ch; color: oklch(0.94 0.02 280); font-weight: 600; }
.cta .btn-dark { background: oklch(0.13 0.02 285); color: var(--ink); }
.cta .btn-dark:hover { box-shadow: 0 12px 30px oklch(0 0 0 / 0.4); }

/* Page hero (inner) */
.page-hero { padding-block: 12rem 4rem; position: relative; overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(70rem 36rem at 80% -20%, oklch(0.33 0.13 280 / 0.45), transparent 65%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(2.3rem, 1.2rem + 4.6vw, 4.6rem);
  letter-spacing: -0.03em;
  max-width: 17ch;
}
.page-hero .lead { max-width: 56ch; }
.crumb { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); margin-bottom: 1.2rem; display: block; }

/* Detail blocks */
.detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5.5rem);
}
.detail + .detail { border-top: 1px solid var(--line-soft); }
.detail img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.mono-index { font-family: var(--font-mono); color: var(--accent); font-size: var(--text-sm); display: block; margin-bottom: 0.9rem; }

/* Product rows */
.product-hero-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.feature-cols { columns: 2; column-gap: 3rem; margin-top: 1.4rem; list-style: none; padding: 0; }
.feature-cols li { break-inside: avoid; margin-bottom: 0.7rem; color: var(--ink-soft); }
.feature-cols li::before { content: "+ "; color: var(--accent); font-family: var(--font-mono); }

/* Forms */
.form-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
label { font-size: var(--text-sm); font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 0.45rem; }
input, textarea, select {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font: inherit;
  transition: border-color 0.2s;
}
input::placeholder, textarea::placeholder { color: oklch(0.6 0.02 280); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.6 0.2 275 / 0.2); }
textarea { min-height: 9rem; resize: vertical; }

.contact-aside { display: grid; gap: 1.4rem; align-content: start; }
.contact-line { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.3rem 1.5rem; background: var(--surface); }
.contact-line b { display: block; font-size: var(--text-sm); color: var(--muted); font-weight: 600; margin-bottom: 0.3rem; }
.contact-line a { color: var(--accent); text-decoration: none; font-family: var(--font-mono); font-size: var(--text-sm); }
.contact-line span { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-soft); }

/* FAQ */
details.faq { border-top: 1px solid var(--line-soft); padding: 1.2rem 0.2rem; }
details.faq:last-of-type { border-bottom: 1px solid var(--line-soft); }
details.faq summary {
  cursor: pointer; font-weight: 700; font-size: var(--text-base);
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-mono); font-size: 1.2rem; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin: 0.9rem 0 0; }

/* Footer */
footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-deep);
  padding: 4rem 0 2.5rem;
  margin-top: var(--space-section);
  position: relative;
  z-index: 3;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-grid h4 { font-family: var(--font-body); font-size: var(--text-sm); color: var(--ink-soft); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: var(--text-sm); }
.footer-grid a:hover { color: var(--accent); }
.footer-blurb { color: var(--muted); font-size: var(--text-sm); max-width: 34ch; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted);
}

/* Reveal */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0.001; transform: translateY(24px); }
  html.js .reveal.in {
    opacity: 1; transform: none;
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }
  html.js .reveal.in[data-delay="1"] { transition-delay: 0.08s; }
  html.js .reveal.in[data-delay="2"] { transition-delay: 0.16s; }
  html.js .reveal.in[data-delay="3"] { transition-delay: 0.24s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .band-track, .orb, body::after, .tile-featured::before { animation: none; }
  .scrub-line { transform: none !important; }
  .progress { display: none; }
  * { scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.4rem 1.4rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line-soft); }
  .nav-links a { display: block; padding: 1rem 0.2rem; font-size: 1rem; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-cta-desktop { display: none; }

  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .step { grid-template-columns: 3rem 1fr; gap: 1.2rem; }
  .feature-cols { columns: 1; }
  .active-row { grid-template-columns: 1fr; gap: 0.8rem; }
  .active-row .row-metric { text-align: left; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: 1fr; }
  .hero { padding-top: 8rem; }
}

/* ============================================================
   ANIMATION LAYER 2 — spotlight · typewriter · parallax · sweep
   ============================================================ */

/* Cursor spotlight on tiles/cards (JS sets --sx/--sy) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .spot { position: relative; }
  .spot::after {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s var(--ease-out);
    background: radial-gradient(16rem 16rem at var(--sx, 50%) var(--sy, 50%), oklch(0.7 0.16 275 / 0.14), transparent 65%);
    z-index: 1;
  }
  .spot:hover::after { opacity: 1; }
}

/* Typewriter */
.typer { color: var(--accent); }
.typer-caret {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent);
  vertical-align: -0.15em;
  margin-left: 2px;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Heading underline sweep on reveal */
.sweep { position: relative; display: inline-block; padding-bottom: 0.18em; }
.sweep::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  height: 3px; width: 100%;
  border-radius: 99px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal.in .sweep::after,
  html.js .sweep.in::after { transition: transform 0.9s var(--ease-out) 0.25s; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) { .sweep::after { transform: scaleX(1); } }

/* Parallax images (JS drives --py) */
@media (prefers-reduced-motion: no-preference) {
  [data-parallax] { transform: translateY(var(--py, 0px)); will-change: transform; }
}

/* CTA — slow animated gradient */
@media (prefers-reduced-motion: no-preference) {
  .cta { background: linear-gradient(115deg, #7356EC, #5A61ED 30%, #2E8BF5 55%, #5A61ED 80%, #7356EC); background-size: 240% 240%; animation: cta-shift 9s ease-in-out infinite alternate; }
  @keyframes cta-shift { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
}

/* Wireframe cube (3D estimation nod) */
.cube-wrap { perspective: 900px; width: 74px; height: 74px; }
.cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: cube-spin 14s linear infinite; }
.cube i {
  position: absolute; inset: 0;
  border: 1.5px solid oklch(0.62 0.17 275 / 0.8);
  background: oklch(0.6 0.2 275 / 0.06);
  border-radius: 4px;
}
.cube i:nth-child(1) { transform: rotateY(0deg)   translateZ(37px); }
.cube i:nth-child(2) { transform: rotateY(90deg)  translateZ(37px); }
.cube i:nth-child(3) { transform: rotateY(180deg) translateZ(37px); }
.cube i:nth-child(4) { transform: rotateY(270deg) translateZ(37px); }
.cube i:nth-child(5) { transform: rotateX(90deg)  translateZ(37px); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(37px); }
@keyframes cube-spin { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .cube { animation: none; transform: rotateX(-18deg) rotateY(30deg); } }

/* ============================================================
   LAYER 3 — logo intro · aurora · glow pulse
   ============================================================ */

/* Logo intro overlay */
.intro {
  position: fixed; inset: 0;
  z-index: 200;
  display: grid; place-items: center;
  background: var(--bg);
}
.intro::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(50rem 30rem at 30% 70%, oklch(0.4 0.16 290 / 0.35), transparent 60%),
    radial-gradient(46rem 28rem at 72% 30%, oklch(0.45 0.15 255 / 0.3), transparent 60%);
  animation: intro-glow 2.4s ease-in-out infinite alternate;
}
@keyframes intro-glow { from { opacity: 0.5; } to { opacity: 1; } }
.intro img {
  width: clamp(220px, 42vw, 480px);
  position: relative;
  transform-origin: 0 0;
  opacity: 0;
  animation: intro-in 0.9s var(--ease-out) 0.15s forwards;
}
@keyframes intro-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.intro.docking img {
  animation: none;
  opacity: 1;
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.25, 1);
}
.intro.done { transition: opacity 0.5s ease 0.15s, visibility 0s 0.7s; opacity: 0; visibility: hidden; }
.intro.done::before { animation: none; }
html.intro-lock { overflow: hidden; }
html.intro-wait .nav .logo img { opacity: 0; }
.nav .logo img { transition: opacity 0.2s; }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* Aurora light bands (hero + inner page heroes) */
.hero::after, .page-hero::after {
  content: "";
  position: absolute; inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  filter: blur(70px) saturate(1.2);
  opacity: 0.5;
  background:
    radial-gradient(38rem 16rem at 18% 32%, oklch(0.5 0.19 292 / 0.5), transparent 65%),
    radial-gradient(44rem 18rem at 78% 22%, oklch(0.52 0.17 255 / 0.45), transparent 65%),
    radial-gradient(30rem 14rem at 55% 75%, oklch(0.55 0.16 330 / 0.28), transparent 65%);
  background-repeat: no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .hero::after, .page-hero::after { animation: aurora 16s ease-in-out infinite alternate; }
  @keyframes aurora {
    0%   { transform: translate(0, 0) scale(1); filter: blur(70px) saturate(1.2) hue-rotate(0deg); }
    50%  { transform: translate(3%, 4%) scale(1.08); }
    100% { transform: translate(-3%, -3%) scale(1.04); filter: blur(80px) saturate(1.35) hue-rotate(-18deg); }
  }
}

/* Breathing glow on primary buttons */
@media (prefers-reduced-motion: no-preference) {
  .btn-primary { animation: btn-breathe 3.6s ease-in-out infinite; }
  @keyframes btn-breathe {
    0%, 100% { box-shadow: 0 0 0 oklch(0.6 0.2 275 / 0); }
    50% { box-shadow: 0 6px 30px oklch(0.6 0.2 275 / 0.35); }
  }
  .btn-primary:hover { animation: none; box-shadow: 0 10px 40px var(--glow); }
}

/* Form status states */
.form-status { margin-top: 1rem; font-size: var(--text-sm); display: none; }
.form-status.show { display: block; }
.form-status.ok { color: oklch(0.8 0.16 150); }
.form-status.err { color: oklch(0.75 0.17 25); }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ============================================================
   LAYER 4 — growing timeline · smart nav · wipes · to-top
   ============================================================ */

/* Nav: condenses + deepens after scroll */
.nav { transition: background 0.3s, box-shadow 0.3s; }
.nav.scrolled {
  background: oklch(0.1 0.016 285 / 0.92);
  box-shadow: 0 10px 40px oklch(0 0 0 / 0.35);
}
.nav.scrolled .nav-inner { height: 62px; }
.nav-inner { transition: height 0.3s var(--ease-out); }
.nav.scrolled .logo img { height: 28px; }
.nav .logo img { transition: height 0.3s var(--ease-out), opacity 0.2s; }

/* Nav link underline grow */
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  height: 2px; width: 100%;
  border-radius: 99px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }

/* Growing timeline on .steps — the line draws itself as you scroll */
.steps { position: relative; padding-left: 0; }
.steps::before {
  content: "";
  position: absolute; left: 1.05rem; top: 0; bottom: 0;
  width: 2px;
  background: var(--line-soft);
}
.steps::after {
  content: "";
  position: absolute; left: 1.05rem; top: 0;
  width: 2px;
  height: var(--grow, 0%);
  background: var(--grad);
  box-shadow: 0 0 14px var(--glow);
  transition: height 0.15s linear;
}
.step { position: relative; padding-left: 3rem; grid-template-columns: 4rem 1fr; }
.step::after {
  content: "";
  position: absolute; left: calc(1.05rem - 5px); top: 2.55rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--line);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.step.passed::after {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow);
}
.step::before { transition: color 0.4s; }
.step.passed::before { color: var(--accent); }
@media (max-width: 860px) { .step { padding-left: 2.6rem; grid-template-columns: 3rem 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .steps::after { height: 100%; }
  .step::after { background: var(--accent); border-color: var(--accent); }
}

/* Image wipe reveal (replaces plain fade for images) */
@media (prefers-reduced-motion: no-preference) {
  html.js img.reveal {
    opacity: 0.001;
    transform: none;
    clip-path: inset(0 100% 0 0 round var(--radius));
  }
  html.js img.reveal.in {
    opacity: 1;
    clip-path: inset(0 0 0 0 round var(--radius));
    transition: opacity 0.5s var(--ease-out), clip-path 1s var(--ease-out);
  }
}

/* Back to top */
.to-top {
  position: fixed;
  right: 1.4rem; bottom: 1.4rem;
  z-index: var(--z-nav);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: oklch(0.14 0.02 283 / 0.9);
  backdrop-filter: blur(10px);
  color: var(--accent);
  font-size: 1.15rem;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); box-shadow: 0 0 20px var(--glow); }

/* Industries band */
.industries {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  align-items: center;
}
.industries .tag { padding: 0.45rem 1.05rem; font-size: 0.8rem; }

/* Old way vs Tekra comparison */
.versus {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.4rem;
}
.versus-col {
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 2.1rem;
  background: var(--surface);
}
.versus-col.win {
  border-color: oklch(0.45 0.12 278);
  background: linear-gradient(180deg, oklch(0.17 0.03 280), var(--surface));
}
.versus-col h3 { font-size: var(--text-lg); margin-bottom: 1.2rem; }
.versus-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; }
.versus-col li { display: flex; gap: 0.75rem; align-items: baseline; color: var(--muted); }
.versus-col.win li { color: var(--ink-soft); }
.versus-col li::before { content: "✕"; color: oklch(0.6 0.14 25); font-family: var(--font-mono); font-size: 0.8rem; flex: none; }
.versus-col.win li::before { content: "✓"; color: oklch(0.8 0.16 150); }
