/* ===========================
   Container & section
   =========================== */
.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 var(--spacing-3);
  position: relative;
}

.section {
  padding: var(--spacing-7) 0;
  position: relative;
}

.section-tight {
  padding: var(--spacing-6) 0;
}

.grid {
  display: grid;
  gap: var(--spacing-4);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Force exactly 3 columns per row (used by Service Modules + Industries) */
.grid-3--fixed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .grid-3--fixed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-3--fixed {
    grid-template-columns: 1fr;
  }
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===========================
   Header
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition:
    background var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    backdrop-filter var(--duration-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-solid {
  background: rgba(4, 17, 27, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: var(--spacing-3);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--smoke-white);
  font-size: 1.3rem;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  position: relative;
  text-decoration: none;
}

.logo-mark {
  display: block;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(22, 194, 213, 0.45));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.06);
  filter: drop-shadow(0 0 14px rgba(77, 224, 240, 0.7));
}

.logo-word {
  display: inline-block;
  line-height: 1;
}

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

.nav-link {
  position: relative;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 248, 251, 0.78);
  padding: 8px 2px;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--grad-primary-bright);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--duration-base) var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--cyan-bright);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-default);
  background: rgba(15, 35, 52, 0.4);
  color: var(--smoke-white);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.nav-toggle:hover {
  border-color: var(--cyan-aviation);
}

/* ===========================
   Hero
   =========================== */
.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  align-items: center;
  padding: var(--spacing-7) 0 var(--spacing-7);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(22, 194, 213, 0.18) 0%, transparent 60%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: heroGlow 18s var(--ease-in-out) infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(255, 122, 69, 0.08) 0%, transparent 65%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

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

.hero-grid {
  display: grid;
  gap: var(--spacing-5);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  margin-top: var(--spacing-3);
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 30% 30%, rgba(77, 224, 240, 0.22) 0%, transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(10, 110, 122, 0.45) 0%, transparent 55%),
    linear-gradient(160deg, rgba(15, 35, 52, 0.8), rgba(4, 17, 27, 0.95));
  min-height: 420px;
  border: 1px solid var(--border-cyan);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover), inset 0 0 60px rgba(22, 194, 213, 0.08);
  isolation: isolate;
}

.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-bright), transparent);
  top: 0;
  left: 0;
  opacity: 0.9;
  box-shadow: 0 0 12px 2px rgba(77, 224, 240, 0.6);
}

.scan-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22, 194, 213, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 194, 213, 0.1) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9), transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9), transparent 75%);
  opacity: 0.7;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--grad-hero-overlay);
  pointer-events: none;
}

/* ===========================
   Stats grid
   =========================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-3);
}

/* ===========================
   CTA banner — redesign
   =========================== */
.section--cta {
  padding-bottom: var(--spacing-8);
}

.cta-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--spacing-6);
  align-items: center;
  padding: var(--spacing-7) var(--spacing-6);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-cyan-strong);
  /* fallback bg when video hasn't loaded yet */
  background: linear-gradient(135deg, rgba(10, 110, 122, 0.3) 0%, rgba(4, 17, 27, 1) 60%);
  box-shadow:
    var(--shadow-card-hover),
    0 0 100px -24px rgba(22, 194, 213, 0.35);
}

/* Background video — fills the banner completely */
.cta-banner__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.88;
  filter: saturate(0.75) brightness(0.88);
}

/* Light scrim — just enough to keep text readable, video stays dominant */
.cta-banner__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,  rgba(4, 17, 27, 0.62) 0%, rgba(4, 17, 27, 0.18) 50%, transparent 100%),
    linear-gradient(180deg, rgba(4, 17, 27, 0.25) 0%, transparent 35%, rgba(4, 17, 27, 0.35) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Scan grid — sits above scrim */
.cta-banner__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22, 194, 213, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 194, 213, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 50%, rgba(0,0,0,0.8), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, rgba(0,0,0,0.8), transparent 70%);
  pointer-events: none;
  z-index: 2;
}

/* Animated sweep line */
.cta-banner__sweep {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--cyan-bright) 50%, transparent 95%);
  box-shadow: 0 0 14px 4px rgba(77, 224, 240, 0.45);
  animation: aiSweep 6s var(--ease-in-out) infinite;
  z-index: 3;
  pointer-events: none;
}

