/* SoundPin – Verkaufsseite. Werte und Begründungen: Dokumente/DESIGN.md, Abschnitt „Website“. */

:root {
  --bg: #ffffff;
  --tile: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: #d2d2d7;
  --accent: #5e5ce6;
  --accent-press: #4a48cf;
  --accent-soft: rgba(94, 92, 230, 0.12);
  --grad: linear-gradient(90deg, #2f7bff 0%, #5e5ce6 52%, #9b5cf6 100%);

  /* Auf Apple-Geräten ist das SF Pro, sonst die Systemschrift – keine Schrift von fremden Servern */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius-tile: 28px;
  --radius-pill: 980px;
  --page: 1000px;
  --gutter: 22px;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, canvas { display: block; }

:focus-visible {
  outline: 3px solid rgba(94, 92, 230, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

section[id] { scroll-margin-top: 64px; }

.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.nav-inner {
  max-width: var(--page);
  height: 52px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font: 600 19px/1 var(--font-display);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand .pin-glyph { width: 22px; height: 22px; color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-links a:not(.btn) { color: var(--ink-2); }
.nav-links a:not(.btn):hover { color: var(--ink); text-decoration: none; }

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--accent-press); text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-small { min-height: 30px; padding: 0 14px; font-size: 13px; }
.btn-large { min-height: 54px; padding: 0 38px; font-size: 19px; }

.link-more { font-size: 17px; }
.link-more::after { content: " ›"; }

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: clamp(36px, 6vh, 80px) var(--gutter) 0;
}

.hero-title {
  margin: 0;
  font: 700 clamp(60px, 10vw, 112px)/1 var(--font-display);
  letter-spacing: -0.035em;
}

.hero-tagline {
  display: inline-block;
  margin: 10px 0 0;
  font: 600 clamp(28px, 3.8vw, 44px)/1.12 var(--font-display);
  letter-spacing: -0.025em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

.hero-lede {
  max-width: 600px;
  margin: 18px auto 0;
  color: var(--ink-2);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.42;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  margin-top: 30px;
}

.hero-meta { margin: 14px 0 0; color: var(--ink-3); font-size: 14px; }
/* Text liegt über der Leinwand, die per negativem Rand darunter ragt: die einfliegende Nadel kommt hinter ihm hervor */
.hero-cta, .hero-meta { position: relative; z-index: 1; }

.hero-stage {
  position: relative;
  max-width: 1120px;
  height: clamp(260px, min(62vw, 100svh - 430px), 560px);
  /* zieht das Bild unter den Kaufen-Knopf; die Leinwand ist durchsichtig und nimmt keine Klicks an */
  margin: max(-44px, -3vw) auto 0;
}

.hero-stage canvas {
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-stage.is-ready canvas { opacity: 1; }

.hero-fallback {
  display: none;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 220px;
  height: 220px;
}
.hero-stage.is-fallback canvas { display: none; }
.hero-stage.is-fallback .hero-fallback { display: block; }

/* ---------- Aussage ---------- */

.statement {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) var(--gutter);
  text-align: center;
}

.statement p {
  margin: 0;
  font: 600 clamp(28px, 4vw, 46px)/1.14 var(--font-display);
  letter-spacing: -0.025em;
}
.statement .muted { color: var(--ink-3); }

/* ---------- Funktionen ---------- */

.section-title {
  margin: 0 0 clamp(32px, 5vw, 56px);
  text-align: center;
  font: 700 clamp(40px, 6vw, 68px)/1.05 var(--font-display);
  letter-spacing: -0.035em;
}

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(36px, 5vw, 52px) clamp(24px, 4vw, 44px);
  border-radius: var(--radius-tile);
  background: var(--tile);
  text-align: center;
  overflow: hidden;
}
.tile-wide { grid-column: span 2; }

.tile h3 {
  margin: 0 0 12px;
  font: 700 clamp(26px, 2.8vw, 34px)/1.12 var(--font-display);
  letter-spacing: -0.028em;
}

.tile p {
  max-width: 46ch;
  margin: 0;
  color: var(--ink-2);
}

.tile-icon { width: 44px; height: 44px; margin-bottom: 20px; color: var(--accent); }

.facts {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
}
.facts li { padding: 10px 0; border-top: 1px solid var(--line); }
.facts li:first-child { border-top: 0; }

/* Menü-Nachbau: macOS-Menüleiste mit dem SoundPin-Menü (Texte wie in der App) */

.mac {
  position: relative;
  width: min(560px, 100%);
  margin-top: 40px;
  padding-bottom: 44px;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(120% 90% at 15% 10%, #c9d6ff 0%, transparent 60%),
    radial-gradient(100% 90% at 90% 100%, #d9c8fb 0%, transparent 60%),
    linear-gradient(160deg, #e3e6ff, #ece4fb);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 20px 50px -20px rgba(40, 40, 120, 0.35);
}

.menubar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  height: 30px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.mb-pin {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.12);
}
.mb-pin .pin-glyph { width: 17px; height: 17px; }

.menu {
  /* steht im Fluss, damit der Kasten mit dem Menü mitwächst (seit 20.10.2026 mit Lautsprecher-Abschnitt) */
  position: relative;
  width: 412px;
  margin: 4px 72px 0 auto;
  padding: 5px;
  border-radius: 10px;
  background: rgba(246, 246, 248, 0.86);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.2), 0 12px 32px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  line-height: 1.38;
  letter-spacing: -0.01em;
}

.m-head { padding: 4px 10px 1px; color: #8a8a8e; font-size: 11px; font-weight: 600; }
.m-item { position: relative; padding: 2px 10px 2px 24px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-item.on::before { content: "✓"; position: absolute; left: 9px; font-weight: 600; }
.m-item.hl { background: var(--accent); color: #fff; }
.m-item.dim { color: #a1a1a6; }
.m-key { position: absolute; right: 10px; color: #8a8a8e; }
.m-sep { height: 1px; margin: 5px 10px; background: rgba(0, 0, 0, 0.1); }

/* Ablauf: AirPods verbinden sich, macOS schaltet um, SoundPin stellt zurück */

.sequence {
  display: grid;
  gap: 8px;
  width: min(340px, 100%);
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 15px;
}

.sequence li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.sequence .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.sequence .is-wrong { color: var(--ink-3); }
.sequence .is-wrong .dot { background: #c7c7cc; }
.sequence .is-right { font-weight: 600; }
.sequence .is-right .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

@media (prefers-reduced-motion: no-preference) {
  .sequence[data-reveal] li { opacity: 0; transform: translateY(8px); }
  .sequence.is-visible li { animation: step-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
  .sequence.is-visible li:nth-child(2) { animation-delay: 0.45s; }
  .sequence.is-visible li:nth-child(3) { animation-delay: 0.9s; }
  .sequence.is-visible .is-wrong { animation-name: step-in, strike; animation-duration: 0.5s, 0.4s; animation-delay: 0.45s, 1.1s; }
}
@keyframes step-in { to { opacity: 1; transform: none; } }
@keyframes strike { to { opacity: 0.55; transform: none; } }

/* Verstärkung: Stufen wie im Menü, Wellenform mit Begrenzer-Linie */

.gain { width: min(640px, 100%); margin-top: 34px; }

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: #e3e3e8;
}

.seg button {
  min-width: 52px;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: 500 14px/1 var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.seg button:hover { background: rgba(255, 255, 255, 0.5); }
.seg button[aria-checked="true"] {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  color: var(--accent);
  font-weight: 600;
}

.wave {
  position: relative;
  height: 170px;
  margin-top: 26px;
}

.bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}

.bars i {
  flex: 1;
  min-height: 2px;
  border-radius: 3px;
  background: #3a3a3c;
  transition: height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease;
}
.bars i.limited { background: var(--accent); }

.ceiling {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px dashed rgba(94, 92, 230, 0.55);
}
.ceiling.top { top: 5.45%; }
.ceiling.bottom { bottom: 5.45%; }
.ceiling span {
  position: absolute;
  right: 0;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--tile);
  color: var(--accent);
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0;
}

.tile .readout {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 22px 0 0;
  max-width: none;
  font-size: 15px;
}
.readout b { color: var(--ink); margin-left: 6px; }

.tile .caption { margin-top: 8px; max-width: none; color: var(--ink-3); font-size: 13px; }

/* ---------- Kaufen ---------- */

.buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(96px, 13vw, 160px) var(--gutter);
  text-align: center;
}

/* Schatten als box-shadow unter der Icon-Fläche statt filter: drop-shadow – Safari zeichnete beim Filter ein helles
   Quadrat um das Bild (Robs Hinweis, 21.10.2026). Die Fläche sitzt im 1024er-Raster bei 824 px, Ecken 185 px. */
.buy-icon {
  position: relative;
  display: block;
  width: 144px;
  height: 144px;
}
.buy-icon::before {
  content: "";
  position: absolute;
  inset: 9.8%;
  border-radius: 22.5%;
  box-shadow: 0 16px 26px rgba(43, 54, 201, 0.22);
}
.buy-icon img { position: relative; width: 100%; height: 100%; }

.buy-title {
  margin: 22px 0 0;
  font: 700 clamp(44px, 6vw, 64px)/1.05 var(--font-display);
  letter-spacing: -0.035em;
}

.buy-sub { margin: 10px 0 0; color: var(--ink-2); font-size: 19px; }

.buy-price {
  margin: 26px 0 20px;
  font: 600 32px/1 var(--font-display);
  letter-spacing: -0.02em;
}

.buy-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  max-width: 640px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- Fragen ---------- */

.faq {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(96px, 12vw, 140px);
}

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

.faq summary {
  position: relative;
  padding: 22px 40px 22px 0;
  font: 600 19px/1.3 var(--font-display);
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background:
    linear-gradient(var(--accent), var(--accent)) center / 14px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 2px 14px no-repeat;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { margin: -6px 0 24px; max-width: 62ch; color: var(--ink-2); }

/* ---------- Fuß ---------- */

.footer {
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}
.footer p { margin: 4px 0; }
.footer a { color: var(--ink-2); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  margin-bottom: 12px;
}
.footer-legal button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 500 13px/1.4 var(--font);
  letter-spacing: -0.01em;
  cursor: pointer;
}
.footer-legal button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Rechtstexte als Dialog (Aufbau wie bei SnipDot, Optik der Seite) ---------- */

dialog.legal {
  width: min(720px, calc(100vw - 32px));
  max-height: min(86vh, 920px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-tile);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(20, 20, 60, 0.35);
  overflow: hidden;
}
dialog.legal[open] { display: flex; flex-direction: column; }
dialog.legal::backdrop {
  background: rgba(20, 20, 30, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
html:has(dialog.legal[open]) { overflow: hidden; }

.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0 32px;
}
.legal-eyebrow {
  margin: 0;
  color: var(--accent);
  font: 600 12px/1 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.legal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 50%;
  background: var(--tile);
  color: var(--ink);
  font: 400 22px/1 var(--font);
  cursor: pointer;
}
.legal-close:hover { background: #e8e8ed; }
dialog.legal h2 {
  margin: 0;
  padding: 6px 32px 14px;
  font: 700 clamp(26px, 4vw, 34px)/1.1 var(--font-display);
  letter-spacing: -0.028em;
}
.legal-body { padding: 0 32px 32px; overflow-y: auto; overscroll-behavior: contain; }
.legal-body h3 { margin: 22px 0 6px; font: 600 17px/1.3 var(--font-display); letter-spacing: -0.015em; }
.legal-body h3:first-child { margin-top: 4px; }
.legal-body p, .legal-body li { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.legal-body p + p { margin-top: 10px; }
.legal-body ul { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; padding-left: 1.2em; }
.legal-body li::marker { color: var(--accent); }
.legal-body .legal-date { margin-bottom: 12px; color: var(--ink-3); font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .legal-head { padding-left: 22px; }
  dialog.legal h2 { padding: 6px 22px 12px; }
  .legal-body { padding: 0 22px 26px; }
}

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .hero-stage { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  .bento { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tile-wide { grid-column: auto; }
  .mac { padding-bottom: 28px; }
  .menu { width: auto; margin: 4px 12px 0; }
  .seg button { min-width: 0; flex: 1; padding: 0 6px; }
  .seg { display: flex; width: 100%; }
  .wave { height: 140px; }
}
