/* ===========================================================
   localpolitics.de — corporate static site
   Opal color tokens, derived from colour/colour.md.
   Light defaults, dark via prefers-color-scheme.
   =========================================================== */

:root {
  --bg: #f4f8f7;
  --card: #ffffff;
  --text: #192421;
  --muted: #536560;
  --border: #c0d8d2;
  --primary: #317765;
  --primary-hover: #265e50;
  --primary-ink: #317765;
  --secondary: #458991;
  --secondary-hover: #397279;
  --accent: #e236b9;
  --highlight: #166534;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(15, 30, 25, 0.04), 0 4px 14px rgba(15, 30, 25, 0.06);
  --max-w: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1e1a;
    --card: #172c26;
    --text: #f0f4f3;
    --muted: #a0b1ac;
    --border: #305047;
    --primary: #6ec4ae;
    --primary-hover: #8bd0be;
    --primary-ink: #8bd0be;
    --secondary: #80b6bd;
    --secondary-hover: #9ac5cb;
    --accent: #e25ac1;
    --highlight: #34d399;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.30);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: "Familjen Grotesk", system-ui, -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--primary-hover); }
a:focus-visible {
  outline: 2px solid var(--primary-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

:focus-visible {
  outline: 2px solid var(--primary-ink);
  outline-offset: 2px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -2.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Site header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header-title {
  min-width: 0;
}
.header-title-flex {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}
.header-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}
.header-home-link:hover { color: var(--primary); }
.header-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--primary);
}
.header-logo {
  /* Bigger lockup: 28 px mobile floor (production size with a slight
     bump so it actually feels like a brand anchor), grows up to 112 px
     on ultra-wide viewports. The stacked subtitle stays fully visible
     (no ellipsis truncation — see .subtitle below). */
  height: clamp(1.75rem, 5.5vw, 7rem);
  width: auto;
  flex-shrink: 0;
  color: var(--primary);
  display: block;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.subtitle {
  margin: 0.25rem 0 0 2.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}
.subtitle-main { color: var(--text); font-weight: 500; }

/* ---------- Main container ---------- */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
main.wide { max-width: 960px; }

main p { margin: 0 0 0.9em; }
main h2 { font-size: 1.6rem; margin-top: 1.5rem; }
main h3 { font-size: 1.15rem; margin-top: 1.6rem; }
main h4 { font-size: 1.02rem; margin-top: 1.2rem; }

/* ---------- Hero (index) ---------- */
.hero { margin-top: 0.5rem; }
.hero h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.4rem);
  margin-bottom: 0.4em;
}
.hero .lead {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 38em;
}
.hero .sub-lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 38em;
}
.cta-row { margin: 1.6rem 0 1.4rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
}
.btn.primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

/* ---------- Sections ---------- */
.section {
  margin: 2.5rem 0;
}
.section-head {
  font-family: "Familjen Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text);
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: var(--shadow-card);
}
.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--primary);
}
.feature-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.97rem;
}

/* ---------- Contact block ---------- */
.contact-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem;
  box-shadow: var(--shadow-card);
}
.contact-block .city { color: var(--muted); margin: 0.2rem 0 0.8rem; }

/* ---------- Back link (sub-pages) ---------- */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 500;
}

/* ---------- Site footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer p { margin: 0.25rem 0; }
.site-footer a {
  color: var(--secondary);
  text-decoration: none;
  margin: 0 0.3rem;
}
.site-footer a:hover { color: var(--secondary-hover); text-decoration: underline; }

/* ---------- Legal page layout ---------- */
.legal h2 {
  font-size: 1.7rem;
  color: var(--text);
  margin-bottom: 1rem;
}
.legal h3 {
  color: var(--primary);
  margin-top: 1.8rem;
  font-size: 1.1rem;
}
.legal h4 {
  color: var(--text);
  margin-top: 1.2rem;
  font-size: 1rem;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 520px) {
  .site-header-content { padding: 0.85rem 1rem; }
  .header-title-flex { font-size: 1.2rem; }
  .header-icon { width: 24px; height: 24px; }
  main { padding: 1.5rem 1rem 2.5rem; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