/* Corner targeting brackets — same pattern as AI scan frame */
.cta-banner__corner {
  position: absolute;
  width: 22px; height: 22px;
  z-index: 4;
}
.cta-banner__corner::before,
.cta-banner__corner::after {
  content: '';
  position: absolute;
  background: var(--cyan-aviation);
  box-shadow: 0 0 8px rgba(22, 194, 213, 0.7);
  border-radius: 1px;
}
.cta-banner__corner::before { width: 100%; height: 2px; }
.cta-banner__corner::after  { width: 2px;  height: 100%; }

.cta-banner__corner--tl { top: 14px; left: 14px; }
.cta-banner__corner--tl::before,
.cta-banner__corner--tl::after  { top: 0; left: 0; }

.cta-banner__corner--tr { top: 14px; right: 14px; }
.cta-banner__corner--tr::before { top: 0; right: 0; left: auto; }
.cta-banner__corner--tr::after  { top: 0; right: 0; left: auto; }

.cta-banner__corner--bl { bottom: 14px; left: 14px; }
.cta-banner__corner--bl::before { bottom: 0; top: auto; left: 0; }
.cta-banner__corner--bl::after  { bottom: 0; top: auto; left: 0; }

.cta-banner__corner--br { bottom: 14px; right: 14px; }
.cta-banner__corner--br::before { bottom: 0; top: auto; right: 0; left: auto; }
.cta-banner__corner--br::after  { bottom: 0; top: auto; right: 0; left: auto; }

/* ── Left body ── */
.cta-banner__body {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
}

.cta-banner__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0;
}

.cta-banner__sub {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(244, 248, 251, 0.72);
  max-width: 480px;
  margin: 0;
}

.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  margin-top: var(--spacing-1);
}

/* ── Right stat grid ── */
.cta-banner__stats {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-cyan);      /* 1px gaps become cyan dividers */
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cta-banner__stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--spacing-4) var(--spacing-3);
  background: rgba(7, 27, 42, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--duration-base) var(--ease-out);
}

.cta-banner__stat:hover {
  background: rgba(22, 45, 70, 0.7);
}

.cta-banner__stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.cta-banner__stat-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(183, 240, 248, 0.6);
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 900px) {
  .cta-banner {
    grid-template-columns: 1fr;
    gap: var(--spacing-5);
    padding: var(--spacing-5) var(--spacing-4);
  }

  .cta-banner__stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 580px) {
  .cta-banner__stats {
    grid-template-columns: 1fr 1fr;
  }

  .cta-banner__title {
    font-size: 1.75rem;
  }
}

/* ===========================
   Timeline
   =========================== */
.timeline {
  display: grid;
  gap: var(--spacing-3);
  border-left: 1px solid var(--border-default);
  padding-left: var(--spacing-4);
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 1px;
  height: 30%;
  background: linear-gradient(180deg, var(--cyan-bright), transparent);
  pointer-events: none;
}

.timeline-item {
  position: relative;
  padding-left: var(--spacing-2);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--grad-primary-bright);
  box-shadow: 0 0 0 4px rgba(22, 194, 213, 0.12), 0 0 16px rgba(77, 224, 240, 0.55);
}

/* ===========================
   Form grid + map placeholder
   =========================== */
.form-grid {
  display: grid;
  gap: var(--spacing-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.map-placeholder {
  position: relative;
  border-radius: var(--radius-lg);
  min-height: 320px;
  border: 1px dashed var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-metallic);
  background:
    radial-gradient(circle at 50% 50%, rgba(22, 194, 213, 0.08), transparent 60%),
    rgba(7, 27, 42, 0.4);
  overflow: hidden;
}

.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22, 194, 213, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 194, 213, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  position: relative;
  padding: var(--spacing-6) 0 var(--spacing-4);
  margin-top: var(--spacing-5);
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, transparent, rgba(4, 17, 27, 0.6));
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(60%, 720px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-aviation), transparent);
}

.footer-grid {
  display: grid;
  gap: var(--spacing-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-grid h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin-bottom: 14px;
}

.footer-bottom {
  margin-top: var(--spacing-4);
  padding-top: var(--spacing-3);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  justify-content: space-between;
  color: var(--gray-metallic);
  font-size: 0.825rem;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 960px) {
  .site-nav {
    position: fixed;
    inset: 0;
    background: rgba(4, 17, 27, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-4);
    transform: translateY(-100%);
    transition: transform var(--duration-base) var(--ease-out);
    z-index: 40;
  }

  body.nav-open .site-nav {
    transform: translateY(0);
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: auto;
    padding: var(--spacing-6) 0;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--spacing-6) 0;
  }

  .cta-banner {
    padding: var(--spacing-4);
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .btn {
    padding: 13px 22px;
  }
}

/* ===========================
   Hero blueprint + scan log
   =========================== */
.hero-visual--blueprint {
  min-height: 460px;
  padding: var(--spacing-4);
  display: grid;
  place-items: center;
}

.hero-blueprint {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(22, 194, 213, 0.25));
}

