/* ===================== tokens ===================== */
:root{
  --bg: #05060a;
  --bg-alt: #07080e;
  --surface: rgba(255,255,255,0.035);
  --surface-strong: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text: #eef0f6;
  --text-dim: #9aa0b4;
  --text-faint: #5d6278;
  --violet: #ff5c39;
  --cyan: #3ac8f0;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet));
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.16,.8,.24,1);
  --radius: 18px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2,h3{ font-family: var(--font-display); margin: 0; }
p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
ul,ol{ list-style: none; margin: 0; padding: 0; }
svg{ display: block; }
::selection{ background: var(--violet); color: #fff; }

img, canvas { max-width: 100%; }

/* film grain + cursor glow */
.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 500; opacity: .035; mix-blend-mode: overlay;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cursor-glow{
  position: fixed; top: 0; left: 0; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,92,57,.10), transparent 70%);
  transform: translate(-50%,-50%); pointer-events: none; z-index: 1; transition: opacity .3s;
  will-change: transform;
}

/* ===================== layout helpers ===================== */
.section{ position: relative; padding: 140px 6vw 60px; max-width: 1280px; margin: 0 auto; }
.section--alt{ background: linear-gradient(180deg, transparent, rgba(255,92,57,.035) 15%, rgba(255,92,57,.035) 85%, transparent); }
.section--method{ padding-bottom: 160px; }

.section__kicker{
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cyan); margin: 0 0 14px; opacity: .85;
}
.section__title{ font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; font-weight: 600; letter-spacing: -.01em; max-width: 16ch; }
.section__desc{ margin-top: 18px; max-width: 56ch; color: var(--text-dim); font-size: 17px; line-height: 1.6; }
.section__head{ margin-bottom: 56px; }

.grad-text{
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ===================== nav ===================== */
.nav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 6vw; backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5,6,10,.75), rgba(5,6,10,0));
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled{
  background: rgba(6,7,13,.72); border-bottom-color: var(--border); padding-top: 14px; padding-bottom: 14px;
}
.nav__brand{ display: flex; align-items: center; gap: 10px; }
.nav__logo{ height: 26px; width: auto; display: block; }
.nav__links{ display: flex; align-items: center; gap: 34px; font-size: 14.5px; color: var(--text-dim); }
.nav__links a{ transition: color .2s; position: relative; }
.nav__links a:not(.nav__cta):hover{ color: var(--text); }
.nav__cta{
  color: var(--text) !important; border: 1px solid var(--border-strong); padding: 9px 18px; border-radius: 100px;
  transition: border-color .2s, background .2s;
}
.nav__cta:hover{ background: var(--surface-strong); border-color: var(--violet); }
.nav__burger{ display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; z-index: 210; }
.nav__burger span{ width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }

/* ===================== hero ===================== */
.hero{
  position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  padding: 120px 6vw 60px;
}
.hero__canvas{ position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.hero__vignette{
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 30%, transparent, var(--bg) 92%),
    linear-gradient(180deg, transparent 60%, var(--bg));
}
.hero__inner{ position: relative; z-index: 2; max-width: 880px; }

