/* ============================================
   EUAI HOUSE - Brand-Aligned Design System
   Fibonacci-Compliant | Golden Ratio | Apple-Quality
   Browser Support: Chrome 80+, Firefox 75+, Safari 13+, Edge 80+
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES - BRAND TOKENS
   ============================================ */
:root {
  /* Primary Palette */
  --ink: #0A0E14;
  --paper: #F5F2EC;
  --phosphor: #C6FF3D;

  /* Neutral Scale (Fibonacci Lightness) */
  --ink-5: rgba(10, 14, 20, 0.05);
  --ink-8: rgba(10, 14, 20, 0.08);
  --ink-13: #161C26;
  --ink-21: #242C3A;
  --ink-34: #3D4A5C;
  --ink-55: #6C7A8F;
  --ink-70: #8A95A5;
  --ink-89: #AFB8C6;
  --paper-89: #DDE1E8;
  --paper-94: #E8EBEF;

  /* Signal Colors */
  --signal-positive: #00C88C;
  --signal-warning: #FFAB0B;
  --signal-critical: #E8412E;
  --signal-info: #4B8AE6;

  /* Typography - with robust fallbacks */
  --font-display: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
  --font-body: 'Geist Sans', 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Golden Ratio */
  --phi: 1.618033988749;
  --phi-inverse: 0.618033988749;

  /* Fibonacci Spacing */
  --space-1: 1px;
  --space-2: 2px;
  --space-3: 3px;
  --space-5: 5px;
  --space-8: 8px;
  --space-13: 13px;
  --space-21: 21px;
  --space-34: 34px;
  --space-55: 55px;
  --space-89: 89px;
  --space-144: 144px;

  /* Animation Timing (Golden Ratio) */
  --duration-fast: 200ms;
  --duration-base: 300ms;
  --duration-medium: 485ms;
  --duration-slow: 785ms;
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Apple-Quality Animation Curves */
  --ease-entrance: cubic-bezier(0.25, 0.1, 0.25, 1);    /* 300-400ms - smooth entrance */
  --ease-emphasis: cubic-bezier(0.34, 1.56, 0.64, 1);   /* 500-600ms - slight overshoot */
  --ease-exit: cubic-bezier(0.4, 0, 0.6, 1);            /* 200-250ms - quick exit */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy reveals */

  /* Scroll Progress Variables (JS-driven) */
  --scroll-p: 0;     /* Global: 0 at top, 1 at bottom */
  --hero-p: 0;       /* Hero: 0 at top, 1 when hero exits */
  --section-p: 0;    /* Per-section: 0 at entry, 1 at exit */

  /* Layout */
  --max-width: 1440px;
  --content-width: 987px;
  --nav-height: 89px;
}

/* ============================================
   BASE RESET & TYPOGRAPHY
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

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

  /* Disable scroll-linked animations */
  .parallax-layer,
  .scroll-reveal,
  [data-scroll-animation],
  .hero-logo,
  .hero-grid,
  .hero-content {
    transform: none !important;
    opacity: 1 !important;
  }

  /* Show all content immediately */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  font-family: var(--font-body);
  font-family: 'Geist Sans', 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.618;
  color: var(--ink);
  color: #0A0E14;
  background: var(--paper);
  background: #F5F2EC;
  overflow-x: hidden;
  /* Ensure content is visible even if CSS variables fail */
  min-height: 100vh;
}

/* Typography Scale (Fibonacci) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.236;
  letter-spacing: -0.013em;
}

h1 { font-size: clamp(34px, 8vw, 89px); }
h2 { font-size: clamp(28px, 5vw, 55px); }
h3 { font-size: clamp(21px, 3vw, 34px); }
h4 { font-size: 21px; font-weight: 600; }
h5 { font-size: 18px; font-weight: 500; }

p {
  max-width: 610px;
  font-size: 18px;
  color: var(--ink-34);
}

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

/* Labels */
.label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.144em;
  color: var(--ink);
}

/* Labels on dark backgrounds */
.section-dark .label,
.hero .label,
.footer .label {
  color: var(--phosphor);
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-21);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-34);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-89);
  }
}

.section {
  padding: var(--space-89) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-144) 0;
  }
}

.section-light {
  background: var(--paper);
  color: var(--ink);
}

.section-dark {
  background: var(--ink);
  color: var(--paper);
}

.section-dark p {
  color: var(--ink-89);
}

/* Dark section labels already handled above */

.section-header {
  margin-bottom: var(--space-55);
  text-align: center;
}

.section-header h2 {
  margin-top: var(--space-13);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(21px);
  -webkit-backdrop-filter: blur(21px);
  border-bottom: 1px solid var(--ink-21);
  transition: transform var(--duration-base) var(--ease-apple);
}

.nav.hidden {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-21) var(--space-21);
  height: var(--nav-height);
}

@media (min-width: 768px) {
  .nav-container {
    padding: var(--space-21) var(--space-34);
  }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-13);
  color: var(--paper);
}

.nav-logo .logo-mark {
  transition: transform var(--duration-base) var(--ease-apple);
}

.nav-logo:hover .logo-mark {
  transform: scale(1.05);
}

.nav-logo .cursor {
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.nav-wordmark {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.089em;
  display: none;
}

@media (min-width: 768px) {
  .nav-wordmark {
    display: block;
  }
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-34);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-55);
  transition: color var(--duration-base) var(--ease-apple);
}

.nav-link:hover {
  color: var(--paper);
}

.nav-link-highlight {
  color: var(--phosphor);
  padding: var(--space-5) var(--space-13);
  border: 1px solid var(--phosphor);
  transition: all var(--duration-base) var(--ease-apple);
}

.nav-link-highlight:hover {
  background: var(--phosphor);
  color: var(--ink);
}

.mobile-link-highlight {
  color: var(--phosphor);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background: transparent;
  border: 1px solid var(--ink-34);
  padding: var(--space-8) var(--space-13);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  transition: border-color var(--duration-base) var(--ease-apple);
}

.lang-toggle:hover {
  border-color: var(--phosphor);
}

.lang-option {
  color: var(--ink-55);
  transition: color var(--duration-base) var(--ease-apple);
}

.lang-option.active {
  color: var(--phosphor);
}

.lang-divider {
  color: var(--ink-34);
}

.nav-menu-btn {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  background: transparent;
  border: none;
  padding: var(--space-8);
  cursor: pointer;
}

@media (min-width: 768px) {
  .nav-menu-btn {
    display: none;
  }
}

.nav-menu-btn span {
  width: 21px;
  height: 2px;
  background: var(--paper);
  transition: all var(--duration-base) var(--ease-apple);
}

.nav-menu-btn.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.nav-menu-btn.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--ink);
  padding: var(--space-34);
  display: flex;
  flex-direction: column;
  gap: var(--space-21);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-medium) var(--ease-out-expo);
  z-index: 999;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--paper);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: var(--ink);
  overflow: hidden;
  padding-top: var(--nav-height);
  /* Apple-Quality: 3D perspective for depth */
  perspective: 1000px;
  transform-style: preserve-3d;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at center, var(--ink-34) 1px, transparent 1px);
  background-size: 21px 21px;
  opacity: 0.3;
  /* Apple-Quality: Scroll-linked parallax (moves faster = background) */
  transform: translateY(calc(var(--hero-p, 0) * 60px));
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: var(--space-55) var(--space-21);
  max-width: var(--content-width);
  /* Apple-Quality: Scroll-linked fade + parallax (moves slower = foreground) */
  transform: translateY(calc(var(--hero-p, 0) * -40px));
  opacity: calc(1 - var(--hero-p, 0) * 0.6);
  will-change: transform, opacity;
  transition: transform 0.1s linear, opacity 0.1s linear;
}

.hero-logo {
  margin-bottom: var(--space-55);
  /* Apple-Quality: Scroll-linked scale + fade */
  transform:
    translateY(calc(var(--hero-p, 0) * -20px))
    scale(calc(1 - var(--hero-p, 0) * 0.08));
  opacity: calc(1 - var(--hero-p, 0) * 0.4);
  will-change: transform, opacity;
  transition: transform 0.1s linear, opacity 0.1s linear;
}

.hero-logo-svg {
  width: 89px;
  height: 89px;
}

@media (min-width: 768px) {
  .hero-logo-svg {
    width: 144px;
    height: 144px;
  }
}

.hero-logo-svg .logo-cursor {
  animation: cursorBlink 1s step-end infinite;
}

.hero-title {
  color: var(--paper);
  margin-bottom: var(--space-34);
}

.hero-highlight {
  color: var(--phosphor);
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 21px);
  color: var(--ink-89);
  max-width: 610px;
  margin: 0 auto var(--space-55);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-13);
  align-items: center;
}

