/* =========================================================
   JJB DRYWALL — site styles
   Colors are set once here; change them to restyle the site.
   ========================================================= */
:root {
  --white: #ffffff;
  --cream: #faf6f0;
  --sand: #f1e8dd;
  --line: #e6dacb;

  --brown-900: #2e2018;
  --brown-700: #4a3326;
  --brown-500: #7a5236;
  --text: #3b2c23;
  --muted: #6e5d51;

  --orange: #c8641a;
  --orange-hover: #a9521a;
  --orange-bright: #f08a36;
  --orange-soft: #fcebdb;

  --radius: 18px;
  --shadow: 0 24px 50px -28px rgba(46, 32, 24, 0.45);
  --header-h: 90px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  margin: 0;
  color: var(--brown-900);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 24px -12px rgba(200, 100, 26, 0.8);
}
.btn:hover { background: var(--orange-hover); transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--brown-900); outline-offset: 3px; }
.btn-small { padding: 11px 22px; font-size: 15px; }
.btn-large { padding: 18px 36px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.logo-img { height: 74px; width: auto; }
.footer-logo {
  height: 130px;
  width: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--white);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}
.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-size: 16px;
  font-weight: 600;
  color: var(--brown-700);
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--orange); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone { font-weight: 700; font-size: 16px; color: var(--brown-900); }
.header-phone:hover { color: var(--orange); }

/* ---------- Hero ---------- */
/* Dark textured panel with a pointed, orange-trimmed edge, photo on the right */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--brown-900);
}
.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 52%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 60%;
}
/* The drop-shadow draws the orange trim that follows the pointed edge */
.hero-panel-wrap {
  position: relative;
  z-index: 1;
  width: 57%;
  filter: drop-shadow(14px 0 0 var(--orange-bright));
}
.hero-panel {
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 96px 15% 96px max(24px, calc((100vw - 1160px) / 2 + 24px));
  clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
  background:
    linear-gradient(100deg, rgba(30, 20, 14, 0.72) 0%, rgba(30, 20, 14, 0.5) 100%),
    url("../images/texture.svg") center / 600px repeat,
    var(--brown-900);
}
.hero-text { max-width: 540px; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
  margin-bottom: 22px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero p {
  font-size: 1.25rem;
  color: #eadccd;
  max-width: 34ch;
  margin-bottom: 36px;
}

/* ---------- Sections ---------- */
.section {
  padding: 104px 0;
  /* Faint scattered tools behind the plain sections */
  background-image: url("../images/tools-pattern.svg");
  background-size: 520px;
}
.section-cream { background-color: var(--cream); }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  margin-bottom: 14px;
}
.section-head p { font-size: 1.15rem; color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
}

/* ---------- Work cards ---------- */
.work-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.work-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--sand);
}

/* ---------- Timelapse video ---------- */
.video-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 72px;
  max-width: 980px;
}
.video-text h2 {
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  margin-bottom: 14px;
}
.video-text p {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 32px;
}
.video-frame {
  position: relative;
  width: 340px;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  background: var(--brown-900);
  border: 6px solid var(--white);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(46, 32, 24, 0.7);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.video-toggle:focus-visible { outline: 3px solid var(--orange-bright); outline-offset: 2px; }
.video-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.video-toggle .icon-play { fill: var(--white); stroke-width: 1.5; display: none; }
.video-toggle.is-paused .icon-play { display: block; }
.video-toggle.is-paused .icon-pause { display: none; }

/* ---------- Before & after ---------- */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 2.2fr;
  gap: 20px;
}
.ba-step {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.ba-step img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  background: var(--sand);
}
.ba-step figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brown-900);
}
.ba-step figcaption span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 15px;
}
.ba-final figcaption span { background: var(--orange); color: var(--white); }
.work-body { padding: 24px 26px 28px; }
.work-body h3 { font-size: 1.35rem; margin-bottom: 8px; }
.work-body p { color: var(--muted); }

/* ---------- Text-a-photo band ---------- */
.photo-band {
  background: var(--orange-soft);
  padding: 64px 0;
}
.photo-band-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
}
.photo-band-icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px -18px rgba(200, 100, 26, 0.7);
}
.photo-band-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.photo-band-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 8px;
}
.photo-band-copy p { font-size: 1.15rem; color: var(--muted); }
.photo-band .btn { white-space: nowrap; }

/* ---------- Service cards ---------- */
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.service-card h3 { font-size: 1.3rem; margin: 22px 0 8px; }
.service-card p { color: var(--muted); }
.icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--orange-soft);
  display: grid;
  place-items: center;
}
.icon svg,
.contact-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- About ---------- */
.section-brown {
  background: var(--brown-900); /* no tool pattern on the dark band */
  color: #e9dccd;
}
.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: center;
}
.about-text h2 {
  color: var(--white);
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  margin-bottom: 22px;
}
.about-text p { font-size: 1.15rem; margin-bottom: 10px; }
.about-text .btn { margin-top: 26px; }
.stats { display: grid; gap: 18px; }
.stat {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--orange-bright);
  line-height: 1;
  min-width: 3.4ch;
}
.stat-label { font-size: 1.1rem; font-weight: 600; color: #f3e9dd; }
.stat { align-items: center; }
.stat-icon svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--orange-bright);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* ---------- Reviews ---------- */
.review-card {
  margin: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
}
.reviews-grid { max-width: 960px; margin: 0 auto; }
.stars { color: var(--orange); font-size: 20px; letter-spacing: 3px; margin-bottom: 16px; }
.review-card blockquote {
  margin: 0 0 24px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--brown-900);
  flex: 1;
}
.review-card figcaption strong { display: block; color: var(--brown-900); }
.review-card figcaption span { color: var(--muted); font-size: 16px; }

