/* Glass layer (shared by AutoCheq and TyreCheq). Load after styles.css and motion.css.
   Frosted translucent surfaces, glass edge highlights, a cursor-following shine (glass.js sets --mx / --my),
   and slow colour glows behind each section so the blur has something to show. */
:root {
  --g-blur: 18px;
  --g-light: linear-gradient(135deg, rgba(255,255,255,.74), rgba(255,255,255,.4));
  --g-light-edge: rgba(255,255,255,.8);
  --g-dark: linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.03));
  --g-dark-edge: rgba(255,255,255,.14);
  --g-shine-l: radial-gradient(380px circle at var(--mx, 50%) var(--my, -40%), rgba(255,255,255,.75), transparent 45%);
  --g-shine-d: radial-gradient(380px circle at var(--mx, 50%) var(--my, -40%), rgba(196,232,205,.16), transparent 45%);
}

/* ---------- colour glows behind sections ---------- */
section.light, section.dark2, section.demo, #problem, #faq { position: relative; isolation: isolate; overflow: hidden; }
section.light::before, section.light::after, section.dark2::before, section.dark2::after, section.demo::before {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(40px);
  animation: orb 22s ease-in-out infinite alternate;
}
section.light::before { width: 640px; height: 640px; left: -220px; top: 6%; background: radial-gradient(circle, rgba(5,163,100,.30), transparent 66%); }
section.light::after { width: 560px; height: 560px; right: -200px; bottom: 4%; background: radial-gradient(circle, rgba(245,169,98,.28), transparent 66%); animation-duration: 26s; animation-direction: alternate-reverse; }
section.dark2::before { width: 720px; height: 720px; right: -260px; top: -10%; background: radial-gradient(circle, rgba(5,163,100,.38), transparent 64%); }
section.dark2::after { width: 520px; height: 520px; left: -200px; bottom: -6%; background: radial-gradient(circle, rgba(63,227,154,.16), transparent 64%); animation-duration: 28s; animation-direction: alternate-reverse; }
section.demo::before { width: 680px; height: 680px; right: -180px; top: 20%; background: radial-gradient(circle, rgba(63,227,154,.22), transparent 64%); }
@keyframes orb { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.12); } 100% { transform: translate(-40px, 80px) scale(.95); } }

/* ---------- glass on light sections ---------- */
.light .pcard, .light .icard, .light .b:not(.darkb), .faq details, .band, .contrast .old, .cs table, .disclaimer, .callout-note,
.light .duo figure .shot, .light .split .shot {
  background: var(--g-shine-l), var(--g-light);
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(1.6); backdrop-filter: blur(var(--g-blur)) saturate(1.6);
  border: 1px solid var(--g-light-edge);
  box-shadow: 0 18px 50px rgba(0,46,28,.08), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(0,46,28,.04);
}
.light .b .media { background: rgba(238,241,238,.55); border-top-color: rgba(255,255,255,.7); }
.light .pcard:hover, .light .icard:hover { box-shadow: 0 30px 70px rgba(0,46,28,.14), inset 0 1px 0 #fff; border-color: #fff; }
.faq details[open] { box-shadow: 0 24px 60px rgba(0,46,28,.12), inset 0 1px 0 #fff; }
.light .pcard .ic, .light .icard .ic { background: rgba(255,255,255,.6); box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(0,46,28,.08); }
.light .chip { box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.buckets span { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* dark-green cards that sit on light sections: deep tinted glass */
.case, .b.darkb, .contrast .new, .xsell {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(196,232,205,.16), transparent 45%), linear-gradient(140deg, rgba(0,82,50,.9), rgba(0,40,24,.78));
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(1.5); backdrop-filter: blur(var(--g-blur)) saturate(1.5);
  border: 1px solid rgba(196,232,205,.22);
  box-shadow: 0 24px 60px rgba(0,46,28,.22), inset 0 1px 0 rgba(255,255,255,.18);
}

/* ---------- glass on dark sections ---------- */
.tcard, .fcard, form.lead, .stats, details.transcript, .chapters button.on, .chapters button:hover, .role, .scan-readout, .t3-card, .flist button[aria-selected="true"],
.dark2 .step .n, .strip, .page-hero .disclaimer {
  background: var(--g-shine-d), var(--g-dark);
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(1.6); backdrop-filter: blur(var(--g-blur)) saturate(1.6);
  border: 1px solid var(--g-dark-edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 24px 60px rgba(0,0,0,.28);
}
.stats { border-radius: 26px; margin: 40px 0; }
.stat { border-left-color: rgba(255,255,255,.08); }
.strip { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
.dark2 .step.lit .n { background: linear-gradient(160deg, #10a868, #00804D); border-color: rgba(255,255,255,.3); }
.tcard .ic, .fcard .ic, .flist button .ic { background: rgba(5,163,100,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.field input, .field select, .field textarea { background: rgba(0,20,12,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-color: rgba(196,232,205,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }

/* ---------- glass controls ---------- */
.nav.scrolled { background: linear-gradient(180deg, rgba(0,26,16,.72), rgba(0,20,12,.55)); -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8); box-shadow: inset 0 -1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.25); }
.btn-ghost { background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.light .btn-ghost { background: rgba(255,255,255,.45); box-shadow: inset 0 1px 0 #fff; }
.btn-primary { background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 55%); }
.tagline, .hud .tag, .t3-tag { -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 26px rgba(0,0,0,.3); }
.cookie, .mcta .btn { -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); }
.cookie { background: linear-gradient(135deg, rgba(0,40,24,.82), rgba(0,20,12,.7)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 60px rgba(0,0,0,.5); }

/* device and screenshot frames get a glass bezel */
.device, .phone { box-shadow: 0 40px 100px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.25); }
.player { box-shadow: 0 60px 140px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.2); }

/* lighter blur on phones, and no glass where the browser can't do it */
@media (max-width: 760px) { :root { --g-blur: 10px; } section.light::before, section.light::after, section.dark2::before, section.dark2::after, section.demo::before { filter: blur(24px); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .light .pcard, .light .icard, .light .b:not(.darkb), .faq details, .band { background: rgba(255,255,255,.92); }
  .tcard, .fcard, form.lead, .stats, details.transcript { background: rgba(0,40,24,.9); }
}
@media (prefers-reduced-motion: reduce) { section.light::before, section.light::after, section.dark2::before, section.dark2::after, section.demo::before { animation: none; } }
