@font-face {
  font-family: "Agoestoesan";
  src: url("fonts/agoestoesan.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --paper: #ffffff;
  --ink: #0b0b0c;
  --ink-soft: #2a2830;
  --violet: #7b3fe4;
  --violet-soft: #c7b0f5;
  --tint: #f5f1fd;
  --night: #0d0b12;

  --gutter: 6.5rem;
  --header-h: 5.5rem;
}

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

html, body { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--violet-soft); color: var(--ink); }

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 6px;
  border-radius: 1px;
}

/* Kopfzeile */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.topbar.is-scrolled { border-bottom-color: rgba(11, 11, 12, 0.08); }

.brand { justify-self: start; display: block; }

.brand img {
  display: block;
  height: 30px;
  width: auto;
}

.menu {
  display: flex;
  gap: 2.5rem;
}

.menu a,
.cta {
  position: relative;
  text-transform: uppercase;
}

.menu a {
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: -0.02em;
  padding: 0.25rem 0;
}

/* Lila Strich: Menüpunkte bekommen ihn beim Überfahren, CTAs tragen ihn immer */
.menu a::after,
.cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 2px;
  background: var(--violet);
  transform-origin: left;
  transition: transform 260ms var(--ease-out);
}

.menu a::after { transform: scaleX(0); }
.menu a[aria-current]::after { transform: scaleX(1); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  transition: transform 160ms var(--ease-out);
}

.cta:active { transform: scale(0.97); }

.cta-top {
  justify-self: end;
  font-size: 1rem;
  line-height: 1.25rem;
  letter-spacing: -0.02em;
}

.cta-hero {
  margin-top: 2.75rem;
  font-size: 1.25rem;
  line-height: 1.75rem;
  letter-spacing: -0.02em;
}

.arrow {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .menu a:hover::after { transform: scaleX(1); }
  .cta:hover::after { transform: scaleX(1.06); }
  .cta:hover .arrow { transform: translateX(4px); }
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: 2rem 4rem 7rem;
}

.title {
  margin: 0;
  font-family: "Agoestoesan", "DM Sans", system-ui, sans-serif;
  font-weight: normal;
  font-size: clamp(4.25rem, 8.6vw, 8.5rem);
  line-height: 1.1;
}

.typer {
  display: inline-block;
  min-height: 1.1em; /* Höhe bleibt, auch wenn das Feld leer ist */
  white-space: nowrap;
}

/* Cursor steht auf der Grundlinie und reicht bis Versalhöhe */
.caret {
  display: inline-block;
  vertical-align: baseline;
  width: 0.05em;
  height: 0.74em;
  margin-left: 0.08em;
  background: var(--violet);
  animation: blink 1060ms steps(1) infinite;
}

/* Beim Tippen und Löschen steht der Cursor still */
.typer.is-typing .caret { animation: none; }

@keyframes blink {
  50% { opacity: 0; }
}

