/* ==========================================================================
   Meti+ Premium — animation & interaction layer
   Adds scroll reveals, hover polish and responsive fixes on top of the
   existing Webflow export. Does not alter layout, color or copy.
   Product-spin / drag-product canvases are intentionally left untouched.
   ========================================================================== */

:root {
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-duration: 0.85s;
  --reveal-distance: 32px;
}

html {
  scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   Hero label — bold uppercase caption above the H1
   -------------------------------------------------------------------------- */

.heading-label {
  font-family: var(--fonts--body);
  color: var(--colors--label);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
}

.heading-label strong {
  font-weight: 900;
}

/* --------------------------------------------------------------------------
   Nav-link wrap fix — between the 991px mobile breakpoint and roughly
   1300px, the full seven-link menu could run out of row width and wrap
   onto a second line. Tightening the link padding in that band keeps it
   on one line without touching the mobile toggle breakpoint itself.
   -------------------------------------------------------------------------- */

@media screen and (min-width: 992px) and (max-width: 1300px) {
  .nav-link {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 14px;
  }
}

/* --------------------------------------------------------------------------
   Nav anchor targets — offset so the fixed scroll-navbar doesn't cover the
   top of the section when a nav link jumps to it.
   -------------------------------------------------------------------------- */

#features,
#ingredients,
#premium,
#facts,
#pricing,
#testimonials,
#faq {
  scroll-margin-top: 110px;
}

/* --------------------------------------------------------------------------
   Footer — the 4-column grid and the copyright/payment row get cramped
   and start overlapping well before the original 479px breakpoint. Drop
   to a single column earlier, and stack the bottom row on top of itself.
   -------------------------------------------------------------------------- */

@media screen and (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    grid-row-gap: 2.5rem !important;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* --------------------------------------------------------------------------
   Scroll reveal (progressive enhancement — only active once JS has run,
   see the `.js-anim` class added synchronously in <head>)
   -------------------------------------------------------------------------- */

/* `transition` stays on the element permanently so the reveal animates in
   both directions; only the *hidden* state is scoped to :not(.is-inview) so
   that once revealed, elements have no lingering transform/opacity override
   left to fight with :hover effects (translateY, scale, etc). */

.js-anim [data-reveal] {
  transition: opacity var(--reveal-duration) var(--ease-out-soft),
              transform var(--reveal-duration) var(--ease-out-soft);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-anim [data-reveal]:not(.is-inview) {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
}

.js-anim [data-reveal="fade"]:not(.is-inview) {
  transform: none;
}

.js-anim [data-reveal="left"]:not(.is-inview) {
  transform: translateX(calc(-1 * var(--reveal-distance)));
}

.js-anim [data-reveal="right"]:not(.is-inview) {
  transform: translateX(var(--reveal-distance));
}

.js-anim [data-reveal="scale"]:not(.is-inview) {
  transform: scale(0.94);
}

@media screen and (max-width: 767px) {
  :root {
    --reveal-distance: 18px;
    --reveal-duration: 0.7s;
  }
}

/* --------------------------------------------------------------------------
   Buttons & CTAs
   -------------------------------------------------------------------------- */

.nav-cta,
.scroll-top,
.arrow,
.play-wrapper {
  transition: transform 0.35s var(--ease-smooth),
              box-shadow 0.35s var(--ease-smooth),
              background-color 0.35s var(--ease-smooth),
              opacity 0.35s var(--ease-smooth);
}

/* CTA / Buy buttons: radial "fill" hover — a circle grows from the center
   and floods the button with a darker shade, clipped to its own shape. */
.cta-primary,
.buy-button {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-smooth);
}

.cta-primary::before,
.buy-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: #103344;
  background-color: color-mix(in srgb, var(--colors--label) 65%, black 35%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease-smooth), height 0.6s var(--ease-smooth);
  pointer-events: none;
}

.cta-primary:hover::before,
.buy-button:hover::before {
  width: 300%;
  height: 300%;
}

/* Keep button labels above the absolutely-positioned fill circle, which
   would otherwise paint on top of static in-flow content. */
.cta-button-text,
.buy-button-text,
.buy-button-text-2 {
  position: relative;
  z-index: 1;
}

.cta-primary:active,
.buy-button:active {
  transform: scale(0.98);
}

.nav-cta:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 20px -8px rgba(10, 54, 90, 0.45);
}

.nav-cta:active {
  transform: translateY(0) scale(0.96);
}

/* Scroll-to-top: fades in only once the user has scrolled (JS toggles
   .is-visible). Hidden state is scoped to .js-anim so the button stays
   visible and usable if JS never runs. */
.js-anim .scroll-top {
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
}

.js-anim .scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 24px -10px rgba(0, 0, 0, 0.4);
}

.scroll-top:active {
  transform: translateY(-1px) scale(0.97);
}

.arrow:hover {
  transform: scale(1.08);
}

.arrow:active {
  transform: scale(0.94);
}

.play-wrapper:hover {
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   Links & icons
   -------------------------------------------------------------------------- */

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 28px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-smooth);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.footer-link {
  position: relative;
  transition: opacity 0.25s ease;
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-smooth);
}

.footer-link:hover::after {
  transform: scaleX(1);
}

.footer-link:hover {
  opacity: 0.85;
}

.dropdown-icon {
  transition: transform 0.4s var(--ease-smooth);
}

/* --------------------------------------------------------------------------
   Cards & interactive blocks (hover lift, disabled on touch below)
   -------------------------------------------------------------------------- */

.inner-feature-box,
.package-wrapper,
.accordion-box,
.references-image {
  transition: transform 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              background-color 0.4s var(--ease-smooth),
              opacity 0.3s ease;
}

