/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.9em 1.6em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out-quart),
              background-color var(--duration-fast) var(--ease-out-quart),
              border-color var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
}
/* Hover/press motion, fill sweep, and arrow live in motion.css; each variant
   only declares its colors and the --btn-fill its hover sweep paints. */
.btn-primary {
  --btn-fill: var(--color-accent-deep);
  background: var(--color-accent-strong);
  color: var(--color-white);
  box-shadow: 0 10px 24px -10px rgba(194, 65, 12, 0.55);
}

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

.btn-ghost {
  --btn-fill: var(--color-navy-900);
  background: transparent;
  border-color: var(--color-navy-700);
  color: var(--color-navy-900);
}
.btn-ghost:hover { color: var(--color-white); border-color: var(--color-navy-900); }

/* Focus states — one consistent, on-brand treatment for every keyboard-
   interactive element (nav links, buttons, service cards, form fields,
   footer links, mobile nav, nav toggle). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent-strong);
  outline-offset: 3px;
  border-radius: 2px;
}
.service-card:focus-visible {
  outline-offset: 2px;
  border-radius: var(--radius-md);
}
.nav-toggle:focus-visible {
  outline-offset: 1px;
  border-radius: var(--radius-sm);
}

/* Header, navigation, and footer live in layout.css. */

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 900px);
  display: flex;
  align-items: flex-end;
  color: var(--color-white);
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-navy-950), var(--color-navy-800));
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Warm, slightly dusk-toned grade so the photo reads like an evening
     hero shot rather than a flat daytime snapshot; the gradient below
     still carries the text-legibility work. */
  filter: brightness(0.9) saturate(1.15) sepia(0.08);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 13, 31, 0.55) 0%, rgba(7, 13, 31, 0.55) 40%, rgba(7, 13, 31, 0.94) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-xl) var(--space-lg);
  max-width: 46rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
}
.hero-badges li {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
}
.hero h1 { color: var(--color-white); margin-bottom: var(--space-xs); }
.hero .hero-kicker {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-orange-400);
  margin-bottom: var(--space-2xs);
}
.hero-lede {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  max-width: 38rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* Scroll reveals, hero entrance, and logo intro live in motion.css. */

/* Service grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}
/* Nine services: three even rows of three on wide screens (no orphan card). */
@media (min-width: 1000px) {
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.service-card {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-mist);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: transform var(--duration-normal) var(--ease-out-quart),
              box-shadow var(--duration-normal) var(--ease-out-quart),
              border-color var(--duration-normal) var(--ease-out-quart);
  text-decoration: none;
  display: block;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-card .service-icon {
  width: 44px;
  height: 44px;
  color: var(--color-accent-strong);
  margin-bottom: var(--space-sm);
}
.service-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-2xs); }
.service-card p { margin: 0; font-size: var(--text-sm); }
.service-card .card-arrow {
  display: inline-flex;
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent-strong);
  gap: 0.35em;
}
.service-card .card-arrow svg { transition: transform var(--duration-fast) var(--ease-out-quart); }
.service-card:hover .card-arrow svg { transform: translateX(4px); }

/* Split content section */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-xl);
  align-items: center;
}
.split.is-reversed { grid-template-columns: 0.95fr 1.05fr; }
.split.is-reversed .split-media { order: 2; }
@media (max-width: 900px) {
  .split, .split.is-reversed { grid-template-columns: 1fr; }
  .split.is-reversed .split-media { order: 0; }
}
/* aspect-ratio lives on the container, not the img: an <img> with a
   mismatched intrinsic ratio (e.g. a portrait photo) makes browsers
   prefer its natural ratio over a same-element aspect-ratio value,
   which let real photos render at full natural height instead of
   being cropped to the layout's box. Keeping the ratio on the
   container and sizing the img to 100%/100% avoids that entirely. */
.split-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.split-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}
.split-media:hover img { transform: scale(1.03); }
.split-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  display: grid;
  gap: var(--space-xs);
}
.split-list li {
  display: flex;
  gap: 0.6em;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.split-list li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* Operational process strip (commercial/multifamily) — deliberately a
   different content shape than the residential bullet list, so the two
   split sections don't read as one template mirrored twice. */
.process-steps {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
}
.process-step {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-navy-900);
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-step strong {
  display: block;
  color: var(--color-navy-900);
  font-size: var(--text-base);
  margin-bottom: 0.15em;
}
.process-step p {
  margin: 0;
  font-size: var(--text-sm);
}
.process-step:not(:last-child) {
  position: relative;
}
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  width: 2px;
  height: calc(100% - 8px);
  background: var(--color-mist);
}

/* Before/after case study (Painting) */
.case-study {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-mist);
}
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 700px) {
  .before-after { grid-template-columns: 1fr; }
}
.ba-item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.ba-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ba-tag {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  color: var(--color-white);
  background: rgba(11, 21, 48, 0.82);
}
.ba-tag--after { background: var(--color-accent-strong); }
.case-caption {
  margin: var(--space-md) 0 0;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-slate);
}

/* Photo placeholder block */
.photo-placeholder {
  position: relative;
  aspect-ratio: var(--ph-ratio, 4 / 3);
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(135deg, var(--color-mist) 0 12px, #fbfbfd 12px 24px);
  border: 1px dashed #c7cbdb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-slate);
  text-align: center;
  overflow: hidden;
}
.photo-placeholder span {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.5em 0.9em;
  border-radius: 999px;
}

.photo-placeholder--corner span {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
}

/* Project gallery */
/* Fixed column counts (4 / 2 / 1) so the four portfolio cards never leave a
   lone orphan on its own row, which auto-fit produced at ~1280px. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}
@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .project-grid { grid-template-columns: 1fr; }
}
.project-card {
  margin: 0; /* reset <figure>'s default 40px side margins */
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.project-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.project-card figcaption {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-navy-900);
}
.project-card .photo-placeholder { border-radius: 0; border: none; aspect-ratio: 4/3; }
.project-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}
.project-card:hover img { transform: scale(1.04); }

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}
.stat-item {
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-sm);
}
.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-white);
}
.stat-item span { font-size: var(--text-sm); color: rgba(231, 233, 240, 0.75); }