/* ---------- Areas we serve ---------- */
.section-sand { background-color: var(--sand); }
.town-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 960px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.town-grid li {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brown-900);
}
.town-grid svg {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.areas-note {
  text-align: center;
  margin-top: 36px;
  font-size: 1.15rem;
  color: var(--muted);
}
.areas-note a { color: var(--orange); font-weight: 700; text-decoration: underline; }

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.contact-info { display: grid; gap: 18px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
a.contact-item:hover { border-color: var(--orange); }
.contact-item strong { display: block; color: var(--brown-900); font-size: 16px; }
.contact-item span:last-child { color: var(--muted); font-size: 17px; }
.contact-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--orange-soft);
  display: grid;
  place-items: center;
}

.quote-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quote-form label {
  display: grid;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown-900);
}
.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.quote-form textarea { resize: vertical; }
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
}
.quote-form .btn { margin-top: 6px; }
.quote-form .btn:disabled { opacity: 0.7; cursor: wait; transform: none; }
.form-error {
  color: #9b2c1a;
  font-weight: 600;
  font-size: 16px;
}
.form-error a { text-decoration: underline; }

.form-thanks {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 56px 40px;
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.form-thanks:focus { outline: none; }
.form-thanks h3 { font-size: 1.7rem; }
.form-thanks p { color: var(--muted); font-size: 1.1rem; }
.form-thanks a { color: var(--orange); font-weight: 700; }
.thanks-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--orange-soft);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}
.thanks-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] { display: none !important; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown-900);
  color: #cdbba8;
  padding: 56px 0 40px;
  text-align: center;
}
.footer-inner { display: grid; justify-items: center; gap: 14px; }
.footer-areas { font-size: 15px; max-width: 46ch; opacity: 0.85; }
.footer-links { display: flex; gap: 10px 28px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--white); font-weight: 600; }
.footer-links a:hover { color: var(--orange-bright); }
.copyright { font-size: 14px; margin-top: 12px; opacity: 0.75; }

/* ---------- Mobile bottom bar ---------- */
.mobile-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .main-nav { display: none; }
}

@media (max-width: 1020px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .ba-grid { grid-template-columns: repeat(3, 1fr); }
  .ba-final { grid-column: 1 / -1; }
  .ba-step img { height: 320px; }
  .ba-final img { height: 440px; }
}

@media (max-width: 900px) {
  /* Stack: textured panel pointing down, then the photo */
  .hero { display: flex; flex-direction: column; }
  .hero-panel-wrap {
    width: 100%;
    filter: drop-shadow(0 10px 0 var(--orange-bright));
  }
  .hero-panel {
    min-height: 0;
    padding: 60px 24px 84px;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
  }
  .hero-text { max-width: none; }
  .hero-photo {
    order: 2;
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: -48px;
    object-position: 45% 70%;
  }
  .about-inner,
  .contact-inner { grid-template-columns: 1fr; gap: 44px; }
  .video-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 40px; }
  .video-frame { width: min(340px, 100%); }
  .photo-band-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 24px;
  }
  .section { padding: 80px 0; }
}

@media (max-width: 640px) {
  :root { --header-h: 72px; }
  body { font-size: 17px; padding-bottom: 68px; }
  .header-phone { display: none; }
  .logo-img { height: 56px; }
  .hero-text { text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .btn-large { width: 100%; text-align: center; }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 40px; }
  .card-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; gap: 20px; }
  .ba-grid { gap: 10px; }
  .ba-step img { height: 190px; }
  .ba-final img { height: 260px; }
  .ba-step figcaption { flex-direction: column; gap: 6px; padding: 12px 8px; font-size: 14px; text-align: center; }
  .ba-final figcaption { flex-direction: row; justify-content: center; font-size: 1.05rem; }
  .ba-step figcaption span { width: 26px; height: 26px; font-size: 13px; }
  .town-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .town-grid li { padding: 16px 16px; font-size: 1.05rem; gap: 10px; }
  .town-grid svg { width: 22px; height: 22px; }
  .quote-form { padding: 26px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .stat { padding: 20px 22px; }

  .mobile-cta {
    display: grid;
    grid-template-columns: 0.8fr 1.1fr 1.3fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: var(--white);
    border-top: 1px solid var(--line);
    padding: 10px 10px;
    gap: 8px;
  }
  .mobile-cta a {
    text-align: center;
    padding: 13px 6px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
  }
  .photo-band { padding: 52px 0; }
  .photo-band .btn { white-space: normal; }
  .mobile-call { border: 2px solid var(--brown-900); color: var(--brown-900); }
  .mobile-quote { background: var(--orange); color: var(--white); }
}
