/* =========================================================================
   Keron — hero desktop mockup
   A full macOS desktop scene (menu bar, wallpaper, dock) with a notification
   banner that cycles through Keron's notification-style presets. The chrome
   stays a constant macOS scene throughout — only the banner's visual style
   changes, since that is what Keron itself actually redesigns.
   ========================================================================= */

.desktop {
  position: relative;
  border-radius: 16px;
  padding: 2.75rem 1.5rem 4rem;
  min-height: 26rem;
  background: linear-gradient(150deg, var(--stage-from), var(--stage-to));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}

.desktop__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
}

.desktop__glow--a {
  width: 22rem; height: 22rem;
  right: -6rem; top: -4rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 70%);
}

.desktop__glow--b {
  width: 18rem; height: 18rem;
  left: -5rem; bottom: -5rem;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.25), transparent 70%);
}

/* ---------- Menu bar ---------- */

.desktop__menubar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 30px;
  background: var(--stage-bar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-sans);
}

.desktop__menubar-left,
.desktop__menubar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.desktop__apple {
  width: 12px; height: 13px;
  flex: none;
}

.desktop__menuitem {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.desktop__menuitem--bold {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
}

.desktop__glyph {
  width: 16px; height: 12px;
  flex: none;
  color: rgba(255, 255, 255, 0.9);
}

.desktop__clock {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.9);
}

/* Narrow screens: the menu bar's full item list doesn't fit — keep the
   Apple mark, app name and clock, drop the rest rather than clipping. */
@media (max-width: 30rem) {
  .desktop__menuitem:not(.desktop__menuitem--bold) { display: none; }
  .desktop__glyph { display: none; }
}

/* ---------- Scene / notification stack ---------- */

.desktop__scene {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-top: 1.75rem;
}

.notification-stack {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 140px; /* reserves space for the tallest preset (win11) */
}

.banner {
  position: absolute;
  top: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
}

/* Each preset sets its own `display` (grid/flex) below; visibility toggling
   is done with opacity/pointer-events only, so it never fights the preset's
   display value on specificity. */
.banner.is-active { opacity: 1; pointer-events: auto; }

/* narrow screens: the stack is a fixed width by design, so shrink the whole
   thing rather than reflowing it, keeping proportions truthful */
@media (max-width: 27rem) {
  .notification-stack {
    transform: scale(0.72);
    transform-origin: top right;
  }
  .desktop { padding-inline: 0.85rem; }
}

/* ---------- Shared banner primitives ---------- */

.banner__icon {
  display: block;
  flex: none;
}

