/* flüsterpost – famxgo.de
   Farben und Radien wie die App-Tokens (lib/theme/famxgo_colors.dart, famxgo_tokens.dart;
   Regeln: .claude/skills/famxgo-design-system). Nur Systemschriften, keine externen Ressourcen.

   Kontraste (WCAG 2.2 AA, Text ≥ 4,5:1, große Schrift ≥ 3:1):
     --text      #1F1530 auf --background 16,9:1 · auf --card 17,4:1
     --muted     #6B4A78 auf --background 7,1:1 · auf --card 7,3:1 · auf --tint 6,4:1
                 (ersetzt --soft #9A75A6 mit nur 3,7–3,8:1: Fußzeile, .small, .optional, Datum)
     --primary   #6A1B9A als Link auf --background 9,1:1 · auf --card 9,4:1
     .button     Weiß auf #B35400 5,0:1 → auf #6A1B9A 9,4:1 (vorher Weiß auf Orange 2,7:1)
     .gradient-text  #B35400 auf --background 4,9:1 → #6A1B9A 9,1:1 (vorher Orange 2,6:1)
   Rahmen (--border) sind Dekoration; Eingabefelder heben sich zusätzlich durch die Fläche ab. */

:root {
  --primary: #6a1b9a;          /* primary */
  --accent-strong: #b35400;    /* onAccentStrong: Orange, das weiße Schrift trägt */
  --text: #1f1530;             /* textPrimary */
  --muted: #6b4a78;            /* textSecondary */
  --background: #fffbf7;       /* background */
  --card: #ffffff;             /* surface */
  --border: #e5dae8;           /* Outline */
  --tint: #f3eef5;             /* surfaceMuted */
  /* Markenverlauf nur aus Tönen, die weiße Schrift tragen (≥ 4,5:1) */
  --gradient: linear-gradient(90deg, var(--accent-strong), var(--primary));
  --radius-small: 8px;
  --radius-medium: 12px;       /* Buttons, Eingabefelder, Infoboxen */
  --radius: 16px;              /* Karten, Boxen, Tabellen */
  --touch: 44px;               /* Mindesthöhe von Tippflächen */
}

* { box-sizing: border-box; }

/* "hidden" muss auch gegen display-Regeln wie bei .button gewinnen */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--text); }

img { max-width: 100%; height: auto; }

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

/* Kopfzeile */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand img { display: block; width: 132px; }

/* Tippfläche mindestens 44 px hoch über Padding, nicht über die Schriftgröße */
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
}

.site-header nav a:hover { color: var(--primary); }

/* Startseite */
.hero {
  padding: 48px 0 24px;
  text-align: center;
}

.hero .app-icon {
  width: 132px;
  margin: 0 auto 24px;
  display: block;
  /* Bewusst kein Token: Form eines App-Symbols auf dem Homescreen (ca. 23 % der Kante) */
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(106, 27, 154, 0.14);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.15;
  font-weight: 800;
}

.hero .lead {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .features { grid-template-columns: 1fr 1fr; }
}

.features li {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.features strong { display: block; margin-bottom: 4px; }

.features span { color: var(--muted); font-size: 15px; }

.notice {
  margin: 8px 0 40px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--tint);
  border: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
}

.notice strong { color: var(--text); }

/* Inhaltsseiten */
.page {
  padding-top: 36px;
  padding-bottom: 48px;
}

.page h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 5vw, 34px);
  line-height: 1.2;
  font-weight: 800;
}

.page .subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.page h2 {
  margin: 34px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.page h3 {
  margin: 24px 0 6px;
  font-size: 17px;
}

.page p, .page ul, .page ol { margin: 0 0 14px; }

.page ul, .page ol { padding-left: 22px; }

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

.box {
  padding: 18px 20px;
  margin: 0 0 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.box p:last-child, .box ul:last-child, .box ol:last-child { margin-bottom: 0; }

.address { font-style: normal; }

/* Tabelle: auf dem Handy als Karten */
.table-wrap { margin: 0 0 18px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th { background: var(--tint); font-size: 14px; }

tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  table { border: 0; background: transparent; }
  tr {
    margin-bottom: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  td { border-bottom: 1px solid var(--border); }
  td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
}

/* Formular */
form { margin: 8px 0 0; }

label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 15px;
}

.optional { font-weight: 400; color: var(--muted); }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  margin: 0 0 18px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
}

/* Wie in der App: Fokus 2 px in primary */
input:focus, textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
}

textarea { min-height: 160px; resize: vertical; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 22px;
  font-weight: 400;
  font-size: 15px;
}

.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }

.hidden-field { position: absolute; left: -10000px; }

.button {
  display: inline-block;
  padding: 14px 26px;
  border: 0;
  border-radius: var(--radius-medium);
  min-height: var(--touch);
  background: var(--gradient);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { color: #fff; filter: brightness(1.05); }

.small { font-size: 14px; color: var(--muted); }

/* Vorschauseite geteilter Orte/Events (netlify/edge-functions/place-page.ts) */
.place-preview .place-image {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  margin: 0 0 20px;
  border-radius: var(--radius);
  background: var(--tint);
}

.app-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.button-disabled {
  background: var(--tint);
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: default;
}

.button-disabled:hover { color: var(--muted); filter: none; }

/* Fußzeile */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 24px 0 32px;
  font-size: 14px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  margin: 0 -8px 8px;
}

/* Tippfläche mindestens 44 px hoch über Padding */
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 8px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

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