@media (min-width: 480px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: var(--space-13) var(--space-21);
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
}

.btn-primary {
  background: var(--phosphor);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--paper);
  transform: translateY(-2px);
}

.btn-primary svg {
  transition: transform var(--duration-base) var(--ease-apple);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-secondary {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--ink-34);
}

.btn-secondary:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.btn-large {
  font-size: 16px;
  padding: var(--space-21) var(--space-34);
}

/* Hero Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--space-34);
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator {
  width: 21px;
  height: 34px;
  border: 2px solid var(--ink-34);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  padding-top: var(--space-5);
}

.scroll-dot {
  width: 3px;
  height: 8px;
  background: var(--phosphor);
  border-radius: 2px;
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */
/* LCP-friendly animation - starts visible (opacity: 0.01 counts as painted for LCP) */
.animate-on-load {
  opacity: 0.01;
  transform: translateY(21px);
  animation: fadeUp var(--duration-medium) var(--ease-out-expo) forwards;
}

/* Hero title must be immediately visible for LCP - override all animation */
.hero-title.animate-on-load,
.hero-title.animate-on-load.delay-1 {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.delay-1 { animation-delay: 200ms; }
.delay-2 { animation-delay: 400ms; }
.delay-3 { animation-delay: 600ms; }

@keyframes fadeUp {
  from {
    opacity: 0.01;
    transform: translateY(21px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeIn {
  from {
    opacity: 0.5;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reveal animations - ONLY activate when JS is loaded */
/* Content visible by default for no-JS fallback */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* JS adds this class to html element when loaded */
.js-loaded .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity var(--duration-medium) var(--ease-out-expo),
              transform var(--duration-medium) var(--ease-out-expo);
}

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

/* ============================================
   VALUE PROPOSITION SECTION
   ============================================ */
.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-55);
}

@media (min-width: 768px) {
  .value-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-89);
  }
}

.value-heading {
  font-size: 21px;
  margin-bottom: var(--space-34);
  padding-bottom: var(--space-13);
  border-bottom: 2px solid var(--ink);
  display: inline-block;
}

.value-heading-muted {
  border-bottom-color: var(--ink-55);
  color: var(--ink-55);
}

.value-item {
  display: flex;
  gap: var(--space-21);
  margin-bottom: var(--space-34);
}

.value-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-content h4 {
  font-size: 16px;
  margin-bottom: var(--space-5);
}

.value-content p {
  font-size: 14px;
  color: var(--ink-55);
  max-width: none;
}

.value-item-muted .value-content h4 {
  color: var(--ink-55);
}

.value-item-muted .value-content p {
  color: var(--ink-89);
}

/* ============================================
   CODE CARD SHOWCASE
   ============================================ */
.code-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-55);
  /* Apple-Quality: Perspective for depth */
  perspective: 1000px;
}

.code-card {
  width: 100%;
  max-width: 610px;
  background: var(--ink-13);
  border: 1px solid var(--ink-21);
  overflow: hidden;
  /* Apple-Quality: Scale reveal animation */
  transform: scale(0.95) translateY(30px);
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform 0.6s var(--ease-entrance),
    opacity 0.6s var(--ease-entrance);
}

.code-showcase.visible .code-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.code-header {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-13) var(--space-21);
  background: var(--ink-21);
  border-bottom: 1px solid var(--ink-34);
}

.code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-34);
}

.code-dot:nth-child(1) { background: var(--signal-critical); }
.code-dot:nth-child(2) { background: var(--signal-warning); }
.code-dot:nth-child(3) { background: var(--signal-positive); }

.code-filename {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--ink-55);
}

.code-content {
  padding: var(--space-21);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.618;
  color: var(--paper);
  overflow-x: auto;
}

.code-comment { color: var(--ink-55); }
.code-keyword { color: var(--phosphor); }
.code-function { color: var(--signal-info); }
.code-type { color: var(--signal-warning); }

/* Apple-Quality: Syntax highlighting stagger fade (NOT typewriter) */
.code-content code > * {
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity 0.4s var(--ease-entrance),
    filter 0.4s var(--ease-entrance);
}

.code-showcase.visible .code-content code > * {
  opacity: 1;
  filter: blur(0);
}

/* Staggered delays for each line */
.code-showcase.visible .code-content code > *:nth-child(1) { transition-delay: 0.15s; }
.code-showcase.visible .code-content code > *:nth-child(2) { transition-delay: 0.2s; }
.code-showcase.visible .code-content code > *:nth-child(3) { transition-delay: 0.25s; }
.code-showcase.visible .code-content code > *:nth-child(4) { transition-delay: 0.3s; }
.code-showcase.visible .code-content code > *:nth-child(5) { transition-delay: 0.35s; }
.code-showcase.visible .code-content code > *:nth-child(6) { transition-delay: 0.4s; }
.code-showcase.visible .code-content code > *:nth-child(7) { transition-delay: 0.45s; }
.code-showcase.visible .code-content code > *:nth-child(8) { transition-delay: 0.5s; }
.code-showcase.visible .code-content code > *:nth-child(9) { transition-delay: 0.55s; }
.code-showcase.visible .code-content code > *:nth-child(10) { transition-delay: 0.6s; }

/* Syntax glow effect on reveal */
.code-showcase.visible .code-keyword {
  text-shadow: 0 0 8px rgba(198, 255, 61, 0.3);
}

.code-showcase.visible .code-function {
  text-shadow: 0 0 8px rgba(75, 138, 230, 0.3);
}

.code-promise {
  text-align: center;
}

.promise-text {
  font-family: var(--font-display);
  font-size: clamp(21px, 4vw, 34px);
  font-weight: 700;
  color: var(--paper);
  max-width: none;
  /* Apple-Quality: Promise text reveal */
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s var(--ease-entrance);
}

.code-showcase.visible .promise-text:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

.code-showcase.visible .promise-text:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.85s;
}

.promise-text:last-child {
  color: var(--phosphor);
}

/* ============================================
   PROCESS SECTION
   ============================================ */
.process-timeline {
  position: relative;
  max-width: 610px;
  margin: 0 auto;
}

.process-line {
  position: absolute;
  left: 26px;
  top: 0;
  bottom: 0;
  width: 2px;
  /* Apple-Quality: Scroll-linked line draw */
  background: linear-gradient(
    to bottom,
    var(--phosphor) 0%,
    var(--phosphor) calc(var(--section-p, 0) * 100%),
    var(--ink-34) calc(var(--section-p, 0) * 100% + 1px),
    var(--ink-89) 100%
  );
  z-index: 0;
  transition: background 0.1s linear;
}

@media (min-width: 768px) {
  .process-line {
    left: 40px;
  }
}

.process-step {
  position: relative;
  padding-left: var(--space-55);
  padding-bottom: var(--space-55);
  z-index: 1;
  /* Apple-Quality: Step reveal animation */
  opacity: 0;
  transform: translateX(-20px) scale(0.98);
}

.process-step.visible {
  animation: processStepReveal 0.5s var(--ease-entrance) forwards;
}

/* Staggered delays for steps */
.process-step:nth-child(2).visible { animation-delay: 0s; }
.process-step:nth-child(3).visible { animation-delay: 0.1s; }
.process-step:nth-child(4).visible { animation-delay: 0.2s; }
.process-step:nth-child(5).visible { animation-delay: 0.3s; }

@keyframes processStepReveal {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (min-width: 768px) {
  .process-step {
    padding-left: var(--space-89);
  }
}

.process-step:last-child {
  padding-bottom: 0;
}

.process-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 55px;
  height: 55px;
  background: var(--ink);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  /* Apple-Quality: Transition for pulse */
  transition: all 0.4s var(--ease-emphasis);
}

/* Number pulse on reveal */
.process-step.visible .process-number {
  animation: numberPulse 0.6s var(--ease-emphasis);
  border-color: var(--phosphor);
  color: var(--phosphor);
}

@keyframes numberPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(198, 255, 61, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(198, 255, 61, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(198, 255, 61, 0);
  }
}

@media (min-width: 768px) {
  .process-number {
    width: 81px;
    height: 81px;
    font-size: 21px;
  }
}

.process-content h3 {
  margin-bottom: var(--space-13);
}

.process-content p {
  font-size: 16px;
  margin-bottom: var(--space-13);
}

.process-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.089em;
  padding: var(--space-5) var(--space-13);
  background: var(--phosphor);
  color: var(--ink);
  /* Apple-Quality: Tag slide-in */
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s var(--ease-entrance) 0.3s;
}

