/* HES Elektromekanik — site styles */
:root {
  --navy: #0F2A44;
  --navy-2: #143353;
  --navy-3: #1B3F63;
  --red: #C62828;
  --red-dark-bg: #FF6B5E;
  --ink: #16202B;
  --muted: #5A6878;
  --line: #D9E0E7;
  --bg: #FFFFFF;
  --bg-soft: #F2F5F8;
  --radius: 4px;
  --max: 1180px;
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 40px; height: 40px; }
.brand .bt { display: flex; flex-direction: column; line-height: 1; }
.brand .b1 { font-size: 26px; font-weight: 800; color: var(--red); letter-spacing: -0.5px; }
.brand .b2 { font-size: 9.5px; font-weight: 600; letter-spacing: 0.3em; color: var(--red); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--navy); }
.nav a:hover { color: var(--red); }
.nav .lang { border: 1px solid var(--line); padding: 5px 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px auto; }

/* Hero */
.hero { position: relative; color: #fff; background: var(--navy); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,42,68,0.96) 0%, rgba(15,42,68,0.75) 55%, rgba(15,42,68,0.35) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 112px; padding-bottom: 112px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red-dark-bg); margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; font-weight: 800; letter-spacing: -0.5px; max-width: 760px; }
.hero p { font-size: clamp(17px, 2vw, 20px); color: #C9D4DF; max-width: 620px; margin-top: 22px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px; padding: 14px 24px; border-radius: var(--radius); border: 1px solid transparent; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #A91F1F; }
.btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; }

.stats { background: var(--navy-2); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 20px; border-left: 1px solid rgba(255,255,255,0.1); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-size: 32px; font-weight: 800; line-height: 1; }
.stat span { font-size: 14px; color: #A9B8C7; }

/* Sections */
section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .eyebrow { color: var(--red); }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; font-weight: 800; color: var(--navy); letter-spacing: -0.3px; }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 18px; }
h3 { font-size: 20px; font-weight: 700; color: var(--navy); line-height: 1.3; }

/* About */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.about p + p { margin-top: 16px; }
.about .lead { font-size: 19px; color: var(--ink); }
.about p { color: var(--muted); }
.about figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.pillars div { border-top: 3px solid var(--red); padding-top: 12px; font-weight: 700; color: var(--navy); }
.pillars small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 4px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.svc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.svc img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.svc .body { padding: 22px; }
.svc p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.areas { margin-top: 56px; display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.areas ul { list-style: none; columns: 2; column-gap: 32px; }
.areas li { padding: 9px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: 15px; }
.areas li::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--red); margin-right: 12px; vertical-align: middle; }
.disciplines { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.disciplines span { border: 1px solid var(--navy); color: var(--navy); padding: 6px 14px; font-size: 14px; font-weight: 600; }

/* Strengthening */
.strength { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.strength h2 { color: #fff; }
.strength .section-head p { color: #C9D4DF; }
.strength .eyebrow { color: var(--red-dark-bg); }
.strength-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.strength-grid div { border: 1px solid rgba(255,255,255,0.16); padding: 28px; }
.strength-grid h3 { color: #fff; }
.strength-grid p { color: #C9D4DF; font-size: 15px; margin-top: 10px; }
.strength .note { margin-top: 32px; color: #A9B8C7; font-size: 15px; }
.strength .note a { color: #fff; }
.strength .brace { position: absolute; right: -40px; top: -40px; width: 340px; opacity: 0.06; pointer-events: none; }

/* References */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filters button { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 16px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; border-radius: var(--radius); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters button .n { opacity: 0.6; font-weight: 500; margin-left: 4px; }
.ref-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 36px; }
.ref-gallery figure { position: relative; overflow: hidden; border-radius: var(--radius); }
.ref-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.ref-gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 12px 10px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(10,25,40,0.85)); }
.ref-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.ref-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; }
.ref-list .t { font-weight: 600; color: var(--navy); font-size: 15.5px; }
.ref-list .s { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }
.ref-list .tag { font-size: 12px; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.ref-list li[hidden] { display: none; }

/* Certificates */
.certs { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: center; }
.cert-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cert-imgs img { border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(15,42,68,0.08); }
.cert-list { list-style: none; margin-top: 24px; }
.cert-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cert-list b { color: var(--navy); }
.cert-list span { color: var(--muted); font-size: 15px; display: block; }
.fine { color: var(--muted); font-size: 14px; margin-top: 16px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-card { background: var(--navy); color: #fff; padding: 40px; border-radius: var(--radius); }
.contact-card dl div { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.contact-card dl div:last-child { border-bottom: 0; }
.contact-card dt { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-dark-bg); }
.contact-card dd { font-size: 18px; margin-top: 4px; }
.contact-card a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.35); }
.contact-card a:hover { border-color: #fff; }

/* Footer */
.site-footer { background: #0A1E31; color: #A9B8C7; font-size: 14px; padding: 40px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer nav { display: flex; gap: 20px; }

/* Legal page */
.legal { padding: 64px 0 96px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); color: var(--navy); line-height: 1.2; }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: #333F4C; margin-top: 12px; }
.legal ul { padding-left: 22px; }
.legal .meta { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* Responsive */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .ref-gallery { grid-template-columns: repeat(2, 1fr); }
  .about, .certs, .contact, .areas { grid-template-columns: 1fr; gap: 40px; }
  .strength-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  section { padding: 72px 0; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .lang { align-self: flex-start; margin-top: 12px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding-left: 0; }
  .ref-list { grid-template-columns: 1fr; }
  .areas ul { columns: 1; }
  .pillars { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: 80px; padding-bottom: 80px; }
}
@media (max-width: 520px) {
  .services { grid-template-columns: 1fr; }
  .contact-card { padding: 28px; }
}
