/* ============================================================
   JA Design & Renovations — main stylesheet
   Design tokens are documented in DESIGN-SYSTEM.md
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Color — derived from the actual portfolio photography:
     white gallery ground, mortar-toned warm neutrals, and a fired-brick
     accent matched to the DC-area masonry that recurs in the exteriors. */
  --paper: #FFFFFF;        /* page background */
  --board: #F7F5F1;        /* alternate section background (mortar off-white) */
  --board-deep: #EAE6DE;   /* image loading ground */
  --ink: #24211D;          /* primary text (warm graphite) */
  --muted: #5C564D;        /* secondary text */
  --line: #E5E1D8;         /* hairlines */
  --line-strong: #BDB5A7;  /* stronger rules */
  --slate: #86392B;        /* the one accent: fired brick — buttons, links, labels */
  --slate-deep: #64281C;   /* accent hover */
  --slate-tint: #F6EEE8;   /* very light accent wash */
  --footer-bg: #201D19;    /* footer background */
  --focus: #86392B;        /* keyboard focus */
  --error: #A63D2F;        /* functional only */
  --success: #2F6C46;      /* functional only */
  --white: #FFFFFF;

  /* Type */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Layout */
  --container: 1120px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(36, 33, 29, 0.06);
  --shadow-md: 0 8px 24px rgba(36, 33, 29, 0.10);
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.15rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 650; }
h3 { font-size: 1.22rem; font-weight: 650; line-height: 1.3; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.13rem; color: var(--muted); max-width: 62ch; }

a { color: var(--slate); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--slate-deep); }

ul { padding-left: 1.2rem; }

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

::selection { background: var(--slate); color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -48px; left: 12px;
  z-index: 200;
  background: var(--slate);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: var(--white); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.section--alt { background: var(--board); }
.section--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.6rem, 3.5vw, 2.5rem);
}
.section-head h2 { margin-bottom: 0.25em; }
.section-head p { margin: 0; color: var(--muted); max-width: 56ch; }

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.82rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--slate); color: var(--white); }
.btn-primary:hover { background: var(--slate-deep); color: var(--white); }

.btn-outline { border-color: var(--slate); color: var(--slate); background: transparent; }
.btn-outline:hover { background: var(--slate-tint); color: var(--slate-deep); }

.btn-inverse { background: var(--white); color: var(--slate); }
.btn-inverse:hover { background: var(--board); color: var(--slate-deep); }

.btn-ghost-inverse { border-color: rgba(255, 255, 255, 0.55); color: var(--white); background: transparent; }
.btn-ghost-inverse:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); color: var(--white); }

.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow::after { content: "\2192"; transition: transform 0.15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}
.header-inner .brand { margin-right: auto; }
.header-controls { display: none; align-items: center; gap: 0.6rem; }

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand--wordmark {
  gap: 0.62rem;
}
.brand-logo {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 2.1rem;
  object-fit: contain;
}
.brand-copy {
  display: inline-grid;
  gap: 0.12rem;
  min-width: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.04rem, 1vw, 1.15rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.brand-byline {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.site-nav { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.8vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a:not(.btn) {
  text-decoration: none;
  font-weight: 550;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.nav-menu a:not(.btn):hover { color: var(--slate); }
.nav-menu a[aria-current="page"] {
  color: var(--slate);
  border-bottom-color: var(--slate);
}

.nav-phone a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 650 !important;
  color: var(--slate) !important;
  white-space: nowrap;
}
@media (min-width: 961px) {
  .nav-phone a { color: var(--ink) !important; }
  .nav-phone a:hover { color: var(--slate-deep) !important; }
}
.nav-phone svg { width: 17px; height: 17px; flex: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  font: 600 0.85rem var(--font-body);
  color: var(--ink);
}
.nav-toggle-box {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}
.nav-toggle-box span {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Header Call Now for the tablet range (641–960px): the desktop nav is
   collapsed there and the fixed Call/Text bar only exists ≤640px, so
   without this the header would have no visible call CTA. */
.header-cta {
  display: none;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
}

.header-phone-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line-strong);
  color: var(--slate);
}
.header-phone-mobile svg { width: 19px; height: 19px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.75rem, 6vw, 5rem); overflow: clip; }
.hero-inner { display: grid; align-items: center; gap: clamp(2rem, 5vw, 5.5rem); }
.hero--with-image .hero-copy { max-width: 40rem; }
.hero-media {
  margin: 0;
  max-width: 34rem;
  justify-self: center;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--board-deep);
}
.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.hero-copy { max-width: 44rem; }

