/* papsdorf.net – Stylesheet
   Layout: eine ruhige Lesespalte, Inhalte als klar gruppierte Flächen,
   transluzente Kopfleiste darüber. Farbwelt ausschließlich Schwarz, Weiß und Graustufen. */

:root {
  --bg: #fbfbfb;
  --surface: #ffffff;
  --surface-2: #f1f1f2;
  --fg: #1d1d1f;
  --fg-2: #5e5e63;
  --fg-3: #86868b;
  --line: rgba(29, 29, 31, .1);
  --btn: #1d1d1f;
  --btn-fg: #ffffff;
  --btn-press: #424245;
  --nav: rgba(251, 251, 251, .74);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .06);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .05), 0 18px 44px rgba(0, 0, 0, .10);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-l: 28px;
  --radius-m: 18px;
  --gutter: 20px;
  --ease-spring: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --surface: #161617; --surface-2: #1f1f21; --fg: #f5f5f7; --fg-2: #a1a1a6; --fg-3: #77777c;
    --line: rgba(245, 245, 247, .12); --btn: #f5f5f7; --btn-fg: #000000; --btn-press: #c7c7cc;
    --nav: rgba(22, 22, 23, .74);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .35);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 44px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #161617; --surface-2: #1f1f21; --fg: #f5f5f7; --fg-2: #a1a1a6; --fg-3: #77777c;
  --line: rgba(245, 245, 247, .12); --btn: #f5f5f7; --btn-fg: #000000; --btn-press: #c7c7cc;
  --nav: rgba(22, 22, 23, .74);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .45), 0 18px 44px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 1.0625rem/1.55 var(--font); letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--nav);
}
img { max-width: 100%; }
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--fg-3); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--fg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 8px; }
p { margin: 0; text-wrap: pretty; hyphens: auto; -webkit-hyphens: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); text-wrap: balance; hyphens: manual; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: calc(16px + env(safe-area-inset-top, 0px)); z-index: 100; background: var(--surface); color: var(--fg); padding: 8px 14px; border-radius: 10px; }

/* Kopfleiste: transluzentes Material, Inhalte scrollen darunter */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow .3s ease;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line); }
.nav .wrap { display: flex; align-items: center; min-height: 52px; padding-block: 10px; }
.brand { font-weight: 600; font-size: .9375rem; line-height: 1.3; letter-spacing: -.01em; color: var(--fg); text-decoration: none; }

/* Typografie: Laufweite und Zeilenabstand je Größe */
.display { font-size: clamp(2.25rem, 7.2vw, 5rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.display span { display: block; }
.display span + span { color: var(--fg-2); }
.h2 { font-size: clamp(1.75rem, 4.4vw, 3rem); line-height: 1.1; letter-spacing: -.028em; font-weight: 700; }
.h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.22; letter-spacing: -.018em; font-weight: 650; }
.body { color: var(--fg-2); max-width: 64ch; }

section { padding-block: clamp(56px, 10vw, 120px); }

/* Hero */
.hero { padding-block: clamp(36px, 8vw, 96px) clamp(36px, 6vw, 72px); }
.hero-grid { display: grid; gap: clamp(28px, 5vw, 56px); }
.hero-text { display: grid; gap: 22px; min-width: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  font: 500 1rem/1 var(--font); padding: 13px 24px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--btn); color: var(--btn-fg); text-decoration: none;
  transition: transform .35s var(--ease-spring), background-color .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn.pressed, .btn:active { transform: scale(.97); background: var(--btn-press); transition: transform .1s ease-out; }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.btn.ghost.pressed, .btn.ghost:active { background: var(--surface-2); }

.figure {
  margin: 0; border-radius: var(--radius-l); overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow); max-width: 100%;
}
.figure img { display: block; width: 100%; height: auto; }
.figure picture { display: block; height: 100%; }
.figure.hero-img { aspect-ratio: 2000 / 1186; }
.figure.hero-img img { height: 100%; object-fit: cover; }
.figure.books-img { aspect-ratio: 2048 / 850; background: var(--surface); }
.img-fallback {
  display: grid; place-items: center; height: 100%; padding: 24px; text-align: center;
  color: var(--fg-3); font-size: .875rem;
  background: linear-gradient(160deg, var(--surface-2), var(--bg));
}

/* Leitsatz */
.band { background: var(--surface); }
.statement { display: grid; gap: 24px; }
.statement .h2 { max-width: 18ch; }
.statement .body { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.6; max-width: 62ch; }

