/* ============================================================
   Sigrid Dobat — Autorenwebsite
   Palette aus dem eigenen Werk abgeleitet:
   Ink   – Nachtkorridor von „Zimmer Nummer 18“
   Rot   – Umschlagfarbe von „Nenn’ mich Margot“ / „Tauben am Fenster“
   Salbei– Grünton der Aquarelle
   ============================================================ */

:root {
  --ink: #1c2831;
  --ink-2: #253744;
  --ink-text: #f3efe4;
  --ink-text-dim: #c7cdd1;

  --paper: #f4f1e8;
  --paper-2: #eae5d6;
  --ink-on-paper: #262019;
  --ink-on-paper-dim: #5d564a;

  --oxblood: #7c2c2c;
  --oxblood-deep: #5c1f1f;
  --oxblood-tint: #f0e2df;

  --sage: #74805f;
  --sage-deep: #5b6549;

  --line-on-paper: rgba(38, 32, 25, 0.14);
  --line-on-ink: rgba(243, 239, 228, 0.16);

  --serif-display: "Fraunces", ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --serif-body: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;

  --content-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  color-scheme: light;
}

/* ---------- reset & base ---------- */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-on-paper);
  font-family: var(--serif-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
}

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

:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

.section-head {
  max-width: 640px;
  margin: 0 0 clamp(2rem, 5vw, 3.25rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
}

.section-lede {
  margin-top: 0.9rem;
  font-size: 1.15rem;
  color: var(--ink-on-paper-dim);
}

/* ---------- buttons / links ---------- */

.btn {
  display: inline-block;
  font-family: var(--serif-body);
  font-size: 1.05rem;
  text-decoration: none;
  transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--oxblood);
  color: var(--paper);
  padding: 0.75rem 1.5rem;
  border-radius: 2px;
}
.btn-primary:hover { background: var(--oxblood-deep); }

.btn-ghost {
  color: var(--ink-on-paper);
  padding: 0.15rem 0;
  border-bottom: 1px solid var(--line-on-paper);
}
.btn-ghost:hover { border-color: currentColor; }

.btn-on-ink {
  color: var(--ink-text);
  padding: 0.15rem 0;
  border-bottom: 1px solid var(--line-on-ink);
}
.btn-on-ink:hover { border-color: currentColor; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
  margin-top: 2.25rem;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--gutter);
  background: var(--ink);
  color: var(--ink-text);
}

.wordmark {
  font-family: var(--serif-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink-text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.topnav {
  display: flex;
  gap: 2rem;
}

.topnav a {
  font-size: 0.98rem;
  text-decoration: none;
  color: var(--ink-text-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.topnav a:hover {
  color: var(--ink-text);
  border-color: var(--ink-text-dim);
}

.navtoggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.navtoggle span {
  width: 22px;
  height: 1.5px;
  background: var(--ink-text);
  display: block;
}

@media (max-width: 720px) {
  .topnav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    padding: 0.5rem var(--gutter) 1.25rem;
    display: none;
  }
  .topnav.open { display: flex; }
  .topnav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line-on-ink);
  }
  .navtoggle { display: flex; }
}

/* ---------- hero ---------- */

.hero {
  background: var(--ink);
  color: var(--ink-text);
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(3.5rem, 9vw, 7rem);
}

.hero-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-kicker {
  font-size: 1.02rem;
  color: var(--ink-text-dim);
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.2rem);
  letter-spacing: -0.01em;
}

.hero-lede {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: 1.2rem;
  color: var(--ink-text-dim);
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  filter: saturate(0.92) contrast(1.02);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.55);
}

.hero-text,
.hero-image {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-image { animation-delay: 0.15s; }

@keyframes reveal {
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-image { max-width: 340px; }
}

/* ---------- epigraph ---------- */

.epigraph {
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  background: var(--paper);
}

.epigraph blockquote {
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
}

.epigraph p {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  line-height: 1.4;
  color: var(--oxblood);
}

.epigraph cite {
  display: block;
  margin-top: 1.25rem;
  font-style: normal;
  font-size: 1rem;
  color: var(--ink-on-paper-dim);
}
.epigraph cite em { font-style: italic; }

/* ---------- bio ---------- */

.bio {
  background: var(--paper-2);
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
  border-top: 1px solid var(--line-on-paper);
  border-bottom: 1px solid var(--line-on-paper);
}

.bio-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.bio-image img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 24px 48px -28px rgba(28, 40, 49, 0.35);
}

.bio-text h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  margin-bottom: 1.25rem;
}

