/* The Forge page polish — V5
   Static cleanup only. Gallery mechanics and forge chamber styles remain in forge-gallery.css. */

:root {
  --section-space: clamp(72px, 7vw, 104px);
  --section-space-mobile: 68px;
  --panel-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --panel-shadow-soft: 0 16px 44px rgba(0, 0, 0, 0.18);
}

html {
  scroll-padding-top: 76px;
}

section[id] {
  scroll-margin-top: 76px;
}

section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

/* Keyboard and touch clarity */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(217, 79, 30, 0.92);
  outline-offset: 3px;
}

button,
.btn-primary,
.btn-outline-forge,
.nav-cta {
  min-height: 44px;
}

.section-label {
  margin-bottom: 12px;
}

h2.section-title {
  max-width: 17ch;
  margin-bottom: 18px;
  text-wrap: balance;
}

.section-body {
  color: rgba(232, 228, 223, 0.68);
  max-width: 66ch;
}

.section-body-spaced {
  margin-top: 16px;
}

.text-link {
  color: var(--ember);
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 79, 30, 0.42);
  transition: color var(--transition), border-color var(--transition);
}

.text-link:hover {
  color: #ef6a37;
  border-color: rgba(239, 106, 55, 0.8);
}

/* Navigation: preserve structure, refine fit and clarity */
#nav {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
}

.nav-logo-img {
  object-fit: contain;
}

.nav-links a,
.nav-cta,
.nav-mobile a {
  white-space: nowrap;
}

/* Hero image: the new source is cropped to remove baked white edges. */
.forge-hero-media {
  background: #0c0b0b;
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: var(--panel-shadow);
}

.forge-hero-media img {
  transform: scale(1.004);
}

.forge-hero-sub {
  max-width: 50ch;
}

.forge-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* About: give the copy a deliberate reading width and a subtle steel edge. */
#about-forge {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 80% at 93% 35%, rgba(176, 112, 58, 0.055), transparent 64%),
    linear-gradient(180deg, #0d0c0c 0%, #100f0f 100%);
}

#about-forge::after {
  content: '';
  position: absolute;
  top: 18%;
  right: clamp(24px, 6vw, 100px);
  width: 1px;
  height: 64%;
  background: linear-gradient(180deg, transparent, rgba(176, 112, 58, 0.32), transparent);
  pointer-events: none;
}

#about-forge .fade-up {
  max-width: 820px;
}

/* What We Build: unify card height, hierarchy, and hover behavior. */
.wwb-content {
  position: relative;
  z-index: 1;
}

.work-types-grid {
  align-items: stretch;
  gap: 18px;
}

.work-type-card {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.035), rgba(255,255,255,0.014)),
    rgba(11, 10, 10, 0.58);
  border-color: rgba(255, 255, 255, 0.085);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.work-type-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(217,79,30,0.75), rgba(176,112,58,0.16), transparent 76%);
  opacity: 0.72;
}

.work-type-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 79, 30, 0.42);
  background:
    linear-gradient(145deg, rgba(217,79,30,0.05), rgba(255,255,255,0.018)),
    rgba(11, 10, 10, 0.64);
}

.work-type-card h3 {
  line-height: 1.25;
}

.work-type-card p {
  max-width: 56ch;
}

/* Gallery section: static framing only; mechanics remain frozen. */
#builds {
  position: relative;
  background:
    radial-gradient(ellipse 52% 42% at 50% 45%, rgba(217,79,30,0.045), transparent 72%),
    #0c0b0b;
}

.builds-header-copy > p:last-child {
  max-width: 62ch;
  color: rgba(232, 228, 223, 0.66);
  font-weight: 300;
  line-height: 1.72;
}

.forge-gallery {
  margin-top: 46px;
}

.builds-cta {
  margin-top: 26px;
  font-size: 0.94rem;
  font-weight: 300;
  color: rgba(232, 228, 223, 0.64);
  line-height: 1.72;
  max-width: 64ch;
}

/* Process: eliminate the baked white border, improve image balance and steps. */
#process {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.012), transparent 18%),
    var(--bg);
  border-top: 1px solid var(--border);
}

.process-layout {
  gap: clamp(32px, 4vw, 54px);
}

.process-photo {
  min-height: 440px;
  border-color: rgba(255, 255, 255, 0.075);
  background: #0b0a0a;
  box-shadow: var(--panel-shadow-soft);
}

