/* =====================================================
   APEX IP — sections/hero.css
   Hero section: navbar + headline + CTAs · 1920×1080
   ===================================================== */

/* ---------- Hero shell ---------- */
.apx-hero {
  position: relative;
  width: 100%;
  max-width: var(--apx-canvas);
  margin: 0 auto;
  min-height: 1080px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 268px;              /* Figma gap navbar → content */
  padding-bottom: 487px;   /* Figma bottom breathing room */

  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.40) 100%),
    url('../../images/hero-bg.png') 50% / cover no-repeat;
  background-color: #1a1a1a;
  background-blend-mode: multiply, normal;
}

/* Video background layer — sits above the bg image, below all content.
   Fallback: se i video non caricano, l'immagine hero-bg.png resta visibile. */
.apx-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.apx-hero-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* L'intro sta sopra il loop; il loop gira da subito dietro,
   così quando l'intro fa fade-out non c'è alcuno stall. */
#apex-intro { z-index: 2; }
#apex-loop  { z-index: 1; }

/* Navbar e contenuto devono stare sopra il video */
.apx-navbar,
.apx-hero-content {
  position: relative;
  z-index: 2;
}

/* Bottom fade — just a thin strip at the very edge to kill the hard cut */
.apx-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent 0%, #000 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Navbar ---------- */
.apx-navbar {
  width: 100%;
  padding: 40px var(--apx-pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
  position: relative;
  z-index: 10;
}

/* Logo (triangle mark + APEX IP wordmark) */
.apx-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 25px;
}

/* Nav pill — liquid glass (Figma reference)
   Recipe:
   · transparent interior (no tint) — backdrop shows through
   · subtle hairline rim on top
   · two LARGE, SOFT, DIFFUSED refraction glows on the bottom corners
   · faint outer drop shadow */
.apx-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 10px 16px 10px 24px;
  border-radius: var(--apx-radius-pill);
  isolation: isolate;

  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);

  /* Crystal-clear: no frost, just a touch of saturation */
  backdrop-filter: blur(1px) saturate(105%);
  -webkit-backdrop-filter: blur(1px) saturate(105%);

  box-shadow:
    /* delicate hairline on the TOP edge */
    inset 0 1px 0    rgba(255, 255, 255, 0.10),
    /* bright hairline rim on the BOTTOM edge (light catches strongest here) */
    inset 0 -1px 0   rgba(255, 255, 255, 0.45),
    /* inner glow that hugs the inside of the border (rim-light feel) */
    inset 0 0 0 1px  rgba(255, 255, 255, 0.06),
    /* faint outer drop for elevation */
    0 4px 18px       rgba(0, 0, 0, 0.20);

  transition: box-shadow 0.30s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pill brightens slightly on hover — only the links inside move */
.apx-nav:hover {
  box-shadow:
    inset 0 1px 0    rgba(255, 255, 255, 0.14),
    inset 0 -1px 0   rgba(255, 255, 255, 0.55),
    inset 0 0 0 1px  rgba(255, 255, 255, 0.08),
    0 8px 24px       rgba(0, 0, 0, 0.28);
}

/* Internal refractions — two radial glows at the bottom-LEFT + bottom-RIGHT
   corners that diffuse softly INTO the pill interior */
.apx-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 70% 110% at 0% 100%,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.06) 30%,
      rgba(255, 255, 255, 0.00) 60%
    ),
    radial-gradient(
      ellipse 70% 110% at 100% 100%,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.06) 30%,
      rgba(255, 255, 255, 0.00) 60%
    );
}

