/* Shared stylesheet for all pages on rottenrei.be.
 * The site loads no fonts, scripts or styles from third parties.
 * The light and dark values of --bg are mirrored in the theme-color meta tags
 * of each page, because meta tags cannot read CSS variables. */

:root {
  --bg: #f7f6fb;
  --surface: #ffffff;
  --surface-tint: #f2effc;
  --text: #1d1b26;
  --muted: #5d5a6b;
  --border: #e3e0ec;
  --accent: #6440c8;
  --shadow: 0 1px 2px rgba(29, 27, 38, 0.04), 0 4px 16px rgba(29, 27, 38, 0.06);
  --shadow-hover: 0 2px 4px rgba(29, 27, 38, 0.06), 0 12px 28px rgba(29, 27, 38, 0.10);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131219;
    --surface: #1c1b24;
    --surface-tint: #221f30;
    --text: #ecebf2;
    --muted: #a6a3b5;
    --border: #2e2c3a;
    --accent: #a98bff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Page frame: header, main content and footer share one centered column. */

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.wrap--narrow {
  max-width: 760px;
}

.site-header {
  padding: 48px 0 32px;
}

.wordmark {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.hero {
  margin-top: 40px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 12px 0 0;
  font-size: 1.125rem;
  color: var(--muted);
}

main {
  flex: 1;
}

.section-title {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer {
  margin-top: 64px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

/* App cards on the index page. The grid wraps to a single column on phones. */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.card:focus-visible {
  border-radius: var(--radius);
}

/* The app logo is decorative (empty alt text) because the card title names the app. */
.card__logo {
  display: block;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
}

.card__title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.3;
}

.card__text {
  margin: 0;
  color: var(--muted);
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
}

.card__more svg {
  transition: transform 0.15s ease;
}

.card:hover .card__more svg {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card__more svg {
    transition: none;
  }

  .card:hover,
  .card:hover .card__more svg {
    transform: none;
  }
}

/* Long-form text pages such as the Impressum. */

.panel {
  margin-bottom: 24px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}

.panel--tint {
  background: var(--surface-tint);
}

.panel h1 {
  margin: 0 0 16px;
  font-size: clamp(1.625rem, 5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.panel h2 {
  margin: 28px 0 8px;
  font-size: 1.1875rem;
  line-height: 1.35;
}

.panel h1 + h2 {
  margin-top: 0;
}

.panel p,
.panel ul {
  margin: 0 0 12px;
}

.panel ul {
  padding-left: 1.25em;
}

.panel table {
  border-collapse: collapse;
  margin-bottom: 12px;
}

.panel td {
  padding: 2px 0;
  vertical-align: top;
}

/* Label cells such as "Telefon:" stay on one line; only the value column wraps. */
.panel td:first-child {
  white-space: nowrap;
  overflow-wrap: normal;
}

@media (max-width: 600px) {
  .site-header {
    padding: 32px 0 24px;
  }

  .hero {
    margin-top: 28px;
  }

  .panel {
    padding: 22px 18px;
  }
}
