/* ═══════════════════════════════════════════════════════════
   Shevach (שבח) — Website
   Selbst gehostete Fonts, keine externen Requests (DSGVO).
   ═══════════════════════════════════════════════════════════ */

/* ── Fonts ────────────────────────────────────────────────── */
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('../fonts/NotoSerif-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('../fonts/NotoSerif-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('../fonts/NotoSerif-Italic-400.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --gold:        #D4A574;
  --gold-light:  #E8C9A0;
  --terracotta:  #C4795B;
  --olive:       #7A8B5C;

  --bg:          #FFF8F0;
  --bg-deep:     #F7EADC;
  --surface:     #FFFFFF;
  --ink:         #3D2B1F;
  --ink-soft:    #6B5344;
  --ink-faint:   #9B8574;
  --rule:        rgba(61, 43, 31, 0.13);

  --serif: 'Noto Serif', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans:  'Nunito', 'Avenir Next', 'Segoe UI', Helvetica, sans-serif;

  --measure: 34rem;
  --pad: clamp(1.35rem, 5vw, 2.5rem);

  /* Papierkorn — inline SVG, kein externer Request */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #2C1810;
    --bg-deep:   #241209;
    --surface:   #3D2B1F;
    --ink:       #F5E6D3;
    --ink-soft:  #D3BCA4;
    --ink-faint: #9C8570;
    --rule:      rgba(245, 230, 211, 0.16);
    --gold:      #E0B584;
  }
}

/* ── Reset & Grundlagen ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Korn-Overlay über die ganze Seite */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  opacity: .30;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 9999;
}
@media (prefers-color-scheme: dark) {
  body::before { mix-blend-mode: soft-light; opacity: .3; }
}

::selection { background: var(--gold); color: #2C1810; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -0.011em;
  margin: 0;
  text-wrap: balance;
  /* Deutsche Komposita („Datenschutzerklärung“) sind länger als ein
     schmaler Viewport — trennen statt überlaufen lassen. */
  hyphens: auto;
  overflow-wrap: break-word;
}

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

/* ── Zierelemente ─────────────────────────────────────────── */
.rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent 72%);
  margin: 0;
}

.eyebrow {
  font-family: var(--sans);
  font-size: .70rem;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

/* ── Kopfzeile ────────────────────────────────────────────── */
.masthead {
  display: flex;
  align-items: baseline;
  gap: .8rem;
  padding: clamp(1.3rem, 4vw, 2.1rem) var(--pad);
  max-width: 68rem;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.16rem;
  letter-spacing: .05em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .heb {
  color: var(--gold);
  margin-left: .38em;
  font-size: .95em;
}

.masthead nav {
  margin-left: auto;
  display: flex;
  gap: clamp(.9rem, 3vw, 1.7rem);
  font-size: .83rem;
  letter-spacing: .02em;
}
.masthead nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .22s, border-color .22s;
}
.masthead nav a:hover,
.masthead nav a[aria-current] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* ═══ Landing: Hero ═══════════════════════════════════════ */
.hero {
  position: relative;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 9vh, 6rem) var(--pad) clamp(3rem, 10vh, 6.5rem);
  overflow: hidden;
}

/* Übergroßes hebräisches Monogramm, läuft rechts aus dem Bild */
.hero .monogram {
  position: absolute;
  top: 50%;
  right: -.14em;
  transform: translateY(-52%);
  font-family: var(--serif);
  font-size: clamp(13rem, 34vw, 30rem);
  line-height: .8;
  color: var(--gold);
  opacity: .13;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
@media (prefers-color-scheme: dark) {
  .hero .monogram { opacity: .1; }
}

.hero > *:not(.monogram) { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.6rem, 8.4vw, 5.1rem);
  max-width: 22ch;
  margin: 1.15rem 0 0;
  /* Display-Zeile nie trennen — lieber am Leerzeichen umbrechen */
  hyphens: manual;
}
.hero h1 em {
  font-style: italic;
  color: var(--terracotta);
}

.hero .lede {
  font-size: clamp(1.06rem, 2.4vw, 1.28rem);
  color: var(--ink-soft);
  max-width: 33rem;
  margin: 1.6rem 0 0;
}

/* Fade-Up beim Laden, gestaffelt.
   Bewusst additiv aufgebaut: ohne Animation sind die Inhalte sichtbar.
   So bleibt nichts unsichtbar, falls Animationen nicht laufen. */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .8s cubic-bezier(.22,.68,.28,1) both; }
  .reveal:nth-child(2) { animation-delay: .06s; }
  .reveal:nth-child(3) { animation-delay: .15s; }
  .reveal:nth-child(4) { animation-delay: .25s; }
  .reveal:nth-child(5) { animation-delay: .35s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
  margin-top: 2.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .82rem 1.6rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
  letter-spacing: .01em;
  transition: transform .24s cubic-bezier(.22,.68,.28,1), box-shadow .24s;
  box-shadow: 0 1px 2px rgba(61,43,31,.16);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -8px rgba(61,43,31,.42);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  padding-left: .2rem;
  font-weight: 400;
}
.btn--ghost:hover {
  color: var(--ink);
  transform: none;
  box-shadow: none;
}
.btn--ghost::after {
  content: '→';
  transition: transform .24s;
}
.btn--ghost:hover::after { transform: translateX(4px); }