.process-step.visible .process-tag {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   TEAM SECTION
   ============================================ */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-21);
  /* Apple-Quality: Perspective for depth */
  perspective: 1000px;
}

@media (min-width: 480px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-13);
  }
}

.team-card {
  background: var(--ink-13);
  border: 1px solid var(--ink-21);
  padding: var(--space-34);
  text-align: center;
  transition: all var(--duration-base) var(--ease-apple);
  /* Apple-Quality: Stagger reveal animation */
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  will-change: transform, opacity;
}

.team-card.visible {
  animation: teamCardReveal 0.5s var(--ease-entrance) forwards;
}

/* Apple-Quality: Staggered delays using nth-child (80ms cascade) */
.team-card:nth-child(1).visible { animation-delay: 0s; }
.team-card:nth-child(2).visible { animation-delay: 0.08s; }
.team-card:nth-child(3).visible { animation-delay: 0.16s; }
.team-card:nth-child(4).visible { animation-delay: 0.24s; }
.team-card:nth-child(5).visible { animation-delay: 0.32s; }
.team-card:nth-child(6).visible { animation-delay: 0.40s; }
.team-card:nth-child(7).visible { animation-delay: 0.48s; }

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

.team-card:hover {
  border-color: var(--phosphor);
  transform: translateY(-5px);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px var(--phosphor);
}

.team-avatar {
  width: 55px;
  height: 55px;
  background: var(--ink-21);
  border: 2px solid var(--phosphor);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-21);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--phosphor);
  /* Apple-Quality: Avatar reveal */
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s var(--ease-emphasis) 0.2s;
}

.team-card.visible .team-avatar {
  opacity: 1;
  transform: scale(1);
}

.team-card:hover .team-avatar {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(198, 255, 61, 0.3);
}

.team-card h3 {
  font-size: 16px;
  margin-bottom: var(--space-5);
  color: var(--paper);
}

.team-role {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.089em;
  color: var(--phosphor);
  margin-bottom: var(--space-13);
}

.team-bio {
  font-size: 13px;
  color: var(--ink-55);
  max-width: none;
}

/* ============================================
   PRINCIPLES SECTION
   ============================================ */
.principles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-21);
}

@media (min-width: 768px) {
  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .principles-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.principle-card {
  background: var(--paper-94);
  padding: var(--space-34);
  border-left: 3px solid var(--ink);
  transition: all var(--duration-base) var(--ease-apple);
}

.principle-card:hover {
  background: var(--paper);
  transform: translateX(5px);
}

.principle-number {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.2;
  margin-bottom: var(--space-13);
}

.principle-card h3 {
  font-size: 21px;
  margin-bottom: var(--space-13);
}

.principle-card p {
  font-size: 14px;
  max-width: none;
}

/* ============================================
   MANIFESTO SECTION
   ============================================ */
.section-manifesto {
  background: var(--ink);
  padding: var(--space-144) 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.manifesto-content {
  text-align: center;
}

.manifesto-line {
  font-family: var(--font-display);
  font-size: clamp(21px, 4vw, 34px);
  font-weight: 600;
  color: var(--paper);
  margin-bottom: var(--space-8);
  max-width: none;
}

.manifesto-spacer {
  margin-top: var(--space-34);
}

.manifesto-highlight {
  color: var(--phosphor);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-55);
  align-items: center;
}

@media (min-width: 768px) {
  .contact-content {
    grid-template-columns: 61.8% 38.2%;
    gap: var(--space-89);
  }
}

.contact-text h2 {
  margin-top: var(--space-13);
  margin-bottom: var(--space-21);
}

.contact-text p {
  margin-bottom: var(--space-34);
}

.contact-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-13);
}

.contact-feature {
  display: flex;
  align-items: center;
  gap: var(--space-13);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-34);
}

.contact-cta {
  text-align: center;
  padding: var(--space-55);
  background: var(--ink);
}

@media (min-width: 768px) {
  .contact-cta {
    text-align: left;
  }
}

.contact-email {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--paper);
  margin-top: var(--space-21);
  max-width: none;
}

.contact-location {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-55);
  margin-top: var(--space-8);
  max-width: none;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  padding: var(--space-55) 0;
  border-top: 1px solid var(--ink-21);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-34);
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-13);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.089em;
  color: var(--paper);
}

.footer-links {
  display: flex;
  gap: var(--space-21);
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-55);
  transition: color var(--duration-base) var(--ease-apple);
}

.footer-links a:hover {
  color: var(--phosphor);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-13);
  justify-content: center;
  margin-top: var(--space-21);
}

@media (min-width: 768px) {
  .footer-legal {
    justify-content: flex-start;
    margin-top: 0;
  }
}

.footer-legal a {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-34);
  transition: color var(--duration-base) var(--ease-apple);
}

.footer-legal a:hover {
  color: var(--phosphor);
}

.footer-meta {
  text-align: center;
}

@media (min-width: 768px) {
  .footer-meta {
    text-align: right;
  }
}

.footer-tagline {
  font-size: 13px;
  color: var(--ink-55);
  max-width: none;
}

.footer-copyright {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--ink-34);
  margin-top: var(--space-8);
  max-width: none;
}

/* ============================================
   SELECTION & FOCUS STYLES
   ============================================ */
::selection {
  background: var(--phosphor);
  color: var(--ink);
}

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

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-34);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-55);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   AI DISCOVERY AGENT SECTION
   ============================================ */
.agent-section {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-13) 100%);
  position: relative;
  overflow: hidden;
}

.agent-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(198, 255, 61, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(198, 255, 61, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.agent-header {
  text-align: center;
  margin-bottom: var(--space-55);
  position: relative;
}

.agent-subtitle {
  color: var(--ink-89);
  max-width: 500px;
  margin: var(--space-21) auto 0;
  font-size: 16px;
}

/* ============================================
   TERMINAL INTERFACE
   ============================================ */
.agent-terminal {
  max-width: 700px;
  margin: 0 auto;
  background: var(--ink-13);
  border: 1px solid var(--ink-21);
  overflow: hidden;
  position: relative;
}

.agent-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
  opacity: 0.5;
}

/* Terminal Header */
.terminal-header {
  display: flex;
  align-items: center;
  padding: var(--space-13) var(--space-21);
  background: var(--ink-21);
  border-bottom: 1px solid var(--ink-34);
}

.terminal-dots {
  display: flex;
  gap: var(--space-8);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot-red { background: var(--signal-critical); }
.terminal-dot-yellow { background: var(--signal-warning); }
.terminal-dot-green { background: var(--signal-positive); }

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-55);
  letter-spacing: 0.05em;
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--signal-positive);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--signal-positive);
  border-radius: 50%;
  /* Apple-Quality: Smooth pulse with glow */
  animation: statusPulseApple 2.5s ease-in-out infinite;
  will-change: transform, opacity, box-shadow;
}

@keyframes statusPulseApple {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 200, 140, 0.4);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(0, 200, 140, 0);
  }
}

/* Terminal Body */
.terminal-body {
  min-height: 200px;
  max-height: 350px;
  padding: var(--space-21);
  overflow-y: auto;
  scroll-behavior: smooth;
}

.terminal-output {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-13);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.6;
  /* Apple-Quality: Enhanced fade + blur */
  opacity: 0;
  transform: translateY(8px);
  filter: blur(1px);
  animation: terminalFadeInApple 0.4s var(--ease-entrance) forwards;
}

.terminal-output:nth-child(1) { animation-delay: 0.1s; }
.terminal-output:nth-child(2) { animation-delay: 0.4s; }
.terminal-output:nth-child(3) { animation-delay: 0.7s; }

@keyframes terminalFadeInApple {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.terminal-prompt {
  color: var(--phosphor);
  flex-shrink: 0;
  font-weight: 600;
}

.terminal-text {
  color: var(--paper);
}

.terminal-output-highlight .terminal-text {
  color: var(--phosphor);
}

.terminal-output-user {
  justify-content: flex-end;
}

.terminal-output-user .terminal-prompt {
  color: var(--ink-55);
  order: 2;
}

.terminal-output-user .terminal-text {
  color: var(--ink-89);
  text-align: right;
}

.terminal-output-error .terminal-text {
  color: var(--signal-critical);
}

.terminal-output-success .terminal-text {
  color: var(--signal-positive);
}

/* Typing Animation */
.terminal-typing {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.terminal-typing span {
  width: 4px;
  height: 4px;
  background: var(--phosphor);
  border-radius: 50%;
  /* Apple-Quality: Smooth bounce */
  animation: typingBounceApple 1s ease-in-out infinite;
  will-change: transform;
}

.terminal-typing span:nth-child(2) { animation-delay: 0.15s; }
.terminal-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounceApple {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* Terminal Input Area - Enhanced */
.terminal-input-area {
  padding: var(--space-21);
  border-top: 1px solid var(--ink-21);
  background: var(--ink);
}

/* Attachment Preview Area */
.attachment-preview {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-bottom: var(--space-13);
  padding: var(--space-13);
  background: var(--ink-13);
  border: 1px solid var(--ink-21);
  border-radius: 4px;
}

.attachment-preview.has-files {
  display: flex;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) var(--space-13);
  background: var(--ink-21);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--paper);
}

.attachment-item.is-image {
  flex-direction: column;
  padding: var(--space-5);
}

.attachment-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
}

