@font-face { font-family: "AstaRegular"; src: local("Astalamet Pro Regular"), local("AstalametPro-Regular"), url("./astalamet-pro-font/astalamet-pro-regular.otf") format("opentype"); font-feature-settings: normal; }
@font-face { font-family: "AstaWoff2"; src: url("./astalamet-pro-font/astalamet-pro.woff2") format("woff2"); font-feature-settings: normal; }

:root {
  --bg-color: #000000;
  --bg-secondary: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-muted: #444444;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.25);
  --accent-color: #ffffff;
  --gradient-metallic: linear-gradient(180deg, #ffffff 0%, #666666 100%);
}

[data-theme="light"] {
  --bg-color: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-muted: #aaaaaa;
  --border-subtle: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.25);
  --accent-color: #000000;
  --gradient-metallic: linear-gradient(180deg, #000000 0%, #888888 100%);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.logo, .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-circle {
  width: 22px;
  height: 22px;
  background: var(--text-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
  line-height: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--text-primary);
  color: var(--bg-color);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-cta:hover {
  opacity: 0.8;
}

/* Hero */
.hero {
  text-align: center;
  padding: 120px 0 80px 0;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: "AstaWoff2", "AstaRegular", sans-serif;
  font-size: 5.5rem;
  font-weight: normal;
  line-height: 1.25;
  padding: 12px 0;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

/* Marquee */
.marquee-container {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  margin-bottom: 80px;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 25s linear infinite;
}

.ticker-item {
  display: inline-block;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-right: 40px;
}
.ticker-item .up { color: #4ade80; }
.ticker-item .down { color: #f87171; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 100px;
}

.bento-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 35px;
  transition: border-color 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.bento-card:hover {
  border-color: var(--border-hover);
}

.span-2 {
  grid-column: span 2;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.card-title {
  font-family: "AstaWoff2", "AstaRegular", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.card-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 1px;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* Mini CSS Chart */
.css-chart-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
  margin-top: auto;
  padding-top: 20px;
}
.css-chart-container .bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px 4px 0 0;
  transition: background 0.3s, height 0.5s ease;
  animation: barGrow 1s ease-out forwards;
}
@keyframes barGrow {
  from { height: 0% !important; }
}
.css-chart-container:hover .bar {
  background: rgba(255, 255, 255, 0.5);
}
.css-chart-container:hover .bar:last-child {
  background: #ffffff;
}
[data-theme="light"] .css-chart-container .bar {
  background: rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .css-chart-container:hover .bar {
  background: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .css-chart-container:hover .bar:last-child {
  background: #000000;
}
[data-theme="light"] .css-chart-container .bar:last-child {
  background: #000000 !important;
}

/* Sentiment Dial */
.sentiment-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  position: relative;
}
.half-donut {
  width: 100%;
  max-width: 220px;
}
.dial-fill {
  animation: fillDial 2s ease-out forwards;
}
[data-theme="light"] .dial-fill {
  stroke: #000000 !important;
}
@keyframes fillDial {
  0% { stroke-dashoffset: 125; }
  100% { stroke-dashoffset: 30; }
}
.dial-value {
  position: absolute;
  bottom: 30px;
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1;
}
.dial-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  margin-top: 5px;
  font-family: "AstaWoff2", "AstaRegular", sans-serif;
}

/* Latency */
.latency-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  height: 100px;
}
.ping-circle {
  width: 12px;
  height: 12px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
  animation: ping 2s infinite;
  margin-bottom: 15px;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}
.latency-text {
  font-size: 1.5rem;
  font-weight: 500;
}
.latency-subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Terminal Mock */
.terminal-mock {
  background: var(--bg-color);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 25px;
  font-family: monospace;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: auto;
  line-height: 1.8;
}
.term-line {
  margin-bottom: 5px;
}
.blinking {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Risk Ring */
.risk-visual {
  display: flex;
  justify-content: center;
  margin-top: auto;
}
.risk-ring {
  position: relative;
  width: 80px;
  height: 80px;
}
.risk-ring svg {
  transform: rotate(-90deg);
}
.risk-arc {
  animation: drawRisk 1.5s ease-out forwards;
  stroke-dashoffset: 214;
}
@keyframes drawRisk {
  from { stroke-dasharray: 0 214; }
  to { stroke-dasharray: 160 54; }
}
.risk-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "AstaWoff2", "AstaRegular", sans-serif;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Allocation Bars */
.allocation-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  padding-top: 10px;
}
.alloc-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.alloc-label {
  font-family: "AstaWoff2", "AstaRegular", sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary);
  width: 65px;
  flex-shrink: 0;
}
.alloc-track {
  flex: 1;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}
.alloc-fill {
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  animation: growBar 1.2s ease-out forwards;
  transform-origin: left;
}
@keyframes growBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.alloc-pct {
  font-size: 0.85rem;
  color: var(--text-secondary);
  width: 35px;
  text-align: right;
}

/* Feed Dots */
.feed-dots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: auto;
  padding: 15px 0;
  justify-items: center;
}
.feed-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s, box-shadow 0.3s;
}
.feed-dot.active {
  background: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.5);
  animation: feedPulse 2s ease-in-out infinite;
}
[data-theme="light"] .feed-dot {
  background: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .feed-dot.active {
  background: #000000;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.3);
}
@keyframes feedPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Alert Stack */
.alert-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.alert-item {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 12px 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  border-left: 3px solid var(--text-primary);
}
.alert-item.faded {
  opacity: 0.4;
  border-left-color: var(--text-muted);
}

/* Hero Note */
.hero-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 20px;
  font-style: italic;
}

