/* Wimpel website – layout and page styles on top of the brand pack
   (wimpel-fonts.css, wimpel-tokens.css, wimpel-komponenten.css).
   Colours only via the semantic tokens, so light and dark mode follow the system. */

:root {
  --site-gutter: 1rem;
}
@media (min-width: 40rem) {
  :root { --site-gutter: 1.5rem; }
}
@media (min-width: 64rem) {
  :root { --site-gutter: 2rem; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--w-bg);
  color: var(--w-text);
  font-family: var(--w-font-body);
  font-size: var(--w-text-base);
  line-height: var(--w-leading-body);
}

main { flex: 1 0 auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--w-font-display);
  font-stretch: var(--w-display-stretch);
  font-weight: var(--w-display-weight);
  line-height: var(--w-leading-tight);
  text-wrap: balance;
}
h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, var(--w-text-2xl)); }
h3 { font-size: var(--w-text-lg); line-height: var(--w-leading-snug); }

p { margin: 0 0 var(--w-space-4); }

a {
  color: var(--w-primary-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--w-focus-ring);
  border-radius: var(--w-radius-sm);
}

.nowrap { white-space: nowrap; }

code, .code {
  font-family: var(--w-font-mono);
  font-size: 0.94em;
}

.container {
  width: 100%;
  max-width: calc(var(--w-content-max) + 2 * var(--site-gutter));
  margin-inline: auto;
  padding-inline: var(--site-gutter);
}

/* Skip link: hidden until it gets keyboard focus */
.skip-link {
  position: absolute;
  top: var(--w-space-2);
  left: var(--w-space-2);
  z-index: 10;
  padding: var(--w-space-2) var(--w-space-4);
  border-radius: var(--w-radius-md);
  background: var(--w-primary);
  color: var(--w-on-primary);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--w-border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--w-space-4);
  min-height: 4.25rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--w-touch-min);
  color: var(--w-text);
}
.site-logo { width: auto; height: 1.75rem; }
@media (min-width: 40rem) {
  .site-logo { height: 2rem; }
}