.attachment-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-34);
  border-radius: 4px;
  color: var(--phosphor);
}

.attachment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachment-name {
  color: var(--paper);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-size {
  color: var(--ink-55);
  font-size: 10px;
}

.attachment-remove {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink-55);
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--duration-fast) var(--ease-apple);
}

.attachment-remove:hover {
  background: var(--signal-critical);
  color: var(--paper);
}

/* Enhanced Input Container - Modern Chat Style */
.terminal-input-container {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px;
  background: var(--ink-13);
  border: 2px solid var(--ink-21);
  border-radius: 28px;
  padding: 12px 16px;
  margin-top: 16px;
  transition: all var(--duration-base) var(--ease-apple);
}

.terminal-input-container:focus-within {
  border-color: var(--phosphor);
  box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.1), 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Left side - attachment buttons */
.terminal-actions-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Center - Input wrapper */
.terminal-input-wrapper {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}

.terminal-prompt-input {
  display: none;
}

.terminal-input {
  width: 100%;
  flex: 1;
  background: var(--ink-21);
  border: 2px solid var(--ink-34);
  border-radius: 20px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  caret-color: var(--phosphor);
  resize: none;
  min-height: 48px;
  max-height: 150px;
  overflow-y: auto;
  padding: 12px 20px;
  transition: all var(--duration-base) var(--ease-apple);
}

.terminal-input:focus {
  background: var(--ink);
  border-color: var(--phosphor);
}

.terminal-input::placeholder {
  color: var(--ink-55);
  font-size: 15px;
}

.terminal-input:disabled {
  opacity: 0.6;
  background: var(--ink-21);
  cursor: not-allowed;
}

/* Action Buttons */
.terminal-action-btn {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  border-radius: 50%;
  color: var(--ink-89);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
  flex-shrink: 0;
}

.terminal-action-btn:hover {
  background: var(--ink-34);
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.terminal-action-btn:active {
  transform: scale(0.95);
}

.terminal-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.terminal-action-btn svg {
  width: 20px;
  height: 20px;
}

/* Send Button */
.terminal-send-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  min-width: 48px;
  padding: 0 24px;
  background: var(--phosphor);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
  flex-shrink: 0;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.terminal-send-btn .btn-text {
  display: none;
}

.terminal-send-btn .btn-text {
  display: block;
}

.terminal-send-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.terminal-send-btn:hover {
  background: var(--paper);
  box-shadow: 0 4px 16px rgba(198, 255, 61, 0.5);
}

.terminal-send-btn:active {
  transform: scale(0.95);
}

/* Apple-Quality: Ripple effect */
.terminal-send-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: all 0.4s var(--ease-entrance);
  pointer-events: none;
}

.terminal-send-btn:active::after {
  transform: scale(2);
  opacity: 1;
  transition: none;
}

.terminal-send-btn:disabled {
  background: var(--ink-34);
  color: var(--ink-55);
  cursor: not-allowed;
}

/* Legacy support - hide old elements */
.terminal-cursor {
  display: none;
}

.terminal-btn {
  display: none;
}

/* File drag over state */
.terminal-input-container.drag-over {
  border-color: var(--phosphor);
  background: rgba(198, 255, 61, 0.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .terminal-input-container {
    padding: 8px 12px;
    border-radius: 24px;
    gap: 8px;
    margin-top: 12px;
  }

  .terminal-input {
    font-size: 16px; /* Prevent iOS zoom */
    padding: 10px 16px;
    border-radius: 18px;
    min-height: 44px;
  }

  .terminal-actions-left {
    gap: 4px;
  }

  .terminal-action-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .terminal-action-btn svg {
    width: 18px;
    height: 18px;
  }

  .terminal-send-btn {
    height: 44px;
    min-width: 44px;
    padding: 0 16px;
    border-radius: 22px;
  }

  .terminal-send-btn .btn-text {
    display: none;
  }

  .attachment-preview {
    padding: 8px;
    border-radius: 12px;
  }

  .attachment-item {
    padding: 6px 10px;
  }

  .attachment-thumb {
    width: 50px;
    height: 50px;
  }
}

/* Progress Steps */
.terminal-progress {
  padding: var(--space-21);
  background: var(--ink-21);
  border-top: 1px solid var(--ink-34);
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  opacity: 0.3;
  transition: all var(--duration-base) var(--ease-apple);
}

.progress-step.active {
  opacity: 1;
}

.progress-step.completed {
  opacity: 1;
}

.progress-step.completed .step-number {
  background: var(--signal-positive);
  border-color: var(--signal-positive);
  color: var(--ink);
}

.step-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink-55);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-55);
  transition: all var(--duration-base) var(--ease-apple);
}

.progress-step.active .step-number {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.step-label {
  font-family: var(--font-display);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-55);
}

.progress-step.active .step-label {
  color: var(--phosphor);
}

.progress-line {
  width: 34px;
  height: 2px;
  background: var(--ink-34);
  margin-bottom: var(--space-21);
}

/* Agent Features */
.agent-features {
  display: flex;
  justify-content: center;
  gap: var(--space-34);
  margin-top: var(--space-55);
  flex-wrap: wrap;
}

.agent-feature {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink-55);
}

/* Success State */
.agent-terminal.success {
  border-color: var(--signal-positive);
}

.agent-terminal.success::before {
  background: linear-gradient(90deg, transparent, var(--signal-positive), transparent);
}

/* ============================================
   TIMELINE OPTIONS (for step 4)
   ============================================ */
.terminal-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-13);
}

.terminal-option {
  padding: var(--space-8) var(--space-13);
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
}

.terminal-option:hover {
  border-color: var(--phosphor);
  background: var(--ink-13);
}

.terminal-option.selected {
  border-color: var(--phosphor);
  background: var(--phosphor);
  color: var(--ink);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 600px) {
  .agent-features {
    flex-direction: column;
    align-items: center;
    gap: var(--space-13);
  }

  .progress-steps {
    gap: var(--space-3);
  }

  .progress-line {
    width: 21px;
  }

  .step-label {
    display: none;
  }
}

/* ============================================
   CASE STUDIES CAROUSEL
   ============================================ */
.cases-subtitle {
  color: var(--ink-89);
  max-width: 550px;
  margin: var(--space-13) auto 0;
  font-size: 16px;
}

.cases-carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}

.cases-track {
  display: flex;
  transition: transform var(--duration-medium) var(--ease-out-expo);
}

.case-card {
  flex: 0 0 100%;
  padding: 0 var(--space-13);
}

.case-terminal {
  background: var(--ink-13);
  border: 1px solid var(--ink-21);
  padding: var(--space-34);
  position: relative;
  overflow: hidden;
}

.case-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
  opacity: 0.6;
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-13);
}

.case-id {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--phosphor);
}

.case-status {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  padding: var(--space-5) var(--space-13);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.case-status-live {
  background: rgba(0, 200, 140, 0.15);
  color: var(--signal-positive);
  border: 1px solid var(--signal-positive);
}

.case-status-pilot {
  background: rgba(255, 171, 11, 0.15);
  color: var(--signal-warning);
  border: 1px solid var(--signal-warning);
}

.case-divider {
  height: 1px;
  background: var(--ink-34);
  margin: var(--space-13) 0;
}

.case-row {
  display: flex;
  gap: var(--space-21);
  margin-bottom: var(--space-13);
}

.case-label {
  flex: 0 0 80px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 3px;
}

.case-value {
  flex: 1;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--paper);
}

.case-value-wrap {
  line-height: 1.5;
}

.case-value-highlight {
  color: var(--phosphor);
  font-weight: 600;
}

.case-tech {
  color: var(--ink-89);
  font-size: 12px;
}

.case-result {
  display: flex;
  align-items: baseline;
  gap: var(--space-13);
  margin-top: var(--space-21);
}

.case-result-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.case-result-value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--phosphor);
  line-height: 1;
}

.case-result-metric {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-89);
}

