/* ==========================================================================
   NeuraLearn AI — Spacious Multi-Page Design System & Page Transitions
   Generous breathing room, crisp hierarchy, GPU-accelerated transitions
   ========================================================================== */

@view-transition {
  navigation: auto;
}

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

:root {
  --bg: #06080f;
  --bg-elev: #0c101c;
  --surface-1: rgba(16, 20, 34, 0.72);
  --surface-2: rgba(22, 27, 45, 0.86);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f6ff;
  --text-soft: #bcc6de;
  --muted: #8490ad;

  --cyan: #38e8ff;
  --violet: #8b5cf6;
  --violet-soft: #c4b5fd;
  --gold: #ffd84d;
  --emerald: #34d399;
  --rose: #fb7185;

  --grad-brand: linear-gradient(135deg, #38e8ff 0%, #8b5cf6 52%, #ffd84d 100%);
  --grad-accent: linear-gradient(135deg, #38e8ff 0%, #7c5cff 100%);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1.28, 0.36, 1);

  --container: 1280px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  color-scheme: dark;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Subtle procedural grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.aurora {
  position: fixed;
  inset: -18% -10% auto -10%;
  height: 76vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(45% 55% at 18% 18%, rgba(56, 232, 255, 0.12), transparent 68%),
    radial-gradient(42% 52% at 82% 14%, rgba(139, 92, 246, 0.16), transparent 66%),
    radial-gradient(36% 42% at 50% 45%, rgba(255, 216, 77, 0.05), transparent 70%);
  filter: blur(28px);
  animation: auroraDrift 20s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  0% { transform: translate3d(-1.5%, 0%, 0) scale(1); }
  100% { transform: translate3d(1.5%, 2.5%, 0) scale(1.06); }
}

#neuralBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.62;
}

/* ==========================================================================
   Cinematic Page Transition Curtain + Entrance Choreography
   ========================================================================== */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: radial-gradient(circle at 50% 35%, rgba(18, 25, 48, 0.96), rgba(6, 8, 15, 0.99));
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.28s var(--ease-expo), transform 0.34s var(--ease-expo);
}

.page-curtain::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-brand);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.32s var(--ease-expo);
}

.page-curtain.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.page-curtain.active::after {
  transform: scaleX(1);
}

.page-curtain__pulse {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--grad-brand);
  box-shadow: 0 0 42px rgba(56, 232, 255, 0.65);
  animation: orbPulse 1.2s var(--ease-expo) infinite;
}

.page-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  animation: pageEnter 0.72s var(--ease-expo) both;
}

body.page-leaving .page-stage {
  opacity: 0;
  transform: translateY(-14px) scale(0.99);
  filter: blur(6px);
  transition: opacity 0.24s ease, transform 0.24s ease, filter 0.24s ease;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.992);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

/* Top Scroll Progress Rail */
.scroll-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.04);
}

.scroll-rail__fill {
  height: 100%;
  width: 100%;
  background: var(--grad-brand);
  transform-origin: 0 50%;
  transform: scaleX(0);
  box-shadow: 0 0 16px rgba(56, 232, 255, 0.65);
}

/* ==========================================================================
   Spacious Top Navigation Bar + Mobile Drawer
   ========================================================================== */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 18px 28px 12px;
  background: linear-gradient(180deg, rgba(6, 8, 15, 0.92) 45%, rgba(6, 8, 15, 0));
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px 12px 22px;
  border-radius: 999px;
  background: rgba(12, 16, 28, 0.78);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: 0 20px 56px -18px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s, background 0.3s;
}

.nav.scrolled {
  background: rgba(10, 13, 24, 0.92);
  border-color: var(--line-strong);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  font-size: 17px;
  letter-spacing: -0.025em;
  flex: none;
}

.brand__orb {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  box-shadow: 0 0 22px -2px rgba(56, 232, 255, 0.55);
}

.brand__orb::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--bg);
  transform: rotate(45deg);
  animation: orbPulse 5s var(--ease-expo) infinite;
}

@keyframes orbPulse {
  0%, 100% { transform: rotate(45deg) scale(1); border-radius: 3px; }
  50% { transform: rotate(135deg) scale(0.75); border-radius: 50%; }
}

