/* ==========================================================================
   Ampcrest Electric, portfolio demo (Storefront Digital)
   Neo-Brutalist: safety-yellow + true black + white only, thick black
   outlines, hard offset drop-shadows (no blur), sharp-cornered buttons, a
   hand-built flat bolt icon (not a sourced illustration). Real aesthetic
   touchstone: electrical warning signage / breaker-panel labeling, not a
   generic "bold brutalist SaaS" default. Archivo Black + Work Sans + Space
   Mono for numerals/labels. Hero is wordmark-led (H4, no hero photo), cards
   use a masonry span (C4) so two flagship services get a wider block, nav is
   classic left-logo/right-links (N2), closing is a flat-yellow split photo
   band (E2), not the dark inverted band every prior build used.
   ========================================================================== */

:root {
  --yellow: #F5C518;
  --yellow-deep: #E0B000;
  --black: #0B0B0B;
  --white: #FFFFFF;
  --paper: #FAFAF7;
  --ink-dim: rgba(11, 11, 11, 0.68);
  --ink-faint: rgba(11, 11, 11, 0.48);
  --line: rgba(11, 11, 11, 0.16);

  --radius: 6px;
  --shadow-offset: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.display, .wordmark, .nav-logo, .foot-brand, .section-head h2, .card-body h3, .process-step h3, .quiz-q-label, .cta-copy h2 {
  font-family: 'Archivo Black', 'Work Sans', sans-serif;
}
.mono { font-family: 'Space Mono', ui-monospace, monospace; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- demo notice ---------- */
.demo-notice {
  background: var(--black);
  color: rgba(255,255,255,0.78);
  border-bottom: 3px solid var(--yellow);
  padding: 9px 0;
  font-size: 12.5px;
  text-align: center;
}
.demo-notice a { color: var(--yellow); font-weight: 700; }
.demo-notice a:hover { text-decoration: underline; }
.demo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  margin-right: 8px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  white-space: nowrap;
  vertical-align: 1px;
}

/* ---------- Nav (N2: left logo, right links, hamburger below 900px) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 3px solid var(--black);
}
.nav-bar { display: flex; align-items: center; gap: 1rem; height: 78px; }
.nav-logo {
  font-size: 22px;
  letter-spacing: 0.01em;
  margin-right: auto;
}
.nav-logo .dot { color: var(--yellow-deep); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.nav-links a:not(.btn) { font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; }
.nav-links a:not(.btn):hover { color: var(--yellow-deep); }
.nav-phone { font-weight: 700; }
.nav-toggle { display: none; color: var(--black); }
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-bottom: 3px solid var(--black);
  background: var(--white);
}
.nav:has(details.nav-menu[open]) .nav-drawer { display: flex; }
.nav-drawer a { padding: 11px 4px; font-weight: 700; font-size: 14.5px; border-bottom: 1px solid var(--line); text-transform: uppercase; }
.nav-drawer-phone { color: var(--yellow-deep) !important; }
.nav-drawer-cta { margin-top: 10px; align-self: flex-start; border-bottom: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border: 3px solid var(--black);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--black);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--black); }
.btn:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--black); }
.btn-solid { background: var(--yellow); color: var(--black); }
.btn-outline { background: var(--white); color: var(--black); }
.btn:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

/* ---------- hero (H4: wordmark-led, no hero photo) ---------- */
.hero { position: relative; padding: 84px 0 68px; text-align: center; overflow: hidden; }
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(var(--line) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.hero-wrap { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 18px;
}
.wordmark {
  font-size: 58px;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.wordmark .bolt { flex-shrink: 0; }
.wordmark-sub {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5em;
  margin: 10px 0 0;
  padding-left: 0.5em;
}
.hero .lead {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin: 26px auto 12px;
  max-width: 540px;
}
.hero .sub {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-dim);
  max-width: 520px;
  margin: 0 auto 30px;
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- trust strip ---------- */
.trust-strip { border-bottom: 3px solid var(--black); background: var(--yellow); padding: 13px 0; }
.trust-strip .wrap { display: flex; flex-wrap: wrap; gap: 8px 0; justify-content: center; }
.trust-strip span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}
.trust-strip span:not(:last-child)::after { content: '//'; margin: 0 16px; opacity: 0.5; }

/* ---------- section head ---------- */
.section-head { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); margin: 0 0 10px; }
.section-head h2 { font-size: 30px; letter-spacing: -0.005em; margin: 0 0 12px; }
.section-head p { color: var(--ink-dim); font-size: 15.5px; line-height: 1.6; }

/* ---------- services (C4: masonry, two flagship items span 2) ---------- */
.services { padding: 76px 0; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card {
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--black);
}
.service-card.span-2 { grid-column: span 2; }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--yellow); }
.card-photo::before { content: ''; display: block; padding-top: 75%; }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; border-top: 3px solid var(--black); }
.card-body h3 { font-size: 16.5px; margin: 0 0 8px; line-height: 1.2; }
.card-body p { font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); margin: 0; }

