/* bcMedia e. V. Wartungsseite: eigenständig, ohne externe Anfragen (Schrift und Bilder liegen in assets/) */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('assets/archivo-latin.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('assets/archivo-latin-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #c41716;
  --yellow: #ffc247;
  --midnight: #171628;
  --night: #0f0e1c;
  --offwhite: #f8f7f4;
  --soft: #c9c7d6;
  --black: #111014;
  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--red) var(--midnight);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--midnight);
  color: var(--offwhite);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--red);
  color: var(--offwhite);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Grundgerüst ---------- */
.page {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
}

/* Leichtes Filmkorn statt Verlauf: ruhige Fläche mit Struktur */
.page::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ---------- Kopf ---------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: clamp(12px, 2vw, 20px) var(--gutter) 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  background: var(--offwhite);
}

.logo img {
  height: clamp(24px, 2.6vw, 36px);
  width: auto;
}

.top__legal {
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid rgb(248 247 244 / 0.35);
  background: none;
  font-weight: 700;
  transition:
    border-color 200ms var(--ease-out),
    background-color 200ms var(--ease-out);
}

.top__legal:hover {
  border-color: var(--offwhite);
  background: rgb(248 247 244 / 0.08);
}

/* ---------- Bühne ---------- */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--gutter);
  padding: clamp(28px, 5vh, 80px) var(--gutter);
}

.stage__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(20px, 3.2vh, 34px);
  justify-items: start;
}

.headline {
  margin: 0;
  font-weight: 900;
  font-stretch: 78%;
  letter-spacing: -0.035em;
  line-height: 0.86;
  text-transform: uppercase;
  font-size: clamp(3rem, 8vw, 8.2rem);
  white-space: nowrap;
}

/* Zeilen fahren aus einer Maske hoch; Luft für Ü-Punkte und Unterlängen */
.headline__mask {
  display: block;
  overflow: hidden;
  padding: 0.12em 0.06em 0.18em;
  margin: -0.12em -0.06em -0.18em;
}

.headline__line {
  display: inline-block;
  animation: rise 1s var(--ease-out) both;
}

.headline__mask:nth-child(2) .headline__line {
  animation-delay: 110ms;
}

.headline__line--mark {
  margin-top: 0.06em;
  padding: 0.02em 0.1em 0.04em;
  background: var(--red);
}

.lead {
  margin: 0;
  max-width: 36ch;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 600;
  line-height: 1.4;
  animation: fade-up 800ms var(--ease-out) 300ms both;
}

/* Fortschritt ohne Prozentangabe: ein Balken, der ruhig hin und her läuft */
.status {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: fade-up 800ms var(--ease-out) 420ms both;
}

.status__bar {
  position: relative;
  width: clamp(140px, 18vw, 220px);
  height: 6px;
  overflow: hidden;
  background: rgb(248 247 244 / 0.16);
}

/* Füllt sich einmal auf etwa zwei Drittel und bleibt dort stehen: „in Arbeit, aber schon weit“ */
.status__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 68%;
  background: var(--yellow);
  transform-origin: 0 50%;
  animation: work 1.8s var(--ease-out) 700ms both;
}

.status__label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.contact {
  display: grid;
  gap: 14px;
  justify-items: start;
  margin-top: clamp(4px, 1vh, 12px);
  animation: fade-up 800ms var(--ease-out) 540ms both;
}

.contact__text {
  margin: 0;
  color: var(--soft);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 22px;
  background: var(--offwhite);
  color: var(--black);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  transition:
    background-color 200ms var(--ease-out),
    transform 300ms var(--ease-out);
}

.button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  transition: transform 300ms var(--ease-out);
}

.button:hover {
  background: var(--yellow);
  transform: translateY(-2px);
}

.button:hover svg {
  transform: translate(3px, -3px);
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgb(248 247 244 / 0.35);
  transition: text-decoration-color 200ms var(--ease-out), color 200ms;
}

.social a:hover {
  color: var(--yellow);
  text-decoration-color: var(--yellow);
}

/* Das runde Wappen dreht sich langsam wie eine Filmrolle */
.stage__emblem {
  justify-self: end;
  width: min(42vw, 62vh, 560px);
  aspect-ratio: 1;
  padding: 3%;
  border-radius: 50%;
  background: var(--offwhite);
  animation:
    fade-in 900ms var(--ease-out) 200ms both,
    spin 60s linear infinite;
}

.stage__emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Fuß ---------- */
.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  padding: 18px var(--gutter) clamp(18px, 3vh, 28px);
  border-top: 1px solid rgb(248 247 244 / 0.12);
  font-size: 0.92rem;
  color: var(--soft);
}

.bottom p {
  margin: 0;
}

.bottom__links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-weight: 700;
  color: var(--offwhite);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.link:hover {
  color: var(--yellow);
}

.made {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  color: var(--offwhite);
}

.made strong {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.made svg {
  width: 1.05em;
  height: 1.05em;
  fill: var(--yellow);
}

.made:hover svg {
  animation: beat 900ms var(--ease-in-out) infinite;
}

/* ---------- Impressum als Overlay ---------- */
.legal {
  width: min(760px, 100% - 24px);
  max-height: min(86svh, 100% - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  background: var(--offwhite);
  color: var(--black);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.7);
  overflow: hidden;
}

.legal[open] {
  display: grid;
  animation: panel-in 380ms var(--ease-out);
}

.legal::backdrop {
  background: rgb(15 14 28 / 0.78);
  backdrop-filter: blur(6px);
  animation: fade-in 300ms var(--ease-out);
}

.legal__panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  max-height: inherit;
}

.legal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 36px) 14px;
  border-bottom: 4px solid var(--red);
}

.legal__title {
  margin: 0;
  font-weight: 900;
  font-stretch: 78%;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.legal__close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  background: var(--midnight);
  color: var(--offwhite);
  transition:
    background-color 200ms var(--ease-out),
    transform 300ms var(--ease-out);
}

.legal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
}

.legal__close:hover {
  background: var(--red);
  transform: rotate(90deg);
}

.legal__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px clamp(18px, 3vw, 36px) clamp(22px, 4vw, 40px);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  hyphens: auto;
  scrollbar-color: var(--red) transparent;
}

.legal__body h3 {
  margin: 1.5em 0 0.35em;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.legal__body p {
  margin: 0 0 0.8em;
  max-width: 68ch;
}

.legal__body a {
  color: var(--red);
  font-weight: 600;
}

.legal__note {
  margin-top: 1.6em;
  font-size: 0.85rem;
  color: #55535f;
}

/* ---------- Bewegung ---------- */
@keyframes rise {
  from {
    transform: translateY(105%);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@keyframes work {
  from {
    transform: scaleX(0);
  }
}

@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.18);
  }
  60% {
    transform: scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .stage__emblem {
    animation: none;
  }
}

/* ---------- Handy und Tablet ---------- */
@media (max-width: 860px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    padding-top: clamp(28px, 6vh, 56px);
  }
  /* Wappen wandert als großes Siegel hinter den Text, rechts oben angeschnitten */
  .stage__emblem {
    position: absolute;
    top: -8vw;
    right: -18vw;
    width: 62vw;
    opacity: 0.16;
  }
  .headline {
    font-size: clamp(2.6rem, 14vw, 6rem);
  }
  .bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .top__legal {
    padding: 0 14px;
  }
  .button {
    font-size: 1rem;
    padding: 0 18px;
  }
}
