:root {
  --ink: #0B0C0A;
  --panel: #171916;
  --panel-deep: #10120F;
  --paper: #E9E6DB;
  --muted: #A9ADA2;
  --signal: #FFB800;
  --line: #3B4038;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration-color: var(--signal);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--signal);
}

a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

header,
main,
footer {
  width: min(100% - 48px, 1200px);
  margin-inline: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}

header > .brand {
  margin: 0;
  color: var(--signal);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.45;
  max-width: 34rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.8rem;
}

nav a {
  text-decoration: none;
}

#menu-toggle,
#quote-form button {
  padding: 12px 16px;
  border: 1px solid var(--signal);
  border-radius: 0;
  background: var(--signal);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

#menu-toggle:hover,
#quote-form button:hover {
  background: var(--ink);
  color: var(--signal);
}

section {
  padding-block: 88px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p,
ul,
figure {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 940px;
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 7vw, 6.6rem);
}

h2 {
  margin-bottom: 32px;
  color: var(--signal);
  font-size: clamp(1.7rem, 3vw, 3.2rem);
}

#home {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 40px;
  align-items: end;
  min-height: 690px;
  background-image: linear-gradient(90deg, rgba(11, 12, 10, 0.96) 0%, rgba(11, 12, 10, 0.84) 52%, rgba(11, 12, 10, 0.53) 100%), url("assets/workshop.jpg");
  background-position: center;
  background-size: cover;
}

#home > p:first-child {
  grid-column: 1 / -1;
  margin: 0 0 -12px;
  color: var(--signal);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#home .hero-content {
  grid-column: 1;
  max-width: 700px;
}

#home .hero-content > p {
  max-width: 620px;
  margin-bottom: 32px;
  color: var(--paper);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

#home .hero-content > a,
#contact > a {
  display: inline-block;
  padding: 12px 16px;
  border: 1px solid var(--signal);
  background: var(--signal);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

#home .hero-content > a:hover,
#contact > a:hover {
  background: var(--ink);
  color: var(--signal);
}

#home figure {
  display: none;
}

#capabilities {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  column-gap: 72px;
  background: var(--panel-deep);
}

#capabilities h2 {
  grid-row: span 2;
}

#capabilities p {
  max-width: 700px;
  margin-bottom: 24px;
}

#capabilities .capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

#capabilities .capability-card {
  padding: 20px;
  background: var(--panel);
}

.capability-card h3 {
  margin: 0 0 10px;
  color: var(--paper);
  font-size: 0.95rem;
  line-height: 1.35;
}

.capability-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

#factory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding-block: 0;
  border-bottom-color: var(--line);
  background: var(--line);
}

#factory .factory-intro {
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
  padding: 88px 24px 32px;
  background: var(--ink);
}

#factory h2,
#factory .factory-intro > p {
  grid-column: 1 / -1;
  margin: 0;
}

#factory h2 {
  padding: 0;
}

#factory .factory-intro > p {
  color: var(--muted);
}

#factory .equipment-card {
  display: grid;
  grid-template-rows: minmax(240px, 320px) minmax(92px, auto);
  min-width: 0;
  margin: 0;
  background: var(--panel);
}

#factory img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.06);
}

#factory figcaption {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--paper);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.equipment-model,
.equipment-process {
  display: block;
  min-width: 0;
}

.equipment-model {
  color: var(--paper);
  font-weight: 700;
}

.equipment-process {
  color: var(--muted);
  font-size: 0.76rem;
}

#products {
  background: var(--panel-deep);
}

#products .products-intro {
  display: grid;
  gap: 18px;
  max-width: 740px;
  margin-bottom: 32px;
}

#products .products-intro h2,
#products .products-intro p {
  margin: 0;
}

#products .products-intro p,
#products .product-card p,
#products .warehouse-panel p {
  color: var(--muted);
}

#products .product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

#products .product-card {
  min-width: 0;
  background: var(--panel);
}

#products .product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

#products .product-card > div {
  min-height: 154px;
  padding: 20px;
}

#products .product-card h3 {
  margin: 0 0 10px;
  color: var(--paper);
  font-size: 0.95rem;
  line-height: 1.35;
}

#products .product-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

#products .warehouse-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 1px;
  margin-top: 1px;
  background: var(--line);
}

#products .warehouse-panel img {
  display: block;
  width: 100%;
  min-height: 300px;
  height: 100%;
  object-fit: cover;
}

#products .warehouse-panel > div {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 32px;
  background: var(--panel);
}

#products .warehouse-panel p {
  margin: 0;
}

#products .warehouse-panel .eyebrow {
  color: var(--signal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#about,
#contact {
  max-width: 820px;
}

#about p,
#contact p {
  color: var(--muted);
}

#about .legal-name {
  margin-bottom: 20px;
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contact-details {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding: 16px;
  border-left: 2px solid var(--signal);
  list-style: none;
  background: var(--panel);
}

.contact-details a {
  color: var(--paper);
}

#contact > a {
  margin-top: 8px;
}

#quote-form {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

#quote-form > div {
  display: grid;
  gap: 8px;
}

#quote-form input,
#quote-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-deep);
  color: var(--paper);
  font: inherit;
}

#quote-form input:focus,
#quote-form textarea:focus {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

#quote-form button {
  justify-self: start;
}

#form-status {
  min-height: 1.6em;
  margin: 0;
  color: var(--signal);
}

footer {
  padding-block: 28px 46px;
  color: var(--muted);
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

@media (max-width: 760px) {
  header,
  main,
  footer {
    width: min(100% - 32px, 1200px);
  }

  header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    padding-block: 20px;
  }

  #site-menu {
    flex-basis: 100%;
    width: 100%;
    padding-top: 16px;
  }

  nav {
    gap: 12px 18px;
  }

  section {
    padding-block: 56px;
  }

  #home,
  #capabilities {
    display: block;
    min-height: 0;
  }

  #home {
    padding-top: 88px;
    background-image: linear-gradient(180deg, rgba(11, 12, 10, 0.91), rgba(11, 12, 10, 0.7)), url("assets/workshop.jpg");
  }

  #home > p:first-child {
    margin-bottom: 18px;
  }

  #capabilities h2 {
    margin-bottom: 24px;
  }

  #capabilities .capability-grid {
    grid-template-columns: 1fr;
  }

  #products .product-grid {
    grid-template-columns: 1fr;
  }

  #products .warehouse-panel {
    grid-template-columns: 1fr;
  }

  #products .warehouse-panel img {
    min-height: 240px;
  }

  #factory {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  #factory h2 {
    padding: 0;
  }

  #factory .factory-intro {
    padding-top: 56px;
  }

  #factory .equipment-card {
    min-width: 0;
  }

  #factory .equipment-card {
    grid-template-rows: 280px minmax(92px, auto);
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  #factory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #products .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