.case-progress {
  margin-top: var(--space-21);
  height: 3px;
  background: var(--ink-21);
  overflow: hidden;
}

.case-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--signal-positive);
  animation: progressFill 1s var(--ease-out-expo) forwards;
}

@keyframes progressFill {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Carousel Navigation */
.cases-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  color: var(--paper);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
  z-index: 10;
}

.cases-nav:hover {
  background: var(--ink-13);
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.cases-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cases-nav-prev { left: 0; }
.cases-nav-next { right: 0; }

/* Carousel Dots */
.cases-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-34);
}

.cases-dot {
  width: 8px;
  height: 8px;
  background: var(--ink-34);
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
}

.cases-dot:hover {
  background: var(--ink-55);
}

.cases-dot.active {
  background: var(--phosphor);
  width: 24px;
}

/* Autoplay Progress */
.cases-autoplay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink-21);
  overflow: hidden;
}

.autoplay-progress {
  height: 100%;
  background: var(--phosphor);
  width: 0%;
  transition: width 5s linear;
}

.autoplay-progress.running {
  width: 100%;
}

.cases-carousel:hover .autoplay-progress {
  animation-play-state: paused;
}

/* Cases Stats */
.cases-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-55);
  margin-top: var(--space-89);
  padding: var(--space-34);
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--phosphor);
  line-height: 1;
  margin-bottom: var(--space-8);
}

.stat-label {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-divider {
  width: 1px;
  height: 55px;
  background: var(--ink-34);
}

/* Responsive Cases */
@media (max-width: 768px) {
  .case-card {
    padding: 0;
  }

  .case-terminal {
    padding: var(--space-21);
  }

  .case-row {
    flex-direction: column;
    gap: var(--space-5);
  }

  .case-label {
    flex: none;
  }

  .case-result {
    flex-wrap: wrap;
  }

  .case-result-value {
    font-size: 28px;
  }

  .cases-nav {
    display: none;
  }

  .cases-stats {
    flex-direction: column;
    gap: var(--space-21);
    padding: var(--space-21);
  }

  .stat-divider {
    width: 55px;
    height: 1px;
  }
}

/* ============================================
   SCHEDULER / CALENDAR SECTION
   ============================================ */
.scheduler-subtitle {
  color: var(--ink-89);
  max-width: 500px;
  margin: var(--space-13) auto 0;
  font-size: 16px;
}

.scheduler-terminal {
  max-width: 800px;
  margin: 0 auto;
  background: var(--ink-13);
  border: 1px solid var(--ink-21);
  overflow: hidden;
  position: relative;
}

.scheduler-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
  opacity: 0.5;
}

.scheduler-body {
  padding: var(--space-34);
}

.scheduler-step {
  display: flex;
  gap: var(--space-34);
}

.scheduler-step-hidden {
  display: none;
}

/* Calendar */
.scheduler-calendar {
  flex: 1;
  min-width: 280px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-21);
}

.calendar-month {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
}

.calendar-nav {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  color: var(--paper);
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
}

.calendar-nav:hover {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.calendar-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: var(--space-8);
}

.calendar-weekdays span {
  text-align: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-8) 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--paper);
  background: var(--ink-21);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
}

.calendar-day:hover:not(.disabled):not(.other-month) {
  border-color: var(--phosphor);
  background: var(--ink-13);
}

.calendar-day.selected {
  background: var(--phosphor);
  color: var(--ink);
  font-weight: 600;
}

.calendar-day.today {
  border-color: var(--ink-55);
}

.calendar-day.disabled,
.calendar-day.other-month {
  color: var(--ink-34);
  background: var(--ink);
  cursor: not-allowed;
}

.calendar-day.other-month {
  opacity: 0.3;
}

/* Time Slots */
.scheduler-times {
  flex: 1;
  min-width: 200px;
  max-width: 250px;
}

.times-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-21);
}

.times-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.times-date {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--phosphor);
}

.times-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  max-height: 280px;
  overflow-y: auto;
}

.times-placeholder {
  color: var(--ink-55);
  font-family: var(--font-display);
  font-size: 13px;
  text-align: center;
  padding: var(--space-34) var(--space-21);
  border: 1px dashed var(--ink-34);
}

.time-slot {
  padding: var(--space-13) var(--space-21);
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
}

.time-slot:hover {
  border-color: var(--phosphor);
  background: var(--ink-13);
}

.time-slot.selected {
  background: var(--phosphor);
  border-color: var(--phosphor);
  color: var(--ink);
  font-weight: 600;
}

.time-slot.unavailable {
  opacity: 0.3;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Scheduler Progress */
.scheduler-progress {
  padding: var(--space-21) var(--space-34);
  background: var(--ink-21);
  border-top: 1px solid var(--ink-34);
}

.scheduler-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.sched-step {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  opacity: 0.4;
  transition: all var(--duration-base) var(--ease-apple);
}

.sched-step.active {
  opacity: 1;
}

.sched-step.completed {
  opacity: 1;
}

.sched-step.completed .sched-step-num {
  background: var(--signal-positive);
  border-color: var(--signal-positive);
  color: var(--ink);
}

.sched-step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink-55);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-55);
  transition: all var(--duration-base) var(--ease-apple);
}

.sched-step.active .sched-step-num {
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.sched-step-label {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-55);
}

.sched-step.active .sched-step-label {
  color: var(--paper);
}

.sched-line {
  width: 34px;
  height: 2px;
  background: var(--ink-34);
}

/* Confirmation Step */
.scheduler-confirm {
  max-width: 500px;
  margin: 0 auto;
}

.confirm-summary {
  display: flex;
  align-items: center;
  gap: var(--space-21);
  padding: var(--space-21);
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  margin-bottom: var(--space-34);
}

.confirm-icon {
  flex-shrink: 0;
}

.confirm-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.confirm-label {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.confirm-datetime {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
}

.confirm-duration {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--phosphor);
}

.confirm-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-21);
  margin-bottom: var(--space-34);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.form-group label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.form-input {
  padding: var(--space-13) var(--space-21);
  background: var(--ink);
  border: 1px solid var(--ink-34);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 14px;
  outline: none;
  transition: border-color var(--duration-base) var(--ease-apple);
}

.form-input:focus {
  border-color: var(--phosphor);
}

.form-input::placeholder {
  color: var(--ink-55);
}

.form-textarea {
  resize: none;
  min-height: 80px;
}

.confirm-actions {
  display: flex;
  gap: var(--space-13);
  justify-content: flex-end;
}

.btn-back {
  padding: var(--space-13) var(--space-21);
  background: transparent;
  border: 1px solid var(--ink-34);
  color: var(--ink-55);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-apple);
}

.btn-back:hover {
  border-color: var(--paper);
  color: var(--paper);
}

/* Success Step */
.scheduler-success {
  text-align: center;
  padding: var(--space-55) var(--space-21);
}

.success-icon {
  margin-bottom: var(--space-21);
}

.scheduler-success h3 {
  font-size: 28px;
  color: var(--paper);
  margin-bottom: var(--space-13);
}

.success-datetime {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--phosphor);
  margin-bottom: var(--space-21);
  max-width: none;
}

.success-message {
  color: var(--ink-55);
  margin-bottom: var(--space-34);
  max-width: none;
}

.success-actions {
  display: flex;
  justify-content: center;
}

/* Scheduler Info */
.scheduler-info {
  display: flex;
  justify-content: center;
  gap: var(--space-34);
  margin-top: var(--space-55);
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink-55);
}

/* Alternative Contact */
.scheduler-alt {
  text-align: center;
  margin-top: var(--space-55);
  padding-top: var(--space-34);
  border-top: 1px solid var(--ink-21);
}

.scheduler-alt p {
  color: var(--ink-55);
  font-size: 14px;
  margin-bottom: var(--space-13);
  max-width: none;
}

.alt-email {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--paper);
  transition: color var(--duration-base) var(--ease-apple);
}

.alt-email:hover {
  color: var(--phosphor);
}

/* Scheduler Success State */
.scheduler-terminal.success {
  border-color: var(--signal-positive);
}

.scheduler-terminal.success::before {
  background: linear-gradient(90deg, transparent, var(--signal-positive), transparent);
}

/* Responsive Scheduler */
@media (max-width: 700px) {
  .scheduler-step {
    flex-direction: column;
  }

  .scheduler-times {
    max-width: none;
  }

  .times-grid {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
  }

  .time-slot {
    flex: 1;
    min-width: 80px;
  }

  .confirm-summary {
    flex-direction: column;
    text-align: center;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .sched-step-label {
    display: none;
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus States - WCAG 2.1 Compliant (3px outline) */
:focus-visible {
  outline: 3px solid var(--phosphor);
  outline-offset: 3px;
}

.btn:focus-visible,
.terminal-btn:focus-visible {
  outline: 3px solid var(--phosphor);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(198, 255, 61, 0.2);
}

.calendar-day:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--phosphor);
}

.time-slot:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--phosphor);
}

