/*
  CaNiSa – shared stylesheet.
  System fonts only, no external resources. Colours are taken from the logo.
  Light mode uses a pure white page: the white letters of the logo extend
  beyond the coloured circles and must blend into the background.
*/

:root {
  color-scheme: light dark;

  /* Logo colours */
  --head: #fbb040;
  --navy: #22366b;
  --berry: #b81f6e;
  --leaf: #3cb54a;
  --cherry: #e73b25;
  --sky: #2baae2;
  --tangerine: #f7941e;

  /* Roles */
  --paper: #ffffff;
  --ink: #22366b;
  --ink-soft: #4a5578;
  --link: #b81f6e;
  --button-bg: #22366b;
  --button-text: #ffffff;
  --button-hover: #b81f6e;
  --rule: #e6e8f0;

  --font-round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
    "Arial Rounded MT Bold", "Varela Round", "Nunito", system-ui, sans-serif;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131a33;
    --ink: #eef1f8;
    --ink-soft: #b7bfd6;
    --link: #fbb040;
    --button-bg: #fbb040;
    --button-text: #131a33;
    --button-hover: #ffffff;
    --rule: #2a3356;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
}

main {
  flex: 1;
  width: 100%;
  max-width: 38rem;
  margin-inline: auto;
  padding: 2.5rem 1.25rem 3rem;
}

h1,
h2 {
  font-family: var(--font-round);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* ---------- Farewell page (start page and 404) ---------- */

.farewell {
  text-align: center;
}

.logo {
  display: block;
  margin: clamp(0.5rem, 5vh, 3rem) auto 0.75rem;
}

.logo img {
  display: block;
  width: min(100%, 26rem);
  height: auto;
  margin-inline: auto;
}

.claim {
  color: var(--ink-soft);
  font-family: var(--font-round);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}

.headline {
  font-size: clamp(1.9rem, 6.5vw, 2.75rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.farewell p {
  text-wrap: pretty;
}

.farewell h2:not(.headline) {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Little caterpillar made of the logo colours, used as a divider */
.trail {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
  margin: 3rem auto;
  height: 2.5rem;
}

.trail span {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--c);
  transform: translateY(var(--y, 0));
}

.trail span:nth-child(1) { --c: var(--head); --y: -0.45rem; width: 1.35rem; height: 1.35rem; }
.trail span:nth-child(2) { --c: var(--navy); --y: 0.1rem; }
.trail span:nth-child(3) { --c: var(--berry); --y: 0.35rem; }
.trail span:nth-child(4) { --c: var(--leaf); --y: 0.35rem; }
.trail span:nth-child(5) { --c: var(--cherry); --y: -0.2rem; }
.trail span:nth-child(6) { --c: var(--sky); --y: 0; }
.trail span:nth-child(7) { --c: var(--tangerine); --y: 0.35rem; }

@media (prefers-color-scheme: dark) {
  /* Navy dot would disappear on the dark background */
  .trail span:nth-child(2) { --c: #5d74b8; }
}

.button {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-family: var(--font-round);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  background: var(--button-hover);
}

/* 404 page: smaller logo, focus on the message */
.notfound .logo {
  margin-bottom: 2.5rem;
}

.notfound .logo img {
  width: min(100%, 18rem);
}

.hint {
  margin-top: 2.5rem;
  color: var(--ink-soft);
}

.signoff {
  margin-top: 3rem;
  font-family: var(--font-round);
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------- Sub pages (Impressum) ---------- */

.home-logo {
  display: inline-block;
}

.home-logo img {
  display: block;
  width: 9rem;
  height: auto;
}

.legal h1 {
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  margin: 1rem 0 1.5rem;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.5rem;
  border-top: 1px solid var(--rule);
  padding: 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

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

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media print {
  .site-footer,
  .trail {
    display: none;
  }

  .button {
    background: none;
    color: inherit;
    padding: 0;
  }
}
