/* ============ AFD Mob Design ============ */
:root {
  --bg: #f8f4ee;
  --bg-tint: #efe8de;
  --card: #fffdfa;
  --ink: #2a2422;
  --ink-soft: #645a55;
  --brand: #4a403e;
  --accent: #b08a52;        /* decorativ: linii, cifre mari */
  --accent-text: #7f6034;   /* text mic pe fundal deschis (contrast 4.5:1+) */
  --accent-on-dark: #d4ae78;
  --line: #ddd3c5;
  --dark: #26211f;
  --serif: "Marcellus", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.25; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--accent-text); }

.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.eyebrow {
  font-size: .78rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 500; margin-bottom: 1.1rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff; padding: .8em 1.2em; z-index: 200; }
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

/* ---------- Butoane și linkuri ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8em 1.9em;
  background: var(--brand); color: #fff; text-decoration: none;
  font-size: .84rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  border: 1px solid var(--brand);
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--accent-text); border-color: var(--accent-text); transform: translateY(-2px); }
.btn--small { min-height: 44px; padding: .6em 1.3em; font-size: .78rem; }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.link-arrow {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; white-space: nowrap;
  font-size: .84rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  background: linear-gradient(var(--accent), var(--accent)) left calc(100% - 9px) / 100% 1px no-repeat;
  transition: color .25s;
}
.link-arrow::after { content: "→"; margin-left: .6em; transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--accent-text); }
.link-arrow:hover::after { transform: translateX(5px); }

/* ---------- Bară progres + header ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--accent); transform: scaleX(var(--scroll, 0)); transform-origin: left;
}
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 244, 238, .9); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .25s;
}
.header.is-scrolled { border-color: var(--line); }
.header__in { display: flex; align-items: center; justify-content: space-between; height: var(--header); }
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.logo img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav a:not(.btn) {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  transition: color .25s;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav a:not(.btn):hover { color: var(--accent-text); }
.nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; background: none; border: 0; width: 48px; height: 48px; padding: 0; }
.burger span { display: block; width: 26px; height: 1.5px; background: var(--ink); margin: 7px auto; transition: transform .25s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 7vw, 6rem); }
.hero__title { font-size: clamp(2.5rem, 8.4vw, 7.6rem); line-height: 1.02; letter-spacing: -.015em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__title .line > span { display: block; }
.hero__row {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem 4rem; flex-wrap: wrap;
  margin-top: clamp(1.8rem, 4vw, 3.2rem); padding-top: clamp(1.4rem, 3vw, 2.2rem); border-top: 1px solid var(--line);
}
.hero__row .lead { margin: 0; }
.hero__cta { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }

/* Imaginea care se extinde la scroll */
.expand { height: 190vh; margin-top: clamp(2rem, 5vw, 4rem); }
.expand__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.expand__frame {
  position: absolute; inset: 0; margin: 0;
  clip-path: inset(calc((1 - var(--e, 0)) * 14vh) calc((1 - var(--e, 0)) * 20vw));
}
.expand__frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 52%;
  transform: scale(calc(1.18 - var(--e, 0) * .18));
}
.expand__frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 55%, rgba(24, 20, 19, .62)); opacity: var(--cap, 0);
}
.expand__cap {
  position: absolute; left: max(20px, calc((100vw - 1240px) / 2)); bottom: clamp(1.6rem, 5vh, 3.4rem); z-index: 1;
  color: #fff; font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.2;
  opacity: var(--cap, 0); transform: translateY(calc((1 - var(--cap, 0)) * 24px));
}
.expand__cap span {
  display: block; font-family: var(--sans); font-size: .76rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent-on-dark); margin-bottom: .6rem; font-weight: 500;
}

/* ---------- Bandă cu text mare ---------- */
.ticker { overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) 0 0; }
.ticker__row {
  white-space: nowrap; font-family: var(--serif); font-size: clamp(2.6rem, 8vw, 7rem); line-height: 1.1;
  color: transparent; -webkit-text-stroke: 1px var(--line);
  transform: translateX(calc(var(--t, 0) * -1px)); will-change: transform;
}
.ticker__row i { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; padding: 0 .25em; }