.terminal-option:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--phosphor);
}

.nav-link:focus-visible {
  outline: 3px solid var(--phosphor);
  outline-offset: 3px;
  border-radius: 2px;
}

.cases-dot:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 2px;
}

/* Touch Targets - 44px Minimum */
.calendar-day {
  min-width: 44px;
  min-height: 44px;
}

.time-slot {
  min-height: 44px;
  padding: var(--space-13) var(--space-21);
}

.terminal-option {
  min-height: 44px;
  padding: var(--space-13) var(--space-21);
}

.lang-toggle {
  min-height: 44px;
  padding: var(--space-13) var(--space-21);
}

.cases-nav {
  min-width: 44px;
  min-height: 44px;
}

.cases-dot {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.cases-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--ink-34);
  transition: all var(--duration-base) var(--ease-apple);
}

.cases-dot:hover::before {
  background: var(--ink-55);
}

.cases-dot.active::before {
  background: var(--phosphor);
  width: 24px;
}

/* Button Active States */
.btn:active {
  transform: translateY(1px);
  transition-duration: 50ms;
}

.btn-primary:active {
  background: #b3e635;
}

.btn-secondary:active {
  background: var(--ink-21);
}

.terminal-btn:active {
  transform: translateY(0);
  transition-duration: 50ms;
}

.calendar-nav:active {
  transform: scale(0.95);
  transition-duration: 50ms;
}

.cases-nav:active {
  transform: translateY(-50%) scale(0.95);
  transition-duration: 50ms;
}

.time-slot:active:not(.unavailable) {
  transform: scale(0.98);
  transition-duration: 50ms;
}

.terminal-option:active {
  transform: scale(0.98);
  transition-duration: 50ms;
}

/* Form Error States */
.form-input.error {
  border-color: var(--signal-critical);
  animation: shake 0.4s ease;
}

.form-input.error:focus {
  border-color: var(--signal-critical);
  box-shadow: 0 0 0 3px rgba(232, 65, 46, 0.2);
}

.form-error-message {
  color: var(--signal-critical);
  font-family: var(--font-display);
  font-size: 11px;
  margin-top: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.form-error-message::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: var(--signal-critical);
  color: var(--paper);
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Form Success States */
.form-input.success {
  border-color: var(--signal-positive);
}

/* Loading States */
.btn.loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.terminal-btn.loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}

.terminal-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: var(--phosphor);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success Animation */
.success-celebration {
  position: relative;
}

.success-celebration .success-icon svg {
  animation: successBounce 0.6s var(--ease-out-expo);
}

@keyframes successBounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Scroll Indicator Auto-hide */
.hero-scroll.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-apple);
}

/* Active Nav Link (Scroll Spy) */
.nav-link.active {
  color: var(--paper);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--phosphor);
}

.nav-link {
  position: relative;
}

/* Hero Logo Hover */
.hero-logo-svg {
  transition: transform var(--duration-base) var(--ease-apple);
}

.hero-logo:hover .hero-logo-svg {
  transform: scale(1.03);
}

/* Character Counter */
.char-counter {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--ink-55);
  text-align: right;
  margin-top: var(--space-3);
  transition: color var(--duration-base) var(--ease-apple);
}

.char-counter.valid {
  color: var(--signal-positive);
}

.char-counter.warning {
  color: var(--signal-warning);
}

/* ============================================
   PREMIUM POLISH - 10/10 ENHANCEMENTS
   ============================================ */

/* Team Card Avatar Hover */
.team-card:hover .team-avatar {
  transform: scale(1.05);
  border-color: var(--phosphor);
}

.team-avatar {
  transition: all var(--duration-base) var(--ease-apple);
  border: 2px solid transparent;
}

/* Code Syntax Glow Animation */
.code-card.animate .code-keyword {
  animation: syntaxGlow 2s ease-in-out;
}

.code-card.animate .code-function {
  animation: syntaxGlow 2s ease-in-out 0.3s;
}

.code-card.animate .code-type {
  animation: syntaxGlow 2s ease-in-out 0.6s;
}

@keyframes syntaxGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Principle Cards Staggered Hover */
.principles-grid:hover .principle-card {
  opacity: 0.7;
  transition: all var(--duration-base) var(--ease-apple);
}

.principles-grid:hover .principle-card:hover {
  opacity: 1;
  transform: translateY(-5px);
}

.principle-card {
  transition: all var(--duration-base) var(--ease-apple);
}

/* Section Transition Gradients */
.section-light + .section-dark::before,
.section-dark + .section-light::before {
  content: '';
  position: absolute;
  top: -55px;
  left: 0;
  right: 0;
  height: 55px;
  pointer-events: none;
}

.section-light + .section-dark::before {
  background: linear-gradient(to bottom, var(--paper), var(--ink));
}

.section-dark + .section-light::before {
  background: linear-gradient(to bottom, var(--ink), var(--paper));
}

/* Process Timeline Mobile Center */
@media (max-width: 768px) {
  .process-timeline {
    padding-left: 0;
  }

  .process-line {
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
  }

  .process-step {
    flex-direction: column;
    text-align: center;
    padding-left: 0;
    z-index: 1;
  }

  .process-number {
    margin: 0 auto var(--space-21);
    position: relative;
    z-index: 2;
    background: var(--ink);
  }

  .process-content {
    max-width: 100%;
    position: relative;
    z-index: 2;
    background: var(--paper);
    padding: var(--space-13);
  }
}

/* 480px Breakpoint Enhancements */
@media (max-width: 480px) {
  h1 {
    font-size: clamp(24px, 10vw, 34px);
  }

  h2 {
    font-size: clamp(21px, 6vw, 28px);
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-cta {
    width: 100%;
    padding: 0 var(--space-21);
  }

  .value-item {
    padding: var(--space-13);
  }

  .team-card {
    padding: var(--space-21);
  }

  .principle-card {
    padding: var(--space-21);
  }

  .case-result-value {
    font-size: 28px;
  }

  .stat-value {
    font-size: 28px;
  }

  .calendar-day {
    font-size: 11px;
  }

  .manifesto-line {
    font-size: clamp(18px, 5vw, 24px);
  }
}

/* Typing Indicator Alignment Fix */
.terminal-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 1em;
  vertical-align: middle;
}

.terminal-typing span {
  width: 6px;
  height: 6px;
  background: var(--phosphor);
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}

.terminal-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.terminal-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Confetti Animation */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confettiFall 3s ease-out forwards;
}

.confetti:nth-child(odd) {
  background: var(--phosphor);
}

.confetti:nth-child(even) {
  background: var(--signal-positive);
}

.confetti:nth-child(3n) {
  background: var(--signal-info);
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}

/* Mobile Menu Focus Trap Visual */
.mobile-menu.active {
  outline: none;
}

.mobile-menu.active .mobile-link:focus-visible {
  outline: 3px solid var(--phosphor);
  outline-offset: 3px;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-21);
  padding: var(--space-13) var(--space-21);
  background: var(--phosphor);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  z-index: 10000;
  transition: top var(--duration-base) var(--ease-apple);
}

.skip-link:focus {
  top: var(--space-13);
}

/* Language Toggle Keyboard Hint */
.lang-toggle[data-shortcut]::after {
  content: attr(data-shortcut);
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--ink-55);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-apple);
  pointer-events: none;
}

.lang-toggle:hover::after,
.lang-toggle:focus::after {
  opacity: 1;
}

/* Value Icon Pulse on Scroll */
.value-item.visible .value-icon svg {
  animation: iconPulse 0.6s var(--ease-out-expo);
}

@keyframes iconPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* CTA Glow Enhancement */
.btn-primary {
  position: relative;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--phosphor);
  filter: blur(8px);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--duration-base) var(--ease-apple);
}

.btn-primary:hover::before {
  opacity: 0.4;
}

/* Mobile Link Stagger Animation */
.mobile-menu.active .mobile-link {
  animation: mobileSlideIn 0.3s var(--ease-out-expo) backwards;
}

.mobile-menu.active .mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.active .mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes mobileSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Reduced Motion - Respect User Preferences */
@media (prefers-reduced-motion: reduce) {
  .confetti,
  .mobile-menu.active .mobile-link,
  .code-card.animate .code-keyword,
  .value-item.visible .value-icon svg {
    animation: none;
  }

  .btn-primary::before {
    display: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --ink-55: #8899AA;
    --ink-89: #CCDDEE;
  }

  .btn-primary {
    border: 2px solid var(--ink);
  }

  .nav-link.active::after {
    height: 3px;
  }
}

