/* Shared heading hierarchy and alignment across every page. */
:root {
  --font-heading: "Outfit", sans-serif;
  --font-subheading: "Outfit", sans-serif;
  --page-heading-size: clamp(2.75rem, 5.4vw, 4.5rem);
  --card-heading-size: clamp(1.35rem, 2vw, 1.55rem);
  --body-copy-size: clamp(1.125rem, 1.45vw, 1.3rem);
  --body-copy-line-height: 1.68;
  --heading-width: 56rem;
  --soft-button-bg: rgba(250, 249, 244, 0.96);
  --soft-button-border: rgba(67, 104, 24, 0.14);
  --soft-button-shadow: 0 0.65rem 1.45rem rgba(46, 72, 25, 0.09), inset 0 1px rgba(255, 255, 255, 0.9);
}

body,
button,
input,
textarea,
select,
#root,
.category-main,
.category-nav {
  font-family: "DM Sans", sans-serif !important;
}

/* Solid warm-white cards prevent background artwork from reducing readability. */
.glass-card:not(.glass-card-dark) {
  border-color: rgba(67, 104, 24, 0.12) !important;
  background: #f5f5ee !important;
  box-shadow: 0 1.1rem 2.8rem rgba(36, 58, 19, 0.1), inset 0 1px rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* More substantial header glass for clearer contrast over the bamboo artwork. */
#root > nav,
.category-nav {
  border-color: rgba(67, 104, 24, 0.14) !important;
  background: #f3f3eb !important;
  box-shadow: 0 0.9rem 2.5rem rgba(36, 58, 19, 0.16), inset 0 1px rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Keep product-page dropdowns above the page content so they remain hoverable. */
.category-nav {
  z-index: 100 !important;
}

.category-submenu {
  z-index: 110 !important;
}

#root > nav img[alt="Clearly Herbal Logo"],
.category-logo img {
  width: auto !important;
  height: 3.4rem !important;
}

img[alt="Clearly Herbal Open Diaper"] {
  width: 112% !important;
  max-width: none !important;
}

@media (max-width: 640px) {
  #root > nav img[alt="Clearly Herbal Logo"],
  .category-logo img {
    height: 2.8rem !important;
  }

  img[alt="Clearly Herbal Open Diaper"] {
    width: 145% !important;
  }

  #about div:has(> div > img[alt="Clearly Herbal Open Diaper"]) {
    height: 16.5rem !important;
    margin-top: 2rem !important;
  }

  #about div:has(> img[alt="Clearly Herbal Open Diaper"]) {
    translate: 0 0 !important;
  }

  #about h1,
  #about .hero-copy-description,
  #about .hero-copy-line {
    text-align: center !important;
  }

  #about p.hero-copy-description + div {
    justify-content: center !important;
  }
}

@media (max-width: 1023px) {
  #root nav button[class~="lg:hidden"] {
    width: 3.2rem !important;
    height: 3.2rem !important;
    padding: 0 !important;
    background: url("/images/MENUSS.svg?v=2") center / 3rem 3rem no-repeat !important;
  }

  #root nav button[class~="lg:hidden"] svg {
    display: none !important;
  }
}

#root h1,
#root h2,
.home-products-heading h2,
.category-panel > h1 {
  width: min(100%, var(--heading-width));
  margin-right: auto;
  margin-left: auto;
  font-family: var(--font-subheading, "Outfit", sans-serif) !important;
  font-size: var(--page-heading-size) !important;
  font-weight: 800 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.042em !important;
  text-align: center !important;
  text-wrap: balance;
}

#root h3,
#root h4,
#root h5,
#root h6,
.category-product-card h2 {
  font-family: var(--font-subheading, "Outfit", sans-serif) !important;
  font-size: var(--card-heading-size) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.025em !important;
  text-wrap: balance;
}

#root p,
.category-main p {
  font-family: "DM Sans", sans-serif !important;
  font-size: var(--body-copy-size) !important;
  font-weight: 400 !important;
  line-height: var(--body-copy-line-height) !important;
}

#about h1 {
  margin-top: 1rem;
}

.home-products-heading h2 {
  width: max-content;
  max-width: none;
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0.12em;
  line-height: 1.12 !important;
  overflow: visible;
  white-space: nowrap;
}

.home-products-heading {
  max-width: 100%;
}