/* ---------- Secțiuni ---------- */
.section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--dark); color: #efe8de; }
.section--dark .eyebrow { color: var(--accent-on-dark); }
.head { margin-bottom: clamp(2.2rem, 5vw, 4rem); }
.head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; flex-wrap: wrap; }
.mini-cta {
  display: flex; align-items: center; gap: .6rem 1.6rem; flex-wrap: wrap;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding-top: 1.6rem; border-top: 1px solid var(--line); color: var(--ink-soft);
}
.mini-cta .link-arrow { color: var(--ink); }

/* ---------- Servicii: listă + imagine fixă ---------- */
.svc { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.svc__list { list-style: none; margin: 0; padding: 0; }
.svc__item {
  display: grid; grid-template-columns: 3.2rem 1fr; gap: 0 1rem; align-items: baseline;
  padding: clamp(2.2rem, 7vh, 4.6rem) 0; border-top: 1px solid var(--line);
  opacity: .34; transition: opacity .5s var(--ease);
}
.svc__item:last-child { border-bottom: 1px solid var(--line); }
.svc__item.is-active { opacity: 1; }
.svc__nr { font-family: var(--serif); font-size: 1rem; letter-spacing: .08em; color: var(--accent-text); }
.svc__item h3 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); margin-bottom: .9rem; }
.js .svc__item h3.reveal { transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s), translate .5s var(--ease); }
.svc__item.is-active h3 { translate: 10px 0; }
.svc__item p { color: var(--ink-soft); max-width: 30em; margin: 0; }
.svc__inline { display: none; }
.svc__stage { position: sticky; top: calc(var(--header) + 28px); }
.svc__frame { position: relative; aspect-ratio: 3 / 4; max-height: calc(100vh - var(--header) - 56px); margin-left: auto; overflow: hidden; background: var(--bg-tint); }
.svc__frame > * {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08); transition: opacity .7s var(--ease), transform 1.2s var(--ease);
}
.svc__frame > .is-active { opacity: 1; transform: none; }
.svc__panel {
  display: flex; flex-direction: column; justify-content: center; gap: .15em; padding: 12%;
  background: var(--dark); color: #efe8de; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.25;
}
.svc__panel span:nth-child(even) { color: var(--accent-on-dark); }

/* ---------- Portofoliu ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter {
  font: inherit; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 400;
  min-height: 44px; padding: 0 1.2em; background: transparent; border: 1px solid var(--line); color: var(--ink);
  transition: background .2s, color .2s, border-color .2s;
}
.filter:hover { border-color: var(--brand); }
.filter.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 14px; }
.card { position: relative; padding: 0; border: 0; background: #d9d0c3; cursor: zoom-in; overflow: hidden; display: block; width: 100%; aspect-ratio: 3 / 4; }
.card--mare { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover img { transform: scale(1.05); }
.card__cap {
  position: absolute; inset: auto 0 0 0; padding: 3rem 1.1rem 1rem; text-align: left;
  color: #fff; font-family: var(--sans); font-size: .92rem; font-weight: 400; line-height: 1.35;
  background: linear-gradient(transparent, rgba(24, 20, 19, .8));
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s var(--ease);
}
.card:hover .card__cap, .card:focus-visible .card__cap { opacity: 1; transform: none; }
.grid__more { margin: 2.4rem 0 0; color: var(--ink-soft); }
.grid__more a { color: var(--ink); font-weight: 400; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.grid__more a:hover { color: var(--accent-text); }

/* ---------- Pași ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
.steps li { position: relative; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.steps li::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--brand);
  transform-origin: left;
}
.steps span { font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: var(--accent); display: block; margin-bottom: 1.2rem; }
.steps h3 { font-size: 1.3rem; margin-bottom: .6rem; }
.steps p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ---------- Despre ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about h2 { margin-bottom: 1.6rem; }
.about p:not(.eyebrow) { color: #cfc5b8; }
.about__media { overflow: hidden; }
.about__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Contact ---------- */
.contact__in { text-align: center; }
.contact__title { font-size: clamp(2.4rem, 7.4vw, 6.4rem); line-height: 1.04; letter-spacing: -.01em; margin-bottom: 1.6rem; }
.contact .lead { margin-inline: auto; }
.contact__btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.2rem 0; font-size: .9rem; color: var(--ink-soft); }
.footer__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer__in p { margin: 0; }
.footer__logo { height: 40px; width: auto; }
.footer__social { display: flex; gap: 1.5rem; }
.footer__social a { display: inline-flex; align-items: center; min-height: 44px; transition: color .25s; }
.footer__social a:hover { color: var(--accent-text); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(24, 20, 19, .95);
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 20px;
  animation: fade .3s ease both;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(92vw, 900px); text-align: center; }
