/* Farben, Schrift und Rundungen wie in der App (app/src/lib/theme.tsx). */
@font-face {
  font-family: 'Jua';
  src: url('assets/Jua.ttf') format('truetype');
  font-display: swap;
}

:root {
  --chassis: #232730;
  --shutter: #e63946;
  --coral: #f06543;
  --amber: #f4a261;
  --teal: #2a9d8f;
  --gold: #f4c542;

  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface2: #eae5da;
  --border: #ddd7cb;
  --text: #232730;
  --muted: #636b78;
  --tile: #e2dccf;
  --store-bg: var(--chassis);
  --store-fg: #f4f1ea;
  --band-bg: var(--surface);
  --band-muted: var(--muted);
  --band-kicker: var(--shutter);
  /* Bilder, die es in beiden Designs gibt: .only-light / .only-dark */
  --show-light: block;
  --show-dark: none;

  --gradient: linear-gradient(120deg, var(--shutter), var(--coral) 55%, var(--amber));
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --max: 1120px;
  color-scheme: light;
}

/* Dunkel: nach dem Gerät, ausser der Theme-Knopf hat etwas anderes gewählt (data-theme, siehe theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16191f;
    --surface: #1e232b;
    --surface2: #272d37;
    --border: #323b49;
    --text: #f4f1ea;
    --muted: #8e98a8;
    --tile: #272d37;
    --store-bg: #f4f1ea;
    --store-fg: var(--chassis);
    --band-bg: var(--chassis);
    --band-muted: #a7b0bf;
    --band-kicker: var(--amber);
    --show-light: none;
    --show-dark: block;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #16191f;
  --surface: #1e232b;
  --surface2: #272d37;
  --border: #323b49;
  --text: #f4f1ea;
  --muted: #8e98a8;
  --tile: #272d37;
  --store-bg: #f4f1ea;
  --store-fg: var(--chassis);
  --band-bg: var(--chassis);
  --band-muted: #a7b0bf;
  --band-kicker: var(--amber);
  --show-light: none;
  --show-dark: block;
  color-scheme: dark;
}

.only-light { display: var(--show-light); }
.only-dark { display: var(--show-dark); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Jua', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.1; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

.icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Kopfzeile */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 26px; }
.brand img { width: 44px; height: 44px; }
.top nav { display: flex; gap: 22px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--text); }
.top-right { display: flex; align-items: center; gap: 22px; }
.theme-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.theme-toggle:hover { transform: rotate(-12deg); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle .icon { width: 22px; height: 22px; }

/* Store-Knöpfe */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 26px 10px 20px;
  border-radius: 999px;
  background: var(--store-bg);
  color: var(--store-fg);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(35, 39, 48, 0.25); }
.store:active { transform: scale(0.97); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex-shrink: 0; }
/* Noch nicht im Store: gleicher Knopf, aber blass und nicht klickbar, mit Schild. */
.store.soon { position: relative; cursor: default; }
.store.soon > svg, .store.soon > div { opacity: 0.5; }
.store.soon:hover { transform: none; box-shadow: none; }
.store.soon em {
  position: absolute;
  top: -10px;
  right: -6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-style: normal;
  font-size: 13px;
  transform: rotate(6deg);
}
.store small { display: block; font-size: 13px; opacity: 0.7; line-height: 1.1; }
.store span { display: block; font-size: 20px; line-height: 1.15; }

/* Start */
.hero { padding: 40px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 22px;
}
.pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--shutter); animation: rec 1.6s ease-in-out infinite; }
@keyframes rec { 50% { opacity: 0.25; } }
.hero h1 { font-size: clamp(44px, 7vw, 78px); letter-spacing: -0.01em; }
.grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 21px; color: var(--muted); margin: 22px 0 32px; max-width: 30em; }
.hero .note { margin-top: 16px; font-size: 15px; color: var(--muted); }

/* Tagesraster: 24 Stunden füllen sich nacheinander, wie das Widget in der App. */
.day {
  position: relative;
  background: var(--surface);
  border-radius: 36px;
  padding: 28px;
  box-shadow: 0 30px 60px -30px rgba(35, 39, 48, 0.35);
}
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.day-head b { font-weight: 400; font-size: 54px; color: var(--shutter); line-height: 1; }
.day-head b small { font-size: 26px; color: var(--muted); }
.day-head span { color: var(--muted); font-size: 16px; text-align: right; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.grid i {
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--tile);
  position: relative;
  overflow: hidden;
}
.grid i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c, var(--shutter));
  transform: scale(0);
  border-radius: inherit;
  animation: fill 12s cubic-bezier(0.3, 1.4, 0.5, 1) infinite;
  animation-delay: var(--d);
}
.grid i.skip::after { display: none; }
@keyframes fill {
  0% { transform: scale(0); }
  4%, 88% { transform: scale(1); }
  96%, 100% { transform: scale(0); }
}
.day-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--surface2);
}
.play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 3px; }
.day-foot p { font-size: 17px; }
.day-foot p small { display: block; color: var(--muted); font-size: 14px; }
.sticker {
  position: absolute;
  right: -18px;
  top: -22px;
  transform: rotate(8deg);
  background: var(--chassis);
  color: #f4f1ea;
  border-radius: var(--r-md);
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 17px;
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}
.sticker .icon { color: var(--coral); width: 22px; height: 22px; fill: var(--coral); stroke: var(--coral); }

