/* GP Drywall LLC — site styles
   Order: fonts, tokens, base, layout, buttons, header, hero, sections, footer, mobile bar, lightbox. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-semi-condensed-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/barlow-semi-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Palette matches the black, red and silver logo. */
  --charcoal: #171717;     /* headings, dark backgrounds, outlines */
  --red: #D62828;          /* primary buttons and small accents */
  --red-dark: #B91F1F;
  --text: #333333;         /* body text; also the hover shade for charcoal fills */
  --muted: #5C5C5C;
  --line: #BFC1C4;         /* silver: borders and dividers */
  --bg-alt: #F5F5F5;
  --white: #FFFFFF;
  --star: #E8A317;

  --font-head: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1140px;
  --gutter: 20px;
  --section-pad: 44px;
  /* Header: menu items center on a line of --header-line; --header-below leaves room for the logo's handle. */
  --logo-h: 40px;
  --header-line: 60px;
  --header-below: 8px;
  --header-h: calc(var(--header-line) + var(--header-below));
  --bar-h: 60px;
}

@media (min-width: 900px) {
  :root { --section-pad: 64px; --gutter: 32px; }
}

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

html {
  font-size: 106.25%; /* 17px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--charcoal);
}
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.0625rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--charcoal); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--charcoal);
  color: var(--white);
}
.skip-link:focus { top: 8px; color: var(--white); }

/* Unreplaced business details show with a dashed outline in previews. */
.ph {
  outline: 2px dashed var(--red);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-pad) 0; scroll-margin-top: 0; }
.section + .section { border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }
.section__intro { margin-bottom: 32px; }
.section__intro p { color: var(--muted); font-size: 1.0625rem; }

@media (min-width: 900px) {
  .section, .hero { scroll-margin-top: var(--header-h); }
}

/* Lists with small square markers */
.list-square li {
  position: relative;
  list-style: none;
  padding-left: 20px;
  margin-bottom: 6px;
}
.list-square li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 7px; height: 7px;
  background: var(--red);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 2px;
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms;
}
.btn svg { width: 22px; height: 22px; flex: none; fill: currentColor; }

.btn-wa { background: var(--red); color: var(--white); }
.btn-wa:hover { background: var(--red-dark); color: var(--white); }

.btn-outline { border-color: var(--charcoal); background: var(--white); color: var(--charcoal); }
.btn-outline:hover { background: var(--bg-alt); color: var(--charcoal); }

.btn-outline--light { border-color: var(--white); background: transparent; color: var(--white); }
.btn-outline--light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }

.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
  padding-bottom: var(--header-below);
}

.logo { display: inline-flex; flex: none; margin-right: auto; }
/* Logo height sets its width (3.62:1): 137-145px on phones, 188px tablets, 181px small laptops, 240px desktop.
   DRYWALL's middle sits 30.5% down the image, so shifting the image 19.5% of its height lines the lettering up
   with the menu; the handle hangs into --header-below. */
.logo img { display: block; width: auto; height: var(--logo-h); transform: translateY(calc(var(--logo-h) * 0.1954)); }

.nav-main ul { display: flex; gap: 24px; list-style: none; }
.nav-main a,
.header-phone,
.lang-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.nav-main a:hover,
.lang-link:hover { color: var(--charcoal); text-decoration: underline; }

.header-phone {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  color: var(--charcoal);
  white-space: nowrap;
}
.header-phone svg { width: 18px; height: 18px; fill: currentColor; }

.lang-link {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.nav-main, .header-phone { display: none; }
@media (max-width: 899px) {
  .site-header__inner { gap: 10px; }
  .lang-link { padding: 8px; }
}
@media (max-width: 400px) {
  :root { --logo-h: 38px; }
}
@media (min-width: 600px) {
  :root { --logo-h: 52px; --header-below: 12px; }
}
@media (min-width: 900px) {
  .nav-main, .header-phone { display: flex; }
  .menu { display: none; }
  /* Small laptops: the full menu is widest here, so the logo and gaps tighten a little. */
  .site-header__inner, .nav-main ul { gap: 16px; }
  :root { --logo-h: 50px; --header-line: 64px; --header-below: 12px; }
}
@media (min-width: 1100px) {
  .site-header__inner, .nav-main ul { gap: 24px; }
  :root { --logo-h: 66px; --header-line: 66px; --header-below: 18px; }
}

/* Mobile menu: <details> so it works without JavaScript */
.menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--charcoal);
  border-radius: 2px;
  color: var(--charcoal);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--charcoal); color: var(--white); }
