/* Stone Pipeline and Civil — site styles */
:root {
  --ink: #15181c;
  --ink-2: #1f242a;
  --ink-3: #2b3139;
  --stone: #f3f1ec;
  --stone-2: #e7e3db;
  --paper: #ffffff;
  --text: #1c2026;
  --muted: #5d6670;
  --muted-light: #a9b1ba;
  --line: #ddd8ce;
  --line-dark: #333a43;
  --accent: #f1592a; /* logo orange */
  --accent-dark: #d4461a;
  --accent-soft: #fde7d9;
  --radius: 4px;
  --wrap: 1200px;
  --header-h: 100px;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--stone);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 17px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--head); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.dark .lead, .hero .lead, .page-hero .lead { color: var(--muted-light); }

/* Placeholder text Troy still needs to supply */
.todo {
  background: var(--accent-soft); color: var(--accent-dark);
  border: 1px dashed var(--accent); border-radius: 3px;
  padding: 0 6px; font-weight: 600; white-space: nowrap;
}
.dark .todo, .site-footer .todo, .hero .todo { background: rgba(241,89,42,.15); color: #ffb98f; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--head); font-weight: 700; font-size: 1.1rem;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  padding: 14px 28px; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  /* Solid, no backdrop-filter: a filter here would trap the fixed mobile menu inside the header */
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
/* Lock page scroll behind the open mobile menu (on html, so the sticky header keeps working) */
html:has(body.nav-open) { overflow: hidden; }
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo img { height: calc(var(--header-h) - 14px); width: auto; }
.logo-footer { margin-bottom: 18px; }
.logo-footer img { height: 130px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links a, .nav-links button {
  display: block; padding: 10px 14px; color: #e6e9ec; text-decoration: none;
  font-family: var(--head); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: 0; cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links .nav-cta { background: var(--accent); color: #fff; border-radius: var(--radius); margin-left: 10px; padding: 10px 20px; }
.nav-links .nav-cta:hover, .nav-links .nav-cta[aria-current="page"] { background: var(--accent-dark); color: #fff; }
.has-sub > button::after { content: " ▾"; font-size: .8em; }
.sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  list-style: none; margin: 0; padding: 8px;
  background: var(--ink-2); border: 1px solid var(--line-dark); border-top: 3px solid var(--accent);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s;
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu, .has-sub.open .sub-menu {
  opacity: 1; visibility: visible; transform: none;
}
.sub-menu a { padding: 10px 12px; text-transform: none; letter-spacing: .02em; font-size: 1.1rem; }
.menu-toggle {
  display: none; background: none; border: 0; color: #fff; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.menu-toggle span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: .2s; }

@media (max-width: 1020px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; align-items: stretch;
    background: var(--ink); padding: 16px; gap: 0; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a, .nav-links button { padding: 14px 8px; font-size: 1.3rem; border-bottom: 1px solid var(--line-dark); width: 100%; text-align: left; }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; border: 0; background: none; padding: 0 0 0 16px; display: none; }
  .has-sub.open .sub-menu { display: block; }
  .nav-links .nav-cta { margin: 16px 0 0; text-align: center; }
  .nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 600px) { :root { --header-h: 76px; } }

/* Hero (home) */
.hero {
  position: relative; color: #fff; background: var(--ink);
  padding: 100px 0 100px; overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(100deg, rgba(21,24,28,.97) 30%, rgba(21,24,28,.6) 100%),
    var(--hero-img, none) center/cover no-repeat;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero-art { width: 100%; height: auto; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 560px; margin-top: 10px; } }
.hero h1 { max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 36px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 48px; color: var(--muted-light); font-size: .95rem; }
.hero-badges span { display: flex; align-items: center; gap: 8px; }
.hero-badges span::before { content: ""; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
@media (max-width: 760px) { .hero { padding: 64px 0 56px; } }

/* Inner page hero */
.page-hero {
  position: relative; background: var(--ink); color: #fff;
  padding: 90px 0 80px; overflow: hidden; isolation: isolate;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); max-width: 16ch; }
.crumbs { font-size: .9rem; color: var(--muted-light); margin-bottom: 18px; letter-spacing: .04em; }
.crumbs a { color: var(--muted-light); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-hero-icon { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); width: 220px; opacity: .9; z-index: -1; }
@media (max-width: 860px) { .page-hero-icon { display: none; } }

/* Stats strip */
.stats { background: var(--accent); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 30px 20px; border-left: 1px solid rgba(255,255,255,.25); }
.stat:first-child { border-left: 0; }
.stat strong { display: block; font-family: var(--head); font-size: 2.8rem; line-height: 1; }
.stat span { font-size: .95rem; opacity: .92; }
@media (max-width: 760px) {
  .stats .wrap { grid-template-columns: 1fr; padding: 0; }
  .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.25); }
  .stat:first-child { border-top: 0; }
}

/* Sections */
.section { padding: 100px 0; }
.section-tight { padding: 70px 0; }
.section.alt { background: var(--paper); }
.section.dark, .dark { background: var(--ink); color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 50px; }
.section-head h2 { margin: 0; max-width: 18ch; }
.section-head .lead { margin: 0; max-width: 46ch; }
@media (max-width: 600px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Service cards */
.service-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px 28px; text-decoration: none; color: var(--text);
  transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden;
}
.service-card::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 0;
  background: var(--accent); transition: width .3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.25); border-color: transparent; }
.service-card:hover::after { width: 100%; }
.service-card .num { font-family: var(--head); font-size: .95rem; color: var(--muted); letter-spacing: .15em; }
.service-card .icon { width: 64px; height: 64px; margin: 18px 0 22px; color: var(--accent); }
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 1rem; flex: 1; }
.service-card .more { font-family: var(--head); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

/* Media frame / photo placeholders */
.photo {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.03) 22px 44px),
    linear-gradient(160deg, #2c333b, #181b20);
  display: grid; place-items: center; color: var(--muted-light);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ph {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; padding: 20px; font-size: .9rem; letter-spacing: .04em;
}
.photo .ph svg { width: 44px; height: 44px; opacity: .6; }
.photo.tall { aspect-ratio: 4 / 5; }
.photo-tag {
  position: absolute; left: 0; bottom: 0; background: var(--accent); color: #fff;
  font-family: var(--head); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  font-size: .9rem; padding: 6px 14px;
}
.frame { position: relative; }
.frame::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 3px solid var(--accent); border-radius: var(--radius); z-index: 0;
}
.frame > * { position: relative; z-index: 1; }
@media (max-width: 600px) { .frame::before { inset: 10px -10px -10px 10px; } }

