/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:         #c8a96e;
  --gold-dk:      #a8893e;
  --dark:         #080808;
  --dark2:        #0f0f0f;
  --card:         #161616;
  --white:        #f5f1eb;
  --gray:         #7a766e;
  --light:        #eeebe4;
  --border-dk:    rgba(245, 241, 235, 0.1);
  --border-lt:    rgba(8, 8, 8, 0.1);
  --ff-head:      'Playfair Display', Georgia, serif;
  --ff-body:      'DM Sans', system-ui, sans-serif;
  --radius:       2px;
  --ease:         cubic-bezier(.4,0,.2,1);
  --ease-out:     cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out:  cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer:  cubic-bezier(0.32, 0.72, 0, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--dark);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  padding: 16px 40px;
  font-family: var(--ff-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: 0;
  transition: background .2s var(--ease-out), transform .15s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--gold {
  background: var(--gold);
  color: var(--dark);
}
@media (hover: hover) and (pointer: fine) {
  .btn--gold:hover { background: var(--gold-dk); }
}

/* ─── NAVIGATION ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  transition: background .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.nav.scrolled {
  background: rgba(8, 8, 8, .97);
  box-shadow: 0 1px 0 var(--border-dk);
}
.nav__logo {
  display: flex;
  align-items: center;
}
.nav__logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav__links a {
  color: rgba(245, 241, 235, 0.6);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color .2s var(--ease-out);
}
.nav__cta {
  background: var(--gold);
  color: var(--dark) !important;
  padding: 10px 22px;
  transition: background .2s var(--ease-out), transform .15s var(--ease-out) !important;
}
.nav__cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--white); }
  .nav__cta:hover { background: var(--gold-dk) !important; }
}
.nav__toggle { display: none; }

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 8s var(--ease-out);
}
.hero.loaded .hero__bg { transform: scale(1); }
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(8,8,8,.88) 0%, rgba(8,8,8,.5) 55%, rgba(8,8,8,.15) 100%),
    linear-gradient(to top,    rgba(8,8,8,.7)  0%, transparent 55%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(32px, 6vw, 96px) clamp(80px, 12vh, 140px);
  max-width: 960px;
  width: 100%;
}
.hero__logo {
  display: block;
  width: clamp(260px, 38vw, 420px);
  height: auto;
  margin-bottom: 40px;
  opacity: 0;
  animation: heroFadeUp 0.7s var(--ease-out) 0s forwards;
}

.hero__eyebrow {
  display: block;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(8px);
}
.hero__title {
  font-family: var(--ff-head);
  font-size: clamp(3.5rem, 8.5vw, 8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.0;
  margin-bottom: 32px;
  clip-path: inset(0 100% 0 0);
}
.hero__title span { display: block; }
.hero__title em {
  display: block;
  font-style: italic;
  color: var(--gold);
}
.hero__tagline {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: rgba(245, 241, 235, 0.58);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 52px;
  opacity: 0;
  transform: translateY(8px);
}
.hero__content .btn {
  opacity: 0;
  transform: translateY(8px);
}

/* Hero entrance — .loaded added by JS */
.hero.loaded .hero__eyebrow  { animation: heroFadeUp 0.55s var(--ease-out) 0.1s  forwards; }
.hero.loaded .hero__title    { animation: heroClip   1s    var(--ease-out) 0.3s  forwards; }
.hero.loaded .hero__tagline  { animation: heroFadeUp 0.55s var(--ease-out) 0.85s forwards; }
.hero.loaded .btn            { animation: heroFadeUp 0.55s var(--ease-out) 1.05s forwards; }

@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroClip {
  to { clip-path: inset(0 0% 0 0); }
}

/* ─── SECTIONS ─── */
.section { padding: 120px 0; }

.section__label {
  display: block;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section__title {
  font-family: var(--ff-head);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

/* ─── SERVICII ─── */
.servicii.section {
  background: var(--dark2);
}

.servicii__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border-dk);
  gap: 32px;
}

.servicii__item {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0 32px;
  padding: 52px 0;
  border-bottom: 1px solid var(--border-dk);
}

@media (hover: hover) and (pointer: fine) {
  .servicii__item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--gold);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform .35s var(--ease-out);
  }
  .servicii__item:hover::before { transform: scaleY(1); }
}

.servicii__num {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  padding-top: 8px;
  font-variant-numeric: tabular-nums;
}

.servicii__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 64px;
  align-items: start;
}