/* Print Styles */
@media print {
  .nav,
  .mobile-menu,
  .hero-scroll,
  .agent-terminal,
  .scheduler-terminal,
  .cases-nav,
  .cases-dots,
  .btn {
    display: none !important;
  }

  .section {
    page-break-inside: avoid;
  }

  body {
    color: #000;
    background: #fff;
  }
}

/* ============================================
   ACCESSIBILITY UTILITIES
   ============================================ */

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Syntax Glow Animation Class */
.syntax-glow {
  animation: syntaxGlow 2s ease-in-out;
}

/* Character Counter Dark Theme */
.agent-terminal .char-counter,
.scheduler-terminal .char-counter {
  color: var(--ink-55);
}

.agent-terminal .char-counter.warning,
.scheduler-terminal .char-counter.warning {
  color: var(--signal-warning);
}

/* Focus visible enhancement for forms */
.scheduler-input:focus-visible,
.scheduler-textarea:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 2px;
  border-color: var(--phosphor);
}

/* Enhanced Hover States */
.team-card:focus-within {
  outline: 2px solid var(--phosphor);
  outline-offset: 4px;
}

.case-card:focus-within {
  outline: 2px solid var(--phosphor);
  outline-offset: 4px;
}

/* Language Toggle Accessible Hover */
.lang-toggle {
  position: relative;
}

/* Terminal Input Focus */
.terminal-input:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--phosphor);
}

/* ============================================
   BROWSER COMPATIBILITY FIXES
   ============================================ */

/* Safari flexbox gap fallback (Safari < 14.1) */
@supports not (gap: 1px) {
  .nav-links > * + * { margin-left: var(--space-34); }
  .nav-logo > * + * { margin-left: var(--space-13); }
  .hero-cta > * + * { margin-left: var(--space-21); }
  .footer-links > * + * { margin-left: var(--space-21); }
  .lang-toggle > * + * { margin-left: var(--space-5); }
  .team-grid > * { margin-bottom: var(--space-21); }
  .principles-grid > * { margin-bottom: var(--space-21); }
  .value-grid > * { margin-bottom: var(--space-21); }
  .process-timeline > * { margin-bottom: var(--space-34); }
  .terminal-options > * + * { margin-left: var(--space-8); }
  .times-grid > * { margin: var(--space-5); }
  .calendar-days > * { margin: 2px; }
}

/* ============================================
   APPLE-QUALITY REVEAL ANIMATIONS
   ============================================ */

/* Base reveal state */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity var(--duration-medium) var(--ease-entrance),
    transform var(--duration-medium) var(--ease-entrance);
}

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

/* Hero On-Load Animations */
.js-loaded .hero-logo {
  animation: heroLogoReveal 0.8s var(--ease-emphasis) forwards;
}

.js-loaded .hero-title {
  animation: heroTextReveal 0.6s var(--ease-entrance) 0.2s forwards;
  opacity: 0;
}

.js-loaded .hero-subtitle {
  animation: heroTextReveal 0.6s var(--ease-entrance) 0.35s forwards;
  opacity: 0;
}

.js-loaded .hero-cta {
  animation: heroTextReveal 0.6s var(--ease-entrance) 0.5s forwards;
  opacity: 0;
}

/* Apple-Quality Keyframes */
@keyframes heroLogoReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes heroTextReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleReveal {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeBlurIn {
  0% {
    opacity: 0;
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

/* Cursor blink animation */
@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Webkit transform prefixes for older Safari */
@supports (-webkit-transform: translateY(0)) {
  .nav.hidden {
    -webkit-transform: translateY(-100%);
  }
  .reveal {
    -webkit-transform: translateY(34px);
  }
  .reveal.visible {
    -webkit-transform: translateY(0);
  }
}

/* IE11 fallback for CSS custom properties (graceful degradation) */
@supports not (--test: 0) {
  body {
    font-family: 'Geist Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
    background: #F5F2EC;
    color: #0A0E14;
  }
  .nav {
    background: rgba(10, 14, 20, 0.95);
  }
  .btn-primary {
    background: #C6FF3D;
    color: #0A0E14;
  }
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-34) transparent;
}

/* Webkit scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--ink-34);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-55);
}

/* Mobile Safari touch fix */
@supports (-webkit-touch-callout: none) {
  .btn, button, a {
    -webkit-tap-highlight-color: transparent;
  }

  /* Fix iOS Safari 100vh issue */
  .hero {
    min-height: -webkit-fill-available;
  }

  /* Prevent text size adjust on rotation */
  body {
    -webkit-text-size-adjust: 100%;
  }
}

/* Safari smooth scroll fix */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
}

/* Safari flexbox sizing fix */
.nav-container,
.hero-content,
.section-header,
.footer-content {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* Safari animation performance */
.reveal,
.btn,
.nav,
.team-card,
.case-card,
.principle-card {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Edge smooth scroll fix */
@supports (-ms-ime-align: auto) {
  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   AI DISCOVERY AGENT - FULLSCREEN MODAL
   Fibonacci-Compliant | Split-View Layout
   ============================================ */

/* Modal Overlay */
.agent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-entrance),
              visibility var(--duration-base) var(--ease-entrance);
}

.agent-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.agent-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 95vw;
  max-width: 1400px;
  height: 90vh;
  max-height: 900px;
  background: var(--ink);
  border: 1px solid var(--ink-21);
  border-radius: var(--space-13);
  box-shadow: 0 var(--space-34) var(--space-89) rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-medium) var(--ease-spring);
  z-index: 10000;
  overflow: hidden;
}

.agent-modal-overlay.active .agent-modal {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Modal Header */
.agent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-13) var(--space-21);
  border-bottom: 1px solid var(--ink-21);
  background: var(--ink-13);
}

.agent-modal-title {
  display: flex;
  align-items: center;
  gap: var(--space-13);
}

.agent-modal-title .dots {
  display: flex;
  gap: var(--space-5);
}

.agent-modal-title .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-34);
}

.agent-modal-title .dot:first-child { background: var(--signal-critical); }
.agent-modal-title .dot:nth-child(2) { background: var(--signal-warning); }
.agent-modal-title .dot:last-child { background: var(--signal-positive); }

.agent-modal-title h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--paper);
  letter-spacing: 0.02em;
}

.agent-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--ink-34);
  border-radius: var(--space-5);
  color: var(--ink-55);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
}

.agent-close-btn:hover {
  background: var(--ink-21);
  border-color: var(--ink-55);
  color: var(--paper);
}

.agent-close-btn svg {
  width: 18px;
  height: 18px;
}

/* Split View Container */
.agent-split-view {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Messages Panel (Left - 60%) */
.agent-messages-panel {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--ink-21);
}

.agent-messages-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-21);
  display: flex;
  flex-direction: column;
  gap: var(--space-13);
}

/* Message Bubbles */
.agent-message {
  max-width: 85%;
  animation: messageSlideIn var(--duration-base) var(--ease-spring);
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.agent-message.user {
  align-self: flex-end;
}

.agent-message.assistant {
  align-self: flex-start;
}

.agent-message-content {
  padding: var(--space-13) var(--space-21);
  border-radius: var(--space-13);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.agent-message.user .agent-message-content {
  background: var(--phosphor);
  color: var(--ink);
  border-bottom-right-radius: var(--space-3);
}

.agent-message.assistant .agent-message-content {
  background: var(--ink-21);
  color: var(--paper);
  border-bottom-left-radius: var(--space-3);
}

/* File Attachment Preview */
.agent-file-preview {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) var(--space-13);
  background: var(--ink-13);
  border: 1px solid var(--ink-34);
  border-radius: var(--space-8);
  margin-top: var(--space-8);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
}

.agent-file-preview:hover {
  background: var(--ink-21);
  border-color: var(--phosphor);
}

.agent-file-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-21);
  border-radius: var(--space-5);
  font-size: 16px;
}

.agent-file-info {
  flex: 1;
  min-width: 0;
}

.agent-file-name {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-file-meta {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--ink-55);
}

