/* SMR Welding and Fabrication LLC — one-page site
   Dark steel / charcoal with a single red accent from the shop logo.
   No external fonts, CDNs, or trackers. */

:root {
  --bg: #111315;
  --bg-elev: #191c20;
  --bg-card: #22262b;
  --border: #3a4048;
  --text: #e8eaed;
  --muted: #a8aeb6;
  --accent: #e11218;
  --accent-hover: #ff2a30;
  --accent-press: #c40e14;
  --on-accent: #ffffff;
  --focus: #ffffff;
  --header-h: auto;
  --cta-h: 0px;
  --space: 1.25rem;
  --max: 72rem;
  --radius: 0.5rem;
  --tap: 2.75rem; /* 44px minimum, most buttons are larger */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-bottom: 7.25rem; /* room for sticky mobile CTA */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: 1rem;
}

/* ----- Header ----- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(17, 19, 21, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand:hover {
  color: var(--text);
}

.logo {
  height: 64px;
  width: auto;
  /* ~177px wide at 64px tall; sits cleanly on the charcoal header */
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.25;
  max-width: 16rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.15rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.7rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 550;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.header-cta {
  display: none; /* shown on wider screens; mobile uses sticky bar */
  gap: 0.5rem;
  align-items: center;
}

/* ----- Buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.65rem 1.1rem;
  border-radius: 0.4rem;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn-primary:active {
  background: var(--accent-press);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--text);
  color: #fff;
  background: var(--bg-card);
}

.btn-lg {
  min-height: 3.15rem;
  padding: 0.8rem 1.35rem;
  font-size: 1.0625rem;
}

/* ----- Layout sections ----- */

.hero,
.about,
.services,
.gallery-section,
.hours-area,
.contact-band {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1rem;
}

.hero {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 650;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 5.2vw, 2.45rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.lede {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 36rem;
}

.after-hours {
  display: inline-block;
  margin: 0 0 1.35rem;
  padding: 0.65rem 0.9rem;
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  border-radius: 0 0.35rem 0.35rem 0;
  font-size: 1.05rem;
}

.after-hours-inline {
  display: block;
  margin: 1rem 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-intro {
  margin: -0.25rem 0 1.15rem;
  color: var(--muted);
}

.about p {
  margin: 0;
  max-width: 42rem;
}

/* ----- Services ----- */

.services {
  background: var(--bg-elev);
  /* break out of the centered max so the band goes edge to edge */
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.services h2,
.services .service-list {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.service-list {
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding-bottom: 0.25rem;
}

.service-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-weight: 550;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}

/* ----- Gallery ----- */

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.gallery-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-card);
  border-radius: 0.35rem;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
}

/* ----- Hours & area ----- */

.hours-area {
  display: grid;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.hours-card,
.area-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 1.25rem 1.15rem;
}

.hours-list {
  margin: 0;
}

.hours-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.hours-list div:last-of-type {
  border-bottom: 0;
}

.hours-list dt {
  font-weight: 550;
  margin: 0;
}

.hours-list dd {
  margin: 0;
  color: var(--muted);
}

.area-card p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.area-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.area-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-weight: 550;
}

.area-list li:last-child {
  border-bottom: 0;
}

.counties {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.contact-band {
  text-align: left;
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.contact-band p {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 650;
}

/* ----- Footer ----- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 0.85rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
}

.site-footer a:hover {
  text-decoration: underline;
}

.copyright {
  margin-top: 1rem !important;
  font-size: 0.85rem;
}

/* ----- Sticky mobile call / text bar ----- */

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgba(17, 19, 21, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.mobile-cta .btn {
  flex: 1 1 auto;
}

.mobile-cta .btn-secondary {
  flex: 0 0 auto;
  min-width: 5.5rem;
}

/* ----- Lightbox ----- */

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 3rem 4.5rem;
}

.lightbox-figure {
  margin: 0;
  max-width: min(100%, 1600px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  max-width: 40rem;
  padding: 0 0.5rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  min-width: var(--tap);
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.lightbox-close {
  top: 0.6rem;
  right: 0.6rem;
  font-size: 1.8rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 0.4rem;
}

.lightbox-next {
  right: 0.4rem;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: #2c3138;
  color: #fff;
}

body.lightbox-open {
  overflow: hidden;
}

/* ----- Wider layouts ----- */

@media (min-width: 600px) {
  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }

  .hours-area {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (min-width: 800px) {
  body {
    padding-bottom: 0; /* header CTAs replace the bottom bar */
  }

  html {
    scroll-padding-top: 7.5rem;
  }

  .logo {
    height: 90px; /* ~250px wide */
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .brand-name {
    font-size: 1.05rem;
    max-width: 11.5rem;
  }

  .header-inner {
    padding: 0.7rem 1.5rem;
  }

  .header-cta {
    display: flex;
  }

  .mobile-cta {
    display: none;
  }

  .hero,
  .about,
  .gallery-section,
  .hours-area,
  .contact-band {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .services h2,
  .services .service-list {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero {
    padding-top: 3.25rem;
    padding-bottom: 3rem;
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }

  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-logo {
    height: 72px;
  }
}

@media (min-width: 1100px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .service-list {
    grid-template-columns: repeat(5, 1fr);
  }

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

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

  .gallery-item img {
    transition: none;
  }
}
