* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Keep touch scrolling and carousels, but disable page zoom gestures. */
@media (any-pointer: coarse) {
  html,
  body {
    touch-action: pan-x pan-y;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--type-body-small);
  line-height: 1.5;
}

/* Neutral palette shared by the Science, Reviews and FAQ designs. */
:is(.science-page, .reviews-page, .faq-page) {
  --color-bg: #fff;
  --color-bg-warm: #f4f4f4;
  --color-bg-muted: #f4f4f4;
  --color-surface: #f4f4f4;
  --color-accent: #000;
  --color-surface-strong: #dedede;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

video {
  display: block;
  max-width: 100%;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 72px;
}

.page > main {
  flex: 1 0 auto;
}

.page.page--home-hero {
  overflow: visible;
  padding-top: 0;
}

.page--home-hero > .site-header {
  display: block;
}

.page > .site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

@media (max-width: 767px) {
  .page--hero-mobile {
    padding-top: 76px;
  }

}

.section {
  padding: var(--section-pad-y) var(--page-pad-x);
  scroll-margin-top: clamp(72px, 5.86vw, 150px);
}

.scroll-reveal-ready [data-reveal-section] [data-reveal-item] {
  opacity: var(--scroll-reveal-opacity, 0);
  transform: translateY(var(--scroll-reveal-y, 52px));
  will-change: opacity, transform;
}

.container {
  margin: 0 auto;
  max-width: var(--container);
  width: 100%;
}

.container-wide {
  margin: 0 auto;
  max-width: var(--container-wide);
  width: 100%;
}

.site-footer {
  scroll-margin-top: clamp(72px, 5.86vw, 150px);
}

@media (min-width: 1024px) {
  .page {
    padding-top: 104px;
  }

  .section,
  .site-footer {
    scroll-margin-top: 104px;
  }
}

@media (min-width: 1920px) {
  .page {
    padding-top: 120px;
  }

  .section,
  .site-footer {
    scroll-margin-top: 120px;
  }
}

.eyebrow {
  color: var(--color-text-muted);
  font-size: var(--type-section-copy);
  font-weight: 400;
  line-height: 1.45;
  margin: 0 auto;
  max-width: var(--container-narrow);
  text-align: center;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--type-section-title);
  font-weight: 500;
  line-height: 1.14;
  margin: 0;
  text-align: center;
}

.section-copy {
  color: var(--color-text-muted);
  font-size: var(--type-section-copy);
  font-weight: 400;
  line-height: 1.45;
  margin: 0 auto;
  max-width: var(--container-narrow);
  text-align: center;
}

.media-frame {
  background: linear-gradient(135deg, #d8d5cb, #f6f2e8);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
}

.media-frame::before {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.68), transparent 26%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.08), transparent 40%);
  content: "";
  inset: 0;
  position: absolute;
}

.media-frame::after {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.primary-pill {
  align-items: center;
  background: var(--color-text);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--color-white);
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 28px;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.primary-pill:hover {
  background: #242424;
  transform: translateY(-1px);
}

.primary-pill:active {
  transform: translateY(0);
}

.primary-pill:focus-visible,
.footer-submit:focus-visible,
.mobile-menu-button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.sr-only {
  clip: rect(0 0 0 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (min-width: 1024px) {
  body {
    font-size: var(--type-body);
  }
}

@media (max-width: 767px) {
  .page {
    padding-top: 0;
  }

  .section {
    padding-left: var(--page-pad-x);
    padding-right: var(--page-pad-x);
  }

  .section-copy {
    line-height: 1.55;
  }

}

@media (prefers-reduced-motion: reduce) {
  [data-reveal-section] [data-reveal-item] {
    transform: none;
    transition: none;
  }
}
