:root {
  --bg-canvas: #3b0d1a;
  --bg-surface: rgba(232, 213, 168, 0.05);
  --bg-surface-hover: rgba(232, 213, 168, 0.12);
  --text-primary: #fdfbf7;
  --text-muted: #e8d5a8;
  --accent-primary: #e8d5a8;
  --accent-secondary: #c9b485;
  --border-subtle: rgba(232, 213, 168, 0.2);
  
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.4);
  --glow-accent: 0 0 24px -4px rgba(232, 213, 168, 0.3);
  --glass-backdrop: blur(12px) saturate(140%);
  --font-base: system-ui, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-base);
  line-height: 1.7;
  overflow-wrap: anywhere;
  hyphens: auto;
  background-image: radial-gradient(circle at 50% 10%, rgba(232, 213, 168, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

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

/* Header & Nav */
.site-header {
  position: static;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.brand-logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.desktop-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.desktop-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.desktop-nav a:hover {
  color: var(--accent-primary);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

/* Hero short band */
.hero-band {
  text-align: center;
  padding: 4rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-band h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.text-container {
  max-width: 72ch;
  margin: 0 auto;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Vertical Flow Journey Layout */
.journey-flow {
  position: relative;
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem 0;
}

.journey-flow::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2rem;
  width: 2px;
  background: var(--accent-primary);
  opacity: 0.3;
}

.journey-step {
  position: relative;
  padding-left: 5rem;
  margin-bottom: 4rem;
}

.step-number {
  position: absolute;
  left: 0.75rem;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-primary);
  color: var(--bg-canvas);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(232, 213, 168, 0.4);
}

/* Cards & UI Elements */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-subtle);
  border-radius: 0; /* Square per brief */
  padding: 2rem;
  transition: transform 0.4s var(--ease-kinetic), box-shadow 0.4s var(--ease-kinetic);
}

.glass-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
  background: var(--bg-surface-hover);
}

.glass-card img {
  border-radius: 0; /* Square per brief */
  width: 100%;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

/* Round badges/avatars per brief */
.avatar {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.pill-btn {
  display: inline-block;
  background: var(--accent-primary);
  color: var(--bg-canvas);
  padding: 0.75rem 2rem;
  border-radius: 999px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-kinetic);
  text-align: center;
}

.pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-accent);
  opacity: 1;
}

.pill-btn.secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

.pill-btn.secondary:hover {
  background: var(--bg-surface);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  border-radius: 0;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(232, 213, 168, 0.2);
}

/* Tool Panel */
#tool-output {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--accent-primary);
}

#tool-output pre {
  white-space: pre-wrap;
  font-family: monospace;
  color: var(--accent-primary);
}

.tool-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Timeline Layout (for Training) */
.timeline {
  position: relative;
  margin: 3rem 0;
}
.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background-color: var(--accent-primary);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}
.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}
.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background-color: var(--bg-canvas);
  border: 4px solid var(--accent-primary);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}
.left { left: 0; }
.right { left: 50%; }
.right::after { left: -8px; }

/* Table Wrapper */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  color: var(--accent-primary);
}

/* Reveals */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s var(--ease-kinetic);
}
.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  margin-top: 5rem;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.legal-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Media Queries */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .journey-flow::before {
    left: 1.25rem;
  }
  .journey-step {
    padding-left: 3.5rem;
  }
  .step-number {
    left: 0;
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  .timeline::after {
    left: 15px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 15px;
  }
  .timeline-item.right { left: 0; }
  .timeline-item::after { left: 7px; right: auto; }
  .right::after { left: 7px; }
}

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