/* ============================================================
   Black Spur Building Solutions
   ============================================================ */

:root {
  --ink: #14161a;
  --ink-soft: #23262c;
  --paper: #f5f2ec;
  --paper-deep: #ece7dd;
  --bronze: #b98a4e;
  --bronze-light: #c9a06a;
  --text: #2b2e33;
  --text-muted: #6b6f76;
  --line: rgba(20, 22, 26, 0.12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
}

h1 { font-size: clamp(2.8rem, 7.5vw, 5.5rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.45rem; margin-bottom: 0.6rem; }

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 1rem;
}

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

.btn {
  display: inline-block;
  padding: 0.85rem 2.1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-solid {
  background: var(--bronze);
  color: #fff;
  border-color: var(--bronze);
}
.btn-solid:hover { background: var(--bronze-light); border-color: var(--bronze-light); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.btn-dark {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-dark:hover { background: var(--ink-soft); }

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: linear-gradient(rgba(10, 11, 13, 0.75), rgba(10, 11, 13, 0));
  transition: background 0.3s ease;
}

.site-header.scrolled {
  background: rgba(15, 16, 19, 0.96);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  text-decoration: none;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--bronze-light);
}

.brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #fff;
}

.brand-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--bronze-light);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
}

.site-nav a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.site-nav a:hover { color: var(--bronze-light); }

.site-nav .nav-phone {
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--bronze);
  color: var(--bronze-light);
  white-space: nowrap;
}
.site-nav .nav-phone:hover { background: var(--bronze); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--ink);
  overflow: hidden;
}

/* Oversized background layer, nudged by JS for a slight parallax drift */
.hero-bg {
  position: absolute;
  inset: -26% 0 0 0;
  background: url("../assets/img/hero.jpg") center 65% / cover no-repeat;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10, 11, 13, 0.78), rgba(10, 11, 13, 0.6) 45%, rgba(10, 11, 13, 0.8));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 7rem 1.5rem 5rem;
  max-width: 60rem;
}

.hero-content h1 { color: #fff; margin: 0.6rem 0 1.4rem; }

.hero-content .kicker { color: #fff; }

.hero-lede {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.88);
  max-width: 38rem;
  margin: 0 auto 2.4rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  animation: drift 2.4s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Sections ---------- */

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }

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

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
  margin-top: 2.5rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(20, 22, 26, 0.35);
}

.service-media { aspect-ratio: 4 / 3; overflow: hidden; }
.service-media img { width: 100%; height: 100%; object-fit: cover; }

.service-body { padding: 1.6rem 1.6rem 1.9rem; }
.service-body p { font-size: 0.95rem; color: var(--text-muted); }

/* ---------- About ---------- */

.about { background: var(--ink); }

.about .kicker { color: var(--bronze-light); }
.about h2 { color: var(--paper); }
.about p { color: rgba(245, 242, 236, 0.8); }

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3.4;
}

.about-points {
  list-style: none;
  margin: 1.8rem 0 2.2rem;
}

.about-points li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.7rem;
  color: rgba(245, 242, 236, 0.9);
  font-size: 0.95rem;
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.75rem;
  height: 1px;
  background: var(--bronze);
}

.about .btn-dark {
  background: var(--bronze);
  border-color: var(--bronze);
  color: #fff;
}
.about .btn-dark:hover { background: var(--bronze-light); border-color: var(--bronze-light); }

/* ---------- Projects ---------- */

.projects { background: var(--paper-deep); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 2vw, 1.4rem);
  margin-top: 2.5rem;
}

.project {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  background: var(--ink);
}

.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.project:hover img { transform: scale(1.05); opacity: 0.82; }

.project figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.2rem 1.1rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(transparent, rgba(10, 11, 13, 0.75));
  pointer-events: none;
}

/* ---------- Instagram ---------- */

.instagram { background: var(--paper); }

.ig-inner { text-align: center; max-width: 42rem; }

.ig-icon {
  width: 44px;
  height: 44px;
  color: var(--bronze);
  margin: 0 auto 1.2rem;
}

.ig-inner p { color: var(--text-muted); margin-bottom: 2rem; }

#ig-feed { margin-top: 2.5rem; }
#ig-feed:empty { display: none; }

/* ---------- Contact ---------- */

.contact { background: #fff; border-top: 1px solid var(--line); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-info p { color: var(--text-muted); }

.contact-list {
  list-style: none;
  margin-top: 2.2rem;
}

.contact-list li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  font-size: 0.95rem;
}

.contact-list a { text-decoration: none; color: var(--ink); }
.contact-list a:hover { color: var(--bronze); }

.contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.2em;
}

/* ---------- Form ---------- */

.contact-form { display: flex; flex-direction: column; gap: 1.15rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.field .optional { color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0.05em; }

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.8rem 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--bronze);
  background: #fff;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit { align-self: flex-start; }
.btn-submit[disabled] { opacity: 0.55; cursor: wait; }

.form-status { font-size: 0.95rem; min-height: 1.4em; }

.form-status.ok,
.form-status.err {
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--bronze);
}

.form-status.ok {
  background: var(--ink);
  color: var(--paper);
}

.form-status.err {
  background: #fdf1f0;
  color: #8f2b24;
  border-left-color: #b3372f;
}

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

.site-footer {
  background: var(--ink);
  color: rgba(245, 242, 236, 0.65);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand .brand-logo { width: 34px; height: 34px; color: var(--bronze); }
.footer-inner .brand-mark { font-size: 1.1rem; color: var(--paper); }
.footer-inner p { font-size: 0.82rem; }
.footer-inner a { color: rgba(245, 242, 236, 0.65); transition: color 0.2s ease; }
.footer-inner a:hover { color: var(--bronze-light); }

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 11, 13, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 2rem;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.6rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-count {
  color: rgba(255, 255, 255, 0.45);
  margin-left: 0.6rem;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
}

.lightbox-prev { left: clamp(0.6rem, 3vw, 2.5rem); }
.lightbox-next { right: clamp(0.6rem, 3vw, 2.5rem); }

@media (max-width: 680px) {
  .lightbox-arrow {
    top: auto;
    bottom: 1.2rem;
    transform: none;
    width: 2.8rem;
    height: 2.8rem;
  }
  .lightbox img { max-height: 70vh; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; }
  .about-media img { aspect-ratio: 16 / 10; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(20rem, 82vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.8rem;
    padding: 2rem;
    background: rgba(15, 16, 19, 0.98);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    visibility: hidden;
  }

  .site-nav.open { transform: translateX(0); visibility: visible; }

  .site-nav a { font-size: 1rem; }

  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project { aspect-ratio: 3 / 2; }
}
