/* css/hero.css — Kronos Code Studio */

.hero {
  position: relative; z-index: var(--z-base);
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12);
  align-items: center;
  padding: 7rem var(--sp-8) var(--sp-20);
  max-width: 1200px; margin: 0 auto;
}

/* ── Eyebrow ── */
.hero__eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.2em; color: var(--red); text-transform: uppercase;
  margin-bottom: var(--sp-6);
  display: flex; align-items: center; gap: var(--sp-3);
  text-shadow: 0 0 10px var(--red-glow-sm);
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 10px var(--red-glow);
  animation: pulse-dot 1.4s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.3;transform:scale(0.8)} }

/* ── Title ── */
.hero__title {
  font-family: var(--font-orb);
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  font-weight: 900; line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: var(--sp-6);
}
.hero__title-gold {
  display: block; color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow), 0 0 60px var(--gold-glow-sm);
  animation: title-glow 3s ease-in-out infinite alternate;
}
.hero__title-white { display: block; color: var(--text); }
@keyframes title-glow {
  from { text-shadow: 0 0 20px var(--gold-glow); }
  to   { text-shadow: 0 0 50px var(--gold-glow), 0 0 100px var(--gold-glow-sm); }
}

.hero__sub {
  font-size: 1rem; color: var(--text-2);
  max-width: 460px; line-height: 1.8; margin-bottom: var(--sp-8);
}
.hero__actions { display: flex; gap: var(--sp-6); flex-wrap: wrap; align-items: center; }

/* ── Stats ── */
.hero__stats {
  display: flex; align-items: center; gap: var(--sp-8); flex-wrap: wrap;
  margin-top: var(--sp-12); padding-top: var(--sp-6);
  border-top: 1px solid rgba(192,24,42,0.18);
}
.stat__num {
  font-family: var(--font-orb); font-size: 2rem; font-weight: 900;
  color: var(--gold); letter-spacing: -0.03em;
  text-shadow: 0 0 18px var(--gold-glow); line-height: 1;
}
.stat__plus { color: var(--red); text-shadow: 0 0 10px var(--red-glow); }
.stat__label {
  font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-3);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: var(--sp-1);
}
.stat__divider {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--card-border), transparent);
}

/* ══════════════════════════════════
   HERO VISUAL — HUD DASHBOARD
══════════════════════════════════ */
.hero__visual {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1.05;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 8px;
  padding: 4px;
}

/* ── Center orb area spans full width ── */
.hud-orb-wrap {
  grid-column: 1 / -1;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 200px;
}

/* Rings — bidirectional */
.hero__ring {
  position: absolute; border-radius: 50%;
  border: 1px solid transparent; top: 50%; left: 50%;
  transform-origin: center center;
  transform: translate(-50%, -50%);
}
.hero__ring--1 {
  width: 160px; height: 160px;
  border-color: rgba(192,24,42,0.3); border-top-color: var(--red);
  animation: spin-cw 8s linear infinite;
  box-shadow: 0 0 10px rgba(192,24,42,0.15);
}
.hero__ring--2 {
  width: 200px; height: 200px;
  border-color: rgba(255,215,0,0.15); border-right-color: var(--gold);
  animation: spin-ccw 14s linear infinite;
}
.hero__ring--3 {
  width: 240px; height: 240px;
  border-color: rgba(192,24,42,0.08); border-bottom-color: rgba(192,24,42,0.4);
  animation: spin-cw 22s linear infinite;
}
.hero__ring--4 {
  width: 278px; height: 278px;
  border-color: rgba(255,215,0,0.05); border-left-color: rgba(255,215,0,0.3);
  animation: spin-ccw 30s linear infinite;
}

@keyframes spin-cw  { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes spin-ccw { to { transform: translate(-50%,-50%) rotate(-360deg); } }

.hero__orb {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(192,24,42,0.35) 0%, rgba(192,24,42,0.1) 50%, transparent 70%);
  box-shadow: 0 0 40px rgba(192,24,42,0.3), 0 0 80px rgba(192,24,42,0.1);
  animation: orb-breathe 4s ease-in-out infinite;
  z-index: 2;
}
@keyframes orb-breathe {
  0%,100% { transform:translate(-50%,-50%) scale(1); box-shadow:0 0 40px rgba(192,24,42,0.3); }
  50%      { transform:translate(-50%,-50%) scale(1.1); box-shadow:0 0 70px rgba(192,24,42,0.5); }
}

/* ── HUD Widgets ── */
.hud-widget {
  background: rgba(6,6,10,0.82);
  border: 1px solid rgba(192,24,42,0.2);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(4px);
}
.hud-widget::before {
  content:'';
  position: absolute; top:0; left:0; right:0; height:1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.6;
}
.hud-widget__title {
  color: var(--red); font-size: 0.55rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 6px; text-shadow: 0 0 6px var(--red-glow-sm);
}

/* ── Bar chart widget ── */
.hud-bars { display: flex; align-items: flex-end; gap: 3px; height: 36px; margin-top: 4px; }
.hud-bar {
  flex: 1; border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, var(--red), var(--gold));
  opacity: 0.75;
  animation: bar-grow 2s ease-out both;
  transform-origin: bottom;
}
@keyframes bar-grow { from{transform:scaleY(0)} to{transform:scaleY(1)} }