/* ── Feature-Raster ───────────────────────────────────────── */
.features {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 5.5rem) var(--pad);
  display: grid;
  gap: clamp(2rem, 5vw, 3.4rem) clamp(2rem, 6vw, 4.5rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.feature h3 {
  font-size: 1.19rem;
  margin: .85rem 0 .5rem;
}
.feature p {
  color: var(--ink-soft);
  font-size: .97rem;
  margin: 0;
}
.feature .num {
  font-family: var(--serif);
  font-size: .78rem;
  letter-spacing: .13em;
  color: var(--gold);
}
.feature .bar {
  display: block;
  width: 2.1rem;
  height: 2px;
  background: var(--gold);
  margin-bottom: 1.05rem;
  opacity: .55;
}

/* ── Zitat-Band ───────────────────────────────────────────── */
.band {
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(3rem, 9vh, 5.5rem) var(--pad);
}
.band blockquote {
  max-width: 40rem;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.4vw, 1.85rem);
  line-height: 1.52;
  text-align: center;
  font-style: italic;
  color: var(--ink);
}
.band cite {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: .77rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ═══ Rechtstexte / Inhaltsseiten ═════════════════════════ */
.doc {
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 3.2rem) var(--pad) clamp(3rem, 9vh, 5rem);
}

.doc-head { margin-bottom: clamp(2.2rem, 6vh, 3.4rem); }
.doc-head h1 {
  font-size: clamp(1.8rem, 6vw, 3.15rem);
  margin: .85rem 0 0;
}
.doc-head .stand {
  margin: .95rem 0 0;
  font-size: .85rem;
  color: var(--ink-faint);
}

.doc article { max-width: var(--measure); }

.doc h2 {
  font-size: 1.32rem;
  margin: 2.9rem 0 .85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.doc h2:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.doc h2 .n {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--gold);
  display: block;
  margin-bottom: .5rem;
}

.doc h3 {
  font-size: 1.04rem;
  font-family: var(--sans);
  font-weight: 600;
  margin: 1.7rem 0 .5rem;
}

.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); font-weight: 600; }

code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--bg-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .1em .38em;
  color: var(--ink);
  overflow-wrap: break-word;
}

.doc ul { padding-left: 1.15rem; margin: 0 0 1.15em; }
.doc li { margin-bottom: .42em; }
.doc li::marker { color: var(--gold); }

.doc a:not(.btn) {
  color: var(--terracotta);
  text-decoration: none;
  border-bottom: 1px solid rgba(196,121,91,.42);
  transition: border-color .2s;
}
.doc a:not(.btn):hover { border-bottom-color: var(--terracotta); }

/* Adress-/Kontaktblock */
.vcard {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold);
  border-radius: 3px;
  padding: 1.35rem 1.5rem;
  margin: 0 0 1.4em;
  font-size: .98rem;
  line-height: 1.66;
  color: var(--ink);
}
.vcard strong { display: block; margin-bottom: .3rem; }

/* Hinweis auf offene Platzhalter */
.todo {
  background: rgba(196,121,91,.09);
  border: 1px dashed var(--terracotta);
  border-radius: 3px;
  padding: 1rem 1.2rem;
  margin: 0 0 1.4em;
  font-size: .9rem;
  color: var(--terracotta);
}
.todo strong { color: var(--terracotta); }

/* Tabellen — scrollen im eigenen Container */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5em;
  border: 1px solid var(--rule);
  border-radius: 3px;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .91rem;
  min-width: 30rem;
}
th, td {
  text-align: left;
  padding: .72rem .95rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-family: var(--sans);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--bg-deep);
  white-space: nowrap;
}
tr:last-child td { border-bottom: 0; }
td { color: var(--ink-soft); }

/* ── Support-Seite ────────────────────────────────────────── */
.faq { max-width: var(--measure); }
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 1.1rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: '+';
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1.2rem;
  line-height: 1.2;
  flex-shrink: 0;
  transition: transform .26s;
}
.faq details[open] summary::before { transform: rotate(45deg); }
.faq summary:hover { color: var(--terracotta); }
.faq details p {
  margin: .8rem 0 0 1.85rem;
  color: var(--ink-soft);
  font-size: .96rem;
}

/* ── Fußzeile ─────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--rule);
  background: var(--bg-deep);
  padding: clamp(2.2rem, 6vh, 3.2rem) var(--pad);
}
.footer-inner {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: baseline;
}
.footer-inner .mark {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
}
.footer-inner .mark .heb { color: var(--gold); margin-left: .35em; }
.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.4rem;
  font-size: .87rem;
}
.footer-inner nav a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.footer-inner nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.footer-inner .copy {
  margin-left: auto;
  font-size: .8rem;
  color: var(--ink-faint);
}

@media (max-width: 34rem) {
  .footer-inner .copy { margin-left: 0; width: 100%; }
  .masthead nav { width: 100%; margin-left: 0; padding-top: .7rem; }
  .masthead { flex-wrap: wrap; }
}

/* Sichtbarer Fokus für Tastatur-Navigation */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
