/* freedom.compare - Senatorial Vaporwave */
:root {
  --bg-deep: #120b14;
  --bg-surface: #2a1024;
  --bg-elevated: #3d1a35;
  --accent-rose: #b6618a;
  --accent-gold: #d4a853;
  --accent-amethyst: #7b5ea7;
  --accent-cyan: #5ec4c4;
  --accent-neon: #e84fa5;
  --text-primary: #e8dce2;
  --text-secondary: #9a8896;
  --text-muted: #6b5a66;
  --font-display: 'Poiret One', sans-serif;
  --font-body: 'Cormorant Garamond', serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-ui: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: #1a0e20; background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* CRT Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: crtFlicker 0.15s infinite alternate;
}

@keyframes crtFlicker {
  0% { opacity: 0.97; }
  100% { opacity: 1; }
}

/* Colonnade Columns */
.colonnade {
  position: fixed;
  top: 0;
  width: 80px;
  height: 100vh;
  z-index: 100;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.5s ease;
}

.colonnade-left {
  left: 0;
}

.colonnade-right {
  right: 0;
}

.column-svg {
  width: 100%;
  height: 100%;
}

/* Sections */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 6rem;
  overflow: hidden;
}

/* Marble Borders */
.marble-border {
  position: absolute;
  left: 80px;
  right: 80px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-gold) 20%,
    var(--accent-rose) 50%,
    var(--accent-gold) 80%,
    transparent
  );
  opacity: 0.4;
}

.marble-border-top {
  top: 0;
}

.marble-border-bottom {
  bottom: 0;
}

/* Hero Section */
.section-hero {
  background: radial-gradient(ellipse at center, var(--bg-surface) 0%, var(--bg-deep) 70%);
  z-index: 1;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-glitch-container {
  position: relative;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--text-primary);
  position: relative;
  text-shadow:
    0 0 20px rgba(232, 79, 165, 0.3),
    0 0 40px rgba(123, 94, 167, 0.2),
    0 0 80px rgba(212, 168, 83, 0.1);
}

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-title::before {
  color: var(--accent-cyan);
  z-index: -1;
  animation: glitch1 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.hero-title::after {
  color: var(--accent-neon);
  z-index: -2;
  animation: glitch2 3s infinite;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(3px, -2px); }
  94% { transform: translate(-3px, 2px); }
  96% { transform: translate(2px, 1px); }
  98% { transform: translate(-2px, -1px); }
}

@keyframes glitch2 {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(-3px, 2px); }
  92% { transform: translate(3px, -1px); }
  95% { transform: translate(-2px, 3px); }
  97% { transform: translate(2px, -2px); }
}

.hero-subtitle-line {
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  margin: 0.5rem auto;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  font-style: italic;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  font-weight: 300;
}

.hero-datum {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.datum-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

.datum-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-cyan);
  letter-spacing: 0.15em;
}

.scroll-indicator {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--accent-gold);
  opacity: 0.6;
}

.scroll-arrow {
  opacity: 0.6;
}

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

/* Section Headings */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(232, 79, 165, 0.2);
}

.section-description {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-style: italic;
  font-weight: 300;
}

