/* ============================================================
   LIZIBILITATE + ANTET/HERO ÎN STILUL LEVIATAN + COMUTATOR TEMĂ
   Se încarcă după home.css și structura.css.
   Culorile au fost alese pentru contrast ≥ 4.5:1 (WCAG AA) la text mic.
   ============================================================ */

:root{
  --grs-terra: #ad4f2d;     /* 5.3:1 pe alb (era #c96543, 3.7:1) */
  --grs-terra-2: #ad4f2d;
  --grs-mute: #5f6874;      /* 5.7:1 pe alb (era #7a828e, 3.9:1) */
  --grs-teal: #287571;      /* 5.4:1 cu text alb (era #3a9e9a, 3.2:1) */
  --grs-teal-hover: #1f5f5c;
  --grs-on-navy-accent: #e0876a;  /* etichete teracotă pe navy */
  --grs-on-navy-mute: #9aa3b0;    /* text secundar pe navy */
  --grs-util-h: 41px;             /* înălțimea barei de sus (o măsoară JS-ul) */
}

/* ---------- 1. Etichete mici: minim 12px, spațiere mai strânsă ----------
   Erau 9–11.5px, majuscule cu letter-spacing de până la .32em. */
.grs-sec-head__label, .grs-more, .grs-works__link, .grs-works__type, .grs-works__section,
.grs-cert__label, .grs-cert__ref, .grs-intro__fact-l,
.grs-svc__num,
.grs-proj__cat, .grs-proj__link, .grs-projd__back, .grs-projd__specs dt, .grs-proj-filter__btn,
.grs-footer__label, .grs-cop-head__label, .grs-cop-stat__lbl, .grs-cop-depts__num, .grs-cop-auth__label,
.grs-studio__item-index, .grs-studio__item-label, .grs-studio__ref-name, .grs-studio__social-label, .grs-studio__map,
.grs-car-none__label, .grs-car-none__cta, .grs-car-none__profiles-lbl,
.grs-prac__facts dt, .grs-prac__dl, .grs-prac__cta, .grs-cta__section, .grs-video__label, .grs-docs__dl,
.grs-ev__mon, .grs-ev__loc{
  font-size: .75rem !important;
  letter-spacing: .14em !important;
}
.grs-proj-filter__btn sup{ font-size: .75rem; }
.grescu-utility{ font-size: .8rem; }
.grs-footer__copy, .grs-footer__legal a{ font-size: .8rem; }

/* ---------- 2. Contrast ---------- */
.grs-vals__tab{ color: var(--grs-mute); }                         /* era #9aa2ae, 2.6:1 */
.grs-footer__label{ color: var(--grs-on-navy-accent); }
.grs-footer__tagline em{ color: var(--grs-on-navy-accent); }
.grs-footer__copy{ color: var(--grs-on-navy-mute); }
.grs-practica-tab:hover, .grs-practica-tab:focus-visible,
.grs-prac__cta:hover{ background: var(--grs-teal-hover); }
.grs-more--teal{ color: var(--grs-teal); }

/* ancorele (#echipa, #cariere, #proiecte…) nu mai ajung sub antetul lipicios */
[id]{ scroll-margin-top: 7rem; }

/* ---------- 3. Antet lipicios (toate paginile) ----------
   Bara de contact iese din ecran la scroll; meniul rămâne sus, mai compact. */
.wp-site-blocks > header.wp-block-template-part{
  position: sticky;
  /* --grs-ab = cât din bara de admin WordPress e vizibilă (o calculează JS-ul;
     pe telefon bara de admin dispare la scroll, deci și spațiul ei) */
  top: calc(var(--grs-ab, var(--wp-admin--admin-bar--height, 0px)) - var(--grs-util-h));
  z-index: 100;
}
.grescu-site-header{ transition: padding .35s var(--grs-ease), background-color .35s, box-shadow .35s; }
.grs-logo__img{ transition: height .35s var(--grs-ease); }
html.is-scrolled .grescu-site-header{
  padding-top: .55rem !important; padding-bottom: .55rem !important;
  box-shadow: 0 10px 30px -18px rgba(15,26,42,.35);
}
html.is-scrolled .grescu-site-header .grs-logo__img{ height: 56px; }
@media (max-width: 560px){ html.is-scrolled .grescu-site-header .grs-logo__img{ height: 42px !important; } }

