/* ============================================================
   kuendigen.html (§ 312k BGB) and contact.html.

   Colours are tokens from css/main.css only, so both themes come
   for free. Two deliberate departures from the rest of the site:

   · The cards are --bg-elevated, not .glass-card. A glass card lifts
     and scales on hover, which on a form moves the field the pointer
     is about to click.
   · Secondary text is --text-secondary, never --text-muted: muted on
     the dark elevated surface is 4.4:1, under AA for body text.
   ============================================================ */

.lf-main { padding: 120px 0 80px; }
/* `hidden` is how the script shows and hides the reason, the date and the
   result; a class that sets `display` would otherwise beat it. */
.lf-main [hidden] { display: none !important; }
/* The header is fixed; whatever focus scrolls to must land below it. */
.lf-main :is(.lf-banner, .lf-input, .lf-choice input, .lf-result) { scroll-margin-top: 120px; }

/* The layout uses the full .container, so its edges line up with the
   header and the footer rather than floating in the middle of the page.
   Two columns from a laptop up: what the page does on the left, pinned
   while the form scrolls; the form on the right. The first version was one
   720px column centred in the page with five stacked cards, which read as
   a long narrow strip with empty sides ("alles sehr zentriert,
   unübersichtlich"). Below 960px the columns stack, explanation first. */
.lf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s3);
}
@media (min-width: 960px) {
  .lf-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
  .lf-intro { position: sticky; top: 120px; }
}

.lf-title { font-family: var(--font-heading); margin-bottom: 12px; }
.lf-lead { color: var(--text-secondary); line-height: 1.7; font-size: 16px; margin-bottom: var(--s3); max-width: 46ch; }
.lf-lead a, .lf-card a, .lf-note a, .lf-small a, .lf-banner a, .lf-facts a { color: var(--text-accent); }

/* A real sequence (fill in → press → keep), so it is an ordered list. */
.lf-steps { list-style: none; counter-reset: lf-step; margin: 0 0 var(--s3); padding: 0; display: grid; gap: 14px; }
.lf-steps li {
  counter-increment: lf-step;
  position: relative;
  padding-left: 40px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
}
.lf-steps li::before {
  content: counter(lf-step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--text-accent);
  border: 1px solid var(--border-medium);
}
.lf-steps strong { color: var(--text-primary); }

/* The contact page's facts: label over value, no card. */
.lf-facts { display: grid; gap: 4px; margin: 0; font-size: 15px; line-height: 1.55; }
.lf-facts dt { color: var(--text-secondary); font-size: 13px; font-weight: 600; margin-top: 14px; }
.lf-facts dt:first-child { margin-top: 0; }
.lf-facts dd { margin: 0; color: var(--text-primary); }

.lf-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--s3);
  margin-bottom: var(--s2);
}

/* One card for the whole form; sections are divided by a rule instead of
   each sitting in a card of its own. */
.lf-form > .lf-section + .lf-section { border-top: 1px solid var(--border-medium); padding-top: var(--s3); margin-top: var(--s3); }
.lf-form > .lf-field + .lf-field, .lf-form > .lf-row + .lf-field { margin-top: 16px; }
.lf-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .lf-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.lf-row > .lf-field { margin-top: 0; }

.lf-note {
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--text-accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: var(--s3);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.lf-note h2 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.lf-note-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; }
.lf-note-links a { display: inline-flex; align-items: center; min-height: 24px; font-weight: 600; }

/* ── Fields ──────────────────────────────────────────────── */
.lf-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.lf-card legend {
  float: left; width: 100%;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding: 0;
}
.lf-card legend + * { clear: both; }

.lf-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.lf-field:first-of-type { margin-top: 0; }
.lf-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.lf-hint { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

.lf-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 16px;               /* 16px: iOS zooms into anything smaller */
  color: var(--text-primary);
  font-family: var(--font-body);
}
.lf-input:focus-visible { outline: 2px solid var(--text-accent); outline-offset: 2px; }
textarea.lf-input { min-height: 120px; resize: vertical; line-height: 1.5; }
.lf-input[aria-invalid="true"] { border-color: var(--text-danger); }

.lf-choices { display: grid; gap: 10px; }
@media (min-width: 640px) { .lf-choices--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.lf-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.45;
}
.lf-choice input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--text-accent); }
.lf-choice:has(input:checked) {
  border-color: var(--text-accent);
  background: color-mix(in srgb, var(--text-accent) 8%, transparent);
}
.lf-choice:has(input:focus-visible) { outline: 2px solid var(--text-accent); outline-offset: 2px; }
.lf-choice strong { display: block; color: var(--text-primary); font-size: 15px; }
.lf-choice small { display: block; color: var(--text-secondary); font-size: 13px; margin-top: 2px; }
.lf-sub { margin-top: 12px; }
.lf-input--date { max-width: 240px; }