.hero-sub { font-size: 1.14rem; color: var(--muted); max-width: 56ch; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.hero-contact {
  margin-top: 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.hero-contact a { font-weight: 650; text-decoration: none; }

.mobile-contact-bar { display: none; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.service-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.service-card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.service-card-body p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.service-card-body .link-arrow { margin-top: 0.35rem; }

.why-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}
.why-item h3 { font-size: 1.08rem; margin-bottom: 0.35em; }
.why-item p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.project-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.project-card img { display: block; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.project-card-body { padding: 0.9rem 1rem 1rem; }
/* Category label — plain small caps, no pill. Reserved for when project
   titles become project-specific and the category is extra information. */
.project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.project-card h3 { font-size: 1.02rem; margin-bottom: 0.25em; }
.project-count { display: block; color: var(--muted); font-size: 0.88rem; }
.project-location { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.project-card p { color: var(--muted); font-size: 0.95rem; }

.featured-work-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 520px) {
  .featured-work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 820px) {
  .featured-work-grid { grid-template-columns: repeat(3, 1fr); }
}
.featured-work-card {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.featured-work-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.featured-work-card:hover h3 { color: var(--slate); }
.featured-work-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.featured-work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.featured-work-card-body { display: block; padding: 0.75rem 0.9rem 0.85rem; }
.featured-work-card h3 { font-size: 0.98rem; margin-bottom: 0; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.9rem;
}
.filter-btn {
  font: 600 0.88rem var(--font-body);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-btn:hover { border-color: var(--slate); color: var(--slate); }
.filter-btn[aria-pressed="true"] {
  background: var(--slate);
  border-color: var(--slate);
  color: var(--white);
}

.empty-state {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 720px;
}
.empty-state h2 { font-size: 1.35rem; }
.empty-state p { color: var(--muted); }
.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

/* "What the work covers" block — shown with the empty state, hidden once projects exist */
.projects-coverage { margin-top: clamp(2rem, 4vw, 3rem); max-width: 720px; }
.projects-coverage h2 { font-size: 1.35rem; margin-bottom: 1rem; }

/* Project modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(24, 21, 17, 0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2.5rem);
  overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  max-width: 860px;
  width: 100%;
  margin-block: auto;
  padding: clamp(1.4rem, 3.5vw, 2.25rem);
  position: relative;
  box-shadow: var(--shadow-md);
}
.modal-close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { border-color: var(--slate); color: var(--slate); }
.modal .project-tag { margin-bottom: 0.8rem; }
.modal h2 { padding-right: 3rem; }
.modal-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.75rem; }

.modal-gallery { display: grid; gap: 1.1rem; margin-top: 1.4rem; }
.modal-figure { position: relative; margin: 0; }
.modal-figure img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}
.stage-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  font: 650 0.72rem/1 var(--font-body);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
}
.modal-figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.45rem; }
.modal-show-more { margin-top: 1.25rem; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.testimonial-card blockquote {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}
.testimonial-card blockquote::before { content: "\201C"; color: var(--slate); font-family: var(--font-display); font-size: 1.6rem; line-height: 0; margin-right: 2px; }
.testimonial-source { font-size: 0.92rem; color: var(--muted); }
.testimonial-source strong { color: var(--ink); display: block; font-weight: 650; }
.testimonial-stars { color: var(--slate); letter-spacing: 2px; font-size: 0.95rem; }

/* ---------- Practical information strip ---------- */
.practical-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.4rem, 3vw, 2rem);
}
.practical-strip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.75rem;
}
.practical-strip p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--slate); color: var(--white); }
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--white); max-width: 58ch; }
.cta-band .container {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 2rem;
  align-items: center;
}
.cta-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.cta-band a:not(.btn) { color: var(--white); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(2.5rem, 5.5vw, 4.25rem) clamp(1.75rem, 4vw, 2.75rem); }
.page-hero .lede { margin-top: 0.35rem; }
body[data-page="contact"] .page-hero { padding-top: clamp(1.9rem, 4vw, 3rem); }

/* ---------- Services page ---------- */
.service-section { padding-block: clamp(2.5rem, 5.5vw, 4rem); border-top: 1px solid var(--line); }
.service-section:first-of-type { border-top: 0; }

