/* Styles of the public pages (F-20) — landing, download, App-Link fallbacks.
   Lean custom CSS, no framework and no external host (NF-03). The palette is the
   one the web app used, so the page still looks like WoBisch. */

:root {
  --color-bg: #ffffff;
  --color-text: #1c1c1e;
  --color-muted: #6b7280;
  --color-accent: #e6007e; /* campaign pink */
  --color-accent-2: #17b6c9; /* cyan — gradient partner */
  --color-surface: #faf0f6;
  --brand-gradient: linear-gradient(120deg, #e6007e 0%, #17b6c9 100%);
  --space: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14121c;
    --color-text: #e5e7eb;
    --color-muted: #9ca3af;
    --color-surface: #211c2b;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

/* The whole page has to fit one phone screen without scrolling: it is read once,
   at the moment someone was invited, and a download button below the fold is a
   download button nobody finds. dvh, not vh — the mobile address bar eats the
   difference exactly here. */
body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space) var(--space) max(var(--space), env(safe-area-inset-bottom));
}

/* Centred only where there is room, and only with `safe`: plain centring pushes
   overflow above the scroll origin, which would make the top of the longer pages
   (download, App-Link fallbacks) unreachable. A browser that does not know the
   keyword drops the declaration and keeps flex-start — which is the safe state. */
@media (min-height: 640px) {
  body {
    justify-content: safe center;
  }
}

main {
  max-width: 34rem;
  margin: 0 auto;
  width: 100%;
}

header.brand {
  text-align: center;
}

header.brand img {
  width: 4rem;
  height: auto;
}

h1 {
  font-size: 1.75rem;
  margin: 0.25rem 0 var(--space);
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: 1.15rem;
  margin-top: calc(var(--space) * 1.5);
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

section {
  background: var(--color-surface);
  border-radius: 0.75rem;
  padding: 0.875rem var(--space);
  margin-bottom: 0.75rem;
}

section p {
  margin: 0;
}

section p + p {
  margin-top: 0.75rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: var(--space) 0 0;
}

a.button {
  /* 44 px minimum touch target (NF-05) — this page is read on a phone. */
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

a.button-primary {
  background: var(--color-accent);
  color: #ffffff;
}

form {
  background: var(--color-surface);
  border-radius: 0.75rem;
  padding: var(--space);
  margin-bottom: 0.75rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="password"] {
  /* 44 px touch target, and full width so the field is not a puzzle (NF-05). */
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--color-muted);
  border-radius: 0.5rem;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

button.button {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button.button-primary {
  background: var(--color-accent);
  color: #ffffff;
}

form p.muted {
  margin: -0.5rem 0 0.75rem;
  font-size: 0.85rem;
}

ul.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--color-muted);
}

.warning {
  color: #b00020;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .warning {
    color: #ff8a9b;
  }
}

.muted {
  color: var(--color-muted);
}

code {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
  background: var(--color-bg);
  border-radius: 0.375rem;
  padding: 0.5rem;
}

footer {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Short phones: tighten before anything falls below the fold. */
@media (max-height: 700px) {
  :root {
    --space: 0.75rem;
  }

  header.brand img {
    width: 3rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
