/* Arthur Charles Homes — shared stylesheet
   Coastal Delaware, warm craftsman aesthetic. Mobile-first. */

:root {
  --navy: #1f3a5f;
  --navy-deep: #16293f;
  --gold: #b08d57;
  --gold-light: #cfb491;
  --sand: #f6f2ec;
  --cream: #fdfbf7;
  --ink: #2b2b2b;
  --gray: #6a6a6a;
  --line: #e5ddd1;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* height:auto is required — without it, the width/height attributes on <img> tags
   (added for layout-shift prevention) are treated as literal pixel dimensions and
   distort the image once max-width scales the width down. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 251, 247, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding: 14px 20px; max-width: 1120px; margin: 0 auto; }
.brand { text-decoration: none; line-height: 1.15; }
.brand .brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--navy); letter-spacing: 0.02em; display: block; }
.brand .brand-tag { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.18em; color: #9a938a; display: block; margin-top: 3px; }

.nav-toggle { display: none; }
.nav-toggle-label { display: block; cursor: pointer; width: 30px; padding: 6px 0; }
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block; height: 2px; width: 28px; background: var(--navy); position: relative; transition: all 0.25s ease; content: "";
}
.nav-toggle-label span::before { position: absolute; top: -8px; }
.nav-toggle-label span::after { position: absolute; top: 8px; }

nav.main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
nav.main-nav ul { list-style: none; padding: 0 20px; }
nav.main-nav li { border-top: 1px solid var(--line); }
nav.main-nav a { display: block; padding: 13px 4px; text-decoration: none; font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
nav.main-nav a.active { color: var(--gold); font-weight: 600; }
nav.main-nav a.nav-cta { color: var(--navy); font-weight: 700; }
.nav-toggle:checked ~ nav.main-nav { max-height: 420px; }

@media (min-width: 1040px) {
  .nav-toggle-label { display: none; }
  nav.main-nav { position: static; max-height: none; background: transparent; border: none; overflow: visible; }
  nav.main-nav ul { display: flex; flex-wrap: nowrap; gap: 22px; align-items: center; padding: 0; justify-content: flex-end; }
  nav.main-nav li { border: none; flex: 0 0 auto; }
  nav.main-nav a { padding: 6px 0; font-size: 0.8rem; white-space: nowrap; }
  nav.main-nav a.nav-cta { background: var(--navy); color: #fff; padding: 10px 20px; border-radius: 3px; white-space: nowrap; }
  nav.main-nav a.nav-cta:hover { background: var(--navy-deep); }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.82rem; padding: 15px 32px; border-radius: 3px; transition: background 0.2s ease, color 0.2s ease; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: #997747; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-outline { border: 1.5px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy-deep); color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.hero-inner { position: relative; padding: 96px 20px 110px; max-width: 860px; margin: 0 auto; text-align: center; }
.hero .eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--gold-light); margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 5.4vw, 3.4rem); font-weight: 700; line-height: 1.18; margin-bottom: 20px; }
.hero p.lede { font-size: 1.05rem; color: #e8e4dc; max-width: 620px; margin: 0 auto 34px; }
.hero .hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Page hero (interior pages) */
.page-hero { background: var(--navy); color: #fff; padding: 64px 20px 58px; text-align: center; }
.page-hero .eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--gold-light); margin-bottom: 12px; }
.page-hero h1 { font-family: var(--serif); font-size: clamp(1.8rem, 4.5vw, 2.7rem); font-weight: 700; line-height: 1.2; max-width: 780px; margin: 0 auto; }
.page-hero p { max-width: 640px; margin: 16px auto 0; color: #dfdacf; font-size: 1rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--sand); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 46px; }
.section-head .eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.28em; color: var(--gold); margin-bottom: 10px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.2rem); color: var(--navy); line-height: 1.25; }
.section-head p { color: var(--gray); margin-top: 14px; }

h3.sub { font-family: var(--serif); color: var(--navy); font-size: 1.35rem; margin-bottom: 12px; }

.prose p { margin-bottom: 18px; color: #3d3d3d; }
.prose p:last-child { margin-bottom: 0; }

/* Two-column feature */
.feature { display: grid; gap: 34px; align-items: center; }
@media (min-width: 880px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 60px; }
  .feature.flip .feature-media { order: 2; }
}
.feature-media img { border-radius: 4px; box-shadow: 0 18px 44px rgba(22, 41, 63, 0.16); }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; gap: 26px; }
@media (min-width: 680px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 26px; }
@media (min-width: 680px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card .card-body { padding: 20px 22px 24px; }
.card h3 { font-family: var(--serif); color: var(--navy); font-size: 1.15rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; color: var(--gray); }
.card a.card-link { display: inline-block; margin-top: 12px; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--gold); text-decoration: none; }
.card a.card-link:hover { text-decoration: underline; }