.category-panel > h1 {
  margin-top: 1.4rem;
  margin-bottom: 1rem;
}

.home-product-card h3,
.category-product-card h2 {
  display: flex;
  min-height: 3.75rem;
  align-items: flex-start;
  margin: 0;
  font-family: var(--font-subheading, "Outfit", sans-serif) !important;
  font-size: var(--card-heading-size) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.025em !important;
  text-align: center !important;
  text-wrap: balance;
}

.home-product-description,
.category-product-copy,
.home-products-heading p,
.category-panel > p {
  font-size: var(--body-copy-size) !important;
  line-height: var(--body-copy-line-height) !important;
}

.home-products-eyebrow,
.category-kicker {
  min-height: 2.15rem;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  text-align: center;
  font-weight: 800 !important;
}

.home-products-eyebrow.standard-eyebrow-pill,
.standard-eyebrow-pill {
  display: inline-flex !important;
  width: max-content !important;
  min-height: 3.25rem;
  box-sizing: border-box;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.7rem !important;
  padding: 0.75rem 1.65rem !important;
  border: 1px solid rgba(67, 104, 24, 0.16) !important;
  border-radius: 999px !important;
  background: rgba(238, 241, 232, 0.9) !important;
  color: #334e17 !important;
  box-shadow: 0 0.45rem 1.1rem rgba(46, 72, 25, 0.1) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
}

.standard-eyebrow-pill svg {
  width: 1.05rem !important;
  height: 1.05rem !important;
  flex: 0 0 1.05rem;
  color: #436818 !important;
}

#comparison table th {
  font-size: 1.3rem !important;
  line-height: 1.35 !important;
}

#comparison table td {
  font-size: 1.2rem !important;
  line-height: 1.5 !important;
}

#comparison table td:first-child {
  font-weight: 750 !important;
}

.home-product-categories a,
.home-product-categories a.premium-color-button,
.home-product-categories a.premium-filled-button {
  border: 1px solid var(--soft-button-border) !important;
  background: var(--soft-button-bg) !important;
  color: #334e17 !important;
  -webkit-text-fill-color: #334e17 !important;
  box-shadow: var(--soft-button-shadow) !important;
  animation: none !important;
  transform: none;
}

/* One shared natural pill treatment for secondary/light controls. */
.btn-secondary,
[data-learn-more-trigger],
.category-language {
  border: 1px solid var(--soft-button-border) !important;
  border-radius: 999px !important;
  background: var(--soft-button-bg) !important;
  color: #334e17 !important;
  -webkit-text-fill-color: #334e17 !important;
  box-shadow: var(--soft-button-shadow) !important;
}

.btn-secondary:hover,
[data-learn-more-trigger]:hover,
.category-language:hover {
  border-color: rgba(67, 104, 24, 0.24) !important;
  background: rgba(228, 235, 218, 0.96) !important;
  color: #20380f !important;
  -webkit-text-fill-color: #20380f !important;
}

