/* Solenta v2 site, sixth direction: the live surface.
   The hero is a real, draggable mini-canvas rendered in DOM + SVG. No raster product shots. */

@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("fonts/syne-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --void: #0a0a0f;
  --elevated: #12121a;
  --node: rgb(22 22 34 / 0.78);
  --toolbar: rgb(14 14 22 / 0.82);
  --badge: rgb(99 102 241 / 0.14);
  --hairline: rgb(255 255 255 / 0.08);
  --hairline-strong: rgb(255 255 255 / 0.14);
  --accent-border: rgb(129 140 248 / 0.45);
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --indigo-soft: #818cf8;
  --gradient: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 100%);
  --running: #34d399;
  --idle: #64748b;
  --flow: rgb(167 139 250 / 0.85);
  --text-1: #f4f4f8;
  --text-2: #a1a1b5;
  --text-3: #6b6b80;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-display: "Syne", system-ui, sans-serif;
  --shadow-node:
    0 0 0 1px rgb(255 255 255 / 0.04),
    0 2px 4px rgb(0 0 0 / 0.24),
    0 12px 32px rgb(0 0 0 / 0.4),
    0 0 40px rgb(99 102 241 / 0.06),
    inset 0 1px 0 rgb(255 255 255 / 0.07);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-pop: linear(0, 0.42, 0.78, 1.02, 1.13, 1.06, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
figure { margin: 0; }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--indigo-soft);
  background: var(--badge);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}
::selection { background: rgb(99 102 241 / 0.4); }
section[id] { scroll-margin-top: 84px; }

