/* ========================================
   SOVA BTC — Design System & Global Styles
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #06080f;
  --bg-secondary: #0d1117;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --bg-glass: rgba(17, 24, 39, 0.7);
  --bg-glass-light: rgba(255, 255, 255, 0.03);

  --accent-cyan: #00e5ff;
  --accent-cyan-dim: rgba(0, 229, 255, 0.15);
  --accent-gold: #f5a623;
  --accent-gold-dim: rgba(245, 166, 35, 0.15);
  --accent-green: #22c55e;
  --accent-green-dim: rgba(34, 197, 94, 0.15);
  --accent-red: #ef4444;
  --accent-red-dim: rgba(239, 68, 68, 0.15);
  --accent-purple: #a78bfa;
  --accent-purple-dim: rgba(167, 139, 250, 0.15);

  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: var(--accent-cyan);

  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 229, 255, 0.2);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Typography */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.5rem;
  --fs-5xl: 3.5rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-cyan: 0 0 20px rgba(0, 229, 255, 0.15);
  --shadow-glow-gold: 0 0 20px rgba(245, 166, 35, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 250ms ease-out;
  --transition-slow: 400ms ease-out;

  --header-height: 72px;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: #66f0ff;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section-title {
  font-size: var(--fs-3xl);
  text-align: center;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--cyan {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
}
.badge--gold {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
}
.badge--green {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}
.badge--red {
  background: var(--accent-red-dim);
  color: var(--accent-red);
}

.highlight-section {
  transition: box-shadow var(--transition-slow);
}
.highlight-section.highlighted {
  box-shadow:
    inset 0 0 0 2px var(--accent-cyan),
    var(--shadow-glow-cyan);
  border-radius: var(--radius-lg);
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-gold));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--bg-primary);
}

.logo-text {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.logo-tag {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 400;
}

.nav-desktop {
  display: flex;
  gap: var(--space-xs);
}

.nav-desktop a {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text-primary);
  background: var(--bg-glass-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 8, 15, 0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  z-index: 999;
}

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

.nav-mobile a {
  font-size: var(--fs-2xl);
  color: var(--text-secondary);
  font-weight: 600;
}

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

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      ellipse at 30% 20%,
      rgba(0, 229, 255, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 70% 80%,
      rgba(245, 166, 35, 0.04) 0%,
      transparent 50%
    );
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.05) rotate(2deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: var(--fs-5xl);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: var(--fs-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-3xl);
  line-height: 1.6;
}

.role-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.role-btn {
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.role-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.role-btn.active {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.role-btn .icon {
  font-size: var(--fs-xl);
}

/* Floating particles in hero */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-cyan);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-80px) translateX(30px);
    opacity: 0.6;
  }
}

/* --- Problem Section --- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.problem-card,
.solution-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--border-color);
}

.problem-card {
  border-top: 3px solid var(--accent-red);
}
.solution-card {
  border-top: 3px solid var(--accent-green);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-xl);
  font-weight: 700;
}

.steps-list {
  list-style: none;
  counter-reset: steps;
}

.steps-list li {
  counter-increment: steps;
  padding: var(--space-sm) 0;
  padding-left: var(--space-xl);
  position: relative;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  border-left: 2px solid var(--border-color);
  margin-left: var(--space-sm);
}

.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: -12px;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-muted);
}

.problem-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--text-muted);
  padding-top: var(--space-3xl);
}

.pain-meter {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--bg-glass-light);
}

.pain-meter-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.pain-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  overflow: hidden;
}

.pain-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.pain-bar-fill.red {
  background: linear-gradient(90deg, var(--accent-red), #ff7b7b);
}
.pain-bar-fill.green {
  background: linear-gradient(90deg, var(--accent-green), #86efac);
}

.slider-control {
  margin-top: var(--space-xl);
  text-align: center;
}

.slider-control label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  display: block;
  margin-bottom: var(--space-sm);
}

.slider-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: var(--space-sm);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 400px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.stats-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

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

.stat-value {
  font-size: var(--fs-xl);
  font-weight: 700;
}

.stat-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* --- How It Works (Intent Model) --- */
.intent-timeline {
  display: flex;
  gap: 0;
  position: relative;
  justify-content: center;
  margin-top: var(--space-xl);
}