.brand__sub {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(56, 232, 255, 0.1);
  border: 1px solid rgba(56, 232, 255, 0.25);
  color: var(--cyan);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__links a {
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s, background 0.25s, border-color 0.25s;
  border: 1px solid transparent;
}

.nav__links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.nav__links a.active {
  color: var(--cyan);
  background: rgba(56, 232, 255, 0.11);
  border-color: rgba(56, 232, 255, 0.3);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.status-pill.ok {
  border-color: rgba(52, 211, 153, 0.35);
  color: #8cf3c7;
  background: rgba(52, 211, 153, 0.08);
}

.status-pill.ok .status-pill__dot {
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  animation: livePulse 2s infinite;
}

.status-pill.err {
  border-color: rgba(251, 113, 133, 0.35);
  color: #fda4af;
  background: rgba(251, 113, 133, 0.08);
}

.status-pill.err .status-pill__dot {
  background: var(--rose);
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text);
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  max-width: var(--container);
  margin: 10px auto 0;
  padding: 14px;
  border-radius: 20px;
  background: rgba(12, 16, 28, 0.96);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(22px);
  flex-direction: column;
  gap: 8px;
}

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

.mobile-drawer a {
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-soft);
  font-weight: 500;
}

.mobile-drawer a.active {
  background: rgba(56, 232, 255, 0.12);
  color: var(--cyan);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease-expo), box-shadow 0.35s, border-color 0.25s, background 0.25s;
}

.btn--primary {
  background: var(--grad-accent);
  color: #05070e;
  box-shadow: 0 12px 34px -10px rgba(56, 232, 255, 0.55);
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.45) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease-expo);
}

.btn--primary:hover::before {
  transform: translateX(120%);
}

.btn--primary:hover {
  box-shadow: 0 18px 46px -10px rgba(56, 232, 255, 0.72);
}

.btn--gold {
  background: var(--gold);
  color: #161306;
  box-shadow: 0 10px 32px -10px rgba(255, 216, 77, 0.5);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line-strong);
  backdrop-filter: blur(12px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(56, 232, 255, 0.45);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 13.5px;
}

/* ==========================================================================
   Spacious Containers, Page Headers & Sections
   ========================================================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.hero {
  padding: 88px 32px 76px;
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(16, 20, 34, 0.75);
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  font-size: 12.5px;
  margin-bottom: 32px;
}

.hero__eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.hero h1 {
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 15ch;
  margin: 0 auto 28px;
}

.gradient-text {
  background: linear-gradient(110deg, #ffffff 10%, #38e8ff 46%, #a78bfa 74%, #ffd84d 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: textShimmer 8s linear infinite;
}

@keyframes textShimmer {
  to { background-position: 200% center; }
}

.hero__lead {
  max-width: 62ch;
  margin: 0 auto 40px;
  color: var(--text-soft);
  font-size: clamp(17.5px, 2vw, 20px);
}

.hero__cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Dedicated Inner Page Header */
.page-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 32px 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin-top: 8px;
}

.page-hero p {
  color: var(--text-soft);
  max-width: 64ch;
  margin-top: 14px;
  font-size: 17.5px;
}

section.band {
  padding: 92px 32px 0;
  max-width: var(--container);
  margin: 0 auto;
}

.page-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px 84px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--cyan);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1.5px;
  background: var(--cyan);
}

.band h2 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.036em;
  font-weight: 750;
  max-width: 20ch;
}

.band__lead {
  color: var(--text-soft);
  max-width: 62ch;
  margin-top: 16px;
  font-size: 17.5px;
}

/* Kinetic Reveals */
.rv {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease-expo) var(--d, 0ms), transform 0.8s var(--ease-expo) var(--d, 0ms), filter 0.8s var(--ease-expo) var(--d, 0ms);
}

.rv.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ==========================================================================
   Generous Grids & 3D Specular Cards
   ========================================================================== */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 44px;
}

.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--surface-1);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.45s var(--ease-expo), box-shadow 0.45s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(56, 232, 255, 0.13), transparent 62%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(56, 232, 255, 0.35);
  box-shadow: 0 28px 64px -26px rgba(0, 0, 0, 0.82);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(56, 232, 255, 0.1);
  border: 1px solid rgba(56, 232, 255, 0.28);
  color: var(--cyan);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 22px;
}

.card__icon--violet {
  background: rgba(139, 92, 246, 0.13);
  border-color: rgba(139, 92, 246, 0.35);
  color: var(--violet-soft);
}

