/* ============================================================
   ELECTRICAL — Swiss/International typographic template
   Strict grid · dramatic type scale · all-caps subheads
   Safety yellow + black · rules as structure · no shadows
   Presets: 1 Signal · 2 Blackout · 3 Yellow Field · 4 Graphite
   ============================================================ */

:root {
  --font-display: "Archivo", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --rule-w: 2px;
  --rule-heavy: 8px;
}

/* ---------- preset palettes + structural switches ---------- */

/* 1 · SIGNAL — white field, black type, yellow accents, ruled rows */
body.preset-1 {
  --bg: #ffffff;
  --bg-alt: #f4f4f2;
  --ink: #0a0a0a;
  --accent: #ffd100;
  --accent-ink: #0a0a0a;
  --rule: #0a0a0a;
  --muted: #4c4c4c;
}

/* 2 · BLACKOUT — black field, yellow rules, inverted, centered hero */
body.preset-2 {
  --bg: #0c0c0c;
  --bg-alt: #161616;
  --ink: #f5f5f2;
  --accent: #ffd100;
  --accent-ink: #0c0c0c;
  --rule: #ffd100;
  --muted: #9d9d97;
}

/* 3 · YELLOW FIELD — yellow hero block, white sections, boxed grid */
body.preset-3 {
  --bg: #ffffff;
  --bg-alt: #fff8d6;
  --ink: #111111;
  --accent: #ffce00;
  --accent-ink: #111111;
  --rule: #111111;
  --muted: #494949;
}

/* 4 · GRAPHITE — cool grey field, hairline rules, outlined cards */
body.preset-4 {
  --bg: #e9e9e7;
  --bg-alt: #dededb;
  --ink: #161616;
  --accent: #f7c600;
  --accent-ink: #161616;
  --rule: #161616;
  --muted: #50504d;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

a { color: inherit; }

/* ---------- header ---------- */

.site-head {
  border-bottom: var(--rule-w) solid var(--rule);
  background: var(--bg);
}

.head-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.head-mark {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 15px;
}

.head-call {
  font-family: var(--font-mono);
  font-size: 14px;
  text-decoration: none;
  border: var(--rule-w) solid var(--rule);
  padding: 10px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.head-call:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--rule); }

/* ---------- hero ---------- */

.hero { padding: 56px 0 0; }

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-name {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-size: clamp(44px, 12vw, 110px);
  max-width: 14ch;
}

.hero-tagline {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 500;
  max-width: 38ch;
  color: var(--muted);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 48px;
}

.hero-rule {
  height: var(--rule-heavy);
  background: var(--accent);
  border-top: var(--rule-w) solid var(--rule);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: var(--rule-w) solid var(--rule);
  transition: background 0.15s linear, color 0.15s linear;
}

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--accent); color: var(--accent-ink); }

.btn-big { font-size: 18px; padding: 16px 28px; }

/* ---------- sections ---------- */

section { padding: 56px 0; border-bottom: var(--rule-w) solid var(--rule); }