.process-photo img {
  transform: scale(1.006);
}

.process-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.process-photo::after {
  z-index: 2;
  background:
    linear-gradient(to top, rgba(12,11,11,0.78) 0%, rgba(12,11,11,0.1) 48%, transparent 68%),
    linear-gradient(105deg, rgba(217,79,30,0.075), transparent 45%);
}

.process-photo-caption {
  z-index: 3;
  color: rgba(245, 242, 238, 0.9);
}

.process-grid {
  gap: 16px;
}

.process-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 18px;
  align-content: center;
  min-height: 132px;
  padding: 24px 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.026), rgba(255,255,255,0.012));
  border-color: rgba(255, 255, 255, 0.075);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.13);
}

.process-num {
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  text-align: center;
  font-size: 2.45rem;
  color: rgba(217, 79, 30, 0.44);
}

.process-step h3,
.process-step p {
  grid-column: 2;
}

.process-step h3 {
  margin-bottom: 7px;
}

/* Intake: improve hierarchy and field usability without changing form logic. */
#forge-intake {
  background:
    radial-gradient(ellipse 50% 42% at 86% 12%, rgba(217,79,30,0.055), transparent 70%),
    var(--surface);
}

.intake-grid {
  gap: clamp(44px, 6vw, 72px);
}

.intake-qualify {
  background: linear-gradient(145deg, rgba(217,79,30,0.075), rgba(176,112,58,0.025));
  border-color: rgba(217, 79, 30, 0.28);
}

.intake-qualify-lead {
  color: var(--ember);
  font-weight: 600;
}

.build-sheet {
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: var(--panel-shadow-soft);
}

.sheet-header {
  background:
    linear-gradient(100deg, rgba(217,79,30,0.045), transparent 42%),
    rgba(255,255,255,0.025);
}

.forge-form label {
  gap: 7px;
  line-height: 1.35;
}

.forge-form input,
.forge-form select,
.forge-form textarea {
  min-height: 46px;
  padding: 11px 13px;
  line-height: 1.4;
}

.forge-form textarea {
  min-height: 96px;
}

.forge-form input::placeholder,
.forge-form textarea::placeholder {
  color: rgba(138, 132, 128, 0.72);
}

.checkbox-section-label {
  text-transform: uppercase;
  margin-bottom: 2px;
}

.checkbox-section-note {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.required-note {
  color: var(--copper);
  font-weight: 600;
}

.forge-form .checkbox-grid {
  padding: 4px 0 2px;
}

.forge-form .checkbox-grid label {
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 3px;
  transition: background var(--transition);
}

.forge-form .checkbox-grid label:hover {
  background: rgba(255, 255, 255, 0.035);
}

.forge-submit {
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}

.form-note {
  margin-top: 2px;
}

/* Footer cleanup */
.footer-hours-note {
  font-size: 0.78rem;
  color: rgba(138,132,128,0.6);
  margin-top: 8px;
  font-weight: 300;
}

.footer-merch-link {
  color: var(--gold) !important;
  margin-top: 6px;
}

@media (max-width: 860px) {
  #about-forge::after {
    display: none;
  }

  .forge-hero-media {
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  }

  .process-photo {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  :root {
    --section-space: var(--section-space-mobile);
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .work-type-card {
    min-height: auto;
    padding: 26px 24px;
  }

  .process-step {
    grid-template-columns: 50px 1fr;
    column-gap: 14px;
    padding: 22px 20px;
  }

  .process-num {
    font-size: 2.1rem;
  }

  .sheet-title {
    font-size: 1.35rem;
  }
}

@media (max-width: 520px) {
  html {
    scroll-padding-top: 68px;
  }

  section[id] {
    scroll-margin-top: 68px;
  }

  .forge-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .forge-hero-actions a {
    width: 100%;
  }

  .process-photo {
    min-height: 310px;
  }

  .process-step {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .process-num {
    grid-row: auto;
    grid-column: 1;
    text-align: left;
  }

  .process-step h3,
  .process-step p {
    grid-column: 1;
  }

  .forge-form .checkbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-type-card:hover {
    transform: none;
  }
}

/* ═══ V5: PROJECT COPY, PHOTO CLARITY, STATIC ATMOSPHERE ═══════ */

/* The project-car story now begins before the gallery, but stays quiet
   enough that the long-form copy remains the primary reading experience. */
#about-forge::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      #0d0c0c 0%,
      rgba(13, 12, 12, 0.98) 42%,
      rgba(13, 12, 12, 0.78) 68%,
      rgba(13, 12, 12, 0.9) 100%),
    url('/images/build-civic-hatch.jpg') right 43% / min(50vw, 720px) auto no-repeat;
  opacity: 0.38;
  filter: saturate(0.72) contrast(1.08);
  pointer-events: none;
}

#about-forge .container {
  position: relative;
  z-index: 1;
}

