/* NeuralHyve.ai — Warm Hive system */

:root {
  --bg: oklch(0.14 0.015 60);
  --bg-2: oklch(0.18 0.02 65);
  --bg-3: oklch(0.22 0.025 68);
  --ink: oklch(0.96 0.015 85);
  --ink-2: oklch(0.82 0.02 80);
  --ink-3: oklch(0.62 0.025 75);
  --line: oklch(0.28 0.03 70);
  --line-2: oklch(0.35 0.04 72);

  --amber: oklch(0.82 0.17 80);
  --amber-2: oklch(0.72 0.2 60);
  --amber-deep: oklch(0.58 0.18 50);
  --amber-glow: oklch(0.82 0.17 80 / 0.35);

  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --maxw: 1280px;
}

:root[data-theme="light"] {
  --bg: oklch(0.975 0.012 85);
  --bg-2: oklch(0.95 0.018 82);
  --bg-3: oklch(0.92 0.025 80);
  --ink: oklch(0.22 0.025 60);
  --ink-2: oklch(0.38 0.025 65);
  --ink-3: oklch(0.55 0.025 70);
  --line: oklch(0.85 0.02 80);
  --line-2: oklch(0.78 0.03 78);

  --amber: oklch(0.72 0.18 65);
  --amber-2: oklch(0.62 0.2 55);
  --amber-deep: oklch(0.48 0.18 45);
  --amber-glow: oklch(0.72 0.18 65 / 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* === Type === */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.italic { font-style: italic; }
.mono { font-family: var(--mono); font-feature-settings: "ss01", "ss02"; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
}

/* === Layout === */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

/* === Nav === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a { position: relative; padding: 6px 0; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--amber);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: all 0.3s;
}
.theme-toggle:hover { border-color: var(--amber); color: var(--amber); }
.theme-toggle svg { width: 16px; height: 16px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: oklch(0.15 0.03 55);
  box-shadow: 0 8px 30px var(--amber-glow), inset 0 1px 0 oklch(1 0 0 / 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 44px var(--amber-glow), inset 0 1px 0 oklch(1 0 0 / 0.3);
}
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink-3); background: var(--bg-2); }
.btn svg { width: 14px; height: 14px; transition: transform 0.25s; }
.btn-primary:hover svg { transform: translateX(3px); }

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}
.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 20px 0 24px;
}
.hero h1 .amber { color: var(--amber); font-style: italic; }
.hero h1 .line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero h1 .line:nth-child(1) { animation-delay: 0.1s; }
.hero h1 .line:nth-child(2) { animation-delay: 0.25s; }
.hero h1 .line:nth-child(3) { animation-delay: 0.4s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: 32px;
  opacity: 0;
  animation: rise 0.9s 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 0.9s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-eyebrow {
  opacity: 0;
  animation: rise 0.9s 0.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-meta {
  margin-top: 48px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 0.9s 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-meta .stat .num {
  font-family: var(--serif);
  font-size: 34px;
  color: var(--ink);
  line-height: 1;
}
.hero-meta .stat .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
}

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
}

/* === Sections === */
section { position: relative; }
.section { padding: 120px 0; position: relative; }
.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 16px 0 20px;
}
.section-head h2 .amber { color: var(--amber); font-style: italic; }
.section-head p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 560px;
}

/* === Features (hive cells) === */
.hive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .hive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hive-grid { grid-template-columns: 1fr; } }

.cell {
  position: relative;
  padding: 32px 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, background 0.3s;
}
.cell::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.cell:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--bg-3);
}
.cell:hover::before { opacity: 1; }

