:root {
  --bg-main: #070b14;
  --bg-secondary: #0b1220;
  --card-bg: rgba(15, 23, 42, 0.7);
  --border: rgba(96, 165, 250, 0.15);

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --blue-1: #60a5fa;
  --blue-2: #3b82f6;
  --blue-3: #1d4ed8;
}

/* RESET */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(800px 400px at 20% -10%, rgba(59,130,246,0.15), transparent),
    radial-gradient(600px 300px at 80% 10%, rgba(96,165,250,0.12), transparent),
    linear-gradient(180deg, var(--bg-main), var(--bg-secondary));
  color: var(--text-main);
  line-height: 1.6;
}

/* LINKS */
a {
  color: inherit;
  text-decoration: none;
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 96px 20px;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 600;
  font-size: 18px;
}

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

/* HAMBURGER ICON */
.hamburger {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

/* Animate to X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

/* DESKTOP NAV */
.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

/* CONTACT BUTTON FIX */
.nav .nav-cta {
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-2), var(--blue-3));
  color: #fff !important;
  font-weight: 500;
  margin-left: 8px;
}

/* MOBILE NAV */
@media (max-width: 768px) {

  .hamburger {
    display: block;
  }

  .nav {
    position: fixed;
    top: 72px;
    right: 16px;
    width: 240px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    z-index: 50;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 8px;
    color: var(--text-main);
  }

  .nav a:hover {
    background: rgba(59,130,246,0.15);
  }

  /* CONTACT BUTTON MOBILE */
  .nav .nav-cta {
    margin-top: 12px;
    text-align: center;
  }
}


/* HERO */
.hero h1 {
  font-size: 48px;
  line-height: 1.15;
  margin: 16px 0;
}

.accent {
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub {
  max-width: 720px;
  font-size: 18px;
  color: var(--text-muted);
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--blue-2), var(--blue-3));
  color: #fff;
  box-shadow: 0 10px 30px rgba(59,130,246,0.25);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(59,130,246,0.35);
}

.btn.ghost {
  border: 1px solid var(--border);
}

/* PILLS */
.quickfacts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(59,130,246,0.08);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* SECTIONS */
.section {
  margin-bottom: 96px;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 16px;
}
.diagram-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;          /* Allow scroll if diagram is wide */
  overflow-y: hidden;
  margin: 1.5rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  background: #0f172a;       /* subtle dark bg (optional) */
}
.diagram-wrapper img {
  width: 100%;
  height: auto;
  max-width: 1200px;         /* Prevents extreme stretching on large screens */
  display: block;
  margin: 0 auto;
  object-fit: contain;
}
@media (max-width: 768px) {
  .diagram-wrapper {
    padding: 0.5rem;
  }

  .diagram-wrapper img {
    max-width: 100%;
  }
}
.diagram-wrapper img {
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.diagram-wrapper img:active {
  transform: scale(1.4);
  cursor: zoom-out;
}
@media (min-width: 1400px) {
  .diagram-wrapper img {
    max-width: 1400px;
  }
}

/* CARDS */
article {
  background: linear-gradient(
    180deg,
    rgba(15,23,42,0.85),
    rgba(15,23,42,0.6)
  );
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(59,130,246,0.15);
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav {
    position: absolute;
    top: 64px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    display: none;
    flex-direction: column;
  }

  .nav.open {
    display: flex;
  }

  .hero h1 {
    font-size: 36px;
  }
}