/* ---------- Ambient ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(circle, rgb(255 255 255 / 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 40% at 15% 0%, rgb(99 102 241 / 0.1), transparent 70%),
    radial-gradient(45% 40% at 90% 100%, rgb(139 92 246 / 0.09), transparent 70%);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  padding: 0 28px;
  background: linear-gradient(rgb(10 10 15 / 0.55), transparent);
}
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}
.v2pill {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c7d2fe;
  background: var(--badge);
  border: 1px solid rgb(129 140 248 / 0.3);
  border-radius: 999px;
  padding: 0.2em 0.65em;
}
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--text-2);
}
.nav-links a { transition: color 140ms var(--ease-out); }
.nav-links a:hover { color: var(--text-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 13px 26px;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 300ms var(--ease-pop), box-shadow 220ms var(--ease-out),
              border-color 220ms var(--ease-out), background 220ms var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 24px rgb(99 102 241 / 0.3);
}
.btn-primary:hover { box-shadow: 0 0 38px rgb(99 102 241 / 0.5); }
.btn-ghost {
  border-color: var(--hairline-strong);
  color: var(--text-1);
  background: rgb(255 255 255 / 0.05);
}
.btn-ghost:hover { border-color: var(--accent-border); background: rgb(99 102 241 / 0.1); }
.btn-small { padding: 9px 18px; font-size: 0.92rem; }
.btn-large { padding: 16px 34px; font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: clamp(96px, 12vh, 128px) 28px 64px;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(3rem, 5.6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.04;
  animation: hero-in 700ms var(--ease-pop) both;
}
.hero-copy h1 em {
  font-style: italic;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--text-2);
  max-width: 42ch;
  animation: hero-in 700ms var(--ease-pop) 120ms both;
}
.hero-ctas {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: hero-in 700ms var(--ease-pop) 240ms both;
}
.hero-hint {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--text-3);
  animation: hero-in 700ms var(--ease-pop) 400ms both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
}
.hero-canvas {
  animation: hero-in 800ms var(--ease-pop) 300ms both;
}

/* ---------- Live canvas frame ---------- */
.live-frame {
  border-radius: 22px;
  overflow: hidden;
  background: var(--toolbar);
  border: 1px solid var(--hairline-strong);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.05),
    0 40px 100px rgb(0 0 0 / 0.55),
    0 0 100px rgb(99 102 241 / 0.1);
}
.window-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgb(10 10 16 / 0.5);
}
.window-chrome .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.14);
}
.window-title {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-3);
}
.live-canvas {
  position: relative;
  height: clamp(460px, 56vh, 580px);
  overflow: hidden;
  background:
    radial-gradient(circle, rgb(255 255 255 / 0.05) 1px, transparent 1px) 0 0 / 26px 26px,
    radial-gradient(60% 55% at 25% 15%, rgb(99 102 241 / 0.1), transparent 70%),
    radial-gradient(55% 50% at 85% 90%, rgb(139 92 246 / 0.09), transparent 70%),
    var(--void);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.live-world {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform-origin: 0 0;
}
.live-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.edge-base {
  fill: none;
  stroke: url(#live-edge-grad);
  stroke-width: 1.75;
  filter: drop-shadow(0 0 5px rgb(99 102 241 / 0.35));
}
.edge-flow {
  fill: none;
  stroke: var(--flow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 8 14;
  animation: edge-dash 1.1s linear infinite;
  filter: drop-shadow(0 0 6px rgb(139 92 246 / 0.55));
}
@keyframes edge-dash {
  to { stroke-dashoffset: -22; }
}

/* ---------- Live nodes ---------- */
.lnode {
  position: absolute;
  background: var(--node);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: var(--shadow-node);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  cursor: grab;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  animation: lnode-in 520ms var(--ease-spring) both;
}
.lnode:active { cursor: grabbing; }
.lnode:hover {
  border-color: var(--hairline-strong);
}
.lnode.is-drag {
  border-color: var(--accent-border);
  z-index: 5;
}
@keyframes lnode-in {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
}
.lnode-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--hairline);
}
.lnode-icon {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--badge);
  border: 1px solid rgb(129 140 248 / 0.2);
  color: var(--indigo-soft);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.lnode-title {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.lnode-sub {
  font-size: 0.68rem;
  color: var(--text-3);
  white-space: nowrap;
}
.lnode-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--indigo-soft);
  background: var(--badge);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.lnode-badge::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--violet);
}
.lnode-body { padding: 10px 13px 12px; }
.lnode-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  color: var(--text-2);
  margin-bottom: 9px;
}
.lnode-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--idle);
  flex-shrink: 0;
}
.lnode-dot.is-running {
  background: var(--running);
  animation: dot-pulse 1.8s var(--ease-out) infinite;
}
@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgb(52 211 153 / 0.18); }
  50% { box-shadow: 0 0 0 6px rgb(52 211 153 / 0.07); }
}
.lnode-progress {
  height: 3px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.06);
  overflow: hidden;
}
.lnode-progress > div {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: var(--gradient);
  box-shadow: 0 0 8px rgb(99 102 241 / 0.5);
  animation: progress-slide 2.6s ease-in-out infinite alternate;
}
@keyframes progress-slide {
  from { width: 18%; }
  to { width: 86%; }
}
.lnode-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-2);
  background: rgb(255 255 255 / 0.05);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 3px 8px;
}
.lnode-url {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  border-radius: 7px;
  background: rgb(0 0 0 / 0.35);
  border: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-3);
  padding: 0 9px;
  margin-bottom: 9px;
}
.lnode-url svg { flex-shrink: 0; }
.lnode-page {
  border-radius: 8px;
  background: rgb(0 0 0 / 0.25);
  border: 1px solid var(--hairline);
  padding: 10px;
}
.lnode-hero-strip {
  height: 18px;
  border-radius: 5px;
  background: var(--gradient);
  opacity: 0.55;
  margin-bottom: 8px;
}
.lnode-line {
  height: 5px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.09);
  margin-bottom: 6px;
}
.lnode-port {
  position: absolute;
  top: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--void);
  border: 2px solid var(--indigo-soft);
  translate: 0 -50%;
  pointer-events: none;
}
.lnode-port.in { left: -5px; }
.lnode-port.out { right: -5px; }