.cell-hex {
  width: 44px; height: 44px;
  margin-bottom: 22px;
  color: var(--amber);
}
.cell-title {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.cell-body {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.cell-tag {
  position: absolute;
  top: 22px; right: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Big feature */
.cell-big {
  grid-column: span 2;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (max-width: 900px) { .cell-big { grid-column: span 2; } }
@media (max-width: 560px) { .cell-big { grid-column: span 1; } }
.cell-big .cell-title { font-size: 32px; }

/* === How it works === */
.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 900px) { .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } }

.flow-step {
  position: relative;
  padding: 32px 24px 32px 0;
  border-right: 1px dashed var(--line);
}
.flow-step:last-child { border-right: none; }
@media (max-width: 900px) {
  .flow-step:nth-child(2) { border-right: none; }
  .flow-step:nth-child(1), .flow-step:nth-child(2) { border-bottom: 1px dashed var(--line); padding-bottom: 28px; }
  .flow-step:nth-child(3), .flow-step:nth-child(4) { padding-top: 28px; }
}
@media (max-width: 560px) {
  .flow-step { border-right: none; border-bottom: 1px dashed var(--line); padding: 24px 0; }
  .flow-step:last-child { border-bottom: none; }
}
.flow-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}
.flow-title {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 12px;
}
.flow-body {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 280px;
}
.flow-icon {
  width: 36px; height: 36px;
  margin-bottom: 18px;
  color: var(--amber);
}

/* === Use cases === */
.usecases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .usecases { grid-template-columns: 1fr; } }
.uc {
  position: relative;
  padding: 36px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.uc:hover { transform: translateY(-3px); }
.uc::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), var(--amber-glow), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.uc:hover::after { opacity: 1; }
.uc-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}
.uc-title {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.05;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.uc-body {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.uc-bullets {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.uc-bullets li {
  font-size: 13.5px;
  color: var(--ink-2);
  padding-left: 18px;
  position: relative;
}
.uc-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 8px;
  background: var(--amber);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* === Testimonials === */
.logos {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  margin-bottom: 80px;
}
.logos .logo-item {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-2);
  letter-spacing: -0.01em;
  opacity: 0.8;
  transition: opacity 0.3s;
}
.logos .logo-item:hover { opacity: 1; }

.testimonial-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .testimonial-row { grid-template-columns: 1fr; } }
.quote {
  padding: 32px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.quote-mark {
  font-family: var(--serif);
  font-size: 56px;
  color: var(--amber);
  line-height: 0.5;
  height: 22px;
}
.quote-text {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink);
  flex: 1;
}
.quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.quote-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  color: oklch(0.15 0.03 55);
  font-weight: 500;
}
.quote-name { font-size: 14px; color: var(--ink); }
.quote-role { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }

/* === FAQ === */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  cursor: pointer;
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.01em;
}
.faq-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  color: var(--amber);
  flex-shrink: 0;
  transition: transform 0.35s, border-color 0.3s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: var(--amber); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), margin 0.4s, opacity 0.4s;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
  opacity: 0;
  max-width: 640px;
}
.faq-item.open .faq-a {
  max-height: 240px;
  margin-top: 14px;
  opacity: 1;
}

/* === CTA === */
.cta-block {
  position: relative;
  padding: 100px 60px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  text-align: center;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--amber-glow), transparent 60%);
  pointer-events: none;
}
.cta-block > * { position: relative; z-index: 1; }
.cta-block h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 20px 0 24px;
}
.cta-block h2 .amber { color: var(--amber); font-style: italic; }
.cta-block p {
  color: var(--ink-2);
  font-size: 18px;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.5;
}
.cta-hexfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* === Footer === */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 20px;
  font-weight: 400;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--ink-2); font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--amber); }
.footer-tag {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
  max-width: 320px;
  margin: 18px 0 0;
  color: var(--ink-2);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-wrap: wrap;
  gap: 16px;
}

/* === Reveal on scroll === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger kids */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.14s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.23s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.32s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.48s; }

/* === Tweaks panel === */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 18px;
  width: 260px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  display: none;
}
.tweaks.active { display: block; }
.tweaks h5 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.tweaks-row:first-of-type { border-top: none; }
.tweaks-row label { color: var(--ink-2); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.tweaks-row .swatches { display: flex; gap: 6px; }
.tweaks-row .swatch { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s; }
.tweaks-row .swatch.on { border-color: var(--ink); }
.tweaks-row .swatch:hover { transform: scale(1.1); }
.tweaks-row .seg { display: flex; background: var(--bg-3); border-radius: 999px; padding: 2px; }
.tweaks-row .seg button { padding: 5px 10px; border-radius: 999px; font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.2s; }
.tweaks-row .seg button.on { background: var(--amber); color: oklch(0.15 0.03 55); }

/* === Hex background (global) === */
.bg-hexfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
