/* ===================== Variables ===================== */
:root {
  /* Kinman Builders brand kit */
  --espresso: #211A16;
  --espresso-2: #2B221D;
  --espresso-3: #362B24;
  --copper: #A94F2A;
  --copper-dark: #8C3F20;
  --sand: #E5D7BD;
  --earth: #6B5A42;
  --sage: #4F5A3A;
  --cream: #F7F3EA;
  --text-dark: #211A16;
  --text-muted: #5B4E40;
  --radius: 4px;
  --max-width: 1180px;
  --shadow: 0 10px 30px rgba(33,26,22,.16);
  --font-head: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: #fff;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }

.eyebrow {
  font-family: var(--font-head);
  color: var(--sand);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
  font-weight: 600;
  margin: 0 0 .8em;
}
.eyebrow-dark { color: var(--copper); }

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--text-dark);
  font-weight: 800;
}
.section-title-light { color: #fff; }
.section-sub {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.section-sub-light { color: #d9ccb4; }
.about .section-title, .about .checklist li { color: var(--espresso); }
.about-copy p { color: var(--earth); }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .75em 1.6em;
  border-radius: var(--radius);
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  font-size: .8rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-copper {
  background: var(--copper);
  color: var(--cream);
  box-shadow: 0 6px 18px rgba(169,79,42,.35);
}
.btn-copper:hover { background: var(--copper-dark); box-shadow: 0 10px 22px rgba(169,79,42,.45); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-dark {
  background: var(--espresso);
  color: var(--sand);
}
.btn-dark:hover { background: var(--espresso-3); }
.btn-lg { padding: .95em 2em; font-size: .95rem; }
.btn-block { width: 100%; }

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--espresso);
  border-bottom: 3px solid var(--copper);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}
.brand-logo {
  width: 54px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-head);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.brand-tagline {
  color: var(--sand);
  opacity: .8;
  font-size: .6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.main-nav {
  display: flex;
  gap: 28px;
}
.main-nav a {
  color: var(--sand);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.main-nav a:hover { color: #fff; border-color: var(--copper); }
.main-nav .mobile-only { display: none; }

.header-cta { display: flex; align-items: center; gap: 18px; }
.phone-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.phone-link:hover { color: var(--sand); }
.icon-sm { width: 18px; height: 18px; fill: currentColor; }
.icon-md { width: 22px; height: 22px; fill: currentColor; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ===================== Hero ===================== */
.hero {
  background-color: var(--espresso);
  background-image:
    radial-gradient(ellipse 38% 55% at 75% 50%, rgba(33,26,22,.9) 0%, rgba(33,26,22,.7) 60%, rgba(33,26,22,0) 100%),
    linear-gradient(90deg, rgba(33,26,22,.88) 0%, rgba(33,26,22,.7) 50%, rgba(33,26,22,.78) 100%),
    url('../images/gallery-patio-pool.jpg');
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(229,215,189,.12);
  min-height: 86vh;
  display: flex;
  align-items: center;
  color: #fff;
}
.hero-inner { padding-top: 60px; padding-bottom: 60px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-logo { width: 100%; max-width: 460px; margin-left: auto; filter: drop-shadow(0 6px 24px rgba(33,26,22,.8)); }
.hero h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  color: #fff;
  line-height: 1.08;
  margin-bottom: .3em;
}
.hero-sub {
  font-size: 1.15rem;
  color: #eadfca;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 1.5em; }

/* ===================== Trust band ===================== */
.trust-band { background: var(--sage); color: var(--cream); }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 28px; padding-top: 16px; padding-bottom: 16px; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.trust-inner .dia { width: 8px; height: 8px; background: var(--sand); transform: rotate(45deg); flex-shrink: 0; }

/* Brand accent rules (double line) */
.rule { display: block; width: 84px; height: 5px; margin: 14px 0 22px; border-top: 1px solid var(--copper); border-bottom: 1px solid var(--copper); }

/* ===================== Services ===================== */
.services { background: var(--cream); }
.about { background: var(--sand); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 48px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--copper);
  transition: transform .18s ease;
}
.service-card:hover { transform: translateY(-5px); }
.service-icon { width: 48px; height: 48px; margin-bottom: 18px; }
.service-icon svg { width: 100%; height: 100%; fill: var(--copper); stroke: var(--copper); }
.service-card h3 {
  font-size: 1.1rem;
  color: var(--text-dark);
}
.service-card p { color: var(--text-muted); margin-bottom: 0; font-size: .96rem; }

/* ===================== Gallery ===================== */
.gallery-section { background: var(--espresso-2); }
.gallery-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--espresso-3);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-wide { grid-column: span 2; grid-row: span 2; }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82));
  color: #fff;
  font-family: var(--font-head);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
}

/* ===================== About ===================== */
.about-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.checklist { margin: 1.2em 0 1.6em; display: flex; flex-direction: column; gap: 10px; }
.checklist li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
  color: var(--text-dark);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 3px; top: 6px;
  width: 12px; height: 12px;
  transform: rotate(45deg);
  background: var(--copper);
}

.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===================== Contact ===================== */
.contact-section { background: var(--espresso); color: #fff; }
.contact-inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
}
.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--sand);
  margin: 10px 0 28px;
}
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.service-list li {
  border: 1px solid rgba(229,215,189,.35);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sand);
}

.contact-form {
  background: var(--espresso-2);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hidden-field { position: absolute; left: -9999px; }
.form-row { margin-bottom: 18px; }
.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sand);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: .7em .8em;
  border-radius: 4px;
  border: 1px solid rgba(229,215,189,.25);
  background: rgba(229,215,189,.05);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--copper);
  background: rgba(255,255,255,.07);
}
.form-row textarea { resize: vertical; }

/* ===================== Footer ===================== */
.site-footer { background: #171210; color: var(--sand); padding-top: 48px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(229,215,189,.12);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: .9rem; }
.footer-links a:hover { color: var(--sand); }
.footer-logo { height: 84px; width: auto; }
.footer-bottom {
  padding: 18px 24px 28px;
  font-size: .82rem;
  color: #9a8b76;
}

/* ===================== Lightbox ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(23,18,16,.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
  padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox p {
  color: var(--sand);
  margin-top: 16px;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .9rem;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .hero { background-image: linear-gradient(180deg, rgba(33,26,22,.85), rgba(33,26,22,.9)), url('../images/gallery-patio-pool.jpg'); }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .about-image { order: -1; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery-item-wide { grid-column: span 2; grid-row: span 1; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo { max-width: 280px; margin: 0 0 8px; order: -1; }
}

@media (max-width: 760px) {
  .header-inner { gap: 10px; }
  .brand { min-width: 0; margin-right: auto; }
  .brand-tagline { display: none; }
  .brand-name { font-size: 1rem; white-space: nowrap; }
  .brand-logo { width: 46px; height: 40px; }
  .main-nav { display: none; }
  .header-cta { gap: 10px; }
  .header-cta .phone-link span { display: none; }
  .header-cta .btn { display: none; }
  .nav-toggle { display: flex; flex-shrink: 0; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--espresso);
    padding: 16px 24px 24px;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .site-header.nav-open .main-nav .mobile-only {
    display: block;
    color: var(--sand);
    font-weight: 700;
  }

  .section { padding: 56px 0; }
  .form-row-split { grid-template-columns: 1fr; }
}
