/* Hero-specific styles (component) - precise, production focused */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: block;
  /* On homepage the header overlays the hero; offset only on non-home pages */
  padding-top: 0;
  aspect-ratio: 16 / 9;
}

/* Keep offset for non-home pages where header should not overlay */
body:not(.is-home) .hero {
  padding-top: var(--site-header-height, 84px);
}

/* Desktop: enforce a true 16:9 stage */
@media (min-width: 992px) {
  .hero {
    aspect-ratio: 16 / 9;
    height: auto; /* aspect-ratio controls the height */
    min-height: 0;
  }
}

/* Ensure homepage hero fills the first viewport so the header sits visually inside it */
body.is-home .hero {
  min-height: 100vh;
  height: auto;
}

/* Mobile: keep 16:9 composition but ensure width fits small screens */
@media (max-width: 480px) {
  .hero { width: 100%; }
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* Subtle cinematic overlay to preserve network visibility on right */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(1, 8, 22, 0.88) 0%,
    rgba(2, 10, 25, 0.68) 38%,
    rgba(2, 10, 25, 0.28) 68%,
    rgba(2, 10, 25, 0.08) 100%
  );
}

.hero-content { position: relative; z-index: 10; display: block; height: 100%; }

.hero-grid { height: 100%; align-items: center; display: grid; grid-template-columns: 48% 52%; gap: 28px; padding-block: 48px; max-width: 1280px; margin: 0 auto; }

/* Eyebrow / eyebrow pill */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-cyan);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(22,119,255,0.18);
  box-shadow: 0 8px 30px rgba(22,119,255,0.08);
  display: inline-block;
  margin-bottom: 0.9rem;
  animation: slow-glow 3.8s ease-in-out infinite;
}

@keyframes slow-glow {
  0% { box-shadow: 0 8px 30px rgba(22,119,255,0.04); }
  50% { box-shadow: 0 20px 60px rgba(22,119,255,0.09); }
  100% { box-shadow: 0 8px 30px rgba(22,119,255,0.04); }
}

.hero-copy { position: relative; z-index: 3; max-width: 640px; margin-top: 0.2rem; }

