/* site-world-ui.css: the landing's glass for every window outside the landing (design SPEC v1 §3): dialogs, sheets,
   popovers, menus and toasts. Tokens first, then opt-in classes. A page either adds the class to its window
   (.sw-window, .sw-sheet, .sw-pop, .sw-toast, .sw-glass) or maps its own window selectors to the tokens in its adapter
   stylesheet. Values from the landing: dashboard glass and dialog (landing-premium.css, landing-world.css; anatomy
   §1.3). Opaque enough to read without backdrop-filter; blur is added only where it is supported and the screen is
   large enough for it to be cheap. Peach never appears here: UI accents stay mint. Opening a window pauses the World
   backdrop by itself (site-world.js watches dialog[open] and [aria-modal="true"]). */
:root {
  --sw-glass: rgba(16, 24, 27, .86);
  --sw-glass-full: rgba(17, 25, 28, .72);
  --sw-glass-filter: blur(16px) saturate(1.2);
  --sw-glass-line: #cfe3dc2e;
  --sw-glass-inset: inset 0 1px #ffffff14;
  --sw-glass-shadow: 0 40px 60px -35px #000;
  --sw-radius-window: 28px;
  --sw-radius-pop: 18px;
  --sw-scrim: #030607b0;
  --sw-scrim-filter: blur(12px);
  --sw-ease: cubic-bezier(.16, 1, .3, 1);
  --sw-in: 280ms;
}

.sw-glass, .sw-window, .sw-sheet, .sw-pop, .sw-toast {
  background: var(--sw-glass);
  border: 1px solid var(--sw-glass-line);
  box-shadow: var(--sw-glass-inset), var(--sw-glass-shadow);
  color: #f4f6f5;
}
.sw-glass, .sw-window { border-radius: var(--sw-radius-window); }
.sw-sheet { border-radius: var(--sw-radius-window) var(--sw-radius-window) 0 0; }
.sw-pop { border-radius: var(--sw-radius-pop); }
.sw-toast { border-radius: 999px; }

dialog.sw-window::backdrop, .sw-scrim { background: var(--sw-scrim); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  dialog.sw-window::backdrop, .sw-scrim { -webkit-backdrop-filter: var(--sw-scrim-filter); backdrop-filter: var(--sw-scrim-filter); }
  @media (min-width: 900px) {
    .sw-glass, .sw-window, .sw-sheet, .sw-pop {
      background: var(--sw-glass-full);
      -webkit-backdrop-filter: var(--sw-glass-filter); backdrop-filter: var(--sw-glass-filter);
    }
  }
  /* windows over moving page content stay blurred on phones too, or the text behind shows through */
  .sw-window, .sw-sheet, .sw-pop { -webkit-backdrop-filter: var(--sw-glass-filter); backdrop-filter: var(--sw-glass-filter); }
}

/* Entrance: a short rise into place. Add .sw-in when the window opens (dialog[open] gets it automatically). */
@keyframes sw-window-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sw-sheet-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes sw-fade-in { from { opacity: 0; } to { opacity: 1; } }
dialog.sw-window[open], .sw-window.sw-in, .sw-pop.sw-in, .sw-toast.sw-in { animation: sw-window-in var(--sw-in) var(--sw-ease) both; }
.sw-sheet.sw-in, dialog.sw-sheet[open] { animation: sw-sheet-in var(--sw-in) var(--sw-ease) both; }
dialog.sw-window[open]::backdrop { animation: sw-fade-in var(--sw-in) linear both; }
@media (prefers-reduced-motion: reduce) {
  dialog.sw-window[open], .sw-window.sw-in, .sw-pop.sw-in, .sw-toast.sw-in, .sw-sheet.sw-in, dialog.sw-sheet[open] {
    animation: sw-fade-in 160ms linear both;
  }
}
