/* ==========================================================================
   A2RC – design tokens
   Culori extrase din prezentarea PDF: roșu #ED1C24, text #231F20, gri #58595B.
   ========================================================================== */
:root {
  --red: #ed1c24;          /* roșul de brand – logo, titluri mari (text mare, contrast 4.4:1) */
  --red-ui: #d7141b;       /* butoane și text roșu mic (contrast 5.2:1 pe alb) */
  --red-ui-hover: #b81118;
  --ink: #231f20;
  --grey: #58595b;
  --rule: #231f20;
  --line-soft: #e4e4e4;
  --bg: #ffffff;
  --bg-alt: #f6f6f6;

  --font: "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", "Liberation Sans", sans-serif;

  --fs-sm: 0.875rem;
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-md: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-lg: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem);
  --fs-xl: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  --fs-hero: clamp(3.5rem, 2.2rem + 6vw, 7.5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: clamp(2.5rem, 1.8rem + 3vw, 4rem);
  --space-6: clamp(3.5rem, 2.4rem + 5vw, 7rem);

  --container: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --header-h: 4rem;
  --radius: 0;             /* PDF-ul folosește colțuri drepte */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--red-ui);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-1); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary { background: var(--red-ui); color: #fff; }
.btn-primary:hover { background: var(--red-ui-hover); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ==========================================================================
   Header & navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header { background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand-mark { width: 2.25rem; height: 2.25rem; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu (default). Fără JS, meniul rămâne vizibil sub antet. */
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-3);
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

html:not(.js) .nav-toggle { display: none; }
html:not(.js) .header-inner { flex-wrap: wrap; }

@media (max-width: 63.99em) {
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .js .site-nav ul {
    flex-direction: column;
    padding: var(--space-1) var(--gutter) var(--space-3);
  }
  .js .site-nav li + li { border-top: 1px solid var(--line-soft); }
  .js .site-nav a { display: flex; min-height: 3.25rem; font-size: 1.125rem; }
  .js .site-nav .nav-cta { color: var(--red-ui); }
}

@media (min-width: 64em) {
  .nav-toggle { display: none; }
  .site-nav ul { align-items: center; gap: var(--space-3); }
  .site-nav a {
    position: relative;
    font-size: 0.9375rem;
  }
  .site-nav a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 8px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ease);
  }
  .site-nav a:hover::after,
  .site-nav a[aria-current="true"]::after { transform: scaleX(1); }
  .site-nav .nav-cta {
    padding: 0 1.125rem;
    background: var(--red-ui);
    color: #fff;
    transition: background-color .2s var(--ease);
  }
  .site-nav .nav-cta:hover { background: var(--red-ui-hover); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-5) var(--space-6);
}

.hero-inner {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

.hero-brand {
  display: block;
  font-size: var(--fs-hero);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.hero-tagline {
  display: block;
  max-width: 13ch;
  margin-top: var(--space-3);
  font-size: var(--fs-md);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.hero-lead {
  max-width: 34rem;
  margin-top: var(--space-3);
  color: var(--grey);
  font-size: var(--fs-md);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero-mark {
  justify-self: end;
  width: min(78vw, 22rem);
  margin-right: calc(var(--gutter) * -1 - 12%);
  aspect-ratio: 1;
}
.hero-mark svg {
  width: 100%; height: 100%;
  transform: rotate(-11.5deg);
}

@media (min-width: 48em) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-mark { width: 100%; max-width: 36rem; margin-right: -14%; }
}

@media (min-width: 64em) {
  .hero { padding-block: var(--space-6); }
  .hero-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: min(70vh, 44rem); }
}

@media (max-width: 47.99em) {
  .hero { padding-top: var(--space-3); }
  .hero-inner { gap: var(--space-2); }
  .hero-mark { order: -1; width: min(52vw, 15rem); margin-right: calc(var(--gutter) * -1 - 6%); }
  .hero-tagline { max-width: 22ch; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   Services index
   ========================================================================== */
.services-index {
  padding-block: var(--space-5);
  background: var(--bg-alt);
}
.eyebrow {
  margin-bottom: var(--space-3);
  color: var(--grey);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.index-list {
  display: grid;
  border-top: 1px solid var(--rule);
}
.index-list li { border-bottom: 1px solid var(--rule); }
.index-list a {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--space-2);
  padding-block: 1.125rem;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-md);
  line-height: 1.3;
  transition: color .2s var(--ease), padding .25s var(--ease);
}
.index-list a::after {
  content: "→";
  color: var(--red);
  transition: transform .25s var(--ease);
}
.index-list a:hover { color: var(--red-ui); }
.index-list a:hover::after { transform: translateX(4px); }
.index-num {
  color: var(--grey);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 64em) {
  .index-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-5); }
}

/* ==========================================================================
   Service sections – grilă pe două coloane, separate prin linii, ca în PDF
   ========================================================================== */
.service { padding-block: var(--space-6); }
.service + .service { padding-top: 0; }

.service-grid {
  display: grid;
  gap: var(--space-4);
}

.service-head {
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
}
.service + .service .service-head { padding-top: var(--space-5); }

.service-num {
  margin-bottom: var(--space-2);
  color: var(--grey);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.service-title {
  color: var(--red);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.service-sub {
  margin-top: var(--space-2);
  color: var(--ink);
  font-size: var(--fs-md);
  line-height: 1.35;
}

.service-body {
  display: grid;
  gap: var(--space-5);
}

.item-list {
  display: grid;
  gap: var(--space-4);
}

.item h3 {
  margin-bottom: 0.375rem;
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 1.25;
}
.item p { max-width: 38rem; }
.item p + p { margin-top: var(--space-2); }

.equipment {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--red);
  background: var(--bg-alt);
  font-weight: 700;
}
.equipment-label {
  color: var(--grey);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* "Execuția include" – proces numerotat */
.process-title {
  margin-bottom: var(--space-3);
  color: var(--grey);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.process-steps {
  display: grid;
  gap: 0;
  counter-reset: step;
}
.process-steps li {
  position: relative;
  padding: 0.875rem 0 0.875rem 3.25rem;
  border-top: 1px solid var(--line-soft);
  color: var(--grey);
  counter-increment: step;
}
.process-steps li:last-child { border-bottom: 1px solid var(--line-soft); }
.process-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0.875rem;
  width: 2.25rem;
  color: var(--red-ui);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 40em) {
  .item-list--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-4); }
}

@media (min-width: 64em) {
  .service-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--space-5);
    border-top: 1px solid var(--rule);
  }
  .service-head,
  .service + .service .service-head {
    position: sticky;
    top: calc(var(--header-h) + var(--space-3));
    align-self: start;
    padding-top: var(--space-4);
    border-top: 0;
  }
  .service-body { padding-top: var(--space-4); }
  .service + .service .service-body { padding-top: var(--space-5); }
  .service + .service .service-head { padding-top: var(--space-5); }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  padding-block: var(--space-6);
  border-top: 1px solid var(--rule);
}
.contact-inner {
  display: grid;
  gap: var(--space-5);
  align-items: end;
}
.contact-title {
  color: var(--red);
  font-size: var(--fs-hero);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.contact-lead {
  margin-top: var(--space-3);
  max-width: 30rem;
  color: var(--grey);
  font-size: var(--fs-md);
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--space-4);
  padding-bottom: 0.25rem;
  border-bottom: 3px solid var(--red);
  font-size: var(--fs-lg);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s var(--ease);
}
.contact-email:hover { color: var(--red-ui); }
.contact-email .icon { flex: none; width: 1em; height: 1em; }
.contact-mark { width: clamp(6rem, 18vw, 10rem); height: auto; aspect-ratio: 1; }
.contact-mark-btn {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform .3s var(--ease);
}
.contact-mark-btn:hover { transform: rotate(-11.5deg); }

@media (min-width: 48em) {
  .contact-inner { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  padding-block: var(--space-4);
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-sm);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}
.site-footer a { text-underline-offset: 3px; }
.site-footer a:hover { color: #ffb3b6; }
.site-footer :focus-visible { outline-color: #fff; }

/* ==========================================================================
   Motion – doar cu JS și fără preferința "reduced motion"
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  .js .hero-mark svg { animation: mark-in .9s var(--ease) both; }
  @keyframes mark-in {
    from { opacity: 0; transform: rotate(-4deg) scale(.94); }
    to   { opacity: 1; transform: rotate(-11.5deg) scale(1); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header, .hero-actions, .skip-link { display: none; }
  .service-head { position: static !important; }
}