.category-products > summary {
  padding: 0.6rem 0.15rem 0.5rem !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.category-products > summary:hover,
.category-products[open] > summary {
  border-bottom-color: #436818 !important;
  background: transparent !important;
}

.category-products > summary::after {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin: 0 0 0.22rem 0.55rem !important;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "" !important;
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

.category-products[open] > summary::after {
  margin-bottom: 0 !important;
  transform: rotate(225deg);
}

.category-language button.is-active {
  background: #334e17 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Match any remaining light action pills to the product-category buttons. */
button[class~="bg-white"][class~="rounded-full"],
a[class~="bg-white"][class~="rounded-full"],
button[class~="bg-forest/6"][class~="rounded-full"],
a[class~="bg-forest/6"][class~="rounded-full"] {
  border: 1px solid var(--soft-button-border) !important;
  border-radius: 999px !important;
  background: var(--soft-button-bg) !important;
  color: #334e17 !important;
  -webkit-text-fill-color: #334e17 !important;
  box-shadow: var(--soft-button-shadow) !important;
}

button[class~="bg-white"][class~="rounded-full"]:hover,
a[class~="bg-white"][class~="rounded-full"]:hover,
button[class~="bg-forest/6"][class~="rounded-full"]:hover,
a[class~="bg-forest/6"][class~="rounded-full"]:hover {
  border-color: rgba(67, 104, 24, 0.26) !important;
  background: rgba(243, 245, 237, 0.98) !important;
}

.home-product-categories a::after {
  display: none !important;
}

.home-product-categories a[aria-current="page"] {
  border-color: #436818 !important;
  background: #436818 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 0.7rem 1.5rem rgba(67, 104, 24, 0.2) !important;
  outline: 2px solid rgba(126, 174, 67, 0.4);
  outline-offset: 0.25rem;
}

.home-product-categories a:not([aria-current="page"]):hover {
  border-color: rgba(67, 104, 24, 0.32) !important;
  background: rgba(67, 104, 24, 0.08) !important;
  color: #20380f !important;
  -webkit-text-fill-color: #20380f !important;
}

.premium-pillar-tag {
  display: flex !important;
  width: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.8rem !important;
  color: #334e17 !important;
  font-family: var(--font-subheading, "Outfit", sans-serif) !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.16em !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

.premium-pillar-tag::before,
.premium-pillar-tag::after {
  content: "";
  display: block;
  width: 2.1rem;
  height: 1px;
  flex: 0 0 2.1rem;
  background: rgba(51, 78, 23, 0.55);
}

.premium-pillar-item {
  position: relative;
  display: grid !important;
  grid-template-rows: 2.2rem 4.5rem auto;
  min-height: 18rem;
  align-items: start;
  justify-items: center;
  padding: 1.5rem 1.4rem !important;
  border: 0;
  border-radius: 1.5rem;
  background: transparent;
  box-shadow: none;
  text-align: center !important;
  transition: background 220ms ease !important;
}

.premium-pillar-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  right: -0.5px;
  bottom: 1.5rem;
  width: 1px;
  background: linear-gradient(transparent, rgba(67, 104, 24, 0.18), transparent);
}

.premium-pillar-item:hover {
  background: rgba(67, 104, 24, 0.045);
}

.premium-pillar-grid {
  display: none !important;
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-top: 4.5rem !important;
  padding: 1rem !important;
  overflow: hidden;
  border: 1px solid rgba(67, 104, 24, 0.12) !important;
  border-radius: 2.75rem;
  background:
    radial-gradient(circle at 50% -30%, rgba(126, 171, 70, 0.16), transparent 46%),
    rgba(255, 255, 255, 0.64);
  box-shadow: 0 1.5rem 4rem rgba(41, 70, 19, 0.08);
  backdrop-filter: blur(16px);
}

.premium-pillar-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #79a744, transparent);
}

.premium-pillar-item > .premium-pillar-tag {
  align-self: center;
  margin: 0 !important;
}

.premium-pillar-item > h4 {
  display: flex !important;
  width: 100%;
  height: 4.5rem;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  text-align: center !important;
}

.premium-pillar-item > p:last-child {
  width: min(100%, 16rem);
  margin: 0.5rem auto 0 !important;
  text-align: center !important;
}

@media (max-width: 900px) {
  .premium-pillar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .premium-pillar-item:nth-child(2)::after {
    display: none;
  }

  .premium-pillar-item:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(67, 104, 24, 0.1);
  }
}

@media (max-width: 560px) {
  .premium-pillar-grid {
    grid-template-columns: 1fr !important;
    border-radius: 2rem;
  }

  .premium-pillar-item {
    grid-template-rows: 2.2rem auto auto;
    min-height: 0;
  }

  .premium-pillar-item:not(:last-child) {
    border-bottom: 1px solid rgba(67, 104, 24, 0.1);
  }

  .premium-pillar-item::after {
    display: none;
  }

  .premium-pillar-item > h4 {
    min-height: 3.5rem;
    height: auto;
  }
}

#features .max-w-3xl {
  max-width: 100% !important;
}

#features .feature-intro-layout {
  position: relative;
  left: 50%;
  width: min(94vw, 100rem) !important;
  max-width: 100rem !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#features h2 {
  position: static;
  left: auto;
  width: 100% !important;
  max-width: 100rem !important;
  font-size: clamp(2.4rem, 4.2vw, 4.5rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.042em !important;
  margin-right: auto !important;
  margin-left: auto !important;
  transform: none;
  text-align: center !important;
}

#features .glass-card {
  align-items: center !important;
  text-align: center !important;
}

#features .glass-card > div:first-child,
#features .glass-card > div:first-child > div {
  width: 100%;
  text-align: center !important;
}

