/* ===== Selbst gehostete Schriften (Ordner fonts/ neben dieser Datei) ===== */
@font-face { font-display: swap; font-family: "Literata"; font-style: normal; font-weight: 400; src: url("fonts/literata-v40-latin-regular.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Literata"; font-style: italic; font-weight: 400; src: url("fonts/literata-v40-latin-italic.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Literata"; font-style: normal; font-weight: 600; src: url("fonts/literata-v40-latin-600.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "IM Fell English"; font-style: normal; font-weight: 400; src: url("fonts/im-fell-english-v14-latin-regular.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "IM Fell English"; font-style: italic; font-weight: 400; src: url("fonts/im-fell-english-v14-latin-italic.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Chakra Petch"; font-style: normal; font-weight: 400; src: url("fonts/chakra-petch-v13-latin-regular.woff2") format("woff2"); }
@font-face { font-display: swap; font-family: "Chakra Petch"; font-style: normal; font-weight: 600; src: url("fonts/chakra-petch-v13-latin-600.woff2") format("woff2"); }

/* ===== Tokens ===== */
:root {
  --paper: #E3E6EA;      /* kühles Papier für den Inhaltsbereich */
  --ink: #1E2238;        /* Eisengallus-Tinte, Fließtext */
  --ink-soft: #4A4F6A;
  --gilt: #C9A24B;       /* Blattgold auf Leder */
  --gilt-dark: #8A6A22;  /* Gold auf hellem Grund (Kontrast) */
  --oxblood: #4E1B20;    /* Ledereinband, Fantasy */
  --space: #0D1B2A;      /* Tiefraum, Science-Fiction */
  --ice: #7FD0E6;        /* Signal-Cyan, Science-Fiction */

  --f-body: "Literata", Georgia, "Times New Roman", serif;
  --f-fantasy: "IM Fell English", "Palatino Linotype", Palatino, serif;
  --f-scifi: "Chakra Petch", "Segoe UI", system-ui, sans-serif;

  --split: 50%;
  --measure: 38rem;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(4.5rem + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gilt-dark); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: calc(1rem + env(safe-area-inset-top, 0px)); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 600; font-size: 1.1rem; }
.brand-mark { width: .7rem; height: 1.6rem; background: linear-gradient(90deg, var(--oxblood) 50%, var(--space) 50%); border-radius: 2px; box-shadow: inset 0 0 0 1px var(--gilt); }
.nav { display: flex; gap: 1.6rem; align-items: center; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: .25em; }
.nav-shop { padding: .35rem .9rem; border: 1px solid var(--ink); border-radius: 2px; }
.nav-shop:hover { background: var(--ink); color: var(--paper); text-decoration: none !important; }
.nav-toggle { display: none; font: inherit; background: none; border: 1px solid var(--ink); padding: .3rem .8rem; color: inherit; cursor: pointer; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0;
         background: var(--paper); border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .9rem clamp(1rem, 4vw, 3rem); width: 100%; }
  .nav-shop { border: 0; }
}

/* ===== Hero: zwei Welten ===== */
.hero {
  position: relative;
  height: min(82vh, 46rem);
  min-height: 28rem;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: ew-resize;
}
.world { position: absolute; inset: 0; }
.world-inner {
  position: relative; height: 100%;
  display: grid; grid-template-rows: 1fr auto; align-items: center;
  padding: clamp(1.5rem, 5vw, 4rem);
}
.wordmark {
  margin: 0; text-align: center; line-height: .9;
  font-size: clamp(3.4rem, 15vw, 12rem);
}
.world-copy { max-width: 22rem; }
.world-copy h2 { margin: 0 0 .3rem; font-weight: 400; font-size: 1.6rem; }
.world-copy p { margin: 0; }

/* Fantasy: Ledereinband mit Goldprägung */
.world-fantasy {
  background:
    radial-gradient(ellipse at 30% 40%, #6A262C 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, #2E0F12 0%, transparent 55%),
    var(--oxblood);
  color: var(--gilt);
}
.world-fantasy::before { /* doppelte Goldlinie wie auf einem Buchdeckel */
  content: ""; position: absolute; inset: clamp(.8rem, 2vw, 1.4rem);
  border: 1px solid color-mix(in srgb, var(--gilt) 70%, transparent);
  outline: 1px solid color-mix(in srgb, var(--gilt) 35%, transparent);
  outline-offset: 5px; pointer-events: none;
}
.world-fantasy .wordmark { font-family: var(--f-fantasy); font-style: italic; text-shadow: 0 1px 0 #2a0c0f; }
.world-fantasy .world-copy { font-family: var(--f-fantasy); font-size: 1.2rem; color: #E7D3A2; justify-self: start; }

/* Science-Fiction: Sternenkarte */
.world-scifi {
  background:
    radial-gradient(1px 1px at 12% 22%, #fff 99%, transparent),
    radial-gradient(1px 1px at 68% 14%, #cfefff 99%, transparent),
    radial-gradient(1.5px 1.5px at 84% 62%, #fff 99%, transparent),
    radial-gradient(1px 1px at 41% 78%, #9fe0f2 99%, transparent),
    radial-gradient(1px 1px at 92% 30%, #fff 99%, transparent),
    radial-gradient(1px 1px at 57% 48%, #fff 99%, transparent),
    radial-gradient(1px 1px at 25% 64%, #cfefff 99%, transparent),
    repeating-linear-gradient(0deg, transparent 0 59px, rgba(127,208,230,.07) 59px 60px),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(127,208,230,.07) 59px 60px),
    radial-gradient(ellipse at 75% 30%, #173452 0%, transparent 60%),
    var(--space);
  color: var(--ice);
  clip-path: inset(0 0 0 var(--split));
}
.world-scifi .wordmark { font-family: var(--f-scifi); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(2.8rem, 12.5vw, 10rem); }
.world-scifi .world-copy { font-family: var(--f-scifi); color: #CDEAF3; justify-self: end; text-align: right; }

/* Buchrücken als Griff */
.spine {
  position: absolute; top: 0; bottom: 0; left: var(--split);
  width: 1.4rem; transform: translateX(-50%);
  background: linear-gradient(90deg, #2a1416, #5b3a1c 30%, #7a5a26 50%, #5b3a1c 70%, #14202e);
  box-shadow: 0 0 18px rgba(0,0,0,.55);
  display: flex; flex-direction: column; justify-content: space-evenly; align-items: center;
  cursor: ew-resize; touch-action: none; z-index: 2;
}
.spine:focus-visible { outline: 2px solid var(--ice); outline-offset: 0; }
.spine-band { width: 100%; height: .5rem; background: linear-gradient(180deg, #a07c34, var(--gilt) 50%, #6a4e18); border-radius: 1px; }

@media (max-width: 720px) {
  .hero { height: 78vh; }
  .world-inner { grid-template-rows: 1fr auto; }
  .world-copy { max-width: 46%; font-size: 1rem !important; }
  .world-copy h2 { font-size: 1.2rem; }
}

/* ===== Intro ===== */
.intro { padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem); max-width: 52rem; margin: 0 auto; text-align: center; }
.intro h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 600; line-height: 1.25; margin: 0 0 1.2rem; text-wrap: balance; }
.intro p { max-width: var(--measure); margin: 0 auto 2rem; color: var(--ink-soft); }
.intro-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; padding: .75rem 1.5rem; border-radius: 2px; cursor: pointer; border: 1px solid var(--ink); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--oxblood); border-color: var(--oxblood); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

/* ===== Sektionen ===== */
.section { padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem); max-width: 72rem; margin: 0 auto; }
.section h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }

.filter { display: flex; gap: .4rem; flex-wrap: wrap; }
.filter button { font: inherit; font-size: .95rem; background: none; color: var(--ink); border: 1px solid transparent; padding: .3rem .8rem; cursor: pointer; border-radius: 2px; }
.filter button[aria-pressed="true"] { border-color: var(--ink); }

/* Bücher */
.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 2.5rem 2rem; }
.book a { text-decoration: none; display: block; }
.cover {
  aspect-ratio: 2 / 3; position: relative; overflow: hidden;
  border-radius: 1px 4px 4px 1px;
  box-shadow: -4px 0 0 rgba(0,0,0,.18) inset, 0 10px 22px -12px rgba(30,34,56,.6);
  transition: transform .25s ease;
}
.book a:hover .cover, .book a:focus-visible .cover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .cover { transition: none; } }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-gen { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1.2rem; }
.cover-gen .c-title { font-size: clamp(1.1rem, 2.2vw, 1.7rem); overflow-wrap: anywhere; hyphens: auto; line-height: 1.1; margin: 0 0 .8rem; }
.cover-gen .c-author { font-size: .9rem; margin: 0; }
.cover-fantasy { background: radial-gradient(ellipse at 40% 35%, #6A262C, var(--oxblood) 70%); color: var(--gilt); font-family: var(--f-fantasy); }
.cover-fantasy::before { content: ""; position: absolute; inset: .6rem; border: 1px solid color-mix(in srgb, var(--gilt) 60%, transparent); }
.cover-fantasy .c-title { font-style: italic; }
.cover-scifi { background: radial-gradient(ellipse at 70% 25%, #173452, var(--space) 70%); color: var(--ice); font-family: var(--f-scifi); }
.cover-scifi::before { content: ""; position: absolute; left: 1rem; right: 1rem; top: 38%; height: 1px; background: color-mix(in srgb, var(--ice) 50%, transparent); }
.cover-scifi .c-title { text-transform: uppercase; letter-spacing: .03em; font-size: clamp(1rem, 1.8vw, 1.4rem); font-weight: 600; }
.cover-soon { opacity: .55; }

.book-meta { margin-top: 1rem; }
.book-meta h3 { margin: 0; font-size: 1.1rem; }
.book-meta p { margin: .15rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.book-meta .genre-fantasy { color: var(--oxblood); }
.book-meta .genre-scifi { color: #1F5A70; }

/* Autoren */
.section-authors { border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.authors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem 4rem; }
@media (max-width: 720px) { .authors { grid-template-columns: 1fr; } }
.author { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.25rem; align-items: start; }
.author-portrait { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; background: var(--ink); color: var(--gilt); display: grid; place-items: center; font-family: var(--f-fantasy); font-size: 2rem; }
.author h3 { margin: 0; font-size: 1.25rem; }
.author .author-genres { margin: .1rem 0 .6rem; color: var(--ink-soft); font-size: .95rem; }
.author p { margin: 0 0 .6rem; max-width: var(--measure); }
.text-link { color: var(--gilt-dark); font-weight: 600; text-underline-offset: .25em; }
.text-link:hover { color: var(--oxblood); }

/* Über mich */
.about { border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, var(--measure)); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.about-portrait { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px;
  background: linear-gradient(90deg, var(--oxblood) 50%, var(--space) 50%); color: var(--gilt);
  display: grid; place-items: center; font-family: var(--f-fantasy); font-size: 3rem; box-shadow: inset 0 0 0 1px var(--gilt); }
.about-text h2 { margin-bottom: 1rem; }
.about-text p { margin: 0 0 1rem; }
.about-note { padding-left: 1rem; border-left: 3px solid var(--gilt-dark); font-style: italic; }
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about-portrait { max-width: 10rem; }
}
.section-note { margin: 0; color: var(--ink-soft); flex-basis: 100%; }

/* Thriller-Cover */
.cover-thriller { background: linear-gradient(160deg, #3A3D46, #1D1F25 75%); color: #ECEDEF; font-family: var(--f-body); }
.cover-thriller::before { content: ""; position: absolute; left: 0; right: 0; bottom: 22%; height: 3px; background: #9E2A2B; }
.cover-thriller .c-title { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; font-size: clamp(1rem, 1.8vw, 1.35rem); }
.book-meta .genre-thriller { color: #7A2224; }
.cover-gen .c-series { font-size: .8rem; margin: 0 0 .6rem; opacity: .85; }

/* Newsletter: Endpapier-Fläche */
.newsletter {
  max-width: none; margin: 0;
  background: var(--ink); color: var(--paper);
  padding-left: max(clamp(1rem, 4vw, 3rem), calc((100% - 66rem) / 2));
  padding-right: max(clamp(1rem, 4vw, 3rem), calc((100% - 66rem) / 2));
}
.newsletter > * { max-width: var(--measure); }
.newsletter p { color: #C6C9D6; }
.newsletter label[for="email"] { display: block; font-weight: 600; margin: 1.5rem 0 .4rem; }
.field-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.field-row input { flex: 1 1 14rem; font: inherit; padding: .7rem .9rem; border: 1px solid #6A6F8C; background: #262B45; color: var(--paper); border-radius: 2px; }
.field-row input::placeholder { color: #8D92AC; }
.newsletter .btn-primary { background: var(--gilt); color: var(--ink); border-color: var(--gilt); }
.newsletter .btn-primary:hover { background: #E0BC66; }
.newsletter :focus-visible { outline-color: var(--gilt); }
.consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1rem; font-size: .9rem; color: #C6C9D6; }
.consent input { margin-top: .3rem; accent-color: var(--gilt); }
.form-status { min-height: 1.6em; margin-top: 1rem; font-weight: 600; }
.form-status.ok { color: #9FE0B4; }
.form-status.err { color: #F2A7A7; }

/* Footer */
.site-footer { padding: 2.5rem clamp(1rem, 4vw, 3rem); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; font-size: .95rem; }
.footer-brand { margin: 0; font-weight: 600; }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer .copy { margin: 0; color: var(--ink-soft); width: 100%; }
