/* =============================================================
   NovaWebDesign — mișcare și finisaje globale (pereche cu js/nova-motion.js)
   1. preloader (doar prima pagină, prima vizită din sesiune; vezi scriptul din <head> al index.html)
   2. text rând cu rând · 3. fundalul care curge între secțiuni · 4. iconițe animate la hover
   5. subsolul premium cu „NOVA” mare · 6. butoanele din subsol și din bara de jos
   Doar culori din variabilele temei (în Halloween totul devine portocaliu singur).
   Se încarcă înainte de css/tema.css. Doar transform / opacity / stroke.
   ============================================================= */

:root {
  /* tonurile fundalului între secțiuni: foarte apropiate, fără salturi */
  --nv-tone-0: var(--nv-bg);
  --nv-tone-1: color-mix(in oklab, var(--nv-bg) 40%, var(--nv-card));
  --nv-tone-2: color-mix(in oklab, var(--nv-bg) 93%, var(--nv-acc));
}
@supports not (color: color-mix(in oklab, red, blue)) {
  :root { --nv-tone-1: var(--nv-card); --nv-tone-2: var(--nv-bg); }
}

/* ---------- 1. PRELOADER ---------- */
.nv-pre { display: none; }
html.nv-preloader .nv-pre,
html.nv-pre-out .nv-pre {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(42% 36% at 50% 50%, rgba(var(--nv-acc-rgb), .08), transparent 72%),
    var(--nv-bg);
  /* plasă de siguranță: dacă scriptul nu mai ajunge la final, stratul dispare singur */
  animation: nvPreSafe .01s linear 1.5s forwards;
}
.nv-pre__in {
  display: grid;
  justify-items: center;
  gap: 20px;
  transform-origin: 50% 50%;
}
.nv-pre__logo {
  display: block;
  width: min(58vw, 300px);
  height: auto;
  overflow: visible;
}
.nv-pre__l {
  fill: url(#nvPreG);
  fill-opacity: 0;
  stroke: var(--nv-acc-hi);
  stroke-width: .7;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation:
    nvPreDraw .4s cubic-bezier(.55, .08, .3, 1) calc(.03s + var(--i) * .045s) forwards,
    nvPreFill .26s ease calc(.3s + var(--i) * .035s) forwards;
}
.nv-pre__line {
  display: block;
  width: min(34vw, 150px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nv-acc) 30%, var(--nv-acc-hi) 50%, var(--nv-acc) 70%, transparent);
  transform: scaleX(0);
  opacity: .8;
  animation: nvPreLine .5s cubic-bezier(.22, 1, .36, 1) .12s forwards;
}
html.nv-pre-out .nv-pre { animation: nvPreOut .3s cubic-bezier(.4, 0, .2, 1) forwards; pointer-events: none; }
html.nv-pre-out .nv-pre__in { animation: nvPreLift .3s cubic-bezier(.4, 0, .2, 1) forwards; }
html.nv-pre-fast .nv-pre,
html.nv-pre-fast .nv-pre__in { animation-duration: .18s; }

@keyframes nvPreDraw { to { stroke-dashoffset: 0; } }
@keyframes nvPreFill { to { fill-opacity: 1; stroke-opacity: .35; } }
@keyframes nvPreLine { to { transform: scaleX(1); } }
@keyframes nvPreOut { to { opacity: 0; visibility: hidden; } }
@keyframes nvPreLift { to { transform: translateY(-6px) scale(1.03); } }
@keyframes nvPreSafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

@media (prefers-reduced-motion: reduce) {
  html .nv-pre { display: none !important; }
}

/* ---------- 2. TEXT RÂND CU RÂND ---------- */
.nv-sr {
  -webkit-user-select: none;
  user-select: none;
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nv-split .nv-w {
  display: inline-block;
  transition:
    opacity .75s ease,
    transform .95s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--nv-l, 0) * 110ms + var(--nv-d, 0ms));
}
/* fără să taie diacriticele (ș, ț, Î) și coada lui „g” */
.nv-split .nv-lines { display: inline; }
/* 2D (fără translate3d și fără blur): cuvintele ascunse nu devin sute de straturi compuse */
html.nv-lines-on .nv-split:not(.nv-in) .nv-w {
  opacity: 0;
  transform: translateY(.5em);
}
html.nv-lines-on .nv-lines-host .section-label {
  transition: opacity .6s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
}
html.nv-lines-on .nv-lines-host:not(.nv-in) .section-label {
  opacity: 0;
  transform: translateY(10px);
}
.nv-now .nv-w,
.nv-now .section-label { transition: none !important; }
/* gradientul de pe cuvintele colorate rămâne continuu */
.nv-split .gradient-text .nv-w,
.nv-split .trust-accent .nv-w,
.nv-split .legal-grad .nv-w {
  /* italicul iese din cutia cuvântului: o margine invizibilă ca să nu fie tăiat */
  padding: 0 .12em .06em;
  margin: 0 -.12em -.06em;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}
