/*
Theme Name: Bennett Construction & Design
Theme URI: https://bennettconstructiondesign.com
Author: Avodah Fieldworks
Description: A tailored five-page residential construction portfolio theme for Bennett Construction & Design.
Version: 1.0.4
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: bennett-cd
*/

:root {
  --ink: #11120f;
  --paper: #f7f5f0;
  --white: #fff;
  --stone: #d8d1c5;
  --oak: #76736c;
  --moss: #242522;
  --muted: #68685f;
  --line: rgba(17, 18, 15, .14);
  --max: 1180px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 780px); margin-inline: auto; }
.eyebrow { margin: 0 0 14px; font-size: .73rem; letter-spacing: .19em; text-transform: uppercase; font-weight: 750; }
h1, h2, h3 { margin: 0 0 .55em; font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(2.7rem, 6.7vw, 6.1rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
p { margin: 0 0 1.2em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--muted); max-width: 66ch; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 21px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); text-decoration: none; font-weight: 700; font-size: .9rem; letter-spacing: .035em; transition: .2s ease; }
.button:hover, .button:focus-visible { background: var(--moss); border-color: var(--moss); transform: translateY(-1px); }
.button--light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.75); }
.button--light:hover { background: var(--white); color: var(--ink); }
.button--outline { background: transparent; color: var(--ink); }
.button--outline:hover { color: var(--white); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.site-header { position: sticky; z-index: 50; top: 0; background: rgba(247,245,240,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { min-height: 88px; display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: 26px; }
.brand img { width: 205px; height: 72px; object-fit: contain; object-position: left center; }
.brand-fallback { font-family: var(--serif); font-size: 1.3rem; text-decoration: none; }
.site-nav ul { display: flex; justify-content: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.site-nav a { position: relative; text-decoration: none; font-size: .84rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.site-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px; background: var(--ink); transition: right .2s ease; }
.site-nav a:hover::after, .current-menu-item > a::after { right: 0; }
.header-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 17px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); font-size: .78rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: .2s ease; }
.header-cta:hover, .header-cta:focus-visible { background: var(--moss); border-color: var(--moss); transform: translateY(-1px); }
.menu-toggle { display: none; border: 0; background: transparent; padding: 9px; font: inherit; }

.hero { min-height: 78vh; position: relative; display: grid; align-items: end; color: var(--white); background: #222 center/cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9,10,8,.82) 0%, rgba(9,10,8,.48) 48%, rgba(9,10,8,.12) 100%), linear-gradient(0deg, rgba(9,10,8,.35), transparent 55%); }
.hero-content { position: relative; max-width: 850px; padding-block: clamp(110px, 16vw, 190px) 72px; }
.hero .lead { color: rgba(255,255,255,.86); max-width: 58ch; }
.hero h1 { max-width: 12ch; }

.trust-bar { background: var(--ink); color: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { padding: 28px 30px; border-right: 1px solid rgba(255,255,255,.15); }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; font-family: var(--serif); font-size: 1.65rem; font-weight: 500; }
.trust-item span { color: rgba(255,255,255,.68); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }

.section { padding-block: clamp(76px, 10vw, 130px); }
.section--white { background: var(--white); }
.section--dark { background: var(--moss); color: var(--white); }
.section--dark .lead { color: rgba(255,255,255,.72); }
.section-head { display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 48px; margin-bottom: 50px; }
.section-head p { margin-bottom: 0; }
.section-head > .lead { margin-top: 33px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(42px, 8vw, 100px); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.split-media--wide img { aspect-ratio: 6/5; }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card { min-height: 310px; padding: 38px; background: var(--paper); display: flex; flex-direction: column; }
.service-card .num { font-size: .75rem; letter-spacing: .12em; color: var(--oak); margin-bottom: auto; }
.service-card p { color: var(--muted); margin-bottom: 0; }
.service-card a { margin-top: 16px; font-weight: 750; text-underline-offset: 4px; }

.project-feature { position: relative; min-height: 610px; display: grid; align-items: end; background: center/cover no-repeat; color: var(--white); overflow: hidden; }
.project-feature::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,8,.85), rgba(10,10,8,.05) 70%); }
.project-feature-content { position: relative; padding: 45px; max-width: 720px; }
.project-feature-content p { color: rgba(255,255,255,.75); }
.home-gallery-teaser { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.home-gallery-teaser a { display: block; overflow: hidden; background: #222; }
.home-gallery-teaser img { width: 100%; aspect-ratio: 1/1; object-fit: cover; opacity: .9; transition: transform .35s ease, opacity .35s ease; }
.home-gallery-teaser a:hover img, .home-gallery-teaser a:focus-visible img { opacity: 1; transform: scale(1.035); }

.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.gallery figure { margin: 0; overflow: hidden; background: #ddd; }
.gallery figure:nth-child(6n+1), .gallery figure:nth-child(6n+4) { grid-column: span 7; }
.gallery figure:nth-child(6n+2), .gallery figure:nth-child(6n+3) { grid-column: span 5; }
.gallery figure:nth-child(6n+5), .gallery figure:nth-child(6n+6) { grid-column: span 6; }
.gallery img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.025); }
.gallery-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 36px; }
.gallery-intro .lead { margin-bottom: .6em; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.gallery-filter { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 10px 14px; font: 700 .78rem/1 var(--sans); letter-spacing: .04em; cursor: pointer; }
.gallery-filter span { color: var(--muted); font-weight: 500; margin-left: 5px; }
.gallery-filter:hover, .gallery-filter:focus-visible, .gallery-filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.gallery-filter.is-active span { color: rgba(255,255,255,.7); }
.gallery-card[hidden] { display: none; }
.gallery-open { position: relative; width: 100%; height: 100%; min-height: 360px; display: block; padding: 0; border: 0; background: #ddd; color: var(--white); text-align: left; cursor: zoom-in; overflow: hidden; }
.gallery-card-copy { position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: end; gap: 18px; padding: 44px 20px 18px; background: linear-gradient(0deg, rgba(8,9,7,.82), transparent); opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.gallery-card-copy strong { font-family: var(--serif); font-size: 1.22rem; font-weight: 500; }
.gallery-card-copy span { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.gallery-open:hover .gallery-card-copy, .gallery-open:focus-visible .gallery-card-copy { opacity: 1; transform: translateY(0); }
.gallery-dialog { width: min(94vw, 1280px); max-width: none; height: min(92vh, 920px); padding: 0; border: 0; background: #0c0d0b; color: var(--white); }
.gallery-dialog::backdrop { background: rgba(0,0,0,.86); }
.gallery-dialog-close { position: absolute; z-index: 2; top: 14px; right: 14px; border: 1px solid rgba(255,255,255,.5); background: rgba(12,13,11,.75); color: var(--white); padding: 9px 13px; font: 700 .75rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.gallery-dialog-stage { height: 100%; display: grid; grid-template-rows: minmax(0,1fr) auto; }
.gallery-dialog-stage img { width: 100%; height: 100%; object-fit: contain; }
.gallery-dialog-stage p { margin: 0; padding: 12px 20px 16px; color: rgba(255,255,255,.78); text-align: center; }

.page-hero { position: relative; padding-block: clamp(90px, 14vw, 160px) clamp(60px, 9vw, 100px); background-color: var(--ink); background-position: center; background-size: cover; background-repeat: no-repeat; color: var(--white); }
.page-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,9,7,.76) 0%, rgba(8,9,7,.48) 48%, rgba(8,9,7,.18) 100%); }
.page-hero .wrap { position: relative; }
.page-hero--about { background-image: url('assets/images/entry-detail.jpeg'); background-position: center 56%; }
.page-hero--services { background-image: url('assets/images/custom-home.JPG'); background-position: center 52%; }
.page-hero--projects { background-image: url('assets/images/gallery/IMG_2573.jpeg'); background-position: center 58%; }
.page-hero--contact { background-image: url('assets/images/screened-porch.jpeg'); background-position: center 54%; }
.page-hero h1 { max-width: 12ch; font-size: clamp(3rem, 6vw, 5.7rem); text-shadow: 0 2px 22px rgba(0,0,0,.24); }
.page-hero .lead { color: rgba(255,255,255,.88); text-shadow: 0 1px 12px rgba(0,0,0,.28); }
.quote { border-left: 2px solid var(--oak); padding-left: 28px; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.3; }
.values { display: grid; grid-template-columns: repeat(3,1fr); gap: 36px; }
.value { border-top: 1px solid var(--line); padding-top: 22px; }
.service-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.service-row { display: grid; grid-template-columns: 70px 1fr 1.2fr; gap: 30px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.service-row { scroll-margin-top: 110px; }
.service-row .num { color: var(--oak); font-weight: 800; }
.service-row p { color: var(--muted); margin: 0; }

.contact-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(44px,8vw,100px); }
.contact-list { list-style: none; padding: 0; margin: 30px 0; }
.contact-list li { padding: 17px 0; border-top: 1px solid var(--line); }
.contact-list span { display: block; color: var(--muted); font-size: .76rem; letter-spacing: .11em; text-transform: uppercase; }
.contact-list a { font-family: var(--serif); font-size: 1.25rem; text-decoration: none; }
.estimate-form { padding: clamp(28px,5vw,56px); background: var(--white); border: 1px solid var(--line); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: .78rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #bbb8b0; background: #fbfaf7; padding: 13px 14px; font: inherit; border-radius: 0; }
.field textarea { min-height: 155px; resize: vertical; }
.field--hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--oak); outline-offset: 1px; }
.form-note { color: var(--muted); font-size: .82rem; }
.notice { padding: 14px 16px; margin-bottom: 22px; background: #eaf1e8; border-left: 3px solid #4f724b; }
.notice--error { background: #f7e8e5; border-left-color: #a54938; }

.cta { padding-block: 76px; background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta h2 { max-width: 13ch; margin: 0; }
.site-footer { background: var(--ink); color: var(--white); padding-block: 62px 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .75fr .85fr; gap: 50px; }
.footer-logo { width: 210px; filter: invert(1); margin-bottom: 22px; }
.site-footer p, .site-footer li { color: rgba(255,255,255,.65); }
.site-footer h3 { font-family: var(--sans); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); font-size: .77rem; color: rgba(255,255,255,.5); }

@media (max-width: 920px) {
  .header-inner { grid-template-columns: 1fr auto; min-height: 78px; }
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .site-nav { display: none; grid-column: 1/-1; padding-bottom: 22px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero { min-height: 680px; }
  .section-head, .split, .contact-grid { grid-template-columns: 1fr; }
  .section-head { gap: 18px; }
  .section-head > .lead { margin-top: 0; }
  .gallery-intro { grid-template-columns: 1fr; gap: 10px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 240px; }
  .service-row { grid-template-columns: 52px 1fr; }
  .service-row p { grid-column: 2; }
  .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1/-1; }
}

@media (max-width: 640px) {
  .wrap, .narrow { width: min(calc(100% - 28px), var(--max)); }
  .brand img { width: 168px; height: 64px; }
  .hero { min-height: 650px; }
  .hero::before { background: linear-gradient(0deg, rgba(9,10,8,.88), rgba(9,10,8,.28)); }
  .hero-content { padding-bottom: 50px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  .field-grid, .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure { grid-column: auto !important; }
  .gallery img { min-height: 280px; }
  .gallery-open { min-height: 280px; }
  .gallery-card-copy { opacity: 1; transform: none; }
  .home-gallery-teaser { grid-template-columns: 1fr 1fr; }
  .project-feature { min-height: 500px; }
  .project-feature-content { padding: 28px; }
  .cta-inner, .footer-bottom { align-items: flex-start; flex-direction: column; }
}

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