/* Lernwick — liquid glass layer. Gated by html.lg-on (set by glass.js). */
:root { --lg-blur: 16px; --lg-edge: rgb(255 255 255 / .75); }
@keyframes lg-drift-a { 0%,100% { transform: translate(0,0) scale(1); border-radius: 58% 42% 55% 45% / 48% 56% 44% 52%; } 50% { transform: translate(8vw,6vh) scale(1.15); border-radius: 42% 58% 40% 60% / 56% 44% 58% 42%; } }
@keyframes lg-drift-b { 0%,100% { transform: translate(0,0) scale(1.05); border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%; } 50% { transform: translate(-9vw,-5vh) scale(.92); border-radius: 60% 40% 45% 55% / 42% 58% 42% 58%; } }

/* liquid colour blobs living behind the page, so the glass has something to bend */
.lg-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.lg-bg i { position: absolute; width: 46vmax; height: 46vmax; filter: blur(60px); opacity: .55; translate: 0 calc(var(--sy, 0) * var(--k, -.06) * 1px); }
.lg-bg i:nth-child(1) { left: -12vmax; top: -8vmax; background: radial-gradient(circle at 35% 35%, #FFC47A, #FF9A3C 60%, transparent 72%); animation: lg-drift-a 22s ease-in-out infinite; --k: -.05; }
.lg-bg i:nth-child(2) { right: -14vmax; top: 30vh; background: radial-gradient(circle at 60% 40%, #C4E0B5, #8FC7A0 60%, transparent 72%); animation: lg-drift-b 26s ease-in-out infinite; --k: -.09; }
.lg-bg i:nth-child(3) { left: 20vw; bottom: -20vmax; background: radial-gradient(circle at 50% 50%, #FCE3C0, #F9B8A0 60%, transparent 72%); animation: lg-drift-a 30s ease-in-out -9s infinite; --k: -.03; }

/* the glass itself */
html.lg-on :is(.header__inner, .fcard, .fchip, .badge, .tabs, .ccard__cat, .btn--outline, .pill:not(.pill--sage):not(.pill--peach)) {
  --mx: 50%; --my: -20%; --tint: 255 255 255;
  background:
    radial-gradient(220px circle at var(--mx) var(--my), rgb(255 255 255 / .7), transparent 62%),
    linear-gradient(135deg, rgb(var(--tint) / .52), rgb(var(--tint) / .16));
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(190%) brightness(1.04);
  backdrop-filter: blur(var(--lg-blur)) saturate(190%) brightness(1.04);
  border: 1px solid rgb(255 255 255 / .55);
  box-shadow: inset 0 1.5px 0 var(--lg-edge), inset 0 -1.5px 0 rgb(255 255 255 / .25), inset 1.5px 0 1px -1px rgb(255 255 255 / .55), inset -1.5px 0 1px -1px rgb(255 255 255 / .35), 0 14px 34px -14px rgb(27 27 31 / .32);
  transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s ease, color .3s ease;
}
html.lg-on :is(.fcard, .badge) { --tint: 255 226 190; }
html.lg-on :is(.fchip, .ccard__cat) { --tint: 255 255 255; }
html.lg-on .btn--outline:hover { color: var(--ink); background-color: transparent; }
html.lg-on .header__inner { border-radius: var(--r-pill); padding: 0 1.6rem; min-height: 4.2rem; }
html.lg-on .header { position: sticky; top: .7rem; }
html.lg-on :is(.fcard, .fchip, .badge, .tabs, .ccard__cat, .btn--outline, .pill):hover { transform: scale(1.035); }
html.lg-on :is(.fcard, .fchip, .badge, .btn--outline):active { transform: scale(.965); }
html.lg-on .tabs [role="tab"][aria-selected="true"] { background: linear-gradient(180deg, #FFB95C, var(--orange)); box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .8), 0 8px 18px -8px rgb(217 119 6 / .8); }
html.lg-on .nav a:hover { background: rgb(255 255 255 / .55); }

/* Chromium: real refraction through an SVG displacement map */
html.lg-refract :is(.header__inner, .fcard, .fchip) { -webkit-backdrop-filter: url(#lg-refract) blur(10px) saturate(180%); backdrop-filter: url(#lg-refract) blur(10px) saturate(180%); }
.lg-svg { position: absolute; width: 0; height: 0; }

/* glossy orange button with a liquid sheen */
html.lg-on .btn--orange {
  position: relative; overflow: hidden; background-color: var(--orange); background-repeat: no-repeat; background-size: 260% 100%, 100% 100%; background-position: 140% 0, 0 0;
  background-image: linear-gradient(115deg, transparent 38%, rgb(255 255 255 / .7) 50%, transparent 62%), linear-gradient(180deg, rgb(255 255 255 / .5), rgb(255 255 255 / 0) 58%);
  box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .85), inset 0 -3px 8px -2px rgb(180 83 9 / .35), 0 12px 24px -12px rgb(217 119 6 / .85);
  transition: background-position 1s var(--m-ease, ease), transform .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s ease;
}
html.lg-on .btn--orange:hover { background-position: -40% 0, 0 0; }
html.lg-on .btn { overflow: hidden; }
.lg-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgb(255 255 255 / .75), rgb(255 255 255 / 0) 70%); transform: scale(0); animation: lg-rip .8s ease-out forwards; }
@keyframes lg-rip { to { transform: scale(1); opacity: 0; } }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.lg-on :is(.header__inner, .fcard, .fchip, .badge, .tabs, .ccard__cat, .btn--outline) { background: rgb(255 255 255 / .92); }
}
@media (prefers-reduced-transparency: reduce) {
  html.lg-on :is(.header__inner, .fcard, .fchip, .badge, .tabs, .ccard__cat, .btn--outline, .pill) { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .lg-bg { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lg-bg i, .lg-ripple { animation: none !important; } html.lg-on * { transition-duration: .01ms !important; } }