/* Abschnitte */
section { padding: 88px 0; }
.kicker { color: var(--shutter); font-size: 17px; margin-bottom: 12px; }
.title { font-size: clamp(34px, 5vw, 52px); max-width: 16em; }
.intro { color: var(--muted); font-size: 20px; margin-top: 16px; max-width: 34em; }

/* So geht's */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; counter-reset: step; }
.step { background: var(--surface); border-radius: var(--r-lg); padding: 30px 26px; }
.step-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--shutter);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.step:nth-child(2) .step-icon { background: var(--coral); }
.step:nth-child(3) .step-icon { background: var(--amber); }
.step-icon .icon { width: 32px; height: 32px; }
.step h3 { font-size: 26px; margin-bottom: 10px; }
.step h3::before { counter-increment: step; content: counter(step) '. '; color: var(--muted); }
.step p { color: var(--muted); }

/* Funktionen */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.feature { display: flex; gap: 16px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); }
.feature .badge {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--surface2);
  color: var(--shutter);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.feature .badge .icon { width: 24px; height: 24px; }
.feature h3 { font-size: 21px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 16px; }

/* Widgets – immer dunkler Grund, wie die Bilder selbst */
.widgets-band { background: var(--band-bg); border-radius: 40px; padding: 72px 0; margin: 0 20px; }
.widgets-band .intro { color: var(--band-muted); }
.widgets-band .kicker { color: var(--band-kicker); }
.shelf {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 44px;
  align-items: center;
}
.shelf img { border-radius: 28px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7); transition: transform 0.2s ease; }
.shelf img:hover { transform: translateY(-4px) rotate(-1deg); }
.shelf .wide { grid-column: span 2; }

/* LoopCam+ */
.plus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--surface);
  border-radius: 40px;
  padding: 52px;
  position: relative;
  overflow: hidden;
}
.plus::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--amber));
}
.crown { color: var(--gold); display: inline-flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 14px; }
.crown .icon { width: 30px; height: 30px; fill: var(--gold); stroke: var(--gold); }
.plus ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.plus li { display: flex; gap: 12px; align-items: center; font-size: 18px; }
.plus li .icon { width: 22px; height: 22px; color: var(--teal); }

/* Datenschutz kurz */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.trust div { border: 2px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.trust .icon { color: var(--teal); margin-bottom: 12px; }
.trust h3 { font-size: 21px; margin-bottom: 6px; }
.trust p { color: var(--muted); font-size: 16px; }
.textlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 28px; color: var(--shutter); text-decoration: none; }
.textlink .icon { width: 20px; height: 20px; }
.textlink:hover { text-decoration: underline; }

/* Schluss */
.cta { text-align: center; padding-bottom: 110px; }
.cta img { width: 110px; height: 110px; margin: 0 auto 26px; }
.cta .title { margin: 0 auto; }
.cta .intro { margin: 16px auto 34px; }
.cta .stores { justify-content: center; }

footer { border-top: 2px solid var(--border); padding: 32px 0 44px; color: var(--muted); font-size: 16px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { display: flex; gap: 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* Unterseiten (Datenschutz) */
.page { max-width: 760px; padding-top: 32px; padding-bottom: 96px; }
.page h1 { font-size: clamp(38px, 6vw, 56px); margin-bottom: 12px; }
.page h2 { font-size: 26px; margin: 40px 0 14px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 22px 24px; }
.card p + p { margin-top: 12px; }
.card p, .card li { line-height: 1.55; }
.card ul { margin: 0; padding-left: 20px; }

@media (max-width: 900px) {
  .hero .wrap, .plus { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; }
  .day { max-width: 460px; }
  .steps, .features, .trust { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: 1fr 1fr; }
  .plus { padding: 36px 24px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .top nav { display: none; }
  section { padding: 64px 0; }
  .widgets-band { margin: 0 10px; border-radius: 28px; padding: 52px 0; }
  .shelf { gap: 12px; }
  .shelf img { border-radius: 18px; }
  .day { padding: 20px; border-radius: 28px; }
  .grid { gap: 7px; }
  .grid i { border-radius: 9px; }
  .sticker { right: -6px; }
  .store { flex: 1 1 200px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .grid i::after { animation: none; transform: scale(1); }
  .pill i { animation: none; }
  html { scroll-behavior: auto; }
}
