/* ─── Reset & Variables ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --surface: #1a1a26;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-dim: #6a6a80;
  --text-muted: #3a3a50;
  --accent: #00ffc8;
  --accent-dim: #00ffc820;
  --accent-glow: #00ffc840;
  --neon-pink: #ff2d8a;
  --neon-blue: #4d9fff;
  --warning: #ffb020;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ─── Background Effects ─── */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.08;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  background: linear-gradient(to bottom, var(--bg), transparent);
  backdrop-filter: blur(8px);
  animation: fadeDown 0.8s ease-out;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.1em;
}

.logo-hex {
  color: var(--accent);
  margin-right: 0.5em;
  font-size: 1.2em;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.logo-text {
  color: var(--text);
  font-weight: 500;
}

.logo-dot {
  color: var(--accent);
}

.logo-domain {
  color: var(--text-dim);
  font-weight: 300;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-dim);
  animation: pulse 2s ease-in-out infinite;
}

/* ─── Hero Section ─── */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 3rem 4rem;
  gap: 6rem;
}

.hero-content {
  flex: 1;
  max-width: 640px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease-out 0.2s both;
}

.tag-bracket {
  color: var(--text-muted);
}

.tag-text {
  color: var(--accent);
}

.hero-title {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  margin-bottom: 1.5rem;
  position: relative;
  animation: fadeUp 0.8s ease-out 0.4s both;
}

.title-prefix {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.title-main {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--neon-blue) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
  position: relative;
}

.title-main::after {
  content: 's06';
  position: absolute;
  left: 2px;
  top: 2px;
  background: linear-gradient(135deg, var(--neon-pink), transparent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: glitch 4s ease-in-out infinite;
}

.hero-subtitle {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  animation: fadeUp 0.8s ease-out 0.6s both;
}

.subtitle-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  max-width: 60px;
}

.subtitle-line:last-child {
  background: linear-gradient(90deg, transparent, var(--accent));
}

.subtitle-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ─── Terminal Block ─── */
.terminal-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  animation: fadeUp 0.8s ease-out 0.8s both;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 255, 200, 0.03);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

.terminal-body {
  padding: 1.2rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 2;
}

.terminal-line {
  opacity: 0;
  animation: typeIn 0.4s ease-out forwards;
  animation-delay: var(--delay);
}

.prompt {
  color: var(--accent);
  margin-right: 0.5em;
}

.cmd {
  color: var(--text);
}

.terminal-line.output {
  color: var(--text-dim);
  padding-left: 1.2em;
}

.terminal-line.output.highlight {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-dim);
}

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

/* ─── Hero Visual ─── */
.hero-visual {
  flex: 0 0 380px;
  height: 380px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 1s ease-out 0.6s both;
}

.hex-grid {
  position: absolute;
  inset: 0;
}

.hex {
  position: absolute;
  width: 60px;
  height: 60px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  opacity: 0;
  animation: hexAppear 0.6s ease-out forwards;
}

.hex-1 { top: 20%; left: 40%; animation-delay: 1.0s; background: linear-gradient(135deg, var(--accent-dim), transparent); }
.hex-2 { top: 35%; left: 55%; animation-delay: 1.2s; }
.hex-3 { top: 50%; left: 40%; animation-delay: 1.4s; background: var(--accent); opacity: 0; }
.hex-4 { top: 35%; left: 25%; animation-delay: 1.6s; }
.hex-5 { top: 50%; left: 60%; animation-delay: 1.8s; }
.hex-6 { top: 15%; left: 55%; animation-delay: 2.0s; }
.hex-7 { top: 50%; left: 22%; animation-delay: 2.2s; }

.hex-3 {
  background: linear-gradient(135deg, var(--accent), var(--neon-blue));
  box-shadow: 0 0 30px var(--accent-glow);
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: spin linear infinite;
}

.ring-1 {
  width: 200px;
  height: 200px;
  border-color: var(--accent-dim);
  animation-duration: 20s;
}

.ring-2 {
  width: 280px;
  height: 280px;
  border-color: rgba(77, 159, 255, 0.1);
  animation-duration: 30s;
  animation-direction: reverse;
}

.ring-3 {
  width: 360px;
  height: 360px;
  border-color: rgba(255, 45, 138, 0.05);
  animation-duration: 40s;
  border-style: dashed;
}

.ring-1::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.ring-2::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
}

.core-glow {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: coreGlow 3s ease-in-out infinite;
}

/* ─── Metrics Section ─── */
.metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 0 3rem;
  border-radius: 16px;
  overflow: hidden;
  animation: fadeUp 0.8s ease-out 1s both;
}

.metric {
  background: var(--bg-elevated);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.metric:hover {
  background: var(--surface);
}

.metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric:hover::before {
  opacity: 1;
}

.metric-value {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  display: inline;
  line-height: 1;
}

.metric-unit {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.3rem;
  letter-spacing: 0.05em;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 1rem;
}

.metric-bar {
  height: 2px;
  background: var(--border);
  margin-top: 1.2rem;
  border-radius: 1px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--neon-blue));
  border-radius: 1px;
  animation: fillBar 1.5s ease-out 1.5s forwards;
}

/* ─── Services Section ─── */
.services {
  position: relative;
  z-index: 2;
  padding: 6rem 3rem;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-number {
  color: var(--accent);
  font-size: 0.7rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.service-card {
  background: var(--bg-elevated);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: all 0.3s ease;
  cursor: default;
  animation: fadeUp 0.5s ease-out both;
  animation-delay: calc(var(--i) * 0.1s + 1.2s);
}

.service-card:hover {
  background: var(--surface);
}

.service-card:hover .service-icon {
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-dim);
  transform: scale(1.2);
}

.service-icon {
  font-size: 1.6rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.service-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.service-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.service-status.running {
  color: var(--accent);
}

.service-status.running::before {
  content: '● ';
  font-size: 0.5em;
  vertical-align: middle;
}

/* ─── Footer ─── */
.footer {
  position: relative;
  z-index: 2;
  padding: 2rem 3rem 3rem;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin-bottom: 2rem;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-separator {
  color: var(--border);
}

.footer-node {
  color: var(--text-dim);
}

/* ─── Animations ─── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes typeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-dim); }
  50% { opacity: 0.5; box-shadow: 0 0 4px var(--accent), 0 0 10px var(--accent-dim); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes glitch {
  0%, 92%, 100% { opacity: 0; }
  93% { opacity: 0.8; transform: translate(-2px, 1px); }
  94% { opacity: 0; }
  95% { opacity: 0.6; transform: translate(2px, -1px); }
  96% { opacity: 0; }
}

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

@keyframes hexAppear {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 0.6; transform: scale(1); }
}

@keyframes coreGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

@keyframes fillBar {
  to { width: var(--width); }
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
    padding: 8rem 2rem 4rem;
  }

  .hero-visual {
    flex: 0 0 280px;
    height: 280px;
  }

  .hero-subtitle {
    justify-content: center;
  }

  .subtitle-line:first-child {
    display: none;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
    margin: 0 2rem;
  }

  .services {
    padding: 4rem 2rem;
  }
}

@media (max-width: 640px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .hero {
    padding: 6rem 1.5rem 3rem;
  }

  .hero-title {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .hero-visual {
    flex: 0 0 220px;
    height: 220px;
  }

  .ring-3 {
    display: none;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
    margin: 0 1.5rem;
  }

  .metric {
    padding: 1.5rem 1rem;
  }

  .metric-value {
    font-size: 2rem;
  }

  .services {
    padding: 3rem 1.5rem;
  }

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

  .footer {
    padding: 2rem 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-separator {
    display: none;
  }
}
