:root {
  --fundal: #07080c;
  --fundal-2: #0e1018;
  --linie: #20232f;
  --text: #ecebf2;
  --text-2: #9a99a8;
  --accent: #6aa9f2;
  --accent-rgb: 106, 169, 242;
  --accent-deschis: #8cc6f5;
  --accent-deschis-rgb: 140, 198, 245;
  --accent-mediu: #4a83cf;
  --accent-mediu-rgb: 74, 131, 207;
  --accent-inchis: #2c5596;
  --accent-inchis-rgb: 44, 85, 150;
  --accent-2: #2c5596;
  --violet: #7b6cf0;
  --violet-rgb: 123, 108, 240;
  --cian: #3fc1c9;
  --fundal-rgb: 7, 8, 12;
  --font-marca: var(--font-marca);
  --scara-titlu: 1;
  --scara-text: 1;
  --raza: 18px;
  --latime: 1180px;
  --font-titlu: 'Space Grotesk', system-ui, sans-serif;
  --font-text: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--fundal);
  color: var(--text);
  font-family: var(--font-text);
  font-size: calc(16px * var(--scara-text));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-titlu); line-height: 1.08; letter-spacing: -0.02em; }
.accent { color: var(--accent); }

/* Bara de sus */
.bara {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 14px clamp(16px, 4vw, 48px) 12px;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.bara.derulat { background: rgba(var(--fundal-rgb), .82); backdrop-filter: blur(14px); border-color: var(--linie); }
.bara-rand { display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-semn { width: 46px; height: auto; overflow: visible; filter: drop-shadow(0 4px 14px rgba(var(--accent-mediu-rgb), .35)); }
.logo-traseu { stroke-dasharray: 1; stroke-dashoffset: 1; animation: deseneaza 1.4s cubic-bezier(.65, 0, .35, 1) .2s forwards; }
.logo-picior, .logo-varf { opacity: 0; animation: apareLogo .5s ease forwards; transform-box: fill-box; }
.logo-picior { animation-delay: 1.05s; }
.logo-varf { transform-origin: 30% 70%; animation: apareVarf .55s cubic-bezier(.2, 1.6, .4, 1) 1.45s forwards; }
@keyframes deseneaza { to { stroke-dashoffset: 0; } }
@keyframes apareLogo { to { opacity: 1; } }
@keyframes apareVarf { from { opacity: 0; transform: translate(-30%, 30%) scale(.4); } to { opacity: 1; transform: none; } }
.logo-text { font: 800 18px/1 var(--font-marca); letter-spacing: .06em; display: flex; flex-direction: column; gap: 5px; }
.logo-text small { font: 500 8.6px/1 var(--font-marca); letter-spacing: .3em; color: var(--text-2); }
.meniu { display: flex; align-items: center; gap: 32px; font-size: 15px; margin-left: auto; }

/* Selectorul de limbi */
.limbi { position: relative; z-index: 2; margin-left: 20px; }
.limbi-buton {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px 0 11px;
  border: 1px solid var(--linie); border-radius: 999px; background: rgba(14, 16, 24, .6);
  color: var(--text); font: 600 13px var(--font-text); letter-spacing: .04em; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.limbi-buton:hover, .limbi.deschis .limbi-buton { border-color: #3a4256; background: rgba(20, 24, 36, .9); }
.limbi-buton svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.limbi-buton svg:first-child { color: var(--accent); }
.limbi-buton .limbi-sageata { width: 14px; height: 14px; color: var(--text-2); transition: transform .25s; }
.limbi.deschis .limbi-sageata { transform: rotate(180deg); }
.limbi-lista {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px;
  list-style: none; padding: 6px; border-radius: 16px;
  background: rgba(14, 16, 24, .97); backdrop-filter: blur(16px);
  border: 1px solid var(--linie); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right;
  pointer-events: none; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.limbi.deschis .limbi-lista { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s, transform .2s; }
.limbi-lista a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-size: 14.5px; outline: none; transition: background .15s, color .15s;
}
.limbi-lista a:hover, .limbi-lista a:focus-visible { background: rgba(var(--accent-rgb), .08); color: var(--text); }
.limbi-lista a[aria-current] { color: var(--text); }
.limbi-lista a[aria-current]::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.limbi-cod { width: 26px; font: 700 11px var(--font-titlu); letter-spacing: .08em; color: var(--accent); opacity: .85; }
.meniu a:not(.buton) { color: var(--text-2); transition: color .2s; }
.meniu a:not(.buton):hover { color: var(--text); }
.hamburger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.hamburger span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--text); transition: transform .3s, top .3s; }
.hamburger span:first-child { top: 15px; }
.hamburger span:last-child { top: 23px; }
.hamburger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* Butoane */
.buton {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 28px; border-radius: 999px;
  background: var(--accent); color: var(--fundal);
  font-weight: 600; font-size: 15px;
  transition: transform .2s, box-shadow .2s;
}
.buton:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(var(--accent-rgb), .5); }
.buton-mic { padding: 10px 20px; font-size: 14px; }
.buton-contur { background: transparent; color: var(--text); border: 1px solid var(--linie); }
.buton-contur:hover { border-color: var(--text-2); box-shadow: none; }

/* Erou */
.erou {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 190px clamp(16px, 4vw, 48px) 80px;
  overflow: hidden;
}
#grila { position: absolute; inset: 0; width: 100%; height: 100%; }
.erou::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 75% 30%, rgba(var(--accent-inchis-rgb), .35), transparent 70%),
    radial-gradient(40% 40% at 20% 80%, rgba(var(--accent-rgb), .10), transparent 70%),
    linear-gradient(to bottom, transparent 70%, var(--fundal));
}
.erou-continut { position: relative; z-index: 2; max-width: var(--latime); width: 100%; margin: 0 auto; }
.eticheta { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-2); margin-bottom: 22px; }
.erou h1 { font-size: calc(clamp(40px, 7.6vw, 104px) * var(--scara-titlu)); font-weight: 700; max-width: 18ch; text-wrap: balance; }
.erou-sub { margin-top: 28px; max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); }
.erou-butoane { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.sageata {
  position: absolute; z-index: 2; left: 50%; bottom: 32px; width: 26px; height: 42px;
  border: 1.5px solid var(--text-2); border-radius: 14px; transform: translateX(-50%);
}
.sageata::after {
  content: ''; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%); animation: coboara 1.8s infinite;
}
@keyframes coboara { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* Secțiuni */
.sectiune { max-width: var(--latime); margin: 0 auto; padding: clamp(80px, 12vw, 140px) clamp(16px, 4vw, 48px) 0; }
.antet-sectiune { margin-bottom: 56px; }
.antet-sectiune h2 { font-size: calc(clamp(32px, 5vw, 60px) * var(--scara-titlu)); max-width: 18ch; }

.grila-carduri { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card {
  position: relative; padding: 34px 28px; border-radius: var(--raza);
  background: var(--fundal-2); border: 1px solid var(--linie);
  transition: border-color .3s, transform .3s;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--accent-rgb), .10), transparent 60%);
}
.card:hover { border-color: #3a3a48; transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), .1); color: var(--accent); font-size: 20px; margin-bottom: 26px;
}
.card h3 { font-size: 22px; margin-bottom: 12px; }
.card p { color: var(--text-2); font-size: 15px; }

