/* --- Design Tokens & Variables --- */
:root {
  --bg-dark: #020308;
  --accent-cyan: #0052ff;
  --accent-cyan-rgb: 0, 82, 255;
  --accent-green: #4ade80;
  --accent-green-rgb: 74, 222, 128;
  --text-primary: #ffffff;
  --text-secondary: #7f8ea3;
  --border-color: rgba(0, 82, 255, 0.15);
  --border-glow: rgba(0, 82, 255, 0.3);
  
  --glass-bg: rgba(4, 6, 15, 0.7);
  --glass-bg-hover: rgba(8, 12, 30, 0.85);
  --glass-border: rgba(0, 82, 255, 0.15);
  --glass-border-hover: rgba(0, 82, 255, 0.4);
}

/* --- Font Definitions (Using Inter & JetBrains Mono) --- */
@font-face {
  font-family: "Neutral Face";
  font-style: normal;
  font-weight: 100 900;
  src: url("./assets/fonts/Inter/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  src: url("./assets/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf") format("truetype");
  font-display: swap;
}

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

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Canvas & Interactive Glow Background --- */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  width: 60rem;
  height: 60rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 82, 255, 0.12) 0%, rgba(0, 82, 255, 0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  transition: width 0.3s ease, height 0.3s ease;
  will-change: left, top;
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 82, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 82, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
  z-index: 3;
  pointer-events: none;
}

/* Scanline visual effect */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 4px, 6px 100%;
  z-index: 999;
  pointer-events: none;
  opacity: 0.45;
}

/* --- Layout Page Wrapper --- */
.page-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* --- Futuristic HUD Header --- */
.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem 5%;
  border-bottom: 1px solid var(--border-color);
  background: rgba(2, 3, 8, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: "JetBrains Mono", monospace;
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  z-index: 100;
}

.hud-logo {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-weight: 700;
}

.hud-logo-icon {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: contain;
}

.hud-logo-text {
  color: var(--text-primary);
  font-family: "Neutral Face", sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.1em;
}

.hud-status {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hud-indicator {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 1rem var(--accent-cyan);
}

.hud-indicator.active-pulse {
  background-color: var(--accent-green);
  box-shadow: 0 0 1rem var(--accent-green);
  animation: pulse-dot 2s infinite;
}

.hud-status-text {
  color: var(--text-secondary);
  text-transform: uppercase;
}

.hud-meta {
  display: flex;
  gap: 3rem;
  color: var(--accent-cyan);
}

.hud-meta-time {
  color: var(--text-secondary);
}

/* --- Main Layout Grid --- */
.main-content {
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: 4rem 5% 2rem;
}

.content-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 8rem;
  align-items: center;
}

/* --- Left Column Info Panel --- */
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
  animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1.4rem;
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.2);
  border-radius: 10rem;
  width: fit-content;
}

.badge-dot {
  width: 0.6rem;
  height: 0.6rem;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 0.8rem var(--accent-cyan);
}

.badge-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-cyan);
  letter-spacing: 0.12em;
}

.main-title {
  font-family: "Neutral Face", sans-serif;
  font-size: clamp(3.2rem, 5vw, 6.2rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.highlight-text {
  color: var(--accent-cyan);
  text-shadow: 0 0 3rem rgba(0, 82, 255, 0.35);
  position: relative;
}

.description {
  color: var(--text-secondary);
  font-size: 1.6rem;
  line-height: 1.6;
  max-width: 58rem;
}

/* --- Countdown Timer Visuals --- */
.countdown-container {
  display: flex;
  gap: 2.5rem;
  margin: 1.5rem 0;
}

.countdown-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.countdown-circle-wrap {
  position: relative;
  width: 9.5rem;
  height: 9.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 2px 10px rgba(0, 82, 255, 0.05);
  backdrop-filter: blur(8px);
}

.countdown-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 4px;
}

.circle-progress {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 4px;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0px 0px 4px rgba(0, 82, 255, 0.5));
}

.countdown-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 1rem rgba(255, 255, 255, 0.2);
}