@media (prefers-reduced-motion: reduce) {
  html.nv-lines-on .nv-split .nv-w,
  html.nv-lines-on .nv-lines-host .section-label { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}
@media print {
  .nv-split .nv-w, .nv-lines-host .section-label { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ---------- 3. TONUL SECȚIUNILOR (static) ---------- */
/* secțiunile „închise” devin transparente; tonul lor e pictat o dată pe secțiune (js/nova-motion.js pune
   data-nv-tone), cu margini moi spre tonul de bază. Fără schimbarea fundalului lui body la derulare. */
html.nv-bgflow [data-nv-tone] {
  --nv-ft: 160px;
  --nv-fb: 160px;
  background-image: linear-gradient(180deg, transparent 0, var(--nv-tbg) var(--nv-ft), var(--nv-tbg) calc(100% - var(--nv-fb)), transparent 100%);
}
html.nv-bgflow [data-nv-tone="1"] { --nv-tbg: var(--nv-tone-1); }
html.nv-bgflow [data-nv-tone="2"] { --nv-tbg: var(--nv-tone-2); }
html.nv-bgflow [data-nv-join-top] { --nv-ft: 0px; }
html.nv-bgflow [data-nv-join-bottom] { --nv-fb: 0px; }
html.nv-bgflow .section-dark,
html.nv-bgflow .cta-section,
html.nv-bgflow .trust-section,
html.nv-bgflow .footer {
  background-color: transparent;
}
html.nv-bgflow .footer {
  background-image:
    radial-gradient(60% 140px at 50% 0, rgba(var(--nv-acc-rgb), .10), transparent 70%),
    radial-gradient(40% 120px at 78% 0, rgba(var(--nv-acc2-rgb), .06), transparent 70%);
}

/* ---------- 4. ICONIȚE ANIMATE LA HOVER (doar lângă texte; meniul rămâne cu cuvinte) ---------- */
.nv-spark {
  flex: none;
  width: 15px;
  height: 15px;
  margin-left: .55em;
  vertical-align: -2px;
  fill: currentColor;
  opacity: .9;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}
.nv-has-spark { gap: 0; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* steluța Nova: se rotește un sfert și pâlpâie */
  .nv-has-spark:hover .nv-spark,
  .nv-has-spark:focus-visible .nv-spark { transform: rotate(90deg) scale(1.18); opacity: 1; }

  /* săgețile de după text alunecă înainte */
  .svc-cta svg, .about-card-link svg, .trust-link svg, .trust-safety-link svg:last-child,
  .footer-share__icon svg, .legal-back svg {
    transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  }
  .svc-cta:hover svg, .about-card-link:hover svg, .trust-link:hover svg, .trust-safety-link:hover svg:last-child {
    transform: translateX(4px);
  }

  /* iconițele din fața textului, în butoane: fiecare cu gestul ei */
  .btn-primary > svg:first-child,
  .btn-secondary > svg:first-child,
  .nw-glow-btn > svg,
  .svc-icon svg {
    transform-origin: 50% 50%;
  }
  :is(.btn-primary, .btn-secondary, .nw-glow-btn):hover > svg:first-child { animation: nvIcoBob .7s cubic-bezier(.22, 1, .36, 1); }
  /* avionul de hârtie: zboară și revine */
  :is(.btn-primary, .btn-secondary, .nw-glow-btn):hover > svg:first-child:has(path[d^="M22 2"]) { animation: nvIcoFly .75s cubic-bezier(.5, 0, .3, 1); }
  /* cheia: o mică răsucire */
  :is(.btn-primary, .btn-secondary, .nw-glow-btn):hover > svg:first-child:has(path[d^="M14.7 6.3"]),
  .svc-card:hover .svc-icon svg:has(path[d^="M14.7 6.3"]) { animation: nvIcoTurn .8s cubic-bezier(.22, 1, .36, 1); }
  /* fereastra de site: se ridică ușor */
  .svc-card:hover .svc-icon svg:has(rect) { animation: nvIcoBob .8s cubic-bezier(.22, 1, .36, 1); }
  .svc-icon { transition: box-shadow .4s ease, transform .5s cubic-bezier(.22, 1, .36, 1); }
  .svc-card:hover .svc-icon { box-shadow: 0 0 0 6px rgba(var(--nv-acc-rgb), .08), 0 10px 28px -10px rgba(var(--nv-acc-rgb), .55); }
}
@keyframes nvIcoBob { 0%, 100% { transform: none; } 40% { transform: translateY(-3px) rotate(-8deg) scale(1.08); } 70% { transform: translateY(0) rotate(3deg); } }
@keyframes nvIcoFly {
  0% { transform: none; opacity: 1; }
  42% { transform: translate(9px, -9px) scale(.85); opacity: 0; }
  43% { transform: translate(-8px, 8px) scale(.85); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
@keyframes nvIcoTurn { 0%, 100% { transform: none; } 35% { transform: rotate(-22deg); } 65% { transform: rotate(10deg); } }

/* ---------- 5. SUBSOL PREMIUM ---------- */
.footer .footer-links-group .footer-heading,
.footer .footer-links-group h4 {
  font-family: var(--font-body, 'Figtree', system-ui, sans-serif);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--nv-tx2);
}
.footer .footer-links-group .footer-heading::before,
.footer .footer-links-group h4::before {
  background: var(--nv-acc);
  box-shadow: none;
  width: 12px;
  height: 1.5px;
}
.footer::before {
  background: linear-gradient(90deg, transparent, rgba(var(--nv-acc-rgb), .55) 25%, rgba(var(--nv-acc-hi-rgb), .7) 50%, rgba(var(--nv-acc-rgb), .55) 75%, transparent);
  box-shadow: 0 0 14px rgba(var(--nv-acc-rgb), .3);
}
.footer .footer-cta {
  border-color: rgba(var(--nv-tx-rgb), .07);
  background:
    radial-gradient(80% 140% at 0 0, rgba(var(--nv-acc-rgb), .12), transparent 60%),
    radial-gradient(70% 140% at 100% 100%, rgba(var(--nv-acc2-rgb), .06), transparent 60%),
    rgba(var(--nv-card-rgb), .6);
}
.footer .footer-cta__title { font-weight: 560; letter-spacing: -.012em; }
.footer .footer-bottom { border-top-color: rgba(var(--nv-tx-rgb), .08); }

/* „NOVA” mare, la baza subsolului: gradient discret, tăiat jos, aerisit */
.footer-mark {
  position: relative;
  display: flex;
  justify-content: center;
  margin: clamp(28px, 4vw, 48px) 0 calc(-1 * clamp(20px, 3vw, 32px));
  overflow: hidden;
  line-height: .78;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.footer-mark span {
  display: inline-block;
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-optical-sizing: auto;
  font-size: clamp(5.5rem, 25vw, 19rem);
  font-weight: 560;
  letter-spacing: -.035em;
  padding: 0 .015em .02em;
  background: linear-gradient(180deg,
    rgba(var(--nv-tx-rgb), .3) 0%,
    rgba(var(--nv-acc-rgb), .22) 40%,
    rgba(var(--nv-acc-rgb), .05) 76%,
    rgba(var(--nv-acc-rgb), 0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* o lumină fină sub litere */
.footer-mark::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 30%;
  width: min(70%, 900px);
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(var(--nv-acc-rgb), .1), transparent 70%);
  z-index: -1;
}
@media (prefers-reduced-motion: no-preference) {
  .footer-mark.is-armed span {
    opacity: 0;
    transform: translate3d(0, 28%, 0);
    transition: opacity 1s ease, transform 1.3s cubic-bezier(.22, 1, .36, 1);
  }
  .footer-mark.is-armed span:nth-child(2) { transition-delay: .08s; }
  .footer-mark.is-armed span:nth-child(3) { transition-delay: .16s; }
  .footer-mark.is-armed span:nth-child(4) { transition-delay: .24s; }
  .footer-mark.is-armed.is-in span { opacity: 1; transform: none; }
}
html[data-sezon="halloween"] .footer-mark span {
  background-image: linear-gradient(180deg,
    rgba(var(--nv-moon-rgb, var(--nv-tx-rgb)), .3) 0%,
    rgba(var(--nv-acc-rgb), .22) 42%,
    rgba(var(--nv-acc-rgb), .05) 78%,
    rgba(var(--nv-acc-rgb), 0) 100%);
}
@media (max-width: 768px) {
  .footer-mark { margin-top: 32px; margin-bottom: -14px; }
}

/* ---------- 6. BUTOANELE DIN SUBSOL ȘI DIN BARA DE JOS: textul în fontul de bază ---------- */
.nw-glow-btn,
.mobile-bottom-bar .bottom-glow,
.footer-share {
  font-family: var(--font-body, 'Figtree', system-ui, sans-serif);
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: none;
}

/* ---------- 7. listele derulante comune (js/nova-select.js) pe paginile publice: culorile temei, nu violetul panoului ---------- */
html[data-tema="nova"] {
  --pe-acc: var(--nv-acc-rgb);
  --pe-acc-2: var(--nv-acc-hi-rgb);
  --pe-sec: var(--nv-acc-hi-rgb);
}
html[data-tema="nova"] .nvs-btn.oc-select:focus,
html[data-tema="nova"] .nvs-btn.oc-select.is-open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4BAB6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-tema="nova"] .nvs-opt[aria-selected="true"] .nvs-tick {
  background: var(--nv-acc-hi);
  -webkit-mask: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E");
  mask: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E");
}
