/* AMP visual repair, 2026-09-26. Scoped to storefront elements.
   Keep order/payment modules, product data, admin, and science site untouched. */

/* Readable original Syne heading: navy + one consistent AMP blue.
   Solid text avoids clipped glyphs and low-contrast gradient endpoints. */
.amp-premium-home .ah-hero .ah-original-heading {
  color: #101d33 !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  text-shadow: none !important;
  line-height: 1.14 !important;
  padding-block: .025em .1em;
  overflow: visible !important;
}
.amp-premium-home .ah-hero .ah-original-heading .ah-title-accent {
  display: inline;
  color: #2563eb !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-shadow: none !important;
}
@media (forced-colors: active) {
  .amp-premium-home .ah-hero .ah-original-heading,
  .amp-premium-home .ah-hero .ah-original-heading .ah-title-accent { color: CanvasText !important; }
}

/* Preserve a real, absolutely positioned stage for the three floating vials. */
.ah-intro .ah-hero-trio .ap-hero-vials { position: absolute !important; }
.ah-intro .ah-hero-trio .ap-hero-vials::before {
  content: "";
  position: absolute;
  inset: 4% 8% 7%;
  background: radial-gradient(ellipse at 45% 45%, #3679ef33, transparent 68%),
              radial-gradient(ellipse at 72% 62%, #169c9c20, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.ah-intro .ah-hero-trio .ap-hero-vial {
  filter: drop-shadow(0 12px 14px #15376520) drop-shadow(0 0 14px #3679ee29) !important;
}

/* The badge owns a natural-height row; the vial fills the remaining image panel.
   This also covers longer saved labels without hard-coded badge-height guesses. */
.ap-product-card > a.ap-card-image {
  position: relative !important;
  display: grid !important;
  grid-template-rows: max-content minmax(0, 1fr);
  row-gap: 4px;
  padding: 0 0 4px !important;
  box-sizing: border-box;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 61%, #e0edff 0%, #f0f5fc 47%, #f8fafc 87%) !important;
}
.ap-product-card > a.ap-card-image > img {
  position: static !important;
  grid-row: 2;
  align-self: stretch;
  justify-self: center;
  min-height: 0 !important;
  width: 92% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: contain !important;
  transform: none !important;
  filter: drop-shadow(0 9px 9px #1736581c) drop-shadow(0 0 12px #397af630) !important;
  z-index: 1;
}
.ap-product-card .ah-purity-pill {
  position: static !important;
  grid-row: 1;
  justify-self: start;
  margin: 10px 10px 0 !important;
  max-width: calc(100% - 20px);
  z-index: 2;
  background: #e8f5f2 !important;
  border-color: #a6d2cd !important;
  color: #14776f !important;
  box-shadow: none !important;
}
.ap-field > img {
  filter: drop-shadow(0 9px 13px #12294a25) drop-shadow(0 0 13px #528cff36) !important;
}
.amp-refined-product .rp-product-visual {
  background: radial-gradient(ellipse at 50% 48%, #dfebff, #f5f8fc 70%) !important;
}
.amp-refined-product .rp-product-visual > div:first-child img {
  filter: drop-shadow(0 10px 15px #1533581c) drop-shadow(0 0 18px #4582f32e) !important;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ap-product-card > a.ap-card-image:hover > img { transform: translateY(-2px) scale(1.015) !important; }
}

/* Leave space for Syne descenders. Do not apply text clipping to a heading. */
.amp-premium-home .ap-section-heading,
.amp-premium-home .ap-section-heading > div { overflow: visible !important; min-width: 0; }
.amp-premium-home .ap-section-heading h2 {
  line-height: 1.2 !important;
  overflow: visible !important;
  padding: .02em 0 .14em !important;
  margin: 0 !important;
  height: auto !important;
  max-height: none !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: #14233e !important;
  text-wrap: balance;
}

/* The strip below the moving words uses the same white / ice-blue palette. */
.amp-premium-home .ap-benefits {
  background: linear-gradient(110deg, #edf4ff, #f5f9fc 68%, #edf8f8) !important;
  border-block: 1px solid #dde8f5;
  color: #152c4d !important;
}
.amp-premium-home .ap-benefits-inner { gap: 16px !important; padding-block: 20px !important; }
.amp-premium-home .ap-benefits a {
  gap: 11px !important;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #152c4d !important;
  min-width: 0;
}
.amp-premium-home .ap-benefits .ap-icon {
  box-sizing: content-box;
  width: 20px !important;
  height: 20px !important;
  padding: 9px;
  flex: none;
  color: #2563eb !important;
  background: #fff;
  border: 1px solid #d9e6f8;
  border-radius: 11px;
}
.amp-premium-home .ap-benefits span { color: #193a62 !important; line-height: 1.5; }
.amp-premium-home .ap-benefits small { color: #536b85 !important; }
.amp-premium-home .ap-benefits a:focus-visible { outline: 2px solid #2563eb; outline-offset: 5px; border-radius: 8px; }

/* One pay panel, not three nested frames. Preserve the total/payment logic. */
.amp-modern-checkout .mc-pay-footer .mc-review {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
}
.amp-modern-checkout .mc-pay-footer .mc-review .mc-section-heading {
  display: flex !important;
  align-items: flex-start !important;
  gap: 11px !important;
  padding: 0 !important;
  margin: 0 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  min-height: 0 !important;
}
.amp-modern-checkout .mc-pay-footer .mc-section-number {
  display: grid;
  place-items: center;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  flex: 0 0 30px;
  font-size: 11px !important;
  border: 1px solid #dbe7fc !important;
  box-shadow: none !important;
  margin-top: 1px;
}
.amp-modern-checkout .mc-pay-footer .mc-section-heading > div { min-width: 0; }
.amp-modern-checkout .mc-pay-footer .mc-section-heading h2 { font-size: 18px !important; line-height: 1.35 !important; margin: 0 !important; }
.amp-modern-checkout .mc-pay-footer .mc-section-heading p { font-size: 12px !important; line-height: 1.6 !important; margin: 3px 0 0 !important; }
.amp-modern-checkout .mc-pay-footer .mc-place-order { margin-top: 14px !important; }
.amp-modern-checkout .mc-pay-footer .mc-terms { text-align: center !important; margin-top: 16px !important; }

@media (max-width: 767px) {
  .amp-premium-home .ap-section-heading { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 10px !important; }
  .amp-premium-home .ap-section-heading > .ap-text-link { justify-self: start; max-width: none !important; margin: 0 !important; }
  .amp-premium-home .ap-benefits-inner { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px 14px !important; padding-block: 18px !important; }
  .amp-premium-home .ap-benefits a { align-items: flex-start; gap: 9px !important; padding: 0; }
  .amp-premium-home .ap-benefits .ap-icon { width: 17px !important; height: 17px !important; padding: 6px; border-radius: 9px; }
  .amp-premium-home .ap-benefits span { font-size: 10px !important; }
  .amp-premium-home .ap-benefits small { font-size: 9px !important; line-height: 1.5 !important; }
  .ap-product-card .ah-purity-pill { margin: 9px 9px 0 !important; }
  .amp-modern-checkout .mc-pay-footer { padding: 19px 17px !important; }
  .amp-modern-checkout .mc-pay-footer .mc-section-heading h2 { font-size: 17px !important; }
  .amp-modern-checkout .mc-pay-footer .mc-section-heading p { font-size: 11px !important; }

  /* Fix only the storefront footer, never review-card footers. */
  :is(footer.amp-premium-footer, footer.bg-amp-surface) {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    background: #fff !important;
  }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div { padding: 22px 18px 0 !important; box-sizing: border-box; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div > div:first-child { gap: 21px !important; padding-bottom: 20px; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start;
    gap: 20px 12px !important;
  }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap > div { min-width: 0 !important; max-width: none !important; width: auto !important; margin: 0 !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap h3 { font: 700 10px/1.45 Inter, system-ui, sans-serif !important; letter-spacing: .01em !important; margin: 0 0 7px !important; overflow-wrap: normal; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap ul { margin: 0 !important; padding: 0 !important; list-style: none; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap li { margin: 0 !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap li > a {
    display: block !important;
    min-height: 24px !important;
    padding: 3px 0 !important;
    font: 400 11px/1.5 Inter, system-ui, sans-serif !important;
    word-break: normal !important;
    overflow-wrap: break-word;
  }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap > div:last-child:nth-child(3n + 1) { grid-column: 1 / -1; padding-top: 13px !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .flex-1.flex.flex-wrap > div:last-child:nth-child(3n + 1) ul {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 4px 12px !important;
  }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div > div:first-child > div:first-child > div:last-child { display: grid; gap: 0 !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div > div:first-child > div:first-child > div:last-child a { font-size: 11px !important; line-height: 1.5 !important; min-height: 24px !important; padding-block: 3px; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div > div:nth-child(2) { gap: 14px !important; padding-top: 16px !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div > div:nth-child(2) > div:first-child { font-size: 11px !important; line-height: 1.65 !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div > div:nth-child(2) > div:last-child { gap: 8px !important; flex-wrap: wrap !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) > div > div:nth-child(2) > div:last-child > :is(a, span[title]) { font-size: 10px !important; min-height: 28px; padding: 4px 8px; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .amp-footer-payment-logos { justify-content: flex-start !important; flex-wrap: wrap !important; gap: 12px !important; padding: 12px 0 4px !important; }
  :is(footer.amp-premium-footer, footer.bg-amp-surface) .amp-footer-payment-logos img { width: auto !important; max-width: 58px !important; max-height: 24px !important; object-fit: contain; }
  /* Opaque navigation keeps scrolling text from showing through the controls. */
  nav.amp-safe-bottom { background: #fff !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-top: 1px solid #dce5f1 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-product-card > a.ap-card-image > img,
  .ap-product-card > a.ap-card-image:hover > img { transform: none !important; translate: none !important; transition: none !important; }
}
/* Desktop trio: lift the side vials clear of the fixed artwork caption. */
@media (min-width: 1024px) {
  .ah-intro .ah-hero-trio .ap-hero-vials { inset: 10% -2% 18%; }
  .ah-intro .ah-hero-trio .ap-vial-0 { top: 12%; }
  .ah-intro .ah-hero-trio .ap-vial-1 { top: 0; }
  .ah-intro .ah-hero-trio .ap-vial-2 { top: 14%; }
}
