/*
 * The public site. Hand-written rather than PicoCSS on purpose: Pico is
 * classless and document-shaped, which is right for the app's forms and wrong
 * for a hero. Fighting it would have cost more than these ~200 lines, and cost
 * 14 kB gzip of unused rules on the one page whose whole job is a fast first
 * paint.
 *
 * What makes this feel like the same product as the app is not a shared
 * framework, it is the shared palette and type below - copied deliberately from
 * frontend/src/styles.css. If a colour changes there, change it here too.
 */
:root {
  --kk-navy: #10243c;
  --kk-yellow: #f5c542;
  --kk-coral: #f8595f;
  --kk-purple: #8b5cf6;
  --kk-blue: #2d7ff9;
  --kk-green: #2fbf87;
  --kk-sky: #38bdf8;

  --ink: #10243c;
  --body: #4a5b6f;
  --muted: #6b7a8d;
  --line: #e6ecf2;
  --paper: #ffffff;
  --shell: #f6f8fa;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --radius: 0.75rem;
  /*
   * Dieselben Stufen, die Picos .container in der Anwendung benutzt. Vorher
   * standen hier feste 64rem, und der Sprung von der Landingpage in die
   * Anwendung aenderte die Spaltenbreite mitten im Klick. Wer das aendert,
   * muss es in beiden Welten aendern - deshalb die Stufen und keine eigene
   * Zahl.
   */
  --page: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--body);
  background: var(--shell);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--kk-blue);
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 576px) {
  :root { --page: 510px; }
}

@media (min-width: 768px) {
  :root { --page: 700px; }
}

@media (min-width: 1024px) {
  :root { --page: 950px; }
}

@media (min-width: 1280px) {
  :root { --page: 1200px; }
}

@media (min-width: 1536px) {
  :root { --page: 1450px; }
}

/* ------------------------------------------------------------------ header */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

/*
 * Die Marke im Kopf. Die Bildmarke kommt als <img src="/logo.svg"> herein und
 * nicht inline: eine Datei, die alle drei Seiten laden, kann nicht in drei
 * Fassungen auseinanderlaufen. Genau das war passiert - Impressum und
 * Datenschutz trugen noch eine Version ohne das Monogramm.
 */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a:not(.button) {
  color: var(--body);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:not(.button):hover {
  color: var(--ink);
}

/* ------------------------------------------------------------------ buttons */

.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 0.55rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.button.primary {
  background: var(--kk-navy);
  color: #fff;
}

.button.primary:hover {
  background: #1d3c60;
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.button.ghost:hover {
  border-color: #fff;
}

.button.outline {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
}

.button.small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------- hero */

.hero {
  background: var(--kk-navy);
  color: #dbe6f2;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3.5rem, 9vw, 6rem);
}

.hero h1 {
  color: #fff;
  max-width: 30ch;
}

/*
 * The primary button is navy, which on a navy hero disappears - the outlined
 * button beside it ended up looking like the more important of the two. Here it
 * takes the warm accent from the logo instead, which is also the only genuinely
 * inviting colour in the palette.
 */
.hero .button.primary {
  background: var(--kk-yellow);
  color: var(--kk-navy);
}

.hero .button.primary:hover {
  background: #ffd45e;
}

.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.hero .actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero .fineprint {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: #8fa6c0;
}

.brand .brand-mark {
  flex: none;
}

/*
 * Der Slogan ueber der Ueberschrift. Hier stand vorher das ganze Logo noch
 * einmal - Bildmarke, Name und Slogan -, obwohl der Kopf beides schon zeigt.
 * Geblieben ist der Slogan, in derselben Sperrung wie unter dem Logo im
 * Anmeldebildschirm: die Marke klingt mit, ohne sich zu wiederholen.
 */
.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--kk-yellow);
}

/* ------------------------------------------------------------------ sections */

section {
  padding: clamp(2.75rem, 7vw, 4.5rem) 0;
}

section.paper {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 46ch;
  margin-bottom: 2.25rem;
}

.section-head p {
  margin-bottom: 0;
}

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

section.paper .card {
  background: var(--shell);
}

.card p:last-child {
  margin-bottom: 0;
}

.card .icon {
  width: 1.6rem;
  height: 1.6rem;
  margin-bottom: 0.75rem;
  fill: currentColor;
}

.icon-users { color: var(--kk-blue); }
.icon-broom { color: var(--kk-green); }
.icon-calendar { color: var(--kk-purple); }

/* The before-and-after that is the whole point of the product. */
.contrast {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.contrast > div {
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contrast .before {
  background: var(--shell);
  border: 1px solid var(--line);
}

.contrast .after {
  background: var(--kk-navy);
  color: #dbe6f2;
}

.contrast .after h3 {
  color: #fff;
}

.contrast ul {
  margin: 0;
  padding-left: 1.15rem;
}

.contrast li {
  margin-bottom: 0.5rem;
}

.contrast li:last-child {
  margin-bottom: 0;
}

/* Numbered walkthrough. */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--kk-yellow);
  color: var(--kk-navy);
  font-weight: 700;
}

.steps strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.closing {
  text-align: center;
}

.closing .actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  background: var(--kk-navy);
  color: #8fa6c0;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: #dbe6f2;
  text-decoration: none;
  margin-right: 1.25rem;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------- legal pages */

.legal {
  background: var(--paper);
  padding: clamp(2rem, 6vw, 3.5rem) 0;
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.35rem;
}

.legal h2:first-of-type {
  margin-top: 1.5rem;
}

/* Unterabschnitt innerhalb eines Paragraphen, etwa das Loeschen des Kontos
   unter der Speicherdauer. Braucht Luft nach oben, aber weniger als ein h2. */
.legal h3 {
  margin-top: 1.75rem;
  font-size: 1.1rem;
}

.legal dl {
  margin: 0 0 1rem;
}

.legal dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.75rem;
}

/*
 * Welche Fassung gerade gilt. Steht am Ende der Rechtstexte, weil sich im
 * Streitfall genau das belegen laesst - eine Erklaerung ohne Stand ist eine
 * Erklaerung, von der niemand sagen kann, ab wann sie gegolten hat.
 */
.legal .stand {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

/*
 * Every gap somebody has to fill in before this page may go public. Loud on
 * purpose: a placeholder that looks like prose is a placeholder that ships.
 */
.todo {
  background: #fff6d6;
  border-left: 4px solid var(--kk-yellow);
  border-radius: 0.4rem;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #6b5a1f;
}

.todo strong {
  color: #4a3d10;
}

@media (max-width: 640px) {
  .site-nav {
    gap: 0.9rem;
  }

  .site-nav .hide-narrow {
    display: none;
  }
}