.intent-step {
  flex: 1;
  max-width: 260px;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
}

.intent-step::after {
  content: "";
  position: absolute;
  top: 52px;
  right: -20px;
  width: 40px;
  height: 2px;
  background: var(--border-color);
  transition: background var(--transition-base);
}

.intent-step:last-child::after {
  display: none;
}

.intent-step:hover .intent-icon,
.intent-step.active .intent-icon {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  transform: scale(1.1);
}

.intent-step:hover::after,
.intent-step.active::after {
  background: var(--accent-cyan);
}

.intent-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: var(--fs-2xl);
  transition: all var(--transition-base);
}

.intent-step h4 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.intent-step p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.intent-tooltip {
  display: none;
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.intent-step:hover .intent-tooltip,
.intent-step.active .intent-tooltip {
  display: block;
}

/* --- Three Blocks (Vaults, Swap, Solver) --- */
.three-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-block:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-cyan);
}

.feature-block:hover::before {
  opacity: 1;
}

.feature-block .block-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-md);
}

.feature-block h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-sm);
}

.feature-block p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-block ul {
  list-style: none;
  margin-top: var(--space-md);
}

.feature-block ul li {
  padding: var(--space-xs) 0;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.feature-block ul li::before {
  content: "→";
  color: var(--accent-cyan);
  font-weight: 700;
}

/* --- Calculator --- */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.calc-inputs {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.calc-results {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.input-group {
  margin-bottom: var(--space-lg);
}

.input-group label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.input-group input[type="number"] {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--fs-lg);
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-group input[type="number"]:focus {
  border-color: var(--accent-cyan);
}

.horizon-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.horizon-btn {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.horizon-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}
.horizon-btn.active {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.result-card {
  background: var(--bg-glass-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.result-card-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-card-value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.chart-container {
  margin-top: var(--space-lg);
  background: var(--bg-glass-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  position: relative;
}

.chart-container canvas {
  width: 100%;
  height: 200px;
}

.disclaimer-text {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--accent-gold-dim);
  border-left: 3px solid var(--accent-gold);
  font-size: var(--fs-sm);
  color: var(--accent-gold);
}

/* --- Swap Simulator --- */
.swap-container {
  max-width: 900px;
  margin: 0 auto;
}

.swap-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.swap-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: end;
  margin-bottom: var(--space-lg);
}

.swap-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  font-size: var(--fs-xl);
  margin-bottom: var(--space-sm);
}

.swap-select {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.swap-select:focus {
  border-color: var(--accent-cyan);
}

.btn-primary {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
  color: var(--bg-primary);
  font-size: var(--fs-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-body);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Swap Timeline */
.swap-timeline {
  display: none;
}

.swap-timeline.active {
  display: block;
}

.timeline-step {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  position: relative;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 40px;
  bottom: -8px;
  width: 2px;
  background: var(--border-color);
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--fs-sm);
  transition: all var(--transition-base);
}

.timeline-step.completed .timeline-dot {
  background: var(--accent-green-dim);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.timeline-step.processing .timeline-dot {
  border-color: var(--accent-cyan);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 229, 255, 0);
  }
}

.timeline-info h4 {
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline-info p {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.fee-breakdown {
  background: var(--bg-glass-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-lg);
}

.fee-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.fee-row.total {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
  font-weight: 700;
  color: var(--text-primary);
}

/* --- Solver Auction --- */
.auction-field {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.solver-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.solver-card.winner {
  border-color: var(--accent-green);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.2);
}

.solver-card.winner::after {
  content: "🏆 Переможець";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--accent-green);
  color: var(--bg-primary);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 4px;
  text-transform: uppercase;
}

.solver-card.loser {
  opacity: 0.5;
}

.solver-name {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.solver-rate {
  font-size: var(--fs-2xl);
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  margin-bottom: var(--space-sm);
}

.solver-details {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.auction-btn {
  display: block;
  margin: 0 auto;
  padding: var(--space-md) var(--space-2xl);
  border: 2px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--accent-cyan);
  font-size: var(--fs-base);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-body);
}

.auction-btn:hover {
  background: var(--accent-cyan-dim);
  box-shadow: var(--shadow-glow-cyan);
}

.auction-explanation {
  max-width: 700px;
  margin: var(--space-xl) auto 0;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Flip Cards (Security) --- */
.flip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.flip-card {
  perspective: 1000px;
  height: 220px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.flip-front {
  background: var(--bg-card);
  align-items: center;
  text-align: center;
}

.flip-front .flip-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.flip-front h4 {
  font-size: var(--fs-base);
  font-weight: 700;
}

.flip-front .flip-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

.flip-back {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  transform: rotateY(180deg);
  border-color: var(--accent-green);
}

.flip-back h4 {
  font-size: var(--fs-sm);
  color: var(--accent-green);
  margin-bottom: var(--space-sm);
}

.flip-back p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Compare Table --- */
.compare-toggle {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.toggle-btn {
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.toggle-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}
.toggle-btn.active {
  background: var(--accent-cyan-dim);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.compare-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.compare-table thead {
  background: var(--bg-secondary);
}

.compare-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.compare-table th:first-child {
  color: var(--text-muted);
}
.compare-table th.sova-col {
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.compare-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.compare-table td.sova-col {
  background: rgba(0, 229, 255, 0.03);
}

.compare-table tr:hover td {
  background: var(--bg-glass-light);
}

.compare-table tr.highlighted td {
  background: var(--accent-cyan-dim);
}

/* --- Roadmap --- */
.roadmap-timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.roadmap-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent-cyan),
    var(--accent-gold),
    var(--accent-purple)
  );
}

.roadmap-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  position: relative;
}

.roadmap-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--fs-lg);
  z-index: 1;
}

.roadmap-item:nth-child(2) .roadmap-dot {
  border-color: var(--accent-gold);
}
.roadmap-item:nth-child(3) .roadmap-dot {
  border-color: var(--accent-green);
}
.roadmap-item:nth-child(4) .roadmap-dot {
  border-color: var(--accent-purple);
}

.roadmap-content h4 {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.roadmap-content .roadmap-phase {
  font-size: var(--fs-xs);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.roadmap-content p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- CTA --- */
.cta-section {
  text-align: center;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 229, 255, 0.03),
    transparent
  );
}

.cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

.cta-btn {
  padding: var(--space-md) var(--space-2xl);
  border-radius: var(--radius-full);
  font-size: var(--fs-base);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--transition-base);
  text-decoration: none;
}

.cta-btn--primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
  color: var(--bg-primary);
}

.cta-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-cyan);
  color: var(--bg-primary);
}

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

