:root {
  --ink: #151e28;
  --ink-soft: #4b5661;
  --paper: #faf7f1;
  --sky: #9cd2f0;
  --sun: #fbee63;
  --pen: #e4572e;
  --line: rgba(21, 30, 40, 0.14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

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

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  transition: background-color 0.45s ease;
}

body.is-intro {
  background: var(--sky);
}

a { color: inherit; }

/* ---------- Kopfleiste ---------- */
.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, 56rem);
  margin-inline: auto;
  padding: 1rem 0 0.5rem;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  cursor: pointer;
}

.brand-frame {
  width: 24px;
  height: auto;
  display: block;
}

.step-counter {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

body.is-intro .step-counter {
  color: rgba(21, 30, 40, 0.72);
}

/* ---------- Bühne (Slides) ---------- */
.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  width: min(100% - 2.5rem, 56rem);
  margin-inline: auto;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(24px);
}

body.ready .slide {
  transition: opacity 0.38s ease, transform 0.42s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.42s;
}

.slide.prev {
  transform: translateX(-24px);
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

body.ready .slide.active {
  transition: opacity 0.42s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0s;
}

/* ---------- Typografie ---------- */
.num {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 7vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  line-height: 1.18;
  margin-bottom: 0.65rem;
}

p + p { margin-top: 0.65rem; }

.intro-wrap {
  max-width: 34rem;
}

.intro-mark {
  width: 56px;
  height: auto;
  display: block;
  margin-bottom: 1.4rem;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.app-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: none;
  display: block;
}

.intro-lead {
  font-size: 1.12rem;
  margin-bottom: 0.8rem;
}

.intro-note {
  margin-top: 1.1rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.38);
  font-size: 0.96rem;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.8rem 1.45rem;
  border: 1px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-start:hover, .btn-start:focus-visible {
  background: var(--ink);
  color: var(--sun);
  outline: none;
}

/* ---------- Schritt-Layout ---------- */
.step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  min-height: 0;
  justify-content: center;
}

.step-text {
  flex: none;
  max-width: 30rem;
}

.step-media {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shot {
  margin: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}

.frame {
  position: relative;
  container-type: inline-size;
  aspect-ratio: var(--ar);
  height: calc(100% - 1.8rem);
  max-height: 32rem;
  max-width: 100%;
  width: auto;
  border: 1px solid rgba(21, 30, 40, 0.09);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(21, 30, 40, 0.05), 0 14px 32px rgba(21, 30, 40, 0.07);
  overflow: hidden;
}

.frame > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 17px;
}

.shot figcaption {
  flex: none;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Zwei-Screenshot-Umschalter (Schritt 5) ---------- */
.sub-tabs {
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.sub-tab {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-tab.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.shots-pair {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  align-items: stretch;
}

.shots-pair .shot {
  display: none;
}

.shots-pair .shot.sub-active {
  display: flex;
}

/* ---------- Marker ---------- */
.mark {
  background: linear-gradient(var(--sun), var(--sun)) no-repeat 0 0 / 100% 100%;
  padding: 0.02em 0.28em;
  margin: 0 -0.05em;
  border-radius: 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Download-Liste ---------- */
.stores { list-style: none; margin-top: 1rem; border-top: 1px solid var(--ink); max-width: 32rem; }
.stores b { white-space: nowrap; }

.stores a {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  column-gap: 0.9rem;
  padding: 0.95rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.stores a span { font-weight: 400; font-size: 0.92rem; color: var(--ink-soft); }
.stores a:hover, .stores a:focus-visible { background: var(--sun); outline: none; }
.stores a::after { content: "\2192"; margin-left: auto; padding-left: 1rem; }

/* ---------- Zugangsdaten (Schritt 2) ---------- */
.access-box {
  margin-top: 1.15rem;
  max-width: 30rem;
}

.access-note {
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--ink);
  background: rgba(21, 30, 40, 0.045);
  font-size: 0.94rem;
}

.code-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.code-row {
  display: flex;
  gap: 0.5rem;
}

.code-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
}

.code-row input:focus {
  outline: 2px solid var(--sky);
  outline-offset: 0;
}

.code-row button {
  flex: none;
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.05rem;
  border: 1px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  cursor: pointer;
}

.code-row button:hover, .code-row button:focus-visible {
  background: var(--ink);
  color: var(--sun);
  outline: none;
}

.access-msg {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--pen);
  min-height: 1.3em;
}

.creds {
  border-top: 1px solid var(--ink);
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.cred-label {
  width: 4.8rem;
  flex: none;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.cred-val {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  word-break: break-all;
}

.copy-btn {
  flex: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.copy-btn:hover { background: var(--sun); }

/* ---------- Fragen ---------- */
.faq-wrap {
  margin-top: 1rem;
  max-width: 30rem;
}

details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--ink); }

summary {
  cursor: pointer;
  padding: 0.7rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; font-weight: 400; }
details[open] summary::after { content: "\2212"; }
details p { padding-bottom: 0.75rem; color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Untere Navigationsleiste ---------- */
.navbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, 56rem);
  margin-inline: auto;
  padding: 0.75rem 0 1.1rem;
  border-top: 1px solid var(--line);
  z-index: 5;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.nav-btn.primary {
  background: var(--ink);
  color: var(--paper);
}

.nav-btn:hover, .nav-btn:focus-visible {
  background: var(--sun);
  color: var(--ink);
  outline: none;
}

.nav-btn[disabled] {
  opacity: 0.25;
  pointer-events: none;
}

body.is-intro .nav-btn {
  visibility: hidden;
  pointer-events: none;
}

.dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 30, 40, 0.22);
  cursor: pointer;
  transition: width 0.28s ease, background-color 0.28s ease;
}

.dot.active {
  width: 24px;
  background: var(--ink);
}

/* ---------- Desktop ---------- */
@media (min-width: 52rem) {
  .topbar, .stage, .navbar { width: min(100% - 4rem, 56rem); }

  .step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
    align-items: center;
  }

  .step-media {
    height: min(68dvh, 34rem);
    align-items: center;
  }

  .frame {
    height: calc(100% - 2rem);
    max-height: 34rem;
  }

  /* Auf dem Desktop beide Screenshots in Schritt 5 nebeneinander */
  .sub-tabs { display: none; }
  .shots-pair .shot { display: flex; }
  .shots-pair .frame { max-height: min(44dvh, 17.5rem); }
}