.section-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* Archive Section */
.section-archive {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 50%, var(--bg-deep) 100%);
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.data-card {
  background: rgba(42, 16, 36, 0.7);
  border: 1px solid rgba(182, 97, 138, 0.2);
  border-radius: 2px;
  padding: 1.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.data-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-neon), var(--accent-amethyst), var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.data-card:hover {
  border-color: rgba(182, 97, 138, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 79, 165, 0.1);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-icon {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
}

.card-value {
  height: 120px;
  margin-bottom: 1rem;
}

.card-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-stat {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.card-trend {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.trend-up {
  color: var(--accent-cyan);
}

.trend-down {
  color: var(--accent-neon);
}

/* Matrix Section */
.section-matrix {
  background: radial-gradient(ellipse at 30% 50%, rgba(61, 26, 53, 0.5) 0%, var(--bg-deep) 70%);
}

.matrix-container {
  width: 100%;
  height: 350px;
  margin-bottom: 2rem;
  position: relative;
}

.matrix-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.matrix-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 1px;
}

.legend-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* Broadcast Section */
.section-broadcast {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 50%, var(--bg-deep) 100%);
}

.broadcast-terminal {
  background: rgba(18, 11, 20, 0.9);
  border: 1px solid rgba(94, 196, 196, 0.3);
  border-radius: 2px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(42, 16, 36, 0.5);
  border-bottom: 1px solid rgba(94, 196, 196, 0.15);
}

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

.dot-red { background: #e84fa5; }
.dot-yellow { background: #d4a853; }
.dot-green { background: #5ec4c4; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.25rem;
}

.terminal-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  opacity: 0;
  transform: translateX(-10px);
  animation: terminalReveal 0.4s ease forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.2s; }
.terminal-line:nth-child(2) { animation-delay: 0.6s; }
.terminal-line:nth-child(3) { animation-delay: 1.0s; }
.terminal-line:nth-child(4) { animation-delay: 1.4s; }
.terminal-line:nth-child(5) { animation-delay: 1.8s; }

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

.terminal-prompt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.terminal-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.highlight-line .terminal-text {
  color: var(--accent-neon);
}

.broadcast-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-block {
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(42, 16, 36, 0.4);
  border: 1px solid rgba(182, 97, 138, 0.15);
  border-radius: 2px;
  transition: border-color 0.3s ease;
}

.stat-block:hover {
  border-color: rgba(182, 97, 138, 0.4);
}

.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* Inscription Section */
.section-inscription {
  background: radial-gradient(ellipse at center, var(--bg-surface) 0%, var(--bg-deep) 70%);
  min-height: 80vh;
}

.inscription-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.inscription-bust {
  width: 160px;
  height: 200px;
  opacity: 0.7;
  animation: bustFloat 6s ease-in-out infinite;
}

@keyframes bustFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.bust-svg {
  width: 100%;
  height: 100%;
}

.bust-glitch-line {
  animation: bustGlitch 4s ease-in-out infinite;
}

.bust-glitch-line:nth-child(2) { animation-delay: 1.3s; }
.bust-glitch-line:nth-child(3) { animation-delay: 2.6s; }

@keyframes bustGlitch {
  0%, 85%, 100% { opacity: 0.1; transform: translateX(0); }
  88% { opacity: 0.4; transform: translateX(5px); }
  91% { opacity: 0.2; transform: translateX(-3px); }
  94% { opacity: 0.5; transform: translateX(2px); }
}

.inscription-text {
  text-align: center;
  max-width: 550px;
}

.inscription-quote {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-style: italic;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.8;
  border: none;
  margin-bottom: 1rem;
  position: relative;
  padding: 0 1rem;
}

.inscription-quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-gold), var(--accent-rose), transparent);
  opacity: 0.5;
}

.inscription-attribution {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.inscription-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.footer-line {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.4;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

.footer-date {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  opacity: 0.6;
}

.footer-sigil {
  margin-top: 0.5rem;
  opacity: 0.5;
  animation: sigilSpin 20s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  .colonnade { width: 40px; opacity: 0.3; }
  .section { padding: 3rem 3rem; }
  .marble-border { left: 40px; right: 40px; }
  .data-grid { grid-template-columns: 1fr; }
  .broadcast-stats { grid-template-columns: repeat(2, 1fr); }
  .matrix-legend { gap: 1rem; }
}

@media (max-width: 480px) {
  .colonnade { display: none; }
  .section { padding: 2rem 1.5rem; }
  .marble-border { left: 0; right: 0; }
  .broadcast-stats { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
}

/* Visible state for scroll animations */
.section-content,
.hero-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-content.visible,
.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}
