/* ═══════════════════════════════════════════════════════════════════
   NORDLYS - THE FROSTED SURFACE
   ═══════════════════════════════════════════════════════════════════

   One translucent material, used at one level, never nested inside itself.

   It used to be four stacked filter functions — blur, saturate, contrast and
   brightness — which is four knobs approximating a colour that should simply be
   declared, and which makes the text contrast a function of whatever the user
   set as a wallpaper. Two functions now, and the tint is a declared colour.

   The file also used to be titled after another company's material, which named
   the thing this will be compared against and lose to. It is named after what
   it does. */

:root {
  /* Default Glass Optical Tokens */
  --glass-blur: 28px;
  --glass-saturate: 160%;
  --glass-opacity: 0.70;
  --glass-border-sheen: 0.45;
  
  /* Specular Highlight Sheens */
  --glass-specular-top: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.08) 25%, transparent 100%);
  
  /* Authentic iOS 18 Multi-Layer Glass Shadow */
  --glass-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.18);
}

/* ── Authentic Frosted Glass Theme ────────────────────────────── */
/* Written the way every theme in themes.css is: `html[data-theme]` outranks the
   bare `:root` those themes use for their defaults. As a bare attribute it tied
   with that `:root` and lost on load order, so Frosted Glass rendered with
   Aurora Void's ink, dim and accent — its folder names measured 1.8 to one. */
:root[data-theme="frosted-glass"], html[data-theme="frosted-glass"],
html[data-theme="liquid-glass"], html[data-theme="liquid-tahoe"] {
  --theme-name: "Frosted Glass";
  --void: #0b1220;
  --void-gradient: radial-gradient(120% 100% at 50% 0%, #152037 0%, #0c1424 55%, #050812 100%);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.22);
  --frost: rgba(255, 255, 255, 0.26);
  --ink: #ffffff;
  --dim: #dbe7f6;
  --faint: #9cb1d4;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.45);
  --card-tint: #16213a;
  --card-tint-deep: #0b1220;
  --shader-1: #38bdf8;
  --shader-2: #818cf8;
  --shader-3: #22d3ee;
}

[data-theme="frosted-glass"] .card,
[data-theme="liquid-glass"] .card,
[data-theme="liquid-tahoe"] .card {
  /* --glass-opacity (0.1–0.95) is scaled into the white-frost alpha range. The
     frost is a sheen over a dark ground, the way a dark frosted material is
     built: white frost alone over a bright sky put white text on near-white,
     3.8 to one where a frond of Frost ran behind a folder's name. */
  background:
    linear-gradient(
      165deg,
      rgba(255, 255, 255, calc(var(--glass-opacity, 0.7) * 0.22)) 0%,
      rgba(255, 255, 255, calc(var(--glass-opacity, 0.7) * 0.06)) 100%
    ),
    rgba(9, 14, 26, calc(0.2 + var(--glass-opacity, 0.7) * 0.4));
  border: 1px solid rgba(255, 255, 255, calc(var(--glass-border-sheen, 0.45) * 0.75));
  backdrop-filter: blur(var(--glass-blur, 28px)) saturate(var(--glass-saturate, 160%));
  -webkit-backdrop-filter: blur(var(--glass-blur, 28px)) saturate(var(--glass-saturate, 160%));
  box-shadow: var(--nl-shadow-3);
}

/* Top Specular Rim for Frosted Glass */
[data-theme="frosted-glass"] .card::before,
[data-theme="liquid-glass"] .card::before,
[data-theme="liquid-tahoe"] .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--glass-specular-top);
  opacity: 0.9;
  pointer-events: none;
  border-radius: 2px;
}
