/* DM Mono lokal gehostet (kein Google-Fonts-Request, DSGVO) */
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/dm-mono-300.woff2") format("woff2");
  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: "DM Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/dm-mono-300-ext.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/dm-mono-400.woff2") format("woff2");
  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: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/dm-mono-400-ext.woff2") format("woff2");
  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 {
  --bg: #282828;
  --text: #b7b7b2;
  --accent: #ff2021;
  /* Abstand der Elemente von der Bildschirmmitte, skaliert mit dem Viewport */
  --offset: clamp(160px, 27vw, 480px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Textauswahl in der Markenfarbe */
::selection {
  background: var(--accent);
  color: #ffffff;
}

::-moz-selection {
  background: var(--accent);
  color: #ffffff;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* Graustufen-Antialiasing: helle Schrift auf dunklem Grund wirkt
     sonst durch Subpixel-Rendering zu fett */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ---------- X-Ray-Produkte im Hintergrund ---------- */

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease 0.2s;
}

body.ready .bg {
  opacity: 1;
}

.bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Film-Grain ueber der ganzen Seite ---------- */

.grain {
  position: fixed;
  top: -60px;
  left: -60px;
  width: calc(100vw + 120px);
  height: calc(100vh + 120px);
  pointer-events: none;
  z-index: 10;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: grain-shift 0.9s steps(1) infinite;
}

@keyframes grain-shift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  16% {
    transform: translate3d(-34px, 22px, 0);
  }
  33% {
    transform: translate3d(18px, -40px, 0);
  }
  50% {
    transform: translate3d(-26px, -14px, 0);
  }
  66% {
    transform: translate3d(38px, 30px, 0);
  }
  83% {
    transform: translate3d(-12px, 44px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* ---------- Buehne ---------- */

.stage {
  position: relative;
  height: 100%;
}

.logo {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: block;
  transition: top 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.logo:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 8px;
}

/* Nach dem Intro gleitet das Logo zentriert nach oben */
body.ready .logo {
  top: clamp(48px, 9vh, 96px);
}

.logo svg {
  display: block;
  transform: scale(1.7);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body.ready .logo svg {
  transform: scale(1);
}

/* Trace-Loader: Strichsegment mit Schweif laeuft einmal um die Kontur.
   Die Schweif-Ebenen und alle Bewegungen erzeugt script.js per
   Web Animations API, damit der Verlauf stufenlos ist. */

.trace {
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 0.05 0.95;
  transition: opacity 0.4s ease 0.25s;
}

/* Fuellung blendet ein, Kontur verschwindet */
.fill-group {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.filled .fill-group {
  opacity: 1;
}

body.filled .trace {
  opacity: 0;
}

/* ---------- Wortmarke und Tagline: blurred aus der Mitte einfaden ---------- */

.wordmark,
.tagline {
  position: absolute;
  top: 50%;
  opacity: 0;
  filter: blur(14px);
  transition:
    opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    filter 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, filter, opacity;
}

.wordmark {
  right: calc(50% + var(--offset));
  transform: translate(80px, -50%);
  width: clamp(170px, 14vw, 245px);
  height: auto;
}

.tagline {
  left: calc(50% + var(--offset));
  transform: translate(-80px, -50%);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.15px;
  text-transform: uppercase;
  white-space: pre;
}

body.ready .wordmark {
  opacity: 1;
  filter: blur(0);
  transform: translate(0, -50%);
}

body.ready .tagline {
  opacity: 1;
  filter: blur(0);
  transform: translate(0, -50%);
}

/* ---------- Get-notified-Formular ---------- */

.notify {
  position: absolute;
  left: 50%;
  bottom: clamp(76px, 12vh, 140px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transition: opacity 1s ease 0.75s;
}

.notify-hint {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #8b8b86;
}

.notify-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.notify-hint.error {
  color: var(--accent);
}

.notify-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

body.ready .notify {
  opacity: 1;
}

.notify-input {
  width: min(240px, 52vw);
  background: none;
  border: none;
  border-bottom: 1px solid #55554f;
  padding: 8px 2px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 1px;
  color: #e6e6e1;
  border-radius: 0;
  transition: border-color 0.25s ease;
}

/* Browser-Autofill dem dunklen Design unterordnen */
.notify-input:-webkit-autofill,
.notify-input:-webkit-autofill:hover,
.notify-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e6e6e1;
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: #e6e6e1;
  transition: background-color 99999s ease-in-out 0s;
}

.notify-input:autofill {
  -webkit-text-fill-color: #e6e6e1;
  box-shadow: 0 0 0 1000px var(--bg) inset;
}

.notify-input::placeholder {
  color: #6f6f6a;
  text-transform: uppercase;
}

.notify-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.notify-submit {
  white-space: nowrap;
}

/* Erfolgsmeldung ersetzt das Formular */
.notify-done {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Impressum-Link und Modal im HUD-Stil ---------- */

.legal-links {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 22px;
  opacity: 0;
  transition: opacity 1s ease 0.6s;
}

body.ready .legal-links {
  opacity: 1;
}

.imprint-link {
  background: none;
  border: none;
  padding: 6px 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6f6f6a;
  cursor: pointer;
  transition: color 0.25s ease;
}

/* Klammern schieben bei Hover von aussen ein */
.imprint-link::before,
.imprint-close::before {
  content: "[\00a0";
  display: inline-block;
  opacity: 0;
  transform: translateX(7px);
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.imprint-link::after,
.imprint-close::after {
  content: "\00a0]";
  display: inline-block;
  opacity: 0;
  transform: translateX(-7px);
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover nur auf Geraeten mit echtem Hover, sonst klebt der Zustand
   auf Touchscreens nach dem Tippen fest */
@media (hover: hover) {
  .imprint-link:hover::before,
  .imprint-close:hover::before,
  .imprint-link:hover::after,
  .imprint-close:hover::after {
    opacity: 1;
    transform: translateX(0);
  }

  .imprint-link:hover,
  .imprint-close:hover {
    color: var(--accent);
  }
}

.imprint-link:focus-visible::before,
.imprint-close:focus-visible::before,
.imprint-link:focus-visible::after,
.imprint-close:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.imprint-link:focus-visible,
.imprint-close:focus-visible {
  color: var(--accent);
  outline: none;
}

/* Overlay-Seite: fuellt den kompletten Viewport */
.imprint-modal {
  border: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}

.imprint-modal::backdrop {
  background: var(--bg);
}

/* Weiches Ein- und Ausblenden der Overlay-Seite */
.imprint-modal[open] {
  animation: modal-in 0.35s ease;
}

.imprint-modal.closing {
  animation: modal-out 0.2s ease forwards;
}

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

@keyframes modal-out {
  to {
    opacity: 0;
  }
}

.imprint-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Kopf und Perforation nur so breit wie die Textspalte */
.imprint-header {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(720px, calc(100% - 64px));
  margin: 0 auto;
  padding: 34px 0 18px;
}

.imprint-header h2 {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 3px;
  line-height: 1.55;
  text-transform: uppercase;
  color: #e6e6e1;
}

/* Perforationslinie zwischen Kopf und Inhalt */
.imprint-perforation {
  height: 1px;
  width: min(720px, calc(100% - 64px));
  margin: 0 auto;
  background-image: repeating-linear-gradient(
    to right,
    #5a5a55 0 7px,
    transparent 7px 14px
  );
  flex: none;
}

.imprint-close {
  background: none;
  border: none;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s ease;
}

.imprint-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: break-word;
  padding: 30px 32px 60px;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.2px;
  scrollbar-width: thin;
  scrollbar-color: rgb(236 234 228 / 0.3) transparent;
}

/* Inhalt als mittige Spalte */
.imprint-body > * {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Inhalt gleitet beim Oeffnen weich ein */
.imprint-modal[open] .imprint-body {
  animation: body-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes body-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.imprint-law {
  color: #8b8b86;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
}

/* Kontaktdaten als Boarding-Pass-Felder: Label oben, Wert darunter.
   Jedes Feld nimmt seine natuerliche Breite, Werte brechen nicht um. */
.imprint-pass {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 44px;
}

.imprint-pass .pass-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pass-label {
  font-size: 9.5px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #8b8b86;
}

.pass-value {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  color: #e6e6e1;
}

.imprint-body section {
  margin-top: 26px;
}

.imprint-body h3 {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #eceae4;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.imprint-body h3::before {
  content: "";
  width: 14px;
  border-top: 1px solid #eceae4;
  flex: none;
}

.imprint-body h3::after {
  content: "";
  border-top: 1px solid rgb(236 234 228 / 0.3);
  flex: 1;
}

.imprint-body p + p {
  margin-top: 12px;
}

.imprint-body ul {
  list-style: none;
  margin: 12px 0;
}

.imprint-body li {
  padding-left: 18px;
  position: relative;
}

.imprint-body li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: #eceae4;
}

.imprint-body a {
  color: #eceae4;
  text-decoration: none;
  border-bottom: 1px solid rgb(236 234 228 / 0.45);
}

.imprint-body a:hover {
  border-bottom-color: #eceae4;
}

/* ---------- Schmale Viewports: untereinander ---------- */

@media (max-width: 640px) {
  .wordmark,
  .tagline {
    left: 50%;
    right: auto;
  }

  /* Wortmarke sitzt auf Mobile unter dem Produkt, ueber dem Claim */
  .wordmark {
    top: calc(50% + clamp(110px, 22vh, 200px));
    bottom: auto;
    transform: translate(-50%, -40px);
    width: 170px;
  }

  .tagline {
    top: calc(50% + clamp(140px, 27vh, 250px));
    text-align: center;
    transform: translate(-50%, -40px);
    font-size: 13px;
  }

  body.ready .wordmark,
  body.ready .tagline {
    transform: translate(-50%, 0);
  }

  .notify {
    bottom: 58px;
    gap: 12px;
    width: calc(100% - 48px);
  }

  .imprint-pass .pass-field {
    flex-basis: 100%;
  }

  .pass-value {
    white-space: normal;
  }

  .imprint-body h3 {
    white-space: normal;
  }

  .imprint-header {
    flex-wrap: wrap;
  }
}

/* ---------- Reduzierte Bewegung: Endzustand sofort ---------- */

@media (prefers-reduced-motion: reduce) {
  .logo svg,
  .trace,
  .fill-group,
  .wordmark,
  .tagline,
  .grain,
  .imprint-modal,
  .imprint-modal::backdrop {
    animation: none !important;
    transition: none !important;
  }
}