.hero-copy h1 {
  display: block;
  gap: 0.06rem;
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(3.2rem, 5.8vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.headline-line { display: block; }

.headline-accent {
  background: linear-gradient(90deg, #16C7FF 0%, #008CFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 28px rgba(22,199,255,0.10);
}

.hero-kicker { margin: 0 0 0.6rem; color: rgba(255,255,255,0.92); font-size: 1rem; font-weight: 700; }

.hero-description { margin: 0 0 1.4rem; color: rgba(255,255,255,0.78); font-size: clamp(1rem, 1.9vw, 1.125rem); line-height: 1.6; max-width: 100%; }

.hero-actions { display:flex; gap:14px; margin-bottom: 1rem; align-items:center; flex-direction:row; flex-wrap:nowrap; }

.hero-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  text-decoration: none;
  flex: 0 1 auto;
}

.hero-actions .button.primary {
  background: linear-gradient(135deg, #16C7FF 0%, #008CFF 100%);
  color: #fff;
  box-shadow: 0 18px 48px rgba(8,100,200,0.18);
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.hero-actions .button.primary:hover,
.hero-actions .button.primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 26px 72px rgba(8,100,200,0.28);
  filter: saturate(1.05);
}

.hero-actions .button.secondary {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(22,199,255,0.18);
  color: #fff;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hero-actions .button.secondary:hover,
.hero-actions .button.secondary:focus {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.05);
  border-color: rgba(22,199,255,0.28);
}

/* Button icon layout */
.btn-icon { display:inline-flex; align-items:center; justify-content:center; margin-right:12px; }
.btn-icon svg { display:block; filter: drop-shadow(0 6px 18px rgba(8,100,200,0.18)); }
.btn-icon i { display:inline-flex; align-items:center; justify-content:center; color: #fff; font-size: 1.05rem; }
.button .btn-text { display:inline-block; color: #fff; font-weight:700; }

.button.primary .btn-icon { width:48px; height:48px; background: linear-gradient(180deg,#16C7FF,#008CFF); border-radius:50%; padding:10px; display:inline-flex; align-items:center; justify-content:center; box-shadow: 0 10px 30px rgba(22,199,255,0.14); }
.button.primary .btn-icon i { color: #fff; font-size: 1.05rem; }
.button.secondary .btn-icon { width:40px; height:40px; background: rgba(255,255,255,0.02); border-radius:50%; padding:7px; }

.hero-actions .button { cursor: pointer; text-decoration: none; }

/* Accessible focus */
.hero-actions .button:focus { outline: none; }
.hero-actions .button:focus-visible { box-shadow: 0 0 0 4px rgba(22,199,255,0.16), 0 22px 62px rgba(8,100,200,0.18); }

/* Cinematic glass status bar under hero CTAs */
.hero-status-bar {
  display: inline-flex;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(6,18,34,0.34);
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  box-shadow: 0 10px 30px rgba(3,9,20,0.26);
  align-items: center;
}

.hero-status-bar .status-item {
  display:flex; flex-direction:row; gap:12px; padding:10px 14px; border-radius:12px; align-items:center;
  background: transparent; color: rgba(255,255,255,0.92); flex: 0 1 auto;
}

/* subtle separators between inline items */
.hero-status-bar .status-item + .status-item {
  margin-left: 8px;
  padding-left: 11px;
  border-left: 1px solid rgba(255,255,255,0.04);
}

.status-icon { display:inline-flex; align-items:center; justify-content:center;   box-shadow: 0 8px 20px rgba(8,100,200,0.06); }
.hero-status-bar .status-item strong { font-size: 1.02rem; color: var(--color-cyan); }
.hero-status-bar .status-item span { font-size: 0.78rem; color: rgba(255,255,255,0.78); font-weight:700; }

.status-item svg { display:block; }
.status-icon i { color: #16C7FF; font-size: 1.05rem; }

/* Right-side visual remains visible */
.hero-visual { position: relative; z-index: 2; }

/* Responsive tweaks */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-block: 36px; }
  .hero { aspect-ratio: auto; }
  .hero-copy h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }
  .hero-status-bar { flex-wrap: wrap; justify-content: flex-start; }
}

/* Strong mobile/tablet menu overlay for homepage when header is inside hero.

/* Strong mobile overrides to ensure hero layout honors component rules even
   when other site CSS has conflicting declarations. These target the
   homepage hero specifically and are intentionally specific. */
@media (max-width: 900px) {
  body.is-home .hero { min-height: auto !important; padding-block: 36px !important; overflow: visible !important; }
  body.is-home .hero .hero-grid { grid-template-columns: 1fr !important; padding-block: 36px !important; gap: 20px !important; }
  body.is-home .hero .hero-copy { max-width: 100% !important; padding-right: 0 !important; }
  body.is-home .hero .hero-copy h1 { font-size: clamp(2.0rem, 6.5vw, 3.4rem) !important; line-height: 1.02 !important; }
  body.is-home .hero .hero-actions { flex-direction: column !important; gap: 12px !important; align-items: stretch !important; }
  body.is-home .hero .hero-actions .button { width: 100% !important; min-height: 48px !important; padding: 10px 14px !important; }
  body.is-home .hero .hero-status-bar { display: flex !important; flex-wrap: wrap !important; justify-content: flex-start !important; gap: 10px !important; }
  body.is-home .hero .hero-status-bar .status-item { flex: 1 1 calc(50% - 10px) !important; min-width: calc(50% - 10px) !important; }
}

@media (max-width: 480px) {
  body.is-home .hero .hero-copy h1 { font-size: clamp(1.6rem, 8.5vw, 2.6rem) !important; }
  body.is-home .hero .hero-actions .button { width: 100% !important; }
  body.is-home .hero .hero-status-bar .status-item { flex: 1 1 100% !important; min-width: 100% !important; }
}
   This creates a fixed full-height nav under the header so the menu is
   always visible and scrollable on small screens. */
@media (max-width: 900px) {
  body.is-home .hero {
    overflow: visible;
  }

  /* Keep hero content visible below the fixed header */
  body.is-home .hero { padding-top: var(--site-header-height, 76px); }

  /* Keep header fixed so the menu appears anchored under it */
  body.is-home .hero > .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 120;
    background: rgba(5,15,35,0.85) !important;
    backdrop-filter: blur(12px);
  }

  body.is-home .hero > .site-header .menu-toggle {
    z-index: 130;
  }

  body.is-home .hero > .site-header .main-nav {
    position: fixed;
    top: var(--site-header-height, 76px);
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background: rgba(6,20,38,0.98);
    padding: 20px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 115;
    opacity: 0;
    transform: translateY(-6px);
    transition: transform 300ms cubic-bezier(.2,.9,.2,1), opacity 240ms ease;
  }

  body.is-home .hero > .site-header .main-nav.is-open {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  body.is-home .hero > .site-header .nav-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
  }

  body.is-home .hero > .site-header .nav-list a.nav-link {
    padding: 12px 8px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.96);
  }
}

/* When the header is rendered inside the hero, the mobile nav (positioned at top:100%)
   can be clipped by the hero's overflow:hidden. Allow the hero to show the dropdown
   and ensure the mobile nav can display correctly on small viewports. */
@media (max-width: 900px) {
  body.is-home .hero { overflow: visible; }
  body.is-home .hero > .site-header .main-nav { position: static; top: auto; left: auto; right: auto; }
  body.is-home .hero > .site-header .main-nav.is-open { display: block; }
  body.is-home .hero > .site-header .nav-list { display: flex; }
}

@media (max-width: 480px) {
  .hero-copy h1 { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .hero-actions { gap: 10px; flex-direction: column; }
  .hero-status-bar .status-item { flex: 1 1 48%; min-width: auto; }
}
/* Accessibility: respect reduced motion — remove subtle entrance animations */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero-copy h1, .hero-description, .hero-actions, .hero-status-bar { animation: none; transition: none; }
}

/* Mobile-friendly adjustments: make status items and buttons flexible */
@media (max-width: 900px) {
  .hero-status-bar .status-item { flex: 1 1 calc(50% - 10px); min-width: auto; }
}

@media (max-width: 480px) {
  .hero-status-bar .status-item { flex: 1 1 100%; gap: 8px; padding: 8px 10px; }
  .hero-actions .button { width: 100%; min-height: 48px; padding: 10px 14px; justify-content: center; }
  .hero-actions .button .btn-icon { margin-right: 8px; }
  .hero-copy { padding-right: 12px; }
}

/* Homepage-specific header/nav overlay behavior */
/* When header is rendered inside the hero, make it part of the same stacking context */
.hero > .site-header,
body.is-home .hero > .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  width: 100%;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: background-color .35s ease, backdrop-filter .35s ease, box-shadow .35s ease, border-color .35s ease;
}

body.is-home .nav-shell { min-height: 76px; }

/* When scrolled, transition into glassmorphic navbar */
/* Scrolled state when header becomes glass (fixed on top) */
/* Ensure specificity so non-home headers remain sticky from main.css */
.hero > .site-header.scrolled, body.is-home .hero > .site-header.scrolled {
  /* Keep positioning stable; visually switch to glass while avoiding layout jumps */
  position: sticky;
  top: 0;
  background: rgba(5,15,35,0.78) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(120,210,255,0.12);
  box-shadow: 0 10px 35px rgba(0,0,0,0.25);
  min-height: 72px;
}

/* Ensure links/logo remain visible on transparent header */
body.is-home .brand, body.is-home .nav-list { color: #fff; }
/* Constrain logo size for better visual balance */
body.is-home .brand-mark img { max-height: 46px; width: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,0.42)); }

/* Nudge video position slightly to emphasize right-side network */
.hero-video { object-position: center center; }

/* Smooth transition for header elements when toggling */
.site-header, .nav-shell, .nav-list, .brand { transition: color 220ms ease, background 220ms ease, box-shadow 220ms ease; }

/* Enhanced menu-toggle styling for hero header (mobile/desktop) */
body.is-home .hero > .site-header .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 130;
}

body.is-home .hero > .site-header .menu-toggle:hover,
body.is-home .hero > .site-header .menu-toggle:focus {
  background: rgba(255,255,255,0.09);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

body.is-home .hero > .site-header .menu-toggle i {
  font-size: 1.05rem;
  transition: transform 180ms ease, opacity 180ms ease;
}

/* Visual state when menu open */
body.is-home .hero > .site-header .menu-toggle[aria-expanded="true"] {
  background: linear-gradient(135deg, rgba(22,199,255,0.12), rgba(8,100,200,0.08));
  border-color: rgba(22,199,255,0.22);
  transform: translateY(-1px);
}

body.is-home .hero > .site-header .menu-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
}

/* Ensure scrolled header keeps visible toggle */
.hero > .site-header.scrolled .menu-toggle,
body.is-home .hero > .site-header.scrolled .menu-toggle {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
