/* Precision Fabrication and Weld, LLC -- main stylesheet */

:root {
  --black: #0c0c0d;
  --near-black: #151517;
  --charcoal: #232326;
  --steel: #3d3d40;
  --steel-light: #7a7a7e;
  --line: #38383c;
  --white: #f7f6f4;
  --off-white: #e9e8e5;
  --red: #d81f27;
  --red-dark: #9c151b;
  --red-light: #ff4a50;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--near-black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--black);
}
p { margin: 0 0 1em; }
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-dark { background: var(--near-black); color: var(--off-white); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-charcoal { background: var(--charcoal); color: var(--off-white); }
.section-charcoal h2, .section-charcoal h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .6em;
}
.section-head { max-width: 700px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lede { font-size: 1.15rem; color: var(--steel-light); }
.section-dark .lede, .section-charcoal .lede { color: #c9c8c5; }

/* Diamond-plate texture strip */
.diamond-strip {
  height: 10px;
  background-image: repeating-linear-gradient(135deg, var(--red) 0 10px, var(--red-dark) 10px 20px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: transparent; border-color: currentColor; color: inherit; }
.btn-outline:hover { background: rgba(255,255,255,.08); }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: var(--near-black); }
.btn-block { display: flex; justify-content: center; width: 100%; }
.btn-sm { padding: 9px 18px; font-size: .8rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: 3px solid var(--red);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 58px; width: auto; border-radius: 3px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: #d8d8d8;
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: .85rem;
  letter-spacing: .05em;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
}
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(216,31,39,.18); }
.main-nav .btn { margin-left: 10px; }
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--steel);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; }