/* Painting division callout */
.division-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
  background: var(--color-navy-900);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}
.division-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(239, 108, 26, 0.25), transparent 55%);
  pointer-events: none;
}
.division-col { position: relative; z-index: 1; }
.division-col .division-label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(231, 233, 240, 0.65);
  margin-bottom: var(--space-3xs);
}
.division-col strong {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  display: block;
}
.division-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  position: relative;
  z-index: 1;
}
.division-arrow svg { width: 32px; height: 32px; }
@media (max-width: 760px) {
  .division-panel { grid-template-columns: 1fr; text-align: center; }
  .division-arrow svg { transform: rotate(90deg); }
}

/* Form */
.estimate-form {
  display: grid;
  gap: var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-mist);
}
.form-head h2 { font-size: var(--text-xl); margin-bottom: var(--space-3xs); }
.form-head p { margin: 0; font-size: var(--text-sm); }
.form-fieldset {
  display: grid;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.form-fieldset legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin-bottom: var(--space-md);
  padding: 0 0 var(--space-xs);
  border-bottom: 1px solid var(--color-mist);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-navy-900);
}
.form-fieldset legend span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-navy-900);
  color: var(--color-white);
  font-size: var(--text-xs);
}
.form-row { display: grid; gap: var(--space-md); grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.45rem; }
/* Honeypot: present in the DOM for bots to fill, invisible and
   unreachable for real visitors (off-screen, not tab-focusable). */
.field--hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--color-navy-900); }
.field .req { color: var(--color-accent-strong); margin-left: 0.15em; }
.field .optional { font-weight: 500; color: var(--color-slate); font-size: var(--text-xs); margin-left: 0.35em; }
.field input, .field select, .field textarea {
  font: inherit;
  min-height: 48px;
  padding: 0.75em 0.95em;
  border: 1px solid #d5d9e4;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
}
.field textarea { min-height: 128px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a8fa0; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b6bccc; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent-strong);
  box-shadow: 0 0 0 4px rgba(239, 108, 26, 0.16);
}
/* Error state: shown only after the visitor has interacted (:user-invalid)
   or after a submit attempt flags the field (aria-invalid). */
.field input:user-invalid, .field textarea:user-invalid,
.field [aria-invalid="true"] {
  border-color: #b42318;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}
.field-error {
  display: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: #b42318;
}
.field:has(:user-invalid) .field-error,
.field:has([aria-invalid="true"]) .field-error { display: block; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}
.form-actions .btn { min-height: 52px; padding-inline: 2em; }
.form-note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-slate);
}
.form-status {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.85em 1em;
  border-radius: var(--radius-sm);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-error { background: #fdeceb; color: #9c2b1a; }
.form-status.is-info { background: #eef2ff; color: var(--color-navy-800); }
.form-note .text-link { font-size: inherit; }

/* Optional SMS consent: unchecked by default, wording stored with the lead */
.consent-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  background: var(--color-fog);
}
.consent-field input {
  width: 20px;
  height: 20px;
  margin: 0.15rem 0 0;
  accent-color: var(--color-accent-strong);
}
.consent-field input:focus-visible {
  outline: 3px solid var(--color-accent-strong);
  outline-offset: 2px;
}
.consent-field label { font-size: var(--text-xs); color: var(--color-slate); line-height: 1.55; }
.turnstile-slot { min-height: 65px; }

.estimate-form .btn[disabled] { opacity: 0.7; cursor: progress; }

/* Submission confirmation (replaces the form in place) */
.form-success {
  display: grid;
  gap: var(--space-sm);
  align-content: start;
  justify-items: start;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-mist);
  border-top: 4px solid var(--color-accent);
}
.form-success:focus { outline: none; }
.form-success:focus-visible { outline: 3px solid var(--color-accent-strong); outline-offset: 4px; }
.form-success h2 { font-size: var(--text-xl); margin: 0; }
.form-success p { margin: 0; }
.form-success-lede { font-size: var(--text-base); color: var(--color-text); }
.form-success-ref { font-size: var(--text-sm); color: var(--color-slate); }
.form-success-ref strong { font-family: var(--font-display); letter-spacing: 0.08em; color: var(--color-navy-900); }
.form-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-navy-900);
  color: var(--color-orange-400);
}
.form-success-icon svg { width: 26px; height: 26px; }
.form-success .btn { margin-top: var(--space-2xs); }
@media (prefers-reduced-motion: no-preference) {
  .form-success:not([hidden]) { animation: success-in var(--duration-normal) var(--ease-out-expo); }
  @keyframes success-in { from { opacity: 0; transform: translateY(12px); } }
}

/* Areas list */
.area-photo {
  display: block;
  width: 100%;
  max-width: 46rem;
  margin: var(--space-lg) auto 0;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.areas-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  list-style: none;
  padding: 0;
  margin: 0;
}
.areas-chip-list li {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.5em 1em;
  border-radius: 999px;
  background: var(--color-surface-alt);
  color: var(--color-navy-800);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy-900);
  color: var(--color-white);
  padding: 0.75em 1.2em;
  z-index: 100;
}
.skip-link:focus { left: var(--gutter); }
