/* JIT Construction Co. Tokens come from DESIGN.md; change them there first. */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-condensed-700.woff2") format("woff2"); }

:root {
  /* colors */
  --oxblood: #440000;
  --safety-orange: #FF9F00;
  --primer: #F2F2EF;
  --ink: #1E1B1A;
  --stud-grey: #67625E;
  --error: #A01B00;
  /* type */
  --font-body: "Barlow", system-ui, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --display-size: 88px;
  --h1-size: 56px;
  --h2-size: 40px;
  --h3-size: 26px;
  --body-size: 18px;
  --label-size: 16px;
  /* shape and space */
  --rounded-sm: 2px;
  --rounded-lg: 0px;
  --gutter: 20px;
  --section: 88px;
  --page-max: 1200px;
}

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

body {
  margin: 0;
  background: var(--primer);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: 400;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--oxblood); margin: 0; }
h1 { font-size: var(--h1-size); font-weight: 700; line-height: 1; }
h2 { font-size: var(--h2-size); font-weight: 700; line-height: 1.05; }
h3 { font-size: var(--h3-size); font-weight: 600; line-height: 1.1; }

a { color: var(--oxblood); }
a:hover { color: var(--ink); }

img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- layout ---------- */
.wrap { max-width: var(--page-max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-bottom: var(--section); }
.center { text-align: center; }
.intro { margin: 0 auto 24px; max-width: 34em; }
.muted { color: var(--stud-grey); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[id] { scroll-margin-top: 16px; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 30; background: var(--safety-orange); color: var(--oxblood); padding: 12px 16px; font-weight: 600; }
.skip:focus { left: 16px; }
h2.section-title { margin: 0 0 24px; text-align: center; }
h2.section-title.tight { margin-bottom: 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font: inherit; font-weight: 600; text-decoration: none; border-radius: var(--rounded-sm); cursor: pointer; }
.btn-primary { background: var(--safety-orange); color: var(--oxblood); padding: 14px 22px; border: 0; }
.btn-secondary { background: var(--primer); color: var(--oxblood); padding: 12px 20px; border: 2px solid var(--oxblood); }
.btn-on-dark { background: var(--oxblood); color: var(--primer); padding: 12px 20px; border: 2px solid var(--primer); }
.btn:hover { color: var(--oxblood); filter: brightness(0.95); }
.btn-on-dark:hover { color: var(--primer); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- header ---------- */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.logo { display: block; line-height: 0; }
.logo img { width: 171px; height: 64px; object-fit: contain; }
.nav-desktop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; }
.nav-list > li > a { display: inline-block; padding: 10px 0; text-decoration: none; }
.header-call { font-size: 16px; padding: 12px 20px; }
.header-actions { display: none; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.services { position: relative; }
.services > summary { display: inline-block; padding: 10px 0; color: var(--oxblood); }
.caret { display: inline-block; margin-left: 4px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--oxblood); vertical-align: middle; }
.services > ul, .phone-menu > ul { list-style: none; margin: 0; padding: 6px 0; background: var(--primer); border: 2px solid var(--oxblood); border-radius: var(--rounded-sm); }
.services > ul { position: absolute; top: 100%; left: -16px; z-index: 20; min-width: 240px; }
.services > ul a, .phone-menu > ul a { display: block; padding: 10px 16px; color: var(--oxblood); font-weight: 600; text-decoration: none; }
.services > ul a[aria-current="page"], .phone-menu > ul a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
.phone-menu { position: relative; }
.phone-menu > summary { font-weight: 600; color: var(--oxblood); padding: 10px 14px; border: 2px solid var(--oxblood); border-radius: var(--rounded-sm); }
.phone-menu > ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 260px; }
.phone-menu .menu-divider { border-top: 1px solid var(--stud-grey); margin: 6px 0; }
@media (max-width: 699px) {
  .nav-desktop { display: none; }
  .header-actions { display: flex; align-items: center; gap: 10px; }
  .site-header { gap: 12px; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--oxblood); color: var(--primer); }
.site-footer a { color: var(--primer); font-weight: 600; }
.site-footer a:hover { color: var(--safety-orange); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; padding-top: 48px; padding-bottom: 24px; }
.footer-cols > * { min-width: 0; }
.footer-cols p { margin: 0; }
.footer-cols .gap-top { margin-top: 8px; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 28px; }
.footer-cols .footer-name { margin-bottom: 8px; }
.footer-about { flex: 1 1 280px; }
.footer-contact { flex: 1 1 240px; }
.footer-nav { flex: 1 1 200px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-nav a { display: inline-block; padding: 8px 0; font-weight: 400; }
.footer-credit { padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--primer); font-size: 16px; }
.footer-credit p { margin: 0; }

/* ---------- phone call bar ---------- */
.callbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--safety-orange); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
.callbar a { flex: 1 1 0; text-align: center; font-weight: 600; text-decoration: none; padding: 12px 8px; border: 2px solid var(--oxblood); border-radius: var(--rounded-sm); color: var(--oxblood); }
.callbar a.dark { background: var(--oxblood); color: var(--primer); }
@media (max-width: 767px) {
  .callbar { display: flex; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ---------- home ---------- */
.hero { padding-top: 48px; }
.hero-text { max-width: 920px; margin: 0 auto 48px; text-align: center; container-type: inline-size; }
.hero h1 { font-size: clamp(44px, 11cqi, 88px); line-height: 0.95; margin-bottom: 24px; letter-spacing: -0.01em; }
.license { margin: 0 auto 20px; font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.15; }
.lede { margin: 0 auto 16px; max-width: 34em; font-size: 20px; }
.hours { margin: 0 auto 32px; max-width: 40em; font-size: 16px; }
.photo-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.photo-row figure { margin: 0; min-width: 0; flex: 1 1 220px; }
.photo-row figure.wide { flex: 2 1 440px; }
.photo-row img { display: block; width: 100%; height: auto; object-fit: cover; aspect-ratio: 8 / 9; }
.photo-row figure.wide img { aspect-ratio: 16 / 9; }
figcaption, .caption { margin-top: 8px; font-size: 16px; color: var(--stud-grey); }
.service-rows { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--stud-grey); }
.service-rows > li { border-top: 1px solid var(--stud-grey); }
.service-rows a { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 0; text-decoration: none; color: var(--ink); }
.service-rows picture { flex: none; }
.service-rows img { width: 144px; height: 96px; object-fit: cover; display: block; }
.service-rows .row-text { flex: 1 1 320px; min-width: 0; }
.row-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.1; color: var(--oxblood); }
.row-text > span:last-child { display: block; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.steps li { border-top: 4px solid var(--oxblood); padding-top: 12px; }
.step-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--oxblood); }
.steps li > span:last-child { display: block; }
.area { background: var(--oxblood); color: var(--primer); }
.area .wrap { padding-top: 64px; padding-bottom: 64px; }
.area h2 { color: var(--primer); margin-bottom: 12px; }
.area-intro { margin: 0 auto 32px; max-width: 40em; text-align: center; }
.area-intro p { margin: 0; }
.cities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 32px; font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1.25; }
.cities li { border-bottom: 2px solid var(--primer); padding: 6px 0; }
.reviews { padding-top: var(--section); text-align: center; }
.reviews h2 { margin-bottom: 12px; }
.reviews p { margin: 0 auto 20px; max-width: 34em; }