.countdown-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

/* --- Terminal Panel (Glassmorphism & Interactive) --- */
.terminal-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.2rem;
  overflow: hidden;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 60rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.terminal-panel:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 0 2rem 5rem rgba(0, 82, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.terminal-header {
  background: rgba(2, 3, 8, 0.85);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 0.8rem;
  margin-right: 2rem;
}

.t-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
}

.t-red { background-color: #ef4444; }
.t-yellow { background-color: #f59e0b; }
.t-green { background-color: #10b981; }

.terminal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 2.2rem 2.2rem 1.2rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.3rem;
  line-height: 1.8;
  color: #eff1f6;
  max-height: 18rem;
  overflow-y: auto;
}

.log-line {
  margin-bottom: 0.8rem;
  animation: typing-appear 0.2s ease-out forwards;
}

.text-cyan {
  color: var(--accent-cyan);
  text-shadow: 0 0 1rem rgba(0, 82, 255, 0.2);
}

.text-green {
  color: var(--accent-green);
  text-shadow: 0 0 1rem rgba(74, 222, 128, 0.2);
}

.text-error {
  color: #ef4444;
}

.terminal-form {
  display: flex;
  align-items: center;
  padding: 0 2.2rem 2.2rem;
  font-family: "JetBrains Mono", monospace;
  position: relative;
  gap: 1.2rem;
}

.terminal-prompt {
  color: var(--accent-cyan);
  font-size: 1.5rem;
  font-weight: 700;
}

.terminal-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 1.4rem;
  caret-color: var(--accent-cyan);
  padding: 0.5rem 0;
  width: 100%;
}

.terminal-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.terminal-submit-btn {
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.3);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.terminal-submit-btn:hover {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #020308;
  box-shadow: 0 0 1.5rem rgba(0, 82, 255, 0.35);
  transform: translateY(-0.1rem);
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.terminal-submit-btn:hover .btn-arrow {
  transform: translateX(0.3rem);
}

/* --- Right Column Hologram Display --- */
.hologram-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  animation: fade-in-scale 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hologram-viewport {
  position: relative;
  width: 38rem;
  height: 38rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 82, 255, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Hologram circular rings */
.hud-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(0, 82, 255, 0.15);
  pointer-events: none;
}

.ring-outer {
  width: 100%;
  height: 100%;
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 82, 255, 0.08);
  animation: rotate-clockwise 40s linear infinite;
}

.ring-outer::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 1.2rem var(--accent-cyan);
}

.ring-middle {
  width: 82%;
  height: 82%;
  border-width: 1.5px;
  border-style: dotted;
  border-color: rgba(0, 82, 255, 0.25);
  animation: rotate-counter-clockwise 25s linear infinite;
}

.ring-inner {
  width: 66%;
  height: 66%;
  border-style: dashed;
  border-color: rgba(0, 82, 255, 0.3);
  animation: rotate-clockwise 15s linear infinite;
}

/* Scanline animation passing over hologram */
.hologram-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 6;
}

.hologram-scanner::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 82, 255, 0) 80%,
    rgba(0, 82, 255, 0.15) 98%,
    var(--accent-cyan) 100%
  );
  animation: scan 4s linear infinite;
}

/* Hologram Container & Image styling */
.raven-container {
  width: 25rem;
  height: 25rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  filter: drop-shadow(0 0 3rem rgba(0, 82, 255, 0.4));
  animation: float 6s ease-in-out infinite;
}

.hologram-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.88;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: filter 0.3s ease;
}

