/* CSS Reset (subset) */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif; color: #0f172a; background: #f8fafc; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:root {
  /* Dark indigo palette harmonizing with #403cca */
  --bg: #0b0f24;
  --card: #10183d;
  --text: #e6e9f4;
  --muted: #a0a7c8;
  --primary: #8f89ff; /* violet */
  --primary-ink: #0d0a33;
}

#page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(64,60,202,0.18), transparent 60%),
              radial-gradient(900px 460px at 20% -20%, rgba(139,92,246,0.14), transparent 60%),
              var(--bg);
}

.container { width: min(1120px, 92%); margin: 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; backdrop-filter: saturate(140%) blur(8px); background: color-mix(in oklab, var(--bg) 88%, transparent); border-bottom: 1px solid rgba(255,255,255,0.06); z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.18); }
.brand-name { font-weight: 800; letter-spacing: 0.06em; color: var(--text); text-transform: uppercase; font-size: 20px; }

.top-actions { display: inline-flex; align-items: center; gap: 12px; }
.top-actions > .btn { margin-left: 0; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid rgba(255,255,255,0.18); border-radius: 16px; background: color-mix(in oklab, var(--bg) 85%, transparent); box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 6px 14px rgba(0,0,0,0.25); overflow: hidden; }
.lang-switch .btn { margin-left: 0; }
.lang-btn { border-radius: 999px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; line-height: 1; background: transparent; box-shadow: none; color: var(--muted); cursor: pointer; transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .1s ease; }
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active, .lang-btn[aria-pressed="true"] { background: linear-gradient(180deg, #7a75ee, #5953de 60%, #4742d0); color: #eef0ff; box-shadow: 0 4px 12px rgba(64,60,202,0.3), 0 0 0 1px rgba(255,255,255,0.06) inset; }
.lang-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #b9b6ff, 0 4px 12px rgba(64,60,202,0.25); }

/* a11y util */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; font-weight: 600; border: 1px solid rgba(255,255,255,0.14); color: var(--text); background: #171e3b; box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 6px 18px rgba(2,6,23,0.4); transition: transform .08s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 10px 22px rgba(2,6,23,0.5); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(180deg, #6e69e6, #4f49d7 60%, #403cca); color: #eef0ff; border: none; box-shadow: 0 8px 26px rgba(64,60,202,0.32), 0 1px 0 rgba(255,255,255,0.06) inset; }
.btn-primary:hover { background: linear-gradient(180deg, #7a75ee, #5953de 60%, #4742d0); box-shadow: 0 10px 30px rgba(64,60,202,0.4), 0 1px 0 rgba(255,255,255,0.06) inset; }
.btn-primary:active { transform: translateY(0); filter: saturate(96%); }

/* Fixed widths to avoid layout shift when language changes */
  .btn-fixed { min-width: 120px; text-align: center; justify-content: center; }
  .btn-icon-only { gap: 8px; }
  .btn-icon { width: 18px; height: 18px; display: none; }
  .btn-label { display: inline; }
.btn.lang-btn { width: 48px; height: 30px; padding: 0; border: none; border-radius: 999px; }

/* Main (hero) */
.site-main { display: grid; place-items: center; align-items: stretch; min-height: 0; }
.hero { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 40px; padding: 20px 0 20px; min-height: 0; }
.hero-copy h1 { margin: 0 0 12px; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.08; color: var(--text); text-transform: uppercase; letter-spacing: 0.02em; }
.hero-copy p { margin: 0; color: color-mix(in oklab, var(--muted) 90%, white); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.65; }

.hero-media { position: relative; height: min(84vh, 820px); display: grid; place-items: center; overflow: visible; }
.shot { position: absolute; width: auto; height: 92%; aspect-ratio: 9/19.5; border-radius: 28px; background: linear-gradient(180deg, #0f172a, #0b1020); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 6px rgba(255,255,255,0.04) inset; }
.shot-front { left: 14%; top: 4%; z-index: 2; }
.shot-back { right: 6%; top: 12%; height: 80%; filter: blur(0.2px) saturate(90%); opacity: 0.9; }
/* Preview image override: show image without container box styling */
.shot.is-preview {
  position: static;
  left: auto;
  top: auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,0.08); background: color-mix(in oklab, var(--bg) 92%, transparent); position: relative; z-index: 1; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-size: 14px; color: var(--muted); }
.footer-nav { display: flex; align-items: center; gap: 16px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); }

/* CTA row */
.cta-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.btn-secondary { background: rgba(255,255,255,0.02); color: var(--text); border: 1px solid rgba(255,255,255,0.14); box-shadow: none; }
.btn-secondary:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.22); }
.lang-switch .lang-btn.is-active,
.lang-switch .lang-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #7a75ee, #5953de 60%, #4742d0) !important;
  color: #eef0ff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(64,60,202,0.3), 0 0 0 1px rgba(255,255,255,0.06) inset !important;
}
/* Fallback: mark active language purely via html[lang] attribute (works even if JS fails) */
html[lang="de"] .lang-switch .lang-btn[data-lang="de"],
html[lang="en"] .lang-switch .lang-btn[data-lang="en"] {
  background: linear-gradient(180deg, #7a75ee, #5953de 60%, #4742d0);
  color: #eef0ff;
  border: none;
  box-shadow: 0 4px 12px rgba(64,60,202,0.3), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.app-badge { line-height: 0; display: inline-block; box-shadow: 0 6px 16px rgba(0,0,0,0.35); transform-origin: center; transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, filter .25s ease; cursor: pointer; -webkit-user-select: none; user-select: none; }
.app-badge:hover, .app-badge:focus-visible { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px rgba(0,0,0,0.46), 0 2px 6px rgba(64,60,202,0.25); filter: brightness(1.02) saturate(1.05); }
.app-badge:active { transform: scale(0.99); box-shadow: 0 6px 16px rgba(0,0,0,0.35); filter: none; }
.badge-appstore { display: block; width: clamp(150px, 44vw, 180px); height: auto; pointer-events: none; }

/* Map embed consent + iframe */
.map-consent {
  background: var(--card);
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 12px;
  padding: 16px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}
.map-consent .actions { display: flex; gap: 8px; align-items: center; }
.map-iframe {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(2,6,23,0.36);
}

/* Contact form status */
.form-status { margin-top: 8px; font-size: 14px; color: var(--muted); }
.form-status.is-error { color: #ff9aa2; }
.form-status.is-success { color: #a7f3d0; }

@media (prefers-reduced-motion: reduce) {
  .app-badge { transition: none; }
  .app-badge:hover, .app-badge:focus-visible, .app-badge:active { transform: none; filter: none; }
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 2px solid #b9b6ff; outline-offset: 2px; border-radius: 10px; }

/* Responsive adjustments */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 12px; min-height: 0; padding: 0; }
  .hero-media { order: -1; height: auto; }
  .shot-front { left: 10%; }
  /* Keine Zuschnitte auf mobilen Ansichten */
  .shot.is-preview { height: auto; clip-path: none; }
}




/* Features */
.features { padding: 36px 0 56px; }
.features h2 { margin: 0 0 16px; font-size: clamp(24px, 3vw, 36px); color: var(--text); letter-spacing: 0.01em; }
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card { background: var(--card); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; box-shadow: 0 10px 26px rgba(2,6,23,0.36), 0 1px 0 rgba(255,255,255,0.04) inset; }
.feature-title { margin: 0 0 6px; font-size: 16px; line-height: 1.3; color: #eef0ff; font-weight: 700; }
.feature-desc { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }

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

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* Small-screen refinements */
@media (max-width: 640px) {
  /* Header: allow wrapping and reduce gaps */
  .header-inner { flex-wrap: wrap; row-gap: 10px; }
  .top-actions { gap: 8px; }
  .btn-fixed { min-width: auto; }
  .btn.lang-btn { height: 36px; }

  /* Hero: fine-tune phone mockup positions */
  .hero { padding: 0; gap: 10px; }
  .hero-media { height: auto; }
  .shot-front { left: 6%; }
  .shot-back { right: 2%; }
  /* Kein Zuschnitt auf sehr kleinen Screens */
  .shot.is-preview { height: auto; clip-path: none; }

  /* Features card spacing */
  .feature-card { padding: 14px; }
  .feature-desc { line-height: 1.7; }
}

@media (max-width: 420px) {
  /* Simplify visual density on very small screens */
  .shot-back { display: none; }
}

@media (max-width: 560px) {
  /* Compress header content on very narrow devices */
  .brand-logo { width: 32px; height: 32px; }
  .brand-name { display: inline; }
  /* Turn contact button into icon-only on small screens */
  .btn-icon-only .btn-icon { display: inline-block; }
  .btn-icon-only .btn-label { display: none; }
}

@media (max-width: 600px) {
  /* Footer: stack and allow wrapping */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-nav { flex-wrap: wrap; row-gap: 8px; }
}