/* Bogdan Toader — machetă de site personal
   Paleta: roșul PSD pe o singură suprafață (prima secțiune), restul liniștit.
   Litere: Archivo lățit pentru nume, titluri și butoane; Source Serif 4 pentru text. */

:root {
  --red: #C3151C;
  --red-deep: #9E0F15;
  --ink: #172033;
  --ink-soft: #2A3550;
  --paper: #FFFFFF;
  --stone: #EEF1F4;
  --line: #D3D9E1;
  --muted: #586274;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --space: clamp(64px, 9vw, 120px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem; /* 19px: ușor de citit și pentru cei mai în vârstă */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Antet ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header { transition: box-shadow 0.3s ease, background 0.3s ease; }
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(23, 32, 51, 0.06);
}
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progress__bar {
  display: block;
  height: 100%;
  background: var(--red);
  transform-origin: left;
  transform: scaleX(var(--read, 0));
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 64px;
}
.nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
}
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--red); }
.nav .nav__contact {
  padding: 8px 16px;
  background: var(--red);
  color: var(--paper);
  border-radius: 2px;
}
.nav .nav__contact:hover { background: var(--red-deep); color: var(--paper); }
/* Pagina oficială de Facebook: mereu sus, în bara care rămâne pe ecran. */
.site-header__fb {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: 22px;
  color: var(--ink);
  transition: color 0.2s ease, transform 0.2s ease;
}
.site-header__fb svg { width: 30px; height: 30px; }
.site-header__fb:hover { color: #1877F2; transform: scale(1.06); }

.menu-btn {
  display: none;
  font: 600 0.9375rem var(--sans);
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .site-header__fb { margin-left: 12px; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .nav .nav__contact { margin-top: 12px; text-align: center; border-bottom: 0; }
}

/* ---------- Primul ecran: roșu cu numele, poza mare alături ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: clamp(560px, calc(100svh - 65px), 860px);
  background: var(--red);
  color: var(--paper);
}
.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 72px) clamp(48px, 7vw, 96px) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.hero__name {
  margin: 0;
  font-family: "Mrs Saint Delafield", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: clamp(4.25rem, 9.4vw, 8.75rem);
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  padding: 0.05em 0 0.12em;
}
.hero__sign { display: inline-block; -webkit-text-stroke: 0.012em currentColor; }

.hero__roles {
  list-style: none;
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  line-height: 1.35;
}
.hero__roles li + li { margin-top: 4px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

.hero__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--red-deep);
}
.hero__photo {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 50% 20%;
}

.btn {
  display: inline-block;
  padding: 14px 22px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 2px;
}
.btn--light { background: var(--paper); color: var(--red); }
.btn--light:hover { background: var(--stone); }
.btn--outline { border: 2px solid var(--paper); color: var(--paper); padding: 12px 20px; }
.btn--outline:hover { background: var(--red-deep); }
.hero :focus-visible { outline-color: var(--paper); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__media { order: -1; aspect-ratio: 4 / 5; max-height: 72svh; }
  .hero__text { padding: 40px var(--gutter) 48px; }
}

/* ---------- Citatul: textul pe fond închis, fotografia alături (textul nu atinge niciodată fața) ---------- */
.statement {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "text media";
  background: var(--ink);
  color: var(--paper);
}
.statement__text {
  grid-area: text;
  align-self: center;
  margin: 0;
  padding: clamp(80px, 11vw, 160px) clamp(32px, 5vw, 80px) clamp(80px, 11vw, 160px) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.statement blockquote { margin: 0; }
.statement__quote {
  margin: 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 4.25rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.statement__quote .w { transition: opacity 0.35s ease; }
.statement__quote.is-split .w { opacity: 0.22; }
.statement__quote.is-split .w.is-lit { opacity: 1; }
.statement figcaption {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 6px solid var(--red);
  width: fit-content;
  max-width: 100%;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
}
.statement :focus-visible { outline-color: var(--paper); }
.statement__media {
  grid-area: media;
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.statement__media img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 74% 30%;
}
@media (max-width: 860px) {
  .statement { grid-template-columns: 1fr; grid-template-areas: "media" "text"; }
  .statement__media { min-height: 0; aspect-ratio: 4 / 3; }
  .statement__media img { object-position: 72% 25%; }
  .statement__text { padding: 48px var(--gutter) 40px; }
}

.facts { background: var(--paper); border-bottom: 1px solid var(--line); }
.facts__list {
  list-style: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fact {
  padding: clamp(36px, 5vw, 56px) clamp(16px, 2vw, 28px) clamp(36px, 5vw, 56px) 0;
}
.fact + .fact { padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
.fact__num {
  display: block;
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  line-height: 1;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.fact__label {
  display: block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 24ch;
}
@media (max-width: 860px) {
  .facts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact__num { font-size: clamp(2rem, 9.5vw, 3.25rem); font-stretch: 110%; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Un singur moment de mișcare: numele urcă, poza apare. */
@media (prefers-reduced-motion: no-preference) {
  .hero__sign { animation: write 2.4s cubic-bezier(0.45, 0.05, 0.35, 1) 0.35s backwards; }
  @keyframes write {
    from { clip-path: inset(-40% 100% -50% -15%); }
    to { clip-path: inset(-40% -15% -50% -15%); }
  }
  .hero__photo { animation: appear 0.8s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
  @keyframes appear {
    from { opacity: 0; scale: 1.06; }
    to { opacity: 1; scale: 1; }
  }
}

/* ---------- Secțiuni ---------- */
.section { padding: var(--space) 0; }
.section--stone { background: var(--stone); }

.h2 {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.h3 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
}
.h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.35;
}
.lead {
  font-size: clamp(1.25rem, 2vw, 1.4375rem);
  line-height: 1.5;
  max-width: 40ch;
  margin: 0 0 24px;
}
.note { color: var(--muted); max-width: 60ch; margin: 0; }
.source { color: var(--muted); font-size: 1rem; }

.source-link {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}
.source-link:hover { color: var(--red); }

/* ---------- Despre ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about__photo { margin: 0; position: sticky; top: 100px; }
.about__photo img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
/* Doar el, decupat din fotografia reală, direct pe pagină. Umbra de la picioare îl
   așază pe „podea"; la derulare vine ușor spre cel care citește. */
.about__photo--3d { aspect-ratio: 2 / 3; --p: 0; --mx: 0; --my: 0; }
.about__photo--3d .about__om {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  transform-origin: 50% 97%;
  transform: translate(calc(var(--mx) * 8px), calc(var(--my) * 5px)) scale(calc(1 + var(--p) * 0.08));
  filter: drop-shadow(0 calc(6px + var(--p) * 8px) calc(8px + var(--p) * 8px) rgba(23, 32, 51, calc(0.1 + var(--p) * 0.1)));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1), filter 0.6s ease, opacity 0.9s ease;
}
.about__umbra {
  position: absolute;
  left: 50%;
  bottom: 1.2%;
  width: 52%;
  height: 4.5%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(23, 32, 51, 0.32), rgba(23, 32, 51, 0));
  transform: translateX(calc(-50% + var(--mx) * 4px)) scale(calc(1 + var(--p) * 0.18), calc(1 + var(--p) * 0.1));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1);
}
/* Intrarea: când ajungi la „Despre", el urcă ușor în scenă. */
.js .about__photo--3d:not(.is-in) .about__om { opacity: 0; transform: translateY(26px); }
.js .about__photo--3d:not(.is-in) .about__umbra { opacity: 0; }
.about__umbra { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.9s ease; }
@media (prefers-reduced-motion: reduce) {
  .about__photo--3d .about__om, .about__umbra { transition: none; }
  .js .about__photo--3d:not(.is-in) .about__om, .js .about__photo--3d:not(.is-in) .about__umbra { opacity: 1; transform: none; }
}
.about__bio p { max-width: 62ch; }
.about__bio .lead { max-width: 32ch; }
.about__timeline { margin-top: 56px; }

.timeline {
  --progress: 1;
  position: relative;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--line);
}
.timeline::after {
  background: var(--red);
  transform-origin: top;
  transform: scaleY(var(--progress));
}
.timeline li {
  position: relative;
  padding: 0 0 22px 28px;
  font-size: 1.0625rem;
  line-height: 1.5;
}
.timeline li::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -5px;
  top: 0.45em;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.timeline li::before { border-color: var(--red); }
.timeline li:last-child::before { background: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .js .timeline { --progress: 0; }
  .js .timeline li::before { border-color: var(--line); }
  .js .timeline li.is-past::before { border-color: var(--red); }
  .js .timeline li:last-child::before { background: var(--paper); }
  .js .timeline li:last-child.is-past::before { background: var(--red); transform: scale(1.25); }
}
.timeline__year {
  display: block;
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--red);
}

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { position: static; max-width: 420px; }
  /* relativ, nu lipicios: fără „top: 100px” moștenit, care o împingea peste titlu */
  .about__photo.about__photo--3d { position: relative; top: auto; margin-bottom: 8px; }
}

/* ---------- Din teren: bandă de fotografii ---------- */
.field { padding: 0 0 var(--space); overflow: hidden; }
.field__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.field__head .h2 { margin-bottom: 8px; }
.strip__nav { display: flex; gap: 10px; flex-shrink: 0; }
.strip__btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.strip__btn:hover { background: var(--ink); color: var(--paper); }
.strip__btn:disabled { opacity: 0.3; cursor: default; background: var(--paper); color: var(--ink); }

.strip {
  list-style: none;
  margin: 0;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 12px;
  scrollbar-width: none;
  cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging .strip__open { pointer-events: none; }
.strip__item { flex: 0 0 auto; scroll-snap-align: start; }
.strip__open {
  display: block;
  padding: 0;
  border: 0;
  background: var(--stone);
  overflow: hidden;
  cursor: zoom-in;
}
.strip__open img {
  height: clamp(300px, 34vw, 460px);
  width: auto;
  max-width: none;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.strip__open:hover img { transform: scale(1.04); }
.strip__cap {
  margin: 10px 0 0;
  max-width: 34ch;
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}
/* Sub fotografii: cât ai văzut din bandă și la a câta fotografie ești. */
.strip__bar { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.strip__track { position: relative; flex: 1; height: 3px; background: var(--line); overflow: hidden; }
.strip__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--red);
  transition: width 0.25s ease;
}
.strip__count {
  min-width: 5ch;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}
.strip__btn--jos { display: none; }
@media (max-width: 760px) {
  .strip__nav { display: none; }
  .strip__btn--jos { display: grid; width: 48px; height: 48px; flex-shrink: 0; }
  /* Fotografia nu mai e mai lată decât ecranul: următoarea se vede pe margine, ca semn că banda continuă. */
  .strip__open img { height: 260px; max-width: 78vw; object-fit: cover; }
  .strip__cap { max-width: 78vw; }
}

/* ---------- Fotografia mărită ---------- */
.lightbox {
  width: 100vw;
  height: 100svh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(12, 17, 28, 0.96);
  color: var(--paper);
}
.lightbox::backdrop { background: rgba(12, 17, 28, 0.9); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 64px 88px 16px;
  touch-action: pan-y;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease;
}
.lightbox__img.is-loading { opacity: 0; }
.lightbox__bar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px 24px;
  font-family: var(--sans);
  font-size: 0.9375rem;
}
.lightbox__cap { margin: 0; max-width: 70ch; }
.lightbox__count { color: rgba(255, 255, 255, 0.6); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  font: 600 0.9375rem var(--sans);
  cursor: pointer;
}
.lightbox :focus-visible { outline-color: var(--paper); }
@media (max-width: 760px) {
  .lightbox__stage { padding: 64px 8px 8px; }
  .lightbox__btn { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .lightbox__prev { left: 12px; }
  .lightbox__next { right: 12px; }
  .lightbox__bar { flex-direction: column; gap: 4px; min-height: 80px; padding: 12px 68px 18px; text-align: center; }
}

/* ---------- Registrul de activitate ---------- */
.record__head { margin-bottom: 36px; }
.record__head .lead { max-width: 52ch; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.filter {
  font: 600 0.9375rem var(--sans);
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.record {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.record__item {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr) auto;
  gap: 8px 28px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.record__item[hidden] { display: none; }
.record__tag {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--red);
}
.record__item[data-type="lucru"] .record__tag { color: var(--ink-soft); }
.record__item[data-type="declaratie"] .record__tag { color: var(--muted); font-weight: 600; }
.record__title { font-size: 1.125rem; line-height: 1.45; }
.record__src {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}
.record__src:hover { color: var(--red); }
.record__more { margin: 24px 0 0; font-family: var(--sans); font-weight: 600; font-size: 1rem; }

@media (max-width: 700px) {
  .record__item { grid-template-columns: 1fr auto; }
  .record__title { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Două coloane: o cifră mare + listă (Consiliul Județean, Ploiești) ---------- */
.split__head .lead { max-width: 46ch; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(32px, 6vw, 88px);
  margin-top: 40px;
  align-items: start;
}
.split__figure {
  margin: 0;
  padding-top: 20px;
  border-top: 6px solid var(--red);
  font-size: 1.375rem;
  line-height: 1.45;
}
.split__figure strong {
  font-family: var(--sans);
  font-stretch: 120%;
  font-weight: 800;
  font-size: 1.15em;
}
.split__sources {
  display: block;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}
.split__sources a:hover { color: var(--red); }

@media (min-width: 901px) {
  .split__figure { position: sticky; top: 96px; }
}

.split__list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 48px;
}
.split__list li {
  break-inside: avoid;
  padding: 0 0 26px;
}
.split__list p { margin: 6px 0 0; font-size: 1.0625rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .split__list { columns: 1; }
}

/* ---------- Harta Prahovei ---------- */
.split__figure.split__figure--wide { position: static; max-width: 40ch; margin: 8px 0 48px; }
.map {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
/* Harta e o machetă 3D: blocul județului, cu relieful real deasupra și locurile
   cu proiecte ridicate ca niște stâlpi. Unghiurile sunt variabile animabile, ca
   stâlpii să se poată întoarce mereu spre cel care privește. */
@property --tilt { syntax: '<angle>'; inherits: true; initial-value: 47deg; }
@property --spin { syntax: '<angle>'; inherits: true; initial-value: -11deg; }
@property --px { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --py { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --grow { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --rise { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --sx { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --sy { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --zoom { syntax: '<number>'; inherits: true; initial-value: 1; }
@property --bob { syntax: '<length>'; inherits: true; initial-value: 0px; }

.map__canvas { position: relative; perspective: 1700px; perspective-origin: 50% 15%; }
.map3d {
  --tilt: 47deg;
  --spin: -11deg;
  --px: 0deg;
  --py: 0deg;
  --grow: 1;
  position: relative;
  margin: -2% 0 -9%;
  transform-style: preserve-3d;
  transform-origin: 50% 45%;
  transform: scale(var(--zoom)) rotateX(calc(var(--tilt) + var(--py) + var(--sy))) rotateZ(calc(var(--spin) + var(--px) + var(--sx)));
}
.map3d__scene { position: relative; aspect-ratio: 1060 / 1073; transform-style: preserve-3d; }
.map3d__layer,
.map3d__top { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map3d__layer { transform: translateZ(calc(var(--i) * -2.4px * var(--grow))); }
.map3d__layer use { fill: color-mix(in srgb, var(--red) calc(100% - var(--i) * 4.5%), #2a0306); }
.map3d__layer:first-child { filter: drop-shadow(0 30px 34px rgba(23, 32, 51, 0.38)); }
.map3d__top { transform: translateZ(0.5px); }
.map3d__light { fill: url(#judet-lumina); pointer-events: none; }
.map__svg { display: block; }
.map__county {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.map__route {
  fill: none;
  stroke: var(--red);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0.85;
}
.map3d__dot { fill: var(--ink-soft); stroke: var(--paper); stroke-width: 2.5; }
/* Lumina care curge pe drumuri și raza care trece peste relief */
.map__flow {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0.012 0.05;
  opacity: 0.95;
}
.map3d__shine { opacity: 0; }

/* Etichetele și stâlpii stau „în picioare": se întorc spre cel care privește. */
.map3d__marks { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(1px); pointer-events: none; }
.map3d__town,
.map__pin { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; transform-style: preserve-3d; }
.map3d__stand,
.map__stand {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
  transform-origin: 50% 100%;
  transform: translateX(calc(-50% + var(--ox, 0px))) rotateZ(calc(-1 * (var(--spin) + var(--px) + var(--sx)))) rotateX(calc(-1 * (var(--tilt) + var(--py) + var(--sy))));
}
.map3d__town .map3d__stand {
  bottom: 10px;
  padding: 2px 7px;
  font: 600 0.8125rem var(--sans);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 2px;
}
.map3d__town--munte .map3d__stand { color: var(--muted); font-weight: 500; letter-spacing: 0.02em; background: rgba(255, 255, 255, 0.7); }
.map__pin { padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; color: var(--ink); }
.map__base {
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(195, 21, 28, 0.3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
  opacity: var(--rise);
}
.map__label {
  margin-bottom: 10px;
  padding: 5px 10px;
  font: 700 0.875rem var(--sans);
  color: var(--ink);
  background: var(--paper);
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.2);
  opacity: var(--rise);
  transition: background 0.2s ease, color 0.2s ease;
}
.map__head {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--paper), 0 8px 16px rgba(23, 32, 51, 0.35);
  transform: scale(var(--rise));
  transition: background 0.2s ease, transform 0.25s ease;
}
.map__stem {
  width: 3px;
  height: calc((var(--h) + var(--bob)) * var(--rise));
  border-radius: 2px;
  background: linear-gradient(var(--red), rgba(195, 21, 28, 0.15));
}
.map__pin:hover .map__head { transform: scale(calc(var(--rise) * 1.18)); }
.map__pin.is-active .map__head { background: var(--ink); transform: scale(calc(var(--rise) * 1.3)); }
.map__pin.is-active .map__label { background: var(--ink); color: var(--paper); }
.map__pin.is-active .map__base { background: rgba(23, 32, 51, 0.35); }
.map__pin:focus-visible { outline: none; }
.map__pin:focus-visible .map__label { outline: 3px solid var(--red); outline-offset: 2px; }
.map__canvas .map__credit { position: relative; margin-top: 18px; }
.map__credit {
  margin: 8px 0 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
}

.map__hint { margin: 0 0 12px; font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }
.map__places {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.map__place {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.map__place:hover { border-color: var(--ink); }
.map__place[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.map__place-name { font: 700 0.9375rem var(--sans); }
.map__place-what { font: 500 0.8125rem var(--sans); opacity: 0.75; }

.map__detail { padding-top: 20px; border-top: 6px solid var(--red); }
.map__detail[hidden] { display: none; }
.map__item + .map__item { margin-top: 18px; }
.map__item-title { margin: 0; font: 600 1.125rem/1.35 var(--serif); }
.map__item p { margin: 4px 0 0; font-size: 1.0625rem; line-height: 1.55; }
.map__item .map__src { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); }
.map__note { margin: 40px 0 0; max-width: 70ch; color: var(--ink-soft); font-size: 1.0625rem; }
.map__note a { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }

@media (max-width: 960px) {
  .map { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  /* Pe telefon: harta încape în ecran, iar eticheta apare doar la locul ales. */
  .map3d { --tilt: 44deg; --spin: -7deg; margin: -4% 0 -12%; scale: 0.86; }
  .map__pin:not(.is-active) .map__label { display: none; }
  .map3d__town:not(.map3d__town--munte) { display: none; }
  .map__label { font-size: 0.75rem; padding: 4px 8px; }
  .map3d__town .map3d__stand { font-size: 0.6875rem; padding: 1px 5px; }
  .map__head { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Intrarea în scenă: conturul se desenează pe plat, apoi harta se înclină,
     blocul capătă grosime, relieful apare și stâlpii se ridică unul câte unul. */
  .js .map3d {
    transition: --tilt 2s cubic-bezier(0.2, 0.7, 0.1, 1) 0.8s, --spin 2.4s cubic-bezier(0.2, 0.7, 0.1, 1) 0.5s,
      --zoom 2.2s cubic-bezier(0.2, 0.7, 0.1, 1) 0.4s, --grow 1.3s cubic-bezier(0.3, 1.4, 0.5, 1) 1.5s,
      --px 0.6s ease-out, --py 0.6s ease-out;
  }
  .js .map:not(.is-drawn) .map3d { --tilt: 0deg; --spin: -38deg; --grow: 0; --zoom: 0.82; }
  /* Apoi macheta nu stă niciodată perfect nemișcată: se leagănă încet, ca și cum ar pluti. */
  .js .map.is-drawn .map3d { animation: map-sway 11s ease-in-out 3.6s infinite; }
  @keyframes map-sway {
    0%, 100% { --sx: 0deg; --sy: 0deg; }
    25% { --sx: 5deg; --sy: -1.5deg; }
    75% { --sx: -5deg; --sy: 1.5deg; }
  }
  @media (hover: hover) and (pointer: fine) {
    .map__canvas:hover .map3d { animation-play-state: paused; }
  }
  .js .map__county { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(0.6, 0, 0.2, 1); }
  .js .map:not(.is-drawn) .map__county { stroke-dashoffset: 1; }
  .js .map3d__relief, .js .map3d__light { transition: opacity 0.8s ease 0.7s; }
  .js .map:not(.is-drawn) .map3d__relief, .js .map:not(.is-drawn) .map3d__light { opacity: 0; }
  .js .map3d__layer { transition: opacity 0.5s ease 1.6s; }
  .js .map:not(.is-drawn) .map3d__layer { opacity: 0; }
  .js .map:not(.is-drawn) .map__route { stroke-dashoffset: 1; }
  .js .map__route { transition: stroke-dashoffset 1.4s cubic-bezier(0.6, 0, 0.2, 1) 2.6s; }
  .js .map__flow { transition: opacity 0.8s ease 3.8s; animation: map-flow 2.6s linear infinite; }
  .js .map:not(.is-drawn) .map__flow { opacity: 0; }
  @keyframes map-flow { to { stroke-dashoffset: -0.062; } }
  /* Stâlpii țâșnesc unul câte unul, apoi „respiră" ușor. */
  .js .map__pin { transition: --rise 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.35) calc(2.6s + var(--d, 0) * 0.18s); }
  .js .map:not(.is-drawn) .map__pin { --rise: 0; }
  .js .map.is-drawn .map__pin { animation: pin-bob 3.4s ease-in-out calc(3.8s + var(--d, 0) * 0.45s) infinite; }
  @keyframes pin-bob { 0%, 100% { --bob: 0px; } 50% { --bob: 10px; } }
  .js .map3d__town, .js .map3d__dot { transition: opacity 0.6s ease 2.8s; }
  .js .map:not(.is-drawn) .map3d__town, .js .map:not(.is-drawn) .map3d__dot { opacity: 0; }
  .js .map.is-drawn .map__base { animation: map-pulse 2.8s ease-out calc(3.2s + var(--d, 0) * 0.18s) infinite; }
  /* O rază de lumină trece din când în când peste relief. */
  .js .map.is-drawn .map3d__shine { animation: map-shine 8s ease-in-out 4.2s infinite; }
  @keyframes map-shine {
    0% { opacity: 0.55; transform: skewX(-20deg) translateX(0); }
    32% { opacity: 0.55; transform: skewX(-20deg) translateX(1700px); }
    33%, 100% { opacity: 0; transform: skewX(-20deg) translateX(1700px); }
  }
  @keyframes map-pulse {
    from { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 0 rgba(23, 32, 51, 0.45); }
    to { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 26px rgba(23, 32, 51, 0); }
  }
  .js .map__detail:not([hidden]) { animation: detail-in 0.45s ease both; }
  @keyframes detail-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Teme ---------- */
.themes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 40px;
  margin-top: 40px;
}
.theme {
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}
.theme p { margin: 0; font-size: 1.125rem; max-width: 46ch; }

@media (max-width: 600px) {
  .themes { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Contact: oglinda primului ecran ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  min-height: clamp(560px, 80svh, 820px);
  background: var(--ink);
  color: var(--paper);
}
.contact__photo { position: relative; margin: 0; overflow: hidden; }
.contact__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 35%;
}
.contact__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding: var(--space) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) var(--space) clamp(32px, 6vw, 96px);
}
.contact .lead { max-width: 36ch; }
.contact__mail {
  display: table; /* fiecare pe rândul lui: telefonul, apoi e-mailul */
  font-family: var(--sans);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.875rem);
  line-height: 1.2;
  overflow-wrap: break-word;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
}
/* Telefonul și e-mailul ca pe o carte de vizită: eticheta mică, apoi datele. */
.contact__lines { margin: 0; display: grid; gap: 22px; }
.contact__lines dt {
  margin-bottom: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.62);
}
.contact__lines dd { margin: 0; }
.contact__offices { padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.contact__offices address { font-style: normal; }
.contact__offices p { margin: 0 0 6px; }
.contact :focus-visible { outline-color: var(--paper); }

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; min-height: 0; }
  .contact__photo { aspect-ratio: 4 / 3; }
  .contact__body { padding: 56px var(--gutter); }
}

/* ---------- Subsol ---------- */
.site-footer {
  background: var(--ink);
  color: #B7C0CF;
  border-top: 1px solid var(--ink-soft);
  padding: 28px 0 40px;
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.5;
}
.site-footer p { margin: 0 0 6px; }

/* ---------- Apariții la derulare (doar dacă scriptul rulează și omul nu a cerut mișcare redusă) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.1, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.1, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal-img img { clip-path: inset(0 0 100% 0); transition: clip-path 0.9s cubic-bezier(0.7, 0, 0.2, 1); }
  .js .reveal-img.is-in img { clip-path: inset(0 0 0 0); }
  .btn { transition: background 0.2s ease, transform 0.2s ease; }
  .btn:hover { transform: translateY(-2px); }
}