/* Status Badge */
.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: "AstaWoff2", "AstaRegular", sans-serif;
  letter-spacing: 0.5px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
  50% { opacity: 0.5; box-shadow: 0 0 2px rgba(245, 158, 11, 0.2); }
}

/* Stage Progress */
.stage-visual {
  margin-top: auto;
}
.stage-bar {
  height: 6px;
  background: var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
}
.stage-fill {
  width: 15%;
  height: 100%;
  background: var(--text-primary);
  border-radius: 2px;
}
.stage-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.stage-active {
  color: var(--text-primary);
  font-weight: 500;
}

/* Email Signup */
.email-signup {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.email-input {
  flex: 1;
  background: var(--bg-color);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.email-input::placeholder {
  color: var(--text-muted);
}
.email-input:focus {
  border-color: var(--border-hover);
}
.email-btn {
  background: var(--text-primary);
  color: var(--bg-color);
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: "AstaWoff2", "AstaRegular", sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.email-btn:hover {
  opacity: 0.8;
}

/* ===== Responsive Design ===== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .navbar {
    padding: 20px 0;
  }

  .hero {
    padding: 80px 0 50px 0;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-card.span-2 {
    grid-column: span 2;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-desc {
    font-size: 0.85rem;
  }

  .css-chart-container {
    height: 100px;
  }

  .marquee-text {
    font-size: 4rem;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .navbar {
    padding: 16px 0;
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo-circle {
    width: 16px;
    height: 16px;
  }

  .nav-cta {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .hero {
    padding: 60px 0 40px 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    padding: 0 8px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bento-card.span-2 {
    grid-column: span 1;
  }

  .bento-card {
    padding: 20px;
    min-height: auto;
  }

  .card-title {
    font-size: 0.95rem;
  }

  .terminal-mock {
    font-size: 0.75rem;
    padding: 12px;
  }

  .css-chart-container {
    height: 80px;
  }

  .dial-container {
    width: 120px;
    height: 120px;
  }

  .dial-text {
    font-size: 1.5rem;
  }

  .feed-dot {
    width: 14px;
    height: 14px;
  }

  .alert-item {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .email-signup {
    flex-direction: column;
  }

  .email-input,
  .email-btn {
    width: 100%;
  }

  .marquee-text {
    font-size: 2.5rem;
  }

  .footer {
    padding: 24px 0;
    font-size: 0.8rem;
  }
}
