/* ==========================================================================
   base.css — gemeinsames Fundament für baytuljanazah.de und pietaetruhfried.de
   Byte-identisch auf beiden Seiten. Farben/Schriften kommen aus tokens.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Typografie ---------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; color: var(--brand-deep); text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; max-width: 60ch; }
.muted { color: var(--muted); }
.kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0 0 .6rem;
}
.kicker::before { content: "— "; }
.section-intro { max-width: 68ch; color: var(--muted); margin-bottom: 2rem; font-size: 1.05rem; }
.center { text-align: center; }
.center .section-intro { margin-inline: auto; }

/* --- Layout -------------------------------------------------------------- */
.container { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: clamp(48px, 7vw, 80px); }
.section-alt { background: var(--surface-alt); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-3-1 { grid-template-columns: 2fr 1fr; } }
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.split-media-right > .media { order: 2; } }

/* --- Skip-Link, Bereitschaftsleiste, Header ------------------------------- */
.skip { position: absolute; left: -999px; top: 8px; z-index: 9999; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip:focus { left: 12px; }

.topbar { background: var(--brand-deep); color: #fff; font-size: .95rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 9px; }
.topbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-weight: 600; white-space: nowrap; font-size: .85rem; letter-spacing: .02em; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(185,154,91,.25); }
.topbar-msg { font-weight: 500; opacity: .95; }
.topbar-right { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.topbar a.tel { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; }
.topbar a.tel:hover { text-decoration: underline; }
@media (max-width: 720px) { .topbar-msg { display: none; } .topbar-inner { justify-content: center; } }

.site-header { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand-deep); min-width: 0; }
.brand img, .brand svg { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 10px; }
.brand-name { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.15; }
.brand-sub { display: block; font-weight: 500; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.nav-right { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; justify-content: flex-end; }
.menu { display: none; gap: 4px; flex-wrap: wrap; }
.menu a { text-decoration: none; font-weight: 500; color: var(--text); padding: 8px 9px; border-radius: var(--radius-sm); font-size: .95rem; white-space: nowrap; }
.menu a:hover { background: var(--brand-soft); color: var(--brand-deep); }
.menu-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 600; }
.menu-toggle svg { width: 20px; height: 20px; }
.menu.open { display: flex; flex-direction: column; width: 100%; padding: 8px 0 4px; border-top: 1px solid var(--line); }
.menu.open a { padding: 12px 10px; }
@media (min-width: 1060px) { .menu { display: flex; } .menu-toggle { display: none; } }

.lang-switch { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.lang-btn { border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .85rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.lang-btn:hover { color: var(--brand-deep); }
.lang-btn.active { background: var(--brand-deep); color: #fff; }

/* --- Buttons ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent; text-decoration: none; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 28%, transparent); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { background: var(--surface); color: var(--brand-deep); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { background: var(--accent-soft); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 9px 14px; font-size: .92rem; }
.btn-lg { padding: 15px 24px; font-size: 1.05rem; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-block: 18px; }
@media (max-width: 520px) { .cta-row .btn { width: 100%; } }

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, color-mix(in srgb, var(--brand-deep) 88%, transparent) 0%, color-mix(in srgb, var(--brand-deep) 62%, transparent) 55%, color-mix(in srgb, var(--brand-deep) 30%, transparent) 100%); }
.hero-inner { padding-block: clamp(56px, 9vw, 120px) clamp(40px, 6vw, 72px); max-width: 720px; }
.hero h1 { color: #fff; }
.hero .kicker { color: var(--accent-light); }
.hero .lead { color: rgba(255,255,255,.92); }
.trust-row { display: grid; gap: 12px; margin-top: 8px; }
@media (min-width: 720px) { .trust-row { grid-template-columns: 1fr 1fr; } }
.trust-card { background: rgba(255,255,255,.94); color: var(--text); border-radius: var(--radius); padding: 14px 16px; font-size: .97rem; box-shadow: var(--shadow); }
.trust-card strong { color: var(--brand-deep); }

/* Abstand zwischen aufeinanderfolgenden Blöcken in einer Sektion */
.container > * + .grid, .container > * + .photo-grid, .container > * + .card, .container > * + .steps, .container > * + .split, .container > * + .faq, .container > .hint { margin-top: 18px; }

/* --- Karten & Icons ------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-pad-lg { padding: 28px; }
.icon-circle { width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; flex: 0 0 auto; }
.icon-circle img, .icon-circle svg { width: 28px; height: 28px; }
.service { display: flex; flex-direction: column; }
.service p { color: var(--muted); }

/* Preis-Hervorhebung (Komplettpaket) */
.price-card { border-color: var(--accent); background: var(--accent-soft); }
.price-box { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.price-amount { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.2rem); line-height: 1; color: var(--brand-deep); }
.price-label { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-card .checks { margin-bottom: 1em; }

/* Schritte (nummeriert) */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
.step { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step-num { counter-increment: step; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-deep); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.step-num::before { content: counter(step); }
.step h3 { margin: 4px 0 6px; }
.step p { margin: 0; color: var(--muted); }

/* Zeitleiste */
.timeline { position: relative; display: grid; gap: 22px; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); }
.t-item { position: relative; }
.t-item::before { content: ""; position: absolute; left: -30px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.t-item h3 { margin: 0 0 4px; }
.t-item p { margin: 0; color: var(--muted); }

/* Dunkles Info-Band */
.band { background: var(--brand-deep); color: #fff; position: relative; overflow: hidden; }
.band h2, .band h3 { color: #fff; }
.band .muted { color: rgba(255,255,255,.78); }
.band .kicker { color: var(--accent-light); }
.band .card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); box-shadow: none; color: #fff; }
.band .card p { color: rgba(255,255,255,.82); }
.band .icon-circle { background: rgba(255,255,255,.12); color: var(--accent-light); }

/* Fotos */
.media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.media.tall img { aspect-ratio: 3 / 4; }
.media.wide img { aspect-ratio: 16 / 9; }
.photo-grid { display: grid; gap: 14px; }
@media (min-width: 680px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-grid img { aspect-ratio: 3 / 2; }
figcaption { font-size: .9rem; color: var(--muted); padding: 8px 2px 0; }

/* Liste mit Häkchen */
.checks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); }
.checks li::after { content: ""; position: absolute; left: 6px; top: calc(.35em + 4px); width: 6px; height: 9px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Ornament-Trenner */
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent); margin: 0 0 1.4rem; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 56px; background: currentColor; opacity: .6; }
.ornament svg { width: 22px; height: 22px; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 600; color: var(--brand-deep); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > *:not(summary) { padding: 0 20px 18px; color: var(--muted); }
.faq details p { margin: 0 0 .6em; }

/* --- Formular ------------------------------------------------------------ */
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: #fff; font: inherit; color: var(--text); min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 130px; resize: vertical; }
.hint { font-size: .9rem; color: var(--muted); }
.contact-line { display: grid; gap: 4px; margin-bottom: 14px; }
.contact-line .label { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact-line a { font-weight: 700; color: var(--brand-deep); text-decoration: none; font-size: 1.15rem; }
.contact-line a:hover { text-decoration: underline; }

/* --- Footer -------------------------------------------------------------- */
.footer { background: var(--brand-deep); color: rgba(255,255,255,.85); padding: 48px 0 110px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h3 { color: #fff; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.footer a { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .brand-sub { color: rgba(255,255,255,.7); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 32px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; color: rgba(255,255,255,.7); }
.sister { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 14px 16px; margin-top: 16px; font-size: .95rem; }
@media (min-width: 1060px) { .footer { padding-bottom: 48px; } }

/* --- Mobile CTA & nach oben ---------------------------------------------- */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; display: flex; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.mobile-cta .btn { flex: 1 1 0; }
@media (min-width: 1060px) { .mobile-cta { display: none; } }
.to-top { position: fixed; right: 14px; bottom: 84px; z-index: 1300; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .15s, transform .15s; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 18px; height: 18px; }
@media (min-width: 1060px) { .to-top { bottom: 24px; } }

/* --- Rechtsseiten -------------------------------------------------------- */
.prose { max-width: 76ch; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { padding-left: 1.2em; }

/* --- RTL-Text (nur Text, Layout bleibt LTR) ------------------------------ */
body.rtl [data-i18n], body.rtl [data-i18n-html], body.rtl p, body.rtl h1, body.rtl h2, body.rtl h3, body.rtl summary, body.rtl input, body.rtl textarea, body.rtl select, body.rtl li { direction: rtl; text-align: right; }
body.rtl a[href^="tel:"], body.rtl a[href^="mailto:"], body.rtl .tel { direction: ltr; unicode-bidi: isolate; }
body.rtl .kicker::before { content: ""; }
body.rtl .kicker::after { content: " —"; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .to-top, .faq summary::after { transition: none; }
}
@media print {
  .topbar, .site-header, .mobile-cta, .to-top, .hero-media { display: none !important; }
  .hero { color: var(--text); } .hero::before { display: none; } .hero h1 { color: var(--brand-deep); }
}
