/* Rex Alton Companies. Industrial look: slate, concrete and safety orange. */
@font-face {
  font-family: "Barlow Condensed";
  src: url(fonts/barlow-condensed-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url(fonts/barlow-condensed-700.woff2) format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --slate-900: #161b21;
  --slate-800: #1c2229;
  --slate-700: #2a323c;
  --slate-500: #5b6673;
  --concrete: #f3f1ec;
  --concrete-2: #e7e3da;
  --white: #fff;
  --ink: #1f252c;
  --ink-soft: #4a535e;
  --accent: #f28c1b;
  --accent-dark: #c96d07;
  --error: #b42318;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(22, 27, 33, .08), 0 8px 24px rgba(22, 27, 33, .08);
  --font-head: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font: 17px/1.65 var(--font-body);
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--slate-800); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--slate-900); padding: 10px 16px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 10px; top: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px;
  font: 700 1.1rem/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--accent { background: var(--accent); color: var(--slate-900); }
.btn--accent:hover { background: #ffa43d; color: var(--slate-900); }
.btn--ghost { border-color: currentColor; color: var(--white); background: transparent; }
.btn--ghost:hover { background: var(--white); color: var(--slate-900); border-color: var(--white); }

/* Top bar + header */
.topbar { background: var(--slate-900); color: #c3cad3; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: flex-end; gap: 24px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #c3cad3; text-decoration: none; }
.topbar a:hover { color: var(--white); }

.site-header { background: var(--slate-800); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 4px solid var(--accent); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--white); }
.brand__mark { width: 44px; height: 38px; fill: var(--accent); flex: none; }
.brand__text { display: flex; flex-direction: column; font-family: var(--font-head); text-transform: uppercase; line-height: 1; }
.brand__text strong { font-size: 1.75rem; letter-spacing: .03em; }
.brand__text span { font-size: .95rem; font-weight: 600; letter-spacing: .32em; color: #c3cad3; margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav__list { display: flex; list-style: none; margin: 0; padding: 0; gap: 4px; }
.site-nav__list > li { position: relative; }
.site-nav__list a {
  display: block; padding: 10px 14px; color: var(--white); text-decoration: none;
  font: 600 1.15rem/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase;
}
.site-nav__list a:hover, .site-nav__list a[aria-current="page"], .has-sub.is-active > a { color: var(--accent); }
.sub {
  list-style: none; margin: 0; padding: 8px 0; min-width: 290px;
  position: absolute; left: 0; top: 100%; background: var(--slate-700); box-shadow: var(--shadow);
  border-top: 3px solid var(--accent); visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.sub a { font-size: 1.05rem; padding: 9px 18px; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { visibility: visible; opacity: 1; transform: none; }
.site-nav__call { white-space: nowrap; }
.nav-toggle { display: none; }

/* Mobile navigation: the menu is a panel under the header; site.js toggles it. */
@media (max-width: 980px) {
  .topbar__item:first-child { display: none; }
  .topbar__inner { justify-content: center; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
    background: transparent; color: var(--white); border: 2px solid var(--slate-500); border-radius: var(--radius);
    font: 700 1rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: "";
  }
  .nav-toggle__bars::before { position: absolute; top: -6px; }
  .nav-toggle__bars::after { position: absolute; top: 6px; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--slate-800);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px;
    border-bottom: 4px solid var(--accent); display: none;
    max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .site-nav__list { flex-direction: column; }
  .site-nav__list a { padding: 12px 4px; border-bottom: 1px solid var(--slate-700); }
  .sub { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 16px; min-width: 0; }
  .sub a { font-size: 1rem; }
  .site-nav__call { margin-top: 16px; }
  .site-header { position: relative; }
}

/* Hero (home) */
.hero { position: relative; background: var(--slate-900); color: var(--white); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22, 27, 33, .92) 0%, rgba(22, 27, 33, .65) 45%, rgba(22, 27, 33, .1) 100%); }
.hero__inner { position: relative; z-index: 1; padding-top: clamp(64px, 11vw, 140px); padding-bottom: clamp(64px, 11vw, 140px); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5rem); max-width: 12ch; }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 34rem; color: #e3e7ec; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.eyebrow { font: 700 1rem/1.2 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.eyebrow--dark { color: var(--accent-dark); }

/* Page header band */
.page-hero {
  background: linear-gradient(135deg, var(--slate-800) 0%, var(--slate-700) 100%);
  color: var(--white); padding: 44px 0 40px;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 14px),
    linear-gradient(135deg, var(--slate-800) 0%, var(--slate-700) 100%);
}
.page-hero h1 { margin: 0; }
.crumbs ol { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: #c3cad3; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--slate-500); }
.crumbs a { color: #c3cad3; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--tint { background: var(--concrete); }
.section__head { margin-bottom: 32px; }
.section__head p { color: var(--ink-soft); margin: 0; }
.lead { font-size: 1.2rem; color: var(--ink); }
.prose { max-width: 680px; }
.prose h2 { margin-top: 1.2em; }
.prose h2:first-child { margin-top: 0; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--top { align-items: start; }
.split--reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse > :first-child { order: 0; } }
.framed { margin: 0; position: relative; }
.framed img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.framed::before { content: ""; position: absolute; left: -12px; bottom: -12px; width: 40%; height: 40%; background: var(--accent); z-index: -1; border-radius: var(--radius); }
.framed--small { max-width: 280px; }
.callout { border-left: 4px solid var(--accent); background: var(--concrete); padding: 14px 18px; font-weight: 600; }

/* Lists */
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 8px;
  border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg);
}
.checks--2col { columns: 2; column-gap: 32px; }
.checks--2col li { break-inside: avoid; }
@media (max-width: 560px) { .checks--2col { columns: 1; } }
.two-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--concrete); padding: 28px; border-radius: var(--radius); border-top: 4px solid var(--accent); }
.two-lists h2 { font-size: 1.4rem; }
@media (max-width: 480px) { .two-lists { grid-template-columns: 1fr; } }
.spec-list { margin: 0; }
.spec-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--concrete-2); }
.spec-list dt { font: 700 1.2rem/1.3 var(--font-head); text-transform: uppercase; letter-spacing: .04em; }
.spec-list dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 480px) { .spec-list > div { grid-template-columns: 1fr; gap: 2px; } }

