/* Piedmont Home Services and Repair — light & earthy theme */
:root {
  --bg: #faf7f2;
  --bg-alt: #f3ede2;
  --surface: #ffffff;
  --border: #e5ddd0;
  --text: #3e362e;
  --muted: #7d7264;
  --primary: #3a5a40;
  --primary-dark: #2e4833;
  --accent: #c1694f;
  --accent-dark: #a8553d;
  --shadow: 0 4px 20px rgba(62, 54, 46, .08);
  --shadow-lg: 0 12px 32px rgba(62, 54, 46, .14);
  --radius: 14px;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(rgba(62, 54, 46, .025) 1px, transparent 1px);
  background-size: 22px 22px;
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .6rem;
}

.section h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  margin-bottom: 2.2rem;
}

/* ── Nav ─────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 247, 242, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.logo span { color: var(--text); font-weight: 400; }
.nav-links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-phone {
  background: var(--primary);
  color: #fff;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  transition: background .2s ease;
  white-space: nowrap;
}
.nav-phone:hover { background: var(--primary-dark); }

/* ── Hero ────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url("../assets/hero.webp") center/cover no-repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(rgba(250, 247, 242, .88), rgba(250, 247, 242, .55));
}
.hero-content { position: relative; max-width: 760px; padding: 7rem 1.5rem 4rem; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  margin: .4rem 0 1rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  margin-bottom: 2rem;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────── */
.btn {
  display: inline-block;
  padding: .85rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all .2s ease;
  border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-big { padding: 1.05rem 2.4rem; font-size: 1.1rem; }

/* ── Sections ────────────────────────── */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 5.5rem 1.5rem;
}
.section-alt {
  max-width: none;
  background: var(--bg-alt);
}
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-alt h2, .section-alt .eyebrow { max-width: 1180px; }
#portfolio h2, #portfolio .eyebrow { padding: 0 0; }

/* ── Services ────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow);
  transition: all .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--primary);
}
.card .icon {
  width: 44px; height: 44px;
  color: var(--primary);
  margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .97rem; }

/* ── Portfolio ───────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}
.filter {
  padding: .5rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .92rem;
  cursor: pointer;
  transition: all .2s ease;
}
.filter:hover { border-color: var(--primary); color: var(--primary); }
.filter.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.g-item {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
  transition: all .25s ease;
}
.g-item:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); outline: 3px solid var(--primary); outline-offset: 2px; }
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-item[hidden] { display: none; }

/* ── Lightbox ────────────────────────── */
.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
  border-radius: var(--radius);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(46, 40, 34, .82); }
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  display: block;
  border-radius: var(--radius);
}

/* ── About ───────────────────────────── */
.about-inner { max-width: 720px; }
.about-inner p { font-size: 1.1rem; margin-bottom: 1.6rem; }
.about-points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .8rem;
}
.about-points li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1.1rem;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.about-points li::before { content: "✓ "; color: var(--primary); font-weight: 700; }

/* ── Contact CTA ─────────────────────── */
.section-cta { text-align: center; }
.section-cta > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }
.contact-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Footer ──────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}

/* ── Reveal animations ───────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Mobile ──────────────────────────── */
@media (max-width: 720px) {
  .nav-inner { flex-wrap: wrap; gap: .7rem; padding: .7rem 1rem; }
  .nav-links { margin-left: 0; order: 3; width: 100%; justify-content: center; gap: 1rem; flex-wrap: wrap; }
  .nav-phone { margin-left: auto; }
  .services-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 1.1rem; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
