/* Nuclear Networks — production layout (8px grid, MSP-style rhythm) */

:root {
  --bg: #0b1120;
  --bg-subtle: #0f172a;
  --bg-surface: #151d2f;
  --bg-elevated: #1a2438;
  --border: rgba(148, 163, 184, 0.14);
  --border-subtle: rgba(148, 163, 184, 0.08);
  --text: #f8fafc;
  --text-body: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-soft: #7dd3fc;
  --accent-muted: rgba(56, 189, 248, 0.14);
  --accent-glow: rgba(56, 189, 248, 0.28);
  --success: #4ade80;
  --error: #f87171;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --header-h: 4.5rem;
  --container: 72rem;
  --prose: 36rem;
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* 8px spacing scale */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.25rem;
  --s6: 1.5rem;
  --s8: 2rem;
  --s10: 2.5rem;
  --s12: 3rem;
  --s16: 4rem;
  --s20: 5rem;
  --s24: 6rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
strong {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.5vw, 3.375rem);
  line-height: 1.1;
}

h2 {
  margin: 0;
  font-size: clamp(1.625rem, 2.5vw, 2.125rem);
  line-height: 1.2;
}

h3 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.35;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -6rem;
  left: var(--s4);
  z-index: 200;
  padding: var(--s3) var(--s4);
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--s4);
}

.container {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: var(--s6);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--s8);
  }
}

/* Section blocks — MSP-style vertical rhythm */
.page-section {
  padding-block: var(--s16);
}

@media (min-width: 768px) {
  .page-section {
    padding-block: var(--s24);
  }
}

.page-section--subtle {
  background: var(--bg-subtle);
  border-block: 1px solid var(--border-subtle);
}

.page-section--elevated {
  background: var(--bg-subtle);
  border-block: 1px solid var(--border-subtle);
}

/* Section header pattern: label → title → description */
.section-head {
  margin-bottom: var(--s12);
  max-width: var(--prose);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--wide {
  max-width: 42rem;
}

.section-head .label {
  margin-bottom: var(--s4);
}

.section-head h2 {
  margin-bottom: var(--s4);
}

.section-head .section-desc {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-body);
}

.section-head .section-desc + .section-desc {
  margin-top: var(--s4);
}

.label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-body);
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, backdrop-filter 0.2s;
}

.site-header.is-scrolled {
  background: rgba(11, 17, 32, 0.92);
  border-color: var(--border-subtle);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  height: 100%;
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: var(--s6);
}

@media (min-width: 768px) {
  .header-inner {
    padding-inline: var(--s8);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.logo-mark {
  border-radius: var(--radius-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s6);
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.15s;
}

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

.nav-cta {
  padding: var(--s2) var(--s4) !important;
  background: var(--accent) !important;
  color: var(--bg) !important;
  border-radius: 999px;
  font-weight: 600 !important;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s var(--ease);
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  translate: -50% 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 var(--s6);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), box-shadow 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-surface);
}

.btn-lg {
  min-height: 3rem;
  padding-inline: var(--s8);
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + var(--s12));
  padding-bottom: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding-top: calc(var(--header-h) + var(--s16));
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 85% 35%, rgba(14, 165, 233, 0.18), transparent 60%),
    var(--bg);
}

.hero-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--s12);
}

@media (min-width: 960px) {
  .hero-main {
    grid-template-columns: 1fr 1fr;
    gap: var(--s16);
    align-items: center;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-soft);
}

.eyebrow-mark {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 3px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-atom {
  width: min(22rem, 88vw);
  filter: drop-shadow(0 0 3rem var(--accent-glow));
}

@media (max-width: 639px) {
  .hero-atom {
    width: min(18rem, 78vw);
    filter: drop-shadow(0 0 1.25rem var(--accent-glow));
  }
}

/* Stats row — full width below hero copy (MSP pattern) */
.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--s4);
  margin-top: var(--s12);
  padding-bottom: var(--s16);
}

@media (min-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s6);
    margin-top: var(--s16);
    padding-bottom: var(--s20);
  }
}

.stat-card {
  padding: var(--s6);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.stat-card strong {
  display: block;
  margin-bottom: var(--s1);
  font-size: 0.9375rem;
}

.stat-card span {
  display: block;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Trust strip */
.trust-strip {
  padding-block: var(--s8);
  background: var(--bg-subtle);
  border-block: 1px solid var(--border-subtle);
}

.trust-strip p {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
}

/* Two-column layouts */
.layout-split {
  display: grid;
  gap: var(--s12);
}

@media (min-width: 960px) {
  .layout-split {
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--s16);
    align-items: start;
  }

  .layout-split .section-head {
    margin-bottom: 0;
  }
}

.layout-split--form {
  gap: var(--s12);
}

@media (min-width: 960px) {
  .layout-split--form {
    grid-template-columns: 1fr 1.15fr;
    gap: var(--s16);
    align-items: start;
  }
}

/* Card grids */
.card-grid {
  display: grid;
  gap: var(--s6);
}

.card-grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--s8);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.card strong {
  display: block;
  font-size: 0.9375rem;
}

