/* base.css — Reset + App-Shell (Header, Inhalt, Bottom-Navigation). Mobile first. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--ff-head); font-weight: 600; color: var(--navy-900); letter-spacing: 0.005em; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
[hidden] { display: none !important; }

.eyebrow {
  font-size: var(--fs-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-700);
  font-weight: 600;
}
.akzent-rule { width: 48px; height: 2px; background: var(--akzent-500); border: 0; margin: 14px 0; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-small); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: calc(var(--topnav-h) + var(--safe-t));
  padding: var(--safe-t) var(--page-pad) 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.brand { display: inline-flex; align-items: center; min-height: var(--tap); flex: 0 0 auto; }
.brand img { height: 28px; width: auto; }   /* ── F1 ── dark-logo.png */

.topnav { display: inline-flex; align-items: center; gap: var(--space-2); margin-left: var(--space-4); }
.topnav-item {
  display: inline-flex; align-items: center;
  min-height: var(--tap); padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; letter-spacing: 0.04em;
  color: var(--navy-700);
}
.topnav-item:hover { background: rgba(50,65,88,0.05); }
.topnav-item.active { color: var(--navy-900); box-shadow: inset 0 -3px 0 var(--akzent-500); border-radius: 0; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }

.lang-switch { display: inline-flex; background: var(--sand-100); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.lang-btn {
  min-width: var(--tap); min-height: var(--tap);   /* T8: volle 44 px Touch-Ziel */
  padding: 0 10px; border-radius: 5px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--navy-700);
}
.lang-btn.active { background: var(--white); color: var(--navy-900); box-shadow: 0 1px 3px rgba(26,35,52,0.12); }

.icon-link {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap);
  border-radius: 50%;
  color: var(--navy-700);
}
.icon-link:hover { background: rgba(50,65,88,0.06); }
.icon-link.active { color: var(--navy-900); background: rgba(127,155,214,0.18); }

.nav-badge {
  position: absolute; top: 6px; right: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--warn); border: 2px solid var(--surface);
}

/* Inhalt — scrollt mit dem Dokument, unten Platz für Bottom-Nav + Safe-Area. */
.content {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-5) var(--page-pad) calc(var(--safe-b) + var(--space-6));
}

/* Bottom-Navigation (nur Handy) */
.bottomnav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-nav);
  height: calc(var(--bottomnav-h) + var(--safe-b));
  padding: 0 var(--safe-r) var(--safe-b) var(--safe-l);
  background: var(--surface);
  border-top: 1px solid var(--border);
  justify-content: space-around;
  align-items: stretch;
}
.bottomnav-item {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  min-height: var(--tap);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--slate-300);
}
.bottomnav-item.active { color: var(--navy-900); box-shadow: inset 0 3px 0 var(--akzent-500); }
.bottomnav-icon-wrap { position: relative; display: inline-flex; }
.bottomnav-icon-wrap .nav-badge { top: -3px; right: -6px; }

/* Nicht eingeloggt: keine Navigation, kein Konto-Icon */
.shell.anon .topnav, .shell.anon .bottomnav, .shell.anon .konto-link { display: none; }
.shell.anon .content { padding-bottom: calc(var(--safe-b) + var(--space-6)); }

@media (max-width: 767px) {
  .topnav { display: none; }
  .bottomnav { display: flex; }
  .content { padding-bottom: calc(var(--bottomnav-h) + var(--safe-b) + var(--space-6)); }
  .shell.anon .content { padding-bottom: calc(var(--safe-b) + var(--space-6)); }
}
