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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #1e1e2e;
  --text-primary: #e2e2ea;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --accent: #6c63ff;
  --accent-dim: #4f48b8;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --rose: #f472b6;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Utility ───────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 540px;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  background: var(--accent-glow);
  margin-bottom: 1rem;
}

/* ── Nav ───────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2rem;
}

.hero-arrow {
  display: inline-block;
  margin-top: 2rem;
  animation: float 2s ease-in-out infinite;
  color: var(--text-muted);
  font-size: 1.5rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ── Infrastructure ────────────────────────────────────── */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.infra-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.infra-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.infra-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.infra-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.infra-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Services ──────────────────────────────────────────── */
#services {
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-dim);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.service-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.service-icon.media      { background: rgba(244, 114, 182, 0.12); }
.service-icon.identity   { background: rgba(108, 99, 255, 0.12); }
.service-icon.security   { background: rgba(251, 191, 36, 0.12); }
.service-icon.dns        { background: rgba(34, 211, 238, 0.12); }
.service-icon.monitoring { background: rgba(52, 211, 153, 0.12); }
.service-icon.photos     { background: rgba(108, 99, 255, 0.12); }
.service-icon.tunnel     { background: rgba(244, 114, 182, 0.12); }

.service-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.service-info .service-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.service-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ── Network ───────────────────────────────────────────── */
.network-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.vlan-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vlan-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s;
}

.vlan-item:hover {
  border-color: var(--accent-dim);
}

.vlan-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vlan-dot.guest   { background: var(--cyan); }
.vlan-dot.iot     { background: var(--amber); }
.vlan-dot.server  { background: var(--accent); }
.vlan-dot.home    { background: var(--green); }

.vlan-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.vlan-desc {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Network diagram (CSS art) */
.network-diagram {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  min-height: 320px;
}

.diagram-node {
  position: absolute;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.diagram-node .node-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 0.35rem;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.diagram-node.router   { top: 8%; left: 50%; transform: translateX(-50%); }
.diagram-node.firewall .node-icon,
.diagram-node.router .node-icon   { border-color: var(--accent-dim); }
.diagram-node.hypervisor { top: 45%; left: 15%; }
.diagram-node.storage    { top: 45%; right: 15%; left: auto; }
.diagram-node.docker     { top: 80%; left: 50%; transform: translateX(-50%); }

/* Lines connecting nodes */
.diagram-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.diagram-lines svg {
  width: 100%;
  height: 100%;
}

.diagram-lines line {
  stroke: var(--border);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}

.vpn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  width: 100%;
}

.vpn-badge .vlan-dot {
  background: var(--rose);
}

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

footer span {
  color: var(--accent);
}

/* ── Animations ────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

  .nav-links {
    display: none;
  }

  .network-layout {
    grid-template-columns: 1fr;
  }

  .network-diagram {
    min-height: 280px;
  }

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

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

@media (max-width: 480px) {
  .infra-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Scroll-triggered animation via IntersectionObserver ─ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
