/* Liquid Glass design layer. Tokens + material utilities shared by every os/ module.
   Loaded after styles.css; module stylesheets load after this file. */

:root {
  --lg-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
  --lg-accent: #0a84ff;
  --lg-accent-soft: rgba(10, 132, 255, .16);
  --lg-text: #0c1220;
  --lg-text-2: rgba(16, 24, 40, .64);
  --lg-text-3: rgba(16, 24, 40, .42);
  --lg-on-wallpaper: #fff;

  /* Materials, thinnest to thickest. Clear = chrome over wallpaper, thick = reading surfaces. */
  --lg-fill-clear: rgba(255, 255, 255, .08);
  --lg-fill: rgba(255, 255, 255, .2);
  --lg-fill-regular: rgba(250, 251, 254, .56);
  --lg-fill-thick: rgba(250, 251, 254, .8);
  --lg-fill-control: rgba(255, 255, 255, .5);
  --lg-hover: rgba(255, 255, 255, .22);
  --lg-pressed: rgba(255, 255, 255, .36);
  --lg-separator: rgba(10, 20, 40, .09);

  --lg-blur: 22px;
  --lg-sat: 190%;

  /* Rim light: bright top edge, softer sides, faint bottom bounce. */
  --lg-rim:
    inset 0 1px 0 rgba(255, 255, 255, .72),
    inset 0 -1px 0 rgba(255, 255, 255, .16),
    inset 1px 0 0 rgba(255, 255, 255, .22),
    inset -1px 0 0 rgba(255, 255, 255, .22),
    inset 0 0 0 .5px rgba(255, 255, 255, .3);
  --lg-rim-strong:
    inset 0 1.5px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 1px rgba(255, 255, 255, .3),
    inset 1.5px 0 0 rgba(255, 255, 255, .35),
    inset -1.5px 0 0 rgba(255, 255, 255, .35),
    inset 0 0 0 .5px rgba(255, 255, 255, .45),
    inset 0 0 18px rgba(255, 255, 255, .08);
  --lg-shadow-sm: 0 0 0 .5px rgba(0, 10, 30, .12), 0 3px 10px rgba(0, 12, 40, .16);
  --lg-shadow: 0 0 0 .5px rgba(0, 10, 30, .14), 0 10px 28px rgba(0, 12, 40, .2), 0 28px 64px rgba(0, 12, 40, .18);
  --lg-shadow-lg: 0 0 0 .5px rgba(0, 10, 30, .16), 0 18px 44px rgba(0, 12, 40, .26), 0 50px 110px rgba(0, 12, 40, .28);
  --lg-sheen: linear-gradient(160deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .08) 32%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, .1) 100%);
  --lg-light: radial-gradient(circle at var(--lg-mx, 50%) var(--lg-my, -20%), rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 46%);

  --lg-r-window: 26px;
  --lg-r-panel: 24px;
  --lg-r-control: 14px;
  --lg-r-pill: 999px;

  --lg-ease: cubic-bezier(.32, .72, 0, 1);
  --lg-spring: cubic-bezier(.34, 1.56, .64, 1);
  --lg-fast: .18s;
  --lg-medium: .32s;
  --lg-slow: .5s;
}

body.dark-desktop {
  --lg-accent: #0a84ff;
  --lg-accent-soft: rgba(10, 132, 255, .24);
  --lg-text: #f4f6fb;
  --lg-text-2: rgba(235, 240, 250, .66);
  --lg-text-3: rgba(235, 240, 250, .42);
  --lg-fill-clear: rgba(20, 22, 30, .1);
  --lg-fill: rgba(24, 26, 34, .26);
  --lg-fill-regular: rgba(28, 30, 38, .58);
  --lg-fill-thick: rgba(26, 28, 36, .82);
  --lg-fill-control: rgba(255, 255, 255, .1);
  --lg-hover: rgba(255, 255, 255, .1);
  --lg-pressed: rgba(255, 255, 255, .18);
  --lg-separator: rgba(255, 255, 255, .09);
  --lg-rim:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 0 rgba(255, 255, 255, .05),
    inset 1px 0 0 rgba(255, 255, 255, .07),
    inset -1px 0 0 rgba(255, 255, 255, .07),
    inset 0 0 0 .5px rgba(255, 255, 255, .12);
  --lg-rim-strong:
    inset 0 1.5px 0 rgba(255, 255, 255, .32),
    inset 0 -1px 1px rgba(255, 255, 255, .08),
    inset 1.5px 0 0 rgba(255, 255, 255, .1),
    inset -1.5px 0 0 rgba(255, 255, 255, .1),
    inset 0 0 0 .5px rgba(255, 255, 255, .16);
  --lg-shadow-sm: 0 0 0 .5px rgba(0, 0, 0, .5), 0 3px 10px rgba(0, 0, 0, .3);
  --lg-shadow: 0 0 0 .5px rgba(0, 0, 0, .55), 0 10px 28px rgba(0, 0, 0, .34), 0 28px 64px rgba(0, 0, 0, .3);
  --lg-shadow-lg: 0 0 0 .5px rgba(0, 0, 0, .6), 0 18px 44px rgba(0, 0, 0, .4), 0 50px 110px rgba(0, 0, 0, .42);
  --lg-sheen: linear-gradient(160deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .03) 32%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, .04) 100%);
  --lg-light: radial-gradient(circle at var(--lg-mx, 50%) var(--lg-my, -20%), rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 46%);
}