.banner__app,
.banner__title,
.banner__body,
.banner__time {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner__close {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  line-height: 1;
  font-family: var(--font-sans);
}

@keyframes banner-in {
  from { opacity: 0; transform: translateX(42px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Only the very first banner shown on page load plays an entrance animation
   (`.banner--enter`, removed by JS once it finishes) — every subsequent
   500ms cycle swap is an instant cut, per the "no transition" requirement. */
.banner--enter.is-active {
  animation: banner-in 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .banner--enter.is-active { animation: none; }
}

/* ---------- macOS Default ----------
   Geometry is BannerDesign.default, verbatim: 372x62 box, corner 14, fill
   black a0.28, hairline white a0.08 border, blurred. Icon 36x36 at (8,13)
   r8. App name 11/semibold/upper/kern .4 a0.62 at (54,6). Title 13/semibold
   a1.0 at (54,22). Body 13/regular a0.85 at (54,40). Timestamp 11/regular
   a0.42, trailing, at (320,6) w44. */

.banner--macos {
  width: 372px;
  height: 62px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  font-family: var(--font-sans);
  color: #fff;
}

.banner--macos .banner__icon,
.banner--macos .banner__app,
.banner--macos .banner__title,
.banner--macos .banner__body,
.banner--macos .banner__time { position: absolute; }

.banner--macos .banner__icon { left: 8px; top: 13px; width: 36px; height: 36px; border-radius: 8px; }
.banner--macos .banner__app {
  left: 54px; top: 6px; width: 220px; height: 14px;
  font-size: 11px; font-weight: 600; line-height: 14px;
  letter-spacing: 0.4px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.banner--macos .banner__title {
  left: 54px; top: 22px; width: 260px; height: 17px;
  font-size: 13px; font-weight: 600; line-height: 17px;
  color: rgba(255, 255, 255, 1);
}
.banner--macos .banner__body {
  left: 54px; top: 40px; width: 260px; height: 18px;
  font-size: 13px; font-weight: 400; line-height: 18px;
  color: rgba(255, 255, 255, 0.85);
}
.banner--macos .banner__time {
  left: 320px; top: 6px; width: 44px; height: 14px;
  font-size: 11px; font-weight: 400; line-height: 14px;
  text-align: right;
  color: rgba(255, 255, 255, 0.42);
}

/* ---------- Windows 11 (Mica-style toast) ---------- */

.banner--win11 {
  width: 364px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(246, 246, 249, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: 0 18px 40px rgba(20, 20, 30, 0.25);
  font-family: var(--font-sans);
  color: #17171b;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
}

.banner--win11 .banner__icon { width: 20px; height: 20px; border-radius: 4px; grid-row: 1; grid-column: 1; }
.banner--win11 .banner__app {
  grid-row: 1; grid-column: 2;
  font-size: 12px; font-weight: 600;
  color: rgba(23, 23, 27, 0.6);
}
.banner--win11 .banner__close {
  grid-row: 1; grid-column: 3;
  display: flex;
  width: 20px; height: 20px;
  font-size: 15px;
  color: rgba(23, 23, 27, 0.55);
}
.banner--win11 .banner__title {
  grid-row: 2; grid-column: 1 / -1;
  font-size: 14px; font-weight: 600;
  color: #17171b;
}
.banner--win11 .banner__body {
  grid-row: 3; grid-column: 1 / -1;
  font-size: 13px; font-weight: 400;
  white-space: normal;
  color: rgba(23, 23, 27, 0.68);
}
.banner--win11 .banner__time { display: none; }

/* ---------- Windows 10 (Action Center toast) ---------- */

.banner--win10 {
  width: 364px;
  padding: 12px 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 26px rgba(20, 20, 30, 0.22);
  font-family: var(--font-sans);
  color: #171717;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
}

.banner--win10 .banner__icon { width: 18px; height: 18px; border-radius: 3px; grid-row: 1; grid-column: 1; }
.banner--win10 .banner__app {
  grid-row: 1; grid-column: 2;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  color: rgba(23, 23, 23, 0.55);
}
.banner--win10 .banner__close {
  grid-row: 1; grid-column: 3;
  display: flex;
  width: 18px; height: 18px;
  font-size: 14px;
  color: rgba(23, 23, 23, 0.5);
}
.banner--win10 .banner__title {
  grid-row: 2; grid-column: 1 / -1;
  font-size: 13px; font-weight: 700;
}
.banner--win10 .banner__body {
  grid-row: 3; grid-column: 2 / -1;
  font-size: 12px; font-weight: 400;
  white-space: normal;
  color: rgba(23, 23, 23, 0.65);
}
.banner--win10 .banner__time {
  grid-row: 4; grid-column: 1 / -1;
  font-size: 11px;
  color: rgba(23, 23, 23, 0.45);
}

/* ---------- Arch Linux (dunst-style) ---------- */

.banner--arch {
  width: 360px;
  padding: 12px 14px;
  border-radius: 3px;
  background: rgba(24, 24, 26, 0.92);
  border-left: 3px solid #1793d1;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  color: #eaeaea;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 12px;
  align-items: center;
}

.banner--arch .banner__icon { width: 34px; height: 34px; border-radius: 4px; grid-row: 1 / 3; }
.banner--arch .banner__app { display: none; }
.banner--arch .banner__title {
  grid-column: 2;
  font-size: 13px; font-weight: 700;
  color: #f3f3f3;
}
.banner--arch .banner__body {
  grid-column: 2;
  font-size: 12px; font-weight: 400;
  white-space: normal;
  color: rgba(234, 234, 234, 0.72);
}
.banner--arch .banner__time,
.banner--arch .banner__close { display: none; }

/* ---------- KDE Plasma (Breeze-style) ---------- */

.banner--kde {
  width: 360px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(250, 250, 252, 0.95);
  border: 1px solid rgba(61, 174, 233, 0.25);
  box-shadow: 0 16px 34px rgba(20, 30, 40, 0.24);
  font-family: var(--font-sans);
  color: #1b1b1f;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  column-gap: 12px;
  row-gap: 5px;
  align-items: center;
}

.banner--kde .banner__icon {
  width: 38px; height: 38px; border-radius: 50%;
  grid-row: 1 / 3; grid-column: 1;
  box-shadow: 0 0 0 2px #3daee9;
}
.banner--kde .banner__app {
  grid-row: 1; grid-column: 2;
  font-size: 11px; font-weight: 600;
  color: #3daee9;
}
.banner--kde .banner__close {
  grid-row: 1; grid-column: 3;
  display: flex;
  width: 18px; height: 18px;
  font-size: 14px;
  color: rgba(27, 27, 31, 0.5);
}
.banner--kde .banner__title {
  grid-row: 2; grid-column: 2 / -1;
  font-size: 13px; font-weight: 700;
}
.banner--kde .banner__body {
  grid-row: 3; grid-column: 2 / -1;
  font-size: 12px; font-weight: 400;
  white-space: normal;
  color: rgba(27, 27, 31, 0.65);
}
.banner--kde .banner__time { display: none; }

/* ---------- Nobara (GNOME-style pill) ---------- */

.banner--nobara {
  width: 380px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(20, 18, 24, 0.6);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  font-family: var(--font-sans);
  color: #fff;
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  align-items: center;
}

.banner--nobara .banner__icon {
  width: 32px; height: 32px; border-radius: 50%;
  box-shadow: 0 0 0 2px #d5449b;
  grid-row: 1 / 3;
}
.banner--nobara .banner__app { display: none; }
.banner--nobara .banner__title {
  grid-column: 2;
  font-size: 13px; font-weight: 600;
}
.banner--nobara .banner__body {
  grid-column: 2;
  font-size: 12px; font-weight: 400;
  white-space: normal;
  color: rgba(255, 255, 255, 0.7);
}
.banner--nobara .banner__time,
.banner--nobara .banner__close { display: none; }

/* ---------- Dock ---------- */

.desktop__dock {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.desktop__dock-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.desktop__dock-icon--keron {
  width: 34px;
  height: 34px;
}

.desktop__dock-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.22);
  margin-inline: 2px;
  flex: none;
}

/* ---------- Caption ---------- */

.stage__caption {
  position: absolute;
  left: 1.5rem;
  bottom: 4.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
}