.bio-text p {
  max-width: 58ch;
  color: var(--ink-on-paper-dim);
}

@media (max-width: 860px) {
  .bio-grid {
    grid-template-columns: 1fr;
  }
  .bio-image { order: -1; max-width: 420px; }
}

/* ---------- books ---------- */

.books {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  max-width: var(--content-width);
  margin: 0 auto;
}

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book {
  display: flex;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-top: 1px solid var(--line-on-paper);
}

.book:last-child {
  border-bottom: 1px solid var(--line-on-paper);
}

.book-cover,
.book-cover--placeholder {
  flex: 0 0 200px;
}

.book-info {
  flex: 1 1 auto;
  min-width: 0;
}

.book:nth-child(even) {
  flex-direction: row-reverse;
}

.book-cover img {
  width: 100%;
  height: auto;
  border-radius: 1px;
  box-shadow: 0 18px 34px -18px rgba(28, 40, 49, 0.4);
  transition: transform 0.35s ease;
}

.book:hover .book-cover img {
  transform: translateY(-4px);
}

.book-cover--placeholder {
  width: 100%;
  aspect-ratio: 900 / 1500;
  background: var(--ink);
  color: var(--ink-text);
  border-radius: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem;
  gap: 0.6rem;
}

.placeholder-title {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.25;
}

.placeholder-note {
  font-size: 0.85rem;
  color: var(--ink-text-dim);
}

.book-info h3 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  margin-bottom: 0.6rem;
}

.book-meta {
  color: var(--ink-on-paper-dim);
  margin-bottom: 0.9rem;
}

.book-desc {
  max-width: 56ch;
  margin-bottom: 1.25rem;
}

.book--upcoming .book-desc {
  color: var(--ink-on-paper-dim);
}

.book-excerpt {
  max-width: 52ch;
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--oxblood);
}

.book-excerpt p {
  font-family: var(--serif-display);
  font-style: italic;
  color: var(--ink-on-paper-dim);
  font-size: 1.05rem;
  line-height: 1.6;
}

.buy-link {
  display: inline-block;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--oxblood);
  border: 1px solid var(--oxblood);
  border-radius: 2px;
  padding: 0.5rem 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.buy-link:hover {
  background: var(--oxblood);
  color: var(--paper);
}

@media (max-width: 640px) {
  .book,
  .book:nth-child(even) {
    flex-direction: column;
  }
  .book-cover, .book-cover--placeholder { flex-basis: auto; max-width: 220px; }
}

/* ---------- painting ---------- */

.painting {
  background: var(--paper-2);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--line-on-paper);
}

.painting .section-head {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}

.painting-strip {
  display: flex;
  gap: 1rem;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.5rem;
}

.painting-strip figure {
  margin: 0;
  flex: 0 0 auto;
  scroll-snap-align: start;
  height: 300px;
  border-radius: 1px;
  overflow: hidden;
  box-shadow: 0 16px 30px -18px rgba(28, 40, 49, 0.3);
}

.painting-strip img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.painting-strip figure:hover img {
  transform: scale(1.035);
}

@media (max-width: 640px) {
  .painting-strip figure { height: 220px; }
}

/* ---------- buchmesse ---------- */

.buchmesse {
  background: var(--ink);
  color: var(--ink-text);
  text-align: center;
  padding: clamp(4rem, 9vw, 6.5rem) var(--gutter);
}

.buchmesse-lede {
  color: var(--ink-text-dim);
  margin-bottom: 0.5rem;
}

.buchmesse h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1.1rem;
}

.buchmesse-text {
  max-width: 46ch;
  margin: 0 auto 1.75rem;
  color: var(--ink-text-dim);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--paper-2);
  padding: clamp(2.5rem, 6vw, 3.5rem) var(--gutter) 2rem;
  border-top: 1px solid var(--line-on-paper);
}

.footer-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  padding-bottom: 2rem;
}

.footer-mark {
  font-family: var(--serif-display);
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
}

.footer-note {
  margin: 0;
  color: var(--ink-on-paper-dim);
  font-size: 0.95rem;
}

.footer-nav, .footer-legal {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.footer-nav a, .footer-legal a {
  text-decoration: none;
  color: var(--ink-on-paper-dim);
  border-bottom: 1px solid transparent;
}
.footer-nav a:hover, .footer-legal a:hover {
  color: var(--ink-on-paper);
  border-color: var(--line-on-paper);
}

.footer-copy {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-on-paper);
  font-size: 0.85rem;
  color: var(--ink-on-paper-dim);
}