/* Bereiche */
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 5vw, 56px); }
.cards { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 980px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards > :last-child:nth-child(odd) { grid-column: auto; }
}
.card {
  background: var(--surface); border-radius: var(--radius-m); padding: clamp(22px, 3vw, 34px);
  display: grid; gap: 14px; align-content: start; min-width: 0;
  box-shadow: var(--shadow);
  transition: transform .45s var(--ease-spring), box-shadow .45s var(--ease-spring);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
}
.tag { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.card p { color: var(--fg-2); font-size: 1rem; line-height: 1.58; }

/* Angebot */
.offer-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: clamp(32px, 6vw, 72px); }
@media (min-width: 720px) { .offer-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.offer-item { display: grid; gap: 12px; padding-block: 28px; border-top: 1px solid var(--line); min-width: 0; }
.offer-item p { color: var(--fg-2); font-size: 1rem; line-height: 1.6; }

/* Über mich */
.about-grid { display: grid; gap: clamp(24px, 5vw, 64px); align-items: start; }
.about-grid .h2 { max-width: 12ch; }
.about-copy { display: grid; gap: 28px; min-width: 0; }
.quote {
  background: var(--surface); border-radius: var(--radius-m); padding: clamp(22px, 3vw, 34px);
  font-size: clamp(1.0625rem, 1.8vw, 1.3rem); line-height: 1.5; letter-spacing: -.012em; color: var(--fg);
  box-shadow: var(--shadow);
}

/* Bücher */
.books { padding-top: 0; }

/* Kontakt */
.contact-grid { display: grid; gap: clamp(24px, 5vw, 64px); }
.contact-grid .section-head { margin-bottom: 0; }
address { font-style: normal; display: grid; gap: 4px; color: var(--fg-2); }
address strong { color: var(--fg); font-weight: 600; }
.channels { display: grid; gap: 12px; min-width: 0; }
.channel {
  display: flex; align-items: center; gap: 8px 16px; justify-content: space-between; flex-wrap: wrap;
  background: var(--bg); border-radius: var(--radius-m); padding: 16px 12px 16px 20px; min-width: 0;
}
.channel > div { min-width: 0; }
.k { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.v { font-size: 1.125rem; letter-spacing: -.01em; color: var(--fg); overflow-wrap: anywhere; }
.copy {
  font: 500 .875rem/1 var(--font); color: var(--fg); background: transparent; border: 0;
  min-height: 40px; padding: 10px 14px; border-radius: 999px; cursor: pointer;
  transition: transform .35s var(--ease-spring), background-color .15s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.copy:hover { background: var(--surface-2); }
.copy.pressed, .copy:active { transform: scale(.95); background: var(--surface-2); transition: transform .1s ease-out; }

footer { padding-block: 28px 40px; }
footer .wrap > div { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8125rem; color: var(--fg-3); border-top: 1px solid var(--line); padding-top: 20px; }
footer a { color: var(--fg-3); text-decoration: none; }
footer a:hover { color: var(--fg); }

/* Hinweis nach dem Kopieren: erscheint und verschwindet am selben Ort */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  max-width: calc(100% - 32px);
  transform: translate(-50%, 16px) scale(.96); opacity: 0; pointer-events: none;
  background: var(--nav); color: var(--fg); font-weight: 500; font-size: .9375rem;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transition: transform .45s var(--ease-spring), opacity .25s ease;
}
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }

/* Einblenden aus sichtbarem Ruhezustand */
.reveal { transition: transform .8s var(--ease-spring), opacity .8s ease; }
.js .reveal.pending { transform: translateY(14px); opacity: .001; }

/* 404 */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: 20px; }

/* Breitere Bildschirme */
@media (min-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 5fr 7fr; }
  .contact-grid { align-items: start; }
}

/* Smartphones */
@media (max-width: 600px) {
  :root { --gutter: 18px; --radius-l: 20px; --radius-m: 16px; }
  body { font-size: 1rem; }
  .brand { font-size: .875rem; }
  .cta-row .btn { flex: 1 1 140px; }
  .card p, .offer-item p { font-size: .975rem; }
  .v { font-size: 1.0625rem; }
}

/* Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .js .reveal.pending { transform: none; opacity: 1; }
  .card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav, .toast, body::before { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .card, .quote, .channel, .figure { box-shadow: none; border: 1px solid var(--fg-2); }
  .nav { background: var(--bg); box-shadow: 0 1px 0 var(--fg-2); }
  .body, .card p, .offer-item p { color: var(--fg); }
}
@media print {
  .nav, .toast, .cta-row, .copy { display: none; }
  .card, .quote, .figure { box-shadow: none; }
}