#features .glass-card h3,
#features .glass-card p,
#features .glass-card span {
  margin-right: auto;
  margin-left: auto;
  text-align: center !important;
}

#features .glass-card p {
  line-height: 1.42 !important;
}

#features p.max-w-xl {
  width: min(94vw, 76rem) !important;
  max-width: 76rem !important;
  margin-right: auto !important;
  margin-left: auto !important;
  text-align: center !important;
}

#features .feature-intro-copy > span {
  display: block;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 1100px) {
  #features .feature-intro-copy > span {
    white-space: normal;
  }
}

/* Compact the multi-step material process labels without reducing readability. */
#root .glass-card [class~="md:grid-cols-6"] p {
  line-height: 1.25 !important;
}

#features .glass-card svg {
  margin-right: auto;
  margin-left: auto;
}

#features .glass-card > div:first-child > div:first-child {
  margin-right: auto;
  margin-left: auto;
}

.feature-heading-line {
  display: block;
  white-space: nowrap;
}

@media (max-width: 1499px) {
  #features h2 {
    width: min(94vw, 52rem) !important;
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .feature-heading-line {
    white-space: normal;
  }
}

.animate-marquee :is(span, p, div) {
  font-size: clamp(0.82rem, 1vw, 0.95rem) !important;
  line-height: 1.4 !important;
}

.animate-marquee svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem;
  stroke-width: 2.25;
}

footer,
footer :is(h1, h2, h3, h4, h5, h6, p, span, a, li) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

footer :is(h1, h2, h3, h4, h5, h6) {
  background: none !important;
  animation: none !important;
}

footer a {
  opacity: 0.82;
}

footer a:hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1;
}

#root h2.story-heading-right {
  width: 100% !important;
  max-width: none !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  text-align: left !important;
  text-wrap: balance;
}

.story-content-right,
.story-content-right > p {
  text-align: left !important;
}

.story-content-right li {
  justify-content: flex-start !important;
  text-align: left !important;
}

.story-content-right li > div:first-child {
  order: 0;
}

#root .material-approach-heading {
  width: max-content !important;
  max-width: 94vw !important;
  margin-right: auto !important;
  margin-left: auto !important;
  font-size: clamp(2.5rem, 4.5vw, 3.75rem) !important;
  white-space: nowrap;
  text-align: center !important;
}

@media (max-width: 640px) {
  #root .material-approach-heading {
    width: 100% !important;
    white-space: normal;
  }
}

#about .hero-eyebrow-text {
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.16em !important;
}

#about .hero-copy-description,
#about p[data-two-line-copy] {
  width: min(94vw, 60rem) !important;
  max-width: 60rem !important;
  margin-right: auto !important;
  margin-left: auto !important;
  text-align: center !important;
}

#about h1 {
  width: min(94vw, 60rem) !important;
  max-width: 60rem !important;
  text-align: center !important;
}

#about .hero-copy-line {
  display: block;
  white-space: nowrap;
  text-align: center !important;
}

#about p.hero-copy-description + div {
  width: min(94vw, 60rem) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  justify-content: center !important;
}

@media (max-width: 900px) {
  #about .hero-copy-line {
    white-space: normal;
  }
}

:is(.glass-card, .home-product-card, .category-product-card, .learn-more-dialog)
  :is(h2, h3, h4, h5, h6).premium-color-title {
  color: #20380f !important;
  background: none !important;
  -webkit-text-fill-color: #20380f !important;
  animation: none !important;
}

@media (max-width: 640px) {
  .animate-marquee svg {
    width: 1.1rem !important;
    height: 1.1rem !important;
    min-width: 1.1rem;
  }
}

@media (max-width: 640px) {
  :root {
    --page-heading-size: clamp(2.35rem, 11vw, 3.3rem);
    --body-copy-size: 1.075rem;
  }

  .home-product-card h3,
  .category-product-card h2 {
    min-height: auto;
  }

  .home-products-heading h2 {
    width: 100%;
    white-space: normal;
  }

  #comparison table th {
    font-size: 1.05rem !important;
  }

  #comparison table td {
    font-size: 1rem !important;
  }

  #about h1,
  #about p.hero-copy-description,
  #about p[data-two-line-copy],
  #about p.hero-copy-description > .hero-copy-line {
    text-align: center !important;
  }

  #about p.hero-copy-description + div {
    justify-content: center !important;
  }
}