.dot { color: var(--violet); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lede {
  max-width: 38rem;
  margin: 2.5rem 0 0;
  font-size: 1.125rem;
  line-height: 1.5625rem;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.lede em {
  font-style: italic;
  color: var(--violet);
}

/* Ein Auftritt: Text und CTA blenden ein, während das erste Wort getippt wird */
.hero .lede,
.hero .cta-hero { animation: fade-up 800ms var(--ease-out) 380ms both; }
.hero .cta-hero { animation-delay: 460ms; }

/* ---------- Abschnitte ---------- */

.section {
  padding: 10rem var(--gutter);
}

.heading {
  margin: 0;
  font-weight: 500;
  font-size: clamp(3.5rem, 5.6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.section em {
  font-style: italic;
  color: var(--violet);
}

/* Überschrift links, Einleitung rechts unten bündig */
.section-head {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4rem;
  align-items: end;
}

.intro {
  max-width: 34rem;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.6;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
}

.intro p { margin: 0; }
.intro p + p { margin-top: 1rem; }

.statement {
  margin: 0;
  font-size: 2rem;
  line-height: 1.32;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

/* Über Ernstfall */
.about {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4rem;
  border-top: 1px solid rgba(11, 11, 12, 0.08);
}

.about .statement { max-width: 46rem; }

/* Autor*innen */
.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin: 5rem 0 0;
  padding: 0;
  list-style: none;
}

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(180deg, #f3eefc 0%, #e6dcf8 100%);
}

/* Angedeutete Silhouette: Kopf und Schultern, weich verwischt */
.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  left: 50%;
  background: #cdbcf1;
  filter: blur(14px);
}

.portrait::before {
  top: 24%;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
}

.portrait::after {
  top: 60%;
  width: 66%;
  height: 60%;
  border-radius: 45% 45% 0 0;
  transform: translateX(-50%);
}

.people .person:nth-child(2) .portrait { background: linear-gradient(180deg, #ece8f3 0%, #ddd5ea 100%); }
.people .person:nth-child(3) .portrait { background: linear-gradient(180deg, #f1ecfa 0%, #d9ccf3 100%); }

.person h3 {
  margin: 1.5rem 0 0;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.person .meta {
  margin: 0.25rem 0 0;
  font-style: italic;
  color: var(--violet);
}

.person p {
  max-width: 26rem;
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Werke: dunkles Band */
.works {
  background: var(--night);
  color: var(--paper);
}

.works .intro { color: rgba(255, 255, 255, 0.72); }
.works em { color: var(--violet-soft); }

.shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 17rem));
  justify-content: center;
  gap: 6rem;
  margin: 6rem 0 0;
  padding: 0;
  list-style: none;
}

.book {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 2px 5px 5px 2px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 12px 24px -12px rgba(123, 63, 228, 0.35);
  transition: transform 300ms var(--ease-out);
}

/* Buchrücken-Kante links */
.book::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(255, 255, 255, 0.18) 2.5%,
    rgba(0, 0, 0, 0.06) 5%,
    rgba(0, 0, 0, 0) 9%);
  pointer-events: none;
}

/* Das Cover ist nur angedeutet: Inhalt stark verwischt */
.book-art {
  position: absolute;
  inset: -1.5rem;
  display: flex;
  flex-direction: column;
  padding: 3.5rem 3rem;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  filter: blur(15px);
}

.book-art b {
  margin-top: auto;
  font-size: 5rem;
}

.book-1 { background: var(--violet); color: #fff; }
.book-2 { background: #f2efe9; color: var(--ink); }
.book-2 .book-art b { color: var(--violet); }
.book-3 { background: var(--violet-soft); color: var(--night); }

.volume h3 {
  margin: 2rem 0 0;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.volume p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.6);
}

@media (hover: hover) and (pointer: fine) {
  .volume:hover .book { transform: translateY(-8px); }
}

/* Kontakt: zentriert */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact .intro {
  max-width: 36rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding: 1.15rem 2rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 2px;
  transition:
    background-color 200ms ease,
    transform 160ms var(--ease-out);
}

.button:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .button:hover { background: #2f2a3a; }
}

.envelope {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.address {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Manuskript einreichen: getöntes Band */
.submit {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4rem;
  background: var(--tint);
}

.submit-body { max-width: 46rem; }

.inline-link {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.checklist {
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.375rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.checklist li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(123, 63, 228, 0.18);
}

.checklist li:last-child { border-bottom: 1px solid rgba(123, 63, 228, 0.18); }

.checklist li::before {
  content: "–";
  color: var(--violet);
}

.submit .cta-hero { margin-top: 3rem; }

/* Fuß */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem var(--gutter);
  border-top: 1px solid rgba(11, 11, 12, 0.08);
}

.footer img {
  display: block;
  height: 22px;
  width: auto;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.footer-link {
  margin-left: 0.25rem;
  text-decoration: underline;
  text-decoration-color: var(--violet);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
  transition: color 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer-link:hover { color: var(--violet); }
}

/* ---------- Impressum ---------- */

.topbar--simple { grid-template-columns: 1fr auto; }

.topbar--simple .button {
  margin-top: 0;
  padding: 0.85rem 1.4rem;
  font-size: 0.9375rem;
}

.button .arrow { width: 1rem; height: 1rem; }

@media (hover: hover) and (pointer: fine) {
  .button:hover .arrow-back { transform: translateX(-3px); }
}

.legal {
  max-width: calc(46rem + 2 * var(--gutter));
  padding: 6rem var(--gutter) 9rem;
}

.legal .heading { margin-bottom: 4rem; }

.legal h2 {
  margin: 4rem 0 1.25rem;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.legal .heading + h2 { margin-top: 0; }

.legal h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.legal p a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.legal .button-back { margin-top: 5rem; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes fade {
  from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .lede,
  .hero .cta-hero { animation: fade 400ms ease both; }
}

/* ========== Mobil ========== */

/* Nur im mobilen Menü */
.menu-toggle,
.menu-cta { display: none; }

/* Tablet: Desktop-Aufbau mit schmaleren Rändern */
@media (max-width: 1280px) {
  :root { --gutter: 3rem; }
}

/* Ab hier ersetzt ein Menü-Button die Menüleiste */
@media (max-width: 1100px) {
  :root { --header-h: 4.25rem; }

  .topbar {
    display: flex;
    justify-content: space-between;
  }

  .brand img { height: 24px; }

  .cta-top { display: none; }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: -0.75rem;
    padding: 0.75rem;
    border: 0;
    background: none;
    color: var(--ink);
    font: 700 0.875rem/1 "DM Sans", system-ui, sans-serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 160ms var(--ease-out);
  }

  .menu-toggle:active { transform: scale(0.97); }

  .menu-toggle:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
  }

  /* Zwei Striche, die zum Kreuz werden */
  .menu-icon {
    position: relative;
    width: 1.375rem;
    height: 0.625rem;
  }

  .menu-icon::before,
  .menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    transition: transform 240ms var(--ease-out);
  }

  .menu-icon::before { top: 0; }
  .menu-icon::after { bottom: 0; background: var(--violet); }

  .menu-open .menu-icon::before { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-icon::after { transform: translateY(-4px) rotate(-45deg); }

  /* Vollbild-Menü unter der Kopfzeile */
  .menu {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    gap: 0;
    padding: 1.5rem var(--gutter) max(1.5rem, env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid rgba(11, 11, 12, 0.08);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition:
      opacity 220ms var(--ease-out),
      transform 280ms var(--ease-out),
      visibility 0s linear 280ms;
  }

  .menu-open { overflow: hidden; }

  .menu-open .menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 220ms var(--ease-out),
      transform 280ms var(--ease-out);
  }

  .menu a {
    padding: 0.6rem 0;
    font-size: clamp(2.25rem, 9vw, 3.5rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.045em;
    text-transform: none;
  }

  .menu a::after { display: none; }

  .menu a[aria-current] { color: var(--violet); }

  .menu .menu-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 1.25rem 1.5rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    border-radius: 2px;
  }

  .menu .menu-cta[aria-current] { color: var(--paper); }

  .menu-cta { transition: transform 160ms var(--ease-out); }
  .menu-cta:active { transform: scale(0.97); }
}

/* Telefon: eigene Komposition */
@media (max-width: 820px) {
  :root { --gutter: 1.25rem; }

  /* Hero: linksbündig, der nächste Abschnitt blitzt schon an */
  .hero {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    text-align: left;
    padding: 4.5rem var(--gutter) 4.5rem;
  }

  .title { font-size: clamp(2.5rem, 10.6vw, 5.5rem); }

  .lede {
    margin-top: 1.5rem;
    font-size: 1.1875rem;
    line-height: 1.5;
  }

  /* Haupt-CTAs werden zu großen, daumenfreundlichen Flächen */
  .cta-hero {
    align-self: stretch;
    justify-content: space-between;
    margin-top: 2.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 1rem;
    line-height: 1.25rem;
    border-radius: 2px;
  }

  .cta-hero::after { display: none; }

  .section { padding: 5.5rem var(--gutter); }

  .heading { font-size: clamp(2.75rem, 12vw, 4rem); }

  .section-head,
  .about,
  .submit {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .intro { font-size: 1.125rem; }

  .statement { font-size: 1.375rem; line-height: 1.4; }

  /* Autor*innen: untereinander, kleines Porträt links, Text rechts */
  .people {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 2.5rem;
  }

  .person {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    column-gap: 1.25rem;
    align-items: start;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(11, 11, 12, 0.08);
  }

  .person:last-child { border-bottom: 1px solid rgba(11, 11, 12, 0.08); }

  .portrait {
    grid-row: span 3;
    border-radius: 2px;
  }

  .portrait::before,
  .portrait::after { filter: blur(5px); }

  .person h3 { margin-top: 0; font-size: 1.25rem; line-height: 1.2; }

  .person p { margin-top: 0.5rem; font-size: 0.9375rem; }

  .person .meta { margin-top: 0.125rem; }

  /* Werke: untereinander wie die Autor*innen, kleines Buch links */
  .shelf {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 2.5rem;
  }

  .volume {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    column-gap: 1.25rem;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .volume:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }

  .book {
    grid-row: span 2;
    box-shadow:
      0 12px 24px -10px rgba(0, 0, 0, 0.8),
      0 6px 12px -6px rgba(123, 63, 228, 0.35);
  }

  .book-art {
    inset: -0.375rem;
    padding: 0.75rem 0.625rem;
    font-size: 0.625rem;
    filter: blur(3px);
  }

  .book-art b { font-size: 1.25rem; }

  .volume h3 { margin-top: 0; font-size: 1.25rem; line-height: 1.2; align-self: end; }

  .volume p { margin-top: 0.25rem; font-size: 0.9375rem; align-self: start; }

  /* Kontakt: linksbündig, Button über die volle Breite */
  .contact {
    align-items: stretch;
    text-align: left;
  }

  .contact .intro { margin-top: 1.5rem; }

  .contact .button {
    justify-content: center;
    margin-top: 2.25rem;
  }

  .checklist {
    margin-top: 1.75rem;
    font-size: 1.1875rem;
  }

  .checklist li { padding: 0.875rem 0; }

  .submit .cta-hero { display: flex; margin-top: 2.25rem; }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 2.25rem var(--gutter) max(2.25rem, env(safe-area-inset-bottom));
  }

  /* Impressum */
  .topbar--simple .button {
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
  }

  .legal { padding: 3.5rem var(--gutter) 5rem; }

  .legal .heading { margin-bottom: 2.5rem; }

  .legal h2 { margin-top: 3rem; font-size: 1.375rem; }

  .legal p { font-size: 1rem; }

  .legal .button-back {
    display: flex;
    justify-content: center;
    margin-top: 3.5rem;
  }
}

@media (max-width: 380px) {
  /* Auf sehr schmalen Geräten passt im Impressum nur „Zurück“ */
  .topbar--simple .button { font-size: 0; gap: 0; padding: 0.75rem; }
  .topbar--simple .button .arrow { width: 1.125rem; height: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .menu,
  .menu-open .menu { transform: none; transition: none; }
}
