:root {
  --bg: #07090f;
  --bg-2: #0c111a;
  --text: #e9ecf1;
  --muted: #9aa3b2;
  --accent: #7c5cff;
  --accent-2: #00e0c6;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
  --radius: 18px;
  --max: 1200px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--accent-2); text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7,9,15,0.6);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04111a;
  font-weight: 800;
}
.brand-name { font-weight: 700; letter-spacing: 0.3px; }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px 60px;
  overflow: hidden;
}
.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.7;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,9,15,0.85) 0%, rgba(7,9,15,0.4) 100%);
  z-index: -1;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.hero p { color: var(--muted); font-size: 18px; margin: 0 0 24px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}
.btn.primary {
  background: transparent;
  border: none;
  position: relative;
}
.btn.primary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: url('../assets/ui/button_primary.png') no-repeat center;
  background-size: 100% 100%;
  z-index: -1;
}
.btn.secondary {
  background: transparent;
  border: none;
  position: relative;
}
.btn.secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: url('../assets/ui/button_secondary.png') no-repeat center;
  background-size: 100% 100%;
  z-index: -1;
}

.metrics {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.metric {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  text-align: center;
}
.metric-value { display: block; font-weight: 700; }
.metric-label { display: block; font-size: 12px; color: var(--muted); }

.hero-media { position: relative; }
.avatar-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-glow {
  position: absolute;
  inset: -20px;
  background:
    radial-gradient(600px 400px at 30% 20%, rgba(124,92,255,0.35), transparent 60%),
    radial-gradient(600px 400px at 70% 70%, rgba(0,224,198,0.25), transparent 60%);
  filter: blur(28px);
  z-index: -1;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-10px, 0, 0) scale(1.02); }
  to   { transform: translate3d(10px, 10px, 0) scale(1.06); }
}

