/* ==========================================================================
   GT Smiles - Site-Specific Styles
   
   This file extends framework.css with brand-specific styling.
   framework.css provides the base system, tokens, and primitives.
   ========================================================================== */

  /* Green color scale from rgb(118, 151, 95)  Base color approx rgb(118, 151, 95)
--green-100: oklch(97% 0.02 130.5);
--green-200: oklch(92% 0.045 130.5);
--green-300: oklch(85% 0.06 130.5);
--green-400: oklch(75% 0.07 130.5);
--green-500: oklch(65% 0.077 130.5);   
--green-600: oklch(55% 0.08 130.5);
--green-700: oklch(45% 0.075 130.5);
--green-800: oklch(35% 0.065 130.5);
--green-900: oklch(25% 0.055 130.5);
*/
/* ---------------------------
   Brand Tokens & Overrides
---------------------------- */
:root{
  /* Colors */
  --bg: #fff;
  --bg-light: #f2f2f2;
  --bg-dark: #222;
  --surface: #fff;
  --text: rgba(0,0,0,.92);
  --text-strong: rgba(0,0,0,1);
  --text-muted: rgba(0,0,0,.75);
  --link: oklch(55% 0.08 130.5); /*#4c5b01*/
  --link-muted: oklch(92.896% 0.06151 132.777);
  --link-strong: oklch(35% 0.065 130.5); /* #4c5b01 */

  /* ── Palette fallbacks (default preset: c1 hue 190, c2 hue 110) ──
     The logo-randomizer JS overwrites these on every page load.
     These provide a safe baseline when JS hasn't run yet. */

  /* c1 — primary */
  --c1-1: #f8fbfc;
  --c1-2: #f4fafb;
  --c1-3: #f4fafb;
  --c1-5: #f0f8fa;
  --c1-20: #e0f2f5;
  --c1-30: #d4edf2;
  --c1-50: #c4e7ee;
  --c1-100: #96dbe9;
  --c1-200: #74d3e7;
  --c1-300: #20bfdf;
  --c1-400: #1dacc9;
  --c1-500: #2fbeda;
  --c1-600: #1a7f93;
  --c1-700: #1f8093;
  --c1-800: #228ba0;
  --c1-900: #1c7182;
  --c1-dark: #186270;
  --c1-darker: #155461;
  --c1-x-dark: #124954;
  --c1-error: #fcf5f0;
  --c1-error-border: #c4621c;

  /* c2 — secondary */
  --c2-1: #f9fcf8;
  --c2-2: #f5fbf4;
  --c2-3: #f5fbf4;
  --c2-5: #f2f9f0;
  --c2-20: #e4f4e1;
  --c2-30: #daf0d6;
  --c2-50: #ccecc6;
  --c2-100: #a6e699;
  --c2-200: #8ae278;
  --c2-300: #44d926;
  --c2-400: #3dc322;
  --c2-500: #50d435;
  --c2-600: #2e871d;
  --c2-700: #328722;
  --c2-800: #3a9b27;
  --c2-900: #2f7e20;
  --c2-dark: #296d1b;
  --c2-darker: #235e17;
  --c2-x-dark: #1f5214;
  --c2-error: #fcf3f0;
  --c2-error-border: #c4461c;

  /* link — tracks c1 palette; hex fallback for when JS hasn't run */
  --link-1: var(--c1-1, #f8fbfc);
  --link-600: var(--c1-600, #1a7f93);
  --link-700: var(--c1-700, #1f8093);
  --link-800: var(--c1-800, #228ba0);
  --link-dark: var(--c1-dark, #186270);
  --link-darker: var(--c1-darker, #155461);
  --link-x-dark: var(--c1-x-dark, #124954);
  --link-error: var(--c1-error-border, #c4621c);

  /* sky gradient */
  --sky-color-top: #bae0e8;
  --sky-color-mid-light: #f4fafb;
  --sky-color-mid: #f8fbfc;
  --sky-color-horizon: #fcfdfd;

  --border: #ccc;
  --border-strong: #777;
  --border-muted: #eee;

  /* Base colors (used by logo SVG) */
  --color-white: #fff;
  --color-stone-700: #44403c;

  --linear-gradient-ai: 90deg,
    #ff6b6b 0%,
    #ffd93d 16.67%,
    #6bcf7f 33.33%,
    #4d96ff 50%,
    #9d6cff 66.67%,
    #ff6bdf 83.33%,
    #ff6b6b 100%;

  --linear-gradient-logo: 90deg,
    var(--c1-300) 0%,
    var(--c1-100) 16.67%,
    var(--c2-50) 33.33%,
    var(--c2-300) 50%,
    var(--c2-600) 66.67%,
    var(--c1-600) 83.33%,
    var(--c1-300) 100%;

  /* Brand-specific tokens */
  --accent: #0b1220;
  --accent-ink: #ffffff;
  
  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0,0,0,.06);
  --shadow-2: 0 10px 30px rgba(0,0,0,.10);

}

/* Logo SVG letter spacing */
#smiles #m { transform: translateX(2px); }
#smiles #i { transform: translateX(4px); }
#smiles #l { transform: translateX(6px); }
#smiles #e { transform: translateX(8px); }
#smiles #s2 { transform: translateX(10px); }

/* Override body with brand font settings */
body{
  color: var(--text);
  background: var(--bg);
  font-size: var(--step-0);
  letter-spacing: 0.01em;
}

/* Override link behavior for this site */
a{ text-decoration: none; }
a:hover{ text-decoration: underline; }



/* ---------------------------
   Site-Specific Components
---------------------------- */

/* Custom button styles (extends .button from framework) */
.btn,
.wpforms-submit{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3) var(--space-2) var(--space-3);
  border-radius: 999px;
  border: 1px solid var(--text);
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.btn:hover,
.wpforms-submit:hover
{ text-decoration: none; box-shadow: var(--shadow-1); }
.btn:focus-visible,
.wpforms-submit:focus-visible
{ outline: 3px solid rgba(0,0,0,.18); outline-offset: 2px; }

.btn--primary,
.wpforms-submit {
  background: var(--link-dark);
  padding: 7px 18px 9px;
  border: 1px solid rgba(255,255,255,.15);
  color: #fff !important;
  font-size: var(--step-0);
  font-weight: 500;
  transition: border-color 0.2s ease;
}
.btn--primary:focus,
.btn--primary:hover,
.wpforms-submit:focus,
.wpforms-submit:hover {
  background: var(--link-darker);
  padding: 6px 17px 8px;
  border: 2px solid var(--link-x-dark);
}
.btn--primary:active,
.wpforms-submit:active {
  margin: 1px;
  background: var(--link-dark);
  border-width: 1px;
}
.btn--primary.btn--ai:active {
  margin: 0;
}
.btn--ghost{
  background: transparent;
}
.btn--full{ width: 100%; }



/* AI Agent "Ask" Button Variants */
.btn--ai{
  position: relative;
  background: transparent;
  color: var(--text);
  overflow: visible;
  z-index: 1;
}

/* Button background layer */
.btn--ai::before{
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  border-radius: 996px;
  z-index: -1;
}
.btn--ai:hover::before{
  background: var(--bg);
}


/* Rainbow border on hover */
.btn--ai::after{
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    var(--linear-gradient-logo)
  );
  background-size: 200% 100%;
  border-radius: 999px;
  opacity: 0;
  z-index: -2;
  transition: opacity 300ms ease;
  pointer-events: none;
}
.btn--ai:focus,
.btn--ai:hover{
  border-color: transparent;
}

.btn--ai:focus::after,
.btn--ai:hover::after{
  opacity: 1;
  animation: rainbow-shift 3s linear infinite;
}

/* Animated rainbow gradient shift */
@keyframes rainbow-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}


/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .btn--ai::before{
    animation: none;
  }
  
  .btn--ai:hover::before {
    background: linear-gradient(90deg, #4d96ff 0%, #9d6cff 100%);
  }
}

/* Custom input styles */
.input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font: inherit;
}
.input--lg{ padding: 14px 16px; }
.input:focus-visible{ outline: 3px solid rgba(0,0,0,.18); outline-offset: 2px; }

/* Chips for filtering */
.chip-row{
  display:flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.chip{
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  font-size: var(--step--1);
}
.chip:hover{ box-shadow: var(--shadow-1); }
.chip:focus-visible{ outline: 3px solid rgba(0,0,0,.18); outline-offset: 2px; }

.rule{
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-5) 0;
}

.btn-icon {
    background: transparent;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
  font-size: 1.25rem;
}
.btn-icon:focus-visible{ outline: 3px solid rgba(0,0,0,.18); outline-offset: 2px; }

/* ---------------------------
   Bar Chart Block
---------------------------- */
.gt-bar-chart {
  margin: var(--space-6) 0;
  padding: var(--space-4) 0;
}

.prose .gt-bar-chart {
  max-width: 100%;
}

.gt-bar-chart__title {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
}

.gt-bar-chart__rows {
  display: grid;
  gap: var(--space-2);
}

.gt-bar-chart__row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(180px, 3fr) minmax(72px, auto);
  gap: var(--space-2);
  align-items: center;
}

.gt-bar-chart__meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.gt-bar-chart__label {
  font-weight: 600;
  line-height: 1.2;
}

.gt-bar-chart__detail {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.2;
}

.gt-bar-chart__track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
}

.gt-bar-chart__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--c1-dark);
  transition: width 900ms cubic-bezier(0.21, 0.8, 0.25, 1) var(--chart-delay, 0ms);
}

