/*
  Schul Star Landing – minimal, performant, responsive.
*/

:root {
  color-scheme: light dark;
  --bg: #0b1020;
  --bg-elev: #121831;
  --text: #e9ecf1;
  --muted: #b6c0d3;
  --brand: #8b5cf6;   /* default brand ~ violet */
  --brand-2: #6366f1; /* default brand2 ~ indigo */
  --accent: #69fbd3;
  --card: #0e1530;
  --border: rgba(255,255,255,.1);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  /* Gradient theme endpoints (match app Theme backgroundStyle intensities) */
  --grad-a: #6366f1; /* indigo */
  --grad-b: #8b5cf6; /* violet */
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --bg-elev: #ffffff;
    --text: #0d1321;
    --muted: #41506b;
    --card: #ffffff;
    --border: rgba(0,0,0,.08);
    --shadow: 0 8px 24px rgba(0,0,0,.08);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 80% -10%, color-mix(in oklab, var(--grad-b) 30%, transparent), transparent 60%),
    linear-gradient(180deg,
      color-mix(in oklab, var(--grad-a) 22%, transparent),
      color-mix(in oklab, var(--grad-b) 40%, transparent)
    ),
    var(--bg);
  line-height: 1.5;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; backdrop-filter: saturate(1.1) blur(8px);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand span { letter-spacing: .3px; }
.brand__icon { width: 28px; height: 28px; border-radius: 6px; display: block; background: transparent; }
.brand__icon--dark { display: none; }
@media (prefers-color-scheme: dark) {
  .brand__icon--light { display: none; }
  .brand__icon--dark { display: block; }
}

.nav-toggle { display: none; }
.nav ul { display: flex; list-style: none; gap: 16px; margin: 0; padding: 0; }
.nav a { padding: 8px 10px; border-radius: 8px; }
.nav a:hover { background: var(--border); }
.mode-toggle { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); }
  .nav ul { position: absolute; right: 16px; top: 58px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: none; flex-direction: column; min-width: 200px; }
  .nav ul.open { display: flex; }
}

/* Manual override for color scheme */
html[data-color-scheme="light"] {
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --text: #0d1321;
  --muted: #41506b;
  --card: #ffffff;
  --border: rgba(0,0,0,.08);
  --shadow: 0 8px 24px rgba(0,0,0,.08);
}
html[data-color-scheme="dark"] {
  --bg: #0b1020;
  --bg-elev: #121831;
  --text: #e9ecf1;
  --muted: #b6c0d3;
  --card: #0e1530;
  --border: rgba(255,255,255,.1);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  padding: 64px 20px; max-width: 1120px; margin: 0 auto;
}

.hero__content h1 { font-size: clamp(28px, 4vw, 48px); line-height: 1.1; margin: 0 0 12px; }
.lead { font-size: clamp(16px, 1.7vw, 20px); color: var(--muted); margin: 0 0 20px; }

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.cta { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); border: 1px solid color-mix(in oklab, var(--brand) 60%, black 10%); }
.cta--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.cta--small { padding: 8px 12px; font-weight: 600; }

/* "Kommt bald" badge */
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; letter-spacing: .3px; border: 1px solid var(--border); }
.badge--soon { background: color-mix(in oklab, var(--brand) 15%, transparent); color: var(--text); }

/* Device badges next to CTA */
.device-badges { display: inline-flex; gap: 8px; align-items: center; margin-left: 4px; }

/* Disabled store badge style */
.store-badge--disabled { filter: grayscale(1) opacity(.7); pointer-events: none; cursor: not-allowed; }

.store-badges { display: flex; gap: 12px; margin-top: 12px; align-items: center; }
.store-badge { display: inline-flex; align-items: center; line-height: 0; }
.store-badge img { height: 44px; width: auto; display: block; }
.store-badge .badge--dark { display: none; }
@media (prefers-color-scheme: dark) {
  .store-badge .badge--light { display: none; }
  .store-badge .badge--dark { display: block; }
}

.hero__visual { display: flex; justify-content: center; }
.hero__logo { width: 220px; height: 220px; border-radius: 36px; border: none; box-shadow: none; background: transparent; object-fit: cover; }
.hero__logo-rotator { position: relative; width: 220px; height: 220px; }
.hero__logo--slide { position: absolute; inset: 0; opacity: 0; transition: opacity 2s ease; }
.hero__logo--active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero__logo--slide { transition: none; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 42px; }
}