/* Glitch Overlay */
.hologram-glitch {
  position: absolute;
  width: 25rem;
  height: 25rem;
  background-image: url('assets/raven-ai2-bgremove.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: 4;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hologram-reflection {
  position: absolute;
  bottom: -3.5rem;
  width: 80%;
  height: 1.5rem;
  background: radial-gradient(ellipse at center, rgba(0, 82, 255, 0.4) 0%, rgba(0, 82, 255, 0) 70%);
  border-radius: 50%;
  opacity: 0.7;
}

/* Telemetry box under hologram */
.telemetry-box {
  margin-top: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  padding: 1.6rem 2.8rem;
  border-radius: 0.8rem;
  width: 32rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tel-row {
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.08em;
}

.tel-row span:first-child {
  color: var(--text-secondary);
}

/* --- Futuristic Footer --- */
.hud-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 5%;
  border-top: 1px solid var(--border-color);
  background: rgba(2, 3, 8, 0.8);
  font-family: "JetBrains Mono", monospace;
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  z-index: 100;
  gap: 2rem;
}

.footer-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-block .label {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.footer-block .value {
  color: #eff1f6;
}

.footer-block.copyright {
  text-align: center;
  letter-spacing: 0.08em;
}

.link {
  text-decoration: none;
  transition: color 0.3s;
}

.link:hover {
  color: var(--accent-cyan);
}

/* --- Keyframe Animations --- */
@keyframes pulse-dot {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 0 0 0.4rem rgba(74, 222, 128, 0.4);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 1.5rem rgba(74, 222, 128, 0.8);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(2.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-scale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes rotate-counter-clockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.2rem); }
}

@keyframes scan {
  from { top: -100%; }
  to { top: 100%; }
}

@keyframes typing-appear {
  from { opacity: 0; transform: translateX(-0.5rem); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Responsive Media Queries --- */

/* Laptop / Desktop adjustments */
@media (max-width: 1200px) {
  html {
    font-size: 58%; /* scale fonts down slightly */
  }
  
  .content-container {
    gap: 4rem;
  }
  
  .hologram-viewport {
    width: 34rem;
    height: 34rem;
  }
}

/* Tablet Layout */
@media (max-width: 991px) {
  html {
    font-size: 55%;
  }

  .hud-header {
    padding: 2rem 4%;
  }

  .hud-meta {
    display: none; /* Hide coords/time on smaller viewports */
  }

  .main-content {
    padding: 4rem 4% 5rem;
  }

  .content-container {
    grid-template-columns: 1fr; /* Stack columns */
    gap: 6rem;
  }

  .info-panel {
    align-items: center;
    text-align: center;
  }

  .badge {
    align-self: center;
  }

  .description {
    max-width: 100%;
  }

  .countdown-container {
    justify-content: center;
  }

  .terminal-panel {
    width: 100%;
    max-width: 58rem;
  }

  .hologram-panel {
    order: -1; /* Place graphic at top on mobile/tablet */
  }

  .hologram-viewport {
    width: 36rem;
    height: 36rem;
  }

  .raven-container, .hologram-glitch {
    width: 22rem;
    height: 22rem;
  }

  .telemetry-box {
    margin-top: 3rem;
  }

  .hud-footer {
    flex-direction: column;
    padding: 3rem 4%;
    text-align: center;
    gap: 1.8rem;
  }

  .footer-block.copyright {
    text-align: center;
  }
}

/* Mobile Devices */
@media (max-width: 576px) {
  html {
    font-size: 50%; /* standard mobile base */
  }

  .hud-header {
    padding: 1.5rem 4%;
  }
  
  .hud-logo-text {
    font-size: 1.6rem;
  }

  .hud-status-text {
    font-size: 1rem;
  }

  .main-title {
    font-size: 3.2rem;
  }

  .countdown-container {
    gap: 1.2rem;
  }

  .countdown-circle-wrap {
    width: 7.2rem;
    height: 7.2rem;
  }

  .countdown-val {
    font-size: 2rem;
  }

  .hologram-viewport {
    width: 28rem;
    height: 28rem;
  }

  .raven-container, .hologram-glitch {
    width: 18rem;
    height: 18rem;
  }

  .telemetry-box {
    width: 100%;
    max-width: 28rem;
  }
}

/* Custom Scrollbar for Terminal Body & Webpage */
::-webkit-scrollbar {
  width: 0.6rem;
  height: 0.6rem;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 82, 255, 0.2);
  border-radius: 1rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}