.card__icon--gold {
  background: rgba(255, 216, 77, 0.1);
  border-color: rgba(255, 216, 77, 0.32);
  color: var(--gold);
}

.card__icon--emerald {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.32);
  color: var(--emerald);
}

.card h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.25;
}

.card p {
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.65;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
}

/* ==========================================================================
   Spacious Dedicated AI Studio (/studio.html)
   ========================================================================== */
.studio-shell {
  position: relative;
  padding: 1.5px;
  border-radius: calc(var(--radius-xl) + 1.5px);
  background: conic-gradient(
    from var(--beam-angle),
    rgba(56, 232, 255, 0.14) 0deg,
    rgba(56, 232, 255, 0.8) 55deg,
    rgba(139, 92, 246, 0.85) 125deg,
    rgba(255, 216, 77, 0.65) 185deg,
    rgba(255, 255, 255, 0.08) 250deg,
    rgba(56, 232, 255, 0.14) 360deg
  );
  animation: spinBeam 10s linear infinite;
  box-shadow: 0 44px 120px -36px rgba(56, 232, 255, 0.2);
}

.studio-shell.processing {
  animation-duration: 2.2s;
}

@keyframes spinBeam {
  to { --beam-angle: 360deg; }
}

.studio {
  background: linear-gradient(180deg, rgba(13, 17, 29, 0.97) 0%, rgba(9, 11, 20, 0.99) 100%);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.studio__composer {
  padding: 32px 36px 26px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(820px circle at 50% -25%, rgba(56, 232, 255, 0.08), transparent 65%);
}

.ask-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(6, 8, 15, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 10px 10px 10px 22px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.ask-row:focus-within {
  border-color: rgba(56, 232, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(56, 232, 255, 0.12);
}

.ask-row__icon {
  color: var(--cyan);
  font-size: 17px;
  flex: none;
}

.ask-row input {
  flex: 1;
  min-width: 220px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16.5px;
  color: var(--text);
  padding: 10px 6px;
}

.ask-row input::placeholder {
  color: var(--muted);
}

.depth-seg {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 4px;
  flex: none;
}

.depth-seg__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: 9px;
  background: rgba(56, 232, 255, 0.16);
  border: 1px solid rgba(56, 232, 255, 0.42);
  transition: transform 0.35s var(--ease-spring);
}

.depth-seg button {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s;
}

.depth-seg button.on {
  color: var(--cyan);
}

.ask-submit {
  padding: 12px 24px;
  border-radius: 13px;
  border: none;
  cursor: pointer;
  background: var(--grad-accent);
  color: #05070f;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.2s;
  flex: none;
}

.ask-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -6px rgba(56, 232, 255, 0.65);
}

.ask-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.chips-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.chips-label {
  font-size: 12px;
  color: var(--muted);
}

.chip {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 15px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.25s var(--ease-expo);
}

.chip:hover {
  border-color: rgba(56, 232, 255, 0.55);
  color: var(--cyan);
  background: rgba(56, 232, 255, 0.09);
  transform: translateY(-1px);
}

.chip--shuffle {
  border-style: dashed;
  color: var(--gold);
  border-color: rgba(255, 216, 77, 0.35);
}

.studio__status {
  padding: 22px 36px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.prompt-echo {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.prompt-echo b {
  color: var(--cyan);
}

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--cyan);
  border-radius: 2px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.telemetry-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}

.tele-tag {
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--text-soft);
}

.tele-tag--cyan { color: var(--cyan); border-color: rgba(56, 232, 255, 0.32); background: rgba(56, 232, 255, 0.08); }
.tele-tag--violet { color: var(--violet-soft); border-color: rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.1); }
.tele-tag--gold { color: var(--gold); border-color: rgba(255, 216, 77, 0.32); background: rgba(255, 216, 77, 0.08); }

/* 4-Agent Rail */
.agent-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 8px 36px 26px;
}

.agent-node {
  padding: 15px 18px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  transition: all 0.35s var(--ease-expo);
}

.agent-node__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.agent-node__bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 12px;
  overflow: hidden;
}

.agent-node__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--grad-accent);
  transition: width 0.45s var(--ease-expo);
}

.agent-node.on {
  border-color: rgba(56, 232, 255, 0.65);
  background: rgba(56, 232, 255, 0.08);
  transform: translateY(-2px);
}

