/* Werte und Regeln: siehe DESIGN.md */
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --midnight: #142538;
  --mole: #525966;
  --cloud: #f5f8fc;
  --surface: #ffffff;
  --line: #dde5ee;
  --jet-blue: #168bff;
  --jet-blue-deep: #0b66c8;
  --boost-orange: #ff8a32;
  --boost-orange-hover: #ff7a14;
  --warning-bg: #fff4e8;
  --on-midnight-muted: #b9c6d6;
  --sky-deep: #0f6fd6;
  --sky-top: #0a58b8;
  --sky-low: #2aa0ff;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 24px;
  --shadow: 0 24px 60px rgb(20 37 56 / 18%);

  --width: 1120px;
  --gutter: 24px;
  --section: 96px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

::selection {
  background: var(--boost-orange);
  color: var(--midnight);
}

html {
  scrollbar-color: var(--mole) var(--cloud);
}

body {
  margin: 0;
  background: var(--cloud);
  color: var(--midnight);
  font: 400 17px/1.6 var(--sans);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

svg.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 15em;
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--jet-blue-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--midnight);
}

:focus-visible {
  outline: 3px solid var(--jet-blue-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 14px;
}

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

.section {
  padding-block: var(--section);
}

.lead {
  max-width: 34em;
  font-size: 20px;
  line-height: 1.5;
  color: var(--mole);
}

.muted {
  color: var(--mole);
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--midnight);
  color: #fff;
}

.skip:focus {
  top: 12px;
  color: #fff;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: var(--radius-s);
  background: var(--boost-orange);
  color: var(--midnight);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--boost-orange-hover);
  color: var(--midnight);
}

.button.small {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 15px;
}

.button.small svg.icon {
  width: 20px;
  height: 20px;
}

/* Kopfzeile */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--cloud);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--midnight);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  color: var(--midnight);
  font-size: 15px;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--jet-blue-deep);
  text-decoration: underline;
}

/* Himmel */
.sky {
  position: relative;
  overflow: hidden;
  background: linear-gradient(var(--sky-top), var(--sky-deep) 58%, var(--sky-low));
  color: #fff;
}

.sky-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
}

.sky-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 80px;
}

.sky-header .brand {
  color: #fff;
}

.sky-header .brand img {
  border-radius: 9px;
}

.sky-header .site-nav a {
  color: #fff;
}

.sky-header .site-nav a:hover {
  color: #fff;
}

.sky :focus-visible {
  outline-color: #fff;
}

/* Erster Bildschirm */
.hero {
  padding-top: 104px;
}

.hero h1 {
  max-width: 12em;
}

.hero .lead {
  margin-top: 24px;
  color: #fff;
}

.hero .lead {
  max-width: 34em;
}

.hero .actions {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 32px;
}

.hero-copy {
  position: relative;
  z-index: 4;
}

.requirements {
  color: #fff;
}

/* Abfluglinie */
.lane {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr) minmax(0, 260px);
  align-items: end;
  gap: 24px;
  margin-top: clamp(-220px, -18vh, -120px);
  padding-block: 0 72px;
}

html:not(.js) .tray,
html:not(.js) .server {
  visibility: hidden;
}

.hint {
  max-width: 17em;
  min-height: 3.4em;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--midnight);
}

.hint small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
}

.chips {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px 8px 12px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--midnight);
  font: 400 14px/1.2 var(--mono);
  box-shadow: 0 8px 20px rgb(10 50 110 / 28%);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), opacity 200ms;
}

.chip svg.icon {
  width: 20px;
  height: 20px;
  color: var(--jet-blue-deep);
}

.chip:hover {
  transform: translateY(-2px);
}

.chip:focus-visible {
  outline-color: var(--midnight);
}

.chip.dragging {
  position: relative;
  z-index: 6;
  cursor: grabbing;
  transition: none;
  box-shadow: 0 16px 32px rgb(10 50 110 / 36%);
}

.chip:disabled {
  opacity: 0;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 3;
  justify-self: center;
  width: min(100%, 62vh, 620px);
}

.mole {
  width: 100%;
  animation: hover 3.2s ease-in-out infinite;
  transition: scale 240ms cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-user-drag: none;
  user-select: none;
}

.stage.ready .mole {
  scale: 1.08;
}

@keyframes hover {
  50% {
    transform: translateY(-10px);
  }
}