/* Meniu fără numerele de deasupra și fără liniuțele dintre itemi */
@media (min-width: 1001px){
  .grescu-site-header .wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item::before,
  .grescu-site-header .wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item::after{ content: none; }
}

/* Antetul: alb curat (fondul ivory „bătea spre galben"), fără textura de planșă */
.grescu-site-header{ background: #fff; border-bottom-color: #ececec; }
.grescu-site-header::before{ display: none; }

/* Logo: fără chenarul care apărea la click; conturul rămâne doar pentru tastatură */
.grs-logo:focus, .grs-logo:active{ outline: none !important; box-shadow: none !important; }
.grs-logo:focus-visible{ outline: 2px solid var(--grs-terra) !important; outline-offset: 6px; }

/* La fel pe tot site-ul: fără chenarul TT5 (*:focus) după click cu mouse-ul
   (ex. telefonul de pe Contact); conturul rămâne doar pentru tastatură */
.wp-site-blocks *:focus:not(:focus-visible){ outline: none; }

/* Butonul rotund de temă din antet */
.grs-hdr-right{ gap: clamp(1rem, 2vw, 1.75rem); }
.grs-theme-btn{
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid #dcdcdc; background: #fff; color: var(--grs-cont);
  cursor: pointer; transition: border-color .25s, color .25s, background .25s;
}
.grs-theme-btn:hover{ border-color: var(--grs-terra); color: var(--grs-terra); }
.grs-theme-btn:focus{ outline: none; }
.grs-theme-btn:focus-visible{ outline: 2px solid var(--grs-terra); outline-offset: 3px; }
.grs-theme-btn__sun{ display: none; }
html[data-theme="dark"] .grs-theme-btn__moon{ display: none; }
html[data-theme="dark"] .grs-theme-btn__sun{ display: block; }
/* peste video (prima pagină, sus): buton transparent, alb */
html:not(.is-scrolled) body.home .grs-theme-btn{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); color: #fff; }
html:not(.is-scrolled) body.home .grs-theme-btn:hover{ background: rgba(255,255,255,.18); border-color: #fff; }

/* ---------- 4. Prima pagină: video pe tot ecranul, antetul peste el ---------- */
.grs-hero{ min-height: 100vh; min-height: 100svh; }
@media (max-width: 900px){ .grs-hero{ min-height: 100vh; min-height: 100svh; } }

body.home .wp-site-blocks > header.wp-block-template-part{
  position: fixed; left: 0; right: 0;
  top: var(--grs-ab, var(--wp-admin--admin-bar--height, 0px));
}
body.home .grescu-utility{ display: none; }
/* deasupra video-ului: transparent, text alb, logo deschis.
   Contrastul vine dintr-o umbră adâncă pe partea de sus a video-ului
   (video-ul are perete deschis la culoare exact în dreptul logo-ului). */
html:not(.is-scrolled) body.home .grescu-site-header{
  background: transparent;
  border-bottom-color: transparent;
}
.grs-hero__bg::after{
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: min(340px, 42vh);
  background: linear-gradient(180deg, rgba(8,12,20,.8) 0%, rgba(8,12,20,.5) 42%, rgba(8,12,20,0) 100%);
  pointer-events: none;
}
/* logo-ul de peste video: fără sloganul mic (ilizibil și identic cu titlul hero),
   aceeași scară a literelor ca logo-ul complet, cu o umbră fină */
html:not(.is-scrolled) body.home a.grs-logo:not(.grs-mnav-logo) .grs-logo__img--light.grs-logo__img--full{
  height: 66px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)) drop-shadow(0 2px 14px rgba(0,0,0,.4));
}
@media (max-width: 1100px){ html:not(.is-scrolled) body.home a.grs-logo:not(.grs-mnav-logo) .grs-logo__img--light.grs-logo__img--full{ height: 56px; } }
@media (max-width: 900px){  html:not(.is-scrolled) body.home a.grs-logo:not(.grs-mnav-logo) .grs-logo__img--light.grs-logo__img--full{ height: 46px; } }
/* în modul întunecat, varianta deschisă din antet n-are slogan (e mai scundă):
   înălțime proporțională (252/347), ca literele să rămână la aceeași mărime */
