/* Gemeinsames Stylesheet der Pinterest-Kampagnenseiten
   (Hochzeitsbudget, Hochzeitscheckliste und deren Unterseiten).

   Bewusst eine eigene Datei statt <style> im Kopf: Die Seiten teilen sich
   das Aussehen, und der Browser kann es einmal zwischenspeichern. Die
   Farb- und Schriftwerte sind identisch mit index.html - wer sie dort
   aendert, muss es hier nachziehen. */

:root {
  --primary: #8b6f47;
  --primary-light: #d4af7a;
  --primary-dark: #5c4a2a;
  --secondary: #e8d5c4;
  --accent: #c9a96e;
  --background: #faf8f5;
  --surface: #ffffff;
  --surface-variant: #f5f0ea;
  --text: #2c2416;
  --text-light: #8a7560;
  --success: #6b8f6b;
  --footer-bg: #2c2416;
  --maxw: 820px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.7;
  font-size: 17px;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  margin: 0;
  line-height: 1.25;
}

a {
  color: var(--primary);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Nur fuer Screenreader: sichtbar fuer Vorlesesoftware, nicht im Layout. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Kopfzeile ---------------------------------------------------------- */

.kopf {
  background: var(--surface);
  border-bottom: 1px solid var(--secondary);
}

.kopf-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.marke {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.marke img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.marke span {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 700;
}

.kopf-link {
  font-size: 15px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

/* --- Brotkrumen --------------------------------------------------------- */

.brotkrumen {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 14px;
  color: var(--text-light);
}

.brotkrumen a {
  color: var(--text-light);
}

/* --- Textbereiche ------------------------------------------------------- */

.kopfbereich {
  padding: 24px 0 8px;
}

.kopfbereich h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 14px;
}

.vorspann {
  font-size: 19px;
  color: var(--text);
}

section {
  padding: 32px 0;
}

section h2 {
  font-size: clamp(24px, 3.5vw, 31px);
  margin-bottom: 8px;
}

section h3 {
  font-size: 20px;
  margin: 24px 0 6px;
}

.hinweis {
  background: var(--surface-variant);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-size: 16px;
}

/* --- Listen ------------------------------------------------------------- */

section ol {
  padding-left: 22px;
}

section ol li {
  margin-bottom: 10px;
}

/* Checklisten-Punkte mit Kaestchen statt Punkt: liest sich als Liste zum
   Abhaken, auch ohne dass etwas anklickbar waere. Anklickbar gehoert in die
   App, nicht auf eine Landingpage. */
.liste {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.liste li {
  position: relative;
  padding: 8px 0 8px 30px;
  border-bottom: 1px solid var(--surface-variant);
}

.liste li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 3px;
}

.liste li:last-child {
  border-bottom: none;
}

/* --- Verweiskarten ------------------------------------------------------ *
   Fuer die Vertiefungsseiten. Als Fliesstext-Link mitten im Absatz werden sie
   schlicht uebersehen -- auf einer langen Seite muss ein Weiterlesen-Angebot
   als Flaeche erkennbar sein, nicht als unterstrichenes Wort. */

.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.karte {
  display: block;
  background: var(--surface);
  border: 1px solid var(--secondary);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.15s,
    transform 0.15s;
}

.karte:hover,
.karte:focus-visible {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.karte .marke-zeile {
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.karte strong {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.karte span.text {
  display: block;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
}

/* --- Tabellen ----------------------------------------------------------- */

.tabelle-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--surface-variant);
}

th {
  background: var(--surface-variant);
  font-weight: 700;
  font-size: 15px;
}

td.zahl,
th.zahl {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

tr.summe td {
  font-weight: 700;
  background: var(--surface-variant);
}

/* --- Rechner ------------------------------------------------------------ */

.rechner {
  background: var(--surface);
  border: 1px solid var(--secondary);
  border-radius: 14px;
  padding: 22px;
}

.rechner-felder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 560px) {
  .rechner-felder {
    grid-template-columns: 1fr;
  }
}

.feld label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}

.feld input {
  width: 100%;
  font-family: inherit;
  font-size: 18px;
  padding: 11px 12px;
  border: 1px solid var(--secondary);
  border-radius: 9px;
  background: var(--background);
  color: var(--text);
}

.feld input:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 1px;
}

.feld .hilfe {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

.rechner-ergebnis {
  margin-top: 20px;
}

.pro-gast {
  margin-top: 14px;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
}

.pro-gast.gut {
  background: #eef3ee;
  border-left: 3px solid var(--success);
}

.pro-gast.knapp {
  background: #fbf3e6;
  border-left: 3px solid var(--accent);
}

.balken {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--primary-light);
  margin-top: 5px;
}

/* --- Schaltflaechen ----------------------------------------------------- */

.knopfreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.knopf {
  display: inline-block;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid var(--primary);
  cursor: pointer;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
}

.knopf.sekundaer {
  background: transparent;
  color: var(--primary);
}

/* --- Freebie-Formular --------------------------------------------------- */

.freebie {
  background: var(--surface);
  border: 1px solid var(--secondary);
  border-radius: 14px;
  padding: 22px;
  max-width: 520px;
}

.einwilligung {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.einwilligung input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Der Honigtopf muss fuer Menschen unsichtbar sein, aber von automatischen
   Ausfuellern gefunden werden. Deshalb aus dem Bild geschoben statt
   display:none - manche Skripte ueberspringen ausgeblendete Felder. */
.honigtopf {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.freebie-meldung {
  max-width: 520px;
  margin-top: 14px;
}

.freebie-meldung.erfolg {
  border-left-color: var(--success);
  background: #eef3ee;
}

.freebie-meldung.fehler {
  border-left-color: #b4534b;
  background: #f7ecea;
}

/* --- Fusszeile ---------------------------------------------------------- */

footer {
  background: var(--footer-bg);
  color: #d9cfc2;
  padding: 30px 20px;
  text-align: center;
  margin-top: 40px;
  font-size: 15px;
}

footer a {
  color: #e8d5c4;
}

footer .links {
  margin-bottom: 8px;
}

footer .sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* --- Druckansicht ------------------------------------------------------- *
   Zweck: Der Nutzer soll das Ergebnis als PDF speichern oder ausdrucken
   koennen, ohne dass wir eine PDF-Bibliothek laden. Der Browser kann das
   selbst - wir muessen ihm nur sagen, was aufs Papier gehoert. */

@media print {
  /* Gedruckt wird bewusst NUR das eigene Rechenergebnis, nicht die ganze
     Seite. Wer den kompletten Inhalt aufs Papier bekommt, hat keinen Grund
     mehr, den ausfuellbaren Budgetplaner anzufordern -- und der ist der
     eigentliche Zweck der Seite. */
  .nicht-drucken,
  .kopf,
  .brotkrumen,
  footer,
  .knopfreihe,
  #posten,
  #versteckt,
  #app,
  #weiter,
  #wofuer,
  .kopfbereich .vorspann,
  .rechner > p,
  #rechner > p,
  .feld .hilfe {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 12pt;
    line-height: 1.45;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  section {
    padding: 10px 0;
  }

  /* Der Rechner selbst wird zum Formular auf Papier: Eingaben als Text,
     Ergebnis als Tabelle. */
  .rechner {
    border: none;
    padding: 0;
  }

  .feld input {
    border: none;
    border-bottom: 1px solid #999;
    border-radius: 0;
    padding: 2px 0;
    font-size: 12pt;
  }

  table {
    border: 1px solid #ccc;
  }

  th,
  td {
    padding: 6px 8px;
  }

  /* Tabellen und Abschnitte nicht mitten im Satz zerreissen */
  table,
  .hinweis,
  .pro-gast {
    break-inside: avoid;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  .druck-fuss {
    display: block !important;
    margin-top: 18px;
    padding-top: 8px;
    border-top: 1px solid #ccc;
    font-size: 9pt;
    color: #555;
  }
}

.druck-fuss {
  display: none;
}
