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

:root {
  --bg:       #050508;
  --bg-2:     #0b0b12;
  --bg-3:     #101018;
  --border:   rgba(255,255,255,0.07);
  --accent:   #00e5ff;
  --accent-2: #7c3aed;
  --accent-3: #10b981;
  --text:     #e8eaf0;
  --muted:    #6b7280;
  --font:     system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono:     ui-monospace, 'Cascadia Code', 'Fira Code', Consolas, 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ─── TYPOGRAPHY ─── */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
p { color: var(--muted); }

.accent { color: var(--accent); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 100px;
  margin-bottom: 20px;
  background: rgba(0,229,255,0.05);
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
}

.section-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 60px;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}
.btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,229,255,0.3); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-full { width: 100%; justify-content: center; }

/* ─── NAVBAR ─── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s;
}
#navbar.scrolled {
  padding: 12px 0;
  background: rgba(5,5,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.logo-bracket { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-links .nav-cta {
  padding: 9px 20px;
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  font-weight: 700;
}
.nav-links .nav-cta:hover { background: #fff; color: #000; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,5,8,0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mobile-menu.open { display: flex; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu li { margin: 16px 0; }
.mobile-link {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s;
}
.mobile-link:hover { color: var(--accent); }

/* ─── HERO ─── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 28px;
  padding: 8px 16px;
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 100px;
  background: rgba(0,229,255,0.05);
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent-3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}

/* GLITCH */
.glitch {
  position: relative;
  color: var(--accent);
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
.glitch::before {
  color: #ff3c3c;
  animation: glitch-1 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.glitch::after {
  color: #10b981;
  animation: glitch-2 3s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}
@keyframes glitch-1 {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  92% { transform: translate(-3px, -1px); opacity: 0.8; }
  94% { transform: translate(3px, 1px); opacity: 0.8; }
  96% { transform: translate(-2px, 2px); opacity: 0.8; }
}
@keyframes glitch-2 {
  0%, 90%, 100% { transform: translate(0); opacity: 0; }
  91% { transform: translate(3px, 1px); opacity: 0.8; }
  93% { transform: translate(-3px, -1px); opacity: 0.8; }
  95% { transform: translate(2px, -2px); opacity: 0.8; }
}

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}

/* TERMINAL */
.hero-terminal {
  max-width: 500px;
  background: rgba(11,11,18,0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,229,255,0.05);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }
.terminal-title {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.terminal-body { padding: 16px 20px; }
.terminal-line {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}
.t-prompt { color: var(--accent-3); margin-right: 8px; }
.t-cmd    { color: var(--accent); }
.t-cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.t-output { color: var(--muted); margin-top: 4px; font-size: 12px; }

.hero-scroll {
  position: absolute;
  bottom: 40px;
  right: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.hero-scroll span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollline 2s ease-in-out infinite;
}
@keyframes scrollline {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ─── SERVICES ─── */
#services {
  padding: 120px 0;
  background: var(--bg);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.service-card {
  padding: 36px 32px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s;
  opacity: 0;
  transform: translateY(30px);
  cursor: default;
}
.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.service-card:hover {
  border-color: rgba(0,229,255,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,229,255,0.1);
}
.service-icon {
  width: 52px; height: 52px;
  background: rgba(0,229,255,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent);
  transition: background 0.3s;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card:hover .service-icon { background: rgba(0,229,255,0.15); }
.service-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.service-card p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-tags span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(0,229,255,0.07);
  border: 1px solid rgba(0,229,255,0.15);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ─── ABOUT ─── */
#about {
  padding: 120px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* HEX VISUAL */
.about-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}
.hex-grid {
  position: relative;
  width: 360px;
  height: 360px;
}
.hex {
  position: absolute;
  width: 90px;
  height: 90px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.3s;
  animation: hexFloat 4s ease-in-out infinite;
}
.hex svg { width: 30px; height: 30px; }
.hex:hover {
  border-color: var(--accent);
  background: rgba(0,229,255,0.08);
  box-shadow: 0 0 30px rgba(0,229,255,0.15);
}
.h1 { top: 0;   left: 50%;  transform: translateX(-50%); animation-delay: 0s;    }
.h2 { top: 110px; left: 0;  animation-delay: 0.5s;  }
.h3 { top: 110px; right: 0; animation-delay: 1s;    }
.h4 { top: 220px; left: 0;  animation-delay: 1.5s;  }
.h5 { top: 220px; right: 0; animation-delay: 2s;    }
.h6 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 2.5s; }

@keyframes hexFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.h1 { animation-name: hexFloat1; }
.h6 { animation-name: hexFloat6; }
@keyframes hexFloat1 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-8px); }
}
@keyframes hexFloat6 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-8px); }
}

.about-glow {
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.about-text p {
  margin-bottom: 16px;
  line-height: 1.75;
}
.about-features {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}
.feature-check {
  color: var(--accent-3);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ─── STATS ─── */
#stats {
  padding: 80px 0;
  background: var(--bg);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.stat-card {
  padding: 48px 32px;
  background: var(--bg-2);
  text-align: center;
  transition: background 0.3s;
}
.stat-card:hover { background: var(--bg-3); }
.stat-num {
  font-family: var(--mono);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  color: var(--accent);
  display: inline;
}
.stat-suffix {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--accent);
  display: inline;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 500;
}


/* ─── CONTACT ─── */
#contact {
  padding: 120px 0;
  background: var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-info p { margin-bottom: 32px; line-height: 1.75; }
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text);
}
.contact-item svg { color: var(--accent); flex-shrink: 0; }

.contact-form {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,255,0.08); }
.form-group select option { background: var(--bg-3); }

.form-note {
  font-size: 12px;
  text-align: center;
  margin-top: 16px;
}

/* ─── FOOTER ─── */
footer {
  padding: 80px 0 40px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand .logo { font-size: 22px; display: inline-block; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; margin-bottom: 24px; }
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 38px; height: 38px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; }
.footer-mono {
  font-family: var(--mono);
  color: rgba(0,229,255,0.4);
  font-size: 12px;
}

/* ─── ANIMATIONS & OBSERVERS ─── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .about-grid  { grid-template-columns: 1fr; }
  .about-visual { order: -1; min-height: 300px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-title { font-size: 40px; }
  .hero-terminal { max-width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .section-sub { margin-bottom: 40px; }
  .hero-scroll { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
}
