/* ===== PJE Home Improvement — Design System ===== */

:root {
  --olive: #4F5340;
  --olive-dark: #3B3E30;
  --olive-darker: #2A2C24;
  --olive-light: #6B6F58;
  --cream: #F2EEE3;
  --cream-2: #E9E3D4;
  --sand: #DCD4C0;
  --ink: #2A2C24;
  --muted: #6E6B5E;
  --white: #ffffff;
  --sun: #C6883A;          /* warm accent for primary CTAs / phone */
  --sun-dark: #A96E29;
  --error: #B4442E;
  --success: #4F7A3A;
  --border: #D8D1C0;

  --font-head: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --max-width: 1180px;
  --nav-height: 76px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(42, 44, 36, 0.08);
  --shadow: 0 8px 28px rgba(42, 44, 36, 0.12);
  --shadow-lg: 0 18px 50px rgba(42, 44, 36, 0.18);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

/* ===== Typography ===== */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--olive-darker); line-height: 1.05; font-weight: 700; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
h4 { font-size: 1.1rem; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sun-dark);
}

p { font-size: 1.05rem; line-height: 1.7; color: var(--ink); max-width: 65ch; }
a { color: var(--olive); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--sun-dark); }

/* ===== Layout ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-alt { background: var(--white); }
.section-olive { background: var(--olive); color: var(--cream); }
.section-olive h1, .section-olive h2, .section-olive h3 { color: var(--white); }
.section-olive p { color: var(--cream-2); }
.text-center { text-align: center; }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-header .eyebrow { display: block; margin-bottom: 10px; }
.section-header p { margin: 12px auto 0; color: var(--muted); }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height);
  background: rgba(242, 238, 227, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 1000; border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { height: 52px; display: flex; align-items: center; }
.nav-logo img { height: 52px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links > li > a {
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--ink);
  position: relative; padding: 4px 0;
}
.nav-links > li > a::after {
  content: ''; position: absolute; bottom: -3px; left: 0; width: 0; height: 2px;
  background: var(--sun); transition: width 0.25s ease;
}
.nav-links > li > a:hover::after, .nav-links > li > a.active::after { width: 100%; }
.nav-links > li > a:hover { color: var(--olive-darker); }
.nav-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--olive-darker); }
.nav-phone svg { color: var(--sun-dark); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--olive-darker); margin: 5px 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--font-body); font-weight: 700; font-size: 0.92rem; letter-spacing: 0.02em;
  padding: 14px 30px; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s ease; text-align: center;
}
.btn-primary { background: var(--sun); color: #fff; border-color: var(--sun); }
.btn-primary:hover { background: var(--sun-dark); border-color: var(--sun-dark); color: #fff; transform: translateY(-1px); }
.btn-olive { background: var(--olive); color: #fff; border-color: var(--olive); }
.btn-olive:hover { background: var(--olive-dark); border-color: var(--olive-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--olive-darker); border-color: var(--olive); }
.btn-outline:hover { background: var(--olive); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: #fff; color: var(--olive-darker); border-color: #fff; }
.btn-lg { padding: 17px 40px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 88vh; padding-top: var(--nav-height);
  display: flex; align-items: center; overflow: hidden; background: var(--olive-darker);
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.35; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(42,44,36,0.92) 0%, rgba(42,44,36,0.65) 55%, rgba(42,44,36,0.35) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; padding: 60px 24px; margin: 0 auto; width: 100%; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 .accent { color: var(--sun); }
.hero p { font-size: 1.2rem; color: var(--cream); margin-bottom: 34px; max-width: 34rem; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 38px; }
.hero-trust-item { display: flex; align-items: center; gap: 9px; color: var(--cream); font-weight: 600; font-size: 0.95rem; }
.hero-trust-item svg { color: var(--sun); flex-shrink: 0; }

/* ===== Service cards ===== */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.service-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; transition: transform 0.25s ease, box-shadow 0.25s ease; box-shadow: var(--shadow-sm);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-icon {
  width: 54px; height: 54px; border-radius: var(--radius); background: var(--cream);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--olive);
}
.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: 0.98rem; color: var(--muted); }

/* ===== Gallery cards ===== */
.gallery-card {
  display: block; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; box-shadow: var(--shadow-sm);
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--cream-2); }
.gallery-card-body { padding: 20px 22px; }
.gallery-card-body h3 { color: var(--olive-darker); margin-bottom: 4px; }
.gallery-card-body p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.gallery-card .meta { font-size: 0.8rem; color: var(--sun-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.img-placeholder { width: 100%; aspect-ratio: 4/3; background: var(--cream-2); display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.1em; font-size: 1rem; }

/* ===== Before/After ===== */
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--white); }
.ba-side { position: relative; }
.ba-side img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ba-tag { position: absolute; top: 10px; left: 10px; background: var(--olive-darker); color: #fff; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 4px; }
.ba-side.after .ba-tag { background: var(--sun); }

/* ===== Forms ===== */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--olive-darker); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(79, 83, 64, 0.12); }
.form-textarea { min-height: 130px; resize: vertical; }
.form-message { font-size: 0.95rem; padding: 13px 16px; margin-top: 16px; border-radius: var(--radius); display: none; }
.form-message.show { display: block; }
.form-message.success { background: rgba(79, 122, 58, 0.12); color: var(--success); border: 1px solid rgba(79, 122, 58, 0.3); }
.form-message.error { background: rgba(180, 68, 46, 0.1); color: var(--error); border: 1px solid rgba(180, 68, 46, 0.3); }

/* ===== Footer ===== */
.footer { background: var(--olive-darker); color: var(--cream-2); padding: 60px 0 26px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.footer img { height: 60px; margin-bottom: 16px; }
.footer p { color: var(--cream-2); font-size: 0.95rem; max-width: 32ch; }
.footer h4 { color: #fff; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; font-size: 0.95rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: var(--cream-2); font-size: 0.95rem; }
.footer-links a:hover { color: #fff; }
.footer-contact { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--cream-2); font-size: 0.95rem; }
.footer-contact svg { color: var(--sun); flex-shrink: 0; }
.footer-bottom { max-width: var(--max-width); margin: 40px auto 0; padding: 20px 24px 0; border-top: 1px solid rgba(255,255,255,0.14); text-align: center; }
.footer-bottom p { color: rgba(242, 238, 227, 0.6); font-size: 0.85rem; max-width: 100%; margin: 0 auto; }

/* ===== Utility ===== */
.divider-bar { width: 56px; height: 4px; background: var(--sun); border-radius: 2px; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 20px; }
.mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; } .mb-0 { margin-bottom: 0; }

/* ===== Responsive ===== */
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: rgba(242, 238, 227, 0.98); flex-direction: column; align-items: flex-start;
    padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .hero { min-height: 82vh; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .form-card { padding: 24px; }
}

/* ===== Animations ===== */
.fade-up { opacity: 0; transform: translateY(24px); }
.fade-up.in { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; }
  * { scroll-behavior: auto !important; }
}