.site-nav ul {
  display: flex;
  gap: var(--w-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--w-touch-min);
  padding: 0 var(--w-space-3);
  border-radius: var(--w-radius-md);
  color: var(--w-text);
  font-size: var(--w-text-sm);
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover {
  background: var(--w-primary-soft);
  color: var(--w-primary-text);
}
@media (max-width: 47.99rem) {
  .site-nav { display: none; }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  overflow: hidden;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.hero-kette,
.baustelle-kette {
  height: clamp(4.5rem, 9vw, 6.5rem);
}
.hero-kette .wm-kette,
.baustelle-kette .wm-kette {
  height: 100%;
}
.hero-inner {
  display: grid;
  gap: var(--w-space-12);
  padding-top: clamp(1.5rem, 4vw, 3rem);
}
.hero-inner > * { min-width: 0; }

/* The claim always stays on two lines: the size follows the width of the
   longer first line ("Weniger Zettelwirtschaft.", about 14.1 em in Archivo;
   divided by 15 for some room). */
.claim {
  margin: var(--w-space-5) 0 var(--w-space-6);
  font-size: clamp(1.25rem, calc((100vw - 2 * var(--site-gutter)) / 15), 3.5rem);
  line-height: 1.08;
  white-space: nowrap;
}
.claim-line { display: block; }
.claim-accent { color: var(--w-accent); }

.subline {
  margin-bottom: var(--w-space-3);
  font-size: var(--w-text-base);
  font-weight: 700;
  line-height: var(--w-leading-snug);
}
@media (min-width: 40rem) {
  .subline { font-size: var(--w-text-lg); }
}
.lead {
  max-width: var(--w-prose-max);
  color: var(--w-text-muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--w-space-3);
  margin-top: var(--w-space-8);
}

/* Example messages below the claim */
.examples {
  margin: 0;
  padding: var(--w-space-5);
  border: 1px solid var(--w-border);
  border-radius: var(--w-radius-lg);
  background: var(--w-surface);
  box-shadow: var(--w-shadow-2);
}
.examples-list {
  display: grid;
  gap: var(--w-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 56rem) {
  .examples-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.examples figcaption {
  margin-top: var(--w-space-4);
  color: var(--w-text-muted);
  font-size: var(--w-text-sm);
}

/* --- Sections ------------------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.section-alt {
  border-block: 1px solid var(--w-border);
  background: var(--w-surface);
}
.section-head {
  max-width: var(--w-prose-max);
  margin-bottom: var(--w-space-10);
}
.section-head h2 { margin-bottom: var(--w-space-4); }
.section-head p {
  margin: 0;
  color: var(--w-text-muted);
  font-size: var(--w-text-lg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: var(--w-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.card-grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 26rem), 1fr));
}

.card {
  padding: var(--w-space-6);
  border: 1px solid var(--w-border);
  border-radius: var(--w-radius-lg);
  background: var(--w-surface);
  box-shadow: var(--w-shadow-1);
}
.section-alt .card {
  background: var(--w-bg);
  box-shadow: none;
}
.card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--w-space-2) var(--w-space-3);
  margin-bottom: var(--w-space-2);
}
.card p { color: var(--w-text-muted); }
.card > :last-child { margin-bottom: 0; }

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--w-space-4);
  border-radius: var(--w-radius-md);
  background: var(--w-primary-soft);
  color: var(--w-primary-text);
}
.card-icon .wm-icon { width: 22px; height: 22px; }

.code {
  display: block;
  margin: 0 0 var(--w-space-4);
  padding: var(--w-space-3) var(--w-space-4);
  overflow-x: auto;
  border: 1px solid var(--w-border);
  border-radius: var(--w-radius-md);
  background: var(--w-sunken);
  color: var(--w-text);
  white-space: pre;
}

.section-note { margin-top: var(--w-space-8); }

/* --- Stages ----------------------------------------------------------------- */

.stages {
  max-width: 48rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stage {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: var(--w-space-4);
  padding-block: var(--w-space-5);
  border-top: 1px solid var(--w-border);
}
.stage:last-child { border-bottom: 1px solid var(--w-border); }
.stage-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid var(--w-border-input);
  border-radius: var(--w-radius-pill);
  color: var(--w-text-muted);
  font-family: var(--w-font-display);
  font-stretch: var(--w-display-stretch);
  font-weight: var(--w-display-weight);
}
.stage-done .stage-mark {
  border-color: var(--w-success);
  background: var(--w-success-soft);
  color: var(--w-success);
}
.stage-next .stage-mark {
  border-color: var(--w-primary);
  background: var(--w-primary-soft);
  color: var(--w-primary-text);
}
.stage h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--w-space-2) var(--w-space-3);
  margin: var(--w-space-1) 0 var(--w-space-2);
}
.stage p {
  margin: 0;
  color: var(--w-text-muted);
}
.stage .stage-milestone {
  margin-top: var(--w-space-3);
  color: var(--w-text);
  font-weight: 700;
}

/* --- Legal pages and 404 ---------------------------------------------------- */

.prose {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.prose > * { max-width: 46rem; }
.prose h1 {
  margin-bottom: var(--w-space-6);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, var(--w-text-3xl));
}
.prose h1, .prose h2 { overflow-wrap: break-word; }
.prose h2 {
  margin: var(--w-space-10) 0 var(--w-space-3);
  font-size: var(--w-text-xl);
  line-height: var(--w-leading-snug);
}
.prose h3 {
  margin: var(--w-space-6) 0 var(--w-space-2);
  font-size: var(--w-text-lg);
}
.prose ul { padding-left: var(--w-space-6); }
.prose li { margin-bottom: var(--w-space-2); }
.prose address { font-style: normal; }
.prose .meta {
  color: var(--w-text-muted);
  font-size: var(--w-text-sm);
}

.notfound {
  padding-block: clamp(3rem, 10vw, 7rem);
}
.notfound h1 {
  margin-bottom: var(--w-space-4);
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, var(--w-text-3xl));
}
.notfound p {
  max-width: var(--w-prose-max);
  color: var(--w-text-muted);
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--w-border);
  background: var(--w-surface);
  color: var(--w-text-muted);
  font-size: var(--w-text-sm);
}
.site-footer-inner {
  display: grid;
  gap: var(--w-space-6);
  padding-block: var(--w-space-10);
}
@media (min-width: 48rem) {
  .site-footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}
.footer-logo { width: auto; height: 1.5rem; margin-bottom: var(--w-space-3); }
.footer-claim { margin: 0; color: var(--w-text); font-weight: 700; }
.footer-claim span { display: block; color: var(--w-accent-text); }
.site-footer p { margin: 0; }
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--w-space-1) var(--w-space-2);
  margin: 0 0 var(--w-space-2);
  padding: 0;
  list-style: none;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--w-touch-min);
  padding: 0 var(--w-space-2);
  font-weight: 700;
}
@media (min-width: 48rem) {
  .footer-nav ul { justify-content: flex-end; }
  .footer-license { text-align: right; }
}

/* --- Holding page ----------------------------------------------------------- */

.baustelle {
  justify-content: flex-start;
}
.baustelle main {
  display: grid;
  place-items: center;
  padding: var(--w-space-12) var(--site-gutter) var(--w-space-16);
  text-align: center;
}
.baustelle-logo {
  width: clamp(9rem, 32vw, 13rem);
  height: auto;
  margin: 0 auto var(--w-space-10);
}
.baustelle .claim {
  margin: 0 0 var(--w-space-6);
}
.baustelle-text {
  margin: 0;
  color: var(--w-text-muted);
  font-size: var(--w-text-lg);
}
