/* =========================================================================
   BRAND COLORS - burgundy and cream, matched to bartyllaplumbing.com. Change only the
   values in this first block and the whole site follows.
   ========================================================================= */
:root {
  --brand: #591f2d;        /* burgundy: dark sections, buttons */
  --brand-deep: #40151f;   /* darkest shade: headings, footer */
  --accent: #591f2d;       /* buttons and highlights */
  --accent-deep: #40151f;  /* button hover */
  --accent-light: #f2c7ad; /* highlights on burgundy */
  --cream: #fcf0e8;        /* page-top and light section background */
  --ink: #2b2326;          /* body text */
  --muted: #595959;        /* secondary text */
  --line: #e6d9d0;         /* borders */
  --soft: #fcf0e8;         /* light section background */
  --white: #fff;

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(64, 21, 31, .06), 0 8px 24px rgba(64, 21, 31, .08);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid #fff; outline-offset: 0; box-shadow: 0 0 0 5px var(--brand-deep); border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; color: var(--brand-deep); margin: 0 0 .6em; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--brand); color: #f1e2d9; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.eyebrow {
  display: block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-dark .eyebrow { color: var(--accent-light); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.section-dark .lead { color: #ead9cf; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--white); padding: 12px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 8px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-deep); color: var(--white); }
.btn-dark { background: var(--brand); color: var(--white); }
.btn-dark:hover { background: var(--brand-deep); color: var(--white); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand); color: var(--white); }
.btn-light { background: var(--white); color: var(--brand-deep); }
.btn-light:hover { background: #f3e3d9; color: var(--brand-deep); }
.btn-outline-light { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--brand-deep); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- draft-preview markers ---- */
.preview-bar {
  background: #fff3c4; color: #4a3800; border-bottom: 1px solid #d9a400; font-size: .85rem;
  padding: 8px 24px; display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center;
}
.flag {
  display: inline; background: #fff3c4; color: #4a3800; border: 1px dashed #b88a00; border-radius: 4px;
  padding: 1px 6px; font-size: .92em; font-weight: 400; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.flag b { font-size: .72em; text-transform: uppercase; letter-spacing: .06em; background: #b88a00; color: #fff; padding: 1px 5px; border-radius: 3px; margin-left: 4px; white-space: nowrap; }
.flag-missing { font-weight: 600; }
.notice { background: #fff3c4; color: #4a3800; border: 1px solid #d9a400; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 76px; }
.brand { text-decoration: none; margin-right: auto; color: var(--brand-deep); }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.wordmark span { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.brand { flex-shrink: 0; }
.logo-img { height: 54px; width: auto; max-width: none; }
@media (max-width: 639px) { .logo-img { height: 40px; } }
/* narrow phones (many Android models are 360px wide): keep logo, number and menu on one row */
@media (max-width: 399px) {
  .logo-img, .site-header.is-scrolled .logo-img { height: 32px; }
  .header-inner { gap: 8px; }
  .header-call { padding: 8px 10px; font-size: .86rem; gap: 6px; }
  .header-call svg { width: 15px; height: 15px; }
  .nav-toggle { padding: 0 11px; }
}
@media (max-width: 359px) {
  .header-call-number { display: none; }
  .header-call .header-call-label { display: inline; }
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
.site-nav a {
  display: block; padding: 10px 8px; border-radius: 6px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.site-nav a:hover { background: var(--soft); color: var(--brand-deep); }
.site-nav a[aria-current="page"] { color: var(--accent-deep); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 6px 6px 0 0; }
.nav-home { display: none; }
.nav-toggle { display: none; }
.header-call { white-space: nowrap; }

@media (max-width: 1279px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px;
    background: var(--white); border: 2px solid var(--line); border-radius: 8px; font: inherit; font-weight: 700; color: var(--brand-deep); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    content: ""; display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav-toggle { order: 3; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px 16px 16px;
    max-height: calc(100vh - 150px); overflow: auto;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 14px 10px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent); border-radius: 0; }
  .nav-home { display: block; }
}
@media (max-width: 639px) {
  .header-call-label { display: none; }
  .header-call { padding: 10px 12px; font-size: .95rem; }
  .header-inner { gap: 10px; min-height: 66px; }
  .wordmark strong { font-size: 1.25rem; }
  .wordmark span { font-size: .6rem; letter-spacing: .12em; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .container { padding: 0 18px; }
}

/* ---- hero ---- */
.hero { background: var(--cream); color: var(--ink); border-bottom: 1px solid var(--line); padding: clamp(48px, 7vw, 96px) 0; }
/* buttons written for dark backgrounds, restyled for the cream page tops */
.hero .btn-light, .page-hero .btn-light { border-color: var(--brand); }
.hero .btn-outline-light, .page-hero .btn-outline-light { border-color: var(--brand); color: var(--brand); }
.hero .btn-outline-light:hover, .page-hero .btn-outline-light:hover { background: var(--brand); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero .btn-row { margin-top: 28px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .95rem; color: var(--ink); }
.hero-points li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 9px; vertical-align: middle; }
.page-hero { background: var(--cream); color: var(--ink); border-bottom: 1px solid var(--line); padding: clamp(44px, 6vw, 80px) 0; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); max-width: 22ch; }
.page-hero .btn-row { margin-top: 24px; }
@media (max-width: 899px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---- photos and placeholders ---- */
.photo { width: 100%; height: auto; object-fit: cover; border-radius: var(--radius); background: var(--soft); }
.ph {
  width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  border: 2px dashed #b9a59c; border-radius: var(--radius); color: #4a3a3a;
  background: repeating-linear-gradient(135deg, #f1e6df, #f1e6df 14px, #f8f1ec 14px, #f8f1ec 28px);
}
.ph span { display: flex; flex-direction: column; gap: 4px; background: rgba(255, 255, 255, .88); padding: 10px 14px; border-radius: 6px; font-size: .95rem; max-width: 100%; }
.ph b { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); }
.ph small { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }

/* ---- grids and cards ---- */
.grid-2, .grid-3 { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 899px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card > :last-child { margin-bottom: 0; }
.card .card-link { margin-top: auto; padding-top: 12px; font-weight: 700; text-decoration: none; }
.card .card-link::after { content: " \2192"; }
.card .ph, .card .photo { margin-bottom: 20px; }
.path-card { border-top: 5px solid var(--accent); }
.path-card .btn-row { margin-top: auto; padding-top: 16px; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg);
}
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { counter-increment: step; padding-top: 18px; border-top: 3px solid var(--accent); }
.steps li::before { content: "0" counter(step); display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.section-dark .steps li { border-top-color: var(--accent-light); }
.section-dark .steps li::before { color: var(--accent-light); }
@media (max-width: 767px) { .steps { grid-template-columns: 1fr; } }
.fact-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.fact-list dt { font-weight: 700; color: var(--brand-deep); }
.fact-list dd { margin: 0; }
@media (max-width: 479px) { .fact-list { grid-template-columns: 1fr; gap: 2px; } .fact-list dd { margin-bottom: 12px; } }

.card-title { font-size: 1.2rem; letter-spacing: -.01em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.project-table { width: 100%; border-collapse: collapse; background: var(--white); }
.project-table th, .project-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.project-table thead th { background: var(--brand); color: var(--white); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.project-table tbody th { font-weight: 700; color: var(--brand-deep); }
.project-table tbody tr:last-child th, .project-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 639px) {
  .project-table thead { position: absolute; left: -9999px; }
  .project-table tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .project-table tbody tr:last-child { border-bottom: 0; }
  .project-table th, .project-table td { display: block; padding: 0; border: 0; }
  .project-table td { color: var(--muted); font-size: .95rem; }
}

/* ---- call-to-action band and footer ---- */
.cta-band { background: var(--brand); color: #f1e2d9; padding: 56px 0; }
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
.cta-band p { margin: 0; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.site-footer { background: var(--brand-deep); color: #e3cfc5; padding: 56px 0 28px; font-size: .97rem; }
.site-footer a { color: #fcf0e8; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-name { color: var(--white); font-weight: 800; font-size: 1.15rem; }
.footer-heading { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { display: inline-block; padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 36px; padding-top: 20px; font-size: .88rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- persistent mobile call bar (body padding keeps it off the content) ---- */
.mobile-bar { display: none; }
@media (max-width: 767px) {
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--white);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(64, 21, 31, .12);
  }
  .mobile-bar .btn { padding: 10px 8px; }
  body { padding-bottom: calc(69px + env(safe-area-inset-bottom)); }
}

/* ---- forms ---- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label, .fieldset-legend { display: block; font-weight: 700; margin-bottom: 6px; color: var(--brand-deep); }
.field .hint { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
.optional { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; font: inherit; color: var(--ink);
  background: var(--white); border: 1.5px solid #8d7f7f; border-radius: 8px;
}
textarea { min-height: 140px; resize: vertical; }
input[type="file"] { font: inherit; font-size: .95rem; max-width: 100%; margin-bottom: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--brand); }
[aria-invalid="true"] { border-color: #b3261e !important; background: #fff8f7; }
.field-error { color: #b3261e; font-size: .92rem; font-weight: 600; margin: 6px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 639px) { .field-row { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend { padding: 0; }
.choice-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 767px) { .choice-row { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.choice span { display: block; height: 100%; padding: 13px 14px; border: 1.5px solid #8d7f7f; border-radius: 8px; font-weight: 700; line-height: 1.3; }
.choice small { display: block; font-weight: 400; color: var(--muted); font-size: .86rem; margin-top: 2px; }
.choice input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: #fcf0e8; }
.choice input:focus-visible + span { outline: 2px solid #fff; box-shadow: 0 0 0 5px var(--brand-deep); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .92rem; color: var(--muted); }
.form-status { border-radius: var(--radius); padding: 14px 18px; margin-top: 18px; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-error { background: #fdecea; color: #8c1d18; border: 1px solid #e3a19c; }
.form-success { background: #e9f6ec; color: #14532d; border: 1px solid #9ccfa8; border-radius: var(--radius); padding: 24px; }
.form-success h3 { color: #14532d; }
[hidden] { display: none !important; }

/* ---- Google reviews ---- */
.stars { color: #c98a00; letter-spacing: 2px; }
.rating-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 8px 14px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .95rem; box-shadow: var(--shadow);
}
.rating-badge:hover { border-color: var(--brand); color: var(--brand-deep); }
.rating-line { font-size: 1.1rem; margin: 0; }
.review-card { margin: 0; border-top: 5px solid var(--brand); }
.review-card blockquote { margin: 0 0 18px; }
.review-card blockquote p { margin: 0; font-size: 1.02rem; }
.review-card figcaption { margin-top: auto; font-weight: 700; color: var(--brand-deep); }
.review-card figcaption span { display: block; font-weight: 400; font-size: .88rem; color: var(--muted); }

.photo-grid figure { margin: 0; }
.photo-grid .photo { box-shadow: var(--shadow); }
.photo-grid figcaption { margin-top: 10px; font-weight: 700; color: var(--brand-deep); font-size: .95rem; }

.office-sign { max-width: 300px; margin-bottom: 28px; }
.office-sign .photo { box-shadow: var(--shadow); }

/* ---- service agreement: rates and terms ---- */
.rate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 767px) { .rate-grid { grid-template-columns: 1fr; } }
.rate-card { border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: var(--radius); padding: 24px; background: var(--white); box-shadow: var(--shadow); }
.rate-card p:last-child { margin: 0; color: var(--muted); font-size: .97rem; }
.rate-amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand-deep); line-height: 1.1; margin-bottom: 12px; }
.rate-amount span { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.rate-amount-text { font-size: 1.45rem; padding-bottom: 1.15rem; }
.rate-ack { margin: 28px 0 0; padding: 16px 20px; background: var(--cream); border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0; max-width: 820px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1.5px solid var(--line); background: var(--cream); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .95rem; color: var(--brand-deep); }
.ack-quote { border-left: 4px solid var(--brand); padding-left: 14px; font-style: italic; }
.agreement-next { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); }
.agreement-next p { margin: 0; max-width: 60ch; }

/* ---- service agreement document ---- */
.doc { max-width: 780px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 5vw, 48px); box-shadow: var(--shadow); }
.doc h2 { font-size: 1.5rem; }
.doc h3 { font-size: 1.15rem; margin-top: 1.6em; }
.doc-rates { border: 2px solid var(--line); border-radius: 8px; padding: 18px 18px 6px 14px; margin-bottom: 1em; }
.doc-items { list-style: none; padding: 0; counter-reset: item; }
.doc-items > li { counter-increment: item; padding: 18px 0 6px; border-top: 1px solid var(--line); }
.doc-items > li::before { content: counter(item); display: block; font-size: .85rem; color: var(--muted); }
.doc-items .q { font-weight: 700; color: var(--brand-deep); margin-bottom: .4em; }
.doc-items .req { color: #b3261e; }

/* ---- larger computer screens: wider layout, slightly larger type, first screen filled ---- */
@media (min-width: 1100px) {
  .hero { min-height: min(calc(100vh - 76px), 920px); display: flex; align-items: center; }
  .hero > .container { width: 100%; }
  .hero-grid { grid-template-columns: 1fr 1.15fr; }
}
@media (min-width: 1440px) { :root { --wrap: 1320px; } }
@media (min-width: 1680px) { html { font-size: 106.25%; } :root { --wrap: 1440px; } }
@media (min-width: 2200px) { html { font-size: 118.75%; } :root { --wrap: 1640px; } .logo-img { height: 62px; } }

/* ---- header: shrinks after scrolling, thin progress line shows how far down the page you are ---- */
.header-inner, .logo-img { transition: min-height .2s ease, height .2s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(64, 21, 31, .10); }
.site-header.is-scrolled .header-inner { min-height: 62px; }
.site-header.is-scrolled .logo-img { height: 44px; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
@keyframes scroll-progress { to { transform: scaleX(1); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-progress { animation: scroll-progress linear both; animation-timeline: scroll(root); }
  }
}

/* ---- smooth fade between pages (browsers without support simply load normally) ---- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  .mobile-bar { view-transition-name: mobile-bar; }
  ::view-transition-old(root) { animation: .16s ease both vt-out; }
  ::view-transition-new(root) { animation: .3s ease both vt-in; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---- home: at-a-glance numbers ---- */
.stats { background: var(--white); border-bottom: 1px solid var(--line); padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.stat { border-left: 3px solid var(--brand); padding-left: 16px; }
.stat p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.stat .stat-num { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; color: var(--brand-deep); line-height: 1.1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 899px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- home: sideways-scrolling project photos ---- */
.gallery-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.gallery-head > div:first-child { max-width: 640px; }
.gallery-head .lead { margin-bottom: 0; }
.gallery-controls { display: flex; gap: 10px; align-items: center; }
.gallery-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--brand); background: var(--white);
  color: var(--brand); font-size: 1.25rem; font-weight: 700; cursor: pointer; transition: background-color .15s, color .15s;
}
.gallery-btn:hover { background: var(--brand); color: var(--white); }
.gallery-btn[disabled] { opacity: .35; cursor: default; background: var(--white); color: var(--brand); }
.gallery {
  --edge: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  padding: 4px var(--edge) 18px; scrollbar-width: thin; scrollbar-color: var(--brand) var(--cream); overscroll-behavior-x: contain;
}
.gallery-item { flex: 0 0 clamp(260px, 36vw, 470px); margin: 0; scroll-snap-align: start; }
.gallery-item .photo, .gallery-item .ph { box-shadow: var(--shadow); }
.gallery-item figcaption { margin-top: 10px; font-weight: 700; color: var(--brand-deep); font-size: .95rem; }
@media (max-width: 639px) { .gallery { --edge: 18px; } .gallery-item { flex-basis: 82vw; } .gallery-controls .gallery-btn { display: none; } }

/* ---- step-by-step request form ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form-steps { list-style: none; padding: 0; margin: 0 0 24px; display: none; gap: 8px; counter-reset: none; }
.js .form-steps { display: flex; }
.form-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--muted); padding-bottom: 10px; border-bottom: 3px solid var(--line); }
.form-steps li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--brand-deep); font-size: .8rem; flex-shrink: 0; }
.form-steps li.is-current { color: var(--brand-deep); border-color: var(--brand); }
.form-steps li.is-current span, .form-steps li.is-done span { background: var(--brand); color: var(--white); }
.form-steps li.is-done { border-color: var(--brand); }
@media (max-width: 479px) { .form-steps li { font-size: 0; gap: 0; justify-content: center; } .form-steps li span { font-size: .8rem; } }
.step-title { display: block; font-size: 1.2rem; font-weight: 750; color: var(--brand-deep); margin: 0 0 16px; outline: none; }
.js .form-step { display: none; }
.js .form-step.is-active { display: block; animation: step-in .3s ease both; }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } }
.form-step + .form-step { margin-top: 28px; }
.js .form-step + .form-step { margin-top: 0; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
html:not(.js) [data-next], html:not(.js) [data-back] { display: none; }

/* ---- subtle scroll reveal (only when JavaScript is on and motion is allowed) ---- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print { .site-header, .mobile-bar, .cta-band, .preview-bar, .site-footer { display: none; } .js .reveal { opacity: 1; transform: none; } }