.hero__eyebrow{
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 13px;
  color: var(--text-dim); border: 1px solid var(--border); padding: 7px 14px; border-radius: 100px; margin-bottom: 28px;
  background: var(--surface);
}
.dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex: none; }
.dot--live{ background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2.2s infinite; }
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70%{ box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100%{ box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

.hero__title{
  font-size: clamp(34px, 6vw, 68px); font-weight: 600; line-height: 1.08; letter-spacing: -.02em;
}
.hero__title-grad{
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub{
  margin-top: 26px; max-width: 60ch; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; color: var(--text-dim);
}
.hero__actions{ display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

.btn{
  display: inline-flex; align-items: center; gap: 9px; padding: 14px 24px; border-radius: 100px;
  font-size: 14.5px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s, border-color .2s, background .2s;
}
.btn svg{ transition: transform .25s var(--ease); }
.btn:hover svg{ transform: translateX(3px); }
.btn--primary{ background: var(--grad); color: #05060a; font-weight: 600; }
.btn--primary:hover{ transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(255,92,57,.55); }
.btn--ghost{ border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn--ghost:hover{ background: var(--surface-strong); transform: translateY(-2px); }
.btn--lg{ padding: 16px 30px; font-size: 15.5px; }

.hero__stats{
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; margin: 60px 0 0; max-width: 640px;
}
.hero__stat dt{
  font-family: var(--font-display); font-size: clamp(26px,3vw,34px); font-weight: 600;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__stat dd{ margin-top: 4px; font-size: 12.5px; color: var(--text-faint); line-height: 1.4; }

.hero__scroll{
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-faint);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.hero__scroll-dot{ animation: scrollDot 1.8s infinite; }
@keyframes scrollDot{ 0%{ opacity: 1; transform: translateY(0);} 60%{opacity:0; transform: translateY(9px);} 100%{opacity:0;} }

/* ===================== ecosystem orbit lines ===================== */
.orbit{ position: relative; height: 0; }
.orbit__lines{ position: absolute; top: -40px; left: 0; width: 100%; height: 300px; z-index: 0; opacity: .35; }
.orbit__path{ fill: none; stroke: url(#g); stroke: var(--violet); stroke-width: 1; stroke-dasharray: 4 7; }

/* ===================== cards ===================== */
.cards{ position: relative; z-index: 1; display: grid; gap: 22px; }
.cards--ecosystem{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.cards--grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.cards--grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); max-width: 900px; }

.card{
  --accent: #ff5c39;
  position: relative; padding: 28px 26px 26px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface), rgba(255,255,255,.01));
  border: 1px solid var(--border);
  transition: border-color .35s var(--ease), transform .1s linear, box-shadow .35s var(--ease);
  transform-style: preserve-3d; will-change: transform;
  overflow: hidden;
}
.card::before{
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 60%, transparent), transparent 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.card::after{
  content: ''; position: absolute; top: -40%; right: -30%; width: 60%; height: 60%; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 70%, transparent); filter: blur(60px); opacity: 0; transition: opacity .4s;
}
.card:hover{ border-color: color-mix(in srgb, var(--accent) 45%, var(--border-strong)); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--accent) 35%, transparent); }
.card:hover::before, .card:hover::after{ opacity: .5; }

.card--engine{ background: linear-gradient(160deg, rgba(20,184,166,.06), rgba(255,255,255,.01)); }

.card__top{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card__icon{
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.card__icon--logo{
  background: #f4f5f7; border-color: rgba(0,0,0,.05); padding: 7px; overflow: hidden;
}
.card__icon--logo img{ width: 100%; height: 100%; object-fit: contain; display: block; }
.card__title{ font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.card__desc{ font-size: 14.5px; line-height: 1.6; color: var(--text-dim); min-height: 84px; }
.card__tags{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.card__tags li{
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  border: 1px solid var(--border); padding: 5px 10px; border-radius: 100px;
}
.card__link{
  margin-top: 22px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500;
  color: var(--text); padding-top: 16px; border-top: 1px solid var(--border); width: 100%;
}
.card__link svg{ color: var(--accent); transition: transform .2s; }
.card__link:hover svg{ transform: translate(2px,-2px); }
.card__link--muted{ color: var(--text-faint); cursor: default; }

.badge{
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px; border: 1px solid var(--border);
}
.badge--live{ color: #34d399; border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.08); }
.badge--dev{ color: #fbbf24; border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.08); }
.badge--auto{ color: #60a5fa; border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.08); }
.badge--engine{ color: #2dd4bf; border-color: rgba(45,212,191,.3); background: rgba(45,212,191,.08); }

/* ===================== method ===================== */
.method{ display: flex; flex-direction: column; max-width: 760px; }
.method__item{
  display: flex; gap: 26px; padding: 30px 0; border-top: 1px solid var(--border);
}
.method__item:last-child{ border-bottom: 1px solid var(--border); }
.method__num{ font-family: var(--font-mono); font-size: 13px; color: var(--violet); padding-top: 3px; flex: none; width: 30px; }
.method__item h3{ font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.method__item p{ color: var(--text-dim); font-size: 15px; line-height: 1.6; max-width: 56ch; }

/* ===================== footer ===================== */
.footer{ position: relative; padding: 130px 6vw 50px; text-align: center; overflow: hidden; }
.footer__glow{
  position: absolute; top: 0; left: 50%; width: 900px; height: 500px; transform: translate(-50%,-40%);
  background: radial-gradient(circle, rgba(255,92,57,.16), transparent 65%); pointer-events: none;
}
.footer__inner{ position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.footer__title{ font-size: clamp(30px, 5vw, 52px); font-weight: 600; line-height: 1.1; margin-top: 10px; }
.footer__sub{ margin-top: 18px; color: var(--text-dim); font-size: 17px; }
.footer .btn{ margin-top: 38px; }
.footer__badge{ margin-top: 56px; height: 22px; width: auto; opacity: .8; }
.footer__bottom{
  margin-top: 90px; display: flex; align-items: center; gap: 10px; color: var(--text-faint);
  font-size: 13px; font-family: var(--font-mono);
}
.footer__sep{ opacity: .5; }

/* ===================== reveal animation ===================== */
.reveal{ opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ===================== responsive ===================== */
@media (max-width: 980px){
  .cards--ecosystem, .cards--grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero__stats{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 760px){
  .nav__links{
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); height: 100svh; flex-direction: column;
    justify-content: center; align-items: flex-start; gap: 28px; padding: 40px;
    background: rgba(8,9,16,.97); backdrop-filter: blur(20px);
    transform: translateX(100%); transition: transform .35s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav__links.is-open{ transform: translateX(0); }
  .nav__burger{ display: flex; }
  .nav__burger.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .nav__burger.is-open span:nth-child(2){ opacity: 0; }
  .nav__burger.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

  .cards--ecosystem, .cards--grid, .cards--grid-2{ grid-template-columns: 1fr; }
  .hero__stats{ grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px 16px; }
  .section{ padding: 100px 6vw 40px; }
  .cursor-glow{ display: none; }
}