.sec-head {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(28px, 6vw, 44px);
  margin-bottom: 32px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.sec-index {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.45em;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ---------- services ---------- */

.svc-list { list-style: none; counter-reset: svc; }

.svc-row {
  counter-increment: svc;
  border-top: var(--rule-w) solid var(--rule);
  padding: 22px 0 22px 56px;
  position: relative;
  transition: padding-left 0.15s linear;
}

.svc-row::before {
  content: counter(svc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}

.svc-row:hover { background: var(--bg-alt); }

.svc-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.svc-blurb { margin-top: 6px; color: var(--muted); max-width: 52ch; }

/* ---------- about ---------- */

.about-text { font-size: 19px; line-height: 1.6; max-width: 56ch; }

.dist-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.dist-item {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: var(--rule-w) solid var(--rule);
  padding: 9px 14px;
}

/* ---------- hours ---------- */

.hours-body { display: grid; gap: 24px; }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 6px;
}

.value { font-size: 19px; font-weight: 500; }

.map-link { text-decoration-thickness: var(--rule-w); text-underline-offset: 4px; }
.map-link:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- contact ---------- */

.contact-pitch { font-size: 19px; color: var(--muted); margin-bottom: 28px; max-width: 40ch; }

.contact-links { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }

/* ---------- footer ---------- */

.site-foot {
  padding: 28px 0 36px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.foot-grid { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

.foot-addr { color: var(--muted); }

/* ============================================================
   STRUCTURAL PRESET VARIATIONS
   ============================================================ */

/* 2 · BLACKOUT — centered monumental hero, yellow rules everywhere */
body.preset-2 .hero { text-align: center; padding-top: 72px; }
body.preset-2 .hero-name { margin-left: auto; margin-right: auto; }
body.preset-2 .hero-tagline { margin-left: auto; margin-right: auto; }
body.preset-2 .hero-cta-row { justify-content: center; }
body.preset-2 .hero-rule { background: var(--accent); border-top: none; }
body.preset-2 .sec-head { justify-content: center; }
body.preset-2 .about-grid, body.preset-2 .hours-grid { text-align: center; }
body.preset-2 .about-text, body.preset-2 .contact-pitch { margin-left: auto; margin-right: auto; }
body.preset-2 .dist-list, body.preset-2 .contact-links { justify-content: center; }
body.preset-2 .svc-row { padding-left: 0; text-align: center; }
body.preset-2 .svc-row::before { position: static; display: block; margin-bottom: 6px; }
body.preset-2 .svc-blurb { margin-left: auto; margin-right: auto; }
body.preset-2 .btn-primary:hover { background: var(--bg); color: var(--ink); border-color: var(--accent); }

/* 3 · YELLOW FIELD — yellow hero slab, boxed service grid */
body.preset-3 .hero { background: var(--accent); color: var(--accent-ink); padding-top: 64px; }
body.preset-3 .hero .kicker, body.preset-3 .hero .hero-tagline { color: var(--accent-ink); }
body.preset-3 .hero-rule { background: var(--ink); }
body.preset-3 .btn-primary { background: var(--ink); color: var(--accent); }
body.preset-3 .hero .btn-primary:hover { background: var(--bg); color: var(--ink); }
body.preset-3 .svc-list {
  display: grid;
  gap: 0;
  border: var(--rule-w) solid var(--rule);
}
body.preset-3 .svc-row { border-top: none; padding: 22px 20px 22px 64px; }
body.preset-3 .svc-row + .svc-row { border-top: var(--rule-w) solid var(--rule); }
body.preset-3 .svc-row::before { left: 20px; }
body.preset-3 .about { background: var(--bg-alt); }

/* 4 · GRAPHITE — outlined card services, offset section heads */
body.preset-4 .hero { padding-top: 72px; }
body.preset-4 .hero-rule { background: var(--ink); }
body.preset-4 section { border-bottom-width: 1px; }
body.preset-4 .site-head { border-bottom-width: 1px; }
body.preset-4 .svc-list { display: grid; gap: 16px; }
body.preset-4 .svc-row {
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 22px 20px 22px 64px;
}
body.preset-4 .svc-row::before { left: 20px; }
body.preset-4 .svc-row:hover { background: var(--accent); }
body.preset-4 .svc-row:hover .svc-blurb { color: var(--accent-ink); }
body.preset-4 .contact { background: var(--bg-alt); }
body.preset-4 .dist-item, body.preset-4 .head-call, body.preset-4 .btn { border-width: 1px; }

/* ---------- wider screens ---------- */

@media (min-width: 640px) {
  .contact-links { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .hours-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 880px) {
  .wrap { padding-left: 32px; padding-right: 32px; }
  section { padding: 80px 0; }
  .hero { padding-top: 88px; }

  .about-grid, .hours-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
  }
  .about-grid .sec-head, .hours-grid .sec-head { margin-bottom: 0; }
  body.preset-2 .about-grid, body.preset-2 .hours-grid { display: block; }

  body.preset-3 .svc-list, body.preset-4 .svc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.preset-3 .svc-row + .svc-row { border-top: none; }
  body.preset-3 .svc-row { border-top: var(--rule-w) solid var(--rule); }
  body.preset-3 .svc-row:nth-child(-n+2) { border-top: none; }
  body.preset-3 .svc-row:nth-child(odd) { border-right: var(--rule-w) solid var(--rule); }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .kicker, .hero-name, .hero-tagline, .hero-cta-row {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero-name { animation-delay: 0.08s; }
  .hero-tagline { animation-delay: 0.16s; }
  .hero-cta-row { animation-delay: 0.24s; }

  @keyframes ruleGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .hero-rule { transform-origin: left; animation: ruleGrow 0.7s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

  .btn:active { transform: translateY(1px); }
}

/* ============================================================
   v3 LAYER — v2 interactivity + 2026 trends
   (color variable values above are contrast-audited — do not edit)
   ============================================================ */

/* better rag + fluid rhythm */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
section { padding-top: clamp(56px, 9vw, 80px); padding-bottom: clamp(56px, 9vw, 80px); }

/* ---------- sticky emergency call bar ---------- */
.em-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--bg);
  border-bottom: var(--rule-w) solid var(--rule);
}
.em-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.em-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.em-call {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  flex: none;
  transition: background 0.15s linear, color 0.15s linear;
}
.em-call:hover { background: var(--bg); color: var(--ink); }

/* ---------- open-now badge (square dot — Swiss, no rounding) ---------- */
.open-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: var(--rule-w) solid var(--rule);
  padding: 9px 14px;
}
.open-dot { width: 10px; height: 10px; background: var(--muted); flex: none; }
.open-now.is-open .open-dot { background: var(--accent); box-shadow: inset 0 0 0 1px var(--rule); }
body.preset-3 .hero .open-now { border-color: var(--accent-ink); color: var(--accent-ink); }

/* ---------- image slots (enhance only — page complete without them) ---------- */
.media { margin: 36px 0 12px; }
.media-about { margin: 32px 0 0; }
/* gradient border shell, Swiss edition: hard-stop diagonal accent frame */
.media-shell {
  display: block;
  padding: var(--rule-w);
  background: linear-gradient(135deg, var(--accent) 0 30%, var(--rule) 30% 100%);
}
.media-shell img { display: block; width: 100%; height: auto; }

/* ---------- contact gradient border shell ---------- */
.shell {
  padding: var(--rule-w);
  background: var(--rule);
  background: linear-gradient(145deg, var(--accent) 0 22%, var(--rule) 22% 100%);
}
.shell-inner { background: var(--bg); padding: clamp(22px, 5vw, 44px); }
.shell-inner .contact-pitch { margin-bottom: 24px; }
body.preset-2 .shell-inner { background: var(--bg-alt); }

/* ---------- grid-break: ghost section index overlapping contact ---------- */
@media (min-width: 880px) {
  .contact { position: relative; overflow: hidden; }
  .contact::before {
    content: "04";
    position: absolute;
    top: -0.16em;
    right: -0.04em;
    font-family: var(--font-mono);
    font-size: clamp(140px, 22vw, 240px);
    font-weight: 500;
    line-height: 1;
    color: var(--rule);
    opacity: 0.08;
    pointer-events: none;
  }
  .contact .wrap { position: relative; }
}

/* ---------- reveals + kinetic moment ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  html.js .reveal.in { opacity: 1; transform: none; }

  /* scroll-driven reveals replace the IO path when supported (JS skips IO) */
  @supports (animation-timeline: view()) {
    html.js .reveal {
      opacity: 1;
      transform: none;
      transition: none;
      animation: v3rise both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }

  /* kinetic type moment: hero name condenses into place (transform-only) */
  @keyframes snapIn {
    from { opacity: 0; transform: scaleX(1.12) translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  .hero-name { transform-origin: left bottom; animation: snapIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s both; }
  body.preset-2 .hero-name { transform-origin: center bottom; }
}
@keyframes v3rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
