/* ---------- Colours and fonts (change them here, in one place) ---------- */
:root {
  --bg: #FCF9FF;
  --text: #14101F;
  --text-secondary: #443C58;
  --line: #E4DAF2;
  --accent: #6B24B0;

  --rainbow: linear-gradient(to right,
    #14A7E0, #26358F, #7A2CC9, #D4137F, #FF7A1A, #FFB020);

  --font-sans: system-ui, Figtree, sans-serif;
  --font-serif: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
}

/* ---------- Basics ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto; /* keeps the logo proportions, never stretched */
}

/* ---------- Colour bar at the very top ---------- */
.colour-bar {
  height: 4px;
  background: var(--rainbow);
}

/* ---------- Faint background ribbons ---------- */
.ribbons {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.ribbon {
  position: absolute;
  height: 180px;
  border-radius: 999px;
  opacity: 0.09;
  filter: blur(60px);
}

.ribbon-1 {
  width: 90vw;
  top: 12%;
  left: -25vw;
  background: linear-gradient(to right, #14A7E0, #26358F, #7A2CC9);
  transform: rotate(-18deg);
}

.ribbon-2 {
  width: 80vw;
  top: 48%;
  right: -25vw;
  background: linear-gradient(to right, #7A2CC9, #D4137F, #FF7A1A);
  transform: rotate(-12deg);
}

.ribbon-3 {
  width: 70vw;
  bottom: 2%;
  left: -10vw;
  background: linear-gradient(to right, #D4137F, #FF7A1A, #FFB020);
  transform: rotate(10deg);
}

/* ---------- Page layout: header on top, hero in the middle, footer at the bottom ---------- */
.page {
  min-height: calc(100vh - 4px); /* full screen height minus the colour bar */
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  animation: fade-in 1s ease-out both; /* the one gentle fade-in on load */
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* People who switched off animations in their system settings get none */
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.monogram {
  width: 48px;
}

/* Language switch: two equal halves */
.lang-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.lang-switch button,
.lang-switch a {
  min-width: 48px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.lang-switch button + button,
.lang-switch a + a {
  border-left: 1px solid var(--line);
}

/* The active language */
.lang-switch button[aria-pressed="true"],
.lang-switch a[aria-current="true"] {
  background: var(--accent);
  color: #fff;
}

.lang-switch button:focus-visible,
.lang-switch a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.lang-switch button[aria-pressed="true"]:focus-visible,
.lang-switch a[aria-current="true"]:focus-visible {
  outline-color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  flex: 1; /* takes all free space, so the footer stays at the bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0 64px;
}

.main-logo {
  /* As big as possible, but never wider than 560px or the screen,
     and never taller than half the window, so the text below stays visible.
     width/height "auto" keep the proportions. */
  width: auto;
  height: auto;
  max-width: min(560px, 100%);
  max-height: 50vh;
  margin-bottom: 40px;
}

.label {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  max-width: 20em;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 4.5vw, 44px); /* grows with the screen, within limits */
  line-height: 1.2;
  text-wrap: balance;      /* nicer line breaks where the browser supports it */
  overflow-wrap: break-word; /* long German words can never overflow */
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap; /* wraps onto a second line on narrow phones */
  justify-content: center;
  gap: 8px 24px;
  padding: 20px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 14px;
}

.footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.footer a:hover,
.footer a[aria-current="page"] {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* ---------- Legal pages (Impressum, Datenschutz) ---------- */
.legal {
  flex: 1;
  width: 100%;
  max-width: 720px; /* comfortable line length for reading */
  margin: 0 auto;
  padding: 24px 0 64px;
  overflow-wrap: break-word; /* long German words and e-mail addresses wrap */
}

.legal h1 {
  margin: 24px 0 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
}

.legal h2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.legal p,
.legal ul {
  margin: 0 0 16px;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.legal code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

/* Version date under the page title */
.legal .version {
  margin-bottom: 32px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* "Back to start page" link, above and below the text */
.legal .back {
  margin: 0;
  font-size: 14px;
}

.legal h2 ~ .back {
  margin-top: 48px;
}

.legal .back a {
  text-decoration: none;
}

.legal .back a:hover {
  text-decoration: underline;
}

/* Placeholders that still have to be filled in: bright yellow, impossible to miss */
.placeholder {
  background: #FFE600;
  color: #14101F;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Tables scroll sideways inside their own box on narrow phones */
.table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.legal th,
.legal td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal th {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .page { padding: 0 16px; }
  .monogram { width: 40px; }
  .hero { padding: 32px 0 48px; }
  .main-logo { margin-bottom: 28px; }
  .label { letter-spacing: 0.22em; }
}
