/* Shared styles for the Frontier Allergy content pages (about / contact / terms) */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { color-scheme: dark; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* reserve scrollbar space on both sides so content stays centered
     in the window whether or not a scrollbar is showing */
  scrollbar-gutter: stable both-edges;
}

/* page transition: outgoing fades out; incoming fades in while gently rising
   with a smooth decelerating ease — the understated pattern used on polished UIs */
@view-transition { navigation: auto; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
::view-transition-old(root) {
  animation: vt-fade-out 0.32s ease both;
}
::view-transition-new(root) {
  animation: vt-rise-in 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

body {
  min-height: 100vh;
  position: relative;   /* positioning context for the corner logo */
  overflow-x: hidden;   /* safety net: never allow horizontal scroll on any screen */
  /* matched to the landing page's deep-oxblood palette (#490c0d field) */
  background:
    radial-gradient(125% 95% at 50% 10%,
      #530e11 0%, #490c0d 32%, #370809 64%, #250609 85%, #1c0407 100%) no-repeat,
    #1c0407;
  background-attachment: fixed;
  color: #ece2e1;
  font-family: "Avenir Next", "Avenir", "Segoe UI", system-ui,
               -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* wordmark — pinned to the top-left corner as a site logo (links home) */
.brand {
  position: absolute;
  top: clamp(20px, 3.4vh, 34px);
  left: clamp(20px, 4vw, 46px);
  z-index: 20;
  display: block;
  line-height: 0;
  border: none;
}
.brand img {
  display: block;
  width: clamp(112px, 14vw, 150px);
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.45));  /* keeps it legible over any content */
  transition: opacity 0.2s ease;
}
.brand:hover img { opacity: 0.78; }

/* content column */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 40px) clamp(22px, 6vw, 40px) clamp(40px, 8vh, 80px);
  text-align: center;   /* center everything on the page */
}

/* reserve the vertical space the wordmark used to occupy at the top (it now
   lives in the corner), so the rest of the content stays exactly where it was */
.page::before {
  content: "";
  display: block;
  height: calc(clamp(140px, 24vw, 220px) * 201 / 563);
  margin-bottom: clamp(18px, 4vh, 40px);
}

.page h1 {
  font-family: "Avenir Next", "Avenir", "Segoe UI", system-ui,
               -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  text-transform: none;
  font-size: clamp(18px, 2.8vw, 27px);   /* smaller than the wordmark */
  line-height: 1.1;
  color: #fdfdfd;
  text-align: center;
  letter-spacing: 0.01em;
}

.title-rule {
  width: clamp(120px, 22vw, 220px);
  height: 1px;
  margin: clamp(16px, 3vh, 26px) auto clamp(28px, 5vh, 44px);
  background: linear-gradient(90deg, transparent, rgba(255, 190, 175, 0.6), transparent);
}

/* vertically center the content block (about, contact); footer stays at bottom.
   Grid is used (not flex auto-margins) because a grid item stretches to the
   column width instead of shrink-wrapping to its widest child, so the content
   never overflows a narrow/phone screen. */
body.v-center {
  min-height: 100vh;
  display: grid;
  /* minmax(0,1fr): the column fills the screen but never grows past it,
     so wide children (the video) can't push the layout off a phone screen */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
}
body.v-center .page { align-self: center; min-width: 0; }

/* left-justified body text within the centered column (terms);
   the title, effective date, and each section header stay centered */
.page--left { text-align: left; }
.page--left h1 { text-align: center; }
.page--left .effective { text-align: center; }
.page--left ul { list-style: disc; padding-left: 1.4em; }

.page p { margin: 0 0 1.15em; color: #e9dedd; }
.lead { font-size: clamp(16px, 2vw, 19px); color: #f3ebea; }
.effective { color: #c9b6b4; font-size: 0.95em; margin-bottom: 1.6em; }

.page h2 {
  font-weight: 600;
  font-size: clamp(17px, 2.3vw, 22px);
  color: #ffffff;
  margin: clamp(26px, 5vh, 42px) 0 0.5em;
  letter-spacing: 0.01em;
}

.page ul { margin: 0 0 1.15em; padding-left: 0; list-style: none; }
.page li { margin-bottom: 0.5em; color: #e9dedd; }

.email { font-size: clamp(18px, 2.6vw, 24px); }

/* clickable video thumbnail (links out to YouTube) */
.video-link {
  display: block;
  position: relative;
  max-width: 560px;
  margin: clamp(28px, 5vh, 46px) auto 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.video-link:hover,
.video-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.28);
}
.video-link img { display: block; width: 100%; height: auto; }
.video-link .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(58px, 11vw, 80px);
  height: clamp(58px, 11vw, 80px);
  border-radius: 50%;
  background: rgba(20, 4, 7, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.video-link:hover .play,
.video-link:focus-visible .play { background: rgba(150, 20, 26, 0.72); }
.video-link .play::after {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: clamp(9px, 1.7vw, 12px) 0 clamp(9px, 1.7vw, 12px) clamp(15px, 2.8vw, 20px);
  border-color: transparent transparent transparent #ffffff;
  margin-left: 5px;
}
.video-caption {
  text-align: center;
  font-size: clamp(12px, 1.5vw, 14px);
  color: rgba(255, 255, 255, 0.6);
  margin: clamp(10px, 2vh, 16px) 0 0;
  letter-spacing: 0.02em;
}

/* inline links */
a {
  color: #ffcbb8;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 203, 184, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}
a:hover, a:focus-visible { color: #ffffff; border-color: #ffffff; }

/* page footer nav (matches the home page footer) */
.page-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 760px;
  margin: clamp(36px, 7vh, 72px) auto 0;
  padding: clamp(20px, 4vh, 34px) clamp(22px, 6vw, 40px) clamp(28px, 5vh, 48px);
  text-align: center;
}
.page-footer-links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
  margin-bottom: clamp(9px, 1.6vh, 15px);
}
.page-footer-links a {
  font-size: clamp(11px, 1.3vw, 16px);
  letter-spacing: 0.012em;
  color: #fafafa;
  border: none;
  transition: opacity 0.2s ease;
}
.page-footer-links a:hover { opacity: 0.78; color: #fafafa; }
.page-copyright {
  font-size: clamp(10px, 1.05vw, 13px);
  letter-spacing: 0.02em;
  color: rgba(250, 250, 250, 0.65);
}