.lf-field-error {
  color: var(--text-danger);
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 8px;
}

/* The honeypot: out of sight and out of the tab order, but present in the
   DOM, which is where a form-filling script looks. Not display:none — some
   scripts skip hidden fields. */
.lf-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ── Submit ──────────────────────────────────────────────── */
.lf-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--border-medium); }
/* The gold primary pulses everywhere else. On a legal button that is
   decoration pulling at the eye, so it holds still here. */
.lf-submit .btn-primary { animation: none; }
.lf-status { font-size: 14px; color: var(--text-secondary); margin: 0; }
.lf-status:empty { display: none; }
.lf-small { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-top: var(--s2); }

.lf-banner {
  border: 1px solid var(--text-danger);
  background: color-mix(in srgb, var(--text-danger) 8%, transparent);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: var(--s2);
  font-size: 15px;
  line-height: 1.6;
}
.lf-banner p + p { margin-top: 6px; }
.lf-banner p:first-child { font-weight: 700; color: var(--text-danger); }
.lf-banner:focus { outline: 2px solid var(--text-danger); outline-offset: 2px; }

/* ── The confirmation ───────────────────────────────────── */
.lf-result:focus { outline: none; }
.lf-result h2 { font-family: var(--font-heading); font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.lf-result h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: var(--s3) 0 8px; }
.lf-ok { color: var(--text-success); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.lf-dl--top { margin: 16px 0 8px; }
.lf-dl { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 8px 16px; font-size: 15px; line-height: 1.5; }
.lf-dl dt { color: var(--text-secondary); font-weight: 600; }
.lf-dl dd { color: var(--text-primary); overflow-wrap: anywhere; white-space: pre-wrap; margin: 0; }
.lf-id { font-family: var(--font-code); font-size: 16px; font-weight: 600; }
.lf-mail { margin-top: var(--s2); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; line-height: 1.6; color: var(--text-primary); border: 1px solid var(--border-medium); }
.lf-mail--ok { border-color: var(--text-success); }
.lf-mail--pending { border-color: var(--text-warning); }
.lf-result p { color: var(--text-secondary); line-height: 1.7; font-size: 15px; }
.lf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s3); }
.lf-print-only { display: none; }

@media (max-width: 560px) {
  .lf-main { padding-top: 96px; }
  .lf-card { padding: var(--s2); }
  .lf-dl { grid-template-columns: 1fr; gap: 2px; }
  .lf-dl dd { margin-bottom: 10px; }
  .lf-submit .btn { width: 100%; }
}

/* ── Opened from the app (?embed=app) ───────────────────────
   The site's product navigation leads to Pricing; from inside a store app
   that is steering to an outside purchase (App Store Guideline 3.1.1). The
   head script and js/legalForms.js set data-embed; everything marked
   data-not-in-app goes. The legal footer stays. */
html[data-embed="app"] [data-not-in-app] { display: none !important; }
/* The logo is no longer a link here, so it must not look like one. */
html[data-embed="app"] a.logo:not([href]) { cursor: default; }
/* On a phone the footer is three columns under the brand; with Product gone
   the Legal column would sit squeezed into the first third. */
@media (max-width: 768px) {
  html[data-embed="app"] .footer-bento > div:not(.footer-brand):not([data-not-in-app]) { grid-column: 1 / -1; }
}

/* ── Print: the storable confirmation (§ 312k (3) BGB) ─────
   Paper has no theme. Ink is black on white whatever the screen showed,
   and everything but the confirmation itself is left off the page. */
@media print {
  .header, .mobile-drawer, .drawer-overlay, .footer, .lf-noprint, #cancelForm, #contactForm,
  [data-hide-on-result], #cookie-banner, .cookie-banner { display: none !important; }
  html, body { background: white !important; }
  .lf-main { padding: 0 !important; }
  .lf-main, .lf-main * { color: black !important; background: transparent !important; box-shadow: none !important; }
  .lf-card, .lf-mail { border-color: black !important; break-inside: avoid; }
  .lf-print-only { display: block; margin-top: 16px; font-size: 12px; }
  .lf-dl { grid-template-columns: 34% 1fr; }
  a[href]::after { content: none; }
}
