/* Platzhalter für co-story.de: Startseite, Impressum, Datenschutz.
 *
 * Bewusst ohne React und ohne Bezug auf `src/`: Unter co-story.de liefert der
 * Worker nur, was in `public/bald/` liegt. Die Werte sind eine Abschrift aus
 * `src/theme/tokens.css` (Aussehen „Pop warm"); wer dort Farben ändert, zieht
 * sie hier nach. Namensraum `bd`, damit nichts mit der Anwendung kollidiert,
 * falls die Datei je neben ihr geladen wird.
 */

/* Schriften selbst gehostet, Kopien aus `src/fonts-v2/`. Nie über
   fonts.googleapis.com: Das überträgt die IP jedes Besuchers an Google. */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/bricolage-grotesque-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/caveat-latin.woff2') format('woff2');
}

:root {
  --grund: #faf6f0;
  --flaeche: #f2ebe1;
  --karte: #fffdf9;
  --papier: #fffcf6;
  --tief: #221c18;
  --schrift: #2b2420;
  --zweitschrift: #6f6359;
  --linie: #e3d9cc;
  --akzent: #b2472a;
  --akzent-hover: #963a22;
  --akzent-leise: #f8e4d6;
  --warnung: #7a5510;
  --warnung-flaeche: #f8eedd;

  --sans: 'Bricolage Grotesque', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --hand: 'Caveat', cursive;

  --rand: 50px;
  --radius-karte: 18px;
  --schatten-buch: 0 34px 70px rgba(70, 45, 25, 0.28);
  --schatten-ui: 0 14px 30px rgba(70, 45, 25, 0.08);
  --kurve: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 3px;
  border-radius: 4px;
}

.betont {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.bd-bahn {
  max-width: calc(1180px + 2 * var(--rand));
  margin: 0 auto;
  padding: 0 var(--rand);
}

/* --- Kopf --- */

.bd-kopf {
  padding: 26px 0;
}

.bd-wortmarke {
  font: 800 22px/1 var(--sans);
  letter-spacing: -0.03em;
  color: var(--tief);
  text-decoration: none;
}

.bd-wortmarke span {
  color: var(--akzent);
}

/* --- Hero --- */

.bd-hero {
  padding: 48px 0 96px;
}

.bd-hero-raster {
  display: grid;
  gap: 64px;
  align-items: center;
}

@media (min-width: 980px) {
  .bd-hero-raster {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.bd-marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--flaeche);
  font: 500 14px/1.3 var(--sans);
}

/* Ein ruhiger Punkt, der atmet: Hier tut sich etwas. */
.bd-marke::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--akzent);
  animation: bd-atmen 2.4s ease-in-out infinite;
}

.bd-h1 {
  margin-top: 22px;
  max-width: 15ch;
  font: 800 clamp(40px, 6.2vw, 78px) / 0.98 var(--sans);
  letter-spacing: -0.05em;
  color: var(--tief);
  text-wrap: balance;
}

.bd-h1 .betont {
  font-size: 1.1em;
}

.bd-unterzeile {
  margin-top: 24px;
  max-width: 36ch;
  font: 400 20px/1.5 var(--sans);
  color: var(--zweitschrift);
}

/* --- Das Buch: ein aufgeschlagenes Exemplar aus Papier und einem Foto --- */

.bd-buehne {
  display: flex;
  justify-content: center;
  perspective: 1600px;
}

.bd-buch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 500px);
  aspect-ratio: 2 / 1.42;
  transform: rotateX(8deg) rotateZ(-2deg);
  box-shadow: var(--schatten-buch);
  animation: bd-schweben 7s ease-in-out 1.4s infinite;
}

.bd-seite {
  position: relative;
  background: var(--papier);
  overflow: hidden;
}

/* Der Bund: Die Seiten wölben sich zur Mitte hin. */
.bd-seite--links {
  border-radius: 4px 0 0 4px;
  background: linear-gradient(to left, rgba(70, 45, 25, 0.14), transparent 14%), var(--papier);
  padding: 9% 8% 9% 9%;
}

