/* ═══════════════════════════════════════════════════════════
   J HERITAGE — landing campanie șantier
   Culori: valori REALE măsurate din Style Guide (HEX-urile tipărite în PDF sunt greșite)
   ═══════════════════════════════════════════════════════════ */

/* ── FONTURI BRAND ──
   TT Fors (Regular 400 / Bold 700) se activează când primim fișierele licențiate:
   pune-le în /public/fonts și decomentează blocurile de mai jos, apoi schimbă --ff-body.

@font-face { font-family: "TT Fors"; src: url("../fonts/TTFors-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TT Fors"; src: url("../fonts/TTFors-Bold.woff2")    format("woff2"); font-weight: 700; font-display: swap; }
*/

:root {
  /* paletă principală (măsurată) */
  --charcoal: #2d3439;
  --ink: #1d1d1b;
  --turquoise: #00a4a9;
  --teal: #006679;
  --teal-deep: #004754;
  --cream: #fffaf3;
  --beige: #e5d9cb;
  --beige-soft: #f3ece2;
  --white: #ffffff;

  --grad-btn: linear-gradient(90deg, #00a4a9 0%, #00677a 100%);
  --grad-dark: linear-gradient(135deg, #2d3439 0%, #006578 100%);
  --grad-teal: linear-gradient(160deg, #004754 0%, #006679 55%, #00808f 100%);
  --grad-hero: linear-gradient(155deg, #23292d 0%, #2d3439 42%, #004754 100%);

  --text: var(--charcoal);
  --text-muted: #5f6a70;
  --line: rgba(45, 52, 57, .12);
  --line-light: rgba(255, 255, 255, .22);

  /* TT Fors → înlocuit temporar cu Plus Jakarta Sans (aceeași construcție geometrică) */
  --ff-body: "TT Fors", "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --ff-caps: "Manjari", "Plus Jakarta Sans", system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 18px 50px -20px rgba(0, 71, 84, .35);
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 64px;
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16px; line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -.015em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.ico { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ── tipografie ── */
.eyebrow {
  font-family: var(--ff-caps);
  font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; line-height: 1;
  color: var(--teal);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; opacity: .7; flex: none; }
.eyebrow--light { color: var(--beige); }
.h2 { font-size: clamp(1.9rem, 5.2vw, 3rem); max-width: 18ch; margin-bottom: 18px; }
.lead { font-size: clamp(1rem, 1.1vw + .6rem, 1.15rem); color: var(--text-muted); max-width: 58ch; }
.section { padding: clamp(64px, 10vw, 120px) 0; }

/* ── butoane ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; line-height: 1; letter-spacing: .01em;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--grad-btn); color: #fff; box-shadow: 0 10px 24px -10px rgba(0, 164, 169, .7); }
.btn--primary:hover { box-shadow: 0 14px 30px -10px rgba(0, 164, 169, .8); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-light); color: #fff; background: rgba(255, 255, 255, .06); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--outline { border-color: var(--teal); color: var(--teal); background: transparent; }
.btn--outline:hover { background: var(--teal); color: #fff; }
.btn--lg { padding: 17px 30px; font-size: 1rem; }
.btn--sm { padding: 11px 18px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }

/* ═══════ PRELOADER (mecanism Seven, identitate J Heritage) ═══════ */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--charcoal);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  transition: transform .85s var(--ease);
  animation: loader-auto .01s linear 3.6s forwards; /* plasă de siguranță dacă JS nu rulează */
}
.loader__mark { width: 84px; color: #fff; opacity: 0; animation: loader-pop .7s var(--ease) .1s forwards; }
.loader__mark img { width: 100%; height: auto; }
.loader__line { width: 160px; height: 1px; background: var(--line-light); position: relative; overflow: hidden; }
.loader__line::after { content: ""; position: absolute; inset: 0; background: var(--turquoise); transform: scaleX(0); transform-origin: left; animation: loader-line 1.5s var(--ease) .3s forwards; }
.loader__tag {
  font-family: var(--ff-caps); font-size: .68rem; letter-spacing: .4em; text-transform: uppercase;
  color: rgba(255, 255, 255, .75); opacity: 0; animation: loader-fade .7s ease .55s forwards;
  padding-left: .4em; /* compensează letter-spacing-ul final */
}
.loader.is-done { transform: translateY(-101%); }
@keyframes loader-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes loader-fade { to { opacity: 1; } }
@keyframes loader-line { to { transform: scaleX(1); } }
@keyframes loader-auto { to { opacity: 0; visibility: hidden; } }

/* ═══════ HEADER ═══════ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 250, 243, .94);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px -20px rgba(0, 71, 84, .35); }
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; }
.header__brand img { height: 34px; width: auto; }
.header__right { display: flex; align-items: center; gap: 14px; }
.header__cta { display: none; }

.lang { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.lang__btn {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 999px;
  font-family: var(--ff-caps); font-size: .72rem; letter-spacing: .12em; line-height: 1; padding-top: 8px;
  color: var(--text-muted); cursor: pointer; transition: background .2s, color .2s;
}
.lang__btn.is-active { background: var(--charcoal); color: #fff; }
.lang__btn:focus-visible { outline: 2px solid var(--turquoise); }

/* ═══════ HERO ═══════ */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(94svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--grad-hero);
  color: #fff;
  padding: 96px var(--gutter) clamp(128px, 17vh, 150px);
}
.hero__pattern { position: absolute; inset: 0; pointer-events: none; }
.hero__pattern svg { position: absolute; right: -8%; top: 0; height: 100%; width: auto; min-width: 64%; opacity: .22; }
.jline { stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-ready .jline { animation: draw 1.6s var(--ease) forwards; }
.is-ready .jline:nth-child(2) { animation-delay: .15s; }
.is-ready .jline:nth-child(3) { animation-delay: .3s; }
.jdot { opacity: 0; transform-origin: center; transform-box: fill-box; }
.is-ready .jdot { animation: dot-in .6s var(--ease) 1.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }

.hero__inner { position: relative; z-index: 1; max-width: 640px; }
.hero__eyebrow { margin-bottom: 22px; font-size: .68rem; letter-spacing: .22em; line-height: 1.5; }
.hero__title { font-size: clamp(2.75rem, 11vw, 5.4rem); line-height: .98; letter-spacing: -.03em; margin-bottom: 22px; font-weight: 700; }
.hero__title em { font-style: normal; color: var(--beige); }
.hero__sub { font-size: clamp(1rem, 2.6vw, 1.15rem); color: rgba(255, 255, 255, .78); max-width: 46ch; margin-bottom: 32px; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; }
.hero__actions .btn { width: 100%; }

/* intrare hero după loader */
.hero__eyebrow, .hero__title, .hero__sub, .hero__actions { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.is-ready .hero__eyebrow { opacity: 1; transform: none; transition-delay: .1s; }
.is-ready .hero__title { opacity: 1; transform: none; transition-delay: .2s; }
.is-ready .hero__sub { opacity: 1; transform: none; transition-delay: .32s; }
.is-ready .hero__actions { opacity: 1; transform: none; transition-delay: .44s; }

.hero__scroll {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--ff-caps); font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .55);
}
.hero__scroll i { width: 1px; height: 44px; margin-left: .3em; background: rgba(255, 255, 255, .22); position: relative; overflow: hidden; display: block; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--beige); transform: translateY(-100%); animation: scroll-hint 2s var(--ease) 1.8s infinite; }
@keyframes scroll-hint { 0% { transform: translateY(-100%); } 60% { transform: translateY(250%); } 100% { transform: translateY(250%); } }

/* ═══════ LOCALIZARE ═══════ */
.location__grid { display: grid; gap: 34px; }
.location__map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--beige-soft); border: 1px solid var(--line); color: var(--teal); display: grid; place-items: center; }
.location__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.location__mapLabel { position: relative; background: #fff; padding: 12px 18px; border-radius: 999px; font-size: .85rem; color: var(--text-muted); box-shadow: var(--shadow); margin-top: 90px; }

/* ═══════ CONTACT ═══════ */
.contact { background: var(--beige-soft); color: var(--text); position: relative; overflow: hidden; }

.contact__grid { display: grid; gap: 36px; position: relative; }

.contact__phone { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 1.35rem; font-weight: 700; color: var(--teal); letter-spacing: .01em; }
.contact__phone .ico { color: var(--turquoise); }

.card { background: #fff; color: var(--text); border-radius: 24px; padding: clamp(22px, 5vw, 36px); box-shadow: 0 30px 70px -34px rgba(0, 71, 84, .45); border: 1px solid rgba(45, 52, 57, .06); }
.form { display: grid; gap: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .9rem; }
.field label small { font-weight: 400; color: var(--text-muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--cream); border: 1.5px solid var(--beige); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 4px rgba(0, 164, 169, .18); }
.field.has-error input, .field.has-error textarea { border-color: #c8322b; }
.field__err { font-size: .8rem; color: #c8322b; min-height: 0; }
.field__err:empty { display: none; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { padding-right: 42px; cursor: pointer; }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .85rem; line-height: 1.5; color: var(--text-muted); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--beige); background: #fff; margin-top: 1px; position: relative; transition: background .2s, border-color .2s; }
.check__box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(45deg) scale(0); transition: transform .2s var(--ease); }
.check input:checked + .check__box { background: var(--turquoise); border-color: var(--turquoise); }
.check input:checked + .check__box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px rgba(0, 164, 169, .25); }
.field--check.has-error .check__box { border-color: #c8322b; }
.check__text a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }

.form__error { background: #fdecea; color: #8f231d; border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9rem; }
.success { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 14px 0; }
.success__icon { width: 64px; color: var(--turquoise); }
.success h3 { font-size: 1.6rem; }
.success p { color: var(--text-muted); max-width: 36ch; }
.success .btn { margin-top: 8px; }

/* ═══════ FOOTER ═══════ */
.footer { background: var(--ink); color: rgba(255, 255, 255, .78); padding: 56px 0 28px; font-size: .92rem; }
.footer__grid { display: grid; gap: 34px; }
.footer__logo { height: 44px; width: auto; }
.footer__tag { font-family: var(--ff-caps); font-size: .68rem; letter-spacing: .34em; text-transform: uppercase; margin-top: 14px; color: rgba(255, 255, 255, .5); }
.footer__col { display: grid; gap: 8px; align-content: start; }
.footer__col h4 { font-family: var(--ff-caps); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--turquoise); margin-bottom: 6px; }
.footer__col a:hover { color: #fff; }
.footer__details summary { cursor: pointer; list-style: none; }
.footer__details summary::-webkit-details-marker { display: none; }
.footer__details p { margin-top: 10px; font-size: .82rem; color: rgba(255, 255, 255, .55); max-width: 48ch; }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; color: rgba(255, 255, 255, .45); }

/* ═══════ BARĂ STICKY MOBIL ═══════ */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 250, 243, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .4s var(--ease);
}
.mobile-bar.is-visible { transform: none; }
.mobile-bar .btn { width: 100%; padding: 14px 16px; }

/* ═══════ REVEAL ═══════ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__eyebrow, .hero__title, .hero__sub, .hero__actions { opacity: 1; transform: none; transition: none; }
  .jline { stroke-dashoffset: 0; } .jdot { opacity: 1; }
  .hero__scroll i::after { animation: none; }
}

/* ═══════ TABLETĂ ═══════ */
@media (min-width: 640px) {
  .hero__actions { flex-direction: row; }
  .hero__actions .btn { width: auto; }
}

/* ═══════ DESKTOP ═══════ */
@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .header__brand img { height: 40px; }
  .header__cta { display: inline-flex; }
  .hero { justify-content: center; padding-top: 80px; min-height: min(100svh - var(--header-h), 820px); }
  .hero__pattern svg { right: 4%; min-width: 46%; opacity: .38; }
  .hero__inner { max-width: 720px; margin-left: max(0px, calc((100% - var(--container)) / 2)); }
  .location__grid { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 64px; }
  .contact__grid { grid-template-columns: 1fr 1.05fr; gap: 72px; align-items: center; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
  .mobile-bar { display: none; }
}