.cta-btn--secondary:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  transition: color var(--transition-fast);
}

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

.footer-copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* --- Animations for scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
  .three-blocks {
    grid-template-columns: 1fr;
  }
  .calc-container {
    grid-template-columns: 1fr;
  }
  .problem-grid {
    grid-template-columns: 1fr;
  }
  .problem-vs {
    padding: var(--space-md) 0;
  }
  .intent-timeline {
    flex-wrap: wrap;
  }
  .intent-step {
    max-width: 100%;
    flex: 1 1 45%;
  }
  .intent-step::after {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    min-height: auto;
    padding: calc(var(--header-height) + 40px) 0 40px;
  }
  .role-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .swap-row {
    grid-template-columns: 1fr;
  }
  .swap-arrow {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .intent-step {
    flex: 1 1 100%;
  }
  .auction-field {
    grid-template-columns: 1fr 1fr;
  }
  .flip-grid {
    grid-template-columns: 1fr;
  }
  .flip-card {
    height: 200px;
  }

  .compare-table {
    font-size: var(--fs-xs);
  }
  .compare-table th,
  .compare-table td {
    padding: var(--space-sm);
  }

  .stats-row {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  .auction-field {
    grid-template-columns: 1fr;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --- Language Switcher --- */
.lang-switcher {
  position: fixed;
  top: 18px;
  right: var(--space-xl);
  z-index: 1001;
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.lang-btn.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
}
@media (max-width: 768px) {
  .lang-switcher {
    right: 60px;
  }
}