.agent-file-status {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-file-status.success { color: var(--signal-positive); }
.agent-file-status.error { color: var(--signal-critical); }
.agent-file-status.loading {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Input Area */
.agent-input-area {
  padding: var(--space-13) var(--space-21);
  border-top: 1px solid var(--ink-21);
  background: var(--ink-13);
}

.agent-input-container {
  display: flex;
  align-items: flex-end;
  gap: var(--space-8);
  background: var(--ink);
  border: 1px solid var(--ink-34);
  border-radius: var(--space-13);
  padding: var(--space-8);
  transition: border-color var(--duration-fast) var(--ease-apple);
}

.agent-input-container:focus-within {
  border-color: var(--phosphor);
}

.agent-attachment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: none;
  color: var(--ink-55);
  cursor: pointer;
  border-radius: var(--space-5);
  transition: all var(--duration-fast) var(--ease-apple);
}

.agent-attachment-btn:hover {
  background: var(--ink-21);
  color: var(--phosphor);
}

.agent-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--paper);
  resize: none;
  min-height: 34px;
  max-height: 120px;
  line-height: 1.5;
}

.agent-text-input::placeholder {
  color: var(--ink-55);
}

.agent-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--phosphor);
  border: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--space-5);
  transition: all var(--duration-fast) var(--ease-apple);
}

.agent-send-btn:hover {
  transform: scale(1.05);
}

.agent-send-btn:disabled {
  background: var(--ink-34);
  color: var(--ink-55);
  cursor: not-allowed;
  transform: none;
}

/* Pending Files Area */
.agent-pending-files {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  padding: var(--space-8) 0;
}

.agent-pending-file {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-8);
  background: var(--ink-21);
  border-radius: var(--space-5);
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--paper);
}

.agent-pending-file-remove {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink-55);
  cursor: pointer;
  border-radius: 50%;
}

.agent-pending-file-remove:hover {
  background: var(--signal-critical);
  color: var(--paper);
}

/* Context Panel (Right - 40%) */
.agent-context-panel {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  background: var(--ink-13);
  overflow: hidden;
}

.agent-context-section {
  padding: var(--space-21);
  border-bottom: 1px solid var(--ink-21);
}

.agent-context-section:last-child {
  border-bottom: none;
  flex: 1;
  overflow-y: auto;
}

.agent-context-title {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-13);
}

/* Scoring Visualization */
.agent-score-card {
  background: var(--ink);
  border: 1px solid var(--ink-21);
  border-radius: var(--space-8);
  padding: var(--space-13);
}

.agent-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-13);
}

.agent-score-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--paper);
}

.agent-score-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--space-3);
  text-transform: uppercase;
}

.agent-score-label.hot {
  background: rgba(232, 65, 46, 0.2);
  color: var(--signal-critical);
}

.agent-score-label.warm {
  background: rgba(255, 171, 11, 0.2);
  color: var(--signal-warning);
}

.agent-score-label.cold {
  background: rgba(75, 138, 230, 0.2);
  color: var(--signal-info);
}

.agent-score-label.unknown {
  background: var(--ink-21);
  color: var(--ink-55);
}

.agent-score-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.agent-score-bar {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.agent-score-bar-label {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-55);
  width: 80px;
  flex-shrink: 0;
}

.agent-score-bar-track {
  flex: 1;
  height: 6px;
  background: var(--ink-21);
  border-radius: 3px;
  overflow: hidden;
}

.agent-score-bar-fill {
  height: 100%;
  background: var(--phosphor);
  border-radius: 3px;
  transition: width var(--duration-medium) var(--ease-out-expo);
}

.agent-score-bar-value {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--paper);
  width: 24px;
  text-align: right;
}

/* Diagram Container */
.agent-diagram-container {
  background: var(--ink);
  border: 1px solid var(--ink-21);
  border-radius: var(--space-8);
  overflow: hidden;
}

.agent-diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-8) var(--space-13);
  border-bottom: 1px solid var(--ink-21);
  background: var(--ink-13);
}

.agent-diagram-title {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--paper);
}

.agent-diagram-actions {
  display: flex;
  gap: var(--space-5);
}

.agent-diagram-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid var(--ink-34);
  border-radius: var(--space-3);
  color: var(--ink-55);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
}

.agent-diagram-action:hover {
  background: var(--ink-21);
  border-color: var(--phosphor);
  color: var(--phosphor);
}

.agent-diagram-body {
  padding: var(--space-21);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.agent-diagram-body svg {
  max-width: 100%;
  height: auto;
}

/* Mermaid diagram theme overrides */
.agent-diagram-body .mermaid {
  width: 100%;
}

.agent-diagram-body .mermaid text {
  fill: var(--paper) !important;
}

.agent-diagram-body .mermaid .node rect,
.agent-diagram-body .mermaid .node polygon {
  fill: var(--ink-21) !important;
  stroke: var(--phosphor) !important;
}

.agent-diagram-body .mermaid .edgePath path {
  stroke: var(--ink-55) !important;
}

.agent-diagram-body .mermaid .arrowheadPath {
  fill: var(--ink-55) !important;
}

/* Progress Steps */
.agent-progress {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-21);
  background: var(--ink);
  border-top: 1px solid var(--ink-21);
}

.agent-progress-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--ink-55);
  white-space: nowrap;
}

.agent-progress-step.completed {
  color: var(--signal-positive);
}

.agent-progress-step.active {
  color: var(--phosphor);
}

.agent-progress-step-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 8px;
}

.agent-progress-step.completed .agent-progress-step-icon {
  background: var(--signal-positive);
  color: var(--ink);
}

.agent-progress-step.active .agent-progress-step-icon {
  background: var(--phosphor);
  color: var(--ink);
}

.agent-progress-step:not(.completed):not(.active) .agent-progress-step-icon {
  background: var(--ink-34);
}

.agent-progress-connector {
  flex: 1;
  height: 2px;
  background: var(--ink-34);
  max-width: 30px;
}

.agent-progress-connector.completed {
  background: var(--signal-positive);
}

.agent-progress-percent {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-55);
}

/* Options Buttons */
.agent-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-13);
}

.agent-option-btn {
  padding: var(--space-8) var(--space-13);
  background: transparent;
  border: 1px solid var(--ink-34);
  border-radius: var(--space-5);
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--paper);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
}

.agent-option-btn:hover {
  background: var(--ink-21);
  border-color: var(--phosphor);
  color: var(--phosphor);
}

/* Typing Indicator */
.agent-typing {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-13) var(--space-21);
}

.agent-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-55);
  animation: typingPulse 1.4s infinite ease-in-out;
}

.agent-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.agent-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
  0%, 60%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  30% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Empty State */
.agent-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--ink-55);
  text-align: center;
  padding: var(--space-34);
}

.agent-empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-13);
  opacity: 0.5;
}

.agent-empty-state-text {
  font-family: var(--font-display);
  font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .agent-modal {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .agent-split-view {
    flex-direction: column;
  }

  .agent-messages-panel {
    flex: 1;
    border-right: none;
    border-bottom: 1px solid var(--ink-21);
  }

  .agent-context-panel {
    flex: 0 0 auto;
    max-height: 40vh;
  }

  .agent-progress {
    overflow-x: auto;
  }

  .agent-progress-step span {
    display: none;
  }
}

/* Inline Terminal Expand Button */
.agent-expand-btn {
  position: absolute;
  top: var(--space-8);
  right: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--ink-21);
  border: 1px solid var(--ink-34);
  border-radius: var(--space-3);
  color: var(--ink-55);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
  z-index: 10;
}

.agent-expand-btn:hover {
  background: var(--ink-34);
  border-color: var(--phosphor);
  color: var(--phosphor);
}

/* Success Animation */
@keyframes successPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(198, 255, 61, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(198, 255, 61, 0);
  }
}

.agent-success {
  animation: successPulse 1s ease-out 3;
}

/* Inline Preview Expand */
.agent-file-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-base) var(--ease-apple);
}

.agent-file-preview.expanded .agent-file-expand {
  max-height: 300px;
  padding-top: var(--space-8);
  border-top: 1px solid var(--ink-34);
  margin-top: var(--space-8);
}

.agent-file-expand-content {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-89);
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 280px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  border-top: 1px solid var(--ink-21);
  padding: var(--space-55) 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-34);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-13);
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0.15em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-21) var(--space-34);
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-55);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-apple);
}

.footer-links a:hover {
  color: var(--phosphor);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-13) var(--space-21);
  padding-top: var(--space-21);
  border-top: 1px solid var(--ink-21);
}

.footer-legal a {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink-55);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-apple);
}

.footer-legal a:hover {
  color: var(--phosphor);
}

.footer-meta {
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
  color: var(--ink-55);
  margin-bottom: var(--space-8);
}

.footer-copyright {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink-34);
}

/* Footer Responsive */
@media (max-width: 768px) {
  .footer {
    padding: var(--space-34) 0;
  }

  .footer-content {
    gap: var(--space-21);
  }

  .footer-links,
  .footer-legal {
    flex-direction: column;
    align-items: center;
    gap: var(--space-13);
  }
}
