:root {
  color-scheme: dark;
  --bg: #080909;
  --panel: #111514;
  --panel-strong: #171c1b;
  --text: #f5f3ed;
  --muted: #b6b2a8;
  --line: rgba(245, 243, 237, 0.16);
  --red: #ef4136;
  --blue: #47b4d8;
  --steel: #8da09d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(8, 9, 9, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand,
nav,
.hero-actions,
.intro-band,
footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: white;
}

nav {
  gap: clamp(12px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.95rem;
}

nav a:hover,
nav a[aria-current="page"],
.mail-link:hover {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 132px clamp(20px, 6vw, 84px) 96px;
  border-bottom: 1px solid var(--line);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 9, 9, 0.82), rgba(8, 9, 9, 0.58) 42%, rgba(8, 9, 9, 0.12) 78%),
    linear-gradient(0deg, rgba(8, 9, 9, 0.84), rgba(8, 9, 9, 0) 38%);
}

.hero-content {
  position: relative;
  width: min(720px, 100%);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.72);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 9vw, 6.8rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

h3 {
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 630px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.07);
}

.intro-band {
  justify-content: center;
  gap: 1px;
  background: #0c0f0f;
  border-bottom: 1px solid var(--line);
}

.intro-band div {
  min-height: 132px;
  flex: 1;
  padding: 28px clamp(20px, 4vw, 46px);
  border-right: 1px solid var(--line);
}

.intro-band strong,
.intro-band span {
  display: block;
}

.intro-band strong {
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.intro-band span,
.section p {
  color: var(--muted);
}

.section {
  padding: clamp(70px, 9vw, 122px) clamp(20px, 6vw, 84px);
  border-bottom: 1px solid var(--line);
}

.page-hero {
  position: relative;
  padding: clamp(150px, 19vw, 214px) clamp(20px, 6vw, 84px) clamp(70px, 10vw, 132px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 9, 9, 0.88), rgba(8, 9, 9, 0.64) 46%, rgba(8, 9, 9, 0.2) 82%),
    linear-gradient(0deg, rgba(8, 9, 9, 0.92), rgba(8, 9, 9, 0.22) 46%),
    url("assets/underhood/underhood-a1.jpg") center / cover no-repeat,
    #090b0b;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.72);
}

.page-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 243, 237, 0.28), transparent);
  content: "";
}

.page-hero > * {
  position: relative;
}

.page-hero h1 {
  max-width: 13ch;
}

.page-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.two-column,
.quote-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 7vw, 92px);
}

.compact-section {
  background: #0c0f0f;
}

.process-list {
  display: grid;
  gap: 18px;
}

.process-list article,
.part-grid article,
.quote-form,
.photo-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.process-list article {
  position: relative;
  padding: 26px;
}

.process-list span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--red);
  font-weight: 900;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.work-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 44%),
    #090b0b;
}

.local-seo-section {
  background: #0c0f0f;
}

.service-area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-area-grid article {
  min-height: 230px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-area-grid h3 {
  margin-bottom: 12px;
}

.feature-section {
  background:
    linear-gradient(180deg, rgba(71, 180, 216, 0.08), transparent 34%),
    #090b0b;
}

.photo-grid,
.process-photo-grid {
  display: grid;
  gap: 16px;
}

.photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.photo-card {
  position: relative;
  margin: 0;
  min-height: 260px;
  overflow: hidden;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.photo-card figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 28px);
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(8, 9, 9, 0.76);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  backdrop-filter: blur(10px);
}

.photo-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-card-large img {
  aspect-ratio: 1 / 1;
}

.photo-card-wide {
  grid-column: span 2;
}

.photo-card-wide img {
  aspect-ratio: 16 / 10;
}

.process-photo-block {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: start;
  margin-top: clamp(42px, 6vw, 76px);
}

.process-photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.carousel {
  display: grid;
  gap: 18px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 243, 237, 0.34);
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 64vw);
  gap: 16px;
  overflow-x: auto;
  padding: 0 0 12px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--steel) rgba(255, 255, 255, 0.08);
}

.carousel-narrow .carousel-track {
  grid-auto-columns: minmax(320px, 48vw);
}

.carousel-slide {
  position: relative;
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.carousel-slide figcaption,
.photo-card figcaption {
  text-wrap: balance;
}

.carousel-slide figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(8, 9, 9, 0.78);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  backdrop-filter: blur(10px);
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.part-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.part-grid article {
  min-height: 230px;
  padding: 24px;
}

.quote-section {
  background:
    linear-gradient(135deg, rgba(239, 65, 54, 0.15), transparent 35%),
    linear-gradient(315deg, rgba(71, 180, 216, 0.13), transparent 36%),
    var(--panel-strong);
}

.mail-link {
  display: inline-flex;
  margin-top: 20px;
  color: var(--blue);
  font-weight: 800;
}

.quote-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #090b0b;
  color: var(--text);
  font: inherit;
  padding: 13px 14px;
}

input[type="file"] {
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(71, 180, 216, 0.52);
  border-color: var(--blue);
}

.field-note,
.form-status {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
}

.form-status.is-error {
  color: #ffbbb6;
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

footer {
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 6vw, 84px);
  color: var(--muted);
  background: #060707;
}

footer span:first-child {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
  }

  .two-column,
  .quote-section,
  .part-grid,
  .service-area-grid,
  .photo-strip,
  .process-photo-block {
    grid-template-columns: 1fr;
  }

  .photo-grid,
  .process-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-band {
    display: grid;
  }

  .intro-band div {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 90vh;
    padding-top: 168px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(8, 9, 9, 0.84), rgba(8, 9, 9, 0.58)),
      linear-gradient(0deg, rgba(8, 9, 9, 0.9), rgba(8, 9, 9, 0) 44%);
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.2rem);
  }

  .button {
    width: 100%;
  }

  .carousel-controls {
    justify-content: space-between;
  }

  .carousel-controls .button {
    width: auto;
  }

  .carousel-track,
  .carousel-narrow .carousel-track {
    grid-auto-columns: minmax(260px, 86vw);
  }

  .carousel-slide {
    min-height: 420px;
  }

  .carousel-slide img {
    aspect-ratio: 4 / 3;
  }

  .photo-grid,
  .process-photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-card,
  .photo-card-large,
  .photo-card-wide {
    grid-column: auto;
    grid-row: auto;
  }

  .photo-card,
  .photo-card img,
  .photo-card-large img,
  .photo-card-wide img {
    aspect-ratio: 4 / 3;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
