/* =========================================================
   AISHI Lab — Design tokens
   AI Blue (Artificial Intelligence) + Human Gold (Specialist
   Human Intelligence). The signature gradient *is* the thesis.
   ========================================================= */
:root {
  /* Base / ink */
  --ink-900: #06070e;
  --ink-850: #0a0c15;
  --ink-800: #0e111c;
  --ink-700: #141828;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --hairline: rgba(255, 255, 255, 0.1);
  --hairline-soft: rgba(255, 255, 255, 0.06);

  /* AI — blue */
  --ai-400: #6ba1ff;
  --ai-500: #4f8cff;
  --ai-600: #3b6fe0;
  --ai-glow: rgba(79, 140, 255, 0.45);

  /* Bridge — violet (where the two meet) */
  --bridge-500: #8b7bff;

  /* Specialist Human Intelligence — gold */
  --human-400: #f0d49a;
  --human-500: #e6c07e;
  --human-600: #d2a85f;
  --human-glow: rgba(230, 192, 126, 0.4);

  /* Text */
  --text: #eceff7;
  --text-muted: #99a2b5;
  --text-faint: #6b7488;

  /* Signature gradient */
  --grad: linear-gradient(100deg, var(--ai-500) 0%, var(--bridge-500) 48%, var(--human-500) 100%);
  --grad-soft: linear-gradient(100deg, rgba(79, 140, 255, 0.18), rgba(230, 192, 126, 0.16));

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Space scale */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: 6.5rem;

  /* Radii / motion */
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --section-max: 1140px;
}

/* ============================ Reset ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ====================== Background layers ====================== */
.bg-canvas, .bg-grid, .bg-orb { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.bg-canvas { z-index: -1; opacity: 0.9; }
@media (max-width: 760px) { .bg-canvas { opacity: 0.6; } }

.bg-grid {
  background-image:
    linear-gradient(var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 75%);
  opacity: 0.5;
}

.bg-orb {
  width: 52vw; height: 52vw; max-width: 720px; max-height: 720px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}
.bg-orb--ai    { top: -14vw; left: -10vw; background: radial-gradient(circle, var(--ai-glow), transparent 70%); }
.bg-orb--human { bottom: -16vw; right: -10vw; background: radial-gradient(circle, var(--human-glow), transparent 70%); }

/* ====================== Scroll progress ====================== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--grad);
  z-index: 100;
  box-shadow: 0 0 12px var(--ai-glow);
  transition: width 0.08s linear;
}

/* ============================ Nav ============================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 5vw, 3rem);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 7, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
  padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-mark { display: block; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.14em; }
.brand-name__sub {
  font-size: 0.62em; letter-spacing: 0.32em; color: var(--text-muted);
  margin-left: 0.35em; font-weight: 500;
}
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a { font-size: 0.92rem; color: var(--text-muted); transition: color 0.25s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 0.5rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--hairline); color: var(--text) !important;
  background: var(--surface);
}
.nav-cta:hover { border-color: var(--ai-500); box-shadow: 0 0 18px var(--ai-glow); }
@media (max-width: 760px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.55rem; border-radius: 999px;
  font-size: 0.98rem; font-weight: 500; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.btn--primary { background: var(--grad); color: #07101f; font-weight: 600; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 38px -10px var(--ai-glow); }
.btn--ghost { border-color: var(--hairline); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--human-500); color: #fff; transform: translateY(-2px); }

/* ============================ Layout ============================ */
.section {
  position: relative; z-index: 1;
  max-width: var(--section-max);
  margin: 0 auto;
  padding: var(--sp-6) clamp(1.2rem, 5vw, 2rem);
}
.section-head { max-width: 720px; margin-bottom: var(--sp-5); }
.kicker {
  display: inline-block; font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ai-400);
  margin-bottom: 1.1rem;
}
.lede { color: var(--text-muted); font-size: 1.12rem; margin-top: 1.1rem; max-width: 640px; }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ============================ Hero ============================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 7rem 1.5rem 4rem;
}
.hero-inner { max-width: 880px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.45rem 1rem; border-radius: 999px;
  border: 1px solid var(--hairline-soft); background: var(--surface);
  margin-bottom: 1.8rem;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ai-400); box-shadow: 0 0 10px var(--ai-400);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero-title {
  margin: 0;
  perspective: 1000px;
  /* float shadow lives here (not on .hero-word) so it doesn't flatten the 3D */
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.55)) drop-shadow(0 6px 50px rgba(79, 140, 255, 0.22));
}
.hero-word {
  position: relative; /* offset parent for per-letter gradient slicing */
  display: inline-block;
  font-size: clamp(4.5rem, 17vw, 12rem);
  font-weight: 700; letter-spacing: 0.02em; line-height: 0.95;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
  will-change: transform;
}
/* per-letter spans: each paints the SAME gradient, sliced by background-position
   (set in JS) so the blue->gold sweep stays continuous across the word while
   each letter can still be transformed for the magnetic lean. */
.hw-letter {
  display: inline-block;
  background-image: var(--grad);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-expand {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.4rem 0.9rem; margin: 1.4rem 0 0;
  font-size: clamp(1rem, 2.6vw, 1.5rem); font-weight: 500;
}
.hero-expand b { font-weight: 700; }
.hero-expand .ai b { color: var(--ai-400); }
.hero-expand .human b { color: var(--human-400); }
.hero-expand .ai, .hero-expand .human { color: var(--text); }
.hero-expand .plus { color: var(--bridge-500); font-weight: 700; }
.hero-sub { margin: 1.8rem auto 0; max-width: 600px; color: var(--text-muted); font-size: 1.12rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 2.4rem; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-faint); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em;
}
.scroll-hint__mouse {
  width: 22px; height: 34px; border: 1px solid var(--hairline); border-radius: 12px;
  position: relative;
}
.scroll-hint__mouse::after {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; border-radius: 2px; background: var(--ai-400);
  animation: scrollWheel 1.8s var(--ease) infinite;
}
@keyframes scrollWheel { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 10px); } }