.lightbox img { max-height: 82vh; width: auto; max-width: 100%; margin-inline: auto; animation: pop .45s var(--ease) both; }
.lightbox figcaption { color: #e9e1d6; margin-top: .9rem; font-size: .95rem; }
.lightbox button {
  background: none; border: 0; color: #fff; width: 52px; height: 52px; flex: none;
  display: grid; place-items: center; transition: color .2s, transform .2s var(--ease);
}
.lightbox__close { position: absolute; top: 12px; right: 14px; }
.lightbox button:hover { color: var(--accent-on-dark); transform: scale(1.1); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

/* ============ Animații ============ */
.js .reveal {
  opacity: 0; transform: translateY(44px);
  transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-clip img {
  clip-path: inset(0 100% 0 0); transform: scale(1.12);
  transition: clip-path 1.4s var(--ease) var(--d, 0s), transform 1.8s var(--ease) var(--d, 0s);
}
.js .reveal-clip.is-in img { clip-path: inset(0); transform: none; }
/* pozele din portofoliu se „așază" când apar */
.js .card.reveal img { transform: scale(1.18); transition: transform 1.6s var(--ease) var(--d, 0s); }
.js .card.reveal.is-in img { transform: none; }
.js .card.reveal.is-in:hover img { transform: scale(1.05); transition-duration: .9s; transition-delay: 0s; }
/* răspuns la atingere */
.btn:active, .filter:active { transform: scale(.97); }
.card:active img { transform: scale(1.03); }
.js .steps li::before { transform: scaleX(0); transition: transform 1.2s var(--ease) var(--d, 0s); }
.js .steps li.is-in::before { transform: scaleX(1); }

@keyframes sus { from { opacity: 0; transform: translateY(30px); } }
@keyframes jos { from { opacity: 0; transform: translateY(-20px); } }
@keyframes linie { from { transform: translateY(110%); } }
.js .header__in { animation: jos .9s var(--ease) both; }
.js .hero__eyebrow { animation: sus .9s var(--ease) .1s both; }
.js .hero__title .line > span { animation: linie 1.15s var(--ease) both; }
.js .hero__title .line:nth-child(1) > span { animation-delay: .15s; }
.js .hero__title .line:nth-child(2) > span { animation-delay: .28s; }
.js .hero__title .line:nth-child(3) > span { animation-delay: .41s; }
.js .hero__row { animation: sus 1s var(--ease) .7s both; }
.js .expand__frame { animation: sus 1.2s var(--ease) .85s both; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: absolute; top: var(--header); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 20px 1.5rem; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1.2rem; }
  .about { grid-template-columns: 1fr; }

  .expand { height: 170vh; height: 170svh; }
  .expand__frame { clip-path: inset(calc((1 - var(--e, 0)) * 17vh) calc((1 - var(--e, 0)) * 15vw)); }
  .expand__frame img { transform: scale(calc(1.3 - var(--e, 0) * .3)); }

  .svc { grid-template-columns: 1fr; }
  .svc__stage { display: none; }
  .svc__item, .svc__item.is-active { opacity: 1; padding: 2.4rem 0; grid-template-columns: 2.6rem 1fr; }
  .svc__item.is-active h3 { translate: none; }
  .svc__inline { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
  .svc__pic { overflow: hidden; margin-top: 1.4rem; }
  .svc__pic img { translate: 0 calc(var(--py, 0) * 1px); scale: 1.16; }
  .svc__nr { font-size: 1.5rem; color: var(--accent); }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card__cap { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .hero__cta { gap: 1.2rem; }
  .lightbox { padding: 12px 12px 76px; }
  .lightbox__nav { position: absolute; bottom: 12px; }
  .lightbox__nav--prev { left: 24%; }
  .lightbox__nav--next { right: 24%; }
  .lightbox img { max-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .js .reveal, .js .reveal-clip img { opacity: 1; transform: none; clip-path: none; }
  .js .steps li::before { transform: none; }
  .expand { height: auto; }
  .expand__sticky { position: static; height: 80vh; }
  .expand__frame { clip-path: none; }
  .expand__frame img { transform: none; }
  .expand__frame::after, .expand__cap { opacity: 1; transform: none; }
  .svc__pic img { translate: none; scale: none; }
  .js .card.reveal img { transform: none; }
  .ticker__row { transform: none; }
}