.pasi { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--linie); }
.pasi li { padding: 32px 28px 8px 0; border-right: 1px solid var(--linie); padding-left: 28px; }
.pasi li:first-child { padding-left: 0; }
.pasi li:last-child { border-right: 0; }
.pasi span { font: 700 14px var(--font-titlu); color: var(--accent); }
.pasi h3 { font-size: 24px; margin: 14px 0 10px; }
.pasi p { color: var(--text-2); font-size: 15px; }

.grila-proiecte { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.proiect { border-radius: var(--raza); overflow: hidden; background: var(--fundal-2); border: 1px solid var(--linie); }
.proiect-imagine { aspect-ratio: 4 / 3; transition: transform .5s; }
.proiect:hover .proiect-imagine { transform: scale(1.04); }
.p1 { background: linear-gradient(135deg, #0f1a2e, var(--accent-mediu) 140%); }
.p2 { background: linear-gradient(135deg, #0b1f24, var(--cian) 160%); }
.p3 { background: linear-gradient(135deg, #171233, var(--violet) 150%); }
.proiect-text { padding: 22px 24px 26px; position: relative; background: var(--fundal-2); }
.proiect-text h3 { font-size: 20px; margin-bottom: 6px; }
.proiect-text p { color: var(--text-2); font-size: 14px; }

.contact { padding-bottom: clamp(80px, 12vw, 140px); }
.contact h2 { max-width: 20ch; }
.contact-sub { margin-top: 22px; color: var(--text-2); }

.subsol {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px clamp(16px, 4vw, 48px); border-top: 1px solid var(--linie);
  color: var(--text-2); font-size: 14px;
}
.subsol a { transition: color .2s; }
.subsol a:hover { color: var(--text); }
.colaborare a { color: var(--accent); }

/* Apariție la derulare */
.apare { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.apare.vizibil { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .hamburger { display: block; z-index: 2; flex: none; }
  .bara-rand { gap: 8px; }
  .limbi { margin-left: auto; }
  .limbi-buton .limbi-sageata { display: none; }
  .logo-text small { display: none; }
  .meniu {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: rgba(var(--fundal-rgb), .97); font-size: 22px;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .meniu.deschis { opacity: 1; pointer-events: auto; }
  .pasi li, .pasi li:first-child { padding: 28px 0 8px; border-right: 0; border-bottom: 1px solid var(--linie); }
  .pasi li:last-child { border-bottom: 0; }
}

/* Telefoane foarte înguste (sub 375px): bara trebuie să încapă cu tot cu butonul de meniu */
@media (max-width: 374px) {
  .logo { gap: 8px; }
  .logo-semn { width: 36px; }
  .logo-text { font-size: 15px; }
  .limbi-buton svg:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .apare { opacity: 1; transform: none; transition: none; }
  .sageata::after { animation: none; }
  .logo-traseu { animation: none; stroke-dashoffset: 0; }
  .logo-picior, .logo-varf { animation: none; opacity: 1; }
}

/* Straturile de efecte (completate în css/efecte.css) */
#fundal, #scantei { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#fundal { z-index: -1; }
#scantei { z-index: 90; }