.hero-blueprint .bp-stroke {
  fill: none;
  stroke: url(#blueprintStroke);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: bpDraw 2.4s cubic-bezier(.65,.05,.2,1) forwards;
}

.hero-blueprint .bp-stroke--dim {
  stroke-width: 0.6;
  stroke-dasharray: 4 6;
  opacity: 0.45;
  animation-delay: 0.6s;
}

@keyframes bpDraw {
  to { stroke-dashoffset: 0; }
}

.hero-blueprint .defect {
  opacity: 0;
  animation: defectIn 0.5s ease forwards;
  animation-delay: var(--defect-delay, 2.6s);
}

.hero-blueprint .defect-ring {
  fill: none;
  stroke: var(--defect-color);
  stroke-width: 1.2;
  transform-origin: center;
  transform-box: fill-box;
  animation: defectRing 1.8s ease-out infinite;
  animation-delay: var(--defect-delay, 2.6s);
}

.hero-blueprint .defect-dot {
  fill: var(--defect-color);
  filter: drop-shadow(0 0 6px var(--defect-color));
}

.hero-blueprint .defect-label {
  font: 600 9px/1 'IBM Plex Sans', monospace;
  letter-spacing: 0.06em;
  fill: var(--defect-color);
  text-transform: uppercase;
}

@keyframes defectIn {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes defectRing {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Scan log terminal */
.scan-log {
  position: absolute;
  z-index: 3;
  right: var(--spacing-3);
  bottom: var(--spacing-3);
  width: min(320px, 60%);
  padding: 10px 12px 12px;
  border-radius: var(--radius-md, 10px);
  background: rgba(4, 17, 27, 0.78);
  border: 1px solid rgba(22, 194, 213, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 10px 28px rgba(0,0,0,0.45);
  font: 500 11px/1.5 'IBM Plex Sans', ui-monospace, Menlo, monospace;
  color: rgba(244, 248, 251, 0.85);
  opacity: 0;
  transform: translateY(8px);
  animation: scanLogIn 0.5s ease forwards;
  animation-delay: 2.2s;
}

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

.scan-log__header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan-bright, #16C2D5);
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(22, 194, 213, 0.18);
}

.scan-log__header .scan-log__id {
  margin-left: auto;
  color: rgba(244, 248, 251, 0.55);
  letter-spacing: 0.08em;
}

.scan-log__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4CAF50;
  box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.6);
  animation: logDotBlink 1.6s ease-in-out infinite;
}

@keyframes logDotBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
}

.scan-log__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.scan-log__line {
  opacity: 0;
  transform: translateX(-6px);
  animation: logLineIn 0.35s ease forwards;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-log__line:nth-child(1) { animation-delay: 2.4s; }
.scan-log__line:nth-child(2) { animation-delay: 2.7s; }
.scan-log__line:nth-child(3) { animation-delay: 3.0s; }
.scan-log__line:nth-child(4) { animation-delay: 3.3s; }
.scan-log__line:nth-child(5) { animation-delay: 3.6s; }
.scan-log__line:nth-child(6) { animation-delay: 3.9s; }
.scan-log__line:nth-child(7) { animation-delay: 4.2s; }

@keyframes logLineIn {
  to { opacity: 1; transform: translateX(0); }
}

.scan-log__line .t    { color: rgba(244, 248, 251, 0.45); margin-right: 6px; }
.scan-log__line .ok   { color: #4CAF50; font-weight: 600; }
.scan-log__line .warn { color: #FFC107; font-weight: 600; }
.scan-log__line .high { color: #FF5722; font-weight: 600; }
.scan-log__line .crit { color: #F44336; font-weight: 700; }

@media (max-width: 768px) {
  .scan-log {
    position: static;
    width: 100%;
    margin-top: var(--spacing-3);
  }
  .hero-visual--blueprint {
    place-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blueprint .bp-stroke,
  .hero-blueprint .defect,
  .hero-blueprint .defect-ring,
  .scan-log,
  .scan-log__line,
  .scan-log__dot {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}
