/* ==========================================================================
   Haelixe — design tokens
   ========================================================================== */
:root {
  /* color */
  --bg: #08090a;
  --bg-raised: #0f1112;
  --surface: #15171a;
  --surface-2: #1b1e21;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #8ed46f;
  --accent-dim: #61936f;
  --accent-deep: #3f5c3a;
  --accent-glow: #c3f0a4;
  --text-primary: #f5f5f7;
  --text-secondary: #9a9ca1;
  --text-tertiary: #6e7075;

  /* type */
  --font-display: 'Google Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display',
    'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Google Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Google Sans Code', 'SF Mono', ui-monospace, 'Roboto Mono', 'JetBrains Mono',
    Menlo, Consolas, monospace;

  /* layout */
  --nav-h: 56px;
  --max-w: 1120px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(8, 9, 10, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--border);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav__brand img {
  height: 20px;
  width: 20px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  color: var(--text-secondary);
}

.nav__links a {
  transition: color 0.2s var(--ease);
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary) !important;
  font-size: 13px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav__cta:hover {
  background: var(--surface);
  border-color: var(--accent-dim);
}

.nav__menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* ==========================================================================
   Eyebrow / labels
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px var(--accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: #0a1207;
}

.btn--primary:hover {
  background: var(--accent-glow);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--accent-dim);
  background: rgba(142, 212, 111, 0.06);
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 50px;
}

/* ==========================================================================
   Sections / type scale
   ========================================================================== */
section {
  position: relative;
}

.section-pad {
  padding: 120px 0;
}

@media (max-width: 720px) {
  .section-pad {
    padding: 80px 0;
  }
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

.display-1 {
  font-size: clamp(40px, 7.2vw, 88px);
  line-height: 1.04;
  font-weight: 500;
}

.display-2 {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.08;
}

.section-head {
  max-width: 620px;
  margin-bottom: 56px;
}

.section-head h2 {
  margin-top: 14px;
}

.section-head p {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 540px;
}

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.65;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

hr.hairline {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 40px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(60% 50% at 50% 38%, rgba(142, 212, 111, 0.16), transparent 70%);
  pointer-events: none;
}

.hero__grid-stage {
  margin: 0 auto;
  width: min(92vw, 620px);
  aspect-ratio: 16 / 7;
  position: relative;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero__content .eyebrow {
  margin-bottom: 22px;
  justify-content: center;
}

.hero h1 {
  margin-top: 20px;
}

.hero__sub {
  margin: 22px auto 0;
  max-width: 540px;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.65;
}

.hero .btn-row {
  justify-content: center;
  margin-top: 34px;
}

/* tensor grid signature visual */
.tgrid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  width: 100%;
  height: 100%;
}

.tgrid__cell {
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease), transform 0.6s var(--ease);
}

.tgrid__cell.is-active {
  background: rgba(142, 212, 111, 0.18);
  border-color: var(--accent-dim);
}

.tgrid__cell.is-lit {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px 1px rgba(142, 212, 111, 0.5);
}

/* ==========================================================================
   Marquee / tech strip
   ========================================================================== */
.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  overflow: hidden;
}

.strip__track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 26s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .strip__track {
    animation: none;
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.strip__item {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.strip__item::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-dim);
}

/* ==========================================================================
   Feature rows
   ========================================================================== */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.feature-row:first-of-type {
  border-top: none;
}

.feature-row.reverse .feature-row__visual {
  order: 2;
}

.feature-row__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-dim);
  margin-bottom: 18px;
  display: block;
}

.feature-row h3 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 16px;
}

.feature-row p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 12px;
}

.feature-row ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.feature-row li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
  color: var(--text-secondary);
}

.feature-row li:first-child {
  border-top: none;
}

.feature-row li b {
  color: var(--text-primary);
  font-weight: 500;
  min-width: 128px;
  flex-shrink: 0;
}

.feature-row__visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  aspect-ratio: 4 / 3.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 860px) {
  .feature-row,
  .feature-row.reverse .feature-row__visual {
    grid-template-columns: 1fr;
    order: initial;
    gap: 32px;
    padding: 64px 0;
  }
}

/* diagram primitives used inside feature visuals */
.diagram-svg {
  width: 100%;
  height: 100%;
}

.diagram-svg .line {
  stroke: var(--border-strong);
  stroke-width: 1.5;
  fill: none;
}

.diagram-svg .line--accent {
  stroke: var(--accent);
}

.diagram-svg .node {
  fill: var(--surface-2);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.diagram-svg .node--accent {
  fill: rgba(142, 212, 111, 0.14);
  stroke: var(--accent);
}

.diagram-svg text {
  font-family: var(--font-mono);
  fill: var(--text-tertiary);
  font-size: 9px;
}

.diagram-svg .label--accent {
  fill: var(--accent);
}

/* ==========================================================================
   Code panel
   ========================================================================== */
.code-window {
  background: #0c0d0f;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.code-window__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}

.code-window__title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

.code-window pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
}

.code-window code {
  color: #c9cbd1;
}

.tok-kw {
  color: #f5a3c7;
}
.tok-type {
  color: var(--accent);
}
.tok-fn {
  color: #8ec4ff;
}
.tok-str {
  color: #f0c987;
}
.tok-com {
  color: var(--text-tertiary);
  font-style: italic;
}
.tok-num {
  color: #d3a3f5;
}

/* ==========================================================================
   Clone CTA
   ========================================================================== */
.clone-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 8px 8px 8px 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-secondary);
}

.clone-pill button {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 100px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s;
}

.clone-pill button:hover {
  border-color: var(--accent-dim);
}

/* ==========================================================================
   Cards (about page principles etc.)
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 720px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 30px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.card__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(142, 212, 111, 0.12);
  border: 1px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 40px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
}

.footer__brand img {
  height: 22px;
}

.footer__tag {
  color: var(--text-tertiary);
  font-size: 13.5px;
  margin-top: 10px;
  max-width: 280px;
}

.footer__cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.footer__col a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s var(--ease);
}

.footer__col a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 12.5px;
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }
  .nav__menu-btn {
    display: block;
  }
}

/* ==========================================================================
   Mobile nav drawer
   ========================================================================== */
.mobile-drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: 32px 24px;
  gap: 4px;
}

.mobile-drawer.is-open {
  display: flex;
}

.mobile-drawer a {
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 17px;
}

/* ==========================================================================
   About-page-specific
   ========================================================================== */
.page-hero {
  padding: calc(var(--nav-h) + 88px) 0 60px;
  border-bottom: 1px solid var(--border);
}

.page-hero .eyebrow {
  margin-bottom: 20px;
}

.page-hero h1 {
  margin-bottom: 22px;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.split p {
  color: var(--text-secondary);
  font-size: 16.5px;
  line-height: 1.75;
  margin: 0 0 18px;
}

.split p:last-child {
  margin-bottom: 0;
}

.stack-diagram {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface);
}

.stack-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
}

.stack-row:first-child {
  border-top: none;
}

.stack-row__path {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  min-width: 150px;
  flex-shrink: 0;
}

.stack-row__desc {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
}

.stat-cell {
  background: var(--bg-raised);
  padding: 28px 22px;
}

.stat-cell b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
}

.stat-cell span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 720px) {
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
   
  .clone-pill {
      display: none;
  }
}
