@font-face {
  font-family: "Open Sans";
  src: url("../fonts/openSans/opensans-regular-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome Brands";
  src: url("../fonts/fontawesome/fa-brands-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/openSans/opensans-bold-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/openSans/opensans-semibold-webfont.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0c111e;
  --surface: #151e30;
  --ink: #fff8f1;
  --body: #dce2ed;
  --muted: #b7c2d5;
  --gold: #ffd5a1;
  --line: #b2c8eb32;
  --measure: 70rem;
  --sans: "Open Sans", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 0;
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}

a { color: inherit; text-underline-offset: 0.26em; }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.wrap {
  width: min(100% - var(--gutter) * 2, var(--measure));
  margin-inline: auto;
}

.winter-stage {
  position: relative;
  isolation: isolate;
}

.winter-stage::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(55rem, 100%);
  background:
    radial-gradient(ellipse at 19% 34%, #306ab38c, transparent 53%),
    radial-gradient(ellipse at 82% 55%, #4b5e9f8c, transparent 50%),
    radial-gradient(ellipse at 50% 4%, #264767, transparent 58%),
    #111c30;
  mask-image: linear-gradient(#000 60%, transparent);
  content: "";
}

.snowfall {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  mask-image: linear-gradient(#000 64%, transparent);
  pointer-events: none;
}

.snow-crystal {
  --crystal-drift: 1.4rem;
  --crystal-angle: 17deg;
  display: none;
  position: absolute;
  top: -2.9rem;
  left: var(--crystal-x);
  width: 1em;
  height: 1em;
  color: #e7f6ff;
  font: normal var(--crystal-size) / 1 "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif;
  font-variant-emoji: text;
  text-align: center;
  text-shadow: 0 0 0.45rem #c6e7ff55;
}

.snow-crystal::before { content: "\2744\fe0e"; }

.snow-crystal:nth-child(odd) { --crystal-drift: -1.1rem; --crystal-angle: -19deg; }
.snow-crystal:nth-child(3n) { --crystal-angle: 32deg; }

.snow-crystal:nth-child(1) {
  --crystal-x: 5%; --crystal-size: 2.35rem;
  --crystal-duration: 37s; --crystal-delay: -10s;
}

.snow-crystal:nth-child(2) {
  --crystal-x: 15%; --crystal-size: 1.55rem;
  --crystal-duration: 54s; --crystal-delay: -33s;
}

.snow-crystal:nth-child(3) {
  --crystal-x: 26%; --crystal-size: 1.9rem;
  --crystal-duration: 44s; --crystal-delay: -8s;
}

.snow-crystal:nth-child(4) {
  --crystal-x: 37%; --crystal-size: 1.4rem;
  --crystal-duration: 63s; --crystal-delay: -19s;
}

.snow-crystal:nth-child(5) {
  --crystal-x: 46%; --crystal-size: 1.85rem;
  --crystal-duration: 47s; --crystal-delay: -16s;
}

.snow-crystal:nth-child(6) {
  --crystal-x: 51%; --crystal-size: 1.7rem;
  --crystal-duration: 64s; --crystal-delay: -9s;
}

.snow-crystal:nth-child(7) {
  --crystal-x: 59%; --crystal-size: 1.45rem;
  --crystal-duration: 33s; --crystal-delay: -18s;
}

.snow-crystal:nth-child(8) {
  --crystal-x: 72%; --crystal-size: 2.2rem;
  --crystal-duration: 55s; --crystal-delay: -8s;
}

.snow-crystal:nth-child(9) {
  --crystal-x: 82%; --crystal-size: 1.6rem;
  --crystal-duration: 36s; --crystal-delay: -27s;
}

.snow-crystal:nth-child(10) {
  --crystal-x: 89%; --crystal-size: 2.56rem;
  --crystal-duration: 45s; --crystal-delay: -19s;
}

.snow-crystal:nth-child(11) {
  --crystal-x: 94%; --crystal-size: 1.8rem;
  --crystal-duration: 68s; --crystal-delay: -16s;
}

.snow-crystal:nth-child(12) {
  --crystal-x: 97%; --crystal-size: 1.48rem;
  --crystal-duration: 31s; --crystal-delay: -11s;
}

.snow-crystal:nth-child(13) {
  --crystal-x: 10%; --crystal-size: 2.05rem;
  --crystal-duration: 43s; --crystal-delay: -5s;
}

.masthead {
  --logo-width: min(100%, clamp(16.625rem, 45.4vw, 29rem));
  position: relative;
  padding: clamp(1.5rem, 2.1vw, 1.9rem) var(--gutter) clamp(2rem, 3vw, 2.55rem);
  text-align: center;
}

.masthead h1 {
  position: relative;
  margin: 0;
}

.masthead-logo {
  display: block;
  width: var(--logo-width);
  height: auto;
  margin-inline: auto;
}

.campaign-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: -0.3rem 0 0.57rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.campaign-title::before,
.campaign-title::after {
  width: clamp(0.9rem, 4vw, 3.4rem);
  height: 1px;
  background: #e4bb8f73;
  content: "";
}

.brand-icon {
  flex: none;
  font: normal 1em / 1 "Font Awesome Brands";
}

.icon-facebook::before { content: "\f39e"; }
.icon-youtube::before { content: "\f167"; }

.social-links {
  position: absolute;
  top: clamp(1rem, 2.6vw, 2.35rem);
  right: max(var(--gutter), (100% - var(--measure)) / 2);
  display: flex;
  gap: 0.4rem;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #c7d8f444;
  border-radius: 50%;
  background: #11192c75;
  color: #fff;
  font-size: 1.25rem;
  text-decoration: none;
  transition: background-color 200ms ease;
}

.social-links a:hover {
  background: #ffffff24;
  color: #fff;
}

.social-links .icon-youtube { font-size: 1.5rem; }

.releases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.9rem, 5vw, 4.25rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.release {
  --show-in: 55ms;
  --art-halo: #6498f14a;
}

.release-winterschlaf {
  --show-in: 125ms;
  --art-halo: #e4869f50;
}

.cover {
  position: relative;
  overflow: hidden;
  border: 1px solid #dde7ff49;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 1.4rem 3.5rem #050914a6, 0 0 2.5rem var(--art-halo);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 260ms ease;
}

.cover img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 280ms ease;
}

.release:has(.preview-button[data-playing]) .cover {
  border-color: var(--gold);
  box-shadow: 0 1.4rem 3.5rem #050914a6, 0 0 2.75rem var(--art-halo), 0 0 0 1px #ffd5a13d;
}

.preview {
  position: relative;
  margin-top: 0.78rem;
  border-radius: 0.9rem;
}

.preview audio {
  display: block;
  width: 100%;
}

.preview-button {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 3.85rem;
  padding: 0.55rem clamp(0.7rem, 2vw, 0.95rem);
  overflow: hidden;
  border: 1px solid #ffe6c1;
  border-radius: inherit;
  background-color: var(--gold);
  background-image: linear-gradient(105deg, #fff5e05c, transparent 70%);
  color: #221812;
  box-shadow: 0 0.6rem 1.65rem #05091466;
  text-align: left;
  font: 700 0.9rem/1.3 var(--sans);
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
}

.preview-button:hover,
.preview-button[data-playing] { background-color: #ffe4bb; }

.preview-button:hover { transform: translateY(-2px); }
.preview-button:active { transform: translateY(0); }

.preview-button::after {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: #885146;
  transform: scaleX(var(--preview-progress, 0));
  transform-origin: left center;
  content: "";
}

.play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #251b18;
  color: #fff0d6;
  transition: background-color 200ms ease, transform 200ms ease;
}

.preview-button:hover .play-icon {
  transform: scale(1.07);
  background: #463128;
}

.play-icon::before {
  width: 0;
  height: 0;
  margin-left: 0.19rem;
  border: 0.52rem solid transparent;
  border-right-width: 0;
  border-left: 0.86rem solid currentColor;
  content: "";
}

.preview-button[data-playing] .play-icon::before {
  width: 0.84rem;
  height: 1.02rem;
  margin: 0;
  border: 0 solid currentColor;
  border-inline-width: 0.25rem;
}

.preview-time {
  padding: 0.31rem 0.55rem;
  border-radius: 99px;
  background: #48291119;
  color: #422c1f;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.preview-error {
  margin: 0.65rem 0.25rem 0;
  color: #ffcebb;
  font-size: 0.85rem;
}

.release-details { padding-top: clamp(1.5rem, 3.2vw, 2.15rem); }

.release-date {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.45;
  text-transform: uppercase;
}

.release h2 {
  margin: 0;
  font: normal clamp(1.6rem, 3vw, 2.55rem)/1.14 var(--serif);
  letter-spacing: -0.033em;
  text-wrap: balance;
}

.video {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin: 0.95rem 0 1.55rem;
  font-size: 0.85rem;
}

.video-action {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.95rem;
  padding: 0 0.85rem 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.62rem;
  background: #151e30a6;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.video a:hover {
  border-color: #ffd5a17a;
  background: #1a2539;
  color: var(--gold);
}

.video-action:disabled {
  color: var(--muted);
  font-weight: 400;
  opacity: 1;
}

.video .brand-icon { font-size: 2.25rem; }

.video a .icon-youtube {
  position: relative;
  isolation: isolate;
  color: #ff0033;
}

.video a .icon-youtube::after {
  position: absolute;
  z-index: -1;
  inset: 34% 35%;
  background: #fff;
  content: "";
}

.press {
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.8;
}

.press p {
  max-inline-size: 54ch;
  margin: 0 0 1rem;
}
.press p:last-child { margin-bottom: 0; }

.press .press-lead {
  margin-bottom: 1.05rem;
  color: var(--gold);
  font: italic normal clamp(1.36rem, 2.6vw, 1.72rem)/1.2 var(--serif);
  text-wrap: balance;
}

.press .release-availability {
  margin-top: 1.3rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer {
  padding-block: 1.6rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.83rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem clamp(1.05rem, 3vw, 2.1rem);
}

.site-footer a { text-decoration-color: #ffffff4d; }

.site-contact {
  margin-block: 0 clamp(2.35rem, 5vw, 3.65rem);
  text-align: center;
}

.contact-panel {
  width: min(100%, 19.5rem);
  margin-inline: auto;
  padding: 1.25rem 1.35rem 0.95rem;
  border: 1px solid #ffd5a18c;
  border-radius: 0.9rem;
  background: #191d2a;
}

.contact-panel h2 {
  margin: 0 0 0.3rem;
  color: var(--ink);
  font: normal 1.55rem / 1.15 var(--serif);
}

.contact-address,
.contact-agency {
  display: grid;
  justify-items: center;
}

.contact-address {
  font-size: 0.95rem;
  font-style: normal;
}

.contact-address a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.35rem;
  color: var(--gold);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: #ffd5a1a0;
}

.contact-address a:hover {
  color: #fff3e1;
  text-decoration-color: currentColor;
}

.contact-email {
  font-size: clamp(1.05rem, 4vw, 1.2rem);
  font-weight: 700;
}

.contact-agency {
  width: 100%;
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

html:has(.legal-dialog[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.legal-dialog {
  width: min(44rem, 100% - 1.75rem);
  max-width: none;
  height: min(42rem, 100dvh - 1.75rem);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff3d;
  border-radius: 0.9rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1rem 4rem #0007;
}

.legal-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.legal-dialog[data-document="imprint"] { height: min(24rem, 100dvh - 1.75rem); }
.legal-dialog::backdrop { background: #080d17bf; }

.legal-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.7rem clamp(0.9rem, 4vw, 1.55rem);
  border-bottom: 1px solid var(--line);
}

.legal-dialog-header h2,
.legal-document h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font: normal clamp(1.35rem, 4.8vw, 2rem)/1.2 var(--serif);
}

.legal-dialog-header h2 {
  font-size: clamp(1.16rem, 6vw, 2rem);
  hyphens: auto;
}

.legal-dialog-close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 1.8rem/1 Arial, sans-serif;
  cursor: pointer;
}

.legal-dialog-close:hover { background: #ffffff19; }

.legal-dialog-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.legal-document {
  padding: clamp(1rem, 5vw, 2rem);
  background: var(--surface);
  color: var(--body);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.legal-document main,
.legal-document footer {
  max-width: 42rem;
  margin-inline: auto;
}

.legal-document :is(h1, h2, h3, h4) { color: var(--ink); }
.legal-document h2 { font-size: 1.16rem; }
.legal-document h3 { font-size: 1rem; }
.legal-document h4 { font-size: 0.95rem; }
.legal-document :is(h2, h3, h4) { margin: 1.2em 0 0.4em; }
.legal-document p { margin: 0 0 0.8em; }
.legal-document a { color: var(--gold); }

.legal-document footer { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.legal-document:target :is(h1, footer) { display: none; }
.legal-document:target main > h1 + h2 { margin-top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 43.001rem) {
  /* The square covers can grow while leaving room for the header and audio controls. */
  .releases { max-width: clamp(53rem, 200svh - 37rem, var(--measure)); }

  .release,
  .release-details {
    display: grid;
    grid-template-rows: subgrid;
  }

  .release { grid-row: span 6; }
  .release-details { grid-row: span 4; }
}

@media (min-width: 43.001rem) and (max-height: 49rem) {
  .masthead { padding-block: 1.05rem 2.45rem; }
}

@media (max-width: 43rem) {
  .releases { grid-template-columns: 1fr; row-gap: 3.6rem; reading-flow: grid-rows; }
  .release-winterschlaf { order: -1; }
  .wrap { max-width: 34rem; }
  .release h2 { font-size: clamp(1.75rem, 6vw, 2.45rem); }
}

@media (max-width: 34rem) {
  .masthead { padding-top: 3.5rem; }
  .social-links { top: 0.5rem; }
  .snow-crystal:nth-child(1) { --crystal-x: 11%; --crystal-delay: -4.5s; --crystal-drift: -0.45rem; }
  .snow-crystal:nth-child(3) { --crystal-x: 3.5%; --crystal-drift: -0.2rem; }
  .snow-crystal:nth-child(6) { --crystal-x: 96.5%; --crystal-drift: 0.35rem; }
  .snow-crystal:nth-child(8) { --crystal-x: 88%; --crystal-delay: -4s; }
  .snow-crystal:nth-child(10) { --crystal-x: 4.5%; --crystal-drift: -0.3rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .masthead h1, .campaign-title { animation: arrive 470ms ease-out both; }
  .release { animation: arrive 570ms var(--show-in) ease-out both; }

  .masthead h1::after {
    position: absolute;
    inset: 0;
    width: var(--logo-width);
    margin-inline: auto;
    background: linear-gradient(109deg, transparent 39%, #ffe1a852 46%, #fff8def0 50%, #fff4d640 54%, transparent 62%);
    background-size: 235% 100%;
    mask: url("../img/margitta-logo.png") center / 100% 100% no-repeat;
    pointer-events: none;
    animation: logo-reflection 1.05s 650ms ease-in-out both;
    content: "";
  }

  .preview-button[data-playing] .play-icon::after {
    position: absolute;
    inset: -0.22rem;
    border: 1.5px solid #925a35;
    border-radius: inherit;
    pointer-events: none;
    animation: playback-pulse 1.65s ease-out infinite;
    content: "";
  }

  .snow-crystal {
    display: block;
    animation: crystal-fall var(--crystal-duration) var(--crystal-delay) linear infinite;
  }

  @keyframes arrive {
    from { opacity: 0; transform: translateY(0.65rem); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes logo-reflection {
    from { opacity: 0; background-position: 135% 0; }
    28%, 68% { opacity: 0.75; }
    to { opacity: 0; background-position: -35% 0; }
  }

  @keyframes playback-pulse {
    from { opacity: 0.8; transform: scale(0.89); }
    to { opacity: 0; transform: scale(1.24); }
  }

  @keyframes crystal-fall {
    from { opacity: 0; transform: translate3d(-50%, 0, 0) rotate(var(--crystal-angle)); }
    12%, 82% { opacity: 0.71; }
    44% { transform: translate3d(calc(-50% + var(--crystal-drift)), 47vh, 0) rotate(calc(var(--crystal-angle) + 32deg)); }
    70% { transform: translate3d(calc(-50% - var(--crystal-drift) / 2), 74vh, 0) rotate(calc(var(--crystal-angle) + 62deg)); }
    to { opacity: 0; transform: translate3d(-50%, calc(100vh + 3rem), 0) rotate(calc(var(--crystal-angle) + 104deg)); }
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .release:has(.preview-button:hover) .cover { transform: translateY(-4px); }

  .release:has(.cover:hover, .preview-button:hover) .cover img { transform: scale(1.018); }

  .release:has(.cover:hover, .preview-button:hover) .cover::after {
    position: absolute;
    inset: -20% -60%;
    background: linear-gradient(113deg, transparent 42%, #fff5e613 46%, #fff4e04b 50%, #fff7eb1c 53%, transparent 58%);
    pointer-events: none;
    animation: cover-reflection 770ms ease-out both;
    content: "";
  }

  @keyframes cover-reflection {
    from { opacity: 0; transform: translateX(-51%); }
    27%, 66% { opacity: 0.72; }
    to { opacity: 0; transform: translateX(51%); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover, .cover img, .preview-button, .play-icon, .social-links a, .video a { transition: none; }
  .preview-button:hover,
  .preview-button:hover .play-icon { transform: none; }
}