/* ====================== Meaning / split ====================== */
.split {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 1.5rem;
}
.split-card {
  padding: 2.2rem; border-radius: var(--radius);
  border: 1px solid var(--hairline-soft); background: var(--surface);
  backdrop-filter: blur(6px);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.split-card:hover { transform: translateY(-6px); }
.split-card--ai:hover { border-color: rgba(79, 140, 255, 0.5); box-shadow: 0 20px 50px -24px var(--ai-glow); }
.split-card--human:hover { border-color: rgba(230, 192, 126, 0.5); box-shadow: 0 20px 50px -24px var(--human-glow); }
.split-tag {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.22em;
  display: inline-block; margin-bottom: 0.9rem;
}
.split-card--ai .split-tag { color: var(--ai-400); }
.split-card--human .split-tag { color: var(--human-400); }
.split-card h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.split-card > p { color: var(--text-muted); margin-bottom: 1.4rem; }
.trait-list li {
  position: relative; padding-left: 1.4rem; color: var(--text); font-size: 0.98rem;
  margin-bottom: 0.5rem;
}
.trait-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.6;
}
.split-card--ai .trait-list li::before { background: var(--ai-400); opacity: 1; }
.split-card--human .trait-list li::before { background: var(--human-400); opacity: 1; }
.split-fuse { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; min-width: 56px; }
.split-fuse__plus {
  font-size: 2rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.split-fuse__line { width: 1px; flex: 1; background: linear-gradient(var(--ai-500), var(--human-500)); opacity: 0.4; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split-fuse { flex-direction: row; min-height: 40px; }
  .split-fuse__line { width: 60%; height: 1px; flex: none; }
}

/* ====================== Philosophy ====================== */
.philosophy { text-align: center; }
.thesis { max-width: 860px; margin: 0 auto; }
.thesis-statement { font-size: clamp(2rem, 5.5vw, 3.4rem); margin: 1rem 0 1.6rem; }
.thesis-statement .grad-text { display: block; }
.thesis-body { color: var(--text-muted); font-size: 1.12rem; max-width: 680px; margin: 0 auto; }
.contrast {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  margin-top: 3.5rem; text-align: left;
}
.contrast-col { padding: 1.8rem; border-radius: var(--radius); border: 1px solid var(--hairline-soft); }
.contrast-col--old { background: rgba(255, 255, 255, 0.02); opacity: 0.78; }
.contrast-col--new { background: var(--grad-soft); border-color: rgba(79, 140, 255, 0.25); }
.contrast-label {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  display: block; margin-bottom: 0.7rem;
}
.contrast-col--old .contrast-label { color: var(--text-faint); }
.contrast-col--new .contrast-label { color: var(--human-400); }
.contrast-col p { color: var(--text-muted); }
.contrast-col--new p { color: var(--text); }
@media (max-width: 700px) { .contrast { grid-template-columns: 1fr; } }

/* ====================== Method ====================== */
.method-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3rem; }
.method-aside { position: sticky; top: 6rem; align-self: start; }
.method-steps { display: flex; flex-direction: column; gap: 1.2rem; }
.method-step {
  display: flex; gap: 1.4rem; align-items: flex-start;
  padding: 1.6rem 1.8rem; border-radius: var(--radius);
  border: 1px solid var(--hairline-soft); background: var(--surface);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.method-step:hover { transform: translateX(6px); border-color: var(--hairline); }
.method-num {
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  min-width: 2ch;
}
.method-step__body h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.method-step__body p { color: var(--text-muted); }
@media (max-width: 820px) {
  .method-grid { grid-template-columns: 1fr; gap: 2rem; }
  .method-aside { position: static; }
}

/* ====================== Cards / build ====================== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.card {
  padding: 2rem; border-radius: var(--radius);
  border: 1px solid var(--hairline-soft); background: var(--surface);
  position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px -28px var(--ai-glow); }
.card:hover::before { opacity: 0.8; }
.card-glyph {
  font-size: 1.6rem; margin-bottom: 1rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.98rem; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

/* ====================== CTA ====================== */
.cta { text-align: center; }
.cta-inner {
  max-width: 760px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: 28px; border: 1px solid var(--hairline-soft);
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(79, 140, 255, 0.12), transparent 60%),
    var(--surface);
  position: relative; overflow: hidden;
}
.cta-title { font-size: clamp(1.9rem, 5vw, 3rem); margin: 1rem 0 1rem; }
.cta-sub { color: var(--text-muted); font-size: 1.1rem; max-width: 520px; margin: 0 auto 2rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

/* ====================== Footer ====================== */
.footer { border-top: 1px solid var(--hairline-soft); padding: 3rem 1.5rem; position: relative; z-index: 1; }
.footer-inner { max-width: var(--section-max); margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; letter-spacing: 0.12em; }
.footer-tag { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.04em; }
.footer-copy { font-size: 0.85rem; color: var(--text-faint); }

/* ====================== Reveal animation ====================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .eyebrow-dot, .scroll-hint__mouse::after, .bg-canvas { animation: none !important; }
  .bg-canvas { display: none; }
}
