/* ──────────────────────────────────────────────────────────────
   Bandycal · Content-Seiten (Landingpages & Ratgeber)
   Farbwelt und Typografie identisch zu Startseite / Handbuch.
   ────────────────────────────────────────────────────────────── */

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

:root {
  --bg:       #0a0a0a;
  --surface:  #141414;
  --surface2: #1a1a1a;
  --border:   rgba(255,255,255,0.08);
  --text:     #F5F5F5;
  --muted:    #8f8f94;
  --subtle:   #3a3a3e;
  --amber:    #F59E0B;
  --amber-l:  #FBBF24;
  --amber-d:  #D97706;
  --green:    #22C55E;
  --red:      #EF4444;

  /* Hoehe der fixen Topbar: 12px + 38px + 12px + 1px Border.
     .topbar-in ist auf 38px festgenagelt, damit der Wert nicht driftet. */
  --topbar-h: 63px;
}

html {
  scroll-behavior: smooth;
  /* Beide Clips werden gebraucht: der auf html propagiert zum Viewport,
     aber erst der auf body faengt die Ueberbreite der Phone-Stage ab
     (sonst scrollt die Seite bei 768px/Querformat wirklich horizontal).
     Der Clip war NICHT die Ursache des Topbar-Bugs — nachgemessen: er
     clippt den ::before-Deckstreifen nicht weg. */
  overflow-x: clip;
  /* Anker-Ziele duerfen nicht unter der fixen Leiste landen. */
  scroll-padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 16px);
}
html, body { min-height: 100%; }
/* Gueltig auch fuer Browser ohne scroll-padding-Unterstuetzung im Anker-Pfad */
section[id], article h2[id], article h3[id], [id].anchor {
  scroll-margin-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 16px);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  line-height: 1.6;
  /* Platz fuer die fixe Topbar (die liegt ausserhalb des Flusses). */
  padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  /* viewport-fit=cover: Inhalt im Querformat nicht unter die Notch schieben */
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Grain-Overlay über allem */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 50;
  opacity: 0.4;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ── Fixe Topbar ──
   NICHT `position: sticky`. iOS-Safari scrollt auf dem Compositor und
   repositioniert Sticky-Elemente nur zu Scroll-Ticks — bei Schwung-Scrolling
   und beim Ein-/Ausklappen der URL-Leiste hinkt die Leiste sichtbar nach und
   gibt den Bereich darueber frei; dort lief dann Seitentext durch.
   Der Nachlauf ist nicht auf ein paar Pixel begrenzt, deshalb konnte auch der
   ::before-Deckstreifen (124px) das nicht auffangen.
   `position: fixed` bekommt auf iOS eine eigene, am visuellen Viewport
   verankerte Ebene und kann per Konstruktion nicht nachlaufen.
   Der Deckstreifen bleibt als Guertel-und-Hosentraeger drin. */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -120px;
  height: 124px;
  background: var(--bg);
  pointer-events: none;
}
.topbar-in {
  max-width: 1060px;
  margin: 0 auto;
  /* Feste Innenhoehe: --topbar-h darf nicht driften, sonst passt der
     body-padding-top nicht mehr. */
  height: 62px;
  padding: 12px 24px;
  /* Querformat mit Notch: Inhalt der (vollbreiten) Leiste nicht verdecken */
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-weight: 900; letter-spacing: -0.02em; font-size: 16px; }
.brand span { color: var(--muted); font-weight: 500; font-size: 13px; }
.topbar .cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--amber-l) 0%, var(--amber) 100%);
  color: #000;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms;
}
.topbar .cta:active { transform: scale(0.97); }
@media (max-width: 560px) { .brand span { display: none; } }

/* ── Kicker ── */
.kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kicker::before, .kicker::after {
  content: '';
  width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.6));
}
.kicker::after { background: linear-gradient(90deg, rgba(245,158,11,0.6), transparent); }

/* ── Breadcrumb ── */
.crumbs {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 24px 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--subtle);
  letter-spacing: 0.04em;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--amber); }
.crumbs .sep { padding: 0 8px; color: var(--subtle); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 44px 24px 8px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -20%);
  width: min(640px, 100vw); height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
  font-size: clamp(32px, 6.4vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 20px auto 18px;
  max-width: 15ch;
}
.hero h1 .amber { color: var(--amber); }
.hero p.lede {
  font-size: clamp(15px, 2.4vw, 19px);
  color: var(--muted);
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
}

/* ── App-Screenshots: Phone-Mockups (Muster der Startseite) ── */
.appshot {
  max-width: 1060px;
  margin: 0 auto;
  padding: 44px 24px 8px;
  text-align: center;
}
.appshot h2 {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 16px 0 12px;
}
.appshot p.sub {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto;
}

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 34px;
  padding-bottom: 8px;
}
.stage::before {
  content: '';
  position: absolute;
  top: -24%; left: 50%;
  transform: translateX(-50%);
  width: min(920px, 100vw); height: 145%;
  background: radial-gradient(ellipse closest-side at 50% 46%, rgba(245,158,11,0.11) 0%, transparent 100%);
  pointer-events: none;
}
.phone {
  position: relative;
  border-radius: 46px;
  background: #050505;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.04),
    0 30px 90px rgba(0,0,0,0.75);
  width: min(300px, 78vw);
  flex-shrink: 0;
}
.phone::after {
  content: '';
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 24px;
  background: #050505;
  border-radius: 999px;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 37px;
}
.phone.side {
  width: min(250px, 60vw);
  opacity: 0.92;
}
.phone.left  { transform: rotate(-7deg) translateY(26px); z-index: 1; }
.phone.right { transform: rotate(7deg) translateY(26px); z-index: 1; }
.phone.main  { z-index: 2; }

