:root {
  /* Dynamic Palette: Deep Violet & Gold (Strictly No Blue) */
  --bg-canvas: #2e1065; /* Base deep violet */
  --bg-surface: #4c1d95; /* Surface purple */
  --bg-surface-hover: #5b21b6; /* Lighter interactive purple */
  --text-primary: #f4f1ea; /* Warm off-white */
  --text-muted: #dcd8d0; /* Muted text */
  --accent-primary: #d4a84b; /* Warm gold accent */
  --accent-secondary: #fcd34d; /* Bright gold for hover states */
  --border-subtle: rgba(244, 241, 234, 0.15); /* Thin divisions */
  --error-color: #ef4444;

  /* UI Micro-Interactions */
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
  --glow-accent: 0 0 24px -4px var(--accent-primary);
  --glass-backdrop: blur(12px);
  --radius-subtle: 4px;
  --radius-pill: 9999px;
  
  /* Typography */
  --font-serif: Georgia, serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  lang: en;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: normal;
  margin-bottom: 1rem;
  line-height: 1.2;
}

p {
  margin-bottom: 1.5rem;
}

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

a:hover {
  color: var(--accent-secondary);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-subtle);
  object-fit: cover;
}

/* Layout Wrappers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-core {
  max-width: 72ch;
  margin: 0 auto;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
}

/* Header & Top Bar */
.top-bar {
  background-color: var(--bg-surface);
  padding: 8px 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.top-bar a {
  color: var(--text-muted);
}

.top-bar a:hover {
  color: var(--accent-primary);
}

.site-header {
  position: relative;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.brand:hover {
  color: var(--text-primary);
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 30px;
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

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

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 80px 20px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-elevation);
}

.hero-image-wrapper img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* Gradient Backgrounds */
.gradient-bg {
  position: relative;
  overflow: hidden;
}

.gradient-bg::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(212, 168, 75, 0.12) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
}

/* Main Sections */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: left;
}

/* List Rows (Replacing Traditional Cards) */
.list-row-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.list-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 30px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s var(--ease-kinetic);
}

.list-row:first-child {
  border-top: 1px solid var(--border-subtle);
}

.list-row:hover {
  background-color: rgba(76, 29, 149, 0.3);
}

.list-icon {
  font-size: 2rem;
  color: var(--accent-primary);
  flex-shrink: 0;
  line-height: 1;
  width: 48px;
  text-align: center;
}

.list-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.list-content p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Stat Strips */
.stat-strip {
  display: flex;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border-radius: var(--radius-subtle);
  padding: 30px;
  margin: 40px 0;
  box-shadow: var(--shadow-elevation);
}

.stat-item {
  text-align: center;
  flex: 1;
  border-right: 1px solid var(--border-subtle);
}

.stat-item:last-child {
  border-right: none;
}

.stat-value {
  display: block;
  font-size: 2.5rem;
  font-family: var(--font-serif);
  color: var(--accent-primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--bg-canvas);
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s var(--ease-kinetic);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
  background-color: var(--accent-secondary);
  color: var(--bg-canvas);
  transform: translateY(-2px);
  box-shadow: var(--glow-accent);
}

/* Accordion Component */
.accordion {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-subtle);
  overflow: hidden;
  background: var(--bg-surface);
  margin-bottom: 2rem;
}

.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}
.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  padding: 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s;
}

.accordion-header:hover {
  background-color: var(--bg-surface-hover);
}

.accordion-icon {
  font-size: 1.5rem;
  color: var(--accent-primary);
  transition: transform 0.3s var(--ease-kinetic);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-kinetic), padding 0.4s var(--ease-kinetic);
}

.accordion-item.active .accordion-body {
  padding: 20px;
  max-height: 1000px;
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

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

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.tool-output {
  background: var(--bg-canvas);
  padding: 20px;
  border-radius: var(--radius-subtle);
  border: 1px solid var(--border-subtle);
  white-space: pre-wrap;
  font-family: monospace;
  margin-bottom: 20px;
  color: var(--accent-primary);
}

.tool-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 60px 20px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-col h4 {
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-bottom a {
  color: var(--text-muted);
  margin: 0 10px;
}

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

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 60px 20px;
  }
  .hero-content p {
    margin: 0 auto 2rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-elevation);
    z-index: 50;
    border-top: 1px solid var(--border-subtle);
  }
  .main-nav.open {
    display: flex;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .stat-strip {
    flex-direction: column;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 20px 0;
  }
  .stat-item:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .top-bar {
    justify-content: center;
    text-align: center;
  }
  .list-row {
    flex-direction: column;
    gap: 10px;
  }
}

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