/* ---------- Material utilities ---------- */

.lg, .lg-clear, .lg-regular, .lg-thick {
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat));
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat));
  box-shadow: var(--lg-rim), var(--lg-shadow);
  border: 0;
  color: var(--lg-text);
}
.lg { background: var(--lg-sheen), var(--lg-fill); }
.lg-clear { background: var(--lg-sheen), var(--lg-fill-clear); box-shadow: var(--lg-rim-strong), var(--lg-shadow-sm); }
.lg-regular { background: var(--lg-sheen), var(--lg-fill-regular); }
.lg-thick { background: var(--lg-sheen), var(--lg-fill-thick); }

/* Pointer-tracked specular light (glass.js sets --lg-mx / --lg-my). */
.lg-interactive { background-image: var(--lg-light), var(--lg-sheen); transition: transform var(--lg-fast) var(--lg-ease), box-shadow var(--lg-fast) var(--lg-ease); }
.lg-interactive:active { transform: scale(.97); }

/* A glass control (button / chip) sitting on glass. */
.lg-control {
  border: 0;
  border-radius: var(--lg-r-control);
  background: var(--lg-fill-control);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 0 0 .5px rgba(255, 255, 255, .25), 0 1px 3px rgba(0, 10, 30, .08);
  color: var(--lg-text);
  font: inherit;
  transition: background var(--lg-fast) var(--lg-ease), transform var(--lg-fast) var(--lg-ease);
}
.lg-control:hover { background: var(--lg-hover); }
.lg-control:active { transform: scale(.96); background: var(--lg-pressed); }
.lg-control[aria-pressed="true"], .lg-control.is-on { background: var(--lg-accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 8px rgba(10, 132, 255, .35); }
body.dark-desktop .lg-control { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 .5px rgba(255, 255, 255, .08); }

/* Refraction (Chromium): glass.js replaces backdrop-filter, so add a touch of fill back. */
.lg-refracting { -webkit-backdrop-filter: none; }

/* ---------- Global feel ---------- */

body { font-family: var(--lg-font); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--lg-accent); outline-offset: 2px; }
::selection { background: var(--lg-accent-soft); }

@media (prefers-reduced-transparency: reduce) {
  .lg, .lg-clear, .lg-regular, .lg-thick { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--lg-fill-thick); }
}
body.motion-reduced *, body.motion-reduced *::before, body.motion-reduced *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }

/* ---------- Lock / profile screen (Tahoe) ---------- */

.profile-screen:before { background: linear-gradient(180deg, rgba(4, 10, 30, .1), rgba(4, 10, 30, .32)); backdrop-filter: blur(2px); }
.entry-clock { top: 7.5%; }
#entry-date { display: block; font-size: 21px; font-weight: 600; letter-spacing: -.2px; color: rgba(255, 255, 255, .86); text-shadow: 0 1px 12px rgba(0, 10, 40, .25); }
#entry-time {
  display: block;
  font-family: "SF Pro Rounded", ui-rounded, var(--lg-font);
  font-size: clamp(96px, 13vw, 168px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
  margin-top: 2px;
  color: rgba(255, 255, 255, .78);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(232, 242, 255, .72) 55%, rgba(210, 228, 255, .58) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .35)) drop-shadow(0 10px 30px rgba(0, 12, 50, .28));
  font-variant-numeric: tabular-nums;
}
.profile-entry { position: absolute; bottom: 11%; gap: 12px; padding: 18px 28px 16px; border-radius: 28px; transition: background var(--lg-medium) var(--lg-ease), transform var(--lg-medium) var(--lg-spring); }
.profile-entry:hover, .profile-entry:focus-visible { background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
.entry-avatar {
  width: 92px; height: 92px; font-size: 32px; border: 0;
  background: linear-gradient(150deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .16));
  color: #fff; text-shadow: 0 1px 6px rgba(0, 20, 60, .3);
  -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--lg-rim-strong), 0 14px 40px rgba(0, 12, 50, .3);
}
.profile-entry strong { font-size: 17px; font-weight: 600; text-shadow: 0 1px 10px rgba(0, 10, 40, .3); }
.entry-action {
  margin-top: 4px; padding: 7px 14px 7px 16px; border-radius: var(--lg-r-pill); font-size: 12px; font-weight: 500; color: #fff;
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: var(--lg-rim-strong), 0 4px 14px rgba(0, 12, 50, .18);
}
.entry-note { bottom: 4.5%; font-size: 11px; color: rgba(255, 255, 255, .62); }
@media (max-width: 760px) {
  .entry-clock { top: 11%; }
  #entry-time { font-size: 92px; }
  .profile-entry { bottom: 13%; }
}

/* ---------- Wallpaper ---------- */
.desktop:before, .profile-screen { background-image: url('../assets/wallpaper-tahoe.svg'); background-color: #0b3a8f; }
