/* ==========================================================================
   VITALYS — THE VITALYS PROMISE (TRUST / PILLARS BANNER)
   Sections: Variables, Section, Overlay, Container, Header, Pillars Grid,
   Pillar Card, Icon, Typography, Button, Animations, Responsive
   Breakpoints.
   Shares brand tokens (--font-nav, --color-accent, --color-accent-deep,
   --ease-out-quart, etc.) already defined in navbar.css / hero.css; only
   section-specific tokens live here.
   ========================================================================== */

/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  --promise-padding-desktop: 110px;
  --promise-padding-tablet: 85px;
  --promise-padding-mobile: 60px;

  --promise-description-max-width: 620px;

  --promise-heading-desktop: 46px;
  --promise-heading-tablet: 38px;
  --promise-heading-mobile: 28px;

  --promise-card-radius: 18px;
}

/* ==========================================================================
   2. SECTION
   ========================================================================== */
.promise-banner {
  position: relative;
  background-image: url("../images/Common_Banner.png");
  background-color: var(--color-navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: var(--promise-padding-desktop);
  padding-bottom: var(--promise-padding-desktop);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

/* ==========================================================================
   3. OVERLAY
   ========================================================================== */
/* Brand-navy scrim (matches --color-navy used for headings sitewide)
   rather than a neutral black, so the banner still reads as "Vitalys
   blue" even though the photo itself is light and airy. */
.promise-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(7, 24, 36, 0.88) 0%,
    rgba(12, 44, 81, 0.82) 55%,
    rgba(24, 88, 162, 0.78) 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* ==========================================================================
   4. CONTAINER
   ========================================================================== */
.promise-banner-container {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   5. HEADER
   ========================================================================== */
.promise-subtitle {
  margin: 0 0 15px;
  font-family: var(--font-nav);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
}

.promise-heading {
  margin: 0 auto 20px;
  max-width: 780px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: var(--promise-heading-desktop);
  line-height: 1.2;
  color: #ffffff;
  text-wrap: balance;
}

.promise-description {
  margin: 0 auto 60px;
  max-width: var(--promise-description-max-width);
  font-family: var(--font-nav);
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  text-wrap: pretty;
}

/* ==========================================================================
   6. PILLARS GRID
   ========================================================================== */
.promise-grid {
  margin-bottom: 50px;
}

.promise-grid > .col {
  display: flex;
}

/* ==========================================================================
   7. PILLAR CARD
   ========================================================================== */
.promise-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 32px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--promise-card-radius);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  transition: transform 0.35s var(--ease-out-quart), background-color 0.35s ease,
    border-color 0.35s ease;
}

.promise-card:hover,
.promise-card:focus-within {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

/* ==========================================================================
   8. ICON
   ========================================================================== */
.promise-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-accent);
  font-size: 24px;
  flex: 0 0 auto;
}

/* ==========================================================================
   9. TYPOGRAPHY
   ========================================================================== */
.promise-value {
  margin: 0 0 8px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 21px;
  color: #ffffff;
}

.promise-label {
  margin: 0;
  font-family: var(--font-nav);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

/* ==========================================================================
   10. BUTTON
   ========================================================================== */
.btn-promise {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 58px;
  padding: 18px 38px;
  border: none;
  border-radius: 50px;
  background: #ffffff;
  color: var(--color-accent);
  font-family: var(--font-nav);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease, transform 0.35s ease,
    box-shadow 0.35s ease;
}

.btn-promise-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

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

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

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

/* ==========================================================================
   11. ANIMATIONS
   ========================================================================== */
@keyframes promiseFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section content is fully visible by default. promise-banner.js opts
   each element into a hidden pre-animation state (.will-animate) only
   after confirming IntersectionObserver support and no reduced-motion
   preference — so a JS failure or a headless/no-scroll render never
   ships a blank section. */
.promise-subtitle.will-animate,
.promise-heading.will-animate,
.promise-description.will-animate,
.promise-card.will-animate,
.btn-promise.will-animate {
  opacity: 0;
  transform: translateY(30px);
}

.promise-subtitle.will-animate.is-visible,
.promise-heading.will-animate.is-visible,
.promise-description.will-animate.is-visible,
.promise-card.will-animate.is-visible,
.btn-promise.will-animate.is-visible {
  animation: promiseFadeUp 0.7s var(--ease-out-quart) both;
}

.promise-subtitle.is-visible {
  animation-delay: 0ms;
}

.promise-heading.is-visible {
  animation-delay: 120ms;
}

.promise-description.is-visible {
  animation-delay: 240ms;
}

.promise-grid > .col:nth-child(1) .promise-card.is-visible {
  animation-delay: 300ms;
}

.promise-grid > .col:nth-child(2) .promise-card.is-visible {
  animation-delay: 400ms;
}

.promise-grid > .col:nth-child(3) .promise-card.is-visible {
  animation-delay: 500ms;
}

.promise-grid > .col:nth-child(4) .promise-card.is-visible {
  animation-delay: 600ms;
}

.btn-promise.is-visible {
  animation-delay: 700ms;
}

@media (prefers-reduced-motion: reduce) {
  .promise-subtitle.will-animate,
  .promise-heading.will-animate,
  .promise-description.will-animate,
  .promise-card.will-animate,
  .btn-promise.will-animate,
  .promise-subtitle.will-animate.is-visible,
  .promise-heading.will-animate.is-visible,
  .promise-description.will-animate.is-visible,
  .promise-card.will-animate.is-visible,
  .btn-promise.will-animate.is-visible {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .promise-card:hover,
  .btn-promise:hover {
    transform: none;
  }
}

/* ==========================================================================
   12. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet: 768px–991px */
@media (min-width: 768px) and (max-width: 991.98px) {
  .promise-banner {
    padding-top: var(--promise-padding-tablet);
    padding-bottom: var(--promise-padding-tablet);
  }

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

/* Mobile: below 768px */
@media (max-width: 767.98px) {
  .promise-banner {
    padding-top: var(--promise-padding-mobile);
    padding-bottom: var(--promise-padding-mobile);
  }

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

  .promise-description {
    margin-bottom: 40px;
  }

  .promise-grid {
    margin-bottom: 36px;
  }

  .promise-card {
    padding: 26px 16px;
  }

  .promise-value {
    font-size: 18px;
  }
}