.bd-seite--rechts {
  border-radius: 0 4px 4px 0;
  background: linear-gradient(to right, rgba(70, 45, 25, 0.12), transparent 14%), var(--papier);
  padding: 11% 10% 9% 11%;
}

.bd-foto {
  width: 100%;
  height: 78%;
  object-fit: cover;
  object-position: 50% 40%;
}

.bd-bildzeile {
  margin-top: 6%;
  font: 600 clamp(15px, 2.6vw, 21px) / 1.1 var(--hand);
  color: var(--zweitschrift);
  transform: rotate(-2deg);
}

.bd-art {
  font: 600 clamp(8px, 1.4vw, 10px) / 1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--akzent);
}

.bd-name {
  margin-top: 8%;
  font: 800 clamp(16px, 3vw, 24px) / 1 var(--sans);
  letter-spacing: -0.04em;
  color: var(--tief);
}

.bd-zeilen {
  margin-top: 10%;
  display: grid;
  gap: clamp(7px, 1.6vw, 11px);
}

.bd-zeilen span {
  display: block;
  height: clamp(4px, 0.9vw, 6px);
  border-radius: 3px;
  background: var(--linie);
}

.bd-zeilen span:nth-child(2) { width: 86%; }
.bd-zeilen span:nth-child(3) { width: 93%; }
.bd-zeilen span:nth-child(4) { width: 64%; }

/* Die Widmung schreibt sich von links nach rechts hinein. */
.bd-widmung {
  margin-top: 12%;
  font: 600 clamp(17px, 3.1vw, 26px) / 1.1 var(--hand);
  color: var(--schrift);
  transform: rotate(-3deg);
  clip-path: inset(0 0 0 0);
  animation: bd-schreiben 1.6s var(--kurve) 1.1s backwards;
}

.bd-notiz {
  position: absolute;
  right: -14px;
  bottom: -18px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--akzent);
  color: #fff;
  font: 500 14px/1.2 var(--sans);
  box-shadow: var(--schatten-ui);
  transform: rotate(3deg);
  animation: bd-notiz 0.8s var(--kurve) 2.2s backwards;
}

/* --- Was dich erwartet --- */

.bd-sektion {
  padding: 96px 0;
  background: var(--flaeche);
}

.bd-h2 {
  font: 800 clamp(34px, 4.6vw, 58px) / 1.02 var(--sans);
  letter-spacing: -0.045em;
  color: var(--tief);
}

.bd-liste {
  margin-top: 48px;
  display: grid;
  gap: 18px;
}