.gt-bar-chart__row--highlight .gt-bar-chart__fill {
  background: var(--c1-dark);
}

.gt-bar-chart__row--green .gt-bar-chart__fill {
  background: var(--c2-dark);
}

.gt-bar-chart__row--green .gt-bar-chart__label,
.gt-bar-chart__row--green .gt-bar-chart__detail {
  color: var(--c2-800);
}

.gt-bar-chart__value {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  font-size: var(--step--1);
}

.gt-bar-chart__ticks {
  position: relative;
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 20px 0 0;
  height: 36px;
  border-top: 1px solid rgba(0,0,0,.22);
}

.gt-bar-chart__tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.gt-bar-chart__tick::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 1px;
  height: 8px;
  background: rgba(0,0,0,.25);
  transform: translateX(-50%);
}

.gt-bar-chart__tick-label {
  display: inline-block;
  margin-top: 8px;
  font-size: var(--step--2);
  color: var(--text-muted);
  white-space: nowrap;
}

.gt-bar-chart__caption {
  margin-top: var(--space-2);
  font-size: var(--step--1);
  color: var(--text-muted);
}

@media (max-width: 780px) {
  .gt-bar-chart__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .gt-bar-chart__value {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gt-bar-chart__fill {
    transition: none;
  }
}


/* ---------- Site Structure (.site-header, .site-main, .site-footer and shared structural elements) ---------- */

/* ---------------------------
   Site Header & Navigation
---------------------------- */

.site-header {
  background: var(--bg-dark) url('../images/ui/polygon-background.jpg') center/cover;
  border-bottom: 5px solid transparent;
  border-image: url('../images/ui/green-bg-1.webp') 0 0 5 0 stretch;
  /*border-bottom: 2px solid color-mix(in srgb, var(--c1-30) 80%, transparent);*/
  letter-spacing: 0.04em;
}






/* Make header static when mobile nav is open so it scrolls with content */
body.mobile-nav-open .site-header {
  position: static;
}
.mobile-nav-open .site-main,
.mobile-nav-open .site-footer {
  display: none;
}

.site-logo {
    position: relative;
    top: 7px;
    padding: 1px 8px 2px 0;
    height: 47px;
    white-space: nowrap;
}
.site-logo__brand {
    position: relative;
    top: 4px;
}
.site-logo__brand svg {
  height: 22px;
  width: auto;
}
.site-logo__tagline{
  display: none;
  padding-left: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}
.site-logo:hover .site-logo__tagline{
    /*color: var(--link-muted);*/
    color: var(--c1-50);
}

.site-nav { 
    display: none;
    margin: 0 auto 0 -4px;
}

.nav-list{
  display:flex;
  align-items:center;
  gap: 8px;
  list-style:none;
  margin: 0;
  padding: 0;
}

.nav-link{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: inherit;
  cursor: pointer;
  text-decoration:none;
  color: #fff;
}

.nav-link:hover {
    /*color: var(--link-muted);*/
    color: var(--c1-50) !important;
    text-decoration: none !important;
}

/* Current page / active states */
.current-menu-item > .nav-link,
.current_page_item > .nav-link,
.current-menu-ancestor > .nav-link,
.current-menu-parent > .nav-link,
.current-menu-item .site-logo__tagline {
  /*color: var(--link-muted);*/
  color: var(--c1-30);
}
.nav-menu-is-open .nav-link {
    color: #fff;
}
.nav-menu-is-open .is-open .nav-link {
    /*color: var(--link-muted);*/
    color: var(--c1-30);
}

.nav-trigger{
  appearance:none;
}

.nav-caret{
  opacity: .7;
  transition: transform 180ms ease;
}

.has-menu.is-open .nav-caret{
  transform: rotate(180deg);
  opacity: 1;
}

.has-menu{ 
    position: static; /* important: lets panel align to viewport */
    margin-right: -6px;
}  

/* Overlay backdrop for nav panels */
.nav-overlay{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  z-index: 99;
  transition: opacity 120ms ease;
}

.nav-panel{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  width: 100%;
  border-top: 4px solid transparent;
  border-radius: 0 0 var(--radius-1) var(--radius-1);
  padding: 0;
  background: var(--bg) url('../images/ui/green-bg-60.png') top/cover;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  z-index: 1001;
  transition: 
    opacity 120ms ease,
    transform 150ms ease,
    visibility 0s 150ms;
}

.has-menu.is-open > .nav-panel{
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: 
    opacity 140ms ease,
    transform 180ms ease,
    visibility 0s;
}

.nav-panel__inner{
  width: min(var(--container), calc(100% - 2*var(--space-6)));
  margin: 0 auto;
  padding: var(--space-6) 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-1);
  align-items: start;
}