.service-section-grid { max-width: 46rem; }
.service-section-intro { color: var(--muted); max-width: 56ch; }

.service-list { display: grid; gap: 1.35rem; margin-top: 1.6rem; }
.service-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--slate);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
}
.service-item h3 { font-size: 1.08rem; margin-bottom: 0.3em; }
.service-item p { color: var(--muted); font-size: 0.97rem; }

/* ---------- About page ---------- */
.about-grid { max-width: 46rem; }
.about-photo {
  margin: 0 0 2.25rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--board-deep);
}
.about-photo img { display: block; width: 100%; height: auto; }
.about-copy h2 { margin-top: 1.9rem; font-size: 1.45rem; }
.about-copy h2:first-of-type { margin-top: 0; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: start;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}
.contact-row { padding-block: 0.85rem; border-top: 1px solid var(--line); }
.contact-row-label { display: block; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact-row-value { font-weight: 600; }
.contact-row-value a { text-decoration: none; }
.contact-note { margin-top: 1.1rem; font-size: 0.93rem; color: var(--muted); }

.contact-grid--single { grid-template-columns: minmax(0, 720px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.82);
  padding-block: clamp(2.75rem, 6vw, 4rem) 0;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
}
.site-footer .brand { color: var(--paper); }
.site-footer .brand-byline { color: rgba(255, 255, 255, 0.62); }
.footer-blurb { margin-top: 1rem; font-size: 0.95rem; max-width: 40ch; color: rgba(255, 255, 255, 0.66); }

.footer-heading {
  font: 650 0.78rem/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 1rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-links a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }

.footer-contact { display: grid; gap: 0.7rem; font-size: 0.97rem; }
/* The email address is one long token; without this it overflows the
   narrow contact column in the 641–760px range. */
.footer-contact p { margin: 0; overflow-wrap: anywhere; }
.footer-contact a { color: var(--paper); text-decoration: none; font-weight: 600; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact .label { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }

.footer-social { list-style: none; display: flex; gap: 0.8rem; margin: 1.25rem 0 0; padding: 0; }
.footer-social a { color: rgba(255, 255, 255, 0.85); text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px; padding: 0.4rem 0.8rem; font-size: 0.9rem; }
.footer-social a:hover { border-color: var(--paper); color: var(--white); }

.footer-bottom p { margin: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Responsive ---------- */
@media (min-width: 760px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr); }
  .hero-media { justify-self: end; width: min(100%, 34rem); }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header-phone-mobile { display: inline-flex; }
  .header-cta { display: inline-flex; }
  .header-controls { display: flex; }
  /* With the Call Now button in the collapsed header, the brand must be
     allowed to wrap at the narrow end of the tablet range. */
  .brand-name { white-space: normal; }

  .site-nav { position: static; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { border-top: 1px solid var(--line); }
  .nav-menu li:first-child { border-top: 0; }
  .nav-menu a:not(.btn) { display: block; padding: 0.85rem 0.15rem; border-bottom: 0; }
  .nav-menu a[aria-current="page"] { border-bottom: 0; font-weight: 700; }
  .nav-phone { padding-top: 0.85rem; }
  .nav-cta { display: none; }

  .contact-grid,
  .cta-band .container { grid-template-columns: 1fr; }

  .contact-card { position: static; }
}

@media (max-width: 640px) {
  .header-cta { display: none; } /* the fixed Call/Text bar takes over */
  .header-inner { gap: 0.75rem; }
  .header-inner .brand { max-width: calc(100% - 126px); }
  .brand--wordmark { gap: 0.5rem; }
  .brand-logo { width: 1.5rem; height: 1.85rem; }
  .brand-name { font-size: clamp(0.9rem, 4.25vw, 1rem); white-space: normal; }
  .brand-byline { font-size: 0.68rem; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 0.5rem; }
  .hero-actions .btn { width: 100%; }
  .hero-contact { display: none; }
  .hero-media { width: min(100%, 25rem); }
  .contact-actions .btn { width: 100%; }
  .cta-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }

  body { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
  .mobile-contact-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 150;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0.6rem max(1rem, env(safe-area-inset-right)) calc(0.6rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(32, 35, 38, 0.12);
  }
  .mobile-contact-bar a {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--slate);
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
  }
  .mobile-contact-bar a:first-child { background: var(--slate); color: var(--white); }
  .mobile-contact-bar a:last-child { background: var(--white); color: var(--slate); }
}

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