:root{
  --bg: #0a0b0d;
  --bg-alt: #0f1114;
  --surface: #15171b;
  --surface-2: #1c1f24;
  --border: #262a30;
  --text: #e9eaec;
  --text-muted: #9aa0a8;
  --text-dim: #676d76;
  --accent: #d9dbe0;
  --accent-strong: #ffffff;
  --ok: #4ade80;
  --warn: #f5b942;
  --danger: #f2545b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --radius: 12px;
  --max-width: 1100px;
}

*{ box-sizing: border-box; margin: 0; padding: 0; }

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a{ color: inherit; text-decoration: none; }
ul{ list-style: none; }

/* background grid texture */
.grid-overlay{
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
}

/* NODE NETWORK background */
.node-network{
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right,
    black 0, black calc(50% - 700px),
    rgba(0,0,0,0.28) calc(50% - 580px), rgba(0,0,0,0.28) calc(50% + 580px),
    black calc(50% + 700px), black 100%);
  mask-image: linear-gradient(to right,
    black 0, black calc(50% - 700px),
    rgba(0,0,0,0.28) calc(50% - 580px), rgba(0,0,0,0.28) calc(50% + 580px),
    black calc(50% + 700px), black 100%);
}
#network-svg{
  width: 100%;
  height: 100%;
  display: block;
}
.wire{
  fill: none;
  stroke: rgba(255,255,255,0.10);
  stroke-width: 1.4;
}
.packet{
  fill: #eef0f2;
}
.network-node{
  fill: #0f1114;
  stroke: #d9dbe0;
  stroke-width: 1.6;
}

/* HEADER */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,11,13,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled{ border-bottom-color: var(--border); }

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand{
  display: flex;
  align-items: center;
}
.brand-logo{
  height: 34px;
  width: auto;
  display: block;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14.5px;
  color: var(--text-muted);
}
.site-nav a{ transition: color .15s ease; }
.site-nav a:hover{ color: var(--text); }
.nav-cta{
  color: var(--bg) !important;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.nav-cta:hover{ background: var(--accent-strong) !important; color: var(--bg) !important; }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span{
  width: 22px; height: 2px; background: var(--text);
}

/* HERO */
.hero{
  padding: 120px 0 100px;
  position: relative;
}
.hero-inner{ max-width: 720px; }

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ok);
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.25);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.status-dot{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{ opacity: 1; }
  50%{ opacity: 0.4; }
}

.hero h1{
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

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

.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; }

.btn{
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.btn-primary{
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover{ background: var(--accent-strong); transform: translateY(-1px); }
.btn-ghost{
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }

/* SECTION shared */
.section-tag{
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title{
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}

.services{ padding: 90px 0; border-top: 1px solid var(--border); }

.card-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover{
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-3px);
}
.card-icon{
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px;
  color: var(--accent);
  margin-bottom: 18px;
}
.card h3{ font-size: 17px; margin-bottom: 10px; }
.card p{ color: var(--text-muted); font-size: 14.5px; margin-bottom: 16px; }
.card-list{ display: flex; flex-direction: column; gap: 6px; }
.card-list li{
  font-size: 13.5px;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}
.card-list li::before{
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* LAB / DASHBOARD */
.lab{ padding: 90px 0; border-top: 1px solid var(--border); }
.lab-sub{
  color: var(--text-muted);
  margin-top: -20px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
}
.badge{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--warn);
  background: rgba(245,185,66,0.1);
  border: 1px solid rgba(245,185,66,0.3);
  padding: 3px 8px;
  border-radius: 5px;
}

.dashboard{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
}

.panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.panel-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.panel-status{ grid-column: 1; grid-row: 1; }
.panel-services{ grid-column: 2; grid-row: 1 / 3; }
.panel-graph{ grid-column: 1; grid-row: 2; }
.panel-note{ grid-column: 1 / 2; grid-row: 3; }

.stat-row{ display: flex; gap: 36px; flex-wrap: wrap; }
.stat{ display: flex; flex-direction: column; }
.stat-value{
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
}
.stat-unit{
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-muted);
}
.stat-label{
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

.service-list li{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.service-list li:last-child{ border-bottom: none; }
.dot{ width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-up{ background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot-warn{ background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.tag{
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ok);
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.2);
  padding: 2px 8px;
  border-radius: 999px;
}
.tag-warn{
  color: var(--warn);
  background: rgba(245,185,66,0.08);
  border-color: rgba(245,185,66,0.2);
}

.sparkline{
  width: 100%;
  height: 100px;
  overflow: visible;
}
.sparkline polyline{
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.35));
}

.panel-note p{
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ABOUT */
.about{ padding: 90px 0; border-top: 1px solid var(--border); }
.about-inner{ max-width: 640px; }
.about-inner p{ color: var(--text-muted); font-size: 15.5px; }

/* CONTACT FORM */
.contact-form{ padding: 90px 0; border-top: 1px solid var(--border); }
.contact-form-inner{ max-width: 620px; }
.contact-sub{ color: var(--text-muted); font-size: 15.5px; margin-top: -20px; margin-bottom: 36px; }

.cf{
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row label{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.form-row input,
.form-row textarea{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14.5px;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus{
  outline: none;
  border-color: rgba(255,255,255,0.4);
}
.hp-field{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.cf .btn{
  align-self: flex-start;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.cf .btn[disabled]{
  opacity: 0.6;
  cursor: not-allowed;
}
.form-status{
  font-size: 13.5px;
  min-height: 18px;
  color: var(--text-muted);
}
.form-status.success{ color: var(--ok); }
.form-status.error{ color: var(--danger); }

/* FOOTER */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo{
  height: 28px;
  width: auto;
  display: block;
}
.footer-copy{
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 8px;
}
.footer-email{
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-muted);
  transition: color .15s ease;
}
.footer-email:hover{ color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 860px){
  .card-grid{ grid-template-columns: 1fr; }
  .dashboard{ grid-template-columns: 1fr; }
  .panel-status,.panel-services,.panel-graph,.panel-note{ grid-column: 1; grid-row: auto; }
}

@media (max-width: 720px){
  .site-nav{
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
    display: none;
  }
  .site-nav.open{ display: flex; }
  .nav-toggle{ display: flex; }
  .hero{ padding: 90px 0 70px; }
}