/* ── Line graph widget ── */
.hud-line-wrap { height: 40px; margin-top: 4px; position: relative; }
.hud-line-wrap svg { width: 100%; height: 100%; overflow: visible; }

/* ── Progress bars ── */
.hud-prog-list { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.hud-prog-item { display: flex; flex-direction: column; gap: 2px; }
.hud-prog-label { display: flex; justify-content: space-between; color: var(--text-3); font-size: 0.52rem; }
.hud-prog-track { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.hud-prog-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  box-shadow: 0 0 6px var(--red-glow-sm);
  animation: prog-fill 1.8s ease-out both;
  transform-origin: left;
}
@keyframes prog-fill { from{transform:scaleX(0)} to{transform:scaleX(1)} }

/* ── Terminal widget ── */
.hud-terminal { font-size: 0.54rem; line-height: 1.7; color: var(--text-3); margin-top: 4px; }
.hud-terminal .t-green  { color: #00c97a; }
.hud-terminal .t-gold   { color: var(--gold); }
.hud-terminal .t-red    { color: var(--red); }
.hud-terminal .t-cursor { animation: blink-cursor 1s step-end infinite; }

/* ── Radar widget ── */
.hud-radar-wrap { display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.hud-radar-wrap svg { width: 64px; height: 64px; }
.radar-sweep {
  transform-origin: 32px 32px;
  animation: radar-spin 3s linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }

/* ── Status row widget ── */
.hud-status-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
}
.hud-status-item {
  display: flex; align-items: center; gap: 3px;
  font-size: 0.52rem; color: var(--text-3);
}
.hud-status-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.hud-status-dot--green { background: #00c97a; box-shadow: 0 0 5px #00c97a; }
.hud-status-dot--red   { background: var(--red); box-shadow: 0 0 5px var(--red); animation: blink-dot 1.4s infinite; }
.hud-status-dot--gold  { background: var(--gold); box-shadow: 0 0 5px var(--gold); }
@keyframes blink-dot { 0%,100%{opacity:1} 50%{opacity:0.2} }

/* ── Hex grid widget ── */
.hud-hex { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; justify-content: center; }
.hud-hex-cell {
  width: 10px; height: 10px;
  background: rgba(192,24,42,0.2);
  border: 1px solid rgba(192,24,42,0.3);
  border-radius: 2px;
  animation: hex-pulse 2s ease-in-out infinite;
}
.hud-hex-cell:nth-child(odd)  { animation-delay: 0.3s; background: rgba(255,215,0,0.12); border-color: rgba(255,215,0,0.2); }
.hud-hex-cell:nth-child(3n)   { animation-delay: 0.7s; background: rgba(0,201,122,0.1); border-color: rgba(0,201,122,0.2); }
@keyframes hex-pulse { 0%,100%{opacity:0.4} 50%{opacity:1} }

/* ── Waveform widget ── */
.hud-wave-wrap { height: 36px; margin-top: 4px; }
.hud-wave-wrap svg { width: 100%; height: 100%; }
.wave-path { stroke-dasharray: 200; stroke-dashoffset: 200; animation: wave-draw 2s ease forwards, wave-move 3s 2s linear infinite; }
@keyframes wave-draw { to { stroke-dashoffset: 0; } }
@keyframes wave-move { from{stroke-dashoffset:0} to{stroke-dashoffset:-200} }

/* ── Countdown / clock widget ── */
.hud-clock { text-align: center; margin-top: 2px; }
.hud-clock__time {
  font-family: var(--font-orb); font-size: 1.1rem; font-weight: 700;
  color: var(--gold); text-shadow: 0 0 12px var(--gold-glow);
  letter-spacing: 0.08em; animation: time-glow 2s ease-in-out infinite alternate;
}
@keyframes time-glow {
  from { text-shadow: 0 0 8px var(--gold-glow); }
  to   { text-shadow: 0 0 20px var(--gold-glow), 0 0 40px rgba(255,215,0,0.2); }
}
.hud-clock__label { font-size: 0.5rem; color: var(--text-3); letter-spacing: 0.12em; margin-top: 2px; }

/* ── Ping widget ── */
.hud-ping-list { display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.hud-ping-row  { display:flex; justify-content:space-between; align-items:center; font-size:0.52rem; }
.hud-ping-val  { color: #00c97a; font-family:var(--font-mono); }

/* code lines inside orb */
.hero__code-lines {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 0.58rem;
  color: rgba(232,232,242,0.28); line-height: 1.9;
  letter-spacing: 0.02em; white-space: nowrap;
  pointer-events: none; text-align: center; z-index: 3;
}
.hero__code-lines em { color: rgba(255,215,0,0.45); font-style: normal; }
.blink { animation: blink-cursor 1s step-end infinite; color: var(--red); }
@keyframes blink-cursor { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 6rem; }
  .hero__visual { display: none; }
  .hero__sub { max-width: 100%; }
}