@media (min-width: 720px) {
  .bd-liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .bd-liste {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bd-punkt {
  padding: 28px 28px 30px;
  border-radius: var(--radius-karte);
  background: var(--karte);
  box-shadow: var(--schatten-ui);
  transition: transform 200ms var(--kurve);
}

.bd-punkt:hover {
  transform: translateY(-3px);
}

.bd-nummer {
  display: block;
  font: 400 30px/1 var(--serif);
  font-style: italic;
  color: var(--akzent);
}

.bd-punkt h3 {
  margin-top: 16px;
  font: 700 21px/1.2 var(--sans);
  letter-spacing: -0.015em;
  color: var(--tief);
}

.bd-punkt p {
  margin-top: 10px;
  font: 400 16px/1.6 var(--sans);
  color: var(--zweitschrift);
}

.bd-arten {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bd-arten li {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--akzent-leise);
  font: 500 13px/1.3 var(--sans);
  color: var(--schrift);
}

/* --- Bald --- */

.bd-bald {
  padding: 104px 0 112px;
  text-align: center;
}

.bd-bald .bd-h2 {
  font-size: clamp(38px, 5.4vw, 70px);
}

.bd-bald p {
  margin: 20px auto 0;
  max-width: 40ch;
  font: 400 19px/1.5 var(--sans);
  color: var(--zweitschrift);
}

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

.bd-fuss {
  border-top: 1px solid var(--linie);
  padding: 28px 0 36px;
  font: 400 15px/1.4 var(--sans);
  color: var(--zweitschrift);
}

.bd-fuss-inhalt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.bd-fuss nav {
  display: flex;
  gap: 24px;
}

.bd-fuss nav a {
  text-decoration: none;
}

.bd-fuss nav a:hover,
.bd-fuss nav a[aria-current='page'] {
  color: var(--akzent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --- Rechtstexte --- */

.bd-recht {
  padding: 40px 0 96px;
}

.bd-recht-spalte {
  max-width: 720px;
}

.bd-zurueck {
  display: inline-block;
  margin-bottom: 32px;
  font: 500 15px/1.4 var(--sans);
  color: var(--akzent);
  text-decoration: none;
}

.bd-zurueck:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.bd-recht h1 {
  font: 800 clamp(36px, 5vw, 56px) / 1.02 var(--sans);
  letter-spacing: -0.045em;
  color: var(--tief);
}

.bd-recht h2 {
  margin-top: 44px;
  font: 700 22px/1.2 var(--sans);
  letter-spacing: -0.015em;
  color: var(--tief);
}

.bd-recht p,
.bd-recht li {
  font: 400 17px/1.65 var(--sans);
}

.bd-recht p {
  margin-top: 14px;
}

.bd-recht ul {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.bd-recht li {
  position: relative;
  padding-left: 22px;
}

.bd-recht li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--akzent);
}

.bd-recht a {
  color: var(--akzent);
  overflow-wrap: anywhere;
}

.bd-recht address {
  margin-top: 14px;
  font-style: normal;
  font: 400 17px/1.65 var(--sans);
}

.bd-stand {
  margin-top: 48px !important;
  font-size: 15px !important;
  color: var(--zweitschrift);
}

/* Platzhalter, die Samuel vor dem Freischalten ersetzt. Absichtlich laut,
   damit keiner übersehen wird. */
.platzhalter {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--warnung-flaeche);
  color: var(--warnung);
  font-weight: 600;
  outline: 1px dashed var(--warnung);
}

/* --- Bewegung beim Laden --- */

.bd-rein {
  animation: bd-rein 0.9s var(--kurve) backwards;
}

.bd-rein--2 { animation-delay: 0.1s; }
.bd-rein--3 { animation-delay: 0.2s; }
.bd-rein--4 { animation-delay: 0.35s; }

.bd-buehne.bd-rein {
  animation-name: bd-buch-rein;
  animation-duration: 1.1s;
  animation-delay: 0.25s;
}

@keyframes bd-rein {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes bd-buch-rein {
  from { opacity: 0; transform: translateY(60px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

@keyframes bd-schweben {
  0%, 100% { transform: rotateX(8deg) rotateZ(-2deg) translateY(0); }
  50% { transform: rotateX(8deg) rotateZ(-2deg) translateY(-8px); }
}

@keyframes bd-schreiben {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes bd-notiz {
  from { opacity: 0; transform: translateY(10px) rotate(-4deg); }
  to { opacity: 1; transform: rotate(3deg); }
}

@keyframes bd-atmen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* Wer „Bewegung reduzieren" eingestellt hat, bekommt ein Standbild. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Handy --- */

@media (max-width: 640px) {
  :root {
    --rand: 20px;
  }

  body {
    font-size: 16px;
  }

  .bd-kopf {
    padding: 20px 0;
  }

  .bd-hero {
    padding: 24px 0 72px;
  }

  .bd-hero-raster {
    gap: 48px;
  }

  .bd-unterzeile {
    font-size: 17.5px;
  }

  .bd-notiz {
    right: -4px;
    bottom: -16px;
    font-size: 13px;
  }

  .bd-sektion {
    padding: 64px 0;
  }

  .bd-liste {
    margin-top: 32px;
  }

  .bd-punkt {
    padding: 24px 22px 26px;
  }

  .bd-bald {
    padding: 72px 0 80px;
  }

  .bd-bald p {
    font-size: 17px;
  }

  .bd-recht {
    padding: 24px 0 72px;
  }

  .bd-recht p,
  .bd-recht li,
  .bd-recht address {
    font-size: 16px;
  }
}
