/* 7th Realm · Winterzauber 2026/27
 * Scoped to body.realm-winter; this stylesheet is inert without that class.
 * Scoped seasonal presentation; the original page content remains untouched.
 */

body.realm-winter {
  --realm-ice: #b5d8ed;
  --realm-snow-line: rgba(187, 222, 244, .28);
  background-color: #050a11;
  background-image:
    radial-gradient(ellipse at 50% -15%, rgba(87, 137, 175, .15), transparent 56%),
    linear-gradient(180deg, rgba(9, 18, 31, .20), transparent 720px);
}

/* Keep the existing dark-and-gold identity; add a cool winter edge. */
body.realm-winter .sitebar,
body.realm-winter .srf-topbar,
body.realm-winter .footer {
  border-color: rgba(158, 193, 217, .30);
  box-shadow: 0 1px 16px rgba(89, 148, 188, .065);
}

body.realm-winter .srf-head {
  box-shadow: 0 5px 19px rgba(126, 183, 221, .18) !important;
}

/* The existing homepage hero remains a two-column, fully interactive layout. */
body.realm-winter.home-public-page .home-hero {
  border-color: rgba(188, 216, 237, .39);
  background-image:
    linear-gradient(90deg, rgba(5, 10, 18, .95) 0%, rgba(5, 10, 18, .82) 34%, rgba(5, 10, 18, .28) 62%, rgba(5, 10, 18, .42) 100%),
    linear-gradient(0deg, rgba(6, 12, 20, .50), transparent 40%),
    url('/nexus-test/assets/winter-2026-live/realm-winter-portal.webp');
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48), inset 0 0 60px rgba(130, 181, 218, .08);
}

/* Independent snow particles: random positions, sizes, start times and drift.
 * A lightweight script creates the flakes once; no recurring JS timers. */
body.realm-winter .realm-winter-flakes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  contain: layout paint;
}

body.realm-winter .realm-winter-flakes.is-global {
  position: fixed;
  z-index: 8;
}

body.realm-winter .realm-winter-flakes > i {
  position: absolute;
  top: -12px;
  left: var(--start);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: 0;
  animation: realm-snow-fall var(--duration) linear var(--delay) infinite;
  will-change: transform;
}

body.realm-winter .realm-winter-flakes > i > b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(239, 248, 255, .95);
  box-shadow: 0 0 7px rgba(220, 241, 255, .28);
  animation: realm-snow-sway var(--sway-time) ease-in-out infinite alternate;
}

@keyframes realm-snow-fall {
  0% { transform: translate3d(0, -20px, 0); opacity: 0; }
  9% { opacity: var(--alpha); }
  91% { opacity: var(--alpha); }
  100% { transform: translate3d(var(--drift), var(--fall-distance), 0); opacity: 0; }
}

@keyframes realm-snow-sway {
  to { transform: translate3d(var(--wobble), 0, 0); }
}

/* There is already a large 7R logo in the ornate site header. */
body.realm-winter.home-public-page .home-logo {
  display: none !important;
}

/* Let the illuminated winter gateway breathe; news stay in the sections below. */
body.realm-winter.home-public-page .home-hero-books {
  display: none !important;
}

body.realm-winter.home-public-page .home-hero-copy::before {
  content: '❄  WINTERZAUBER IM REALM';
  display: inline-block;
  margin: 0 0 17px;
  padding: 8px 13px;
  border: 1px solid rgba(195, 223, 241, .36);
  border-radius: 999px;
  color: #d4e9f7;
  background: rgba(7, 19, 31, .55);
  box-shadow: 0 2px 15px rgba(18, 37, 50, .28);
  font: 700 10px/1.1 Arial, sans-serif;
  letter-spacing: .16em;
}

body.realm-winter.home-public-page:lang(en) .home-hero-copy::before {
  content: '❄  WINTER IN THE REALM';
}

body.realm-winter.home-public-page .home-hero h1 {
  text-shadow: 0 4px 24px rgba(0, 0, 0, .75);
}

body.realm-winter.home-public-page .home-lead {
  color: #dfd9d0;
  text-shadow: 0 2px 15px rgba(0, 0, 0, .85);
}

body.realm-winter.home-public-page .home-value-grid article,
body.realm-winter.home-public-page .home-current-card,
body.realm-winter.home-public-page .home-world-card,
body.realm-winter.home-public-page .home-fit,
body.realm-winter.home-public-page .home-fit-grid a,
body.realm-winter.home-public-page .home-more-grid a,
body.realm-winter.home-public-page .home-author {
  border-color: var(--realm-snow-line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(238, 249, 255, .045);
}

body.realm-winter.home-public-page .home-value-grid article,
body.realm-winter.home-public-page .home-world-card,
body.realm-winter.home-public-page .home-more-grid a {
  background: linear-gradient(155deg, rgba(17, 29, 42, .94), rgba(8, 13, 20, .98));
}

body.realm-winter.home-public-page .home-fit,
body.realm-winter.home-public-page .home-author {
  background: linear-gradient(135deg, rgba(26, 39, 52, .73), rgba(8, 13, 21, .96));
}

/* A fine frost accent on cards, without covering headlines or artwork. */
body.realm-winter.home-public-page .home-world-card,
body.realm-winter.home-public-page .home-current-card {
  position: relative;
}

body.realm-winter.home-public-page .home-world-card::after,
body.realm-winter.home-public-page .home-current-card::after {
  content: '';
  position: absolute;
  inset: 0 8% auto;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(220, 243, 255, .66), transparent);
  box-shadow: 0 2px 10px rgba(195, 231, 250, .28);
}

/* Other public pages get the same seasonal framing; their world-specific art stays intact. */
body.realm-winter.library-page,
body.realm-winter.news-page,
body.realm-winter.news-detail-page,
body.realm-winter.project-page,
body.realm-winter.book-page,
body.realm-winter.sevenr-framed-page {
  background-color: #060c15;
  background-image: radial-gradient(ellipse at 50% 0, rgba(82, 131, 170, .13), transparent 58%);
}

body.realm-winter .library-head,
body.realm-winter .news-global-hero,
body.realm-winter .book-shell,
body.realm-winter .project-hub {
  border-color: rgba(177, 213, 237, .24);
}

body.realm-winter.library-page .library-head,
body.realm-winter.news-page .news-global-hero {
  background-image: linear-gradient(110deg, rgba(20, 41, 58, .72), rgba(8, 15, 25, .12));
  box-shadow: inset 0 -1px 0 rgba(171, 218, 247, .25), 0 8px 26px rgba(20, 63, 91, .12);
}

body.realm-winter.library-page .library-shelf,
body.realm-winter.news-page .news-featured,
body.realm-winter.news-page .news-card {
  border-color: rgba(177, 213, 237, .26);
}

@media (max-width: 640px) {
  body.realm-winter.home-public-page .home-hero {
    background-position: 66% center;
    background-image:
      linear-gradient(180deg, rgba(5, 10, 18, .74), rgba(5, 10, 18, .89) 50%, rgba(5, 10, 18, .95)),
      url('/nexus-test/assets/winter-2026-live/realm-winter-portal.webp');
  }
  body.realm-winter.home-public-page .home-hero-copy::before { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  body.realm-winter .realm-winter-flakes { display: none !important; }
}