/* Replace the placeholder gradient-only treatment with an authentic shop
   detail. The dark overlay keeps the cards legible while allowing the page
   to inherit the visual rhythm of the main site. */
.wwb-bg {
  background-image: url('/images/forge-texture.jpg');
  background-position: center 48%;
  background-size: cover;
  filter: saturate(0.7) contrast(1.14) brightness(0.72);
  transform: scale(1.015);
}

.wwb-overlay {
  background:
    linear-gradient(90deg, rgba(13,12,12,0.9) 0%, rgba(13,12,12,0.72) 52%, rgba(13,12,12,0.84) 100%),
    linear-gradient(180deg, rgba(13,12,12,0.64) 0%, rgba(13,12,12,0.88) 100%);
}

.work-type-card {
  backdrop-filter: blur(2px);
}

/* Preserve the documentary value of the consultation photo. V4's dual
   overlays buried both faces; V5 limits shading to the caption edge. */
.process-photo img {
  filter: brightness(1.09) contrast(1.035) saturate(1.04);
}

.process-photo::after {
  background:
    linear-gradient(to top,
      rgba(12,11,11,0.48) 0%,
      rgba(12,11,11,0.12) 18%,
      transparent 40%),
    linear-gradient(105deg, rgba(217,79,30,0.022), transparent 38%);
}

/* The intake gets a restrained real-shop backdrop on the copy side only.
   The form remains on a calm solid field and retains full contrast. */
#forge-intake {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

#forge-intake::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('/images/services-bg.jpg') left 44% / cover no-repeat;
  opacity: 0.14;
  filter: grayscale(0.2) saturate(0.72) contrast(1.08);
  -webkit-mask-image: linear-gradient(90deg, black 0%, rgba(0,0,0,0.94) 35%, transparent 68%);
  mask-image: linear-gradient(90deg, black 0%, rgba(0,0,0,0.94) 35%, transparent 68%);
  pointer-events: none;
}

#forge-intake::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 42% 48% at 13% 50%, rgba(217,79,30,0.08), transparent 72%),
    linear-gradient(90deg, rgba(26,25,24,0.2), rgba(26,25,24,0.82) 52%, var(--surface) 72%);
  pointer-events: none;
}

#forge-intake > .container {
  position: relative;
  z-index: 1;
}

/* Quiet industrial separators distribute visual interest between sections
   without requiring animated flames or post-processing. */
#about-forge,
.wwb,
#builds,
#process,
#forge-intake {
  background-clip: padding-box;
}

#process::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(78%, 980px);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(176,112,58,0.28), transparent);
  pointer-events: none;
}

@media (max-width: 860px) {
  #about-forge::before {
    background:
      linear-gradient(180deg, rgba(13,12,12,0.94) 0%, rgba(13,12,12,0.9) 62%, rgba(13,12,12,0.97) 100%),
      url('/images/build-civic-hatch.jpg') center 56% / cover no-repeat;
    opacity: 0.25;
  }

  .wwb-bg {
    background-position: 56% center;
  }

  #forge-intake::before {
    opacity: 0.08;
    -webkit-mask-image: linear-gradient(180deg, black 0%, transparent 48%);
    mask-image: linear-gradient(180deg, black 0%, transparent 48%);
  }

  #forge-intake::after {
    background:
      radial-gradient(ellipse 75% 28% at 45% 4%, rgba(217,79,30,0.06), transparent 72%),
      linear-gradient(180deg, rgba(26,25,24,0.5), var(--surface) 42%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wwb-bg {
    transform: none;
  }
}



/* ── V6: exact consultation photo, no crop or treatment ───────────────
   The uploaded portrait JPG is used byte-for-byte. The layout adapts to
   its native 1288×2047 composition instead of forcing it into a crop. */
#process .process-layout {
  grid-template-columns: minmax(340px, 410px) minmax(0, 1fr);
  gap: clamp(34px, 4vw, 58px);
  align-items: stretch;
}