.nav-panel__intro{
  padding-right: var(--space-4);
}

.nav-panel__title{
  margin: 0 0 var(--space-2);
  font-size: var(--step-2);
  font-weight: 700;
}

.nav-panel__desc{
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
  line-height: 1.5;
}
.nav-panel__desc a{
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
.nav-panel__desc a:focus,
.nav-panel__desc a:hover{
  text-decoration-style: solid;
}
.nav-panel__desc a:active{
  text-decoration-style: dotted;
}

.nav-panel__links{
  display: grid;
  grid-template-columns: 1fr;
  border-left: 1px dashed var(--border);
  padding-left: var(--space-5);
}




.nav-panel__grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.nav-panel__item{
  position: relative;
  display:block;
  background: rgba(0,0,0,.01);
  border-radius: var(--radius-1);
  border: 0;
  padding: 12px 18px;
  text-decoration:none;
  font-weight: 400;
  opacity: 0;
  /*transition: background 30ms ease, color 30ms ease, box-shadow 30ms ease;*/
}
.nav-panel__item::after{
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius-1);
  border-bottom: 1px dashed var(--border-muted);
  pointer-events: none;
  z-index: -1;
}
.nav-panel__item:focus,
.nav-panel__item:hover,
.nav-panel__item.current-menu-item {
  background: rgba(255,255,255,.7);
  /*color: var(--link-strong);*/
  text-decoration: none;
  box-shadow: inset 0 0 0 0.5px var(--border);
}
.nav-panel__item:active {
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.nav-panel__item.current-menu-item {
    background: rgba(255,255,255,.9);
    color: var(--text-strong);
    box-shadow: inset 0 0 0 1px var(--border-strong);
}
.nav-panel__item.current-menu-item:focus,
.nav-panel__item.current-menu-item:hover {
  color: var(--text-strong);  
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
}
.nav-panel__item.current-menu-item:active {
  color: var(--text-strong);
   box-shadow: inset 0 0 0 1px var(--border-strong);
}

.has-menu.is-open .nav-panel__item{
  opacity: 1;
}

.has-menu.is-open > .nav-trigger{
  box-shadow: var(--shadow-1);
}

#menu-patients .nav-panel__item:nth-last-child(2),
#menu-patients .nav-panel__item:nth-last-child(3),
#menu-dentists .nav-panel__item:nth-last-child(2) {
  display: none;
}


/* indent the links to specific products in the Patients menu (they all fall under a link about GT FLEX GREEN) */
.nav-item-id-26, /* dentists > GT FLEX materials */
.nav-item-id-28, /* dentists > subscription platform */
.nav-item-id-18, /* patients > retainers */
.nav-item-id-20, /* patients > aligners */ 
.nav-item-id-22, /* patients > night guards */ 
.nav-item-id-116 /* patients > oral appliances for sleep apnea */ 
{
  padding-left: calc(var(--space-5) + 22px) !important;
}

