:root {
  --paper: #fafafa;
  --linen: #f3f1ec;
  --surface: #ffffff;
  --ink: #111110;
  --ink-soft: #4a4741;
  --ink-faint: #6a665e;
  --line: #e3dfd6;
  --line-strong: #c9c3b6;
  --brass: #7a5c22;
  --forest: #14533c;
  --baskerville: 'Libre Baskerville', Baskerville, 'Times New Roman', serif;
  --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--baskerville);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

.tabular { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  z-index: 200;
}
.skip-link:focus { left: 16px; }

.wrap {
  width: min(920px, calc(100% - 44px));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(680px, calc(100% - 40px));
  margin-inline: auto;
}
@media (max-width: 640px) {
  .wrap, .wrap-narrow { width: calc(100% - 28px); }
}

/* Nahezu unsichtbare Kopfleiste: 100 % Baskerville */
.ive-header {
  padding: 22px 0 0;
  position: relative;
  z-index: 30;
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.header-bar.with-back {
  justify-content: space-between;
}

.circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-faint);
  font-family: var(--baskerville);
  font-style: italic;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.35s ease, color 0.35s ease, background-color 0.35s ease;
}
.circle-btn:hover,
.circle-btn:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

/* Lebendige Flug-Ebene der Honigbiene über dem gesamten Papierbogen */
.bee-flight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
}
.living-bee {
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
  will-change: transform;
  filter: drop-shadow(0 6px 8px rgba(20, 18, 14, 0.11));
}
.living-bee.is-perched {
  filter: drop-shadow(0 2px 3px rgba(20, 18, 14, 0.08));
}

/* Haupt-Leinwand: 85 % stiller Baumwollpapier-Raum */
.contact-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 56px;
}
.canvas-stack {
  width: 100%;
  text-align: center;
}

.wordmark-wrap {
  position: relative;
  display: inline-block;
  padding: 28px 12px 10px;
}

/* Echte Baskerville-Proportion wie auf lovefrom.com */
.monument-name {
  font-family: var(--baskerville);
  font-weight: 400;
  font-size: clamp(2.35rem, 6.4vw, 5.15rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0 0 34px;
  color: var(--ink);
}
.ive-char {
  display: inline-block;
  cursor: default;
  opacity: 0;
  transform: translateY(0);
  transition: transform 0.42s cubic-bezier(0.22, 1.4, 0.36, 1), color 0.35s ease, opacity 0.12s ease;
  will-change: transform, opacity;
}
.ive-char.is-typed {
  opacity: 1;
}
.ive-char.is-weighed,
.ive-char:hover {
  transform: translateY(4.5px);
  color: var(--brass);
}
.ive-space { display: inline-block; width: 0.28em; }

.type-caret {
  display: inline-block;
  width: 2px;
  height: 0.88em;
  background: var(--brass);
  margin-left: 3px;
  vertical-align: -0.08em;
  transition: opacity 0.4s ease;
}
.type-caret.is-done {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ive-char { opacity: 1 !important; transition: none; }
  .type-caret { display: none; }
}

.identity-line {
  font-family: var(--baskerville);
  font-style: italic;
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto 38px;
}

/* Ruhige Einladung in Baskerville Italic */
.invite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 30px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-family: var(--baskerville);
  font-style: italic;
  font-size: 1.0625rem;
  cursor: pointer;
  transition: border-color 0.35s ease, background-color 0.35s ease, color 0.35s ease, transform 0.35s var(--ease-settle);
}
.invite-btn:hover,
.invite-btn:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

/* Bütten-Briefblatt */
.unfolded-letter {
  max-width: 520px;
  margin: 8px auto 0;
  padding: 28px 32px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  box-shadow: 0 18px 46px rgba(20, 20, 19, 0.04);
  animation: gentleUnfold 0.38s var(--ease-settle);
}
@keyframes gentleUnfold {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .unfolded-letter { padding: 22px 18px; }
}

.line-field,
.line-textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--baskerville);
  font-size: 1rem;
  padding: 12px 2px;
  border-radius: 0;
  transition: border-color 0.25s ease;
}
.line-field { min-height: 46px; margin-bottom: 14px; }
.line-textarea {
  min-height: 98px;
  resize: vertical;
  line-height: 1.6;
  margin-bottom: 14px;
}
.line-field::placeholder,
.line-textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}
.line-field:focus,
.line-textarea:focus {
  outline: none;
  border-bottom-color: var(--brass);
}

.summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

.letter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btn-ink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--baskerville);
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s var(--ease-settle);
}
.btn-ink:hover {
  background: var(--forest);
  border-color: var(--forest);
  transform: translateY(-1px);
}
.quiet-link-btn {
  font-family: var(--baskerville);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  padding: 8px 4px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.quiet-link-btn:hover { color: var(--brass); }

/* Impressum & Datenschutz */
.section-calm { padding: 56px 0 72px; }
.kicker {
  display: inline-block;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--brass);
  margin-bottom: 10px;
}
.serif-h2 {
  font-family: var(--baskerville);
  font-weight: 400;
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  margin: 0 0 22px;
}
.paper-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

.ive-footer {
  padding: 18px 0 26px;
  font-size: 0.875rem;
  color: var(--ink-faint);
}
.footer-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px;
  align-items: center;
}
.footer-flex a {
  font-family: var(--baskerville);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--ink-faint);
  text-decoration: none;
}
.footer-flex a:hover { color: var(--ink); }

/* DIN-A4 Druck-Karte ("Die Rückseite der Schublade" bei Cmd+P) */
#buhannou-print-card { display: none; }

@media print {
  @page { size: A4 portrait; margin: 28mm 24mm; }
  html, body { background: #ffffff !important; color: #111110 !important; }
  .ive-header, .bee-flight-layer, .canvas-stack, .ive-footer { display: none !important; }
  .contact-canvas { display: block !important; padding: 0 !important; }
  #buhannou-print-card {
    display: block !important;
    font-family: var(--baskerville);
    text-align: center;
    padding-top: 54mm;
  }
}