.card p {
  margin-top: var(--s3);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-body);
}

.card--featured {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.06) 0%, var(--bg-surface) 40%);
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--s4);
  padding: var(--s2);
  color: var(--accent);
  background: var(--accent-muted);
  border-radius: var(--radius);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card .tag,
.card .service-badge {
  margin-top: auto;
}

.card p + .tag,
.card p + .service-badge {
  margin-top: var(--s4);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 0.28rem var(--s3) 0.22rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: var(--accent-muted);
  border-radius: 999px;
}

.service-badge {
  display: inline-grid;
  place-items: center;
  align-self: flex-start;
  height: 1.75rem;
  padding-inline: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.service-badge > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.tag--corner {
  position: absolute;
  top: var(--s6);
  right: var(--s6);
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.section-head .feature-list {
  margin-top: var(--s6);
}

.callout {
  margin-top: var(--s8);
  padding: var(--s6);
  font-size: 0.9375rem;
  line-height: 1.6;
  background: var(--accent-muted);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius);
}

.callout strong {
  color: var(--accent-soft);
}

/* Process steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 40rem;
}

.steps--center {
  margin-inline: auto;
}

.step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--s6);
  padding-block: var(--s8);
  border-bottom: 1px solid var(--border-subtle);
}

.step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step:first-child {
  padding-top: 0;
}

.step-num {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-muted);
  border-radius: 50%;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding-top: var(--s1);
}

.step-body p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Pricing */
.pricing-grid {
  display: grid;
  gap: var(--s6);
}

@media (min-width: 640px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
  }
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s10);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.pricing-card--featured {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.25);
}

.pricing-card h3 {
  margin-bottom: var(--s1);
}

.pricing-meta {
  margin-bottom: var(--s6);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.feature-list {
  flex: 1;
  margin-bottom: var(--s8);
}

.feature-list li {
  position: relative;
  padding-left: 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.feature-list li + li {
  margin-top: var(--s3);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.feature-list--checks li::before {
  content: "✓";
  top: 0;
  width: auto;
  height: auto;
  background: none;
  color: var(--success);
  font-weight: 700;
}

/* CTA band */
.cta-band {
  padding: var(--s12);
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .cta-band {
    padding: var(--s16) var(--s12);
  }
}

.cta-band h2 {
  max-width: 20ch;
  margin-inline: auto;
}

.cta-band p {
  max-width: 36ch;
  margin: var(--s4) auto var(--s8);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Form */
.lead-form {
  padding: var(--s8);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .lead-form {
    padding: var(--s10);
  }
}

.form-grid {
  display: grid;
  gap: var(--s6);
}

.form-row {
  display: grid;
  gap: var(--s6);
}

@media (min-width: 480px) {
  .form-row--2 {
    grid-template-columns: 1fr 1fr;
  }

  .form-row--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.required {
  color: var(--accent);
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: var(--s3) var(--s4);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea {
  min-height: 8rem;
  padding-block: var(--s3);
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
  padding-top: var(--s2);
}

.form-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-status {
  margin-top: var(--s4);
  font-size: 0.9375rem;
}

.form-status[data-state="success"] {
  color: var(--success);
}

.form-status[data-state="error"] {
  color: var(--error);
}

/* Footer */
.site-footer {
  padding-block: var(--s12);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}

@media (min-width: 640px) {
  .footer-grid {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.footer-brand strong {
  display: block;
  font-size: 0.9375rem;
}

.footer-brand p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: var(--s6);
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-body);
}

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

.footer-legal {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-disclaimer {
  width: 100%;
  max-width: 760px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s4);
    background: rgba(11, 17, 32, 0.98);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s var(--ease), opacity 0.2s, visibility 0.2s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav a {
    padding: var(--s4) var(--s2);
    border-bottom: 1px solid var(--border-subtle);
  }

  .site-nav .nav-cta {
    margin-top: var(--s2);
    text-align: center;
    border: none;
  }

  .hero-copy {
    text-align: center;
    align-items: center;
  }

  .hero-actions {
    justify-content: center;
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .hero-actions .btn-primary {
    padding-inline: var(--s4);
    font-size: 0.875rem;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
  }

  .hero-media {
    order: -1;
  }

  .tag--corner {
    position: static;
    margin-bottom: var(--s4);
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }
}
