:root {
  --bg: #0a0812;
  --bg-soft: #120e20;
  --ink: #ece8f6;
  --ink-dim: #9d94b8;
  --violet: #8b6cff;
  --blue: #4f7dff;
  --lavender: #c9bcff;
  --pink: #f0a6c8;
  --font-display: "Clash Display", sans-serif;
  --font-body: "General Sans", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: auto;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom; /* lock horizontal drag natively, keep vertical scroll + zoom */
  /* deep base with a soft cool-to-warm vertical wash */
  background:
    radial-gradient(140% 90% at 50% -15%, #171129 0%, transparent 55%),
    radial-gradient(120% 80% at 50% 115%, #0c1230 0%, transparent 55%),
    #08060f;
}

body {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--violet); color: #fff; }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 28px;
  align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-mark {
  position: relative; width: 104px; height: 104px;
  display: grid; place-items: center;
  animation: loaderFloat 3s ease-in-out infinite;
}
.loader-mark svg {
  position: relative; z-index: 1; width: 96px; height: 96px;
  filter: drop-shadow(0 10px 30px rgba(139, 108, 255, 0.45));
}
.loader-halo {
  position: absolute; inset: -40%; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 108, 255, 0.45), rgba(79, 125, 255, 0.12) 45%, transparent 70%);
  filter: blur(14px);
  animation: loaderPulse 2.4s ease-in-out infinite;
}
@keyframes loaderFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes loaderPulse { 0%, 100% { opacity: 0.6; transform: scale(0.92); } 50% { opacity: 1; transform: scale(1.08); } }
.loader-word {
  font-family: var(--font-display); font-weight: 500; font-size: 13px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-dim);
  margin-top: -6px;
}
.loader-bar {
  width: 180px; height: 2px; background: rgba(236, 232, 246, 0.12);
  border-radius: 2px; overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  transition: width 0.3s ease;
}

/* ---------- fixed layers ---------- */
/* drifting aurora: large, soft, slow gradient light-pools that give the
   dark space depth and motion — sits behind the transparent 3D canvas */
.aurora {
  position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(28% 32% at 22% 26%, rgba(139, 108, 255, 0.24), transparent 70%),
    radial-gradient(34% 36% at 82% 16%, rgba(79, 125, 255, 0.20), transparent 72%),
    radial-gradient(40% 42% at 68% 88%, rgba(139, 108, 255, 0.16), transparent 72%),
    radial-gradient(24% 26% at 12% 82%, rgba(240, 166, 200, 0.10), transparent 72%);
  filter: blur(48px) saturate(1.15);
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -2.5%, 0) scale(1.08); }
  100% { transform: translate3d(-2.5%, 1.5%, 0) scale(1.04); }
}
#scene {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  z-index: 0; display: block;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 130% 100% at 50% 40%, transparent 52%, rgba(6, 4, 12, 0.82) 100%);
}
/* very fine, low-opacity film grain — texture without the TV-static look */
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  animation: grain 5s steps(5) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1%, 1%); }
  50% { transform: translate(1%, -1%); }
  75% { transform: translate(-1%, -1%); }
}

/* ---------- screen-crack overlay ---------- */
.crack-layer {
  position: fixed; inset: 0; z-index: 120;
  width: 100vw; height: 100vh;
  pointer-events: none;
}
body.nav-open .crack-layer { display: none; } /* never over the open menu */

/* custom cursor moved to nav.css (shared across all pages) */

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
}
.nav-brand {
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  letter-spacing: 0.02em; color: var(--ink); text-decoration: none;
}
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-size: 14px;
  letter-spacing: 0.04em; transition: color 0.25s;
}
.nav-links a:hover { color: var(--lavender); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  color: #fff; text-decoration: none;
  padding: 15px 34px; border-radius: 100px;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  box-shadow: 0 8px 40px rgba(139, 108, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
}
.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 60px rgba(139, 108, 255, 0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-small { padding: 10px 22px; font-size: 14px; }
.btn-big { padding: 19px 48px; font-size: 19px; }

/* ---------- panels ---------- */
main { position: relative; z-index: 10; }

.panel {
  min-height: 130vh;
  display: flex; align-items: center;
  padding: 0 clamp(20px, 6vw, 90px);
}
.panel-hero, .panel-cta { min-height: 100vh; }
.panel-cta { min-height: 120vh; align-items: center; }

.panel-inner { max-width: 520px; position: relative; }
.panel-inner::before {
  content: ""; position: absolute; inset: -14% -18%; z-index: -1;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(10, 8, 18, 0.85), rgba(10, 8, 18, 0.5) 55%, transparent 78%);
  pointer-events: none;
}
.panel-right { justify-content: flex-end; }
.panel-left { justify-content: flex-start; }
.panel-inner.center {
  max-width: 640px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
}

.kicker {
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--lavender); margin-bottom: 22px;
  display: flex; align-items: center; gap: 14px;
}
.kicker .index {
  font-family: var(--font-display); font-weight: 600;
  color: var(--violet);
}
.kicker::after {
  content: ""; width: 44px; height: 1px;
  background: linear-gradient(90deg, var(--violet), transparent);
}