.cargo {
  position: absolute;
  left: 42%;
  bottom: 4%;
  padding: 6px 12px;
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--midnight);
  font: 400 13px/1.2 var(--mono);
  box-shadow: 0 8px 20px rgb(10 50 110 / 28%);
}

.server {
  justify-self: end;
  width: 100%;
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--midnight);
  box-shadow: 0 16px 40px rgb(10 50 110 / 28%);
}

.server-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
}

.server-title svg.icon {
  width: 20px;
  height: 20px;
  color: var(--jet-blue-deep);
}

.server ul {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 128px;
  margin: 0;
  padding: 12px 16px 16px;
  list-style: none;
  font: 400 14px/1.6 var(--mono);
}

.server li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.server li svg.icon {
  width: 18px;
  height: 18px;
  color: var(--jet-blue-deep);
}

.server .empty {
  font-family: var(--sans);
  color: var(--mole);
}

.again {
  margin-top: 16px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--midnight);
  font: 600 15px var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Wolken */
.clouds {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(72px, 11vw, 150px);
  fill: var(--cloud);
}

.clouds.back {
  bottom: 18px;
  opacity: 0.5;
}

/* App-Ansicht */
.showcase {
  position: relative;
  z-index: 3;
  margin-top: -48px;
}

.showcase img {
  width: 100%;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
}

.showcase-note {
  padding-block: 16px 0;
  font-size: 14px;
  color: var(--mole);
}

/* Funktionen */
.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}

.split > div:first-child p {
  margin-top: 16px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.feature-list svg.icon {
  color: var(--jet-blue-deep);
}

.feature-list h3 {
  margin-top: 12px;
}

.feature-list p {
  margin-top: 4px;
  color: var(--mole);
}

/* Protokolle */
.table-box {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 24px;
  text-align: left;
  vertical-align: top;
}

thead th {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--mole);
}

tbody tr + tr > * {
  border-top: 1px solid var(--line);
}

tbody th {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}

/* Sicherheit */
.security {
  background: var(--midnight);
  color: #fff;
}

.security .muted {
  color: var(--on-midnight-muted);
}

.security a {
  color: #fff;
}

.security-list {
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.security-list li {
  display: flex;
  gap: 16px;
}

.security-list svg.icon {
  margin-top: 2px;
  color: var(--boost-orange);
}

.security-list p {
  margin-top: 4px;
  color: var(--on-midnight-muted);
}

/* Installation */
.steps {
  display: grid;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 56px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--midnight);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

.steps p {
  margin-top: 4px;
  color: var(--mole);
}

.notice {
  margin-top: 16px;
  padding: 16px 24px;
  border-radius: var(--radius-s);
  background: var(--warning-bg);
  font-size: 15px;
}

/* Fragen */
.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  min-height: 44px;
  padding-block: 16px;
  font-weight: 600;
  cursor: pointer;
}

.faq details p {
  max-width: 40em;
  padding-bottom: 24px;
  color: var(--mole);
}

/* Abschluss */
.closing {
  background: var(--sky-deep);
  padding-top: clamp(136px, 16vw, 220px);
}

.closing .clouds {
  top: -1px;
  bottom: auto;
  transform: scaleY(-1);
}

.closing-box {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 32px 48px;
  padding-bottom: 48px;
}

.closing h2 {
  font-size: clamp(36px, 6vw, 64px);
}

.closing p {
  margin-top: 16px;
}

.closing .button {
  margin-top: 32px;
}

.closing img {
  width: min(100%, 440px);
  justify-self: end;
}

.checksum {
  margin-top: 24px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

/* Platzhalter */
.soon-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--midnight);
}

.soon-page {
  --screen: 100vh;
}

@supports (height: 100svh) {
  .soon-page {
    --screen: 100svh;
  }
}

.soon {
  --cloud-height: clamp(44px, min(11vw, 16vh), 170px);
  --brand-height: clamp(64px, 11vh, 96px);
  display: flex;
  flex: 1;
  flex-direction: column;
}