.agent-node.on .agent-node__top { color: var(--cyan); }
.agent-node.on .agent-node__bar i { width: 65%; }
.agent-node.done { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.055); }
.agent-node.done .agent-node__top { color: var(--text); }
.agent-node.done .agent-node__ms { color: var(--emerald); }
.agent-node.done .agent-node__bar i { width: 100%; background: var(--emerald); }

/* Spacious Output Deck: 2-Column Top (Videos + Summary) + Full-Width Explanation Below */
.output-deck {
  padding: 8px 36px 36px;
  display: grid;
  gap: 22px;
}

.output-row-top {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
}

.out-card {
  background: rgba(16, 21, 36, 0.88);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0.25;
  transform: translateY(16px);
  filter: blur(4px);
  transition: opacity 0.65s var(--ease-expo), transform 0.65s var(--ease-expo), filter 0.65s var(--ease-expo), border-color 0.3s;
}

.out-card.show {
  opacity: 1;
  transform: none;
  filter: none;
}

.out-card:hover {
  border-color: rgba(56, 232, 255, 0.32);
}

.out-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.out-card__label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--cyan);
}

.out-card__label--gold { color: var(--gold); }
.out-card__label--violet { color: var(--violet-soft); }

.icon-btn {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--cyan);
  background: rgba(56, 232, 255, 0.1);
}

.vid-list {
  display: grid;
  gap: 14px;
}

.vid-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(7, 10, 18, 0.85);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease-expo), border-color 0.25s;
}

.vid-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 232, 255, 0.5);
}

.vid-play {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--grad-accent);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px -6px rgba(56, 232, 255, 0.55);
}

.vid-play::after {
  content: "";
  margin-left: 3px;
  border: 7px solid transparent;
  border-left: 11px solid #05070e;
  border-right: 0;
}

.vid-meta strong {
  display: block;
  font-size: 15.5px;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 4px;
}

.vid-meta span {
  font-size: 12.5px;
  color: var(--muted);
}

.summary-list {
  list-style: none;
  display: grid;
  gap: 14px;
  font-size: 15.5px;
  color: var(--text-soft);
}

.summary-list li {
  position: relative;
  padding-left: 20px;
  line-height: 1.6;
}

.summary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.exam-tip {
  margin-top: auto;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 216, 77, 0.08);
  border: 1px solid rgba(255, 216, 77, 0.26);
  font-size: 14px;
  color: #ffeaa0;
  line-height: 1.55;
}

.explain-overview {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.65;
}

.explain-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.explain-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.065);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: var(--violet-soft);
  font-size: 12.5px;
  display: grid;
  place-items: center;
}

.explain-list strong {
  color: var(--text);
  display: block;
  font-size: 15.5px;
  margin-bottom: 4px;
}

.explain-list span {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.55;
}

.example-box {
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(56, 232, 255, 0.065);
  border: 1px solid rgba(56, 232, 255, 0.24);
  font-size: 14.5px;
  color: #bcf6ff;
}

/* ==========================================================================
   Marquee, Architecture SVG, Flow, Knowledge Base & History Pages
   ========================================================================== */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(11, 14, 24, 0.45);
  padding: 20px 0;
  margin-top: 24px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marqueeRun 38s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 14.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s;
}

.marquee__item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

.marquee__item:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(56, 232, 255, 0.09);
}

@keyframes marqueeRun { to { transform: translateX(-50%); } }

/* Architecture Stage */
.arch-stage {
  padding: 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(14, 18, 32, 0.85), rgba(8, 10, 18, 0.94));
  border: 1px solid var(--line);
}

.arch-svg { width: 100%; height: auto; display: block; }
.arch-edge { fill: none; stroke: rgba(56, 232, 255, 0.35); stroke-width: 2; stroke-dasharray: 5 7; }
.arch-box rect { fill: #0f1323; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.5; transition: all 0.3s; }
.arch-box.orch rect { fill: rgba(139, 92, 246, 0.16); stroke: rgba(139, 92, 246, 0.65); }
.arch-box.hot rect, .arch-box:hover rect { stroke: var(--cyan); fill: rgba(56, 232, 255, 0.12); filter: drop-shadow(0 0 14px rgba(56, 232, 255, 0.4)); }
.arch-box text { fill: var(--text); font-family: "Bricolage Grotesque", sans-serif; font-weight: 650; font-size: 15px; text-anchor: middle; }
.arch-box .sub { fill: var(--muted); font-family: "JetBrains Mono", monospace; font-size: 11px; }

/* Knowledge Base Page (/knowledge.html) */
.kb-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.kb-search {
  flex: 1;
  min-width: 260px;
  max-width: 460px;
  background: rgba(12, 16, 28, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 13px 18px;
  font-size: 15px;
  outline: none;
}

.kb-search:focus { border-color: var(--cyan); }

.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 9px 17px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.25s;
}

.filter-pill.on {
  background: rgba(56, 232, 255, 0.14);
  border-color: rgba(56, 232, 255, 0.55);
  color: var(--cyan);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.topic-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--ease-expo), border-color 0.25s, background 0.25s;
}