h1, h2 {
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.04;
}
h2 { font-size: clamp(38px, 5vw, 62px); margin-bottom: 30px; }

.accent {
  background: linear-gradient(100deg, var(--violet), var(--blue) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* hero */
.panel-hero .panel-inner { max-width: 820px; }
.hero-title { font-size: clamp(48px, 7vw, 96px); margin-bottom: 30px; white-space: nowrap; }
@media (max-width: 620px) { .hero-title { white-space: normal; } }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; }
.hero-sub { color: var(--ink-dim); max-width: 440px; margin-bottom: 38px; font-size: 18px; }
.hero-cta { display: flex; align-items: center; gap: 34px; }
.scroll-hint {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-dim); display: flex; align-items: center; gap: 12px;
}
.scroll-line {
  width: 1px; height: 40px; overflow: hidden; position: relative;
  background: rgba(236, 232, 246, 0.15);
}
.scroll-line::after {
  content: ""; position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%; background: var(--lavender);
  animation: scrollLine 1.8s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes scrollLine {
  0% { top: -100%; } 60%, 100% { top: 100%; }
}

/* feature list */
.feature-list, .steps { list-style: none; display: flex; flex-direction: column; }
.feature-list li {
  padding: 22px 0; border-top: 1px solid rgba(201, 188, 255, 0.14);
  display: flex; flex-direction: column; gap: 5px;
}
.feature-list li:last-child { border-bottom: 1px solid rgba(201, 188, 255, 0.14); }
.feature-list strong {
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  letter-spacing: -0.01em;
}
.feature-list span, .steps span { color: var(--ink-dim); font-size: 15.5px; }

/* steps */
.steps { gap: 8px; }
.steps li {
  display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto;
  column-gap: 18px; padding: 20px 24px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(139, 108, 255, 0.08), rgba(79, 125, 255, 0.04));
  border: 1px solid rgba(201, 188, 255, 0.12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.steps em {
  grid-row: 1 / 3;
  font-style: normal; font-family: var(--font-display); font-weight: 700;
  font-size: 30px; align-self: center;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.steps strong { font-family: var(--font-display); font-weight: 600; font-size: 19px; }

/* cta */
.cta-title { font-size: clamp(52px, 8vw, 108px); }
.panel-cta p { color: var(--ink-dim); max-width: 420px; }
.footnote { font-size: 13px; letter-spacing: 0.1em; color: var(--ink-dim); opacity: 0.6; margin-top: 40px; }

/* ---------- wide sections (pillars) ---------- */
.panel-wide {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 16vh clamp(20px, 5vw, 80px);
}
.wide-inner { width: 100%; max-width: 1160px; margin: 0 auto; position: relative; }
.panel-wide h2 { font-size: clamp(36px, 5vw, 62px); margin-bottom: 22px; }
.wide-sub {
  color: var(--ink-dim); max-width: 620px; font-size: 18px; margin-bottom: 54px;
}
.pillars {
  display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid rgba(201, 188, 255, 0.12);
}
.pillar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.05fr) minmax(0, 1.15fr) auto;
  align-items: center; gap: 26px;
  padding: 26px 28px;
  border-radius: 20px; text-decoration: none; color: inherit;
  border: 1px solid rgba(201, 188, 255, 0.12);
  background: linear-gradient(120deg, rgba(139, 108, 255, 0.07), rgba(79, 125, 255, 0.02));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s, background 0.35s;
}
.pillar:hover {
  transform: translateX(6px); border-color: rgba(139, 108, 255, 0.4);
  background: linear-gradient(120deg, rgba(139, 108, 255, 0.14), rgba(79, 125, 255, 0.05));
}
.pillar-no {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--violet); letter-spacing: 0.08em;
}
.pillar-head h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  letter-spacing: -0.01em; margin-bottom: 5px;
}
.pillar-head p { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.pillar-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.pillar-tags li {
  font-size: 12.5px; color: var(--lavender);
  padding: 5px 11px; border-radius: 100px;
  border: 1px solid rgba(201, 188, 255, 0.16);
  background: rgba(201, 188, 255, 0.04);
}
.pillar-go {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: var(--lavender); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.pillar-go::after { content: "→"; transition: transform 0.3s; }
.pillar:hover .pillar-go::after { transform: translateX(4px); }
@media (max-width: 860px) {
  .pillar {
    grid-template-columns: 36px 1fr; grid-template-areas:
      "no head" "tags tags" "go go";
    gap: 12px 18px;
  }
  .pillar-no { grid-area: no; }
  .pillar-head { grid-area: head; }
  .pillar-tags { grid-area: tags; }
  .pillar-go { grid-area: go; }
}

/* ---------- industries marquee ---------- */
.panel-industries {
  position: relative; z-index: 10;
  min-height: 90vh;
  display: flex; flex-direction: column; justify-content: center;
  gap: 60px; padding: 12vh 0;
}
.ind-inner { padding: 0 clamp(20px, 5vw, 80px); max-width: 1160px; margin: 0 auto; width: 100%; }
.panel-industries h2 { font-size: clamp(34px, 5vw, 60px); margin-bottom: 20px; }
.ind-sub { color: var(--ink-dim); max-width: 520px; font-size: 18px; }
.marquee { display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 12vw; z-index: 2;
  pointer-events: none;
}
.marquee { position: relative; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg, #0a0812), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--bg, #0a0812), transparent); }
.marquee-row { overflow: hidden; }
.marquee-track {
  display: flex; gap: 14px; width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee-track.reverse { animation-direction: reverse; animation-duration: 52s; }
.marquee-track span {
  flex: none;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(18px, 2.4vw, 30px);
  letter-spacing: -0.01em; color: var(--lavender);
  padding: 14px 30px; border-radius: 100px;
  border: 1px solid rgba(201, 188, 255, 0.18);
  background: rgba(18, 14, 32, 0.62);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* ---------- live demo section ---------- */
.panel-demo {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 14vh clamp(20px, 5vw, 80px);
}
.demo-inner {
  width: 100%; max-width: 1120px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
/* soft dark stage so the app frame reads cleanly over the 3D scene */
.demo-inner::before {
  content: ""; position: absolute; inset: -8% -6% -6%; z-index: -1;
  background: radial-gradient(ellipse 80% 70% at 50% 45%,
    rgba(10, 8, 18, 0.9), rgba(10, 8, 18, 0.65) 60%, transparent 85%);
  pointer-events: none;
}
.panel-demo .kicker { justify-content: center; }
.panel-demo h2 { font-size: clamp(36px, 5vw, 60px); margin-bottom: 22px; }
.demo-sub {
  color: var(--ink-dim); max-width: 560px; margin: 0 auto 34px;
  font-size: 17px;
}
.demo-tabs {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 30px;
}
.demo-tab {
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  color: var(--ink-dim); cursor: pointer;
  padding: 9px 18px; border-radius: 100px;
  background: rgba(201, 188, 255, 0.05);
  border: 1px solid rgba(201, 188, 255, 0.16);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s;
}
.demo-tab:hover { color: var(--lavender); border-color: var(--violet); transform: translateY(-1px); }
.demo-tab.is-on {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  box-shadow: 0 10px 28px -12px rgba(139, 108, 255, 0.8);
}
.demo-frame {
  width: 100%; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(201, 188, 255, 0.14);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9),
    0 0 60px -20px rgba(139, 108, 255, 0.35);
  background: #0a0c15;
}
.demo-frame iframe {
  width: 100%; height: 760px; border: 0; display: block; background: #0a0c15;
}
.demo-note {
  margin-top: 22px; font-size: 14px; color: var(--ink-dim);
}
.demo-note strong { color: var(--lavender); font-weight: 600; }

/* reveal default state (GSAP animates in) */
.reveal { opacity: 0; }
.no-js .reveal, .reduced .reveal { opacity: 1; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  /* shorter panels on mobile so there's no long empty gap between sections */
  .panel { min-height: 84vh; padding: 0 24px; }
  .panel-inner { max-width: 100%; }
  /* hero: text pinned to the top, robot drops to the bottom-right (see main.js
     heroWeight bias) so both are clearly visible on a phone. shorter than the
     other panels so there is no big empty gap before "what we build" */
  .panel-hero { align-items: flex-start; padding-top: 13vh; min-height: 88vh; }
  .panel-right, .panel-left { justify-content: flex-start; align-items: flex-end; }
  .panel-right .panel-inner, .panel-left .panel-inner { padding-bottom: 10vh; }
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 22px; }
  /* dashboard is taller (content stacks) and the industry picker sits right on
     top of it: a tidy 2-row grid, clearly the dashboard's selectable controls */
  .demo-frame iframe { height: 620px; }
  .demo-sub { margin-bottom: 18px; }
  .demo-tabs {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    margin-bottom: 12px;
  }
  .demo-tab {
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 7px 4px; min-height: 40px; font-size: 11.5px; line-height: 1.12;
    border-radius: 12px;
  }
  .panel-demo { padding: 8vh 16px; }
  /* the 3D robot sits centre-screen on mobile, so make content cards
     opaque enough to stay readable over it */
  .panel-wide { padding: 8vh 20px; }
  .pillar {
    background: linear-gradient(160deg, rgba(20, 15, 36, 0.9), rgba(14, 11, 26, 0.88));
    align-items: start;
  }
  .pillar-tags li { background: rgba(20, 15, 36, 0.85); }
  .panel-industries .marquee-track span { background: rgba(18, 14, 32, 0.82); }
  .wide-sub, .ind-sub { position: relative; }
}
