:root {
  --bg: #070b13;
  --bg-soft: #101827;
  --surface: rgba(255, 255, 255, 0.07);
  --surface-2: rgba(255, 255, 255, 0.1);
  --card: #ffffff;
  --text: #eef4ff;
  --text-dark: #172033;
  --muted: #aab7c8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #d21f3c;
  --accent-2: #f4c95d;
  --accent-3: #3569ff;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(210, 31, 60, 0.22), transparent 28%),
    radial-gradient(circle at 85% 0%, rgba(244, 201, 93, 0.14), transparent 23%),
    radial-gradient(circle at 60% 70%, rgba(53, 105, 255, 0.14), transparent 30%),
    linear-gradient(180deg, #070b13 0%, #101827 52%, #090d16 100%);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 19, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), #8e1027 55%, var(--accent-3));
  box-shadow: 0 12px 34px rgba(210, 31, 60, 0.38);
  letter-spacing: -0.04em;
}

.brand-text { white-space: nowrap; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.25s ease;
}
.site-nav a:hover,
.site-nav a.active { color: var(--white); }

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 20px;
}

.hero {
  position: relative;
  padding: 96px 0 54px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,11,19,0.98) 0%, rgba(7,11,19,0.72) 52%, rgba(7,11,19,0.92) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520'%3E%3Crect width='900' height='520' fill='%23101827'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.12' stroke-width='3'%3E%3Cpath d='M0 390 C160 360 240 420 390 385 C520 355 640 300 900 335'/%3E%3Cpath d='M80 330 L130 250 L180 330 M118 275 L142 275'/%3E%3Cpath d='M260 330 L260 215 L315 330 L315 215'/%3E%3Cpath d='M410 330 L430 225 L450 330 L470 225 L490 330'/%3E%3Cpath d='M610 330 L610 235 L690 235 L690 330'/%3E%3Cpath d='M730 330 L780 240 L830 330'/%3E%3C/g%3E%3Cg fill='%23d21f3c' fill-opacity='.18'%3E%3Ccircle cx='160' cy='110' r='90'/%3E%3Ccircle cx='750' cy='160' r='120'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  opacity: 0.95;
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 34px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 4.8vw, 5.2rem);
  line-height: 1.02;
  max-width: 820px;
  letter-spacing: -0.055em;
}
.hero-text {
  color: var(--muted);
  max-width: 720px;
  margin: 22px 0 0;
  font-size: 1.08rem;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8e1027);
  color: var(--white);
  box-shadow: 0 18px 38px rgba(210,31,60,0.3);
}
.btn-secondary {
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--white);
  background: rgba(255,255,255,0.04);
}
.hero-panel .panel-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.panel-card h3 { margin-top: 0; }
.logic-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.logic-list li + li { margin-top: 12px; }
.glow {
  box-shadow: 0 0 0 1px rgba(244, 201, 93, 0.12), 0 34px 70px rgba(0, 0, 0, 0.3);
}

.intro-band { padding-top: 18px; }
.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.intro-card,
.content-card,
.network-card,
.query-card,
.contact-card,
.implementation-step {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card-index {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section { padding: 86px 0; }
.section.alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.012));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section.dark {
  background:
    radial-gradient(circle at top right, rgba(210, 31, 60, 0.18), transparent 35%),
    linear-gradient(180deg, #050812 0%, #101522 100%);
}
.section-head {
  max-width: 840px;
  margin-bottom: 32px;
}
.section-head.left { margin-bottom: 26px; }
.section-head.light p,
.section-head.light h2 { color: var(--white); }
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.section-head p { margin: 0; color: var(--muted); }

.card-grid {
  display: grid;
  gap: 22px;
}
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card-grid.compact .content-card { min-height: 100%; }

.content-card {
  background: var(--card);
  color: var(--text-dark);
  box-shadow: var(--shadow);
}
.content-card h3,
.network-card h3,
.query-card h3,
.contact-card h3,
.implementation-step h3,
.intro-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}
.content-card p,
.network-card p,
.query-card p,
.contact-card p,
.implementation-step p,
.intro-card p {
  margin: 0;
}
.highlight {
  position: relative;
  overflow: hidden;
}
.highlight::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}
.dark-card {
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.timeline {
  display: grid;
  gap: 18px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 0; }
.timeline-item span {
  font-weight: 800;
  color: var(--white);
}
.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.network-grid,
.query-grid,
.contact-grid,
.implementation-grid {
  display: grid;
  gap: 22px;
}
.network-grid { grid-template-columns: repeat(2, 1fr); }
.query-grid { grid-template-columns: repeat(3, 1fr); }
.contact-grid { grid-template-columns: 1fr 1fr 1.25fr; align-items: start; }
.implementation-grid { grid-template-columns: repeat(4, 1fr); }
.implementation-step span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(244, 201, 93, 0.14);
  color: var(--accent-2);
  font-weight: 900;
  margin-bottom: 16px;
}

.contact-wrap { position: relative; }
.contact-form {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-form label {
  display: block;
  margin-bottom: 16px;
  font-weight: 700;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #8ea0b7; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero-grid,
  .contact-grid,
  .implementation-grid,
  .card-grid.four,
  .query-grid,
  .intro-grid,
  .card-grid.three,
  .network-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid > :last-child,
  .hero-grid > :last-child {
    grid-column: 1 / -1;
  }
  .site-nav {
    position: fixed;
    top: 78px;
    right: 20px;
    left: 20px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(7, 11, 19, 0.97);
    border: 1px solid var(--line);
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav.open { display: flex; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 760px) {
  .container { width: min(var(--max), calc(100% - 24px)); }
  .hero { padding-top: 66px; }
  .hero-grid,
  .intro-grid,
  .card-grid.three,
  .card-grid.four,
  .network-grid,
  .query-grid,
  .contact-grid,
  .implementation-grid {
    grid-template-columns: 1fr;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .brand-text {
    max-width: 180px;
    white-space: normal;
    line-height: 1.1;
  }
}