.topbar {
  background: var(--near-black);
  color: #b9b8b5;
  font-size: .8rem;
}
.topbar .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #b9b8b5; }
.topbar a:hover { color: #fff; }
.topbar .tb-links { display: flex; gap: 18px; }

/* Hero */
.hero {
  position: relative;
  background: var(--black);
  color: #fff;
  overflow: hidden;
  padding: 100px 0 90px;
  background-image:
    linear-gradient(160deg, rgba(12,12,13,.94), rgba(12,12,13,.86)),
    repeating-linear-gradient(45deg, #1c1c1e 0 2px, #141415 2px 26px),
    repeating-linear-gradient(-45deg, #1c1c1e 0 2px, #141415 2px 26px);
}
/* Home hero photo -- shop panorama faded behind the headline.
   WebP where supported, JPEG everywhere else. Applied via .hero-photo on
   index.php only; the other pages keep the plain crosshatch hero. */
.hero-photo { --hero-photo: url('/assets/img/hero-shop.jpg'); }
@supports (background-image: image-set(url('/assets/img/hero-shop.webp') type('image/webp'))) {
  .hero-photo {
    --hero-photo: image-set(
      url('/assets/img/hero-shop.webp') type('image/webp'),
      url('/assets/img/hero-shop.jpg') type('image/jpeg'));
  }
}
.hero-photo {
  /* Extra scrim down the text column so the copy stays legible while the
     right-hand side of the shot stays bright. Flat on phones, where the
     copy runs full width. */
  --hero-scrim-side: linear-gradient(90deg, rgba(12,12,13,.70), rgba(12,12,13,.32) 48%, rgba(12,12,13,0) 74%);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 26px),
    var(--hero-scrim-side),
    linear-gradient(160deg, rgba(12,12,13,.88), rgba(12,12,13,.80)),
    var(--hero-photo);
  background-size: auto, auto, auto, auto, cover;
  background-position: center, center, center, center, center 45%;
  background-repeat: repeat, repeat, repeat, repeat, no-repeat;
  background-attachment: scroll;
}
/* The brand red is too low-luminance to clear AA on any dark field; the
   lighter tint buys back the contrast the photo costs. */
.hero-photo .eyebrow { color: var(--red-light); }
@media (max-width: 640px) {
  /* 2:1 panorama crops hard on phones -- favour the welders and flag
     over the empty overhead doors at dead centre. */
  .hero-photo {
    --hero-scrim-side: linear-gradient(rgba(12,12,13,.42), rgba(12,12,13,.42));
    background-position: center, center, center, center, 35% center;
  }
}

.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; max-width: 820px; }
.hero h1 span { color: var(--red); }
.hero p.lede { max-width: 620px; color: #d6d5d2; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-badges { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 48px; }
.hero-badge { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; color: #cfcecb; display: flex; align-items: center; gap: 10px; }
.hero-badge b { color: #fff; font-size: 1.6rem; display: block; font-family: var(--font-head); }

/* Grid utilities */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Uniform photo tiles -- for rows of photos with mismatched source aspect ratios */
.photo-tile {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e7e6e2;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 14px 30px rgba(0,0,0,.1); transform: translateY(-3px); }
.card .icon-badge {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--black); color: var(--red);
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-family: var(--font-head); font-size: 1.4rem;
}
.card h3 { font-size: 1.1rem; margin-bottom: .4em; }
.card p { color: var(--steel-light); margin-bottom: 0; font-size: .95rem; }

.dark-card {
  background: var(--charcoal);
  border: 1px solid #333;
  border-radius: var(--radius);
  padding: 28px;
  color: #ddd;
}
.dark-card h3 { color: #fff; }

/* Tag / pill list (attachments) */
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  background: var(--near-black);
  color: #fff;
  border-left: 3px solid var(--red);
  padding: 10px 16px;
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: .82rem;
  letter-spacing: .04em;
  border-radius: 2px;
}

/* Capability rows */
.capability {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid #e7e6e2;
}
.capability:last-child { border-bottom: none; }
.capability h3 { margin: 0; font-size: 1.05rem; }
.capability .spec { color: var(--red); font-family: var(--font-head); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
@media (max-width: 700px) { .capability { grid-template-columns: 1fr; gap: 6px; } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-grid a { overflow: hidden; border-radius: var(--radius); display: block; aspect-ratio: 4/3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-grid a:hover img { transform: scale(1.06); }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

/* Stats bar */
.stats-bar { background: var(--red); color: #fff; padding: 30px 0; }
.stats-bar .grid { text-align: center; }
.stats-bar b { display: block; font-family: var(--font-head); font-size: 2.1rem; }
.stats-bar span { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

/* CTA band */
.cta-band {
  background: var(--black);
  color: #fff;
  padding: 60px 0;
  text-align: center;
  background-image: linear-gradient(120deg, #0c0c0d, #1b1b1d);
  border-top: 3px solid var(--red);
}
.cta-band h2 { color: #fff; }

/* Forms */
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--near-black); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d7d6d2;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  background: #fff;
  color: var(--near-black);
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(216,31,39,.15); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: .8rem; color: var(--steel-light); margin-top: 6px; }
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: .92rem; }
.alert-success { background: #e7f6ea; color: #1c6b30; border: 1px solid #b9e5c3; }
.alert-error { background: #fbe9e8; color: #a3141a; border: 1px solid #f3c4c1; }

/* Contact layout */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid #e7e6e2; }
.info-row:last-child { border-bottom: none; }
.info-row .label { font-family: var(--font-head); text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; color: var(--red); min-width: 90px; }
.map-embed { border: 0; width: 100%; height: 320px; border-radius: var(--radius); filter: grayscale(.15); }

/* Footer */
.site-footer { background: var(--black); color: #b9b8b5; padding: 56px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer .brand img { height: 50px; margin-bottom: 14px; }
.social-row { display: flex; gap: 10px; margin-top: 16px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #3a3a3d;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
}
.social-row a:hover { border-color: var(--red); color: var(--red); }
.footer-bottom {
  border-top: 1px solid #26262a;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .8rem;
  color: #77767a;
}
.footer-bottom a { color: #77767a; }
.footer-bottom a:hover { color: #fff; }
.site-credit { display: inline-flex; align-items: center; gap: 6px; }
.site-credit svg { flex-shrink: 0; border-radius: 1px; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 20px;
    border-top: 1px solid #26262a;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 4px; border-bottom: 1px solid #1e1e21; }
  .main-nav .btn { margin: 10px 0 0; text-align: center; justify-content: center; }
  .topbar .tb-links { display: none; }
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