/* Gallery */
.gallery { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 780px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 3px; }
.gallery figcaption { font-size: 0.8rem; color: var(--gray); padding-top: 8px; }

/* Placeholder slots for photography not yet supplied */
.placeholder-slot { aspect-ratio: 4 / 3; border: 1.5px dashed var(--gold-light); border-radius: 3px; background: repeating-linear-gradient(45deg, #faf6ef, #faf6ef 12px, #f4eee3 12px, #f4eee3 24px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.placeholder-slot span { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); font-weight: 600; line-height: 1.6; }
.placeholder-slot.wide { aspect-ratio: 16 / 7; }

/* Process steps */
.steps { counter-reset: step; display: grid; gap: 26px; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px; padding: 26px 26px 24px; }
.step .step-num { font-family: var(--serif); font-size: 2rem; color: var(--gold-light); line-height: 1; margin-bottom: 10px; }
.step h3 { font-family: var(--serif); color: var(--navy); font-size: 1.15rem; margin-bottom: 8px; }
.step p { font-size: 0.93rem; color: var(--gray); }

/* Trust bar */
.trust-bar { display: grid; gap: 22px; text-align: center; }
@media (min-width: 680px) { .trust-bar { grid-template-columns: repeat(3, 1fr); } }
.trust-bar .trust-item h3 { font-family: var(--serif); color: var(--navy); font-size: 1.1rem; margin-bottom: 6px; }
.trust-bar .trust-item p { font-size: 0.9rem; color: var(--gray); }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; text-align: center; padding: 70px 20px; }
.cta-band h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin-bottom: 14px; }
.cta-band p { color: #dfdacf; max-width: 560px; margin: 0 auto 30px; }
/* Button pair — flex + gap so they never collide when they wrap on narrow screens. */
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 520px) {
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn { width: 100%; max-width: 300px; }
}

/* Service area chips */
.area-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; }
.area-list li { border: 1px solid var(--gold-light); color: var(--navy); border-radius: 999px; padding: 7px 18px; font-size: 0.85rem; }

/* ---------- Forms ---------- */
.form-wrap { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 34px 28px; }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 680px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
label { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); margin-bottom: 7px; }
input, select, textarea { width: 100%; padding: 13px 14px; border: 1px solid #d8d0c2; border-radius: 3px; font-family: var(--sans); font-size: 0.95rem; background: var(--cream); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-light); border-color: var(--gold); }
textarea { min-height: 130px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c9c4ba; padding: 56px 0 30px; font-size: 0.9rem; }
.footer-grid { display: grid; gap: 34px; margin-bottom: 40px; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer .brand-name { font-family: var(--serif); font-size: 1.25rem; color: #fff; }
.site-footer .brand-tag { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.22em; color: var(--gold-light); display: block; margin: 3px 0 14px; }
.site-footer h4 { color: #fff; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #c9c4ba; text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.footer-note { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; font-size: 0.78rem; color: #8f8a80; text-align: center; }
.town-toggle { margin-top: 12px; font-size: 0.8rem; }
.town-toggle summary { cursor: pointer; color: var(--gold-light); }
.town-toggle summary:hover { text-decoration: underline; }
.town-toggle p { margin-top: 8px; color: #8f8a80; line-height: 1.75; }

/* Video frame */
.video-frame { border-radius: 4px; overflow: hidden; box-shadow: 0 18px 44px rgba(22, 41, 63, 0.16); }
.video-frame video { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; background: var(--navy-deep); }

/* Portfolio — vertical scroll gallery.
   Each photo renders at its own natural aspect ratio: never cropped, never stretched. */
.pf-gallery { max-width: 980px; margin: 0 auto; }
.pf-item { margin: 0 0 54px; }
.pf-item:last-child { margin-bottom: 0; }
.pf-item img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 14px 38px rgba(22, 41, 63, 0.13); }
.pf-item figcaption { font-size: 0.88rem; color: var(--gray); padding-top: 12px; letter-spacing: 0.02em; }
/* Lower-resolution source files (512px native) — capped to native width so they
   render sharp rather than upscaling into blur. Raise this once hi-res originals
   are supplied for these three photos. */
.pf-item.pf-small { max-width: 512px; margin-left: auto; margin-right: auto; }
@media (min-width: 780px) {
  .pf-item { margin-bottom: 72px; }
  .pf-item figcaption { font-size: 0.92rem; padding-top: 14px; }
}

/* FAQ accordion */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative; font-family: var(--serif); color: var(--navy); font-size: 1.05rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.3rem; color: var(--gold); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 4px 20px 0; color: var(--gray); font-size: 0.95rem; }

/* Utility */
.center { text-align: center; }
.mt-30 { margin-top: 30px; }
.note { font-size: 0.85rem; color: var(--gray); font-style: italic; }
