/* ==========================================================================
   HexaMSP — layout.css
   Page shell: utility strip, header, navigation, hero, sections, footer.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Section rhythm
   All vertical rhythm lives here. Modifiers that change padding are declared
   immediately after the base rule so cascade order (not specificity) wins —
   this keeps section spacing predictable when classes are combined.
   -------------------------------------------------------------------------- */
.section {
  position: relative;
  padding-block: clamp(4.25rem, 7.5vw, 7rem);
}
.section--tight { padding-block: clamp(3rem, 5vw, 4.25rem); }
.section--top-flush { padding-block-start: 0; }

.section--alt { background: var(--navy-800); }
.section--panel { background: var(--navy-700); }

/* Hairline between stacked same-colour sections */
.section--ruled { border-top: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   2. Utility strip — 24/7 messaging + contact, above the header
   Hidden on small screens, where the same details live in the mobile panel.
   -------------------------------------------------------------------------- */
.utility {
  display: none;
  background: var(--navy-900);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.utility__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 34px;
}
.utility__status { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text-muted); }
.utility__links { display: inline-flex; align-items: center; gap: 1.5rem; }
.utility__links a { color: var(--text-muted); }
.utility__links a:hover { color: var(--cyan); }
.utility__sep { color: var(--line-strong); }

@media (min-width: 900px) { .utility { display: block; } }

/* Slow pulse — the one piece of ambient motion on the site. It marks the
   monitoring claim, so it is tied to something the company actually does. */
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  flex: none;
  box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.55);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(0, 212, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

/* --------------------------------------------------------------------------
   3. Header + primary navigation
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 33, 58, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background var(--t-mid), border-color var(--t-mid);
}
.header.is-stuck {
  background: rgba(10, 15, 30, 0.94);
  border-bottom-color: var(--cyan-line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 30px; width: auto; }
.brand:focus-visible { outline-offset: 6px; }

.header__spacer { flex: 1 1 auto; }

/* Desktop nav ------------------------------------------------------------ */
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: 0.35rem; }
.nav__link {
  position: relative;
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: var(--step-sm);
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0.85rem; right: 0.85rem; bottom: 0.2rem;
  height: 1.5px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-mid);
}
.nav__link:hover { color: var(--paper); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--paper); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* Scoped to .header so this beats `.btn { display: inline-flex }` in
   components.css, which loads later and would otherwise win on equal
   specificity and force the CTA into the cramped mobile header. */
.header .header__cta { display: none; }

@media (min-width: 900px) {
  .nav { display: block; }
  .header .header__cta { display: inline-flex; }
}

/* Mobile toggle ---------------------------------------------------------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--paper);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.nav-toggle:hover { border-color: var(--cyan-line); background: var(--cyan-wash); }
.nav-toggle__bars { position: relative; width: 18px; height: 12px; }
.nav-toggle__bars span {
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-mid), opacity var(--t-fast);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5.25px; }
.nav-toggle__bars span:nth-child(3) { top: 10.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5.25px) rotate(-45deg); }

@media (min-width: 900px) { .nav-toggle { display: none; } }

/* Mobile panel ----------------------------------------------------------- */
.mobile-nav {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--navy-700);
  border-bottom: 1px solid var(--cyan-line);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-mid), transform var(--t-mid), visibility var(--t-mid);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }

/* Reduced motion: drop the transition entirely rather than shortening it, so
   opening the menu is a plain state change. Nobody should end up with
   aria-expanded="true" and an invisible panel because a transition
   did not run. */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav { transition: none; }
}
.mobile-nav__inner { padding-block: 0.75rem 1.5rem; }
.mobile-nav__link {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}
.mobile-nav__link[aria-current="page"] { color: var(--cyan); }
.mobile-nav__contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--step-xs);
}
.mobile-nav__contact a { color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.6rem; }
.mobile-nav .btn { width: 100%; }

@media (min-width: 900px) { .mobile-nav { display: none; } }

/* --------------------------------------------------------------------------
   4. Hero
   Asymmetric split: copy left, the rack photograph bleeding off the right
   edge under a hex lattice. On narrow screens the photo drops behind the
   copy at low opacity so the headline always has a clean field.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  /* Grades the photograph toward the navy/cyan palette so it reads as part
     of the brand rather than as dropped-in stock */
  filter: saturate(0.82) brightness(0.92) contrast(1.06);
}

/* Lattice sits on the photograph, fading out toward the copy */
.hero__lattice {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 80%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 80%);
}