.servicii__name {
  font-family: var(--ff-head);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.25;
  text-wrap: balance;
  transition: color .2s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .servicii__item:hover .servicii__name { color: var(--gold); }
}

.servicii__desc {
  font-size: 0.88rem;
  color: rgba(245, 241, 235, 0.55);
  line-height: 1.85;
  padding-top: 6px;
}

/* stagger for reveal */
.servicii__list .servicii__item:nth-child(2) { transition-delay: 80ms; }
.servicii__list .servicii__item:nth-child(3) { transition-delay: 160ms; }
.servicii__list .servicii__item:nth-child(4) { transition-delay: 240ms; }

/* ─── MARQUEE ─── */
.marquee {
  overflow: hidden;
  background: var(--dark2);
  padding: 20px 0;
  border-top: 1px solid var(--border-dk);
  border-bottom: 1px solid var(--border-dk);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}
.marquee__track span {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245, 241, 235, 0.38);
  white-space: nowrap;
}
.marquee__dot {
  color: var(--gold) !important;
  font-size: 0.85rem !important;
  letter-spacing: 0 !important;
  opacity: 0.55 !important;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ─── LUCRARI (GALLERY) ─── */
.lucrari.section {
  background: var(--dark);
}

.lucrari__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 32px;
}

.lucrari__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 9px 22px;
  background: transparent;
  border: 1px solid rgba(245, 241, 235, 0.18);
  color: rgba(245, 241, 235, 0.45);
  font-family: var(--ff-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out),
              color .2s var(--ease-out), transform .15s var(--ease-out);
}
.filter-btn:active { transform: scale(0.97); }
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark);
}
@media (hover: hover) and (pointer: fine) {
  .filter-btn:not(.active):hover {
    border-color: rgba(245, 241, 235, 0.45);
    color: var(--white);
  }
}

.lucrari__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.lucrari__item {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: pointer;
  display: block;
  background: var(--card);
}

/* gold bottom accent bar — slides in on hover */
.lucrari__item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-out);
  z-index: 3;
}
@media (hover: hover) and (pointer: fine) {
  .lucrari__item:hover::after { transform: scaleX(1); }
}

.lucrari__item img {
  transition: transform .65s var(--ease-out);
}

/* permanent bottom gradient — label always readable */
.lucrari__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,8,8,.82) 0%,
    rgba(8,8,8,.28) 40%,
    transparent 70%
  );
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  opacity: 1;
  transition: background .4s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .lucrari__item:hover img { transform: scale(1.08); }
  .lucrari__item:hover .lucrari__overlay {
    background: linear-gradient(
      to top,
      rgba(8,8,8,.92) 0%,
      rgba(8,8,8,.4) 50%,
      rgba(8,8,8,.1) 100%
    );
  }
}

.lucrari__overlay span {
  color: rgba(245, 241, 235, 0.55);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color .3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .lucrari__item:hover .lucrari__overlay span { color: var(--white); }
}

.lucrari__item.hidden { display: none; }

/* ─── Category headers ─── */
.lucrari__cat-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 48px 0 12px;
}
.lucrari__cat-header:first-child { padding-top: 0; }

.lucrari__cat-header span {
  font-family: var(--ff-head);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lucrari__cat-header::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.lucrari__cat-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-dk);
}
.lucrari__cat-header.hidden { display: none; }

/* ─── DESPRE (ABOUT) ─── */
.despre.section {
  background: var(--card);
}

.despre__inner {
  display: grid;
  grid-template-columns: 52% 48%;
  gap: 0 80px;
  align-items: start;
}

.despre__quote {
  border-top: 2px solid var(--gold);
  padding-top: 40px;
}

.despre__quote blockquote p {
  font-family: var(--ff-head);
  font-style: italic;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 32px;
}

.despre__quote cite {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
}

.despre__content {
  border-top: 1px solid var(--border-dk);
  padding-top: 40px;
}

.despre__content p {
  color: rgba(245, 241, 235, 0.65);
  line-height: 1.85;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.despre__meta {
  font-size: 0.73rem !important;
  color: rgba(245, 241, 235, 0.3) !important;
  letter-spacing: 0.06em;
  margin-top: 8px !important;
  margin-bottom: 44px !important;
}

.despre__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-dk);
  padding-top: 32px;
}

.stat { padding-right: 24px; }
.stat + .stat {
  border-left: 1px solid var(--border-dk);
  padding-left: 24px;
  padding-right: 0;
}

.stat__nr {
  display: block;
  font-family: var(--ff-head);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 241, 235, 0.38);
  line-height: 1.45;
}

