/* ===== CSS VARIABLES ===== */
:root {
  --bg: #050a0f;
  --bg2: #080e15;
  --bg3: #0c1520;
  --surface: #0f1e2e;
  --surface2: #162536;
  --border: #1e3448;
  --border2: #254259;
  --accent: #00d4ff;
  --accent2: #00ff88;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --accent2-dim: rgba(0, 255, 136, 0.1);
  --text: #e2eaf4;
  --text2: #8ba4bc;
  --text3: #4d6b85;
  --danger: #ff4455;
  --warning: #ffb347;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Outfit', sans-serif;
  --radius: 6px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ===== CANVAS BG ===== */
#grid-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* ===== UTILITIES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.accent { color: var(--accent); }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  opacity: 0.8;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--text2);
  font-size: 1rem;
  max-width: 560px;
  margin-bottom: 3.5rem;
  line-height: 1.75;
  font-weight: 400;
}

/* ===== NAV ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition);
  padding: 0 2rem;
}
#navbar.scrolled {
  background: rgba(5, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}
.logo-bracket { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text2);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}
.nav-links a:not(.nav-cta):hover { color: var(--accent); }
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  transition: background var(--transition), box-shadow var(--transition) !important;
}
.nav-cta:hover {
  background: #22e8ff !important;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}
.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: var(--transition);
}
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  background: rgba(5, 10, 15, 0.97);
}
.mobile-menu a {
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu.open { display: flex; }

/* ===== HERO ===== */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 2rem 4rem;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 20px;
  background: var(--accent2-dim);
  width: fit-content;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.1s;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero-title .line {
  display: block;
  animation: fadeUp 0.7s ease both;
  animation-delay: calc(var(--d) * 0.12s + 0.15s);
}
.hero-sub {
  color: var(--text2);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 460px;
  margin-bottom: 2.5rem;
  font-weight: 400;
  animation: fadeUp 0.7s ease both;
  animation-delay: calc(var(--d) * 0.12s + 0.15s);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 3rem;
  animation: fadeUp 0.7s ease both;
  animation-delay: calc(var(--d) * 0.12s + 0.15s);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn-primary:hover {
  background: #22e8ff;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.45);
  transform: translateY(-2px);
}
.btn-ghost {
  color: var(--text2);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition);
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeUp 0.7s ease both;
  animation-delay: calc(var(--d) * 0.12s + 0.15s);
}
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 700;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px; height: 36px;
  background: var(--border);
}

/* HEX GRID */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1s ease both;
  animation-delay: 0.6s;
}
.hex-grid {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 10px;
  transform: rotate(-15deg);
}
.hex {
  width: 80px; height: 90px;
  background: var(--surface);
  border: 1px solid var(--border);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text3);
  transition: all 0.5s ease;
  position: relative;
  cursor: default;
}
.hex::before {
  content: attr(data-label);
  position: absolute;
}
.hex.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  animation: hexPulse 3s ease infinite;
}
.hex:nth-child(even).active { animation-delay: 1.5s; }
@keyframes hexPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.2); }
  50% { box-shadow: 0 0 35px rgba(0, 212, 255, 0.5); }
}
.hex:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
}

/* ===== ABOUT ===== */
#about {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-text h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.about-text p {
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  max-width: 480px;
  font-size: 0.97rem;
  font-weight: 400;
}
.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}
.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent2);
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 3px;
  background: var(--accent2-dim);
  letter-spacing: 0.05em;
}

/* TERMINAL */
.about-terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,212,255,0.05);
}
.terminal-header {
  background: var(--surface);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.t-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #ffbd2e; }
.t-dot.green { background: #28c840; }
.t-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text3);
  margin-left: 0.5rem;
}
.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 220px;
}
.t-line {
  margin-bottom: 0.5rem;
  min-height: 1.2em;
}
.t-prompt { color: var(--accent2); margin-right: 0.6rem; }
.t-cmd { color: var(--accent); }
.t-out { color: var(--text2); padding-left: 1.5rem; }
.t-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== SERVICES ===== */
#services {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,212,255,0.02) 50%, transparent 100%);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.services-grid .service-card:last-child:nth-child(3n - 1) {
  grid-column: 2;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: default;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover {
  border-color: rgba(0,212,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,212,255,0.1);
}
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 48px; height: 48px;
  color: var(--accent);
  margin-bottom: 1rem;
}
.service-icon svg { width: 100%; height: 100%; }
.service-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text3);
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  letter-spacing: 0.1em;
}
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--text);
}
.service-card p {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.78;
  margin-bottom: 1.5rem;
  font-weight: 400;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.service-tags li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text3);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: color var(--transition), border-color var(--transition);
}
.service-card:hover .service-tags li {
  color: var(--accent);
  border-color: rgba(0,212,255,0.3);
}

/* ===== STANDARDS ===== */
#standards {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
}
.standards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.std-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.std-card:hover {
  border-color: rgba(0,212,255,0.35);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.std-icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  min-width: 64px;
  text-align: center;
}
.std-info { display: flex; flex-direction: column; gap: 0.2rem; }
.std-info strong { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.std-info span { font-size: 0.78rem; color: var(--text3); line-height: 1.4; }

/* ===== PROCESS ===== */
#process {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(8,14,21,0.8) 50%, transparent 100%);
}
.process-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 1rem;
}
.process-step {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: border-color var(--transition);
}
.process-step:hover { border-color: rgba(0,212,255,0.35); }
.process-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  padding: 0 0.75rem;
  margin-top: 2.5rem;
  opacity: 0.5;
  flex-shrink: 0;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.step-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.step-content p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.75;
  font-weight: 400;
}

/* ===== CONTACT ===== */
#contact {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
}
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.ci-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ci-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}
a.ci-value:hover { color: var(--accent); }
.contact-note {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--text3);
  line-height: 1.6;
}
.contact-note svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); opacity: 0.6; }

/* FORM */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.req { color: var(--accent); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234d6b85' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}
.form-group select option { background: var(--surface); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text3); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  text-transform: uppercase;
}
.btn-submit:hover {
  background: #22e8ff;
  box-shadow: 0 0 30px rgba(0,212,255,0.4);
  transform: translateY(-1px);
}
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-msg {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: var(--font-mono);
}
.form-msg.success {
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.3);
  color: var(--accent2);
}
.form-msg.error {
  background: rgba(255,68,85,0.1);
  border: 1px solid rgba(255,68,85,0.3);
  color: var(--danger);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  background: var(--bg2);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.footer-brand .logo-bracket { color: var(--accent); }
.footer-brand {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
}
.footer-brand p {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text3);
  margin-top: 0.5rem;
  font-weight: 400;
}
.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text3);
  font-weight: 600;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  font-size: 0.78rem;
  color: var(--text3);
  font-family: var(--font-mono);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  #hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid .service-card:last-child:nth-child(3n - 1) { grid-column: auto; }
  .standards-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { flex-direction: column; gap: 1rem; }
  .process-arrow { transform: rotate(90deg); margin: 0 auto; padding: 0; }
  .contact-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .standards-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }
  #hero { padding: 100px 1.5rem 3rem; }
}
@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .stat-divider { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; text-align: center; }
}
