/*
 * ════════════════════════════════════════════════════════════════
 *  Show My Bike — Base Styles
 *
 *  Enthält: Reset, Body, Grain-Overlay, Nav, Footer
 *  Gilt für: alle Seiten
 *  Voraussetzung: tokens.css muss vorher geladen sein
 * ════════════════════════════════════════════════════════════════
 */

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

html {
  scroll-behavior: smooth;
}

/* ── Body ────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Grain Overlay ───────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 40px;
  height: 64px;
  background: rgba(246,245,242,0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  gap: 0;
}

.nav-logo img {
  display: block;
  width: auto;
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.nav-links li,
.nav-ig {
  display: flex;
  align-items: center;
}

.nav-links .nav-legal {
  display: none;
}

.nav-links a,
.nav-ig {
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a.active,
.nav-ig:hover { color: var(--accent); }

.nav-ig {
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  flex-shrink: 0;
}

.nav-ig svg {
  display: block;
  flex-shrink: 0;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-btn {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  color: var(--text-mid);
  cursor: pointer;
}

.nav-toggle-btn span {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

@media (max-width: 760px) {
  nav {
    justify-content: center;
    padding: 0 14px;
    gap: 0;
  }

  .nav-toggle-btn {
    display: flex;
    position: absolute;
    left: 14px;
  }

  .nav-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-logo img {
    height: 28px;
  }

  .nav-ig {
    position: absolute;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--border-hi);
    border-radius: var(--r-md);
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links .nav-legal {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: 14px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(255,255,255,0.05);
  }
}

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
  background: var(--carbon);
  border-top: 1px solid var(--border);
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-links a {
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: #fff; }

.footer-links .footer-social {
  display: inline-flex;
  align-items: baseline;
  color: #fff;
  font-weight: 800;
}

.footer-links .footer-social::before {
  content: '@';
  color: var(--accent);
  font-weight: 800;
}

.footer-copy {
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.48);
  letter-spacing: 0.01em;
}

.footer-logo img,
footer > a img {
  display: block;
  width: auto;
  height: 26px;
}

.footer-logo,
footer > a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 600px) {
  footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 20px;
    margin-bottom: 32px;
    overflow: visible;
    width: 100%;
  }

  .footer-links {
    width: 100%;
    gap: 12px 22px;
    padding-right: 4px;
  }

  .footer-links a {
    white-space: nowrap;
  }
}