/* ─── CONTACT ─── */
.contact.section {
  background: var(--dark2);
}

.contact__head { margin-bottom: 64px; }

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 80px;
  align-items: start;
}

.contact__form { display: flex; flex-direction: column; gap: 28px; }

.form__label {
  display: block;
  color: rgba(245, 241, 235, 0.4);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 241, 235, 0.18);
  color: var(--white);
  font-family: var(--ff-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color .25s var(--ease-out);
  border-radius: 0;
  -webkit-appearance: none;
}
.form__group input::placeholder,
.form__group textarea::placeholder { color: rgba(245, 241, 235, 0.22); }
.form__group input:focus,
.form__group textarea:focus { border-color: var(--gold); }
.form__group textarea { resize: none; }

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-top: 4px;
  border-top: 1px solid var(--border-dk);
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  color: rgba(245, 241, 235, 0.65);
  font-size: 0.93rem;
  line-height: 1.65;
}
.contact__item svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }

/* ─── FOOTER ─── */
.footer {
  background: var(--dark);
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-dk);
}
.footer .container { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.footer__logo {
  font-family: var(--ff-head);
  font-size: 1.2rem;
  color: rgba(245, 241, 235, 0.28);
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}
.footer p { font-size: 0.73rem; color: rgba(245, 241, 235, 0.22); }

/* ─── REVEAL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { transition: none; }
  .marquee__track { animation-play-state: paused; }
  .hero__eyebrow, .hero__tagline, .hero__content .btn {
    opacity: 1; transform: none; animation: none;
  }
  .hero__title { clip-path: none; animation: none; }
  .btn, .filter-btn, .lucrari__item img, .lucrari__overlay,
  .nav__links a, .nav__cta, .servicii__item::before {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ─── TABLET (≤ 900px) ─── */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .section { padding: 80px 0; }

  .nav { padding: 18px 24px; }

  /* Mobile nav — transform instead of right (GPU-composited) */
  .nav__links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 260px;
    background: var(--dark2);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: 48px 40px;
    transform: translateX(100%);
    transition: transform .35s var(--ease-drawer);
    z-index: 99;
    box-shadow: -8px 0 40px rgba(0,0,0,.6);
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a    { font-size: 1.1rem; letter-spacing: 0.06em; }
  .nav__cta        { width: fit-content; }

  .nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
  .nav__toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--white);
    transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
  }
  .nav__toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

  .servicii__head { flex-direction: column; align-items: flex-start; }
  .servicii__item { grid-template-columns: 56px 1fr; gap: 0 20px; padding: 40px 0; }
  .servicii__body { grid-template-columns: 1fr; gap: 10px; }

  .lucrari__header { flex-direction: column; align-items: flex-start; }
  .lucrari__grid   { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .despre__inner { grid-template-columns: 1fr; gap: 52px; }

  .contact__inner { grid-template-columns: 1fr; gap: 56px; }
}

/* ─── MOBILE (≤ 540px) ─── */
@media (max-width: 540px) {
  .container { padding: 0 20px; }
  .section   { padding: 64px 0; }

  .hero { align-items: flex-end; }
  .hero__content { padding: 0 20px clamp(60px, 10vh, 100px); }
  .hero__title   { font-size: clamp(3rem, 14vw, 4.5rem); }
  .hero__tagline { font-size: 0.88rem; margin-bottom: 40px; }

  .servicii__item { grid-template-columns: 1fr; padding: 32px 0; }
  .servicii__num  { margin-bottom: 8px; }

  .lucrari__grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }

  .despre__quote blockquote p { font-size: clamp(1.5rem, 7vw, 2rem); }
  .stat__nr { font-size: 1.75rem; }

  .filter-btn { padding: 8px 16px; font-size: 0.7rem; }

  .contact__info { gap: 28px; }
  .footer__logo  { font-size: 1rem; }
}

/* iOS Safari hero height fix */
@supports (height: 100dvh) {
  .hero { min-height: 100dvh; }
}

/* ─── CATALOG 3D ─── */
.catalog3d-outer {
  margin-top: 48px;
}
#catalog3d-wrap {
  width: 100%;
  border-radius: 4px;
  overflow: visible;
  background: radial-gradient(ellipse at center, #111108 0%, #080808 70%);
  border: 1px solid rgba(201, 168, 76, 0.15);
}
#catalog3d {
  display: block;
  width: 100%;
  height: 660px;
}
.catalog3d-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}
@media (max-width: 768px) {
  #catalog3d { height: 420px; }
}
