/* ═════════ PROIECTE · harta orașului ═════════ */

/* ── antet: harta ── */
.map-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(820px, 96svh);
  background: radial-gradient(ellipse at 70% 55%, #0b1f55 0%, #060b1e 70%);
  color: var(--cream);
}
.map { position: absolute; inset: 0; z-index: -1; }
.map svg { width: 100%; height: 100%; display: block; }
.streets .st { fill: none; stroke: rgba(143, 208, 255, .16); stroke-width: 1; }
.streets .av { fill: none; stroke: rgba(143, 208, 255, .32); stroke-width: 2.4; }
.streets .river { fill: none; stroke: #0d2b66; stroke-width: 34; stroke-linecap: round; opacity: .9; }
.streets .park { fill: rgba(80, 160, 120, .12); }
.streets .route { fill: none; stroke: #3d7bff; stroke-width: 2; stroke-dasharray: 2 6; opacity: .9; }
.streets .ray { fill: none; stroke: #9fd4ff; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 5px #9fd4ff); }

.map-pins { position: absolute; inset: var(--topbar) 0 0 0; }  /* sub bara de sus, ca niciun pin să nu stea sub ea */
.pin {
  position: absolute; left: var(--x); top: var(--y); translate: -50% -100%;
  display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--cream); font: 600 13px/1 var(--font-body);
}
.pin::before { /* acul pinului */
  content: ""; order: 2; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; rotate: -45deg;
  background: radial-gradient(circle at 50% 50%, #fff 0 22%, #3d7bff 24%);
  box-shadow: 0 6px 18px -4px rgba(61, 123, 255, .8);
  transition: transform .2s ease;
}
.pin span {
  order: 1; padding: 7px 11px; border-radius: 999px; white-space: nowrap;
  background: rgba(6, 11, 30, .82); border: 1px solid rgba(143, 208, 255, .35); backdrop-filter: blur(4px);
  transition: background-color .2s ease, border-color .2s ease;
}
.pin:hover span, .pin:focus-visible span { background: #3d7bff; border-color: #3d7bff; }
.pin:hover::before { transform: scale(1.15); }
.pin:focus-visible { outline: none; }
.pin:focus-visible::before { outline: 3px solid #8fd0ff; outline-offset: 4px; }

.hub {
  position: absolute; left: 70%; top: 55%; translate: -50% -50%;
  width: clamp(84px, 9vw, 130px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, #1f3f9a 0%, #0b1a52 70%);
  box-shadow: 0 0 0 10px rgba(61, 123, 255, .12), 0 0 60px rgba(61, 123, 255, .7);
  animation: hubpulse 2.6s ease-in-out infinite;
}
.hub rootit-logo { width: 64%; --rootit-ink: #f5f4ef; --rootit-blue: #3d7bff; }
@keyframes hubpulse { 50% { box-shadow: 0 0 0 18px rgba(61, 123, 255, .06), 0 0 90px rgba(61, 123, 255, .9); } }
.map-copy {
  position: absolute; left: 6vw; top: 50%; translate: 0 -40%; width: min(520px, 38vw); z-index: 2;
  padding: 28px 28px 30px 0;
}
.map-copy::before { content: ""; position: absolute; inset: -40% -30% -40% -40%; z-index: -1; background: radial-gradient(ellipse at 30% 50%, rgba(6,11,30,.92) 30%, transparent 70%); }
.map-copy .kicker { color: #6f9bff; }
.map-copy h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.03; margin-bottom: 18px; }
.map-copy p { color: rgba(245,244,239,.75); font-size: clamp(17px, 1.4vw, 20px); }

/* ── poveștile ── */
.stories-section { background: #f2f1ec; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.stories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.story {
  display: grid; grid-template-rows: auto 1fr; border-radius: 28px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); scroll-margin-top: calc(var(--topbar) + 20px);
  transition: box-shadow .3s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.story:hover { box-shadow: 0 30px 60px -34px rgba(1,4,15,.45); transform: translateY(-3px); }
.story.out { display: none; }
.story.pop { animation: pop .5s cubic-bezier(.22,1,.36,1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.story.flash { box-shadow: 0 0 0 4px #3d7bff, 0 30px 60px -34px rgba(1,4,15,.45); }
.scene { aspect-ratio: 16 / 10; background: radial-gradient(ellipse at 50% 0%, #142a73, #060b1e 75%); }
.scene svg { width: 100%; height: 100%; display: block; }
.story-body { padding: 24px 26px 26px; display: grid; gap: 12px; align-content: start; }
.story-body .industry { font: 600 12px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin: 0; }
.story-body h3 { font: 700 clamp(21px, 2vw, 26px)/1.15 var(--font-head); margin: 0; letter-spacing: -0.01em; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 2px; }
.ba div { padding: 14px; border-radius: 16px; background: #f2f1ec; }
.ba div:last-child { background: #e4ebfb; }
.ba dt { font: 600 11px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ba div:last-child dt { color: var(--blue); }
.ba dd { margin: 0; font-size: 15px; line-height: 1.45; }

/* ── elementele scenelor ── */
.scene .panel { fill: #0f1f5c; stroke: rgba(143,208,255,.35); stroke-width: 1.2; }
.scene .soft { fill: rgba(245,244,239,.1); }
.scene .ink { fill: #f5f4ef; }
.scene .blue { fill: #3d7bff; }
.scene .cyan { fill: #8fd0ff; }
.scene .ok { fill: #6fdc8c; }
.scene .warn { fill: #ff6b6b; }
.scene .lbl { font: 600 9px var(--font-body); fill: #f5f4ef; }
.scene .lbl.dim { fill: rgba(245,244,239,.6); }
.scene .line { fill: none; stroke: #8fd0ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scene .dash { fill: none; stroke: rgba(143,208,255,.55); stroke-width: 2; stroke-dasharray: 3 5; }
.scene * { transform-box: fill-box; }
.scene:not(.run) * { animation-play-state: paused !important; }

/* 1 clinică: programările umplu calendarul, telefonul primește reminder */
.s-clinica .c { fill: rgba(245,244,239,.08); animation: book 7s infinite; animation-delay: calc(var(--i) * .22s); }
@keyframes book { 0%, 4% { fill: rgba(245,244,239,.08); } 9%, 82% { fill: #3d7bff; } 90%, 100% { fill: rgba(245,244,239,.08); } }
.s-clinica .toast { animation: toast 3.5s infinite; transform-origin: 50% 50%; }
@keyframes toast { 0%, 20% { opacity: 0; transform: translateY(8px); } 30%, 80% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; } }
.s-clinica .bell { transform-origin: 50% 10%; animation: ring 3.5s infinite; }
@keyframes ring { 24% { rotate: 0deg; } 27% { rotate: 18deg; } 30% { rotate: -16deg; } 33% { rotate: 10deg; } 36%, 100% { rotate: 0deg; } }
/* 2 magazin: coletul pe bandă, factura și stocul */
.s-magazin .box { animation: belt 4s linear infinite; }
@keyframes belt { from { transform: translateX(0); } 70% { transform: translateX(170px); opacity: 1; } 78%, 100% { transform: translateX(170px); opacity: 0; } }
.s-magazin .roller { transform-origin: center; animation: spin 1s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.s-magazin .invoice { transform-origin: 50% 100%; animation: inv 4s infinite; }
@keyframes inv { 0%, 68% { opacity: 0; transform: scale(.6) translateY(10px); } 76%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.s-magazin .s1 { animation: swapA 4s infinite; } .s-magazin .s2 { animation: swapB 4s infinite; }
@keyframes swapA { 0%, 70% { opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes swapB { 0%, 70% { opacity: 0; } 76%, 100% { opacity: 1; } }
/* 3 construcții: macaraua lucrează, șantierele avansează, o alertă clipește */
.s-constructii .hook { transform-origin: 50% 0%; animation: hook 3s ease-in-out infinite; }
@keyframes hook { 50% { transform: scaleY(1.7); } }
.s-constructii .load { animation: load 3s ease-in-out infinite; }
@keyframes load { 50% { transform: translateY(26px); } }
.s-constructii .bar { transform-origin: 0 50%; animation: grow 5s ease-in-out infinite; animation-delay: calc(var(--i) * .4s); }
@keyframes grow { 0% { transform: scaleX(.15); } 60%, 100% { transform: scaleX(var(--to)); } }
.s-constructii .alert { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
/* 4 imobiliare: casele, cererea zboară la agent */
.s-imobiliare .house { animation: bob 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.s-imobiliare .agent-ring { transform-origin: center; animation: ping 2.5s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.8); opacity: 0; } }
/* 5 restaurant: bonurile intră în coadă și urcă */
.s-restaurant .ticket { animation: queue 8s linear infinite; animation-delay: calc(var(--i) * -2s); opacity: 0; }
@keyframes queue {
  0% { transform: translate(120px, 96px); opacity: 0; } 8% { transform: translate(0, 96px); opacity: 1; }
  25%, 33% { transform: translate(0, 64px); } 50%, 58% { transform: translate(0, 32px); } 75%, 83% { transform: translate(0, 0); opacity: 1; }
  92%, 100% { transform: translate(0, -20px); opacity: 0; }
}
/* 6 avocatură: documentul se scrie singur și primește ștampila */
.s-avocatura .tl { transform-origin: 0 50%; animation: type 7s infinite; animation-delay: calc(var(--i) * .35s); }
@keyframes type { 0% { transform: scaleX(0); } 6%, 88% { transform: scaleX(1); } 96%, 100% { transform: scaleX(0); } }
.s-avocatura .sig { stroke-dasharray: 120; animation: sign 7s infinite; }
@keyframes sign { 0%, 38% { stroke-dashoffset: 120; } 52%, 88% { stroke-dashoffset: 0; } 96%, 100% { stroke-dashoffset: 120; } }
.s-avocatura .stamp { transform-origin: center; animation: stamp 7s infinite; }
@keyframes stamp { 0%, 54% { opacity: 0; transform: scale(2) rotate(-24deg); } 60%, 88% { opacity: 1; transform: scale(1) rotate(-12deg); } 96%, 100% { opacity: 0; } }
/* 7 distribuție: confirmarea la depozit */
.s-distributie .check { transform-origin: center; animation: chk 5s infinite; }
@keyframes chk { 0%, 86% { opacity: 0; transform: scale(.4); } 92%, 100% { opacity: 1; transform: scale(1); } }
.s-distributie .order { animation: ord 5s infinite; }
@keyframes ord { 0% { opacity: 0; } 8%, 30% { opacity: 1; } 40%, 100% { opacity: 0; } }
/* 8 financiar: graficul se desenează, monedele se adună */
.s-financiar .curve { stroke-dasharray: 320; animation: draw 5s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 320; } 55%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.s-financiar .area { animation: area 5s ease-in-out infinite; }
@keyframes area { 0%, 40% { opacity: 0; } 60%, 90% { opacity: .35; } 100% { opacity: 0; } }
.s-financiar .coin { animation: drop 5s cubic-bezier(.5,0,.75,0) infinite; animation-delay: calc(var(--i) * .25s); }
@keyframes drop { 0% { transform: translateY(-60px); opacity: 0; } 10% { opacity: 1; } 22%, 90% { transform: none; opacity: 1; } 100% { opacity: 0; } }
/* 9 producție: roțile se învârt în același ritm */
.s-productie .gear { transform-origin: center; animation: spin var(--d) linear infinite; animation-direction: var(--dir, normal); }
.s-productie .crate { animation: belt2 3s linear infinite; animation-delay: calc(var(--i) * -1s); }
@keyframes belt2 { from { transform: translateX(-40px); } to { transform: translateX(260px); } }

/* ── telefon și tabletă ── */
@media (max-width: 980px) {
  .stories { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .map-hero { min-height: auto; display: grid; grid-template-rows: 58svh auto; }
  .map { bottom: auto; height: 58svh; }
  .map-pins { bottom: auto; height: 58svh; top: var(--topbar); }
  .pin span { display: none; }
  .pin::before { width: 22px; height: 22px; }
  /* zonă de apăsare de 44 px; vârful pinului rămâne jos, în același punct */
  .pin { min-width: 44px; min-height: 44px; align-content: end; }
  .hub { width: 72px; }
  .map-copy { position: relative; left: auto; top: auto; translate: none; width: auto; grid-row: 2; padding: 8px 18px 44px; }
  .map-copy::before { display: none; }
}
@media (max-width: 520px) {
  .ba { grid-template-columns: 1fr; }
  .story-body { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene *, .hub { animation: none !important; }
}

/* ── sus: banda cu clienții (subțire, logo-uri albe; se derulează continuu, se oprește la hover) ── */
.clients {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: clamp(20px, 3vw, 40px);
  padding: calc(var(--topbar) + 10px) 0 10px 6vw;
  background: #060b1e; color: var(--cream);
  border-bottom: 1px solid rgba(143, 208, 255, .14);
}
.clients-label {
  flex: none; display: flex; align-items: center; gap: 10px; margin: 0;
  font: 500 12px/1 "JetBrains Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: #8fb4ff;
}
.clients-label .dot { width: 7px; height: 7px; border-radius: 50%; background: #6fdc8c; box-shadow: 0 0 0 4px rgba(111, 220, 140, .16); }
.clients-marquee {
  flex: 1; min-width: 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.clients-track {
  display: flex; align-items: center; width: max-content; margin: 0; padding: 0; list-style: none;
  animation: clients 46s linear infinite;
}
.cl {
  flex: none; display: flex; align-items: center; gap: 44px; height: 56px; padding-right: 44px;
  opacity: .82; transition: opacity .2s ease;
}
.cl:hover { opacity: 1; }
.cl::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #3d7bff; opacity: .7; }
.cl img { display: block; height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.cl-word { font: 600 19px/1 var(--font-head); letter-spacing: -0.01em; white-space: nowrap; color: var(--cream); }
.clients:hover .clients-track { animation-play-state: paused; }
@keyframes clients { to { transform: translateX(-50%); } }
@media (max-width: 860px) {
  .clients { flex-direction: column; align-items: stretch; gap: 4px; padding: calc(var(--topbar) + 12px) 0 6px; }
  .clients-label { padding: 0 18px; font-size: 11px; }
  .cl { height: 46px; gap: 32px; padding-right: 32px; }
  .cl img { height: 34px; }
  .cl-word { font-size: 17px; }
  .clients-track { animation-duration: 34s; }
  .clients + .map-hero .map-pins { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .clients-marquee { overflow-x: auto; mask-image: none; }
  .clients-track { animation: none; }
}