.section { padding: 56px 20px; max-width: 1120px; margin: 0 auto; }
.section h2 { font-size: clamp(22px, 3vw, 34px); margin: 0 0 22px; }

.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 18px; transition: transform .22s cubic-bezier(.2,.6,.2,1), box-shadow .22s ease, border-color .22s ease, background-color .22s ease; transform-origin: center; }
.feature .icon { font-size: 26px; }
.feature h3 { margin: 10px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); }

/* Subtle hover/focus lift for panels */
.feature:hover,
.feature:focus-within {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 34px rgba(0,0,0,.16);
  border-color: color-mix(in oklab, var(--brand) 50%, var(--border));
}

@media (prefers-reduced-motion: reduce) {
  .feature { transition: border-color .2s ease, background-color .2s ease; }
  .feature:hover,
  .feature:focus-within { transform: none; }
}

@media (max-width: 980px) { .features__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .features__grid { grid-template-columns: 1fr; } }

.screens { position: relative; --gap: 18px; }
.screens__tabs { display: inline-flex; gap: 8px; margin-bottom: 12px; border: 1px solid var(--border); padding: 4px; border-radius: 10px; background: color-mix(in oklab, var(--bg-elev) 90%, transparent); }
.screens__tab { appearance: none; border: 0; background: transparent; color: var(--text); padding: 6px 10px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.screens__tab[aria-selected="true"] { background: color-mix(in oklab, var(--brand) 16%, transparent); }
.screens__viewport {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px; /* Platz für Masken/Buttons */
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 48px), transparent);
  scrollbar-gutter: stable both-edges;
}
.screens__track { display: flex; gap: var(--gap); }
.screen {
  margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  flex: 0 0 calc((100% - (var(--gap) * 2)) / 3);
  scroll-snap-align: start;
}
.screen__img { display: block; width: 100%; height: auto; }
/* Hide captions in the screens gallery */
.screen figcaption { display: none; }

/* On phone widths, show 1 screen per view */
@media (max-width: 640px) {
  .screen { flex: 0 0 100%; }
}

.gallery-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg-elev) 86%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 5;
}
.gallery-btn[hidden] { display: none; }
.gallery-btn--left { left: 6px; }
.gallery-btn--right { right: 6px; }
.hint { color: var(--muted); margin-top: 10px; }

@media (max-width: 980px) { .screens__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .screens__grid { grid-template-columns: 1fr; } }

.faq details { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }

.site-footer { border-top: 1px solid var(--border); margin-top: 28px; }
.footer__inner { max-width: 1120px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.site-footer a { color: inherit; margin-left: 12px; }
.legal { max-width: 1120px; margin: 0 auto; line-height: 1.7; hyphens: auto; overflow-wrap: anywhere; }
.legal h1, .legal h2, .legal h3, .legal h4 { line-height: 1.25; }
.legal h1 { font-size: clamp(22px, 3vw, 34px); margin: 0 0 22px; }
.legal h2 { font-size: clamp(22px, 3vw, 34px); margin: 0 0 22px; }
.legal h3 { font-size: clamp(18px, 2.2vw, 22px); }
.legal p { margin: 10px 0; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal ul, .legal ol { padding-left: 1.25em; margin: 8px 0 12px 0; }
.legal li { margin: 6px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.legal th, .legal td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal tr:nth-child(even) { background: color-mix(in oklab, var(--bg-elev) 90%, transparent); }
.legal blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--brand); background: color-mix(in oklab, var(--bg-elev) 86%, transparent); }
.legal code, .legal pre { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; }
.legal pre { padding: 10px; overflow: auto; }
.theme-oceanBlue {
  --grad-a: #0ea5e9; /* blue-500 */
  --grad-b: #14b8a6; /* teal-500 */
  --brand: #0ea5e9;
  --brand-2: #14b8a6;
}

.theme-dusk {
  --grad-a: #6366f1; /* indigo-500 */
  --grad-b: #8b5cf6; /* violet-500 */
  --brand: #8b5cf6;
  --brand-2: #6366f1;
}

.theme-emerald {
  --grad-a: #10b981; /* emerald-500 */
  --grad-b: #0ea5e9; /* blue-500 */
  --brand: #10b981;
  --brand-2: #0ea5e9;
}