.topic-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 232, 255, 0.5);
  background: rgba(18, 24, 42, 0.94);
}

.topic-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
}

.topic-card__subj {
  color: var(--cyan);
  background: rgba(56, 232, 255, 0.1);
  border: 1px solid rgba(56, 232, 255, 0.25);
  padding: 3px 10px;
  border-radius: 99px;
}

.topic-card h4 {
  font-size: 19px;
  line-height: 1.3;
  color: var(--text);
}

.topic-card p {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.55;
  flex: 1;
}

.topic-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

/* History Page (/history.html) */
.history-cards {
  display: grid;
  gap: 18px;
}

.hcard {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  transition: border-color 0.25s, transform 0.25s;
}

.hcard:hover {
  border-color: rgba(56, 232, 255, 0.42);
  transform: translateY(-2px);
}

.hcard__q {
  font-size: 18px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 10px;
}

.hcard__traces {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.metric-big {
  font-size: clamp(46px, 5.5vw, 76px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 20%, #38e8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.metric-big i {
  font-style: normal;
  font-size: 0.45em;
  -webkit-text-fill-color: var(--muted);
}

.closing-card {
  margin: 100px auto 72px;
  padding: 68px 42px;
  border-radius: 32px;
  text-align: center;
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(56, 232, 255, 0.15), transparent 68%),
    radial-gradient(50% 80% at 85% 100%, rgba(139, 92, 246, 0.17), transparent 68%),
    rgba(13, 17, 30, 0.9);
  border: 1px solid var(--line-strong);
}

.closing-card h2 {
  max-width: 18ch;
  margin: 0 auto 18px;
  font-size: clamp(32px, 4.8vw, 56px);
  line-height: 1.05;
}

.closing-card p {
  color: var(--text-soft);
  max-width: 56ch;
  margin: 0 auto 32px;
  font-size: 17.5px;
}

/* ==========================================================================
   Clean Spacious Footer (Hidden URLs — Only Clickable Names!)
   ========================================================================== */
footer.site-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(16px);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 32px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.footer__nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer__nav a {
  color: var(--text-soft);
  font-size: 14px;
  transition: color 0.2s;
}

.footer__nav a:hover {
  color: var(--cyan);
}

.footer__tm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
  font-size: 13.5px;
  color: var(--muted);
}

.footer__tm a {
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid rgba(56, 232, 255, 0.45);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.footer__tm a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ==========================================================================
   Modal & Toast
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(3, 5, 11, 0.8);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 580px;
  background: #0d111e;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  padding: 32px;
  box-shadow: 0 36px 96px rgba(0, 0, 0, 0.85);
  transform: translateY(18px) scale(0.97);
  transition: transform 0.35s var(--ease-expo);
}

.modal-backdrop.open .modal { transform: none; }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12.5px; color: var(--muted); }
.field input, .field textarea {
  background: rgba(6, 8, 15, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--cyan); }

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 160;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(15, 20, 36, 0.96);
  border: 1px solid rgba(56, 232, 255, 0.45);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease-expo);
}

.toast.show { transform: none; opacity: 1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .nav__links, .nav__status-wrap { display: none; }
  .menu-toggle { display: inline-flex; }
  .g3, .g4, .topic-grid, .output-row-top, .explain-list { grid-template-columns: 1fr; }
  .agent-rail { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-wrap { padding: 12px 14px; }
  .container, .page-hero, .page-section, section.band { padding-inline: 18px; }
  .studio__composer, .studio__status, .agent-rail, .output-deck { padding-inline: 18px; }
  .ask-row { flex-wrap: wrap; padding: 12px; }
  .depth-seg, .ask-submit { width: 100%; justify-content: center; }
  .g2 { grid-template-columns: 1fr; }
  .brand__sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1 !important; transform: none !important; filter: none !important; }
}
