/* Startseite. Farben, Schrift und Kopfleiste: siehe topbar.css (gemeinsam für alle Seiten) */
:root {
  --max: 1080px;
  --gutter: 24px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--topbar-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 980px;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary { background: var(--button); color: #fff; }
.btn-primary:hover { background: var(--button-hover); }

/* ---------- Einstieg ---------- */
.hero {
  padding: calc(var(--topbar-h) + 72px) var(--gutter) 96px;
  text-align: center;
  background:
    radial-gradient(60% 46% at 82% 18%, rgba(46, 179, 255, 0.13), transparent 70%),
    radial-gradient(56% 44% at 12% 40%, rgba(214, 158, 72, 0.20), transparent 70%);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.hero-text {
  max-width: 1000px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 400;
  text-wrap: balance;
}

.nb { white-space: nowrap; }
.shine { display: block; font-style: italic; color: var(--accent); }

.lead {
  max-width: 34em;
  margin: 24px auto 32px;
  font-size: clamp(1.1875rem, 2.2vw, 1.3125rem);
  line-height: 1.4;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 24px;
}

.platforms {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.platforms svg { width: 16px; height: 16px; }
.platforms svg + svg { margin-left: 10px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Installationen: kleine Plakette über dem Blatt */
.installs {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  margin: clamp(48px, 7vw, 72px) auto 0;
  padding: 10px 20px 10px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-soft);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.installs strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--accent);
}

/* Breite der Endzahl reservieren, damit die Plakette beim Zählen nicht wackelt */
.installs-count { display: inline-grid; justify-items: end; }
.installs-count::before { content: attr(data-final); visibility: hidden; }
.installs-count::before, .installs-count span { grid-area: 1 / 1; }

.installs-suits { display: flex; gap: 3px; }
.installs-suits img {
  width: 16px;
  height: 16px;
  animation: bob 2.8s ease-in-out infinite;
}
.installs-suits img:nth-child(2) { animation-delay: 0.2s; }
.installs-suits img:nth-child(3) { animation-delay: 0.4s; }
.installs-suits img:nth-child(4) { animation-delay: 0.6s; }

@keyframes bob {
  0%, 60%, 100% { translate: 0 0; rotate: 0deg; }
  30% { translate: 0 -4px; rotate: -8deg; }
}

/* Drei Screenshots als leicht aufgefächertes Blatt */
.fan {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: clamp(36px, 5vw, 56px);
}

.fan-card {
  position: relative;
  width: min(29%, 288px);
  height: auto;
  border-radius: clamp(12px, 2.2vw, 26px);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-lift);
  transition: transform 0.6s var(--ease);
  animation: rise 0.9s var(--ease) both;
}

.fan-1 { transform: translate(7%, 5%) rotate(-7deg); }
.fan-2 { z-index: 2; width: min(32%, 322px); animation-delay: 0.08s; }
.fan-3 { transform: translate(-7%, 5%) rotate(7deg); animation-delay: 0.16s; }

.fan:hover .fan-1 { transform: translate(3%, 4%) rotate(-9deg); }
.fan:hover .fan-3 { transform: translate(-3%, 4%) rotate(9deg); }

@keyframes rise {
  from { opacity: 0; translate: 0 24px; }
}

/* Übersichtskarten */
.overview {
  max-width: var(--max);
  margin: clamp(48px, 7vw, 80px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}

.ov-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

.ov-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.ov-card img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  flex-shrink: 0;
}

.ov-body { display: flex; flex-direction: column; min-width: 0; }
.ov-name { font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.ov-tag { font-size: 0.8125rem; letter-spacing: -0.01em; color: var(--text-muted); line-height: 1.35; margin-top: 2px; }

.ov-arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: translate 0.25s var(--ease);
}

.ov-card:hover .ov-arrow { translate: 0 2px; }

/* ---------- App-Abschnitte ---------- */
.app {
  padding: 112px 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-watten, .app-dahoam { background: var(--bg-alt); }

/* Reihenfolge am Bildschirm: Text, Banner, Screenshots */
.app-inner { display: contents; }
.app-info { order: 1; }
.app-banner { order: 2; }
.gallery { order: 3; }
.shelf-nav { order: 4; }

.app-info,
.app-banner,
.shelf-nav {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--max);
}

.app-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 72px;
  margin-bottom: 64px;
}

.app-head {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.app-icon {
  width: 76px;
  height: 76px;
  border-radius: 17px;
  flex-shrink: 0;
  box-shadow: var(--shadow-soft);
}

.app-kicker {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.app h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.5vw, 2.625rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.app-lead {
  grid-column: 1;
  margin: 0 0 28px;
  font-size: 1.3125rem;
  line-height: 1.38;
  color: var(--text-muted);
}

.features {
  grid-column: 2;
  grid-row: 1 / span 3;
  list-style: none;
  margin: 0;
  padding: 6px 24px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.features li {
  position: relative;
  padding: 13px 0 13px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}

.features li:last-child { border-bottom: 0; }

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 16px;
  height: 16px;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.features strong { color: var(--text); font-weight: 600; }

.stores {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: block;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.store img { height: 44px; width: auto; }
.store:hover { opacity: 0.75; }

.app-banner {
  margin-bottom: 40px;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 1600 / 686;
  box-shadow: var(--shadow-lift);
}

.app-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Screenshots: wischbare Reihe über die volle Breite, Beginn bündig mit dem Inhalt */
.gallery {
  --inset: max(var(--gutter), calc((100% - var(--max)) / 2));
  width: 100%;
  display: flex;
  gap: 20px;
  padding: 8px var(--inset) 68px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding: 0 var(--inset);
  scrollbar-width: none;
  outline-offset: -2px;
}

.gallery::-webkit-scrollbar { display: none; }

.shot {
  flex: 0 0 auto;
  width: clamp(200px, 23vw, 260px);
  height: auto;
  border-radius: 22px;
  box-shadow: var(--shadow-lift);
  scroll-snap-align: start;
}

/* Vor/Zurück-Tasten (legt home.js an, nur mit Maus sinnvoll) */
.shelf-nav {
  display: none;
  justify-content: flex-end;
  gap: 10px;
  margin-top: -36px;
}

@media (hover: hover) and (pointer: fine) {
  .shelf-nav { display: flex; }
}

.shelf-nav[hidden] { display: none; }

.shelf-nav button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.shelf-nav button:disabled { opacity: 0.35; cursor: default; }

/* ---------- Kontakt ---------- */
.contact {
  padding: 96px var(--gutter);
  text-align: center;
}

.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 24px;
  border-radius: 32px;
  background:
    radial-gradient(70% 90% at 85% 0%, rgba(46, 179, 255, 0.28), transparent 70%),
    linear-gradient(140deg, var(--watten-primary), #003A5C);
  color: #fff;
  box-shadow: var(--shadow-lift);
}

.contact-suits { display: inline-flex; gap: 8px; margin-bottom: 20px; }
.contact-suits img { width: 24px; height: 24px; }

.contact h2 {
  margin: 0 auto 14px;
  max-width: 16em;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.8vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.contact p {
  margin: 0 0 28px;
  font-size: 1.1875rem;
  color: rgba(255, 255, 255, 0.82);
}

.contact .btn-primary { background: var(--surface); color: var(--watten-primary); }
.contact .btn-primary:hover { background: #fff; }

/* ---------- Footer ---------- */
.footer {
  padding: 0 var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 24px;
  font-size: 0.75rem;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  text-align: center;
}

.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; color: var(--text); }
.footer a:hover { text-decoration: underline; }

.footer-note {
  flex-basis: 100%;
  max-width: 720px;
}

/* ---------- Einblenden beim Scrollen ---------- */
.js .reveal {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.7s var(--ease) var(--delay, 0ms), translate 0.7s var(--ease) var(--delay, 0ms);
}

.js .reveal.in { opacity: 1; translate: none; }

.js .ov-card.reveal {
  transition: opacity 0.7s var(--ease) var(--delay, 0ms), translate 0.7s var(--ease) var(--delay, 0ms), transform 0.35s var(--ease), box-shadow 0.35s;
}

/* ---------- Tablet / Mobil ---------- */
@media (max-width: 980px) {
  .overview { grid-template-columns: minmax(0, 1fr); max-width: 560px; }

  .app { padding: 80px 0 72px; }
  .app-info {
    display: block;
    max-width: 640px;
    margin-bottom: 44px;
  }
  .features { margin-bottom: 28px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }

  .hero { padding-top: calc(var(--topbar-h) + 56px); padding-bottom: 72px; }
  .app-icon { width: 64px; height: 64px; border-radius: 14px; }
  .app-lead { font-size: 1.1875rem; }
  .features { padding: 4px 18px; }
  .app-banner { border-radius: 16px; margin-bottom: 28px; }
  .gallery { gap: 12px; }
  .shot { width: min(62vw, 240px); border-radius: 16px; }
  .contact { padding: 64px var(--gutter); }
  .contact-inner { padding: 64px 20px; border-radius: 24px; }
}

@media (max-width: 480px) {
  .installs {
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
    padding: 10px 18px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .installs { padding-inline: 12px; font-size: 0.8125rem; }
  .installs strong { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
}
