/* Scope proposal only. Independent primitives keep Home and the baseline frozen. */
:root {
  --bg: #0a0c0f; --bg-alt: #0f1216; --surface: #14181d;
  --fg: #eceef1; --fg-2: #b4bbc5; --fg-3: #8f98a5;
  --line: #222830; --line-2: #2e3540;
  --red: #e10600; /* original Autech red from css/style.css */ --red-dark: #c00500; /* same hue, hover only */
  --button-fg: #ffffff; --hero-veil: rgba(10,12,15,.88); --hero-clear: rgba(10,12,15,.35); --contact-bg: #0d0f13;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px; --pad: clamp(1.25rem, 4vw, 2.5rem);
  --band: clamp(4rem, 8vw, 6.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--red); color: var(--button-fg); padding: .75rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.accent { color: var(--red); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .75rem 1.5rem; font: 500 .95rem/1 var(--font); text-decoration: none; border: 1px solid transparent; border-radius: 2px; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.btn--primary { background: var(--red); color: var(--button-fg); }
.btn--primary:hover { background: var(--red-dark); }
.btn--primary:focus-visible { outline-color: var(--fg); }
.btn--ghost { border-color: var(--line-2); color: var(--fg); background: rgba(10,12,15,.4); }
.btn--ghost:hover { border-color: var(--fg-3); }
.btn--sm { min-height: 40px; padding: .55rem 1.1rem; font-size: .875rem; }
.textlink { display: inline-flex; gap: .5rem; align-items: center; min-height: 44px; color: var(--fg); font-weight: 500; text-decoration: none; min-height: 0; margin-top: 1.5rem; }
.textlink:hover { color: var(--fg-2); }

/* Navigation */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 50; background: transparent; }
.nav__links a:not(.btn) { text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 104px; }
.nav__logo img { height: 84px; width: auto; }
@media (max-width: 899px) { .nav__bar { min-height: 80px; } .nav__logo img { height: 60px; } }
@media (max-width: 380px) { .nav__logo img { height: 52px; } }
.nav__links { display: flex; align-items: center; gap: .25rem; }
.nav__links a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .85rem; font-size: .925rem; color: var(--fg-2); text-decoration: none; position: relative; transition: color .2s ease; }
.nav__links a:not(.btn):hover { color: var(--fg); }
.nav__links a[aria-current="page"] { color: var(--fg); }
.nav__links a[aria-current="page"]::after { content: ""; position: absolute; left: .85rem; right: .85rem; bottom: 6px; height: 2px; background: var(--red); }
.nav__cta-item { margin-left: .75rem; }
.nav__toggle { display: none; }
@media (max-width: 899px) {
  .nav__toggle { display: inline-flex; background: rgba(10,12,15,.35) !important; align-items: center; gap: .6rem; min-height: 44px; min-width: 44px; padding: 0 .75rem; background: none; border: 1px solid var(--line-2); border-radius: 2px; color: var(--fg); font: 500 .875rem var(--font); cursor: pointer; }
  .nav__toggle-bars, .nav__toggle-bars::before, .nav__toggle-bars::after { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; }
  .nav__toggle-bars::before, .nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav__toggle-bars::before { top: -5px; } .nav__toggle-bars::after { top: 5px; }
  .nav.is-open .nav__toggle-bars { background: transparent; }
  .nav.is-open .nav__toggle-bars::before { top: 0; transform: rotate(45deg); }
  .nav.is-open .nav__toggle-bars::after { top: 0; transform: rotate(-45deg); }
  .nav__primary { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
  .nav.is-open .nav__primary { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--pad) 1.25rem; }
  .nav__links a:not(.btn) { display: flex; width: 100%; min-height: 52px; padding: 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav__links a[aria-current="page"]::after { left: auto; right: 0; top: 50%; bottom: auto; width: 6px; height: 6px; transform: translateY(-50%); }
  .nav__cta-item { margin: 1rem 0 0; } .nav__cta-item .btn { width: 100%; min-height: 48px; }
}


/* Compact image-led Scope opening */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 164px 0 52px; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 22%; z-index: -2; }
/* Wide screens: anchor the original image right so the engineer's head and shoulders stay in frame */
@media (min-width: 1400px) { .hero__image { left: auto; width: min(100%, 1500px); object-position: 80% 18%; } .hero { background: var(--bg); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,12,15,.55), transparent 130px), linear-gradient(90deg, var(--bg) 0%, var(--hero-veil) 48%, var(--hero-clear) 100%), linear-gradient(0deg, var(--bg), transparent 55%); }
.eyebrow { display: flex; align-items: center; gap: .9rem; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-2); }
.eyebrow__rule { flex: 0 0 40px; height: 1px; background: var(--red); }
.hero__title { margin-top: 1.5rem; max-width: 18em; font-size: 52px; font-weight: 300; line-height: 1.08; }
.hero__title-line { display: block; }
.hero__lede { margin-top: 1.5rem; max-width: 38em; font-size: 1.125rem; color: var(--fg-2); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
.direct-email { color: var(--fg); text-decoration: none; overflow-wrap: anywhere; min-height: 44px; display: inline-flex; align-items: center; }
.index { color: var(--red); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
.index__num { font-variant-numeric: tabular-nums; }
/* Unframed contents: all services remain visible below */
.contents { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); padding: 1.5rem 0; }
.contents__inner { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2rem; }
.contents h2 { font-size: .75rem; text-transform: uppercase; font-weight: 500; color: var(--fg-2); padding-top: .75rem; }
.contents ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem 1.5rem; }
.contents a { min-height: 44px; display: flex; gap: .65rem; align-items: center; text-decoration: none; font-size: .875rem; border-bottom: 1px solid var(--line); transition: border-color .2s ease, color .2s ease; }
.contents a span { color: var(--fg-2); border-bottom: 1px solid var(--red); font-variant-numeric: tabular-nums; font-size: .75rem; }
/* Six editorial rows, not cards */
.services { padding: 1rem 0 0; }
.service { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4rem; padding: 3rem 0; border-bottom: 1px solid var(--line-2); scroll-margin-top: 1rem; }
.service:last-child { border-bottom: 0; }
.service h2 { margin-top: .65rem; font-size: 32px; font-weight: 300; line-height: 1.15; }
.service__description { margin-top: 1rem; color: var(--fg-2); max-width: 36em; }
.service__list { align-self: start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.service__list li { position: relative; padding: .9rem 0 .9rem 1.25rem; }
.service__list li::before { content: ''; position: absolute; top: 1.65rem; left: 0; height: 1px; width: 7px; background: var(--red); }
.contact { padding: 3.5rem 0; background: var(--contact-bg); border-top: 1px solid var(--line); }
.contact__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 4rem; align-items: center; }
.contact h2 { margin-top: .75rem; font-size: 36px; font-weight: 300; line-height: 1.15; }
.contact__lede { margin-top: 1rem; max-width: 38em; color: var(--fg-2); }
.contact__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.coverage { font-size: .9rem; color: var(--fg-2); }
/* Match approved Home footer navigation */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; font-size: .9rem; color: var(--fg-3); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem 2rem; }
.footer__nav, .footer__meta { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--fg-2); transition: color .2s ease; }
.footer__copy { grid-column: 1 / -1; padding-top: 1rem; border-top: 1px solid var(--line); }
/* Reveals are applied only while entering, never hidden pending a script. */
.scope-enter { animation: scope-entry .45s ease both; }
@keyframes scope-entry { from { opacity: .25; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nav__toggle-bars, .nav__toggle-bars::before, .nav__toggle-bars::after { transition: transform .2s ease, top .2s ease, background-color .2s ease; }
.textlink span, .btn span { display: inline-block; transition: transform .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .contents a:hover { border-color: var(--red); color: var(--fg); }
  .direct-email:hover { color: var(--fg-2); } .footer a:hover { color: var(--fg); }
  .btn:hover span, .textlink:hover span { transform: translateX(4px); }
}
.contents a:focus-visible { border-color: var(--red); }
@media (max-width: 1099px) {
  .service { gap: 2.5rem; }
  .service__list { grid-template-columns: 1fr; }
  .contents__inner { grid-template-columns: 1fr; gap: .75rem; }
  .contents h2 { padding-top: 0; }
}
@media (max-width: 899px) {
  .hero { padding: 124px 0 40px; }
  .hero__title { font-size: 40px; }
  .hero__title { text-wrap: pretty; }
  .hero__title-line { display: inline; }
  .service { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem 0; }
  .service__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact__inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer__inner { grid-template-columns: 1fr; }
  /* Without JS, navigation is an ordinary visible flow, not a dead Menu button. */
  html:not(.scope-nav-ready) .nav { position: relative; background: var(--bg); }
  html:not(.scope-nav-ready) .nav__bar { flex-wrap: wrap; }
  html:not(.scope-nav-ready) .nav__primary { position: static; visibility: visible; opacity: 1; transform: none; width: 100%; order: 2; }
  html:not(.scope-nav-ready) .nav__toggle { display: none; }
  html:not(.scope-nav-ready) .hero { padding-top: 40px; }
}
@media (max-width: 600px) {
  .hero__title { font-size: 36px; }
  .hero__lede { font-size: 1rem; }
  .hero__actions .btn { width: 100%; }
  .contents ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; }
  .contents a { font-size: .825rem; }
  .service__list { grid-template-columns: 1fr; }
  .service h2 { font-size: 28px; }
  .contact h2 { font-size: 32px; }
  .contact__actions, .contact__actions .btn { width: 100%; }
}
@media (max-width: 360px) {
  .hero__title { font-size: 32px; }
}
@media (hover: none) {
  .scope-enter { animation-duration: .35s; }
  @keyframes scope-entry { from { opacity: .5; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .nav__primary, .nav.is-open .nav__primary, .btn span, .textlink span { transform: none !important; }
}
/* Current section in jump navigation */
.contents a[aria-current="true"] { color: var(--fg); border-color: var(--red); }
.contents a[aria-current="true"] span { color: var(--red); }

/* Desktop: only the jump band sticks, and only while service sections are on screen (sticky inside .scope-body). */
@media (min-width: 1100px) and (min-height: 640px) {
  .contents { position: sticky; top: 0; z-index: 20; padding: .5rem 0; }
  .contents ol { grid-template-columns: repeat(6, minmax(0, auto)); justify-content: space-between; gap: 0 1.25rem; }
  .contents h2 { padding-top: .8rem; }
  .contents a { border-bottom-color: transparent; white-space: nowrap; }
  .service { scroll-margin-top: 5.5rem; }
}
