/* Büchertisch — landing + legal pages. No build step, no external assets (DSGVO). */

:root {
  color-scheme: light dark;
  --bg: #faf7f1;
  --bg-alt: #f3ede2;
  --fg: #211d17;
  --muted: #6b6459;
  --accent: #7a5c3e;
  --accent-strong: #5e4527;
  --accent-soft: rgba(122, 92, 62, 0.12);
  --on-accent: #faf7f1;
  --card: #ffffff;
  --line: rgba(122, 92, 62, 0.18);
  --chip-free-bg: #e3eedd;
  --chip-free-fg: #3c5a2e;
  --chip-out-bg: #f3e2d3;
  --chip-out-fg: #8a5322;
  --shadow: 0 1px 2px rgba(33, 29, 23, 0.06), 0 12px 32px -16px rgba(33, 29, 23, 0.25);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --bg-alt: #1e1a13;
    --fg: #f2ede4;
    --muted: #a99f8f;
    --accent: #d0a878;
    --accent-strong: #e0bd93;
    --accent-soft: rgba(208, 168, 120, 0.14);
    --on-accent: #2a2118;
    --card: #221e17;
    --line: rgba(208, 168, 120, 0.2);
    --chip-free-bg: #2b3a24;
    --chip-free-fg: #b5d3a4;
    --chip-out-bg: #3e2f1f;
    --chip-out-fg: #e0b183;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
blockquote {
  font-family: var(--serif);
  letter-spacing: -0.01em;
}
a {
  color: var(--accent);
}
img,
svg {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--card);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ------------------------------- Header ------------------------------- */
.site-header {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg);
}
.brand-mark {
  display: inline-flex;
  color: var(--accent);
}
.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-nav a:hover {
  color: var(--fg);
}
.site-nav .nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.3rem 0.95rem;
  font-weight: 600;
}
.site-nav .nav-cta:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* -------------------------------- Hero -------------------------------- */
.hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 1.25rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-rotate {
  display: inline-block;
  transition: opacity 0.38s ease, transform 0.38s ease;
}
.hero-rotate.is-out {
  opacity: 0;
  transform: translateY(0.3em);
}
.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 34rem;
  margin: 0 0 1.75rem;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.button {
  display: inline-block;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.button.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.button.primary:hover {
  background: var(--accent-strong);
}
.button.ghost {
  color: var(--accent);
  border: 1px solid var(--line);
}
.button.ghost:hover {
  background: var(--accent-soft);
}
.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.trust-row li::before {
  content: "✓";
  color: var(--accent);
  margin-right: 0.4rem;
}

/* Stylized phone mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.phone {
  width: min(19rem, 80vw);
  border-radius: 2.2rem;
  padding: 0.65rem;
  background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}
.phone-screen {
  background: var(--bg);
  border-radius: 1.7rem;
  padding: 1.1rem 0.9rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.app-header {
  display: flex;
  flex-direction: column;
  padding: 0 0.25rem;
}
.app-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
}
.app-sub {
  color: var(--muted);
  font-size: 0.72rem;
}
.app-search {
  background: var(--bg-alt);
  border-radius: 0.7rem;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.book-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.55rem 0.65rem;
}
.book-spine {
  width: 1.5rem;
  height: 2.15rem;
  border-radius: 0.25rem;
  flex: none;
}
.spine-a { background: #8c4a3c; }
.spine-b { background: #3e5a45; }
.spine-c { background: #405577; }
.spine-d { background: #a8814b; }
.book-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.book-title {
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-author {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip {
  font-size: 0.66rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  flex: none;
}
.chip-free {
  background: var(--chip-free-bg);
  color: var(--chip-free-fg);
}
.chip-out {
  background: var(--chip-out-bg);
  color: var(--chip-out-fg);
}
.app-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 1.5rem 0.2rem;
  border-top: 1px solid var(--line);
}
.tab {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.35rem;
  background: var(--line);
}
.tab.active {
  background: var(--accent);
}
.toast {
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-58%);
  display: flex;
  gap: 0.6rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.78rem;
  line-height: 1.35;
  box-shadow: var(--shadow);
  max-width: 16rem;
}
.toast-icon {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--chip-free-bg);
  color: var(--chip-free-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ------------------------------- Verse -------------------------------- */
.verse {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.verse blockquote {
  margin: 0 auto;
  max-width: 40rem;
}
.verse p {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-style: italic;
  margin: 0 0 0.5rem;
}
.verse cite {
  color: var(--muted);
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.9rem;
}

/* ------------------------------ Sections ------------------------------ */
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}
.section.alt {
  max-width: none;
  background: var(--bg-alt);
}
.section.alt > * {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}
.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}
.section-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2rem;
  max-width: 44rem;
}

/* Features */
.feature-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.feature-icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}
.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Loan lifecycle */
.lifecycle {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  padding: 0;
  margin: 0;
}
.lifecycle li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
  position: relative;
}
.step-num {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.lifecycle h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.lifecycle p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Audiences */
.audience-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-bottom: 2.5rem;
}
.audience {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.25rem;
}
.audience h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.audience p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cat-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--card);
}
.cat-chip.more {
  color: var(--accent);
  border-style: dashed;
}

/* Privacy */
.privacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
  max-width: 44rem;
}
.privacy-list li {
  padding-left: 1.75rem;
  position: relative;
  color: var(--muted);
}
.privacy-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.privacy-list strong {
  color: var(--fg);
}

/* Beta */
.section.beta {
  padding-top: 2rem;
}
.beta-card {
  background: linear-gradient(160deg, var(--accent), var(--accent-strong));
  color: var(--on-accent);
  border-radius: 1.5rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  box-shadow: var(--shadow);
}
.beta-card h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 1rem 0;
}
.beta-card p {
  max-width: 38rem;
  margin: 0.75rem auto;
  opacity: 0.92;
}
.beta-card a {
  color: inherit;
  font-weight: 600;
}
.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.85rem;
  margin: 0;
}
.beta-platforms {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ------------------------------- Footer ------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem 2rem;
  color: var(--muted);
}
.footer-inner {
  max-width: 72rem;
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-brand .brand-name {
  color: var(--fg);
}
.footer-brand p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}
.site-footer nav {
  display: flex;
  gap: 1.5rem;
}
.footer-copy {
  max-width: 72rem;
  margin: 0 auto;
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

/* ---------------------------- Legal pages ----------------------------- */
.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.legal h1 {
  letter-spacing: -0.01em;
}

/* ---------------------------- Small screens --------------------------- */
@media (max-width: 52rem) {
  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 3rem;
    gap: 2.5rem;
  }
  .hero-visual {
    order: 2;
    margin-bottom: 1.5rem;
  }
  .site-nav {
    font-size: 0.9rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