/* Scrim keeps text contrast well above AA regardless of the photo behind it.
   Heavier on small screens, where the copy sits directly over the photo. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 15, 30, 0.88) 0%, rgba(10, 15, 30, 0.94) 100%);
}

.hero__inner { position: relative; }
.hero__content { max-width: 40rem; }

.hero h1 { margin-bottom: 1.35rem; }
.hero h1 em {
  font-style: normal;
  color: var(--cyan);
}
.hero__sub { font-size: var(--step-lead); color: var(--text-muted); max-width: 34rem; line-height: 1.6; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}
/* Below the wrap point, stack to equal width rather than leaving two
   buttons of different lengths ragged against the left edge. */
@media (max-width: 479px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
}
.hero__note {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

@media (min-width: 900px) {
  .hero { padding-block: clamp(5rem, 8vw, 8.5rem); }
  /* The photo starts well left of where it becomes visible, so its hard edge
     sits underneath the opaque part of the scrim and never shows as a seam. */
  .hero__media { left: 26%; }
  .hero__media img { object-position: 46% center; }
  .hero__lattice { left: 26%; }
  .hero__scrim {
    background:
      linear-gradient(90deg,
        var(--navy-900) 0%,
        var(--navy-900) 41%,
        rgba(10, 15, 30, 0.88) 52%,
        rgba(10, 15, 30, 0.58) 72%,
        rgba(10, 15, 30, 0.45) 100%),
      linear-gradient(200deg, rgba(0, 212, 255, 0.10) 0%, transparent 55%),
      linear-gradient(180deg, rgba(10, 15, 30, 0.3), rgba(10, 15, 30, 0.55));
  }
}

/* --------------------------------------------------------------------------
   5. Trust bar — the 24/7 promise, restated as scannable facts
   -------------------------------------------------------------------------- */
.trustbar {
  background: var(--navy-700);
  border-block: 1px solid var(--line);
}
.trustbar__list {
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr;
  background: var(--line);
}
.trustbar__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--navy-700);
  padding: 1.15rem clamp(0rem, 2vw, 1.5rem);
}
.trustbar__item .icon { color: var(--cyan); flex: none; }
.trustbar__text { font-size: var(--step-sm); line-height: 1.4; }
.trustbar__text b { display: block; font-weight: 600; color: var(--paper); }
.trustbar__text span { color: var(--text-faint); font-size: var(--step-xs); }

@media (min-width: 620px) { .trustbar__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .trustbar__list { grid-template-columns: repeat(4, 1fr); } }

/* --------------------------------------------------------------------------
   6. Page header (interior pages)
   -------------------------------------------------------------------------- */
.pagehead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 88% 0%, rgba(0, 212, 255, 0.11) 0%, transparent 58%),
    var(--navy-800);
}
.pagehead__inner { max-width: 52rem; }
/* A step below the homepage hero: the hero H1 stays the largest type on the
   site, and interior titles stop breaking into four short lines. */
.pagehead h1 {
  font-size: clamp(2.25rem, 1.55rem + 3vw, 3.9rem);
  margin-bottom: 1.25rem;
}

/* Breadcrumb ------------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.crumbs a { color: var(--text-faint); }
.crumbs a:hover { color: var(--cyan); }
.crumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }

/* --------------------------------------------------------------------------
   7. Final CTA band — second and last use of the hex lattice
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-700);
  border-top: 1px solid var(--cyan-line);
}
.cta-band__lattice {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.13;
  -webkit-mask-image: radial-gradient(80% 120% at 100% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(80% 120% at 100% 0%, #000 0%, transparent 70%);
}
.cta-band__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.cta-band h2 { margin-bottom: 1rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.cta-band__aside {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.cta-band__aside a { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); font-size: var(--step-sm); }
.cta-band__aside a:hover { color: var(--cyan); }
.cta-band__aside .icon { color: var(--cyan); flex: none; }

@media (min-width: 900px) {
  .cta-band__inner { grid-template-columns: 1.35fr 0.65fr; gap: 4rem; }
  .cta-band__aside { padding-top: 0; padding-left: 3rem; border-top: 0; border-left: 1px solid var(--line); }
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--navy-700);
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 5vw, 4.5rem) 0;
  font-size: var(--step-sm);
}
.footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 3rem;
}
.footer__brand img { height: 30px; width: auto; margin-bottom: 1.25rem; }
.footer__blurb { color: var(--text-muted); max-width: 34ch; line-height: 1.6; }
.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.footer__title {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.15rem;
}
.footer__list { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__list a { color: var(--text-muted); }
.footer__list a:hover { color: var(--cyan); }

.footer__contact { display: flex; flex-direction: column; gap: 0.85rem; }
.footer__contact a,
.footer__contact p { display: flex; gap: 0.75rem; color: var(--text-muted); line-height: 1.5; }
.footer__contact a:hover { color: var(--cyan); }
.footer__contact .icon { color: var(--cyan); flex: none; margin-top: 0.15rem; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

@media (min-width: 700px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
}
@media (min-width: 1000px) {
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 3rem; }
}
