:root {
  color-scheme: light;
  --black: #0a0a0a;
  --ink: #171717;
  --muted: #5f6368;
  --line: #dedede;
  --yellow: #f8c400;
  --yellow-dark: #d7a900;
  --white: #ffffff;
  --soft: #f6f6f4;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--yellow); padding: 8px 12px; }
.skip-link:focus { left: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 78px;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 900; min-width: max-content; }
.brand img { width: 68px; height: 68px; object-fit: contain; flex: 0 0 auto; }
.brand-text { display: grid; gap: 2px; line-height: 1.02; }
.brand-text strong { font-size: clamp(1.16rem, 1.7vw, 1.55rem); letter-spacing: 0; color: var(--black); }
.brand-text small { color: var(--muted); font-size: .73rem; font-weight: 800; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.nav-links a { text-decoration: none; color: #282828; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.mobile-call { display: none; }

.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 2px solid var(--black);
  border-radius: 4px;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
}
.button.secondary { background: var(--black); color: var(--white); border-color: var(--black); }
.button.ghost { background: var(--white); color: var(--black); }

.hero {
  min-height: calc(100svh - 72px);
  background: linear-gradient(90deg, rgba(0,0,0,.84), rgba(0,0,0,.45)), url("/assets/residential-driveway-seal-coating.webp") center/cover;
  color: var(--white);
  display: grid;
  align-items: center;
  padding: 48px 20px 78px;
}
.hero-inner { width: min(var(--max), 100%); margin: 0 auto; }
.hero-brand-panel {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 22px;
  padding: 12px 16px 12px 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(0,0,0,.58);
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
  backdrop-filter: blur(8px);
}
.hero-brand-panel img { width: 74px; height: 74px; object-fit: contain; flex: 0 0 auto; }
.hero-brand-panel div { display: grid; gap: 3px; }
.hero-brand-panel strong { color: var(--yellow); font-size: clamp(1.35rem, 2.4vw, 2.1rem); line-height: 1; }
.hero-brand-panel span { color: var(--white); font-weight: 800; font-size: clamp(.86rem, 1.4vw, 1rem); }
.eyebrow { color: var(--yellow); font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: 0; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 16px; letter-spacing: 0; }
h1 { font-size: clamp(2.35rem, 5vw, 4.8rem); max-width: 820px; }
h2 { font-size: clamp(1.85rem, 3vw, 3rem); }
h3 { font-size: 1.25rem; }
.hero p { max-width: 720px; font-size: clamp(1.05rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
  color: #f2f2f2;
  font-weight: 700;
}
.hero-strip span { border-left: 4px solid var(--yellow); padding-left: 10px; }

.section { padding: 72px 20px; }
.section.alt { background: var(--soft); }
.section.dark { background: var(--black); color: var(--white); }
.wrap { width: min(var(--max), 100%); margin: 0 auto; }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head p, .muted { color: var(--muted); }
.dark .muted, .dark .section-head p { color: #d8d8d8; }

.grid { display: grid; gap: 18px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}
.card-body { padding: 22px; }
.card img { width: 100%; height: 230px; object-fit: cover; }
.dark .card { color: var(--ink); }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; background: var(--yellow); border: 3px solid var(--black); }

.service-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.service-areas span {
  border: 1px solid #cfcfcf;
  background: #fff;
  color: var(--black);
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 800;
}

.quote-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.quote-form label { display: grid; gap: 7px; font-weight: 750; }
.quote-form input, .quote-form select, .quote-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
.quote-form textarea { min-height: 132px; resize: vertical; }
.full { grid-column: 1 / -1; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.consent input { width: 18px; min-height: 18px; margin-top: 3px; }
.honeypot { position: absolute; left: -9999px; height: 1px; width: 1px; overflow: hidden; }
.form-status { font-weight: 800; }

.contact-band {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: start;
}
.hours { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hours li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; gap: 20px; }

.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 28px 20px;
}
.footer-inner { width: min(var(--max), 100%); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner a { color: var(--yellow); font-weight: 800; }

.page-hero {
  background: var(--black);
  color: var(--white);
  padding: 58px 20px;
}
.page-hero .wrap { display: grid; gap: 10px; }

.admin-shell { min-height: 100svh; display: grid; place-items: center; padding: 28px; background: var(--soft); }
.admin-card, .lead-card, .admin-top {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.admin-card img, .admin-top img { width: 72px; height: 72px; object-fit: contain; }
.admin-card label { display: grid; gap: 8px; margin: 20px 0; font-weight: 800; }
.admin-card input { min-height: 44px; padding: 10px; font: inherit; }
.admin-wide { display: block; }
.admin-wide .admin-top { width: min(980px, 100%); margin: 0 auto 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lead-card { width: min(980px, 100%); margin: 0 auto 14px; }
.lead-card div { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lead-card span { color: var(--muted); }
.empty-state { width: min(980px, 100%); margin: 0 auto; background: #fff; padding: 24px; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; min-height: auto; gap: 10px 14px; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .nav-actions .button { display: none; }
  .mobile-call { display: inline-flex; }
  .two, .three, .contact-band { grid-template-columns: 1fr; }
  .quote-form { grid-template-columns: 1fr; padding: 18px; }
  .hero { min-height: auto; padding-top: 42px; }
}

@media (max-width: 520px) {
  .nav { padding: 8px 14px; }
  .brand { gap: 8px; }
  .brand img { width: 50px; height: 50px; }
  .brand-text strong { font-size: 1.04rem; }
  .brand-text small { font-size: .62rem; max-width: 178px; white-space: normal; }
  .hero-brand-panel { gap: 10px; padding: 10px 12px 10px 10px; margin-bottom: 18px; }
  .hero-brand-panel img { width: 56px; height: 56px; }
  .hero-brand-panel strong { font-size: 1.32rem; }
  .hero-brand-panel span { font-size: .78rem; }
  .section { padding: 54px 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .button, button { width: 100%; }
  .mobile-call { width: auto; padding: 9px 12px; min-height: 40px; }
  .card img { height: 190px; }
  .footer-inner { display: grid; }
  .admin-wide .admin-top { display: grid; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  width: min(390px, calc(100vw - 24px));
  pointer-events: none;
}
.chat-widget * { box-sizing: border-box; }
.chat-launcher {
  pointer-events: auto;
  width: auto;
  min-height: 48px;
  margin-left: auto;
  display: flex;
  box-shadow: 0 10px 28px rgba(0,0,0,.24);
}
.chat-panel {
  pointer-events: auto;
  margin-bottom: 10px;
  width: 100%;
  max-height: min(720px, calc(100svh - 96px));
  background: #fff;
  border: 2px solid var(--black);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
  display: grid;
  grid-template-rows: auto minmax(130px, 1fr) auto auto auto auto;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--black);
  color: var(--white);
}
.chat-header span { display: block; color: #d8d8d8; font-size: .82rem; }
.chat-close {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-color: var(--yellow);
}
.chat-body {
  min-height: 150px;
  max-height: 240px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  background: #f6f6f4;
}
.chat-bubble {
  max-width: 88%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .93rem;
}
.chat-bubble.user {
  justify-self: end;
  background: var(--yellow);
  border-color: var(--black);
}
.chat-bubble.pending { color: var(--muted); }
.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow-x: visible;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.chat-actions button, .chat-actions a {
  flex: 1 1 160px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--black);
  border-radius: 4px;
  background: #fff;
  color: var(--black);
  font-weight: 800;
  font-size: .84rem;
  text-decoration: none;
  white-space: normal;
  text-align: left;
}
.chat-actions a { background: var(--black); color: var(--white); display: inline-flex; align-items: center; }
.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.chat-compose input, .chat-detail-form input, .chat-detail-form select, .chat-detail-form textarea,
.admin-inline-form select, .admin-reply-form textarea, .admin-settings-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}
.chat-compose button { width: auto; min-height: 40px; padding: 8px 12px; }
.chat-detail-form {
  max-height: 270px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-detail-form h3 { font-size: 1rem; margin: 0; }
.chat-detail-form textarea { min-height: 74px; resize: vertical; }
.chat-detail-form button { min-height: 40px; }
.chat-file, .chat-consent { display: grid; gap: 6px; font-size: .9rem; font-weight: 700; }
.chat-consent { grid-template-columns: auto 1fr; align-items: start; }
.chat-form-status { margin: 0; font-weight: 800; font-size: .9rem; }
.chat-privacy {
  margin: 0;
  padding: 9px 12px 12px;
  color: var(--muted);
  font-size: .78rem;
  border-top: 1px solid var(--line);
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-nav .button { width: auto; min-height: 38px; padding: 8px 10px; font-size: .88rem; }
.admin-inline-form, .admin-reply-form, .admin-settings-form { display: grid; gap: 12px; }
.admin-inline-form { grid-template-columns: minmax(180px, 1fr) auto auto; align-items: end; }
.admin-inline-form label, .admin-settings-form label { display: grid; gap: 6px; font-weight: 800; }
.admin-reply-form textarea, .admin-settings-form textarea { min-height: 120px; resize: vertical; }
.chat-transcript { display: grid; gap: 10px; }
.chat-transcript-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.chat-transcript-message strong { text-transform: capitalize; }
.chat-transcript-message span { display: block; color: var(--muted); font-size: .82rem; }
.chat-transcript-message.user { border-left: 5px solid var(--yellow); }
.chat-transcript-message.assistant { border-left: 5px solid var(--black); }
.chat-transcript-message.admin { border-left: 5px solid #777; background: #fafafa; }

@media (max-width: 520px) {
  .chat-widget {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
  .chat-panel { max-height: calc(100svh - 74px); }
  .chat-launcher { min-height: 44px; padding: 9px 12px; }
  .chat-compose { grid-template-columns: 1fr; }
  .chat-compose button { width: 100%; }
  .chat-body { max-height: 210px; }
  .chat-detail-form { max-height: 250px; }
  .admin-inline-form { grid-template-columns: 1fr; }
  .admin-nav .button { width: 100%; }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}
.project-card img, .featured-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.project-card figcaption {
  display: grid;
  gap: 4px;
  padding: 14px;
  font-weight: 800;
}
.project-card figcaption span, .project-card figcaption small {
  color: var(--muted);
  font-weight: 600;
}
.featured-placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: linear-gradient(90deg, rgba(0,0,0,.82), rgba(0,0,0,.48)), url("/assets/freshly-sealed-asphalt-driveway.webp") center/cover;
  color: var(--yellow);
  font-size: 1.35rem;
  font-weight: 900;
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
.chat-panel[hidden] { display: none !important; }

/* Gallery and preview polish - 20260602-202535 */
.project-preview-head { margin-bottom: 22px; }
.project-preview-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr .85fr;
  gap: 18px;
  align-items: stretch;
}
.project-preview-card {
  position: relative;
  display: block;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.project-preview-wide { min-height: 320px; }
.project-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.project-preview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.72));
}
.project-preview-card span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  font-weight: 900;
  line-height: 1.15;
}
.project-preview-card:hover img { transform: scale(1.035); }
.section-action { margin-top: 22px; }

.gallery-hero p { max-width: 780px; }
.gallery-section { background: #fff; }
.polished-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}
.gallery-card {
  grid-column: span 4;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0,0,0,.07);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.gallery-card:hover {
  transform: translateY(-3px);
  border-color: #bdbdbd;
  box-shadow: 0 14px 34px rgba(0,0,0,.12);
}
.gallery-card-wide { grid-column: span 7; }
.gallery-card-large { grid-column: span 5; }
.gallery-card-tall { grid-column: span 4; }
.gallery-card-featured { grid-column: span 12; }
.gallery-card.is-hidden { display: none; }
.gallery-photo-frame {
  width: 100%;
  background: #111;
  overflow: hidden;
}
.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
}
.gallery-card-wide .gallery-photo-frame,
.gallery-card-large .gallery-photo-frame {
  aspect-ratio: 16 / 10;
}
.gallery-card-featured .gallery-photo-frame {
  display: flex;
  justify-content: center;
  background: #161616;
}
.gallery-card-wide img,
.gallery-card-large img {
  height: 100%;
  object-fit: cover;
}
.gallery-card-featured img {
  width: min(100%, 980px);
  height: auto;
  object-fit: contain;
}
.gallery-card-tall .gallery-photo-frame { aspect-ratio: 5 / 5.8; }
.gallery-card-tall img { height: 100%; object-fit: cover; }
.gallery-card figcaption {
  display: grid;
  gap: 6px;
  padding: 16px;
}
.gallery-card figcaption strong {
  font-size: 1.02rem;
  line-height: 1.15;
}
.gallery-card figcaption span {
  color: var(--muted);
  font-size: .92rem;
}

.chat-widget {
  right: 16px;
  bottom: 16px;
  width: min(360px, calc(100vw - 24px));
}
.chat-launcher {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .9rem;
  gap: 7px;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
}
.chat-launcher::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  background: currentColor;
  clip-path: polygon(8% 8%, 92% 8%, 92% 67%, 61% 67%, 50% 90%, 39% 67%, 8% 67%);
}

@media (max-width: 980px) {
  .project-preview-grid { grid-template-columns: 1fr; }
  .project-preview-card, .project-preview-wide { min-height: 230px; }
  .polished-gallery { grid-template-columns: 1fr; }
  .gallery-card, .gallery-card-wide, .gallery-card-large, .gallery-card-tall, .gallery-card-featured { grid-column: 1; }
}

@media (max-width: 520px) {
  .project-preview-card, .project-preview-wide { min-height: 210px; }
  .gallery-card-wide .gallery-photo-frame,
  .gallery-card-large .gallery-photo-frame,
  .gallery-card-tall .gallery-photo-frame,
  .gallery-card-featured .gallery-photo-frame { aspect-ratio: auto; }
  .gallery-card-wide img,
  .gallery-card-large img,
  .gallery-card-tall img,
  .gallery-card-featured img { height: auto; object-fit: contain; }
  .chat-widget { right: 10px; bottom: 10px; width: min(340px, calc(100vw - 20px)); }
  .chat-launcher { min-height: 38px; padding: 8px 11px; font-size: 0; width: auto; }
  .chat-launcher::after { content: "Ask Us"; font-size: .88rem; }
}

/* Chat launcher final sizing */
.chat-launcher { min-height: 38px; padding: 7px 10px; font-size: .82rem; gap: 6px; }
.chat-launcher::before { width: 13px; height: 13px; flex-basis: 13px; }

/* Tim confirmed quote updates */
.field-help { color: var(--muted); font-size: .86rem; font-weight: 600; }
.quote-note { border-left: 4px solid var(--yellow); background: #fff8d8; padding: 12px 14px; font-weight: 750; }
.process-grid .process-step { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 22px; }
.process-step span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--yellow); border: 2px solid var(--black); font-weight: 900; margin-bottom: 12px; }