/* ---------- Sections ---------- */
.features, .film, .clis, .cta {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(64px, 9vh, 110px) 24px 0;
}
h2 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
@supports (animation-timeline: view()) {
  .reveal {
    animation: rise both;
    animation-timeline: view();
    animation-range: entry 0% entry 65%;
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- Bento + spotlight ---------- */
.features h2 { margin-bottom: 48px; }
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  container-type: inline-size;
}
.bento:has(.cell:hover) .cell:not(:hover) { opacity: 0.6; }
.cell {
  position: relative;
  background: var(--node);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  box-shadow: var(--shadow-node);
  padding: 26px;
  overflow: hidden;
  transition: opacity 220ms var(--ease-out);
}
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgb(129 140 248 / 0.6),
    transparent 70%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }
.cell > i {
  font-size: 1.5rem;
  color: var(--indigo-soft);
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--badge);
  border: 1px solid rgb(129 140 248 / 0.2);
}
.cell h3 {
  margin-top: 18px;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cell p { margin-top: 8px; color: var(--text-2); font-size: 1rem; }
.cell-panels {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 90% at 20% 0%, rgb(99 102 241 / 0.12), transparent 60%),
    var(--node);
}
.cell:last-child {
  grid-column: 1 / -1;
  background:
    radial-gradient(90% 140% at 85% 50%, rgb(139 92 246 / 0.09), transparent 55%),
    var(--node);
}
.mini-term {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.9;
  background: rgb(0 0 0 / 0.35);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.t-cmd { color: var(--text-3); }
.t-log { color: var(--text-2); }
.t-ok { color: var(--running); }
@container (max-width: 840px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-panels { grid-row: auto; grid-column: 1 / -1; }
}
@container (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
}

/* ---------- Film ---------- */
.window-frame {
  border-radius: 20px;
  overflow: hidden;
  background: var(--toolbar);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-node);
}
.window-frame video { width: 100%; }
.glow-border { position: relative; }
.glow-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 1;
  border-radius: 21px;
  padding: 1px;
  background: conic-gradient(
    from var(--angle),
    transparent 0deg,
    var(--indigo) 60deg,
    var(--violet) 120deg,
    transparent 180deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: spin-angle 6s linear infinite;
}
@keyframes spin-angle { to { --angle: 360deg; } }
.film-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.film-head p { color: var(--text-2); }

/* ---------- CLIs ---------- */
.clis { text-align: center; }
.clis-lede { margin-top: 12px; color: var(--text-2); }
.cli-row {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.cli-chip {
  font-family: var(--mono);
  font-size: 1.12rem;
  color: var(--text-1);
  background: var(--node);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 13px 28px;
  box-shadow: var(--shadow-node);
  transition: border-color 200ms var(--ease-out), transform 300ms var(--ease-pop);
}
.cli-chip:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  text-align: center;
  padding-bottom: clamp(80px, 12vh, 140px);
  isolation: isolate;
}
.cta-glow {
  position: absolute;
  inset: auto 0 -30% 0;
  height: 80%;
  z-index: -1;
  background: radial-gradient(50% 100% at 50% 100%, rgb(99 102 241 / 0.2), transparent 70%);
  filter: blur(40px);
}
.cta-mark { margin: 0 auto 22px; }
.cta p { margin-top: 14px; color: var(--text-2); }
.cta .btn { margin-top: 30px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-3);
  font-size: 0.9rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 500;
}
.footer-note { margin-left: auto; }

/* ---------- Mobile ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .hero-ctas { justify-content: center; }
  .live-canvas { height: 480px; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-note { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .edge-flow { animation: none; }
}

/* ---------- Reduced transparency ---------- */
@media (prefers-reduced-transparency: reduce) {
  .lnode, .cell, .cli-chip, .window-frame, .live-frame { background: var(--elevated); }
}