.apx-nav-link {
  color: var(--apx-white);
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  line-height: 1;
  transition:
    color     0.25s ease,
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.apx-nav-link:hover {
  color: var(--apx-orange);
  transform: translateY(-1px);
}

.apx-nav-link--contact {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Arrow on "Contact us" shoots up-right on hover */
.apx-nav-link--contact svg {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.apx-nav-link--contact:hover svg {
  transform: translate(2px, -2px);
}

/* "Book Audit" pill — liquid orange (matches nav glass aesthetic) */
.apx-btn-book {
  position: relative;
  padding: 10px 24px;
  border-radius: var(--apx-radius-pill);
  color: var(--apx-white);
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;

  /* vertical gradient: lighter top → darker bottom for 3D depth */
  background-color: #CC2A0A;
  border: 1px solid rgba(255, 255, 255, 0.14);
  isolation: isolate;

  box-shadow:
    /* top rim — light catches from above */
    inset 0 1px 0    rgba(255, 255, 255, 0.32),
    /* bottom inner shadow — depth */
    inset 0 -1px 0   rgba(0, 0, 0, 0.20),
    /* ambient orange glow — matches brand light */
    0 4px 9px       rgba(246, 84, 51, 0.40),
    /* subtle hard shadow for elevation crispness */
    0 1px 2px        rgba(0, 0, 0, 0.25);

  transition:
    transform   0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow  0.30s cubic-bezier(0.4, 0, 0.2, 1),
    filter      0.25s ease;
}

.apx-btn-book:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0    rgba(255, 255, 255, 0.38),
    inset 0 -1px 0   rgba(0, 0, 0, 0.22),
    0 5px 11px       rgba(246, 84, 51, 0.55),
    0 2px 4px        rgba(0, 0, 0, 0.30);
}

.apx-btn-book:active {
  transform: translateY(0);
  filter: brightness(0.96);
  box-shadow:
    inset 0 1px 2px  rgba(0, 0, 0, 0.18),
    inset 0 -1px 0   rgba(255, 255, 255, 0.10),
    0 2px 8px        rgba(246, 84, 51, 0.35);
}

/* ---------- Hero content ---------- */
.apx-hero-content {
  width: 100%;
  padding: 0 var(--apx-pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.apx-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.apx-hero-title {
  width: 100%;
  text-align: center;
  color: var(--apx-white);
  font-size: 72px;
  font-weight: 500;   /* Inter Tight Medium */
  line-height: 72px;
}

.apx-hero-subtitle {
  width: 100%;
  text-align: center;
  color: var(--apx-white);
  font-size: 24px;
  font-weight: 300;
}

.apx-hero-cta-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* White CTA — solid pill, lifts and casts a subtle glow on hover */
.apx-btn-white {
  position: relative;
  padding: 12px 24px;
  background: var(--apx-white);
  border-radius: var(--apx-radius-pill);
  color: var(--apx-dark);
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
  box-shadow:
    inset 0 -1px 0  rgba(0, 0, 0, 0.06),
    0 2px 8px       rgba(0, 0, 0, 0.10);

  transition:
    transform  0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.30s cubic-bezier(0.4, 0, 0.2, 1),
    filter     0.25s ease;
}

.apx-btn-white:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
  box-shadow:
    inset 0 -1px 0  rgba(0, 0, 0, 0.08),
    0 6px 18px      rgba(255, 255, 255, 0.18),
    0 2px 6px       rgba(0, 0, 0, 0.14);
}

.apx-btn-white:active {
  transform: translateY(0);
  filter: brightness(0.93);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    0 2px 6px       rgba(0, 0, 0, 0.10);
}

/* Outline CTA — ghost pill, fills in subtly on hover
   Border is asymmetric (dim top, brighter sides/bottom) to match the navbar */
.apx-btn-outline {
  position: relative;
  padding: 12px 24px;
  border-radius: var(--apx-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-top-color: rgba(255, 255, 255, 0.18);   /* dim top, like the navbar */
  color: var(--apx-white);
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
  background: transparent;

  transition:
    transform     0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background    0.25s ease,
    border-color  0.25s ease,
    box-shadow    0.30s cubic-bezier(0.4, 0, 0.2, 1);
}

.apx-btn-outline:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.85);
  border-top-color: rgba(255, 255, 255, 0.35);   /* still kept dimmer on hover */
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.08);
}

.apx-btn-outline:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.04);
}

/* =====================================================
   RESPONSIVE — hero.css
   ===================================================== */

/* ---------- Laptop (≤ 1440px) ---------- */
@media (max-width: 1440px) {
  .apx-hero {
    min-height: 860px;
    gap: 160px;
    padding-bottom: 260px;
  }

  .apx-hero-title {
    font-size: 60px;
    line-height: 64px;
  }

  .apx-hero-subtitle {
    font-size: 21px;
  }
}

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  .apx-hero {
    min-height: 680px;
    gap: 100px;
    padding-bottom: 140px;
  }

  .apx-hero-title {
    font-size: 48px;
    line-height: 52px;
  }

  .apx-hero-subtitle {
    font-size: 18px;
  }

  .apx-nav {
    gap: 24px;
  }

  .apx-nav-link {
    font-size: 14px;
  }

  .apx-btn-book {
    font-size: 16px;
    padding: 10px 20px;
  }

  .apx-btn-white,
  .apx-btn-outline {
    font-size: 16px;
    padding: 11px 20px;
  }
}

/* ---------- Mobile (≤ 640px) ---------- */
@media (max-width: 640px) {
  .apx-hero {
    min-height: unset;
    gap: 56px;
    padding-bottom: 72px;
  }

  .apx-navbar {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  /* Hide nav pill — no hamburger yet */
  .apx-nav {
    display: none;
  }

  .apx-hero-title {
    font-size: 34px;
    line-height: 38px;
  }

  .apx-hero-subtitle {
    font-size: 15px;
  }

  .apx-hero-cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 16px;
  }

  .apx-btn-white,
  .apx-btn-outline {
    font-size: 16px;
    padding: 13px 20px;
    text-align: center;
  }

  .apx-btn-book {
    font-size: 15px;
    padding: 9px 16px;
  }
}
