/* BiteMe Landingpage – Design-Tokens aus packages/ui/src/tokens.ts des Prototyps.
   Keine externen Ressourcen: keine Web-Fonts, kein CDN, keine Fremd-Requests.
   Das ist Absicht — Google Fonts wären eine Datenübermittlung in die USA. */

:root {
  --canvas: #fff8f0;
  --surface: #ffffff;
  --surface-muted: #f5eee7;
  --ink: #2c211b;
  --ink-muted: #74665e;
  --primary: #e85d3f;
  --primary-pressed: #cf472b;
  --choice: #24866b;
  --warning: #8a5a17;
  --warning-surface: #fff1d8;
  --border: #e7dcd2;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --measure: 34rem;
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Kopf ---------- */

.masthead {
  padding: 2.5rem 0 0;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark span {
  color: var(--primary);
}

/* ---------- Hero ---------- */

.hero {
  padding: 2.25rem 0 3rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 8vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.lede {
  margin: 0 0 1.75rem;
  font-size: 1.1875rem;
  color: var(--ink-muted);
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--primary-pressed);
}

/* ---------- Abschnitte ---------- */

section {
  padding: 2.25rem 0;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h3 {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

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

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem;
}

.steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.875rem;
  align-items: start;
}

.steps .num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9375rem;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
}

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

.note {
  background: var(--warning-surface);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  font-size: 0.9375rem;
  color: var(--warning);
}

.note strong {
  color: inherit;
}

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

#warteliste {
  scroll-margin-top: 1.5rem;
}

.form-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.form-slot .placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

/* ---------- Fuß ---------- */

footer {
  margin-top: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

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

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

/* ---------- Rechtstexte ---------- */

.legal {
  padding: 2.5rem 0 1rem;
}

.legal h1 {
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  margin-bottom: 1.5rem;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.1875rem;
}

.legal h3 {
  margin-top: 1.5rem;
}

.legal p,
.legal li {
  color: var(--ink-muted);
}

.legal ul {
  padding-left: 1.25rem;
}

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

.legal address {
  font-style: normal;
  color: var(--ink);
}

.meta {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ---------- Statusseiten ---------- */

.status {
  min-height: 70vh;
  display: grid;
  align-content: center;
  padding: 3rem 0;
}

.status .emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 1rem;
}

/* ---------- Brevo-Formular im BiteMe-Design ----------
   Diese Datei wird NACH sib-styles.css geladen, damit sie gewinnt.
   Alle Inline-Styles aus dem Brevo-Embed wurden entfernt und hier ersetzt. */

.sib-form {
  /* Brevos grauer Rahmen (#EFF2F7) entfällt — die Karte kommt von uns. */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: left;
}

.sib-form #sib-container,
.sib-form .sib-form-container {
  max-width: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: left;
  direction: ltr;
}

/* Brevos Stylesheet setzt auf einzelnen Elementen Roboto. Da wir Brevos
   @font-face bewusst nicht laden, würde das auf eine Ersatzschrift fallen und
   mitten im Formular die Schrift wechseln. Deshalb erbt hier alles die
   Seitenschrift — !important, weil einige Brevo-Selektoren spezifischer sind. */
.sib-form,
.sib-form * {
  font-family: inherit !important;
}

.sib-form .sib-form-block {
  margin: 0 0 1.25rem;
  padding: 0;
}

.sib-form .sib-form-block:last-of-type {
  margin-bottom: 0;
}

.sib-form .entry__label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
}

.sib-form .input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}

.sib-form .input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

.sib-form .input::placeholder {
  color: var(--ink-muted);
  opacity: 0.7;
  font-family: inherit;
  text-align: left;
}

.sib-form .entry__specification {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-muted);
  text-align: left;
}

.sib-form .entry__error {
  display: none;
  margin-top: 0.375rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  background: #ffeded;
  color: #661d1d;
  font-size: 0.875rem;
}

.sib-form .entry__error:not(:empty) {
  display: block;
}

/* Checkbox-Zeilen. Die Tick-Darstellung selbst bleibt Brevos Mechanik
   (input_replaced + span.checkbox), damit deren Validierung nicht bricht. */
.sib-form .entry__choice > label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}

.sib-form .optin-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}

/* Brevo färbt Links im Formular blau (#2BB2FC). Alle Links hier auf die
   BiteMe-Primärfarbe, sonst hat das Formular zwei Linkfarben. */
.sib-form a {
  color: var(--primary);
  text-decoration: underline;
}

.sib-form a:hover {
  color: var(--primary-pressed);
}

.sib-form .sib-form__declaration {
  display: flex;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  direction: ltr;
}

.sib-form .sib-form__declaration p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.sib-form .sib-submit-block {
  text-align: left;
}

.sib-form .sib-form-block__button {
  display: inline-block;
  width: 100%;
  padding: 0.95rem 1.5rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sib-form .sib-form-block__button:hover,
.sib-form .sib-form-block__button:focus-visible {
  background: var(--primary-pressed);
}

/* Ladespinner im Button: Brevo färbt ihn blau, das passt nicht auf orange.
   Sichtbar ist er nur für den Moment des Absendens. */
.sib-form .sib-form-block__button .progress-indicator__icon {
  width: 1.125rem;
  height: 1.125rem;
  fill: #fff;
}

/* Verstecken mit Spezifität NULL. Brevo blendet Meldungen über die Klasse
   .sib-form-message-panel--active ein, und deren Regel steht in sib-styles.css
   — also VOR dieser Datei. Ein normales `.sib-form-message-panel{display:none}`
   hier würde sie überschreiben, und Fehler- wie Erfolgsmeldungen blieben
   unsichtbar. Genau deshalb nutzte Brevos Original :where(). Nicht ändern. */
:where(.sib-form-message-panel) {
  display: none;
}

/* Nur Aussehen — bewusst OHNE display, siehe oben. */
.sib-form-message-panel {
  width: 100%;
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  border: 0;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
}

.sib-form .sib-notification__icon {
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  margin-right: 0.625rem;
  fill: currentColor;
}

#success-message.sib-form-message-panel {
  background: #e7faf0;
  color: #085229;
}

#error-message.sib-form-message-panel {
  background: #ffeded;
  color: #661d1d;
}

/* Das Turnstile-Widget belegt intern mindestens 300px und schrumpft nicht
   weiter. Auf sehr schmalen Geräten scrollt es deshalb in seinem eigenen
   Kasten, statt die gesamte Seite horizontal zu verschieben. */
.sib-form .sib-captcha {
  overflow-x: auto;
}

/* Auf schmalen Geräten Innenabstände reduzieren, damit das Widget möglichst
   ohne eigenen Scrollbereich auskommt. */
@media (max-width: 24rem) {
  .wrap {
    padding: 0 0.875rem;
  }

  .sib-form {
    padding: 1rem;
  }
}

/* Brevos Spam-Falle. Doppelt abgesichert: Wäre das Feld sichtbar, würden
   Nutzer es ausfüllen und ihre Anmeldung würde stillschweigend verworfen. */
.sib-form .input--hidden,
.sib-form input[name='email_address_check'] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
