/* ==========================================================================
   Strat de mișcare: animații de intrare, scroll reveal, micro-interacțiuni.
   Totul se dezactivează la prefers-reduced-motion. Fără JS, conținutul rămâne vizibil.
   ========================================================================== */

/* ---------- Hero: fundal viu ---------- */
.hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-orbs span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.hero-orbs span:nth-child(1) { width: 520px; height: 520px; background: #2a5fae; top: -180px; right: -120px; animation: orb1 18s ease-in-out infinite alternate; }
.hero-orbs span:nth-child(2) { width: 380px; height: 380px; background: #b8873a; bottom: -220px; left: 8%; opacity: .28; animation: orb2 22s ease-in-out infinite alternate; }
.hero-orbs span:nth-child(3) { width: 300px; height: 300px; background: #3d7bd6; top: 30%; left: 45%; opacity: .25; animation: orb3 26s ease-in-out infinite alternate; }
@keyframes orb1 { to { transform: translate(-120px, 90px) scale(1.15); } }
@keyframes orb2 { to { transform: translate(160px, -70px) scale(1.2); } }
@keyframes orb3 { to { transform: translate(-90px, -60px) scale(.85); } }
.hero::after { animation: gridDrift 40s linear infinite; }
@keyframes gridDrift { to { background-position: 48px 48px, 48px 48px; } }

/* titlul: auriul „respiră” */
.hero h1 em { background: linear-gradient(90deg, #e7c27d 0%, #fff1cf 25%, #e7c27d 50%, #c99a4c 75%, #e7c27d 100%); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: goldShine 6s linear infinite; }
@keyframes goldShine { to { background-position: 200% center; } }

/* intrare în cascadă */
.js .hero-in > * { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.js .hero-in > *:nth-child(1) { animation-delay: .05s; }
.js .hero-in > *:nth-child(2) { animation-delay: .15s; }
.js .hero-in > *:nth-child(3) { animation-delay: .28s; }
.js .hero-in > *:nth-child(4) { animation-delay: .4s; }
.js .hero-in > *:nth-child(5) { animation-delay: .5s; }
.js .hero-in > *:nth-child(6) { animation-delay: .6s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* cardul din hero: plutește, apare întrebare cu întrebare */
.hero-visual { position: relative; perspective: 1200px; }
.js .hero-visual { opacity: 0; animation: rise 1s .35s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero-card { animation: float 7s ease-in-out infinite; transform-style: preserve-3d; transition: transform .25s ease-out; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.js .hero-card .q { opacity: 0; transform: translateX(-10px); animation: slideIn .5s ease-out forwards; }
.js .hero-card .q:nth-of-type(1) { animation-delay: 1s; }
.js .hero-card .q:nth-of-type(2) { animation-delay: 1.35s; }
.js .hero-card .q:nth-of-type(3) { animation-delay: 1.7s; }
@keyframes slideIn { to { opacity: 1; transform: none; } }
.hero-card .badge-dot::before { animation: pulseDot 1.8s ease-out infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(23, 115, 79, .5); } 100% { box-shadow: 0 0 0 7px rgba(23, 115, 79, 0); } }

/* etichete care plutesc în jurul cardului */
.hero-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .96); color: var(--ink); font-size: .84rem; font-weight: 650; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .45); white-space: nowrap; }
.hero-chip .icon { width: 17px; height: 17px; }
.hero-chip.c1 { top: -22px; left: -34px; color: var(--green); animation: float 6s ease-in-out infinite, chipIn .6s 1.9s both; }
.hero-chip.c2 { bottom: -20px; right: -26px; color: #8a6224; animation: float 8s 1s ease-in-out infinite, chipIn .6s 2.2s both; }
.hero-chip.c3 { top: 44%; right: -44px; color: var(--brand); animation: float 9s .5s ease-in-out infinite, chipIn .6s 2.5s both; }
@keyframes chipIn { from { opacity: 0; transform: scale(.85) translateY(8px); } to { opacity: 1; transform: none; } }

/* căutarea: halou la focus */
.hero-search { transition: box-shadow .25s, transform .25s; }
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(231, 194, 125, .35), var(--shadow-lg); transform: translateY(-1px); }
.hero-tags a { transition: background .2s, border-color .2s, transform .2s, color .2s; }
.hero-tags a:hover { transform: translateY(-2px); border-color: #e7c27d; color: #fff; }

/* ---------- Antet: se „strânge” la scroll ---------- */
.header { transition: box-shadow .25s, background .25s; }
.header .container { transition: height .25s; }
.header.scrolled { box-shadow: 0 8px 24px -14px rgba(14, 27, 46, .35); background: rgba(255, 255, 255, .97); }
.header.scrolled .container { height: 60px; }
.nav a { position: relative; }
.nav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Micro-interacțiuni ---------- */
.btn { position: relative; overflow: hidden; transition: background .2s, border-color .2s, box-shadow .2s, transform .12s; }
.btn:active { transform: scale(.97); }
.btn-primary::after, .btn-gold::after { content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s ease; pointer-events: none; }
.btn-primary:hover::after, .btn-gold:hover::after { left: 130%; }
.btn-primary:hover, .btn-gold:hover { box-shadow: 0 10px 22px -10px rgba(20, 57, 107, .6); }
.btn .icon { transition: transform .2s; }
.btn:hover .icon-arrow, .btn:hover svg:last-child:not(:first-child) { transform: translateX(3px); }

.case-card, .news-card, .feature, .step, .plan { transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .3s; }
.case-card { position: relative; overflow: hidden; }
.case-card::before, .news-card::before { content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--gold), #e7c27d, var(--brand)); transform: scaleX(0); transform-origin: left; transition: transform .45s ease; }
.news-card { position: relative; overflow: hidden; }
.case-card:hover, .news-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px -18px rgba(14, 27, 46, .35); }
.case-card:hover::before, .news-card:hover::before { transform: scaleX(1); }

.step:hover, .feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-2); }
.step::before { transition: transform .35s cubic-bezier(.2, .7, .2, 1); transform-origin: left bottom; }
.step:hover::before { transform: scale(1.12); }
.steps { position: relative; }

.plan:hover { transform: translateY(-6px); box-shadow: 0 22px 48px -20px rgba(14, 27, 46, .4); }
.plan.featured { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box,
  linear-gradient(120deg, var(--brand), #e7c27d, var(--brand)) border-box; background-size: 100% 100%, 250% 250%; animation: borderFlow 6s ease infinite; }
@keyframes borderFlow { 0%, 100% { background-position: 0 0, 0% 50%; } 50% { background-position: 0 0, 100% 50%; } }
.plan .ribbon { animation: ribbonBob 3s ease-in-out infinite; }
@keyframes ribbonBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.trust span .icon { color: var(--gold); transition: transform .3s; }
.trust span:hover .icon { transform: rotate(-8deg) scale(1.15); }

.avatar { transition: transform .25s; }
.consultant-card:hover .avatar, .news-author:hover .avatar { transform: scale(1.08) rotate(-3deg); }

/* ---------- Bara de progres la citire (pagini de speță / noutate) ---------- */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), #e7c27d); pointer-events: none; }

/* ---------- Mobil ---------- */
@media (max-width: 920px) {
  .hero-chip.c3 { display: none; }
  .hero-chip.c1 { left: 6px; }
  .hero-chip.c2 { right: 6px; }
}


/* ---------- Ilustrații ---------- */
.ill-g { stroke: #e7c27d; }
.page-art .ill-g { stroke: var(--gold); }
.has-cover { padding: 0 !important; overflow: hidden; }
.has-cover > :not(.card-cover) { margin-left: 22px; margin-right: 22px; }
.has-cover > .card-cover + * { margin-top: 18px; }
.has-cover > :last-child { margin-bottom: 20px; }
.card-cover { position: relative; height: 128px; overflow: hidden; background: #14396b; }
.cover-svg { display: block; width: 100%; height: 100%; }
.cover-svg .art { transition: transform .6s cubic-bezier(.2,.7,.2,1); transform-box: fill-box; transform-origin: center; }
.has-cover:hover .cover-svg .art { transform: scale(1.08) rotate(-3deg); }
.cover-svg .fl1 { animation: float 6s ease-in-out infinite; }
.cover-svg .fl2 { animation: float 8s 1s ease-in-out infinite; }
.cover-svg .fl3 { animation: float 7s .5s ease-in-out infinite; }
.cover-tag { position: absolute; left: 14px; top: 12px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #e7c27d; background: rgba(14,27,46,.55); padding: 4px 9px; border-radius: 999px; }
.news-card.has-cover h3 { font-family: var(--serif); }
.page-head.has-art { position: relative; overflow: hidden; }
.page-head.has-art .container { position: relative; }
.page-art { position: absolute; right: 0; top: 50%; width: 210px; height: 210px; transform: translateY(-50%) rotate(-6deg); color: var(--brand); opacity: .09; pointer-events: none; }
.step-art { width: 120px; height: 88px; display: block; margin: -4px 0 6px -6px; }
.step::before { position: absolute; right: 18px; top: 18px; margin: 0; font-size: 1.6rem; opacity: .9; }
.step:hover .step-art { animation: wiggle .6s ease; }
@keyframes wiggle { 30% { transform: rotate(-3deg) translateY(-2px); } 60% { transform: rotate(2deg); } }
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why-art .scene-svg { width: 100%; height: auto; display: block; }
.scene-svg .fl1 { animation: float 6s ease-in-out infinite; }
.scene-svg .fl2 { animation: float 8s 1s ease-in-out infinite; }
.scene-svg .fl3 { animation: float 7s .5s ease-in-out infinite; }
.why-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.why-list li { display: flex; gap: 14px; align-items: flex-start; }
.why-list strong { display: block; color: var(--ink); }
.why-list span:not(.why-ic) { color: var(--muted); font-size: .94rem; }
.why-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold); }
@media (max-width: 920px) { .why { grid-template-columns: 1fr; gap: 28px; } .why-art { max-width: 460px; margin: 0 auto; } .page-art { width: 140px; height: 140px; opacity: .06; } }


/* ---------- Cookie-uri ---------- */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 980px; margin: 0 auto; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 18px 50px -14px rgba(14,27,46,.4); padding: 18px 20px; display: flex; gap: 18px; align-items: center; animation: cookieUp .45s cubic-bezier(.2,.7,.2,1); }
.cookie-bar[hidden], .cookie-modal[hidden] { display: none; }
@keyframes cookieUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.cookie-text { flex: 1; min-width: 0; }
.cookie-text strong { color: var(--ink); }
.cookie-text p { margin: 4px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cookie-modal { position: fixed; inset: 0; z-index: 95; background: rgba(14,27,46,.5); display: grid; place-items: center; padding: 16px; }
.cookie-dialog { background: #fff; border-radius: 14px; max-width: 520px; width: 100%; padding: 24px; box-shadow: var(--shadow-lg); animation: cookieUp .3s ease; max-height: calc(100vh - 32px); overflow-y: auto; }
.cookie-dialog h3 { margin: 0 0 14px; }
.cookie-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); cursor: pointer; }
.cookie-opt input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.cookie-opt em { font-style: normal; font-size: .75rem; color: var(--green); background: var(--green-50); padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
@media (max-width: 720px) {
  .cookie-bar { flex-direction: column; align-items: stretch; left: 10px; right: 10px; bottom: 10px; padding: 16px; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1; }
}


/* ---------- Despre noi ---------- */
.about-hero { position: relative; overflow: hidden; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.founders { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.founder { padding: 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .3s, box-shadow .3s; }
.founder:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.founder .avatar { width: 128px; height: 128px; font-size: 2.2rem; margin-bottom: 6px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold-50), 0 10px 26px -10px rgba(14,27,46,.4); }
.founder h3 { margin: 0; font-size: 1.15rem; }
.founder .role { color: var(--gold); font-weight: 600; font-size: .9rem; }
.founder p { color: var(--muted); font-size: .93rem; margin: 4px 0 0; white-space: pre-line; }
.founder .ext { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.company-card dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: .94rem; }
.company-card dt { color: var(--muted); }
.company-card dd { margin: 0; color: var(--ink); font-weight: 600; word-break: break-word; }
.founder-admin { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); }
.founder-admin:first-child { border-top: 0; }
@media (max-width: 920px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Fără mișcare pentru cine preferă asta ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero-in > *, .js .hero-visual, .js .hero-card .q { opacity: 1 !important; transform: none !important; }
  .hero-chip { opacity: 1; }
}

/* ---------- Mobil: antet compact, meniu sub antet, fără scroll orizontal ---------- */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
.header { position: sticky; }
@media (max-width: 920px) {
  .nav { top: 100% !important; max-height: calc(100vh - 80px); overflow-y: auto; }
  .nav a::after { display: none; }
  .nav a { padding: 12px 10px; font-size: 1rem; }
}
@media (max-width: 640px) {
  .header .container { gap: 10px; height: 60px; }
  .logo { font-size: 1.08rem; gap: 8px; min-width: 0; overflow: hidden; }
  .logo > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .logo small { font-size: .56rem; letter-spacing: .08em; }
  .logo-mark { width: 30px; height: 30px; flex: none; }
  .header-actions { gap: 6px; flex: none; }
  .header-actions .btn-sm { padding: 7px 10px; font-size: .85rem; }
  .menu-toggle { padding: 7px; }
  .topbar { font-size: .76rem; }
}
@media (max-width: 380px) {
  .logo small { display: none; }
}
/* grila din hero nu are voie să depășească ecranul pe telefon */
.hero .container > * { min-width: 0; }
@media (max-width: 640px) {
  .hero .container { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .hero-stats strong { font-size: 1.6rem; }
  .hero-search .btn { padding: 10px 14px; }
  .hero-card { padding: 18px; }
}
.btn-login .icon { display: none; }
@media (max-width: 480px) {
  .btn-login .icon { display: inline-block; width: 18px; height: 18px; }
  .btn-login .login-txt { display: none; }
  .btn-login { padding: 7px 9px !important; border: 1px solid var(--border); }
  .logo { font-size: 1.04rem; }
  .logo > span:last-child { overflow: visible; }
}