html[data-theme="dark"] .grescu-site-header .grs-logo .grs-logo__img--light.grs-logo__img--full{ height: 60px; }
html[data-theme="dark"].is-scrolled .grescu-site-header .grs-logo .grs-logo__img--light.grs-logo__img--full{ height: 41px; }
/* titlul hero: cele două rânduri aliniate unul sub altul */
.grs-hero__title-l2{ margin-left: 0 !important; }
html:not(.is-scrolled) body.home a.grs-logo:not(.grs-mnav-logo) .grs-logo__img--light.grs-logo__img--mark{ filter: drop-shadow(0 2px 10px rgba(0,0,0,.45)); }
html:not(.is-scrolled) body.home .grescu-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content{
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
html:not(.is-scrolled) body.home .grescu-site-header::before{ display: none; }
html:not(.is-scrolled) body.home .grescu-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content,
html:not(.is-scrolled) body.home .grescu-site-header .wp-block-navigation__responsive-container-open,
html:not(.is-scrolled) body.home .grescu-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-icon{
  color: #fff !important;
}
html:not(.is-scrolled) body.home .grescu-site-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after{ color: rgba(255,255,255,.7); }

/* Logo: varianta închisă implicit, varianta deschisă peste video / în dark mode */
.grs-logo .grs-logo__img--light{ display: none !important; }
html:not(.is-scrolled) body.home a.grs-logo:not(.grs-mnav-logo) .grs-logo__img:not(.grs-logo__img--light),
html[data-theme="dark"] .grs-logo .grs-logo__img:not(.grs-logo__img--light){ display: none !important; }
html:not(.is-scrolled) body.home a.grs-logo:not(.grs-mnav-logo) .grs-logo__img--light.grs-logo__img--full,
html[data-theme="dark"] .grs-logo .grs-logo__img--light.grs-logo__img--full{ display: block !important; }
/* pe telefon tot logo-ul complet (vezi style.css, „1. LOGO"), nu monograma */

/* Coloana „Urmărește-ne" din dreapta video-ului */
.grs-hero__social{
  position: absolute; z-index: 3; right: clamp(1rem, 2.5vw, 2.25rem); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  color: #fff;
}
.grs-hero__social a{ color: #fff; opacity: .85; transition: opacity .25s, color .25s; display: grid; place-items: center; width: 32px; height: 32px; }
.grs-hero__social a:hover{ opacity: 1; color: var(--grs-on-navy-accent); }
.grs-hero__social-line{ width: 1px; height: 36px; background: rgba(255,255,255,.5); }
.grs-hero__social-lbl{
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
@media (max-width: 900px){ .grs-hero__social{ display: none; } }

/* ============================================================
   MENIUL PE TELEFON / TABLETĂ (sub 1000px)
   Bara: logo · buton temă · hamburger, ambele butoane rotunde, la fel.
   Meniul deschis: un singur logo + X pe același rând, titluri mai mici,
   submeniuri care se deschid la atingerea săgeții.
   ============================================================ */
@media (max-width: 1000px){
  .grs-hdr-right{ gap: .6rem; }
  .grs-hdr-right .grs-theme-btn{ order: -1; }
  .grescu-site-header .wp-block-navigation__responsive-container-open{
    display: grid !important; place-items: center;
    width: 40px; height: 40px; padding: 0;
    border: 1px solid #dcdcdc; border-radius: 50%; background: #fff;
    color: var(--grs-cont);
  }
  .grescu-site-header .wp-block-navigation__responsive-container-open svg{ width: 20px; height: 20px; }
  html:not(.is-scrolled) body.home .grescu-site-header .wp-block-navigation__responsive-container-open{
    background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5);
  }
  html[data-theme="dark"] .grescu-site-header .wp-block-navigation__responsive-container-open{
    background: transparent; border-color: rgba(235,232,225,.2); color: #ebe8e1;
  }
}

/* --- meniul deschis --- */
.grescu-site-header .wp-block-navigation__responsive-container.is-menu-open{ background: var(--grs-page, #f8f7f4) !important; }
.grescu-site-header .is-menu-open .wp-block-navigation__responsive-container-content{ padding: 1.1rem 1.5rem 1.5rem !important; }

/* un singur logo: monograma GRS, aliniată cu butonul X */
.grescu-site-header .is-menu-open .grs-mnav-logo{ margin: 0 auto 1.75rem; }
.grescu-site-header .is-menu-open .grs-mnav-logo .grs-logo__img--full,
.grescu-site-header .is-menu-open .grs-mnav-logo .grs-logo__img--light{ display: none !important; }
.grescu-site-header .is-menu-open .grs-mnav-logo .grs-logo__img--mark:not(.grs-logo__img--light){ display: block !important; height: 44px; width: auto; }
html[data-theme="dark"] .grescu-site-header .is-menu-open .grs-mnav-logo .grs-logo__img--mark:not(.grs-logo__img--light){ display: none !important; }
html[data-theme="dark"] .grescu-site-header .is-menu-open .grs-mnav-logo .grs-logo__img--mark.grs-logo__img--light{ display: block !important; height: 44px; width: auto; }

/* X-ul: rotund, ca butoanele din bară, pe rândul logo-ului */
.grescu-site-header .is-menu-open .wp-block-navigation__responsive-container-close{
  top: 1.1rem !important; right: 1.5rem !important;
  width: 44px !important; height: 44px !important;
  border-radius: 50% !important; border: 1px solid #dcdcdc !important; background: #fff !important;
}
.grescu-site-header .is-menu-open .wp-block-navigation__responsive-container-close::before,
.grescu-site-header .is-menu-open .wp-block-navigation__responsive-container-close::after{ content: none !important; }
.grescu-site-header .is-menu-open .wp-block-navigation__responsive-container-close svg{ width: 20px !important; height: 20px !important; }
.grescu-site-header .is-menu-open .wp-block-navigation__responsive-container-close:hover{ background: var(--grs-terra) !important; border-color: var(--grs-terra) !important; color: #fff !important; }
html[data-theme="dark"] .grescu-site-header .is-menu-open .wp-block-navigation__responsive-container-close{ background: transparent !important; border-color: rgba(235,232,225,.2) !important; color: #ebe8e1 !important; }

/* titlurile principale: mai mici și mai aerisite */
.grescu-site-header .wp-block-navigation .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content{
  font-size: 1.45rem !important; padding: .85rem .1rem !important;
}
/* elementele cu submeniu: link + săgeată pe același rând */
.grescu-site-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.has-child{
  display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
}
.grs-mnav-tog{ display: none; }
.grescu-site-header .is-menu-open .grs-mnav-tog{
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--grs-line, #e7e3dc); border-radius: 50%; background: transparent;
  color: var(--grs-cont); cursor: pointer; transition: transform .3s var(--grs-ease), background .25s, color .25s;
}
.grescu-site-header .is-menu-open .grs-mnav-tog svg{ transition: transform .3s var(--grs-ease); }
.grescu-site-header .is-menu-open .has-child.grs-open > .grs-mnav-tog{ background: var(--grs-cont); color: #fff; border-color: var(--grs-cont); }
.grescu-site-header .is-menu-open .has-child.grs-open > .grs-mnav-tog svg{ transform: rotate(180deg); }
/* submeniurile: închise implicit, deschise la atingere */
.grescu-site-header .is-menu-open .has-child > .wp-block-navigation__submenu-container{
  grid-column: 1 / -1; display: none !important; padding: 0 0 .75rem .25rem !important;
}
.grescu-site-header .is-menu-open .has-child.grs-open > .wp-block-navigation__submenu-container{ display: block !important; }
.grescu-site-header .wp-block-navigation .is-menu-open .wp-block-navigation__submenu-container{ gap: 0 !important; }
.grescu-site-header .is-menu-open .wp-block-navigation__submenu-container > .wp-block-navigation-item{ margin: 0 !important; padding: 0 !important; }
.grescu-site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item{
  border: 0 !important; opacity: 1 !important; animation: none !important;
}
.grescu-site-header .wp-block-navigation .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content{
  font-family: var(--grs-sans) !important; font-size: 1rem !important; font-weight: 500 !important;
  padding: .55rem .1rem .55rem 1rem !important;
  color: var(--grs-mute) !important; border-left: 2px solid var(--grs-line, #e7e3dc) !important;
}
.grescu-site-header .wp-block-navigation .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover{
  color: var(--grs-terra) !important; border-left-color: var(--grs-terra) !important; padding-left: 1.25rem !important;
}
/* iconița de submeniu a WordPress nu mai e nevoie în meniul deschis */
.grescu-site-header .is-menu-open .wp-block-navigation__submenu-icon{ display: none !important; }

/* pe telefon, bara de admin WordPress nu mai lasă o fâșie goală deasupra meniului:
   spațiul ei e calculat de JS (--grs-ab), aici doar valoarea de rezervă */
@media (max-width: 600px){ html:root{ --wp-admin--admin-bar--height: 0px; } }