#process .process-photo {
  min-height: 0;
  height: auto;
  align-self: start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0b0a0a;
}

#process .process-photo img {
  position: static;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 1288 / 2047;
  object-fit: contain;
  object-position: center;
  display: block;
  transform: none;
  filter: none;
}

#process .process-photo::before,
#process .process-photo::after {
  content: none;
  display: none;
}

#process .process-photo-caption {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 0;
  padding: 14px 18px 15px;
  border-top: 1px solid rgba(255,255,255,0.065);
  background: linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.008));
  color: rgba(245,242,238,0.88);
  line-height: 1.45;
}

#process .process-grid {
  grid-template-rows: repeat(3, minmax(0, 1fr));
  height: 100%;
  gap: 16px;
}

#process .process-step {
  min-height: 0;
}

@media (max-width: 980px) {
  #process .process-layout {
    grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
    gap: 30px;
  }

  #process .process-step {
    grid-template-columns: 54px 1fr;
    column-gap: 14px;
    padding: 20px 20px;
  }
}

@media (max-width: 860px) {
  #process .process-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  #process .process-photo {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  #process .process-grid {
    height: auto;
    grid-template-rows: none;
  }
}

@media (max-width: 520px) {
  #process .process-photo {
    width: 100%;
  }

  #process .process-photo-caption {
    padding: 12px 14px 13px;
    font-size: 0.68rem;
  }
}

/* ── V7: mobile How It Works card layout repair ──────────────────────
   V6's later tablet rule overrode the earlier single-column mobile rule,
   while the heading/body still targeted column 1. That constrained copy
   to the 54px number rail. Keep a deliberate two-column card instead. */
@media (max-width: 520px) {
  #process .process-step {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 6px;
    align-content: start;
    min-height: 0;
    padding: 20px 18px;
  }

  #process .process-num {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    text-align: left;
    font-size: 1.9rem;
    line-height: 1;
    margin: 1px 0 0;
  }

  #process .process-step h3,
  #process .process-step p {
    grid-column: 2;
    min-width: 0;
    width: auto;
  }

  #process .process-step h3 {
    grid-row: 1;
    margin: 0;
    line-height: 1.35;
  }

  #process .process-step p {
    grid-row: 2;
    margin: 0;
    line-height: 1.65;
    overflow-wrap: normal;
    word-break: normal;
  }
}


/* ═══ V8.6: FINAL THREE-ITEM VISUAL CLEANUP ═══════════════ */
/* Contain the Civic proof image so it reads as evidence rather than a
   second background layer competing with the hero and the section below. */
#about-forge::before {
  display: none;
}

#about-forge::after {
  top: auto;
  right: auto;
  bottom: 0;
  left: 50%;
  width: min(78%, 980px);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(176,112,58,0.32), transparent);
}

.about-forge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}

#about-forge .about-forge-copy {
  max-width: 650px;
}

.about-forge-proof {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(176,112,58,0.34);
  background: #090909;
  box-shadow:
    0 24px 58px rgba(0,0,0,0.38),
    inset 0 0 0 1px rgba(255,255,255,0.025);
}

.about-forge-proof::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(9,9,9,0.3) 0%, transparent 18%),
    linear-gradient(180deg, transparent 55%, rgba(7,7,7,0.68) 100%);
}

.about-forge-proof picture,
.about-forge-proof img {
  display: block;
  width: 100%;
}

.about-forge-proof img {
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  filter: brightness(0.76) saturate(0.82) contrast(1.12);
  transform: scale(1.006);
}

.about-forge-proof figcaption {
  position: absolute;
  z-index: 1;
  right: 22px;
  bottom: 18px;
  left: 22px;
  margin: 0;
  font-family: var(--font-cond);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
  color: rgba(244,239,231,0.82);
}

@media (max-width: 900px) {
  .about-forge-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  #about-forge .about-forge-copy {
    max-width: 760px;
  }

  .about-forge-proof {
    width: min(100%, 680px);
  }
}

@media (max-width: 560px) {
  .about-forge-grid {
    gap: 28px;
  }

  .about-forge-proof figcaption {
    right: 16px;
    bottom: 14px;
    left: 16px;
    font-size: 0.61rem;
  }

  .about-forge-proof img {
    filter: brightness(0.7) saturate(0.78) contrast(1.12);
  }
}