.package-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -18px rgba(10, 54, 90, 0.35);
}

.accordion-box:hover {
  background-color: rgba(10, 54, 90, 0.03);
}

.references-image:hover {
  transform: translateY(-3px) scale(1.03);
  opacity: 0.85;
}

@media (hover: hover) and (pointer: fine) {
  .inner-feature-box:hover {
    transform: translateY(-4px);
  }
}

/* --------------------------------------------------------------------------
   Desktop off-canvas panel — opened from the top-right nav icon.
   Only reachable on desktop: .nav-cta.desktop is display:none below 992px,
   so the trigger (and this panel) simply never activates on mobile/tablet,
   where the existing Webflow nav-menu toggle keeps working untouched.
   -------------------------------------------------------------------------- */

.offCanvas-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 10000;
}

.offCanvas-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.offCanvas-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 390px;
  max-width: 90vw;
  background-color: #fff;
  padding: 70px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.785, 0.135, 0.15, 0.86);
  z-index: 10001;
  overflow-y: auto;
}

.offCanvas-panel.is-active {
  transform: translateX(0);
}

.offCanvas-close {
  position: absolute;
  top: 25px;
  right: 40px;
  width: 45px;
  height: 45px;
  border: 0;
  border-radius: 50%;
  background-color: rgba(24, 79, 105, 0.12);
  cursor: pointer;
  transition: background-color 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.offCanvas-close:hover {
  background-color: rgba(24, 79, 105, 0.22);
  transform: rotate(90deg);
}

.offCanvas-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background-color: var(--colors--label);
  transform: translate(-50%, -50%) rotate(45deg);
}

.offCanvas-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.offCanvas-title {
  font-family: var(--fonts--heading);
  color: var(--colors--heading);
  text-transform: uppercase;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 20px;
}

.offCanvas-title span {
  color: var(--colors--label);
}

.offCanvas-text {
  color: var(--colors--text);
  font-size: 16px;
  line-height: 1.6;
}

.offCanvas-buy {
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   Mobile nav menu — smooth entrance for the existing toggle
   -------------------------------------------------------------------------- */

.js-anim [data-nav-menu-open] {
  animation: navMenuIn 0.4s var(--ease-out-soft);
}

@keyframes navMenuIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Inner pages (Refund Policy, Contact Us) — breadcrumb header + content
   -------------------------------------------------------------------------- */

.page-hero {
  background-color: var(--colors--bg);
  padding-top: 220px;
  padding-bottom: 72px;
  text-align: center;
  position: relative;
}

.page-hero-title {
  font-family: var(--fonts--heading);
  color: #fff;
  text-transform: uppercase;
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 14px;
}

.page-breadcrumb {
  font-family: var(--fonts--body);
  color: #ffffffb3;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 14px;
  font-weight: 500;
}

.page-breadcrumb a {
  color: #fff;
  text-decoration: none;
  transition: color .3s;
}

.page-breadcrumb a:hover {
  color: var(--colors--label);
}

.page-breadcrumb .page-breadcrumb-divider {
  margin-left: 8px;
  margin-right: 8px;
  opacity: .6;
}

.page-breadcrumb .page-breadcrumb-current {
  color: #fff;
  font-weight: 700;
}

.page-content-section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.policy-content h2 {
  font-family: var(--fonts--heading);
  color: var(--colors--heading);
  text-transform: uppercase;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

.policy-content h2:first-child {
  margin-top: 0;
}

.policy-content p {
  font-family: var(--fonts--body);
  color: var(--colors--text);
  font-size: 16px;
  line-height: 1.8;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.policy-content strong {
  color: var(--colors--heading);
}

.policy-content a {
  color: var(--colors--label);
  text-decoration: underline;
}

.policy-content ol {
  font-family: var(--fonts--body);
  color: var(--colors--text);
  font-size: 16px;
  line-height: 1.8;
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.policy-step {
  font-family: var(--fonts--heading);
  color: var(--colors--label);
  text-transform: uppercase;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .02em;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.policy-step:first-of-type {
  margin-top: 0;
}

.contact-grid {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.contact-image {
  flex: 0 0 340px;
  max-width: 340px;
}

.contact-image img {
  width: 100%;
  height: auto;
}

.contact-details {
  flex: 1;
}

.contact-heading {
  font-family: var(--fonts--heading);
  color: var(--colors--heading);
  text-transform: uppercase;
  font-size: 2rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.contact-paragraph {
  font-family: var(--fonts--body);
  color: var(--colors--text);
  font-size: 16px;
  line-height: 1.8;
  margin-top: 0;
  margin-bottom: 1rem;
}

@media screen and (max-width: 767px) {
  .page-hero {
    padding-top: 160px;
    padding-bottom: 56px;
  }

  .page-hero-title {
    font-size: 2rem;
  }

  .page-content-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .contact-grid {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .contact-image {
    flex: 0 0 auto;
    max-width: 220px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion — respect user preference
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-anim [data-reveal] {
    transition: none !important;
  }

  .js-anim [data-reveal]:not(.is-inview) {
    opacity: 1 !important;
    transform: none !important;
  }

  .cta-primary,
  .buy-button,
  .cta-primary::before,
  .buy-button::before,
  .nav-cta,
  .scroll-top,
  .arrow,
  .play-wrapper,
  .nav-link::after,
  .footer-link::after,
  .inner-feature-box,
  .package-wrapper,
  .accordion-box,
  .references-image,
  .dropdown-icon,
  .offCanvas-panel,
  .offCanvas-overlay,
  .js-anim [data-nav-menu-open] {
    transition: none !important;
    animation: none !important;
  }
}
