/* ═══════════════════════════════════════════════
   Sainkey Landing Page — Mobile First
   ═══════════════════════════════════════════════ */

:root {
  --bg-dark: #0C0F14;
  --bg-light: #F2F2F7;
  --surface: #13171E;
  --surface-light: #FFFFFF;
  --border: #252A33;
  --border-light: #D1D1D6;
  --text: #E8E6E1;
  --text-dark: #1C1C1E;
  --text-muted: #70747C;
  --text-muted-light: #8E8E93;
  --accent: #7FBA3A;
  --accent2: #4A8FE7;
  --danger: #D45A6B;
  --warn: #E8923A;
  --ok: #3CC9A3;

  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;

  --max-width: 1120px;
  --section-pad: 80px 20px;
}

/* ─── Theme Toggle Button ─── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent2); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ─── Light Theme ─── */
[data-theme="light"] {
  --bg-dark: #F2F2F7;
  --surface: #FFFFFF;
  --border: #D1D1D6;
  --text: #1C1C1E;
  --text-muted: #8E8E93;
}
[data-theme="light"] .nav {
  background: rgba(242, 242, 247, 0.85);
  border-bottom-color: var(--border);
}
[data-theme="light"] .hero h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
[data-theme="light"] .sankey-hero text[fill="#E8E6E1"] { fill: #1C1C1E; }
[data-theme="light"] .sankey-hero text[fill="#70747C"] { fill: #8E8E93; }
[data-theme="light"] .device-frame { border-color: var(--border); background: #E8E8ED; }
[data-theme="light"] .event-teaser { background: linear-gradient(135deg, #FFFFFF 0%, #F2F2F7 100%); }
[data-theme="light"] .btn-ghost { border-color: var(--border); color: var(--text-muted); }
[data-theme="light"] .btn-ghost:hover { border-color: var(--accent2); color: var(--text); }
[data-theme="light"] .badge { border-color: var(--border); color: var(--text-muted); }
[data-theme="light"] .newsletter-form input[type="email"] {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
[data-theme="light"] .btn-sm { background: var(--accent2); color: #fff; border: none; }
[data-theme="light"] .sankey-band { opacity: 0.35 !important; }
[data-theme="light"] .sankey-band.band-1 { fill: #4A7FD0; }
[data-theme="light"] .sankey-band.band-2 { fill: #C88030; }
[data-theme="light"] .sankey-band.band-3 { fill: #6A5AA0; }
[data-theme="light"] .sankey-band.band-4 { fill: #B04050; }

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent2); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent2);
  color: #fff;
  box-shadow: 0 4px 18px rgba(74, 143, 231, 0.3);
}
.btn-primary:hover {
  background: #5a9bf0;
  box-shadow: 0 8px 28px rgba(74, 143, 231, 0.45);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent2);
  color: var(--text);
  box-shadow: 0 0 16px rgba(74, 143, 231, 0.15);
}
.btn-sm { padding: 8px 20px; font-size: 13px; border-radius: 50px; }

/* ═══ NAV ═══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ═══ HERO ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 60px;
  text-align: center;
  gap: 48px;
  background: linear-gradient(170deg, #0a0e15 0%, #0f1520 40%, var(--bg-dark) 100%);
  overflow: hidden;
}
[data-theme="light"] .hero {
  background: linear-gradient(170deg, #ffffff 0%, #eef4fb 40%, var(--bg-dark) 100%);
}
#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-content, .hero-visual { position: relative; z-index: 1; }
.hero-content { max-width: 600px; }
.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-platforms {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.platform-badges { display: flex; gap: 8px; }
.badge {
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hero Sankey SVG */
.hero-visual {
  width: 100%;
  max-width: 600px;
}
.sankey-hero { width: 100%; height: auto; }

/* Sankey animations */
.sankey-node {
  opacity: 0;
  animation: fadeInNode 0.6s ease forwards;
}
.node-gehalt { animation-delay: 0.2s; }
.node-invest { animation-delay: 1.0s; }
.node-sparen { animation-delay: 1.3s; }
.node-vertraege { animation-delay: 1.6s; }
.node-konsum { animation-delay: 1.9s; }

.sankey-band {
  opacity: 0;
  animation: flowIn 0.8s ease forwards;
}
.band-1 { animation-delay: 0.6s; }
.band-2 { animation-delay: 0.9s; }
.band-3 { animation-delay: 1.2s; }
.band-4 { animation-delay: 1.5s; }

@keyframes fadeInNode {
  from { opacity: 0; transform: scaleY(0.5); }
  to { opacity: 1; transform: scaleY(1); }
}
@keyframes flowIn {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: var(--band-opacity, 0.5); clip-path: inset(0 0 0 0); }
}
[data-theme="light"] .sankey-hero { --band-opacity: 0.35; }

/* ═══ SECTIONS (shared) ═══ */
section {
  padding: var(--section-pad);
}
section h2 {
  font-size: clamp(24px, 4vw, 36px);
  text-align: center;
  margin-bottom: 48px;
}

/* ═══ USE CASES ═══ */
.use-cases {
  background: var(--bg-light);
  color: var(--text-dark);
}
.use-cases h2 { color: var(--text-dark); }
.cards-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.card {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}
.card-icon { margin-bottom: 16px; }
.card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.card p {
  font-size: 15px;
  color: var(--text-muted-light);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ═══ SCREENSHOTS ═══ */
.screenshots {
  background: var(--bg-dark);
  overflow: hidden;
}
[data-theme="light"] .screenshots { background: var(--bg-light); }
.screenshot-scroll {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 40px 20px;
  max-width: calc(var(--max-width) + 80px);
  margin: 0 auto;
  align-items: flex-end;
}
.screenshot-scroll::-webkit-scrollbar { display: none; }
.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
}
.screenshot-caption {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Device frames */
.device-frame {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.device-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.device-frame.dark-frame { border-color: #252A33; }
.device-frame.light-frame { border-color: #D1D1D6; }
[data-theme="light"] .device-frame { box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
[data-theme="light"] .device-frame:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.device-frame.desktop { width: 420px; }
.device-frame.mobile { width: 200px; }
.device-screen { width: 100%; }
.device-screen svg { display: block; width: 100%; height: auto; }

/* ═══ FEATURES ═══ */
.features {
  background: var(--bg-light);
  color: var(--text-dark);
}
.features h2 { color: var(--text-dark); }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.feature-card {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.15s, box-shadow 0.15s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border-color: rgba(74, 143, 231, 0.3);
}
.feature-icon { flex-shrink: 0; margin-top: 2px; }
.feature-card h4 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--text-dark);
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted-light);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══ EVENT TEASER ═══ */
.event-teaser {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-dark) 100%);
  text-align: center;
  padding: var(--section-pad);
}
.event-inner {
  max-width: 520px;
  margin: 0 auto;
}
.event-date {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(74, 143, 231, 0.15);
  color: var(--accent2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.event-teaser h2 {
  margin-bottom: 12px;
}
.event-teaser p {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 16px;
}

/* ═══ NEWSLETTER ═══ */
.newsletter {
  background: var(--bg-dark);
  text-align: center;
  padding: var(--section-pad);
}
.newsletter-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 28px;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input:focus { border-color: var(--accent2); }
.newsletter-privacy {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ═══ FOOTER ═══ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }
.footer-credit {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-credit a { color: var(--accent2); }

/* ═══ SCROLL REVEAL ═══ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
