/* ============================================================
   Base — reset, tipografie, layout, utilitare, mișcare
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  overflow-x: clip;
}

/* ── Fotografia din fundal ────────────────────────────────────────
   O fotografie reală de la firmă, fixată în spatele întregului site.
   E deja neclară din fișier (blur aplicat la export, nu în browser: un
   filtru pe un strat fix cât ecranul costă la fiecare scroll, mai ales
   pe telefon). La 18% se văd clar biserica și dricul, dar textul rămâne
   pe un fond care tot deschis e: peste ivoriu, fotografia adaugă cel mult
   câteva procente de gri, deci contrastul literelor nu se clatină. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('/img/fundal-site.jpg') no-repeat center center / cover;
  opacity: 0.28;
  pointer-events: none;
}
@media (max-width: 899px) {
  /* Pe telefon, un cadru lat s-ar tăia atât de mult încât ar rămâne doar
     peretele bisericii. Are propriul fișier, decupat pe verticală, cu
     intrarea bisericii sus și dricul întreg jos — exact ce trebuie să se
     vadă. Fiind mai mic, se și încarcă mai repede pe date mobile. */
  body::before {
    background-image: url('/img/fundal-site-mobil.jpg');
    background-position: center center;
    opacity: 0.4;
  }
}
@media print {
  body::before { display: none; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--track-tight);
  line-height: var(--lh-snug);
  color: var(--ink-900);
  text-wrap: balance;
}
h1 { font-size: var(--t-2xl); line-height: var(--lh-tight); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

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

.link {
  color: var(--ink-800);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--brass-400);
  transition: color var(--d-fast) var(--ease), text-decoration-color var(--d-fast) var(--ease);
}
.link:hover { color: var(--brass-700); text-decoration-color: var(--brass-600); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

strong, b { font-weight: 600; }
table { border-collapse: collapse; width: 100%; }

::selection { background: var(--brass-200); color: var(--ink-900); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brass-600);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* `hidden` trebuie să ascundă, indiferent ce spune clasa elementului. */
[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--ink-200) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border: 3px solid var(--bg);
  border-radius: var(--r-pill);
}

/* ── Layout ──────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.25rem, 4.5vw, 4rem); }
/* Benzile deschise sunt aproape opace, dar nu complet: lasă fotografia din
   spate să se simtă și sub ele, altfel textura ar apărea doar în dungi. */
.section--surface { background: rgba(255, 255, 255, 0.88); }
.section--stone { background: rgba(244, 242, 238, 0.88); }
.section--ink { background: var(--ink-800); color: var(--text-invert); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }

.stack > * + * { margin-top: var(--flow, var(--s-4)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, var(--s-3)); align-items: center; }
.grid { display: grid; gap: var(--gap, var(--s-5)); }
.grid > * { min-width: 0; }

/* ── Titluri de secțiune ─────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--brass-700);
}
.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: var(--brass-500);
}
.section--ink .eyebrow { color: var(--brass-300); }
.section--ink .eyebrow::before { background: var(--brass-400); }

.section-head { max-width: 56ch; margin-bottom: var(--s-7); }
.section-head__title { margin-top: var(--s-4); }
.section-head__sub { margin-top: var(--s-4); color: var(--text-soft); font-size: var(--t-md); }

.lead { font-size: var(--t-md); color: var(--text-soft); max-width: var(--maxw-text); }

/* Linie fină cu romb la mijloc, folosită între secțiuni */
.rule {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--line);
}
.rule::before, .rule::after { content: ''; height: 1px; background: currentColor; flex: 1; }
.rule__mark { width: 6px; height: 6px; background: var(--brass-500); transform: rotate(45deg); flex: none; }

/* ── Iconițe ─────────────────────────────────────────── */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 1em; height: 1em; }
.icon--lg { width: 1.6em; height: 1.6em; stroke-width: 1.3; }
.icon--xl { width: 2.4em; height: 2.4em; stroke-width: 1.1; }

/* ── Utilitare ───────────────────────────────────────── */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s-4);
  z-index: var(--z-toast);
  padding: var(--s-3) var(--s-5);
  background: var(--ink-800);
  color: #fff;
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.skip-link:focus-visible { top: 0; }

.text-center { text-align: center; }
.text-soft { color: var(--text-soft); }
.text-mute { color: var(--text-mute); }
.text-sm { font-size: var(--t-sm); }
.text-xs { font-size: var(--t-xs); }
.no-wrap { white-space: nowrap; }
.tabnum { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-display); }
@media (max-width: 719px) { .hide-mobile { display: none !important; } }
@media (min-width: 720px) { .hide-desktop { display: none !important; } }

/* ── Mișcare la scroll ───────────────────────────────────
   Discretă intenționat: o apariție lentă, fără salt și fără mărire.
   Un site de pompe funebre nu are voie să se joace. */
.has-js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity var(--d-lazy) var(--ease),
    transform var(--d-lazy) var(--ease);
  transition-delay: calc(var(--reveal-delay, 0) * 90ms);
}
.has-js [data-reveal='fade'] { transform: none; }
[data-reveal].is-in { opacity: 1; transform: none; }

@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;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-header, .site-footer, .wa-float, .cookie-bar, .callbar { display: none !important; }
  body { background: #fff; color: #000; }
}
