/* Apex Airmotive — V3 Split + Inline RFQ page layout + responsive overrides.
   Designed to run alongside tokens.css; inline styles in the markup handle
   the one-off positional rules copied from the JSX source. */

html, body { margin: 0; padding: 0; }
body.apex-site { background: var(--white); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Hide scroll on horizontal hex overflow */
.hex-pattern { z-index: 0; }

/* Hero photo slideshow */
.hero-slideshow {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 74%;
  height: 88%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

.hero-vignette {
  z-index: 2;
  pointer-events: none;
}

.hero-slideshow-secondary {
  left: -100px;
  top: 60px;
  right: auto;
  bottom: auto;
  width: 48%;
  height: 55%;
  opacity: 0.72;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  opacity: 0;
  animation: hero-photo-cycle 40s ease-in-out infinite;
  will-change: opacity, transform;
}

.hero-slide.is-right {
  background-size: contain;
  background-position: center right;
  background-repeat: no-repeat;
  filter: contrast(1.15) brightness(1.05) sepia(0.1) hue-rotate(-20deg);
}

.hero-slide.is-left {
  background-size: contain;
  background-position: left center;
  filter: contrast(1.1);
}

.hero-slide:nth-child(1) { animation-delay: -2.4s; }
.hero-slide:nth-child(2) { animation-delay: 5.6s; }
.hero-slide:nth-child(3) { animation-delay: 13.6s; }
.hero-slide:nth-child(4) { animation-delay: 21.6s; }
.hero-slide:nth-child(5) { animation-delay: 29.6s; }

.hero-slideshow .hero-slide { --hero-slide-opacity: 0.30; }
.hero-slideshow-secondary .hero-slide { --hero-slide-opacity: 0.12; }

@keyframes hero-photo-cycle {
  0%,
  100% {
    opacity: 0;
    transform: scale(1.015) translate3d(0, 0, 0);
  }
  6%,
  20% {
    opacity: var(--hero-slide-opacity);
  }
  26% {
    opacity: 0;
    transform: scale(1.04) translate3d(-1.5%, -1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
  }

  .hero-slide:first-child {
    opacity: var(--hero-slide-opacity);
    transform: none;
  }
}

/* Ensure above-the-fold content stays above animated layers */
.v3-hero > nav,
.v3-hero .v3-hero-grid,
#engines > .container,
footer > .container { position: relative; z-index: 2; }

/* Blink anim used by AOG dot */
@keyframes apex-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Count-up entrance — counters simply fade in once inView */
.counter-wrap { opacity: 0; transition: opacity 400ms ease; }
.counter-wrap.in { opacity: 1; }

/* Form error + success helpers (state flipped by JS) */
.rfq-form.is-sending [type="submit"] { opacity: 0.6; pointer-events: none; }
.rfq-success { display: none; }
.rfq-form.is-sent { display: none; }
.rfq-form.is-sent + .rfq-success { display: block; }

/* Platform selector active state */
.ps-row {
  text-align: left;
  padding: 18px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  color: inherit;
  width: 100%;
  transition: padding-left 180ms ease;
  padding-left: 0;
  position: relative;
  font-family: var(--sans);
  font-weight: 500;
}
.ps-row[aria-selected="true"] { padding-left: 12px; font-weight: 700; }
.ps-row[aria-selected="true"]::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--white);
  border-radius: 50%;
}
.ps-name { font-size: 20px; letter-spacing: -0.01em; }
.ps-num { font-family: var(--mono); font-size: 10px; opacity: 0.55; letter-spacing: 0.15em; }

.ps-detail-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; opacity: 0.6; margin-bottom: 12px; }

/* Triptych hover */
.tp-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 600ms ease;
}
.tp-tile:hover .tp-img { transform: scale(1.04); }

/* Urgency pill group */
.urgency-group { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.urgency-btn {
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 0;
  transition: all 150ms ease;
}
.urgency-btn[aria-pressed="true"] {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}
:not(.on-green) > .urgency-group .urgency-btn { border-color: var(--silver); }
:not(.on-green) > .urgency-group .urgency-btn[aria-pressed="true"] {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.urgency-btn .aog-dot { color: #FF4D37; margin-right: 6px; }
.urgency-btn[aria-pressed="true"] .aog-dot { color: inherit; }

/* Responsive ────────────────────────────────────── */
@media (max-width: 1100px) {
  .v3-hero-grid { grid-template-columns: 1fr !important; }
  .v3-hero-right { border-left: none !important; border-top: 1px solid rgba(255,255,255,0.12); }
  #rfq > .container { grid-template-columns: 1fr !important; gap: var(--space-6) !important; }
  #about .about-split { grid-template-columns: 1fr !important; }
  #about .about-split .about-photo { min-height: 420px !important; }
  .caps-grid { grid-template-columns: 1fr 1fr !important; }
  .platform-selector { grid-template-columns: 1fr !important; }
  .aog-strip { flex-wrap: wrap; gap: 12px !important; }
  footer .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .triptych { grid-template-columns: 1fr !important; }
  .triptych .tp-tile { aspect-ratio: 16 / 9 !important; }
  .trust-band > .container { grid-template-columns: 1fr !important; gap: 16px !important; }
  .trust-names { font-size: 14px !important; gap: 24px !important; }
}

@media (max-width: 720px) {
  .apex-nav-links { display: none; }
  .v3-hero-left .v3-hero-content { padding: 48px 24px !important; }
  section { padding-left: 24px !important; padding-right: 24px !important; }
  .caps-intro { grid-template-columns: 1fr !important; }
  .caps-grid { grid-template-columns: 1fr !important; }
  .rfq-names-row { grid-template-columns: 1fr !important; }
  .rfq-part-row { grid-template-columns: 1fr !important; }
  footer { padding-left: 24px !important; padding-right: 24px !important; }
  footer .footer-grid { grid-template-columns: 1fr !important; }
  .hero-tagline-rule { gap: 18px !important; }
  .hero-tagline-rule span:first-child,
  .hero-tagline-rule span:last-child { width: 44px !important; }
  .hero-tagline-rule .mono { font-size: 20px !important; letter-spacing: 0.18em !important; }
  #hero h1 { font-size: clamp(44px, 12vw, 72px) !important; }
  #capabilities h2, #engines h2, #about h2, #rfq h2 { font-size: 40px !important; }
}