/* ---------- panel risk quiz (Complete-tier custom feature) ---------- */
.quiz { padding: 0 0 76px; }
.quiz-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
  background: var(--white);
  border: 3px solid var(--black);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: 8px 8px 0 var(--black);
}
.quiz-copy h2 { font-size: 26px; margin: 0 0 14px; }
.quiz-copy p { font-size: 15px; line-height: 1.65; color: var(--ink-dim); margin: 0; }
.quiz-q { margin-bottom: 20px; }
.quiz-q-label { font-size: 14px; margin: 0 0 10px; }
.quiz-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-opt {
  padding: 9px 14px;
  border: 2px solid var(--black);
  border-radius: 4px;
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.quiz-opt:hover { background: var(--paper); }
.quiz-opt.selected { background: var(--yellow); }
.quiz-submit { width: 100%; margin-top: 6px; }
.quiz-submit:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: 3px 3px 0 var(--black); transform: none; }
.quiz-result {
  margin-top: 18px;
  padding: 14px 16px;
  border: 2px solid var(--black);
  border-radius: 4px;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.55;
}
.quiz-result.risk-low { background: #E7F5E4; }
.quiz-result.risk-mod { background: var(--yellow); }
.quiz-result.risk-high { background: #FBD3CE; }
.quiz-fine { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-faint); }

/* ---------- process ---------- */
.process { padding: 0 0 76px; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.process-step { text-align: center; padding: 0 8px; }
.step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border: 3px solid var(--black);
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: lining-nums;
}
.process-step h3 { font-size: 16px; margin: 0 0 8px; }
.process-step p { font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); margin: 0; }

/* ---------- pull quote ---------- */
.quote-block { padding: 0 0 76px; }
.quote-block .wrap { max-width: 760px; text-align: center; }
.quote-block blockquote { margin: 0; }
.quote-block blockquote p { font-size: 21px; font-weight: 600; line-height: 1.45; margin: 0 0 16px; }
.quote-cite { font-size: 13px; color: var(--ink-faint); font-family: 'Space Mono', monospace; }
.quote-cite b { color: var(--black); font-weight: 700; font-family: 'Work Sans', sans-serif; }

/* ---------- CTA band (E2: flat yellow split photo band, not dark-inverted) ---------- */
.cta-band { background: var(--yellow); border-top: 3px solid var(--black); border-bottom: 3px solid var(--black); padding: 0; }
.cta-split { display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: stretch; padding: 0 !important; max-width: 100%; }
.cta-photo { position: relative; min-height: 260px; border-right: 3px solid var(--black); }
.cta-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-copy { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.cta-copy h2 { font-size: 28px; margin: 0 0 10px; line-height: 1.15; }
.cta-copy p { font-size: 14.5px; margin: 0 0 20px; }
.cta-copy .btn-row { justify-content: flex-start; }

/* ---------- footer ---------- */
footer { padding: 46px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 30px; border-bottom: 3px solid var(--black); }
.foot-brand { font-size: 19px; }
.foot-brand + p { font-size: 13px; color: var(--ink-faint); margin-top: 10px; line-height: 1.6; max-width: 220px; }
.foot-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 0 0 12px; }
.foot-col div, .foot-col a { display: block; font-size: 13.5px; color: var(--ink-dim); margin-bottom: 7px; }
.foot-col a:hover { color: var(--yellow-deep); }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 20px; font-size: 12px; color: var(--ink-faint); }
.foot-bottom a { color: var(--black); font-weight: 700; }

/* ---------- responsive (checked at ~375 / ~800 / ~1440) ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .quiz-wrap { grid-template-columns: 1fr; padding: 28px; }
  .process-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-split { grid-template-columns: 1fr; }
  .cta-photo { min-height: 200px; border-right: none; border-bottom: 3px solid var(--black); }
  .cta-copy { padding: 36px 28px; }
}
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .wordmark { font-size: 38px; }
  .wordmark .bolt { width: 26px; height: 36px; }
  .wordmark-sub { font-size: 12px; letter-spacing: 0.36em; }
  .hero .lead { font-size: 17px; }
  .section-head h2 { font-size: 23px; }
  .card-grid { grid-template-columns: 1fr; }
  .service-card.span-2 { grid-column: span 1; }
}
@media (max-width: 480px) {
  .foot-grid { grid-template-columns: 1fr; }
}


/* --- Accessibility baseline (Web Interface Guidelines) --- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-200%);
}
.skip-link:focus { outline: none; }
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
[id] {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Safe-area gutters on sticky chrome; contain scroll chaining in drawers/overlays */
.nav, .nav-min, .masthead, .bar {
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
.nav-drawer {
  overscroll-behavior: contain;
}

/* --- Web Interface Guidelines extras --- */
a, button, summary, input, select, textarea, label, [role="button"], [role="tab"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}
h1, h2, h3 { text-wrap: pretty; }