/* Service cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(22, 27, 33, .1), 0 14px 32px rgba(22, 27, 33, .14); }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card__link:hover { color: inherit; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; border-top: 4px solid var(--accent); }
.card__title { font: 700 1.4rem/1.15 var(--font-head); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 8px; }
.card__text { color: var(--ink-soft); font-size: .95rem; flex: 1; }
.card__more { margin-top: 14px; font: 700 1rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.fact { border-top: 4px solid var(--accent); padding-top: 16px; }
.fact strong { display: block; font: 700 2rem/1 var(--font-head); text-transform: uppercase; margin-bottom: 8px; }
.fact span { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }

/* About timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 3px solid var(--concrete-2); }
.timeline li { position: relative; padding: 0 0 20px 8px; color: var(--ink-soft); }
.timeline li::before { content: ""; position: absolute; left: -33px; top: 6px; width: 15px; height: 15px; background: var(--accent); border: 3px solid var(--white); border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); }
.timeline strong { display: block; color: var(--ink); font: 700 1.4rem/1.1 var(--font-head); }

/* Sand and gravel products */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .products { grid-template-columns: 1fr; } }
.products__group { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; border-top: 4px solid var(--accent); }
.product-list { margin: 0; }
.product-list > div { padding: 10px 0; border-bottom: 1px solid var(--concrete-2); }
.product-list > div:last-child { border-bottom: 0; }
.product-list dt { font-weight: 700; }
.product-list dd { margin: 2px 0 0; color: var(--ink-soft); font-size: .93rem; }

/* Construction gallery + lightbox */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 94vh; }
.lightbox::backdrop { background: rgba(10, 12, 15, .88); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; color: var(--white); }
.lightbox__bar button { min-height: 44px; padding: 8px 16px; background: var(--slate-700); color: var(--white); border: 0; border-radius: var(--radius); font: 700 1rem/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.lightbox__bar button:hover { background: var(--accent); color: var(--slate-900); }


/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-cards { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-cards li { background: var(--concrete); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 20px; }
.contact-cards__label { display: block; font: 700 .95rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.contact-cards__value { display: block; font-size: 1.2rem; font-weight: 600; color: var(--ink); word-break: break-word; }
a.contact-cards__value { text-decoration: none; }
a.contact-cards__value:hover { color: var(--accent-dark); }
.contact__form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 36px); border-top: 4px solid var(--accent); scroll-margin-top: 100px; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--accent-dark); }
.optional { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid #c9cdd2; border-radius: var(--radius); padding: 11px 13px; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(242, 140, 27, .25); }
.has-error input, .has-error textarea { border-color: var(--error); }
.field__error { color: var(--error); font-size: .92rem; font-weight: 600; margin: 6px 0 0; }
.form-alert { background: #fdecea; color: var(--error); border-left: 4px solid var(--error); padding: 12px 16px; font-weight: 600; border-radius: var(--radius); }
.form-note { margin: 14px 0 0; font-size: .9rem; color: var(--ink-soft); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Call to action band */
.cta-band { background: var(--accent); color: var(--slate-900); padding: 44px 0; }
.cta-band__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 6px; }
.cta-band p { margin: 0; font-size: 1.1rem; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn--accent { background: var(--slate-900); color: var(--white); }
.cta-band .btn--accent:hover { background: var(--slate-700); color: var(--white); }
.cta-band .btn--ghost { color: var(--slate-900); }
.cta-band .btn--ghost:hover { background: var(--slate-900); color: var(--white); border-color: var(--slate-900); }

/* Footer */
.site-footer { background: var(--slate-900); color: #aab3bd; font-size: .95rem; }
.site-footer a { color: #d6dbe1; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer__brand { font: 700 1.6rem/1 var(--font-head); text-transform: uppercase; color: var(--white); letter-spacing: .03em; }
.site-footer__title { font-size: 1.15rem; color: var(--white); letter-spacing: .12em; margin-bottom: 14px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--slate-700); padding-top: 18px; padding-bottom: 24px; font-size: .85rem; }
.site-footer__bottom p { margin: 0; }