/* Lists */
.check-list { list-style: none; padding: 0; margin: 0 0 1.5em; }
.check-list li { position: relative; padding: 10px 0 10px 36px; border-bottom: 1px solid var(--line); }
.dark .check-list li { border-color: var(--line-dark); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 16px; width: 20px; height: 20px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E") center/14px no-repeat;
  border-radius: 2px;
}
.cols-2 { columns: 2; column-gap: 40px; }
.cols-2 li { break-inside: avoid; }
@media (max-width: 700px) { .cols-2 { columns: 1; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.step { position: relative; padding: 0 24px 0 0; counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--head); font-weight: 700; font-size: 3.4rem; line-height: 1;
  color: var(--accent); margin-bottom: 14px;
}
.step::after { content: ""; position: absolute; top: 26px; left: 84px; right: 24px; height: 2px; background: var(--line-dark); }
.step:last-child::after { display: none; }
.step h3 { font-size: 1.35rem; }
.step p { color: var(--muted-light); font-size: 1rem; }
.section:not(.dark) .step p { color: var(--muted); }
.section:not(.dark) .step::after { background: var(--line); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; gap: 40px 0; } .step:nth-child(2)::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step::after { display: none; } }

/* Feature tiles */
.feature { padding: 30px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: var(--ink-2); }
.section:not(.dark) .feature { background: var(--paper); border-color: var(--line); }
.feature .icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 18px; }
.feature h3 { font-size: 1.35rem; }
.feature p { color: var(--muted-light); font-size: 1rem; margin: 0; }
.section:not(.dark) .feature p { color: var(--muted); }

/* Quote / callout */
.callout {
  border-left: 4px solid var(--accent); padding: 8px 0 8px 28px; margin: 32px 0;
  font-family: var(--head); font-size: 1.7rem; line-height: 1.2; text-transform: uppercase;
}

/* CTA band */
.cta-band { background: var(--accent); color: #fff; padding: 70px 0; position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px;
  border: 40px solid rgba(255,255,255,.1); border-radius: 50%;
}
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; position: relative; z-index: 1; }
.cta-band h2 { margin: 0; max-width: 20ch; }
.cta-band p { margin: 10px 0 0; opacity: .92; }

/* Related services */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--head); font-weight: 700; font-size: 1.3rem; text-transform: uppercase;
  text-decoration: none; transition: border-color .2s, color .2s;
}
.related a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) { .related { grid-template-columns: 1fr; } }

/* Jobs */
.job {
  display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; margin-bottom: 16px;
}
.job h3 { margin: 0 0 6px; }
.job p { margin: 0; color: var(--muted); font-size: 1rem; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  font-size: .82rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; background: var(--stone-2); color: var(--muted);
}
.chip.hot { background: var(--accent-soft); color: var(--accent-dark); }
@media (max-width: 700px) { .job { grid-template-columns: 1fr; } }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filters button {
  font-family: var(--head); font-weight: 600; font-size: 1rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--text);
}
.filters button.active, .filters button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; cursor: zoom-in; }
.gallery figure.hide { display: none; }
.gallery figcaption { font-size: .95rem; color: var(--muted); padding-top: 10px; }
.gallery .photo { transition: transform .3s; }
.gallery figure:hover .photo { transform: scale(1.02); }
@media (max-width: 900px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,12,14,.94);
  display: none; align-items: center; justify-content: center; padding: 24px; flex-direction: column; gap: 16px;
}
.lightbox.open { display: flex; }
.lightbox .photo { width: min(1000px, 100%); aspect-ratio: 16 / 10; }
.lightbox p { color: #fff; margin: 0; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 48px; height: 48px;
  background: var(--accent); color: #fff; border: 0; font-size: 1.6rem; cursor: pointer; border-radius: var(--radius);
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
@media (max-width: 600px) { .form-card { padding: 24px 18px; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--stone);
  transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.field textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .9rem; color: var(--muted); margin-top: 14px; }
.info-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 36px; }
.info-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-dark); }
.info-item:last-child { border: 0; }
.info-item svg { width: 26px; height: 26px; color: var(--accent); flex: none; margin-top: 3px; }
.info-item small { display: block; color: var(--muted-light); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.info-item a { text-decoration: none; word-break: break-word; }
.info-item a:hover { color: var(--accent); }

/* Footer */
.site-footer { background: #0e1013; color: var(--muted-light); padding: 70px 0 0; font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 1.15rem; letter-spacing: .1em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line-dark); padding: 22px 0; font-size: .88rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
.no-js .reveal { opacity: 1; transform: none; }