.menu__panel {
  position: absolute;
  left: 0; right: 0; top: 100%;
  padding: 8px var(--gutter) 16px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.menu__panel ul { list-style: none; }
.menu__panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--charcoal);
}
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
@media (min-width: 600px) {
  .hero__media img { object-position: 45% 55%; }
}
.hero__tint {
  position: absolute;
  inset: 0;
  background: rgba(23, 23, 23, 0.72);
}
.hero__content {
  position: relative;
  padding-top: 48px;
  padding-bottom: 48px;
}
.hero__content > * { max-width: 640px; }
@media (min-width: 900px) {
  .hero { min-height: 520px; display: flex; align-items: center; }
  .hero__content { padding-top: 72px; padding-bottom: 72px; }
}

.hero h1 { color: var(--white); margin-bottom: 0.3em; }
.hero__slogan {
  margin-bottom: 16px;
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
@media (min-width: 600px) {
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
}
.hero__facts {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}
.hero__facts span { white-space: nowrap; } /* break the line between items, never inside one */
.hero :focus-visible { outline-color: var(--white); }

/* ---------- Services ---------- */
.feature {
  display: grid;
  gap: 20px;
  align-items: center;
  margin-bottom: 32px;
}
.feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* Section title stays above the service headings: 30px phones, 36px tablets, 44px desktop. */
#services-title { font-size: 30px; }
@media (min-width: 600px) { #services-title { font-size: 36px; } }
@media (min-width: 900px) { #services-title { font-size: 44px; } }
/* Service text sized to hold its own beside the photos (heading/bullets):
   26/18px on phones, 29/20px on tablets, 36/24px on desktop. */
.feature h3 { margin-bottom: 16px; font-size: 26px; line-height: 1.15; }
.feature .list-square li { margin-bottom: 12px; padding-left: 24px; font-size: 18px; line-height: 1.4; }
.feature .list-square li::before { top: calc(0.7em - 4px); width: 8px; height: 8px; } /* centered on the first line */
.feature .list-square li:last-child { margin-bottom: 0; }
@media (min-width: 600px) {
  .feature h3 { margin-bottom: 18px; font-size: 29px; }
  .feature .list-square li { margin-bottom: 16px; font-size: 20px; }
}
/* Image column is a little narrower than the text column, so rows stay compact without cropping the photos. */
@media (min-width: 900px) {
  .feature { grid-template-columns: 5fr 6fr; gap: 40px; }
  .feature--reverse { grid-template-columns: 6fr 5fr; }
  .feature--reverse .feature__media { order: 2; }
  .feature h3 { margin-bottom: 24px; font-size: 36px; }
  .feature .list-square li { margin-bottom: 20px; padding-left: 28px; font-size: 24px; }
  .feature .list-square li::before { width: 9px; height: 9px; top: calc(0.7em - 4.5px); }
}

.other-work { margin-top: 8px; }
.other-work ul {
  display: grid;
  gap: 24px;
  margin-top: 16px;
  list-style: none;
}
.other-work li { padding-top: 16px; border-top: 1px solid var(--line); }
.other-work li p { margin: 0; color: var(--muted); }
@media (min-width: 600px) { .other-work ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .other-work ul { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Before & After ---------- */
.pairs { display: grid; gap: 40px; }
@media (min-width: 1024px) { .pairs { grid-template-columns: 1fr 1fr; gap: 48px 32px; } }

.pair { margin: 0; }
.pair__images { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.pair__img { position: relative; display: block; }
/* Each photo keeps its own proportions (taken from its width/height attributes). */
.pair__img img { width: 100%; height: auto; background: var(--bg-alt); }
.pair__img::after {
  content: attr(data-label);
  position: absolute;
  left: 0; top: 0;
  padding: 4px 10px;
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
}
@media (max-width: 599px) { .pair__img::after { padding: 2px 8px; font-size: 0.8125rem; } }
.pair__img--after::after { background: var(--red); }
.pair__video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--bg-alt);
}
.video-toggle {
  position: absolute;
  right: 8px; bottom: 8px;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(23, 23, 23, 0.7);
  color: var(--white);
  cursor: pointer;
  transition: background-color 150ms;
}
.video-toggle:hover { background: rgba(23, 23, 23, 0.9); }
.video-toggle:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.video-toggle svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 599px) { .video-toggle { right: 6px; bottom: 6px; width: 36px; height: 36px; } }
.pair figcaption { margin-top: 10px; font-weight: 600; }

.gallery-cta {
  display: grid;
  gap: 16px;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.gallery-cta p { margin: 0; font-family: var(--font-head); font-size: 1.375rem; font-weight: 600; color: var(--charcoal); }
.gallery-cta__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
@media (min-width: 900px) {
  .gallery-cta { grid-template-columns: 1fr auto; }
}

/* ---------- Reviews ---------- */
.reviews-summary { font-size: 1.125rem; }
.reviews-summary strong { color: var(--charcoal); }
/* Reviews conveyor (js/reviews.js). Cards move right to left; the frame shows keyboard focus
   because the mask on .marquee would clip an outline drawn on it. */
.marquee-frame { margin: 0 -4px; padding: 4px; }
.marquee-frame:has(.marquee:focus-visible) { outline: 3px solid var(--charcoal); outline-offset: 2px; }
.marquee {
  --card-w: 300px;
  --gap: 16px;
  --fade: 56px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
}
.marquee::-webkit-scrollbar { display: none; }
.marquee:focus-visible { outline: none; }
.marquee--fits { -webkit-mask-image: none; mask-image: none; }
@media (max-width: 599px) { .marquee { --card-w: 260px; --fade: 24px; } }

.marquee__track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  list-style: none;
}
.marquee__empty {
  padding: 20px;
  background: var(--white);
  border: 1px dashed var(--line);
}

.review-card {
  display: flex;
  flex: 0 0 var(--card-w);
  flex-direction: column;
  gap: 10px;
  min-height: 230px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.review-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-card__source { color: var(--muted); font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
a.review-card__source { color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--line); }
a.review-card__source:hover { text-decoration-color: currentColor; }
.review-card__text { flex: 1; margin: 0; }
.review-card__text p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
}
.review-card__name {
  margin: 0;
  color: var(--charcoal);
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 600;
}
.stars { color: var(--star); letter-spacing: 2px; font-size: 1.125rem; line-height: 1; }
.stars__empty { color: var(--line); }

.reviews-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; font-weight: 600; }

/* ---------- About ---------- */
.about { max-width: 960px; text-align: center; }
.about__lead {
  max-width: 62ch;
  margin: 0 auto;
  font-size: 1.1875rem;
}
.about__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 16px;
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .about__facts { grid-template-columns: repeat(4, 1fr); } }
.about__facts dt { color: var(--muted); font-size: 0.9375rem; }
.about__facts dd {
  margin: 4px 0 0;
  color: var(--charcoal);
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
}

/* ---------- Contractors ---------- */
.contractors { display: grid; gap: 20px; align-items: center; }
@media (min-width: 900px) {
  .contractors { grid-template-columns: 1fr auto; gap: 48px; }
}

/* ---------- Estimate steps ---------- */
.steps { display: grid; gap: 28px; list-style: none; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-head);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--charcoal);
}
.steps p { margin: 0; }