/* Add Nest Eco Leaf icon to *PRODUCTS* in Patients nav menus */
.nav-item-id-26::before, /* dentists > GT FLEX materials */
.nav-item-id-28::before, /* dentists > subscription platform */
.nav-item-id-18::before, /* patients > retainers */
.nav-item-id-20::before, /* patients > aligners */ 
.nav-item-id-22::before, /* patients > night guards */ 
.nav-item-id-116::before /* patients > oral appliances for sleep apnea */ 
{
  content: 'nest_eco_leaf';
  position: absolute;
  left: 16px;
  top: 51%;
  transform: translateY(-50%);
  font-family: var(--font-icon);
  font-size: 1.15em;
  line-height: 1;
  color: currentColor;
  font-variation-settings:
    'FILL' 0,
    'wght' 300,
    'GRAD' 0,
    'opsz' 24;
}
.nav-item-id-32, /* dentists > get started */ 
.nav-item-id-119, /* patients > find a dentist */ 
.nav-item-id-628 /* patients > tell your dentist */ 
{
  font-style: italic;
}


/* Remove stagger delay for faster interactions */
.has-menu.is-open .nav-panel__item{ transition-delay: 0ms; }


.nav-panel__cta{
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.nav-panel__cta-btn {
  /*background: rgb(98 119 71 / 40%);*/
  background: #444;
  padding: 13px 24px 13px 25px;
  border: 1px solid rgba(0,0,0,0.3);
  width: 100%;
  color: #fff !important;
  font-size: var(--step-0);
  font-weight: 500;
  /*text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 8px rgba(0,0,0,0.95);*/
  transition: border-color 0.2s ease;
}
.nav-panel__cta-btn:focus,
.nav-panel__cta-btn:hover {
  margin: -1px;
  background: #333;
  border: 2px solid #111;
}
.nav-panel__cta-btn:active {
  margin: 0;
  background: #444;
  border-width: 1px;
}


.site-actions { 
    display:flex;
    position: relative; 
    top: 1px;
    align-items: center; 
    gap: var(--space-2); 
}
.site-actions a {
  line-height: inherit;
  white-space: nowrap;
}
.site-actions .btn {
    display: none;
    background: #444;
    border: 2px solid transparent;
    padding: 3px 10px 4px 11px;
    color: #fff;
    font-size: 1.0rem;
    transition: border-color 0.2s ease;
}


.site-actions .btn--ai::before {
    background: #444;
}
.site-actions .btn:focus,
.site-actions .btn:hover {
    border-width: 2px;
    /*border-color: var(--link-muted);*/
    border-color: var(--c1-30);
    margin: 0;
}

.site-actions .btn:active {
    border-width: 1px;
    margin: 0 1px;
}


.site-actions .btn--ai:hover::before{
  background: #444;
}
.site-actions .btn--ai:active::after{
  inset: -1px;
}

.site-actions .btn.current-menu-item {
    border: 1px solid var(--c1-30);
    margin: 0 1px;
}
.site-actions .btn.current-menu-item:focus,
.site-actions .btn.current-menu-item:hover {
    border-width: 2px;
    border-color: var(--c1-50);
    margin: 0;
}
.site-actions .btn.current-menu-item:active {
    border-width: 1px;
    margin: 0 1px;
}

.site-actions .btn--ai.current-menu-item::after {
    inset: -1px;
    opacity: 0; /* use opacity: 1; to show linear gradient border on active page */
}
.site-actions .btn--ai.current-menu-item:focus::after,
.site-actions .btn--ai.current-menu-item:hover::after {
  inset: -2px;
}
.site-actions .btn--ai.current-menu-item:active::after {
    inset: -2px;
}

.site-actions .extra {
  position: absolute;
  top: -1000px
}

.btn-mobile-nav-open {
    margin: 0 -12px 0 4px;
    border: 0 !important;
    color: #fff;
}
.btn-mobile-nav-open:focus,
.btn-mobile-nav-open:hover {
    /*color: var(--link-muted);*/
    color: var(--c1-20);
}

/* Transform menu icon to close icon when mobile nav is open */
.btn-mobile-nav-open .icon {
  transition: transform 200ms ease;
}
body.mobile-nav-open .btn-mobile-nav-open .icon {
  transform: rotate(90deg);
}


/* ---------------------------
   Mobile Navigation (Below Header)
---------------------------- */
.mobile-nav[hidden]{ display:none; }
.mobile-nav{
  position: static;
  min-height: 100vh;
  background:
    linear-gradient(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.6)),
    url('../images/ui/green-bg-60.png') top/cover,
    var(--bg);
}

.mobile-nav__backdrop{
  display: none;
}

.mobile-nav__panel{
  position: static;
  width: 100%;
  background: transparent;
  backdrop-filter: none;
  display:flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-6);
  border: 0;
  border-top: 1px solid var(--border);
  box-shadow: none;
  opacity: 1;
  transform: none;
  transition: none;
  overflow-y: visible;
}

.mobile-nav:not([hidden]) .mobile-nav__panel{
  opacity: 1;
  transform: none;
}

