/* ==========================================================================
   ADS Electrical Company website (based on design Concept B: Industrial)
   Dark and technical. Brand red on black, extended italic display type that
   echoes the ADS logo, engineering-drawing details.
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --bg-2: #111113;
  --surface: #16161a;
  --surface-2: #1d1d22;
  --line: #26262c;
  --line-2: #34343c;
  --text: #ededf0;
  --muted: #a3a3ad;
  --dim: #8b8b95;
  --red: #e3141d;
  --red-deep: #b8090f;
  --red-text: #ff4d55; /* red for small text on dark backgrounds */
  --red-glow: rgba(227, 20, 29, 0.45);
  --ok: #3ddc84;
  --warn: #f5a524;
  --font-display: "Archivo", "Arial Black", ui-sans-serif, sans-serif;
  --font-logo: "Saira", "Archivo", "Arial Black", ui-sans-serif, sans-serif; /* hero headline only: matches the ADS logo lettering */
  --font-body: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: 20px;
  --header-h: 78px;
  --cut: 14px;
}
@media (min-width: 768px) { :root { --gutter: 40px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font-body); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
::selection { background: var(--red); color: #fff; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
main { overflow-x: clip; }
[hidden] { display: none !important; } /* hidden always wins, whatever the layout sets */
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 {
  margin: 0; font-family: var(--font-display); font-weight: 800; font-style: italic; font-stretch: 125%;
  text-transform: uppercase; letter-spacing: -0.015em; line-height: 0.95; text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 1rem + 3.6vw, 4.4rem); }
h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.05; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap { width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--red); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }
.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.mono, .mono-dim { font-family: var(--font-mono); }
.mono-dim { color: var(--dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.9em 1.4em; border: 0;
  font: italic 800 0.92rem/1 var(--font-display); font-stretch: 125%; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn--lg { padding: 1.15em 1.7em; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--red { background: var(--red); color: #fff; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }
.btn--red:hover { background: #fff; color: var(--bg); }
.btn--red .icon { transition: transform 0.2s; }
.btn--red:hover .icon { transform: translate(2px, -2px); }
.btn--line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn--line:hover { color: #fff; box-shadow: inset 0 0 0 1.5px var(--red); background: rgba(227, 20, 29, 0.08); }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid transparent; transition: background-color 0.3s, border-color 0.3s; }
.header.is-scrolled { background: rgba(11, 11, 12, 0.88); border-bottom-color: var(--line); backdrop-filter: blur(12px); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand img { width: auto; height: 46px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 24px; }
.nav__list a {
  display: inline-flex; align-items: baseline; gap: 6px; color: var(--text);
  font: italic 700 0.86rem/1 var(--font-display); font-stretch: 118%; letter-spacing: 0.04em; text-transform: uppercase;
  transition: color 0.2s;
}
.nav__list a span { color: var(--dim); font: normal 500 0.64rem/1 var(--font-mono); transition: color 0.2s; }
.nav__list a:hover, .nav__list a.is-active, .nav__list a:hover span, .nav__list a.is-active span { color: var(--red-text); }
.nav__phone { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 500 0.85rem/1 var(--font-mono); }
.nav__phone:hover { color: #fff; }
.nav__phone .icon { color: var(--red); }
.nav-toggle { display: none; width: 48px; height: 48px; padding: 0; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 22px; height: 2px; margin-inline: auto; background: var(--text); transition: transform 0.25s, background-color 0.25s; }
.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); background: var(--red); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); background: var(--red); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: max(740px, 100vh); padding: calc(var(--header-h) + 64px) 0 40px; isolation: isolate; }
.hero__grid-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero__spot { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 72%) var(--my, 42%), rgba(227, 20, 29, 0.13), transparent 60%), radial-gradient(900px 600px at 100% 100%, rgba(184, 9, 15, 0.12), transparent 60%); }
.sld {
  position: absolute; z-index: -1; top: calc(var(--header-h) + 8px); right: max(0px, calc((100vw - 1320px) / 2 - 40px));
  width: min(40vw, 560px); height: auto;
  mask-image: linear-gradient(90deg, transparent, #000 25%), linear-gradient(180deg, #000 70%, transparent);
  mask-composite: intersect; -webkit-mask-composite: source-in;
}
.sld__line { fill: none; stroke: #3b3b44; stroke-width: 2; stroke-linecap: square; }
.sld__bus { stroke: #5a5a64; stroke-width: 6; }
.sld__part { fill: var(--bg); stroke: #6f6f7a; stroke-width: 2; }
.sld__mark { fill: none; stroke: #6f6f7a; stroke-width: 1.6; }
.sld__node { fill: var(--red); }
.sld__g { fill: #9a9aa5; font: 700 12px var(--font-mono); }
.sld__g--big { font: italic 800 24px var(--font-display); }
.sld__label { fill: #6f6f7a; font: 500 11px var(--font-mono); letter-spacing: 0.08em; }
.sld__title { fill: #4d4d56; }
.sld__pulse path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 5 95; stroke-dashoffset: 100; filter: drop-shadow(0 0 5px var(--red-glow)); animation: pulse 2.6s linear infinite; animation-delay: var(--d, 0s); }
@keyframes pulse { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.hero__inner { position: relative; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; color: var(--muted); font: 500 0.76rem/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.kicker__led { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.16), 0 0 12px var(--ok); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.45; } }
.hero__title { display: flex; flex-direction: column; font-family: var(--font-logo); font-weight: 900; font-size: clamp(2.6rem, 0.55rem + 6.6vw, 7rem); line-height: 0.88; letter-spacing: -0.02em; }
.hero__title em { color: var(--red); font-style: inherit; text-shadow: 0 0 50px rgba(227, 20, 29, 0.35); }
.hero__lead { max-width: 36em; margin: 32px 0 0; color: var(--muted); font-size: 1.12rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.spec-strip { display: grid; grid-template-columns: 0.6fr 1.4fr 1.2fr 1.2fr; margin: clamp(56px, 8vh, 96px) 0 0; border-top: 1px solid var(--line-2); }
.spec-strip > div { padding: 18px 20px 4px 0; }
.spec-strip > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.spec-strip dt { margin-bottom: 8px; color: var(--dim); font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.spec-strip dd { margin: 0; font: italic 700 1rem/1.25 var(--font-display); font-stretch: 118%; letter-spacing: 0.02em; text-transform: uppercase; }
.spec-strip .mono-dim { display: block; margin-top: 4px; font: normal 500 0.7rem/1 var(--font-mono); letter-spacing: 0.04em; }

/* ---------- Ticker ---------- */
.ticker { position: relative; z-index: 2; overflow: hidden; margin: 0 -2vw; padding: 16px 0; background: var(--red); color: #fff; transform: rotate(-1.2deg); }
.ticker__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.ticker span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font: italic 800 1.45rem/1 var(--font-display); font-stretch: 125%; text-transform: uppercase; white-space: nowrap; }
.ticker span::after { content: ""; width: 11px; height: 11px; background: var(--bg); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(96px, 12vw, 160px) 0; }
.sec-label { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--red-text); font: 500 0.78rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.sec-label span { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border: 1px solid rgba(227, 20, 29, 0.5); font-size: 0.7rem; }
.sec-head { display: grid; grid-template-columns: 1fr minmax(260px, 380px); align-items: end; gap: 24px 48px; margin-bottom: clamp(48px, 6vw, 80px); }
.sec-head .sec-label { grid-column: 1 / -1; margin-bottom: 0; }
.sec-head__aside { margin: 0; padding-left: 20px; border-left: 2px solid var(--red); color: var(--muted); font-size: 1rem; }
.sec-head--row { grid-template-columns: 1fr minmax(260px, 380px); }
.sec-head--row .sec-label { margin-bottom: 22px; }

/* ---------- Capabilities ---------- */
.caps { border-top: 1px solid var(--line-2); }
.cap {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1.05fr) minmax(0, 1.35fr) minmax(0, 0.75fr) 128px; align-items: center; gap: 24px;
  padding: 26px 0; border-bottom: 1px solid var(--line-2); transition: background-color 0.3s, padding 0.3s;
}
.cap::before { content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 3px; background: var(--red); transform: scaleY(0); transition: transform 0.3s; }
.cap:hover { padding-left: 20px; background: linear-gradient(90deg, rgba(227, 20, 29, 0.08), transparent 70%); }
.cap:hover::before { transform: scaleY(1); }
.cap__num { color: var(--dim); font: 500 0.85rem/1 var(--font-mono); }
.cap__title { font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); transition: color 0.3s; }
.cap:hover .cap__title { color: var(--red); }
.cap__text { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.55; }
.cap__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cap__tags li { padding: 5px 8px; border: 1px solid var(--line-2); color: var(--muted); font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.cap__img { width: 128px; height: 88px; object-fit: cover; filter: grayscale(1) contrast(1.15) brightness(0.8); opacity: 0.55; transition: filter 0.4s, opacity 0.4s, transform 0.4s; }
.cap:hover .cap__img { filter: none; opacity: 1; transform: scale(1.04); }

/* ---------- Numbers ---------- */
.numbers { border-block: 1px solid var(--line); background: var(--bg-2); }
.numbers__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.num { padding: 48px 28px; }
.num + .num { border-left: 1px solid var(--line); }
.num__value { margin: 0 0 12px; font: italic 800 clamp(2.8rem, 1.6rem + 3vw, 4.8rem)/0.9 var(--font-display); font-stretch: 125%; letter-spacing: -0.02em; }
.num__value em { color: var(--red); font-style: inherit; }
.num__label { margin: 0; color: var(--muted); font: 500 0.72rem/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- Projects ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.hl { display: flex; flex-direction: column; padding: 28px 26px 22px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.3s, transform 0.3s; }
.hl:hover { border-color: rgba(227, 20, 29, 0.55); transform: translateY(-3px); }
.hl__value { margin: 0 0 18px; color: var(--red); font: italic 800 clamp(2.2rem, 1.6rem + 1.6vw, 3.2rem)/1 var(--font-display); font-stretch: 125%; }
.hl h3 { margin-bottom: 12px; font-size: 1.2rem; }
.hl > p:not(.hl__value):not(.hl__meta) { flex: 1; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.hl__meta { margin: 8px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-2); color: var(--dim); font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }

.register { border: 1px solid var(--line); background: var(--bg-2); }
.register__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; color: var(--muted); font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.filter span { padding: 2px 5px; background: var(--line); color: var(--text); font-size: 0.66rem; }
.filter:hover { color: var(--text); border-color: var(--dim); }
.filter.is-active { border-color: var(--red); background: var(--red); color: #fff; }
.filter.is-active span { background: rgba(0, 0, 0, 0.25); }
.register__legend { display: flex; gap: 10px; margin: 0; }
.table-scroll { overflow-x: auto; }
.ptable { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.95rem; }
.ptable th { padding: 14px 18px; background: var(--surface); color: var(--dim); font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.14em; text-align: left; text-transform: uppercase; }
.ptable td { padding: 16px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.ptable tbody tr { transition: background-color 0.2s; }
.ptable tbody tr:hover { background: rgba(227, 20, 29, 0.05); }
.ptable tr[hidden] { display: none; }
.ptable.is-collapsed tbody tr.is-extra { display: none; }
.pt-no { color: var(--dim); font-family: var(--font-mono); font-size: 0.82rem; }
.pt-project { color: var(--text); }
.pt-project small { display: block; margin-top: 4px; color: var(--dim); font-size: 0.82rem; }
.pt-value, .pt-year { white-space: nowrap; font-family: var(--font-mono); font-size: 0.86rem; }
.pt-value { color: var(--text); }
.pt-year { color: var(--muted); }
.pt-status { display: inline-flex; align-items: center; gap: 7px; font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.pt-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.pt-status--live { color: var(--ok); }
.pt-status--live::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pt-status--done { color: var(--dim); }
.pt-status--done::before { background: var(--dim); }
.register__more { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; border: 0; border-top: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text); font: italic 700 0.86rem/1 var(--font-display); font-stretch: 118%; letter-spacing: 0.04em; text-transform: uppercase; transition: background-color 0.2s, color 0.2s; }
.register__more:hover { background: var(--surface-2); color: var(--red-text); }
.register__more .icon { transition: transform 0.3s; }
.register__more[aria-expanded="true"] .icon { transform: rotate(180deg); }
.register__more[hidden] { display: none; }

/* ---------- Field log ---------- */
.fieldlog { padding-top: 0; }
.log { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 12px; }
.log__item { position: relative; margin: 0; overflow: hidden; background: var(--surface); }
.log__item--wide { grid-column: span 2; }
.log__item--tall { grid-row: span 2; }
.log__item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15) brightness(0.9); transition: filter 0.5s, transform 0.8s; }
.log__item::after { content: ""; position: absolute; inset: 0; background: var(--red-deep); mix-blend-mode: multiply; opacity: 0.42; transition: opacity 0.5s; pointer-events: none; }
.log__item:hover img { filter: none; transform: scale(1.04); }
.log__item:hover::after { opacity: 0; }
.log__item figcaption { position: absolute; z-index: 1; inset: auto 0 0; padding: 40px 16px 14px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85)); font: italic 700 0.95rem/1.15 var(--font-display); font-stretch: 112%; text-transform: uppercase; }
.log__item figcaption span { display: block; margin-bottom: 6px; color: var(--red-text); font: normal 500 0.66rem/1 var(--font-mono); letter-spacing: 0.14em; }

/* ---------- Safety ---------- */
.safety { background: var(--bg-2); }
.hazard { height: 14px; background: repeating-linear-gradient(-45deg, var(--red) 0 16px, var(--bg) 16px 32px); }
.safety > .hazard { position: absolute; inset: 0 0 auto; }
.hazard--thin { height: 8px; }
.safety__grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.safety__statement h2 { margin-bottom: 36px; font-size: clamp(2rem, 1.1rem + 3vw, 4rem); }
.safety__statement h2 span { color: var(--red); }
.grade { display: flex; gap: 22px; align-items: stretch; padding: 22px; border: 1px solid var(--line-2); background: var(--surface); }
.grade__letter { display: grid; place-items: center; flex: none; width: 104px; background: var(--red); color: #fff; font: italic 800 4.4rem/1 var(--font-display); font-stretch: 125%; }
.grade__body { flex: 1; min-width: 0; }
.grade__title { margin: 0 0 8px; color: var(--dim); font: 500 0.68rem/1.3 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.grade__score { margin: 0 0 14px; color: var(--muted); font: 500 0.82rem/1 var(--font-mono); }
.grade__score b { color: var(--text); font: italic 800 2rem/1 var(--font-display); font-stretch: 125%; margin-right: 6px; }
.grade__bar { height: 8px; background: var(--line); }
.grade__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--red-deep), var(--red)); box-shadow: 0 0 12px var(--red-glow); }
.grade__src { margin: 12px 0 0; color: var(--dim); font-size: 0.82rem; }
.safety__list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.safety__list li { padding: 28px 24px; background: var(--bg-2); transition: background-color 0.3s; }
.safety__list li:hover { background: var(--surface); }
.safety__list .icon { width: 28px; height: 28px; margin-bottom: 18px; color: var(--red); stroke-width: 1.7; }
.safety__list h3 { margin-bottom: 8px; font-size: 1.12rem; }
.safety__list p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* ---------- Credentials ---------- */
.creds { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.creds .table-scroll { border: 1px solid var(--line); }
.spec { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 0.95rem; }
.spec th, .spec td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.spec thead th { white-space: nowrap; background: var(--surface); color: var(--dim); font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.spec tbody tr { transition: background-color 0.2s; }
.spec tbody tr:hover { background: rgba(227, 20, 29, 0.05); }
.spec tbody tr:last-child > * { border-bottom: 0; }
.spec tbody th { color: var(--muted); font-size: 0.84rem; font-weight: 400; }
.spec tbody th b { display: block; margin-bottom: 4px; color: var(--text); font: italic 800 1.3rem/1 var(--font-display); font-stretch: 125%; }
.spec td.mono { font-size: 0.8rem; line-height: 1.5; color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status--check { color: var(--warn); }
.download {
  display: flex; align-items: center; gap: 16px; padding: 24px; border: 1px solid var(--line-2); background: var(--surface);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); transition: border-color 0.3s, background-color 0.3s;
}
.download:hover { border-color: var(--red); background: var(--surface-2); }
.download > .icon { width: 36px; height: 36px; color: var(--red); stroke-width: 1.5; }
.download b { display: block; font: italic 800 1.15rem/1 var(--font-display); font-stretch: 125%; text-transform: uppercase; }
.download small { display: block; margin-top: 8px; color: var(--dim); font: 500 0.7rem/1.45 var(--font-mono); }
.download__arrow { margin-left: auto; color: var(--text); }

/* ---------- Process ---------- */
.process-sec { border-top: 1px solid var(--line); }
.flow { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.flow::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: linear-gradient(90deg, var(--red), var(--red) 30%, var(--line-2) 30%); background-size: 200% 100%; animation: charge 6s ease-in-out infinite alternate; }
@keyframes charge { from { background-position: 100% 0; } to { background-position: 0 0; } }
.flow li { position: relative; padding-top: 40px; }
.flow__node { position: absolute; top: 0; left: 0; width: 20px; height: 20px; border: 2px solid var(--red); background: var(--bg); transform: rotate(45deg); }
.flow__step { margin: 0 0 10px; color: var(--dim); font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; }
.flow h3 { margin-bottom: 10px; font-size: 1.7rem; }
.flow p:last-child { margin: 0; color: var(--muted); font-size: 0.97rem; line-height: 1.5; }

/* ---------- Contact ---------- */
.contact { background: radial-gradient(900px 500px at 0% 100%, rgba(227, 20, 29, 0.1), transparent 60%), var(--bg); border-top: 1px solid var(--line); }
.contact__title { margin-bottom: clamp(48px, 6vw, 80px); font-size: clamp(2.3rem, 0.8rem + 6vw, 7rem); line-height: 0.9; }
.contact__title span { color: var(--red); }
.contact__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__phone { display: block; font: italic 800 clamp(2rem, 1.3rem + 2.4vw, 3.4rem)/1 var(--font-display); font-stretch: 125%; transition: color 0.2s; }
.contact__phone:hover, .contact__mail:hover { color: var(--red-text); }
.contact__mail { display: inline-block; margin-top: 14px; color: var(--muted); font: 500 1rem/1.3 var(--font-mono); overflow-wrap: anywhere; }
.contact__meta { margin: 36px 0; border-top: 1px solid var(--line); }
.contact__meta div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact__meta dt { color: var(--dim); font: 500 0.68rem/1.9 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.contact__meta dd { margin: 0; }
.form { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line-2); background: var(--surface); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.field > span, .field legend { color: var(--muted); font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.field input, .field textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: 0; background: var(--bg); font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(227, 20, 29, 0.18); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff5c5c; }
/* Keep browser-autofilled fields dark (Chrome and Safari paint them light blue, Firefox tints them) */
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 1000px var(--bg) inset; transition: background-color 9999s ease-out 0s, border-color 0.2s; }
.field input:-webkit-autofill:focus { box-shadow: 0 0 0 1000px var(--bg) inset, 0 0 0 3px rgba(227, 20, 29, 0.18); }
.field input:autofill { filter: none; }
.chips { display: flex; flex-flow: row wrap; gap: 8px; padding: 0; border: 0; }
.chips legend { width: 100%; margin-bottom: 10px; padding: 0; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 10px 14px; border: 1px solid var(--line-2); color: var(--muted); font: italic 700 0.8rem/1 var(--font-display); font-stretch: 115%; text-transform: uppercase; transition: all 0.2s; }
.chips label:hover span { border-color: var(--dim); color: var(--text); }
.chips input:checked + span { border-color: var(--red); background: rgba(227, 20, 29, 0.12); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.form__success { margin: 16px 0 0; padding: 14px 16px; border-left: 3px solid var(--ok); background: rgba(61, 220, 132, 0.08); color: #b8f5d0; font-size: 0.95rem; }
.form__success[hidden] { display: none; }

/* ---------- Footer ---------- */
.footer { background: #070708; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 48px 0 36px; }
.footer .brand img { height: 52px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font: italic 700 0.9rem/1 var(--font-display); font-stretch: 118%; text-transform: uppercase; }
.footer__nav a:hover { color: var(--red-text); }
.footer__social { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); }
.footer__social:hover { border-color: var(--red); color: var(--red-text); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--dim); font: 500 0.7rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.footer__bottom p { margin: 0; }
.footer__top { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.footer__top:hover { color: var(--red-text); }

/* ---------- Departments (contact) ---------- */
.depts { margin: 0 0 32px; }
.depts__title { margin: 0 0 12px; color: var(--dim); font: 500 0.68rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.depts ul { border-top: 1px solid var(--line); }
.depts li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.depts li span { color: var(--muted); font-size: 0.95rem; }
.depts li a { font: 500 0.88rem/1.3 var(--font-mono); overflow-wrap: anywhere; transition: color 0.2s; }
.depts li a:hover { color: var(--red-text); }
.contact__directions { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font: 500 0.78rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.contact__directions:hover { color: var(--red-text); }

/* ---------- Form extras ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__consent { margin: 14px 0 0; color: var(--dim); font-size: 0.85rem; line-height: 1.5; }
.form__consent a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.form__consent a:hover { color: #fff; }
.form__error { margin: 16px 0 0; padding: 14px 16px; border-left: 3px solid var(--red); background: rgba(227, 20, 29, 0.1); color: #ffd2d4; font-size: 0.95rem; }
.form__error[hidden] { display: none; }
.form__error a { color: #fff; text-decoration: underline; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* ---------- Floating WhatsApp button ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center; width: 58px; height: 58px;
  border-radius: 50%; background: #25d366; color: #06371a; box-shadow: 0 14px 30px -10px rgba(18, 140, 74, 0.7);
  transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
}
.fab .icon { width: 30px; height: 30px; }
.fab:hover { transform: scale(1.06); }
.fab.is-hidden { visibility: hidden; opacity: 0; transform: translateY(16px) scale(0.9); }

/* ---------- Simple content pages (privacy, thanks, 404) ---------- */
.page { padding: calc(var(--header-h) + 72px) 0 96px; }
.page .wrap { max-width: 860px; }
.page h1 { margin-bottom: 20px; font-size: clamp(2.2rem, 1.2rem + 4vw, 4rem); line-height: 0.95; }
.page h1 span { color: var(--red); }
.page h2 { margin: 48px 0 14px; font-size: clamp(1.3rem, 1.1rem + 1vw, 1.8rem); }
.page h3 { margin: 28px 0 8px; font-size: 1.1rem; }
.page p, .page li { color: var(--muted); }
.page ul { display: grid; gap: 6px; margin: 0 0 1em; padding-left: 20px; list-style: disc; }
.page a:not(.btn) { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.page a:not(.btn):hover { color: var(--red-text); }
.page__lead { font-size: 1.12rem; }
.page__meta { color: var(--dim); font: 500 0.75rem/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.page__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lang-block + .lang-block { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line-2); }
.header--solid { background: rgba(11, 11, 12, 0.92); border-bottom-color: var(--line); backdrop-filter: blur(12px); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .nav__phone { display: none; }
  .cap { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.3fr) 112px; }
  .cap__tags { display: none; }
  .cap__img { width: 112px; height: 80px; }
}

@media (max-width: 1000px) {
  :root { --header-h: 70px; }
  .header { background: rgba(11, 11, 12, 0.88); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
  .brand img { height: 40px; }
  .nav-toggle { display: block; }
  /* Absolute (not fixed): the header's backdrop-filter would otherwise become the
     containing block of a fixed menu and collapse it to zero height. */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 28px;
    padding: 32px var(--gutter) 40px; background: var(--bg); visibility: hidden; opacity: 0; transition: opacity 0.25s, visibility 0.25s;
  }
  .nav.is-open { visibility: visible; opacity: 1; }
  .nav__list { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
  .nav__list a { width: 100%; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 1.7rem; }
  .nav__list a span { font-size: 0.75rem; }
  .nav__phone { display: inline-flex; font-size: 1rem; }
  .nav .btn { align-self: flex-start; }
  .sld { width: 120vw; right: -40vw; top: calc(var(--header-h) + 20px); opacity: 0.3; mask-image: linear-gradient(90deg, transparent, #000 35%), linear-gradient(180deg, #000 26%, transparent 46%); } /* fades out before the paragraph */
  .spec-strip { grid-template-columns: 1fr 1fr; }
  .spec-strip > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .spec-strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .sec-head, .sec-head--row { grid-template-columns: 1fr; }
  .cap { grid-template-columns: 44px 1fr 96px; row-gap: 10px; }
  .cap__text { grid-column: 2; grid-row: 2; }
  .cap__img { grid-column: 3; grid-row: 1 / span 2; width: 96px; height: 72px; filter: none; opacity: 1; }
  .numbers__grid { grid-template-columns: 1fr 1fr; }
  .num:nth-child(3) { border-left: 0; }
  .num:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .highlights { grid-template-columns: 1fr; }
  .log { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .log__item img { filter: none; }
  .log__item::after { opacity: 0; }
  .safety__grid, .contact__grid, .creds { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; gap: 0; padding-left: 36px; }
  .flow::before { left: 9px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--red) 40%, var(--line-2) 40%); animation: none; }
  .flow li { padding: 0 0 36px; }
  .flow__node { left: -36px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 48px); }
  .kicker { font-size: 0.66rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .spec-strip { grid-template-columns: 1fr; }
  .spec-strip > div, .spec-strip > div + div { padding: 14px 0; border-left: 0; border-top: 1px solid var(--line); }
  .spec-strip > div:first-child { border-top: 0; }
  .ticker span { font-size: 1.1rem; }
  .cap { grid-template-columns: 1fr 88px; }
  .cap__num { display: none; }
  .cap__title { grid-column: 1; grid-row: 1; }
  .cap__text { grid-column: 1 / -1; grid-row: 2; }
  .cap__img { grid-column: 2; grid-row: 1; width: 88px; height: 64px; }
  .num { padding: 30px 14px; }
  .num__value { font-size: 2.1rem; font-stretch: 105%; }
  .log { grid-auto-rows: 150px; grid-auto-flow: dense; gap: 8px; }
  .log__item--tall { grid-row: span 1; }
  .log__item--wide:last-child { grid-column: auto; }
  .safety__list { grid-template-columns: 1fr; }
  .grade { gap: 16px; padding: 16px; }
  .grade__letter { width: 72px; font-size: 3rem; }
  .grade__score b { font-size: 1.6rem; }
  /* Project register as stacked cards */
  .ptable, .ptable tbody { display: block; min-width: 0; }
  .ptable thead { display: none; }
  .ptable tbody tr { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; padding: 16px; border-top: 1px solid var(--line); }
  .ptable td { padding: 0; border: 0; }
  .ptable .pt-no { grid-row: 1; grid-column: 1; }
  .ptable .pt-year { grid-row: 1; grid-column: 2; }
  .ptable td:last-child { grid-row: 1; grid-column: 3; }
  .ptable .pt-project { grid-row: 2; grid-column: 1 / -1; }
  .ptable .pt-value { grid-row: 3; grid-column: 1 / -1; color: var(--red-text); }
  /* Registrations as stacked cards */
  .spec, .spec tbody { display: block; min-width: 0; }
  .spec thead { display: none; }
  .spec tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 18px 16px; border-bottom: 1px solid var(--line); }
  .spec tbody tr:last-child { border-bottom: 0; }
  .spec tbody th, .spec td { padding: 0; border: 0; }
  .spec tbody th { grid-column: 1; grid-row: 1; }
  .spec td:nth-child(5) { grid-column: 2; grid-row: 1; }
  .spec td:nth-child(2), .spec td:nth-child(3), .spec td:nth-child(4) { grid-column: 1 / -1; }
  .spec td:nth-child(4)::before { content: "Valid to "; color: var(--dim); }
  .form__row { grid-template-columns: 1fr; }
  .contact__meta div { grid-template-columns: 1fr; gap: 4px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .page { padding-top: calc(var(--header-h) + 48px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sld__pulse { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
