/* ==========================================================================
   Miller & Sons Construction Services LLC - Stylesheet
   Edit the color/spacing tokens in :root to retheme the whole site.
   ========================================================================== */

:root {
  --black: #121416;
  --charcoal: #1c1e21;
  --charcoal-2: #25282c;
  --gray-700: #3a3e44;
  --gray-500: #7b8089;
  --gray-300: #c4c8ce;
  --gray-100: #f2f3f5;
  --white: #ffffff;
  --accent: #c9a24a;        /* muted gold */
  --accent-dark: #a98532;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  --header-h: 116px;
  --logo-h: 96px;      /* header logo height (was 48px) */
  --font-head: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

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

.container {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--black);
  padding: 0.75rem 1rem;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn-primary { background: var(--accent); color: var(--black); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--black); transform: translateY(-2px); }
.btn-block { display: block; width: 100%; }
.btn-nav { padding: 0.6rem 1.2rem; font-size: 0.8rem; white-space: nowrap; }
.brand-name, .site-nav ul a { white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(18, 20, 22, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--white); }
.brand-logo { height: var(--logo-h); width: auto; max-width: 62vw; object-fit: contain; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-sub { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray-300); }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; gap: 1.75rem; }
.site-nav ul a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav ul a:hover { color: var(--white); border-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  width: 26px;
  height: 2px;
  margin: 6px 0;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Header phone number (sits after the Request an Estimate button) */
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.header-phone::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.header-phone:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  color: var(--white);
  overflow: hidden;
}
/* HERO IMAGE: currently uses assets/images/hero.png.
   To switch back to the placeholder SVG, comment out the PNG line and un-comment the SVG line. */
.hero-bg {
  position: absolute;
  inset: 0;
  /* background: var(--charcoal) url("assets/images/hero.svg") center / cover no-repeat; */
  background: var(--charcoal) url("assets/images/hero.png") center / cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 15, 17, 0.45);
}
.hero-content { position: relative; padding-block: 5rem; max-width: 1180px; }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 700; margin-bottom: 0.4em; }
.hero-text { max-width: 600px; font-size: 1.15rem; color: var(--gray-100); margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section-dark { background: var(--charcoal); color: var(--white); }
.section-head { max-width: 700px; margin-bottom: 3rem; }
.section-head h2, .contact-info h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.section-intro { color: var(--gray-500); font-size: 1.05rem; margin: 0; }
.section-dark .section-intro { color: var(--gray-300); }
.placeholder-note {
  display: inline-block;
  margin: 1.25rem 0 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px dashed var(--accent);
}

/* Reusable icon badge */
.icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}
.icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 48px; height: 48px; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid #e3e5e8;
  border-top: 3px solid var(--charcoal);
  padding: 2rem 1.75rem;
  transition: transform 0.3s, box-shadow 0.3s, border-top-color 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-top-color: var(--accent); }
.card h3 { font-size: 1.2rem; }
.card p { margin: 0; color: var(--gray-500); font-size: 0.95rem; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  padding: 0;
  border: 0;
  background: var(--black);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s, opacity 0.3s;
}
.gallery-item:hover img { transform: scale(1.06); opacity: 0.75; }
.gallery-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1rem 0.8rem;
  text-align: left;
  color: var(--white);
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.gallery-count {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--accent);
  border-radius: var(--radius);
}

/* ---------- Why Us ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
}
.why-item {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--gray-100);
  border-left: 3px solid var(--accent);
}
.why-num {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--gray-300);
}
.why-item h3 { font-size: 1.1rem; }
.why-item p { margin: 0; color: var(--gray-700); font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.contact-list { margin-top: 2rem; display: grid; gap: 1.25rem; }
.contact-list li { display: flex; flex-direction: column; }
.contact-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background: var(--white);
  color: var(--charcoal);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-form h3 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.req { color: #b3261e; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.3);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #b3261e; }
.error { min-height: 0; margin: 0.3rem 0 0; font-size: 0.82rem; color: #b3261e; }
.form-note { margin: 1rem 0 0; font-size: 0.82rem; color: var(--gray-500); }
.form-status { margin: 0.75rem 0 0; font-size: 0.9rem; font-weight: 600; color: #1e6b3a; }
.form-status:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--gray-300); padding-top: 3.5rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-logo-link { display: inline-block; margin-bottom: 1rem; }
.footer-logo { height: 140px; width: auto; max-width: 100%; object-fit: contain; }
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--white); margin: 0 0 0.4rem; }
.footer-tag { margin: 0; color: var(--gray-500); }
.footer-title { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0 0 0.8rem; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-block: 1.25rem; font-size: 0.85rem; color: var(--gray-500); }
.footer-bottom p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 9, 10, 0.94);
  padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: min(1000px, 80vw); text-align: center; }
.lightbox-figure img { max-height: 78vh; width: auto; margin-inline: auto; border-radius: var(--radius); }
.lightbox-figure figcaption { margin-top: 0.8rem; color: var(--gray-300); font-size: 0.95rem; }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 0;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent); color: var(--black); }
.lightbox-close { top: 1rem; right: 1rem; width: 48px; height: 48px; font-size: 2rem; border-radius: 50%; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 64px; font-size: 2.4rem; border-radius: var(--radius); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ---------- Scroll reveal (subtle) ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.card.reveal.visible:hover { transform: translateY(-6px); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) and (min-width: 1021px) {
  .site-nav { gap: 1.1rem; }
  .site-nav ul { gap: 1rem; }
  .brand-sub { display: none; }
}

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem 2rem;
    background: var(--black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  }
  .site-nav.open { opacity: 1; transform: none; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 0.5rem; }
  .site-nav ul a { display: block; padding: 0.7rem 0; font-size: 0.95rem; }
  .btn-nav { text-align: center; padding: 0.9rem; }
  .header-phone { justify-content: center; font-size: 1.05rem; padding: 0.4rem 0; }
}

@media (max-width: 560px) {
  :root { --header-h: 96px; --logo-h: 76px; }
  .footer-logo { height: 120px; }
  .brand-sub { display: none; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .lightbox-figure { max-width: 100%; }
  .lightbox-nav { width: 40px; height: 52px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