.estimate-contact {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.estimate-contact > p:first-child { margin: 0; font-size: 1.0625rem; }
.estimate-contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.estimate-contact__note { margin: 14px 0 0; color: var(--muted); }
@media (max-width: 599px) { .estimate-contact__actions .btn { flex: 1 1 100%; } }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; gap: 64px; } }

.areas { margin-bottom: 28px; }

.contact-box {
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--charcoal);
}
.contact-box .btn-wa { width: 100%; }
.contact-box__secondary {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 600px) {
  .contact-box__secondary { grid-template-columns: 1fr 1fr; }
  .contact-box__secondary .btn:first-child { grid-column: 1 / -1; }
}
.contact-box__note { margin: 16px 0 0; color: var(--muted); }

.social { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; margin-top: 20px; }
.social a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.social a:hover { text-decoration: underline; }
.social svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px 0 24px;
  background: var(--charcoal);
  color: var(--white);
}
.site-footer a { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--white); }
.site-footer h2 {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 1.125rem;
}
.site-footer p { margin: 0 0 6px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.footer-cols { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr; } }
.footer-bottom {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Mobile contact bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--white);
  border-top: 1px solid var(--line);
  transition: transform 200ms, visibility 200ms;
}
.mobile-bar .btn {
  min-height: var(--bar-h);
  border-radius: 0;
}
.mobile-bar .btn-wa { flex: 2; }
.mobile-bar .btn-call { flex: 1; background: var(--charcoal); color: var(--white); }
.mobile-bar .btn-call:hover { background: var(--text); color: var(--white); }
.mobile-bar--hidden { transform: translateY(100%); visibility: hidden; }

body:has(.mobile-bar) { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .mobile-bar { display: none; }
  body:has(.mobile-bar) { padding-bottom: 0; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  max-width: 96vw;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.85); }
.lightbox img { max-height: 86vh; width: auto; margin: 0 auto; }
.lightbox__close {
  display: block;
  margin: 0 0 8px auto;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 2px;
  background: var(--white);
  color: var(--text);
  font: 600 1rem var(--font-body);
  cursor: pointer;
}

/* ---------- Simple text pages (privacy, 404) ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.375rem; }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: 6px; }
.prose .updated { color: var(--muted); }

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