/* Joe Domzalski Electrical Contractor LLC. One stylesheet for the whole page.
   Layout steps: phone first, tablet from 700px, desktop from 960px.
   Type: Besley italic for headings (close to the lettering on his logo), Hanken Grotesk for text.
   Both SIL Open Font License, latin subset, served from this folder. */
@font-face { font-family: "Besley"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("fonts/besley-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/hanken-grotesk-latin.woff2") format("woff2"); }

:root {
  --navy: #0a1330;
  --navy-2: #121d44;
  --ink: #0d1428;
  --text: #3b4458;
  --muted: #5d667a;
  --paper: #ffffff;
  --mist: #f3f5f9;
  --line: #e2e6ee;
  --yellow: #ffc421;
  --font: "Hanken Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Besley", Georgia, "Times New Roman", serif;
  --pad: 20px;      /* side gutter */
  --sec: 64px;      /* section top and bottom */
  --gap: 28px;      /* heading to content */
  --r: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3, .facts b, .contact .number { font-family: var(--display); font-style: italic; font-weight: 800; letter-spacing: -0.022em; line-height: 1.05; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--pad); }

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 24px; border-radius: 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.btn svg { flex: none; width: 19px; height: 19px; }
.btn-call { background: var(--yellow); color: var(--navy); }
.btn-call:hover { background: #ffd24f; }
.btn-line { border: 1.5px solid rgba(255, 255, 255, 0.7); color: #fff; }
.btn-line:hover { background: rgba(255, 255, 255, 0.1); }

/* Header, sits on top of the hero photo */
.top { position: absolute; top: 0; right: 0; left: 0; z-index: 3; padding-top: env(safe-area-inset-top, 0px); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.mark { display: block; }
.mark b { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 21px; letter-spacing: -0.01em; line-height: 1.1; white-space: nowrap; }
.mark span { display: block; font-size: 13px; opacity: 0.85; white-space: nowrap; }
.top nav { display: none; }
.top nav a { margin-left: 28px; font-size: 15px; font-weight: 500; opacity: 0.9; }
.top nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.pill { display: flex; flex: none; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 8px; background: rgba(10, 19, 48, 0.55); font-size: 15px; font-weight: 600; white-space: nowrap; }
.pill svg { width: 15px; height: 15px; }
.pill .num { display: none; }

/* Hero */
.hero { position: relative; display: flex; align-items: flex-end; min-height: 100vh; min-height: 100svh; overflow: hidden; background: var(--navy); color: #fff; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero picture img { object-fit: cover; object-position: 50% 30%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 19, 48, 0.62) 0, rgba(10, 19, 48, 0) 160px); }
/* The dark shade is tied to the text block, not to the photo height, so the words stay readable on short screens. */
.hero .wrap::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(10, 19, 48, 0) 0, rgba(10, 19, 48, 0.62) 96px, rgba(10, 19, 48, 0.82) 170px, rgba(10, 19, 48, 0.94) 60%, rgba(10, 19, 48, 0.98) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 112px; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
.place { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; }
.place::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.hero h1 { margin-top: 14px; font-size: clamp(2.6rem, 11.6vw, 5.6rem); line-height: 1; }
.hero .lede { max-width: 31em; margin-top: 16px; font-size: 17px; opacity: 0.9; }
.cta { display: grid; gap: 10px; margin-top: 26px; }
.assure { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; font-size: 13.5px; opacity: 0.88; }
.assure li { display: flex; align-items: center; gap: 7px; }
.assure svg { flex: none; width: 14px; height: 14px; color: var(--yellow); }

/* Facts strip */
.facts { border-bottom: 1px solid var(--line); }
.facts ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.facts li { padding: 22px 0 20px; border-bottom: 1px solid var(--line); }
.facts li:nth-child(odd) { padding-right: 16px; }
.facts li:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
.facts li:nth-last-child(-n + 2) { border-bottom: 0; }
.facts b { display: block; font-size: clamp(17px, 4.7vw, 26px); line-height: 1.1; }
.facts span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* Sections */
section { padding: var(--sec) 0; }
.mist { background: var(--mist); }
.head h2, .contact h2 { font-size: clamp(2rem, 8.4vw, 3rem); }
.head .sub { max-width: 34em; margin-top: 14px; color: var(--muted); }

/* What we do: photo tiles. A swipe row on phones, a grid everywhere else. */
.rail { display: flex; gap: 12px; margin-top: var(--gap); padding: 0 var(--pad) 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.tile { position: relative; display: flex; flex: 0 0 84%; align-items: flex-end; min-height: 440px; overflow: hidden; border-radius: var(--r); background: var(--navy); color: #fff; scroll-snap-align: start; }
.tile picture { position: absolute; inset: 0; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 19, 48, 0) 14%, rgba(10, 19, 48, 0.8) 50%, rgba(10, 19, 48, 0.97) 100%); }
.tile div { position: relative; z-index: 1; width: 100%; padding: 22px; }
.tile h3 { font-size: clamp(24px, 6.4vw, 30px); }
.tile ul { margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.26); }
.tile li { padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.16); font-size: 15px; }
.tile li:last-child { border-bottom: 0; padding-bottom: 0; }
.hint { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 0 var(--pad); color: var(--muted); font-size: 13.5px; }
.hint svg { width: 16px; height: 16px; }
/* With a mouse there is nothing to swipe, so the tiles stack instead. */
@media (hover: hover) and (pointer: fine) {
  .rail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; overflow: visible; padding-bottom: 0; }
  .tile { min-height: 380px; }
  .hint { display: none; }
}

/* Registered for public work */
.rows { margin-top: var(--gap); border-top: 1px solid var(--line); }
.rows div { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rows dt { font-weight: 700; }
.rows dd { color: var(--muted); }

/* About and service area */
.about .text p { margin-top: 18px; color: var(--text); }
.about .hire { margin-top: 22px; padding: 14px 16px; border-radius: 8px; background: rgba(10, 19, 48, 0.06); font-weight: 500; }
.about .hire a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.card { margin-top: 36px; padding: 28px 24px 26px; border-radius: var(--r); background: var(--navy); color: #fff; scroll-margin-top: 24px; }
.card h3 { font-size: clamp(26px, 7vw, 32px); }
.card ul { margin-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.26); }
.card li { padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.16); font-weight: 500; }
.card p { margin-top: 16px; font-size: 14.5px; opacity: 0.78; }

/* Contact */
.contact { padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); background: var(--navy); color: #fff; }
.contact .kicker { color: var(--yellow); font-size: 14px; font-weight: 600; }
.contact h2 { margin-top: 10px; }
.contact .number { display: block; margin-top: 20px; font-size: clamp(2.3rem, 11vw, 4rem); line-height: 1; color: var(--yellow); white-space: nowrap; }
.contact .sub { margin-top: 14px; opacity: 0.84; }
form { display: grid; gap: 12px; margin-top: 32px; }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 500; }
input, textarea { width: 100%; padding: 15px 16px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 8px; background: rgba(255, 255, 255, 0.07); color: #fff; font: inherit; font-size: 16px; }
textarea { min-height: 104px; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
input:focus, textarea:focus { outline: 2px solid var(--yellow); outline-offset: 1px; }
form .btn { margin-top: 6px; border: 0; cursor: pointer; font-family: inherit; }
.details { display: grid; margin-top: 44px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.details div { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.details b { display: block; font-size: 13.5px; font-weight: 500; opacity: 0.7; }
.details p { margin-top: 5px; overflow-wrap: anywhere; }
.fine { margin-top: 30px; font-size: 13px; opacity: 0.62; }

/* Call bar on phones and tablets */
.bar { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: 12px; z-index: 10; display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px; max-width: 520px; margin: 0 auto; padding: 8px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; background: var(--navy); box-shadow: 0 14px 40px rgba(6, 12, 32, 0.34); transition: transform 0.3s ease, opacity 0.2s ease; }
.bar .btn { min-height: 50px; padding: 0 12px; font-size: 16px; }
.js .bar { transform: translateY(140%); opacity: 0; }
.js .bar.on { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .bar { transition: none; } }

/* Tablet */
@media (min-width: 700px) {
  :root { --pad: 32px; --sec: 84px; --gap: 36px; }
  .hero { min-height: clamp(640px, 100vh, 860px); }
  .hero picture img { object-position: 50% 35%; }
  .hero .wrap { padding-bottom: 64px; }
  .hero h1 { max-width: 8.6em; font-size: clamp(4rem, 8.4vw, 5.6rem); }
  .hero .lede { font-size: 19px; }
  .cta { grid-template-columns: auto auto; justify-content: start; gap: 12px; }
  .cta .btn { min-height: 58px; padding: 0 28px; }
  .pill .num { display: inline; }
  .pill .word { display: none; }
  .facts li { padding: 28px 0 26px; }
  .facts li:nth-child(odd) { padding-right: 24px; }
  .facts li:nth-child(even) { padding-left: 28px; }
  .facts b { font-size: 28px; }
  .head h2, .contact h2 { font-size: clamp(2.5rem, 5.6vw, 3rem); }
  /* Three across. The tiles share one set of rows, so the headings and the lists line up. */
  .rail, .rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(150px, 1fr) auto auto; gap: 0 14px; min-height: clamp(410px, 48vw, 480px); max-width: 1160px; margin-right: auto; margin-left: auto; padding-bottom: 0; overflow: visible; }
  .tile, .tile { display: grid; grid-row: span 3; grid-template-rows: subgrid; min-height: 0; }
  .tile div { display: contents; }
  .tile h3, .tile ul { position: relative; z-index: 1; }
  .tile h3 { grid-row: 2; align-self: end; padding: 0 18px; }
  .tile ul { grid-row: 3; align-self: start; margin: 14px 18px 18px; }
  .tile h3 { font-size: clamp(21px, 2.5vw, 28px); }
  .tile li { font-size: 14.5px; }
  .hint { display: none; }
  .card { padding: 36px 34px 32px; }
  .contact .number { font-size: clamp(3rem, 7vw, 4rem); }
  .details { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; }
  .details div { padding: 22px 24px 0 0; border-bottom: 0; }
}

/* Desktop */
@media (min-width: 960px) {
  :root { --pad: 40px; --sec: 104px; --gap: 44px; }
  body { font-size: 18px; }
  .bar { display: none; }
  .top .wrap { height: 88px; }
  .top nav { display: block; }
  .hero::after { background: linear-gradient(180deg, rgba(10, 19, 48, 0.6) 0, rgba(10, 19, 48, 0) 170px), linear-gradient(90deg, rgba(10, 19, 48, 0.94) 0%, rgba(10, 19, 48, 0.82) 50%, rgba(10, 19, 48, 0.1) 86%); }
  .hero .wrap::before { display: none; }
  .hero .wrap { padding-bottom: 84px; }
  .hero .lede { max-width: 26em; font-size: 20px; }
  .cta .btn { min-height: 60px; padding: 0 30px; }
  .facts ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts li, .facts li:nth-child(odd), .facts li:nth-child(even) { padding: 34px 20px 32px; border-bottom: 0; border-left: 1px solid var(--line); }
  .facts li:first-child { padding-left: 0; border-left: 0; }
  .facts b { font-size: clamp(20px, 2vw, 24px); }
  .facts span { font-size: 14.5px; }
  .rail, .rail { gap: 0 16px; }
  .tile h3 { padding: 0 22px; }
  .tile ul { margin: 14px 22px 22px; }
  .public .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
  .public .rows { margin-top: 8px; }
  .about .cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 72px; align-items: center; }
  .card { margin-top: 0; padding: 44px 44px 40px; }
  .contact { padding-bottom: var(--sec); }
  .contact .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
  .contact .number { font-size: clamp(2.6rem, 4.6vw, 4rem); }
  form { margin-top: 0; }
  .details { margin-top: 72px; }
}

/* Launch 11-17: real estimate form */
#estimate .hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
#estimate .opt{font-weight:400;opacity:.7}
#estimate .status{margin:.75rem 0 0;min-height:1.5em;font-weight:600}
#estimate .status.bad{color:#ffb4ab}
#estimate button[disabled]{opacity:.6;cursor:progress}
.contact .alt{display:grid;gap:12px;align-content:start;margin-top:20px}
[hidden]{display:none !important}
