/* ==========================================================================
   VITALYS — HERO SECTION
   Sections: Variables, Hero Section, Overlay, Content, Heading, Description,
   Buttons, Animations, Responsive Breakpoints.
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  /* Brand blue is defined in navbar.css; darker hover shade lives here
     since it's a hero-button-specific derivative. */
  --color-accent-deep: #134681;

  /* Solid fallback shown briefly while the hero photo loads (or if it
     ever fails to load) so the section never flashes white. */
  --hero-bg-ink: #071824;

  /* Lighter than the About/Blog/Contact hero banners on purpose — this
     hero's photo needs to read clearly rather than mostly match their
     overlay strength; text legibility is still preserved via the
     heading's font-weight and the description's near-opaque white. */
  --hero-overlay: rgba(7, 24, 36, 0.4);

  --hero-heading-desktop: 70px;
  --hero-heading-tablet: 56px;
  /* Fluid within the mobile tier itself (320–480px) so a small phone
     doesn't inherit the same size as a 767px large-phone/phablet — a
     flat px value here made the heading read oversized on narrow
     screens relative to how it looked at the tier's top edge. */
  --hero-heading-mobile: clamp(28px, 8px + 6.25vw, 38px);

  --hero-content-max-width: 550px;
  --hero-description-max-width: 500px;
}

/* ==========================================================================
   2. HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  /* var(--vh) is set by hero.js to 1% of the *actual* visible viewport
     height, sidestepping mobile browser chrome resizing the viewport
     under a bare `vh` unit. Falls back to a real 1vh before JS runs. */
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  isolation: isolate;
  background-image: url("../images/Vitalys_Banner_1.png");
  background-color: var(--hero-bg-ink);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ==========================================================================
   3. OVERLAY
   ========================================================================== */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   4. CONTENT
   ========================================================================== */
.hero-container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: var(--hero-content-max-width);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Small label */
.hero-label {
  margin: 0 0 20px;
  font-family: var(--font-nav);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.9;
}

/* ==========================================================================
   5. HEADING
   ========================================================================== */
.hero-heading {
  margin: 0 0 25px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: var(--hero-heading-desktop);
  line-height: 1;
  color: #ffffff;
  text-wrap: balance;
}

.hero-heading span {
  display: block;
}

/* ==========================================================================
   6. DESCRIPTION
   ========================================================================== */
.hero-description {
  margin: 0 0 40px;
  max-width: var(--hero-description-max-width);
  font-family: var(--font-nav);
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
  text-wrap: pretty;
}

/* ==========================================================================
   7. BUTTONS
   ========================================================================== */
.hero-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 58px;
  padding: 0 8px 0 34px;
  border-radius: 999px;
  font-family: var(--font-nav);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--duration-base) ease, color var(--duration-base) ease,
    border-color var(--duration-base) ease, transform var(--duration-base) var(--ease-out-quart),
    box-shadow var(--duration-base) var(--ease-out-quart);
}

.btn-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-accent);
  transition: background-color var(--duration-base) ease, color var(--duration-base) ease;
}

.btn-hero-icon svg {
  width: 16px;
  height: 16px;
}

/* Button 1 — filled, brand blue */
.btn-hero-primary {
  background: var(--color-accent);
  color: #ffffff;
  border: 1.5px solid var(--color-accent);
}

.btn-hero-primary:hover,
.btn-hero-primary:focus-visible {
  background: var(--color-accent-deep);
  border-color: var(--color-accent-deep);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(7, 24, 36, 0.35);
}

/* Button 2 — transparent, white border */
.btn-hero-secondary {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-hero-secondary .btn-hero-icon {
  color: var(--color-accent);
}

.btn-hero-secondary:hover,
.btn-hero-secondary:focus-visible {
  background: #ffffff;
  color: var(--color-accent);
  border-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(7, 24, 36, 0.25);
}

.btn-hero-secondary:hover .btn-hero-icon,
.btn-hero-secondary:focus-visible .btn-hero-icon {
  background: var(--color-accent);
  color: #ffffff;
}

.btn-hero:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* ==========================================================================
   8. ANIMATIONS
   ========================================================================== */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-label,
.hero-heading,
.hero-description,
.hero-buttons {
  animation: heroFadeUp 0.7s var(--ease-out-quart) both;
}

.hero-label {
  animation-delay: 0ms;
}

.hero-heading {
  animation-delay: 150ms;
}

.hero-description {
  animation-delay: 300ms;
}

.hero-buttons {
  animation-delay: 450ms;
}

@media (prefers-reduced-motion: reduce) {
  .hero-label,
  .hero-heading,
  .hero-description,
  .hero-buttons {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn-hero-primary:hover,
  .btn-hero-secondary:hover {
    transform: none;
  }
}

/* ==========================================================================
   9. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet: 768px–991px */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {
    min-height: calc(var(--vh, 1vh) * 90);
  }

  .hero-heading {
    font-size: var(--hero-heading-tablet);
  }
}

/* Mobile: below 768px */
@media (max-width: 767.98px) {
  .hero {
    min-height: calc(var(--vh, 1vh) * 80);
  }

  .hero-content {
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  .hero-label {
    letter-spacing: 5px;
  }

  .hero-heading {
    font-size: var(--hero-heading-mobile);
  }

  .hero-description {
    max-width: 100%;
    font-size: clamp(15px, 9px + 1.9vw, 18px);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 14px;
  }

  .btn-hero {
    width: 100%;
    justify-content: space-between;
  }
}