/* Mobil: Phones untereinander statt Snap-Carousel.
   Das Carousel zeigte das zweite Phone nur angeschnitten und war nicht
   selbsterklärend — gestapelt ist jedes Mockup voll sichtbar. */
@media (max-width: 720px) {
  .stage {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 36px;
    margin-top: 28px;
    padding-bottom: 8px;
  }
  .stage .phone,
  .stage .phone.side {
    width: min(300px, 78vw);
    opacity: 1;
    transform: none;
  }
  /* Haupt-Screenshot zuerst */
  .stage-order-fix { order: -1; }
}

/* Einzelnes Phone-Mockup im Artikel */
figure.shot {
  margin: 32px 0 28px;
  text-align: center;
}
figure.shot .phone { margin: 0 auto; }
figure.shot figcaption,
figure.shotdoc figcaption {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--subtle);
  line-height: 1.6;
}

/* Dokument-Screenshot (Day Sheet / Tourplan als Blatt) */
figure.shotdoc {
  margin: 32px 0 28px;
  text-align: center;
}
figure.shotdoc .sheet {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
figure.shotdoc img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Artikel-Typografie ── */
article {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 0;
}
article > section { padding-top: 12px; }

article h2 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 56px 0 18px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
article > h2:first-child, article > section:first-child h2 { border-top: none; padding-top: 0; margin-top: 8px; }

article h3 {
  font-size: clamp(18px, 2.8vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 34px 0 12px;
  color: var(--text);
}

article p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.75;
  margin-bottom: 16px;
}
article p b, article li b { color: var(--text); font-weight: 700; }
article .amber { color: var(--amber); }
article em { color: var(--text); font-style: italic; }

article a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(245,158,11,0.3); }
article a:hover { border-bottom-color: var(--amber); }

article ul, article ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
}
article ul li, article ol li {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.7;
  margin-bottom: 10px;
  padding-left: 26px;
  position: relative;
}
article ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 12px;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--amber);
}
article ol { counter-reset: li; }
article ol li { counter-increment: li; }
article ol li::before {
  content: counter(li);
  position: absolute;
  left: 0; top: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  line-height: 1.9;
}

article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Hervorgehobener Absatz / Zwischen-Fazit */
.note {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.22);
}
.note .ico { flex-shrink: 0; font-size: 18px; line-height: 1.5; }
.note p { color: var(--text); font-size: 15px; line-height: 1.65; margin: 0 !important; }
.note p b { color: var(--amber); }

/* ── FAQ ── */
.faq { margin-top: 8px; }
.faq-item {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 10px;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}
.faq-item p { margin: 0; font-size: 15.5px; }

/* ── Ratgeber-Hub: Artikel-Karten ── */
.cards {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.card {
  display: block;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 180ms, transform 180ms, background 180ms;
}
.card:hover { border-color: rgba(245,158,11,0.4); transform: translateY(-2px); background: var(--surface2); }
.card .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--amber);
  display: block;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.card h2 {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.card p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0; }
.card .more {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
}

/* ── Weiterlesen-Block ── */
.readon {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 22px 24px;
}
.readon-in {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 20px 22px;
}
.readon h2 {
  font-size: 13px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 12px;
  border: none;
  padding: 0;
}
.readon p { color: var(--muted); font-size: 15.5px; line-height: 1.7; margin: 0; }
.readon a { color: var(--text); text-decoration: none; border-bottom: 1px solid rgba(245,158,11,0.45); }
.readon a:hover { color: var(--amber); }

/* ── Finale / CTA ── */
.finale {
  text-align: center;
  padding: 80px 24px 72px;
  position: relative;
  border-top: 1px solid var(--border);
  margin-top: 56px;
}
.finale::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: min(640px, 100vw); height: 340px;
  background: radial-gradient(ellipse at 50% 100%, rgba(245,158,11,0.10) 0%, transparent 65%);
  pointer-events: none;
}
.finale > * { position: relative; }
.finale h2 {
  font-size: clamp(26px, 4.6vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 18px 0 14px;
}
.finale p { color: var(--muted); max-width: 520px; margin: 0 auto 26px; font-size: 16px; }
.finale .btn-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.finale .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 26px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--amber-l) 0%, var(--amber) 100%);
  color: #000;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: transform 150ms;
}
.finale .btn:active { transform: scale(0.97); }
.finale .btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.finale .btn-ghost:hover { border-color: rgba(245,158,11,0.45); }
.finale .hint { font-size: 13px; color: var(--subtle); margin: 20px auto 0; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 44px;
  text-align: center;
  font-size: 12px;
  color: var(--subtle);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
footer .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; }

/* ── Scroll-Reveals ── */
.rv { opacity: 0; transform: translateY(24px); transition: opacity 700ms cubic-bezier(0.16,1,0.3,1), transform 700ms cubic-bezier(0.16,1,0.3,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