.soon-page .wrap {
  width: min(100%, max(1464px, 72vw));
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.soon-brand {
  display: flex;
  align-items: center;
  min-height: var(--brand-height);
}

.soon .brand {
  color: #fff;
}

.soon .brand img {
  border-radius: 9px;
}

.soon-body {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
  padding-block: 8px calc(var(--cloud-height) * 0.8);
}

.soon h1 {
  max-width: 9em;
  font-size: clamp(34px, min(6.2vw, 12vh), max(96px, 5vw));
}

.soon .lead {
  max-width: 32em;
  margin-top: clamp(12px, 2.4vh, 24px);
  font-size: clamp(17px, min(1.5vw, 2.6vh), max(22px, 1.1vw));
  color: #fff;
}

.soon-status {
  display: inline-block;
  margin-top: clamp(16px, 3.2vh, 32px);
  padding: 0.5em 1.1em;
  border-radius: 999px;
  background: var(--surface);
  color: var(--midnight);
  font-size: max(15px, 0.75vw);
  font-weight: 600;
}

.soon .mole {
  justify-self: end;
  width: min(100%, 68vh, var(--screen) - var(--brand-height) - var(--cloud-height) * 0.8 - 84px);
}

.soon .clouds {
  height: var(--cloud-height);
}

.soon .clouds.back {
  bottom: calc(var(--cloud-height) * 0.14);
}

.soon-page .site-footer {
  padding-block: 12px max(12px, env(safe-area-inset-bottom));
}

.soon-page .site-footer a {
  display: inline-block;
  padding-block: 10px;
}

.soon-page .site-footer span {
  align-self: center;
  white-space: nowrap;
}

/* Hochformat: Telefon und Tablet */
@media (max-width: 860px) and (orientation: portrait) {
  .soon-body {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: clamp(8px, 2vh, 24px);
  }

  .soon .mole {
    order: -1;
    justify-self: center;
    width: max(130px, min(82vw, 36vh, 420px, var(--screen) - 460px));
  }

  .soon h1 {
    font-size: clamp(34px, min(11vw, 6.6vh), 64px);
  }

  .soon .lead {
    font-size: clamp(16px, min(4.4vw, 2.5vh), 20px);
  }
}

/* Schmale Telefone: Fußzeile bleibt einzeilig */
@media (max-width: 360px) {
  .soon-page {
    --gutter: 16px;
  }

  .soon-page .site-footer {
    font-size: 14px;
  }

  .soon-page .site-footer .wrap {
    flex-wrap: nowrap;
    gap: 16px;
  }

  .soon-page .site-footer nav {
    gap: 16px;
  }
}

/* Querformat auf dem Telefon */
@media (max-height: 520px) and (orientation: landscape) {
  .soon {
    --brand-height: 52px;
  }

  .soon-body {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    padding-block: 0 calc(var(--cloud-height) * 0.45);
  }

  .soon .mole {
    width: min(100%, var(--screen) - 120px);
  }

  .soon-page .site-footer {
    padding-block: 2px max(2px, env(safe-area-inset-bottom));
  }

  .soon-page .site-footer a {
    padding-block: 5px;
  }

  .soon h1 {
    font-size: clamp(30px, 11vh, 44px);
  }

  .soon .lead {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.4;
  }

  .soon-status {
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 14px;
  }
}

/* Fußzeile */
.site-footer {
  padding-block: 32px;
  background: var(--midnight);
  color: var(--on-midnight-muted);
  font-size: 15px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer nav {
  display: flex;
  gap: 24px;
}

.site-footer a {
  color: #fff;
}

/* Rechtsseiten */
.legal {
  max-width: 44em;
}

.legal h2 {
  margin-top: 32px;
  font-size: 24px;
}

.legal p {
  margin-top: 8px;
}

mark {
  background: var(--warning-bg);
  color: var(--midnight);
}

@media (max-width: 860px) {
  :root {
    --section: 64px;
  }

  .site-nav {
    display: none;
  }

  .sky-header .button,
  .site-header .button {
    margin-left: auto;
  }

  .hero {
    padding-top: 112px;
  }

  .lane {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    margin-top: 0;
    padding-block: 32px 96px;
  }

  .tray {
    width: 100%;
  }

  .hint {
    max-width: none;
    min-height: 0;
  }

  .chips {
    display: flex;
    flex-wrap: wrap;
  }

  .stage {
    width: min(76vw, 340px);
  }

  .server {
    justify-self: stretch;
    width: 100%;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .closing-box {
    grid-template-columns: minmax(0, 1fr);
  }

  .closing img {
    justify-self: center;
    width: min(70vw, 300px);
    order: -1;
  }
}

@media (max-width: 560px) {
  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .actions .button {
    width: 100%;
  }

  .showcase {
    margin-top: -24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mole {
    animation: none;
  }

  .chip,
  .mole {
    transition: none;
  }
}