.features {
  position: relative;
  overflow: hidden;
}
.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/section2_bg.png') center/cover no-repeat;
  opacity: 0.15;
  z-index: -1;
}
.features, .performance, .cockpit, .avatars, .contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 24px;
}
.features h2, .performance h2, .cockpit h2, .avatars h2, .contact h2 {
  font-size: 32px;
  margin: 0 0 18px;
}
.cockpit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.cockpit-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.cockpit-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.cockpit-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.cockpit-metric {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}
.cockpit-log {
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #05070c;
  color: var(--muted);
  font-size: 12px;
}
.confidence-strip {
  position: relative;
  height: 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0b0f18;
  overflow: hidden;
  margin-bottom: 8px;
}
.confidence-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.9;
}
.confidence-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding-top: 6px;
}
.cockpit-footer {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}
.astra-tour {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b0f18;
  color: var(--muted);
  cursor: pointer;
}
.astra-intro {
  margin-top: 12px;
  width: 100%;
  max-height: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(124,92,255,0.12), rgba(0,224,198,0.08)), #05070c;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 20px 60px rgba(0,0,0,0.45);
  display: none;
}
.astra-intro.is-playing {
  display: block;
}
.cockpit-stage {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255,255,255,0.01);
}
.astra-avatar {
  position: relative;
  height: 140px;
  display: grid;
  place-items: center;
}
.astra-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0.45;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.astra-avatar-core {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.trade-stream {
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #05070c;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}
.decision-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #0b0f18;
  color: var(--muted);
  font-size: 12px;
}
.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.7;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.badge-ok .badge-pulse { background: #34d399; opacity: 1; transform: scale(1.1); }
.badge-warn .badge-pulse { background: #facc15; opacity: 1; transform: scale(1.1); }
.badge-error .badge-pulse { background: #f87171; opacity: 1; transform: scale(1.1); }
.badge-trade .badge-pulse { background: #60a5fa; opacity: 1; transform: scale(1.2); }

@keyframes rrShiftGreen { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.45);} 100% { box-shadow: 0 0 0 14px rgba(52,211,153,0);} }
@keyframes rrShiftRed { 0% { box-shadow: 0 0 0 0 rgba(248,113,113,0.45);} 100% { box-shadow: 0 0 0 14px rgba(248,113,113,0);} }
@keyframes sapWarn { 0% { background: rgba(250,204,21,0.08);} 100% { background: rgba(250,204,21,0);} }
@keyframes pulse { 0%,100% { transform: scale(1);} 50% { transform: scale(1.04);} }
@keyframes flash { 0% { opacity: 0.25;} 100% { opacity: 1;} }
.rr-ok, .sap-ok { animation: rrShiftGreen 0.9s ease-out forwards; }
.rr-error, .sap-error { animation: rrShiftRed 0.9s ease-out forwards; }
.sap-warn { animation: sapWarn 1.2s ease-out forwards; }
.strategy-pulse { animation: pulse 0.9s ease-in-out; }
.guardian-flash { animation: flash 0.6s ease-in-out; }
.arbitrator-badge-new { animation: flash 0.5s ease-in-out; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: url('../assets/ui/card_bg.png') no-repeat center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  z-index: 1;
}
.card > * { position: relative; z-index: 2; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { color: var(--muted); margin: 0; }

.perf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.perf {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: url('../assets/ui/card_bg.png') no-repeat center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}
.perf::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  z-index: 1;
}
.perf > * { position: relative; z-index: 2; }
.perf-label { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; }
.perf-value { display: block; font-size: 24px; font-weight: 700; margin-top: 6px; }

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.avatar-card {
  aspect-ratio: 1/1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
.avatar-card img { width: 100%; height: 100%; object-fit: cover; }
.showreel {
  margin-top: 18px;
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #000;
}

.contact-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
}
.contact-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b0f18;
  color: var(--text);
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 24px;
  color: var(--muted);
  max-width: var(--max);
  margin: 0 auto;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .grid, .perf-grid, .avatar-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }

  /* Section 2 responsive */
  .section2-inner { flex-direction: column; }
  .section2-left { display: none; }
  .feature-card { min-width: 100%; }
}

/* ===== Section 3 — Market Intelligence ===== */
.market-intelligence {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
  background: var(--bg);
}
.market-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/section2_bg.png') center/cover no-repeat fixed;
  opacity: 0.08;
  z-index: -2;
  filter: brightness(0.3) contrast(1.2);
}
.market-intelligence::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,9,15,0.95) 0%, rgba(7,9,15,0.9) 100%);
  z-index: -1;
}
.market-inner {
  max-width: var(--max);
  margin: 0 auto;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.1s;
}
.market-header h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 12px;
}
.market-header .subtitle {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
  max-width: 640px;
}
.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 60px;
}
.market-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  opacity: 0;
  animation: fadeInLeft 0.7s ease-out forwards;
  animation-delay: 0.3s;
}
.market-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
}
.market-item:hover {
  border-color: var(--accent-2);
  box-shadow: 0 0 24px rgba(0,224,198,0.15);
  transform: translateY(-2px);
}
.market-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.market-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.count-up { color: var(--accent-2); }
.trend-bull { color: #34d399; }
.trend-bear { color: #f87171; }
.trend-neutral { color: var(--muted); }
.vol-high { color: #facc15; }
.vol-low { color: var(--muted); }
.insight-block {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.5s;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
}
.insight-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0,224,198,0.08), transparent 70%);
  z-index: 1;
}
.insight-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.insight-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
}
.insight-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 0 8px rgba(0,224,198,0.4));
}
.insight-label {
  font-weight: 600;
  color: var(--accent-2);
}
.insight-text {
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.insight-timestamp {
  color: var(--muted);
  font-size: 13px;
}

/* Section animations */
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 860px) {
  .market-grid { grid-template-columns: 1fr; }
  .market-panel { grid-template-columns: 1fr; }
  .market-header h2 { font-size: 32px; }
}
.section2 {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
  background: var(--bg);
}
.section2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/images/section2_bg.png') center/cover no-repeat fixed;
  opacity: 0.12;
  z-index: -1;
}
.section2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,9,15,0.95) 0%, rgba(7,9,15,0.85) 100%);
  z-index: -1;
}
.section2-inner {
  display: grid;
  grid-template-columns: 0.35fr 0.65fr;
  gap: 60px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
}
.section2-left {
  display: flex;
  justify-content: center;
}
.astra-pose-2 {
  max-width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateX(-40px);
  animation: fadeInLeft 0.8s ease-out forwards;
  animation-delay: 0.2s;
}
.section2-right h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 20px;
  line-height: 1.1;
}
.section2-right .subtitle {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 40px;
  max-width: 560px;
}
.section2-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.feature-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: url('../assets/ui/card_bg.png') no-repeat center;
  background-size: cover;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.7s ease-out forwards;
}
.feature-card:nth-child(1) { animation-delay: 0.4s; }
.feature-card:nth-child(2) { animation-delay: 0.55s; }
.feature-card:nth-child(3) { animation-delay: 0.7s; }
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  z-index: 1;
}
.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 8px rgba(124,92,255,0.5));
  transition: transform 0.3s ease, filter 0.3s ease;
}
.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 0 16px rgba(0,224,198,0.7));
}
.feature-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  position: relative;
  z-index: 2;
}
.feature-card p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  position: relative;
  z-index: 2;
}

/* Animations */
@keyframes fadeInLeft {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}
