/* crabucate — Layout der App-Seiten (Ruhe, Tracker, Platzwahl, Team Zufall,
   Daily Bestiary und die generierten Ruhe-Sprachen).

   Jede Seite setzt nur ihre drei App-Farben in einem eigenen :root —
     :root { --app: var(--pw); --app-text: var(--pw-text); --app-dim: var(--pw-dim); }
   und bleiben muss es bei var()-Verweisen, sonst greift der Dark Mode nicht.
   Was nur eine Seite braucht, steht weiter inline und wird nach dieser Datei
   geladen. */

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1rem, 5vw, 4rem);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.nav-logo img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }

/* ── STAGE: Hero mit Text links, Geräte-Szene rechts ── */
.stage {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(64px + 1.25rem) clamp(0.75rem, 2.5vw, 2rem) 0;
}

.stage-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  min-height: min(640px, 78vh);
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 90% at 72% 58%, color-mix(in srgb, var(--app) 48%, transparent), transparent 70%),
    radial-gradient(60% 70% at 0% 100%, var(--app-dim), transparent 70%),
    var(--card-bg);
}

.stage-copy { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2.5rem, 5vw, 4.5rem) clamp(1.75rem, 5vw, 4.5rem); }

.stage-icon { width: 72px; height: 72px; border-radius: 17px; display: block; margin-bottom: 1.5rem; }

.stage h1 {
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.stage .tagline {
  margin-top: 1.1rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
  text-wrap: pretty;
}

.stage-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.stage-cta .app-store-badge img { height: 50px; width: auto; display: block; }

.stage .hero-meta { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; color: var(--muted); }
.stage .hero-meta li { display: flex; align-items: center; gap: 0.5rem; }
.stage .hero-meta li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--app); flex-shrink: 0; }

.stage-art { position: relative; align-self: stretch; display: flex; align-items: center; }
.stage-art img {
  display: block;
  width: 112%;
  max-width: none;
  height: auto;
  margin-left: -2%;
  animation: rise 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .stage-inner { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .stage-copy { padding: 2.75rem 1.5rem 0; }
  .stage-icon { margin: 0 auto 1.25rem; width: 64px; height: 64px; border-radius: 15px; }
  .stage .tagline { margin-left: auto; margin-right: auto; }
  .stage-cta { justify-content: center; flex-direction: column; }
  .stage .hero-meta { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1rem; }
  .stage-art img { width: 108%; margin: 0.5rem -4% -1.5rem; }
}

/* ── SECTIONS ── */
.sec {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.25rem, 5vw, 3rem) 0;
}

.sec-title {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 20ch;
  text-wrap: balance;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* ── SCREENSHOT-LEISTE ── */
.shots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  max-width: 1280px;
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding: 0.5rem clamp(1.25rem, 5vw, 3rem) 2.5rem;
}
.shots::-webkit-scrollbar { display: none; }

.shots img {
  flex: 0 0 auto;
  width: clamp(200px, 22vw, 250px);
  height: auto;
  border-radius: 22px;
  scroll-snap-align: center;
  box-shadow: 0 18px 40px -16px rgba(36,31,26,0.35);
}

.shots--wide img { width: clamp(300px, 46vw, 560px); border-radius: 18px; }

/* Zentriert, solange alles passt; läuft die Leiste über, beginnt sie links.
   justify-content: center würde den Anfang unerreichbar abschneiden. */
.shots > :first-child { margin-left: auto; }
.shots > :last-child { margin-right: auto; }

/* ── FEATURES: ruhige Liste statt Kartenstapel ── */
.feats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 2.75rem;
}

.feat { border-top: 1px solid var(--line); padding-top: 1.5rem; }

.feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--app-dim);
  color: var(--app-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.feat-icon svg { width: 21px; height: 21px; }

.feat h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.4rem; }
.feat p { font-size: 0.93rem; line-height: 1.6; color: var(--muted); }

@media (max-width: 860px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feats { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ── SCHRITTE: echte Reihenfolge, deshalb nummeriert ── */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem 2.5rem;
}

.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--app-text);
  margin-bottom: 0.9rem;
}
.steps h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 0.35rem; }
.steps p { font-size: 0.93rem; line-height: 1.6; color: var(--muted); }

/* ── RATGEBER ── */
.guide-links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.guide-links a {
  display: block;
  height: 100%;
  padding: 1.15rem 1.3rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.2s;
}
.guide-links a:hover { border-color: var(--app); }
.guide-links strong { display: block; font-size: 0.97rem; font-weight: 650; color: var(--fg); letter-spacing: -0.01em; }
.guide-links span { display: block; margin-top: 0.25rem; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }

/* ── FAQ als Akkordeon ── */
.faq { max-width: 820px; }

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

.qa summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 0;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
.qa summary::after {
  content: '';
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.8px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.8px 12px no-repeat;
  color: var(--app-text);
  transition: transform 0.25s;
}
.qa[open] summary::after { transform: rotate(45deg); }

.qa p { padding: 0 2.5rem 1.4rem 0; font-size: 0.93rem; line-height: 1.7; color: var(--muted); }
.qa a { color: var(--app-text); }

/* ── SCHLUSS ── */
.closing {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(5rem, 10vw, 8rem) 1.5rem clamp(4rem, 8vw, 6rem);
}

.closing-icon { width: 84px; height: 84px; border-radius: 20px; display: block; margin: 0 auto 1.5rem; }
.closing h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.closing p { margin-top: 0.75rem; color: var(--muted); }
.closing .app-store-badge { display: inline-block; margin-top: 1.75rem; }
.closing .app-store-badge img { height: 50px; width: auto; display: block; }

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem 3.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .stage-art img { animation: none; }
  .qa summary::after { transition: none; }
}

@media (max-width: 560px) {
  .feat { display: grid; grid-template-columns: 40px 1fr; column-gap: 1rem; padding-top: 1.25rem; }
  .feat-icon { grid-row: span 2; margin-bottom: 0; }
}