.mobile-nav__top{
  display:flex;
  align-items:center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.mobile-nav__links{
  display:flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-nav__links > a{
  font-size: clamp(1.25rem, 1.05rem + 1.2vw, 1.8rem);
  padding: 14px 10px;
  border-radius: var(--radius-1);
  border: 1px solid transparent;
  text-decoration:none;
}

.mobile-nav__links > a:hover{
  background: rgba(0,0,0,.04);
}

.mobile-nav__links > a.current-menu-item{
  color: var(--link);
  font-weight: 700;
  background: rgba(0,0,0,.04);
}

.mobile-nav__links details{
  border: 1px solid transparent;
  border-radius: var(--radius-1);
  padding: 0;
}

.mobile-nav__links details::after{
  content: '';
  display: block;
  position: relative;
  top: 6px;
  border-bottom: 1px dashed var(--border-strong);
}

.mobile-nav__links summary{
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  font-size: clamp(1.25rem, 1.05rem + 1.2vw, 1.8rem);
  padding: 14px 24px;
  border-radius: var(--radius-1);
}


.mobile-nav__links summary:hover{
  background: rgba(0,0,0,.04);
}

.mobile-nav__links summary::-webkit-details-marker{ display:none; }

.mobile-nav-caret{
  opacity: 0.6;
  transition: transform 160ms ease, opacity 120ms ease;
}

.mobile-nav__links details[open] .mobile-nav-caret{
  transform: rotate(180deg);
  opacity: 0.85;
}

.mobile-nav__links details[open] summary{
  background: rgba(0,0,0,.04);
  font-weight: 600;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.mobile-sub{
  display:flex;
  flex-direction: column;
  padding: 8px 6px 12px;
}

.mobile-sub a{
  position: relative;
  display:block;
  background: rgba(0,0,0,.01);
  border-radius: var(--radius-1);
  border: 0;
  padding: 12px 18px;
  text-decoration:none;
  font-weight: 450;
  opacity: 0;
  transition: background 40ms ease, color 40ms ease, box-shadow 40ms ease;
}

.mobile-sub a::after{
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius-1);
  border-bottom: 1px dashed var(--border-muted);
  pointer-events: none;
  z-index: -1;
}

.mobile-sub a:focus,
.mobile-sub a:hover,
.mobile-sub a.current-menu-item {
  background: rgba(255,255,255,.7);
  color: var(--link-strong);
  text-decoration: none;
  box-shadow: inset 0 0 0 0.5px var(--border);
}

.mobile-sub a:active {
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.mobile-sub a.current-menu-item {
  background: rgba(255,255,255,.9);
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.mobile-sub a.current-menu-item:focus,
.mobile-sub a.current-menu-item:hover {
  color: var(--text-strong);  
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
}

.mobile-sub a.current-menu-item:active {
  color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* Remove stagger delay for faster interactions */
.has-menu.is-open .mobile-sub a {
  opacity: 1;
  transition-delay: 0ms;
}


.mobile-nav__cta{
  margin-top: auto;
  display:flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-4);
}
.mobile-nav__cta .btn{
  background: var(--bg-dark) url('../images/ui/polygon-background.jpg') center/cover;
  border: 2px solid #222;
  padding: 12px 12px 14px;
  color: #fff;
  font-size: 1.0rem;
  transition: border-color 0.2s ease;
  text-transform: uppercase;
}

.mobile-nav__cta .btn--ai::before {
    background: var(--bg-dark) url('../images/ui/polygon-background.jpg') center/cover;;
}

/* Inset rainbow border for mobile nav AI button */
.mobile-nav__cta .btn--ai::before {
    margin: 3px;
}
.mobile-nav__cta .btn--ai::after {
  margin: 3px;  
  inset: -3px;
}

.mobile-nav__cta .btn:not(.btn--ai):focus,
.mobile-nav__cta .btn:not(.btn--ai):hover {
    border-width: 2px;
    margin: 0;
    /*box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px var(--link-muted);*/
    box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px var(--c1-20);
}

.mobile-nav__cta .btn:not(.btn--ai):active {
     /*box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 2px var(--link-muted);*/
     box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 2px var(--c1-20);
}
.mobile-nav__cta .btn--ai:active::before {
    margin: 2px;
}
.mobile-nav__cta .btn--ai:active::after {
    margin: 2px;
     inset: -2px;
}

/* Current page indicator for mobile nav CTA buttons */

.mobile-nav__cta .btn:not(.btn--ai).current-menu-item {
    box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 2px var(--c1-30);
}
.mobile-nav__cta .btn:not(.btn--ai).current-menu-item:focus,
.mobile-nav__cta .btn:not(.btn--ai).current-menu-item:hover {
    border-width: 2px;
    margin: 0;
    box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3px var(--c1-50);
}
.mobile-nav__cta .btn:not(.btn--ai).current-menu-item:active {
     box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 2px var(--c1-30);
}

.mobile-nav__cta .btn--ai.current-menu-item::before {
    margin: 2px;
}
.mobile-nav__cta .btn--ai.current-menu-item::after {
    opacity: 1;
    margin: 2px;
    inset: -2px;
}
.mobile-nav__cta .btn--ai.current-menu-item:focus::before,
.mobile-nav__cta .btn--ai.current-menu-item:hover::before {
    margin: 3px;
}
.mobile-nav__cta .btn--ai.current-menu-item:focus::after,
.mobile-nav__cta .btn--ai.current-menu-item:hover::after {
  margin: 3px;  
  inset: -3px;
}
.mobile-nav__cta .btn--ai.current-menu-item:active::before {
    margin: 2px;
}
.mobile-nav__cta .btn--ai.current-menu-item:active::after {
    opacity: 1;
    margin: 2px;
    inset: -2px;
}


/* =========================
   MAIN SECTION COMPONENTS (.site-main)
========================= */

/* ---------------------------
   Hero - TOP OF POST
---------------------------- */


.hero__title strong {
  font-weight: 300;
  text-shadow:
    1px 0 0 #a4d287,
   -1px 0 0 #a4d287,
    0 1px 0 #a4d287,
    0 -1px 0 #a4d287,
    1px 1px 0 #a4d287,
   -1px -1px 0 #a4d287,
    1px -1px 0 #a4d287,
   -1px 1px 0 #a4d287;
   letter-spacing: 0.04em;
}
.hero .btn {
    background: #444;
    border: 1px solid rgba(255,255,255,.15);
    padding: 13px 24px 14px 25px;
    color: #fff;
    font-size: var(--step-1);
    font-weight: 500;
    transition: border-color 0.2s ease;
}
.hero .btn:focus,
.hero .btn:hover {
    border: 2px solid var(--link-muted);
    padding: 12px 23px 13px 24px;
}
.hero .btn:active {
    border-width: 1px;
    margin: 1px;
}

/* ---------------------------
   CTA - BOTTOM OF POST
---------------------------- */

.cta .btn,
.wpforms-submit {
  background: var(--link-dark);
  padding: 13px 24px 14px 25px;
  border: 1px solid rgba(255,255,255,.15);
  color: #fff !important;
  font-size: var(--step-1);
  font-weight: 500;
  transition: border-color 0.2s ease;
}
.cta .btn:focus,
.cta .btn:hover,
.wpforms-submit:focus,
.wpforms-submit:hover {
  background: var(--link-darker);
  padding: 12px 23px 13px 24px;
  border: 2px solid var(--link-x-dark);
}
.cta .btn:active,
.wpforms-submit:active {
  margin: 1px;
  background: var(--link-dark);
  border-width: 1px;
}





.page-header{ margin-bottom: var(--space-6); }
.page-header__inner{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}
.page-header__cta{
  display:flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}






/* Callout */
.callout-card{ padding: var(--space-6); }
.callout{
  display:flex;
  gap: var(--space-5);
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.callout__actions{
  display:flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---------------------------
   AG Iframe (seamless embed)
---------------------------- */
.ag-iframe{
  display: block;
  width: 100%;
  border: 0;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  transition: opacity .3s ease;
}
.ag-iframe.is-ready{
  opacity: 1;
}
.page-template-gt-ask .ag-iframe {
  margin-left: calc(50% - 50vw);
  width: 100vw;
}
.page-template-template-ag-iframe-contact-us .ag-iframe,
.page-template-template-ag-iframe-get-started .ag-iframe {
  margin-left: calc(50% - 50vw - 22px);
  width: calc(100vw + 44px);
}
.page-template-template-ag-iframe-contact-us .post-callout,
.page-template-template-ag-iframe-get-started .post-callout {
  margin: 0 -15px 28px;
}
html:has(.gts-ask-page),
body:has(.gts-ask-page),
html:has(.wpforms-container),
body:has(.wpforms-container) {
  background: transparent;
  overflow: hidden;
}
body:has(.wpforms-container) {
  margin-right: auto;
  margin-left: auto;
  width: calc(100% - 16px);
  max-width: 65ch;
}
article.prose:has(.wpforms-container) {
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}
.wpforms-field-phone {
  margin-top: 22px;
}
@media (min-width: 860px) {
  body:has(.wpforms-container) {
    width: 65ch;
  }
  article.prose:has(.wpforms-container) {
    width: min(1120px, calc(100% - 88px));
  }
}

/* ---------------------------
   FAQ Panel & Resources
---------------------------- */
.faq-panel{ position: relative; }

/* ---------------------------
   FAQ Accordion (archive)
---------------------------- */

.faq-accordion{
  border-top: 1px dotted rgba(0,0,0,.12);
  padding: var(--space-4);
}
.faq-accordion:last-child{
  border-bottom: 1px dotted rgba(0,0,0,.12);
}
/*.search-result-accordion-spotlight,*/
.faq-accordion:hover {
  background: var(--link-1);
}
/*.search-result-accordion-spotlight[open],*/
.faq-accordion[open]:hover {
  background: transparent;
}
.faq-accordion__question{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-accordion__question::-webkit-details-marker{ display:none; }
.faq-accordion__question h3{
  flex: 1 1 auto;
  margin: 0;
  padding-right: 20px;
  min-width: 0;
  font-size: var(--step-0);
  font-weight: 400;
}
.search-results__topic-group:has([open]) h3 {
  opacity: .57;
}
.search-results__topic-group:has([open]) .faq-accordion__icon {
  opacity: .3;
}
.faq-accordion[open] h3,
.faq-accordion[open] .faq-accordion__icon,
.faq-accordion:hover h3,
.faq-accordion:hover .faq-accordion__icon
{ opacity: 1}
.faq-accordion[open] h3{
  font-weight: 500;
}

.faq-accordion__audience{
  flex-shrink: 0;
  margin-left: 8px;
  color: var(--text-light-WCAG);
  font-size: var(--step--2);
  font-style: italic;
  white-space: nowrap;
}

.faq-accordion__icon{
  flex: 0 0 auto;
  width: 1.25em;
  height: 1.25em;
  position: relative;
  transition: transform .25s ease;
}
.faq-accordion__icon::before,
.faq-accordion__icon::after{
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}
.faq-accordion__icon::before{
  top: 50%; left: 15%;
  width: 70%; height: 2px;
  transform: translateY(-50%);
}
.faq-accordion__icon::after{
  top: 15%; left: 50%;
  width: 2px; height: 70%;
  transform: translateX(-50%);
  transition: transform .25s ease;
}
.faq-accordion[open] .faq-accordion__icon::after{
  transform: translateX(-50%) scaleY(0);
}
.faq-accordion__answer{
  position: relative;
  margin: 16px -16px 0;
  background: rgba(249,249,249,.95);
  border-radius: 12px 12px 0 0;
  padding: 16px 16px 12px;
  font-size: calc(var(--step-0) * .95);
}


.faq-accordion__answer p,
.faq-accordion__answer *:last-child { margin-bottom: 0; }
.faq-accordion__answer p:first-child{ margin-top: 0; }
.faq-accordion__answer *:last-child:empty { display: none; }
.faq-accordion__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 -16px 6px;
  background: rgba(249,249,249,.95);
  border-radius: 0 0 12px 12px;
  border-bottom-right-radius: 12px;
  padding: 6px 65px 10px 16px;
  font-size: var(--step--2);
}
@media (min-width: 640px) {
  .faq-accordion__answer{
    border: 1px dotted #eee;
    border-bottom: 0;
    padding: 24px 30px 0;
  }
  .faq-accordion__meta {
    border: 1px dotted #eee;
    border-top: 0;
    padding: 18px 66px 12px 30px;
  }
  /*
  .faq-accordion__answer{
    margin: 20px -8px 0 0;
    background: rgba(255,255,255,.9); 
    padding: 12px 48px 0 28px;
    border-left: 4px solid #eee;
    border-radius: 0 12px 0 0;
  }
  .faq-accordion__meta {
    margin: 0 -8px 6px 0;
    background: rgba(255,255,255,.9);
    border-left: 4px solid #eee;
    border-radius: 0 0 12px 0;
    padding: var(--space-4) 48px 4px 28px;
  }
  .faq-accordion__copy-link{
    margin-right: -44px !important;
  }
  */
}
.faq-accordion__copy-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: -54px;
  margin-left: auto;
  padding: var(--space-1);
  border: none;
  border-radius: var(--radius-1);
  background: transparent;
  cursor: pointer;
  color: inherit;
  font-size: 1.25rem;
  opacity: .6;
  transition: opacity .15s;
}
.faq-accordion__copy-link .icon{ font-size: 1.25rem; }
.faq-accordion__copy-link:hover{ opacity: 1; }
.faq-accordion--highlighted{
  animation: faq-highlight 1.8s ease;
}
@keyframes faq-highlight{
  0%   { background: var(--link-1, rgba(0,0,0,.04)); }
  100% { background: transparent; }
}

.panel{ 
  padding: var(--space-6); 
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
}
.panel__header{ margin-bottom: var(--space-4); }
.panel__footer{ margin-top: var(--space-4); }

@media (min-width: 980px){
  .panel{
    position: sticky;
    top: var(--space-6);
  }
}

.source-list{
  list-style:none;
  padding:0;
  margin: 0;
  display:flex;
  flex-direction: column;
  gap: var(--space-4);
}
.source{
  border: 1px solid var(--border);
  border-radius: var(--radius-1);
  padding: var(--space-4);
  background: rgba(0,0,0,.01);
}
.source__top{
  display:flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}
.source__title{
  display:block;
  font-weight: 800;
  margin-bottom: var(--space-2);
}
.source__snippet{
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.category-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 560px) and (max-width: 979px){
  .category-grid{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px){
  .category-grid{ grid-template-columns: 1fr; }
}

.cat{
  display:block;
  border: 1px solid var(--border);
  border-radius: var(--radius-1);
  padding: var(--space-4);
  background: rgba(0,0,0,.01);
}
.cat:hover{ text-decoration:none; box-shadow: var(--shadow-1); }
.cat__title{ display:block; font-weight: 800; margin-bottom: var(--space-1); }
.cat__desc{ display:block; color: var(--text-muted); font-size: var(--step--1); }

.tax-topic .scope-filter-select option:disabled {
  font-style: italic;
}

/* Drawer for mobile */
.drawer-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 50;
}

/* On small screens, panel becomes a bottom sheet */
@media (max-width: 979px){
  .panel{
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: auto;
    max-height: 80vh;
    overflow: auto;
    border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-2);
    transform: translateY(110%);
    transition: transform 180ms ease;
    z-index: 60;
  }
  .panel.is-open{
    transform: translateY(0);
  }
}

/* ---------------------------
   Accessibility: Reduce Motion
---------------------------- */
@media (prefers-reduced-motion: reduce){
  .site-header,
  .panel,
  .nav-panel,
  .nav-panel__col,
  .nav-panel__item,
  .nav-caret,
  .mobile-nav__panel,
  .mobile-nav-caret {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}


/* ============================================
   RESPONSIVE OVERRIDES
   Adjust values at different breakpoints
   ============================================ */

@media (min-width: 640px) {
 
}

@media (min-width: 728px) {
  .page-template-template-ag-iframe-contact-us .ag-iframe,
  .page-template-template-ag-iframe-get-started .ag-iframe {
    margin-left: calc(50% - 50vw);
    width: 100vw;
  }
  .page-template-template-ag-iframe-contact-us .post-callout,
  .page-template-template-ag-iframe-get-started .post-callout {
    margin: 8px 0 42px;
  }
 
}
@media (min-width: 860px){  /* breakpoint for "sm" and for jump to mobile styling */
  /* Show overlay only when desktop nav panel is open */
  body.desktop-nav-open .nav-overlay{
    opacity: 1;
    pointer-events: auto;
    transition: opacity 140ms ease;
  }

 .site-nav { 
    display:block; 
    margin: 0 auto 0 0;
  }
  .site-logo {
    top: 0;
    padding-top: 0;
    height: auto;
  }
  .site-actions .btn {
    display: inline-block;
  }
  .mobile-nav {
    display: none;
  }
 
 
}
@media (max-width: 979px){
  
}
@media (min-width: 980px){
  
}
@media (min-width: 1024px) {
  .site-logo {
    border-right: 1px dashed #666;
    padding: 0 28px 2px 0;
  }
  .site-logo__tagline {
    display: inline;
  }
  .nav-panel__inner {
    gap: var(--space-4);
  }
}
@media (min-width: 1160px){ /* non-standard breakpoint */
  .site-actions .extra {
    position: static;
  }
}

/* ==========================================================================
   Parallax Descent Effect
   (merged from parallax-descent.css to reduce render-blocking requests)
   ========================================================================== */

/* Parallax container wraps entire page content */
.parallax-page {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto; /* Override body height:100% to allow growth */
  min-height: calc(100vh + 1000px); /* Ensure enough height for parallax layers to scroll through */
}
.parallax-page.mobile-nav-open {
  min-height: auto; /* Remove extra height when mobile nav is open to prevent excessive scrolling */
}

.parallax-page .site-main {
  padding-bottom: 1240px; /* Makes room for parallax layers associated with the site-footer */
}

/* Individual parallax layers */
.parallax-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 200vh; /* Taller than viewport for scroll room */
  background-repeat: no-repeat, no-repeat;
  background-blend-mode: soft-light;
  background-position: center top;
  border-top: 2000px solid transparent; /* Creates space for background images that otherwise would get cropped at top */
  border-bottom: 2000px solid transparent; /* Creates space for background images that otherwise would get cropped at bottom */
  will-change: transform;
  pointer-events: none; /* Allow clicks to pass through */
}

/* Layer 1: Sky/Clouds (slowest movement - stays visible longest) */
.parallax-layer--sky {
  background-image: 
    linear-gradient(to bottom, 
      var(--sky-color-top, rgba(135, 206, 235, 0.8)) 0%,
      var(--sky-color-mid-light, rgba(135, 206, 235, 0.8)) 230px,
      var(--sky-color-mid, rgba(176, 224, 230, 0.8)) 500px,
      var(--sky-color-horizon, rgba(224, 246, 255, 0.8)) 100%
    ),
    url('../images/parallax/plx-sky.webp');
  background-position: 30% top;
  background-size: 3000px auto;
  border: 0;
  height: 600vh; /* adjustment to prevent this layer from getting vertically cropped on viewports with extreme aspect ratios (much wider than tall) */
  transform: translateY(calc(0vh + (var(--scroll, 0) * -0.05px)));
  opacity: .18;
  z-index: -5;
}

/* Layer 2: Tree Canopy (positioned relative to bottom) */
.parallax-layer--canopy {
  display: none;
  background-image: url('../images/parallax/plx-canopy.webp');
  --layer-image-height: 2000px;
  --fade-start: 0.2;
  --fade-end: 0.75;
  --fade-scroll-start: 2500;
  --fade-scroll-end: 1000;
  background-size: auto var(--layer-image-height);
  background-position: center calc(100vh - var(--layer-image-height));
  transform: translateY(calc((var(--scroll-from-bottom, 0) * 1px) - 2230px + (var(--scroll-from-bottom, 0) * -0.5px)));
  opacity: clamp(
    var(--fade-start), 
    calc(var(--fade-start) + (var(--fade-end) - var(--fade-start)) * (var(--fade-scroll-start) - var(--scroll-from-bottom, 0)) / (var(--fade-scroll-start) - var(--fade-scroll-end))),
    var(--fade-end)
  );
  z-index: -4;
}

/* Layer 3: Forest mid-level (positioned relative to bottom) */
.parallax-layer--undergrowth {
  background-image: url('../images/parallax/plx-undergrowth.webp');
  --layer-image-height: 1400px;
  --fade-start: 0.05;
  --fade-end: 1;
  --fade-scroll-start: 1400;
  --fade-scroll-end: 800;
  background-size: auto var(--layer-image-height);
  background-position: center calc(100vh - var(--layer-image-height));
  transform: translateY(calc((var(--scroll-from-bottom, 0) * 1px) - 1600px + (var(--scroll-from-bottom, 0) * -0.4px)));
  opacity: clamp(
    var(--fade-start), 
    calc(var(--fade-start) + (var(--fade-end) - var(--fade-start)) * (var(--fade-scroll-start) - var(--scroll-from-bottom, 0)) / (var(--fade-scroll-start) - var(--fade-scroll-end))),
    var(--fade-end)
  );
  z-index: -3;
}
.parallax-page-short .parallax-layer--undergrowth {
  --fade-start: 0.00;
  --fade-end: 1;
  --fade-scroll-start: 800;
  --fade-scroll-end: 0;
  opacity: clamp(
    var(--fade-start), 
    calc(var(--fade-start) + (var(--fade-end) - var(--fade-start)) * (var(--fade-scroll-start) - var(--scroll-from-bottom, 0)) / (var(--fade-scroll-start) - var(--fade-scroll-end))),
    var(--fade-end)
  );
}

/* Page content sits above all layers */
.parallax-content {
  position: relative;
  z-index: 10;
  background: transparent;
  pointer-events: auto; /* Re-enable clicks on content */
}

/* Prose background opacity synced with canopy fade-in */
.page-content {
  --prose-bg-fade-start: 0.0;
  --prose-bg-fade-end: 0.97;
  --prose-bg-fade-scroll-start: 4500;
  --prose-bg-fade-scroll-end: 3500;
  --prose-bg-opacity: clamp(
    var(--prose-bg-fade-start),
    calc(var(--prose-bg-fade-start) + (var(--prose-bg-fade-end) - var(--prose-bg-fade-start)) * (var(--prose-bg-fade-scroll-start) - var(--scroll-from-bottom-progressive, var(--scroll-from-bottom, 0))) / (var(--prose-bg-fade-scroll-start) - var(--prose-bg-fade-scroll-end))),
    var(--prose-bg-fade-end)
  );
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  .parallax-layer {
    position: static;
    transform: none !important;
  }
}

@media (min-width: 860px) {
  .parallax-page-tall .parallax-layer--canopy {
    display: block;
  }
  .parallax-page-tall .page-content {
    background-color: rgba(255, 255, 255, var(--prose-bg-opacity));
    border-radius: 12px;
    box-shadow: 0 calc(var(--prose-bg-opacity) * 30px) calc(var(--prose-bg-opacity) * 50px) rgba(0, 0, 0, calc(var(--prose-bg-opacity) * 0.15));
  }
}