/* ---------- estimate form ---------- */
.estimate-head { margin: 0 auto 32px; max-width: 34em; text-align: center; }
.estimate-head h2 { margin-bottom: 12px; }
.estimate-head p { margin: 0; }
.estimate-cols { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.estimate-cols > div { min-width: 0; }
.estimate-contact { flex: 1 1 320px; }
.estimate-contact p { margin: 0 0 12px; }
.estimate-contact a { font-weight: 600; }
.estimate-form-col { flex: 1 1 460px; }
.estimate-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 16px; }
.field input, .field select, .field textarea { font: inherit; padding: 12px; border: 2px solid var(--stud-grey); border-radius: var(--rounded-sm); background: #FFFFFF; color: var(--ink); min-height: 48px; width: 100%; }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 0; color: var(--error); font-size: 16px; font-weight: 600; }
.form-note { margin: 0; font-size: 16px; }
.result { border: 2px solid var(--oxblood); padding: 24px; border-radius: var(--rounded-sm); }
.result-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 28px; color: var(--oxblood); }
.result p { margin: 0 0 16px; }
.result.failed { border-color: var(--error); }
[hidden] { display: none !important; }

/* ---------- service pages ---------- */
.service-hero { padding-top: 32px; padding-bottom: 64px; }
.back { margin: 0 0 24px; font-size: 16px; }
.back a { font-weight: 600; }
.service-intro { max-width: 920px; margin: 0 auto; text-align: center; container-type: inline-size; }
.service-intro h1 { font-size: clamp(44px, 10cqi, 80px); line-height: 0.95; margin-bottom: 20px; letter-spacing: -0.01em; }
.service-intro .lede { margin-bottom: 28px; }
.build-list { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 32px; }
.build-list li { border-bottom: 1px solid var(--stud-grey); padding: 12px 0; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 20px; }
.gallery.single { max-width: 760px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); }
.gallery a { display: block; cursor: zoom-in; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .caption { margin: 8px 0 0; }
.band { background: var(--oxblood); color: var(--primer); }
.band-inner { max-width: 760px; margin: 0 auto; padding: 64px var(--gutter); text-align: center; }
.band h2 { color: var(--primer); margin-bottom: 12px; }
.band p { margin: 0 auto 24px; max-width: 34em; }
.band + .site-footer { border-top: 1px solid var(--primer); }

/* ---------- photo viewer ---------- */
dialog#viewer { border: 0; padding: 20px; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(30, 27, 26, 0.94); color: var(--primer); }
dialog#viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
dialog#viewer::backdrop { background: rgba(30, 27, 26, 0.94); }
dialog#viewer img { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; object-fit: contain; }
dialog#viewer p { margin: 0; max-width: 40em; text-align: center; }
.viewer-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.viewer-buttons button { font: inherit; font-weight: 600; min-height: 44px; border-radius: var(--rounded-sm); cursor: pointer; background: var(--ink); color: var(--primer); border: 2px solid var(--primer); padding: 10px 18px; }
.viewer-buttons button.close { background: var(--safety-orange); color: var(--oxblood); border: 0; padding: 12px 20px; }
