html { scroll-behavior: smooth; }
body { margin: 0; background: #ffffff; font-family: 'Inter', Arial, sans-serif; color: #14100f; }
a { color: #a3241f; text-decoration: none; }
a:hover { color: #7e1c18; }
* { box-sizing: border-box; }
summary::-webkit-details-marker { display: none; }
.faq-item summary { transition: background 0.15s ease; }
.faq-item summary:hover { background: #faf7f2; }
.faq-item .faq-icon { transition: transform 0.2s ease; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }

.site-header { box-shadow: 0 1px 3px rgba(20,16,15,0.06); }

.nav-links { list-style: none; display: flex; gap: 2.4rem; margin: 0; padding: 0; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }

.hero-h1 { font-size: 4.62rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hero-quote-card { position: absolute; right: 2.5rem; bottom: 2.5rem; width: min(380px, calc(100% - 3rem)); z-index: 5; }
.hero-quote-card input, .hero-quote-card select { width: 100%; padding: 0.85rem 1rem; border: 1.5px solid #e3dcd1; border-radius: 10px; font-size: 0.95rem; font-family: 'Inter', Arial, sans-serif; background: #fff; color: #14100f; }
.hero-quote-card input:focus, .hero-quote-card select:focus { outline: none; border-color: #a3241f; }
.hero-quote-card button[type="submit"] { display: block; width: 100%; background: #a3241f; color: #fff; font-weight: 700; font-size: 0.98rem; padding: 0.95rem 1rem; border: none; border-radius: 10px; cursor: pointer; transition: background 0.2s ease; }
.hero-quote-card button[type="submit"]:hover { background: #7e1c18; }

.btn-primary {
  display: inline-block;
  background: #a3241f;
  color: #fff;
  padding: 1rem 2.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { background: #7e1c18; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(163,36,31,0.28); }
.btn-primary.btn-sm { padding: 0.65rem 1.5rem; font-size: 0.82rem; letter-spacing: 0.5px; }

.portfolio-card { transition: box-shadow 0.25s ease, transform 0.25s ease; }
.portfolio-card:hover { box-shadow: 0 18px 36px rgba(20,16,15,0.16); transform: translateY(-5px); }
.portfolio-card-img { overflow: hidden; }
.portfolio-card-img img { transition: transform 0.45s ease; display: block; }
.portfolio-card:hover .portfolio-card-img img { transform: scale(1.07); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* nav active underline */
.nav-links a { position: relative; padding-bottom: 3px; transition: color 0.2s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: #a3241f; transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: #a3241f; }

/* shrinking header on scroll */
.site-header { transition: box-shadow 0.25s ease; }
.site-header nav { transition: padding 0.25s ease; }
.site-header.scrolled { box-shadow: 0 4px 16px rgba(20,16,15,0.10); }
.site-header.scrolled nav { padding-top: 0.7rem; padding-bottom: 0.7rem; }

/* button shine sweep */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg); transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 125%; }

/* hero entrance animation */
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-anim { animation: heroIn 0.8s ease both; }
.hero-anim.d1 { animation-delay: 0.1s; }
.hero-anim.d2 { animation-delay: 0.25s; }
.hero-anim.d3 { animation-delay: 0.4s; }
.hero-anim.d4 { animation-delay: 0.55s; }

/* process step reveal markers */
.step-num { color: #d9cfc0 !important; transition: color 0.4s ease, transform 0.4s ease; }
.process-row.in-view .step-num { color: #a3241f !important; transform: scale(1.08); }

/* back to top */
.back-to-top {
  position: fixed; right: 1.6rem; bottom: 1.6rem; width: 46px; height: 46px;
  background: #14100f; color: #fff; border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 90;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: #a3241f; }

/* portfolio lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(20,16,15,0.9); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 2rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 85vh; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.8rem; background: none; border: none;
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.portfolio-card-img { cursor: zoom-in; }
a.portfolio-card { display: block; color: #14100f; }
a.portfolio-card:hover { color: #14100f; }
a.portfolio-card .portfolio-card-img { cursor: pointer; }

/* house gallery grid */
.house-gallery-img { overflow: hidden; cursor: zoom-in; }
.house-gallery-img img { transition: transform 0.45s ease; display: block; width: 100%; height: 100%; object-fit: cover; }
.house-gallery-img:hover img { transform: scale(1.07); }
.house-gallery-link .house-gallery-img { cursor: pointer; }

@media (max-width: 860px) {
  /* dropdown slides/fades in; visibility delays on close so links aren't focusable while hidden */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-bottom: 1px solid #e6ded1;
    box-shadow: 0 12px 24px rgba(20,16,15,0.08);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    clip-path: inset(0 0 100% 0);
    transition: opacity 0.25s ease, transform 0.3s ease, clip-path 0.35s ease, visibility 0s linear 0.35s;
  }
  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 -40px 0);
    transition: opacity 0.25s ease, transform 0.3s ease, clip-path 0.35s ease, visibility 0s;
  }
  /* padding lives on the link so the whole row is tappable, not just the words */
  .nav-links a { display: block; padding: 0.85rem 2.5rem; transition: color 0.2s ease, background 0.15s ease; }
  .nav-links a:hover, .nav-links a:active { background: #faf7f2; }
  .nav-links a::after { display: none; }
  .nav-links li { padding: 0; border-bottom: 1px solid #f2ece2; opacity: 0; transform: translateY(-6px); transition: opacity 0.2s ease, transform 0.25s ease; }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links.open li { opacity: 1; transform: none; }
  .nav-links.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.09s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.13s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.17s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.21s; }
  .nav-links.open li:nth-child(6) { transition-delay: 0.25s; }
  .nav-links.open li:nth-child(7) { transition-delay: 0.29s; }
  .nav-phone { display: none; }
  .nav-toggle { display: inline-flex; }

  /* hamburger morphs into an X while the menu is open */
  .nav-toggle line { transform-origin: 12px 12px; transition: transform 0.3s ease, opacity 0.2s ease; }
  .nav-toggle[aria-expanded="true"] line:nth-child(1) { transform: rotate(45deg) translateY(6px); }
  .nav-toggle[aria-expanded="true"] line:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] line:nth-child(3) { transform: rotate(-45deg) translateY(-6px); }
  .home-hero { padding-bottom: 4.5rem; }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .nav-links, .nav-links li, .nav-toggle line { transition-duration: 0s !important; transition-delay: 0s !important; }
}

@media (max-width: 640px) {
  .hero-h1 { font-size: 2.53rem; }
}

/* contact page */
.btn-outline-light {
  display: inline-block; padding: 1rem 2.4rem; font-size: 0.92rem; font-weight: 600; letter-spacing: 1px;
  color: #fff; border: 1.5px solid rgba(255,255,255,0.8); transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline-light:hover { background: #fff; color: #14100f; }
.trust-strip li { color: #e6ded1; font-size: 0.82rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.contact-card {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 1.8rem 1.6rem; background: #f2ece2; color: #14100f;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
a.contact-card:hover { color: #14100f; box-shadow: 0 14px 30px rgba(20,16,15,0.12); transform: translateY(-3px); }
.contact-card-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #a3241f; margin-top: 0.4rem; }
.contact-card-value { font-size: 1rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.next-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.8rem; }
.next-steps li { display: flex; gap: 1.2rem; }
.next-step-num { font-family: 'Italiana', Georgia, serif; font-size: 1.8rem; font-weight: 700; color: #a3241f; flex: 0 0 48px; line-height: 1; }
.next-steps h3 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.next-steps p { color: #6b6b6b; font-size: 0.92rem; line-height: 1.65; margin: 0; }
.contact-form { background: #fff; border: 1px solid #e6ded1; padding: 2.2rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 18px 40px rgba(20,16,15,0.06); }
.contact-form .field { display: flex; flex-direction: column; gap: 0.4rem; flex: 1 1 200px; }
.contact-form .field > span { font-size: 0.8rem; font-weight: 600; color: #14100f; }
.contact-form .field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form select, .contact-form textarea {
  width: 100%; padding: 0.85rem 1rem; border: 1px solid #ded4c4; background: #fff; color: #14100f;
  font-size: 0.95rem; font-family: 'Inter', Arial, sans-serif; border-radius: 0;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: #a3241f; box-shadow: 0 0 0 3px rgba(163,36,31,0.12); }
.contact-form button:disabled { opacity: 0.7; cursor: wait; }
.contact-form .form-error { margin: 0; color: #a3241f; font-size: 0.88rem; text-align: center; }
.contact-form .form-error a { color: #a3241f; text-decoration: underline; }
.form-success { text-align: center; padding: 2rem 0.5rem; outline: none; }
.form-success-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(163,36,31,0.1); color: #a3241f; font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.2rem; }
.form-success h2 { font-family: 'Italiana', Georgia, serif; font-size: 1.6rem; font-weight: 700; margin: 0 0 0.8rem; color: #14100f; }
.form-success p { color: #6b6b6b; font-size: 0.98rem; line-height: 1.7; margin: 0; }
.form-success a { color: #a3241f; font-weight: 600; }
.service-areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.service-areas li { background: #f2ece2; padding: 0.5rem 0.95rem; font-size: 0.86rem; font-weight: 600; color: #14100f; }
.service-areas a { color: #a3241f; }
@media (max-width: 640px) {
  .contact-hero { padding: 9rem 0 4rem !important; }
  .contact-hero h1 { font-size: 2rem !important; }
  .contact-form { padding: 1.5rem; }
}

/* Dropdowns: custom caret inset from the right border */
.hero-quote-card select, .contact-form select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 2.75rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2314100f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 12px 8px;
}

/* ---------- Phone layout fixes ----------
   Most layout is inline-styled, so these overrides use !important and
   attribute selectors to reach the shared inline patterns across pages. */

/* Grids: never let a minmax() column exceed the container */
[style*="grid-template-columns:repeat(auto-fit,minmax(320px,1fr))"] { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)) !important; }
[style*="grid-template-columns:repeat(auto-fit,minmax(280px,1fr))"] { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important; }
[style*="grid-template-columns:repeat(auto-fit,minmax(260px,1fr))"] { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important; }

@media (max-width: 860px) {
  /* Home hero: put the headline in normal flow so the hero sizes to its content */
  /* drop inline height:100vh; keep overflow hidden so the parallax bg doesnt bleed */
  .home-hero { height: auto !important; min-height: 0 !important; }
  .home-hero .hero-content { position: relative !important; padding: 9rem 1.25rem 5.5rem !important; }
  /* Hide the consultation form on mobile; the hero CTA and header button link to contact */
  .hero-quote-card { display: none; }
}

@media (max-width: 640px) {
  /* Tighter side gutters */
  [style*="padding:0 2.5rem"] { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }

  /* Header: smaller logo, compact CTA so the bar fits on one line */
  .site-header nav { padding: 0.8rem 1.25rem !important; }
  .site-header nav > a img { height: 64px !important; }
  /* Slide the header away while scrolling down; main.js toggles .nav-hidden */
  .site-header { transition: transform 0.3s ease, box-shadow 0.25s ease; }
  .site-header.nav-hidden { transform: translateY(-100%); box-shadow: none; }
  .site-header nav > div { gap: 0.6rem !important; }
  .site-header .btn-primary.btn-sm { padding: 0.55rem 0.9rem; font-size: 0.75rem; letter-spacing: 0; }
  .nav-links a { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* Shorter vertical rhythm */
  section[style*="padding:7rem 0;"] { padding-top: 4.5rem !important; padding-bottom: 4.5rem !important; }
  section[style*="padding:6.5rem 0;"], section[style*="padding:6rem 0;"] { padding-top: 4rem !important; padding-bottom: 4rem !important; }
  section[style*="padding:10rem 0"], section[style*="padding:11rem 0"] { padding-top: 7.5rem !important; }

  /* Headings scaled for small screens */
  h1[style*="font-size:2.6rem"], h1[style*="font-size:2.8rem"], h1[style*="font-size:2.4rem"] { font-size: 2rem !important; }
  h2[style*="font-size:2.4rem"], h2[style*="font-size:2.6rem"], h2[style*="font-size:2.2rem"] { font-size: 1.8rem !important; }
  .hero-content p { font-size: 1rem !important; }

  /* Side-by-side text/image rows: drop the large gap and fixed image heights */
  [style*="gap:4.5rem"] { gap: 2rem !important; }
  [style*="flex:1 1 440px"], [style*="flex:1 1 420px"] { flex-basis: 100% !important; }
  img[style*="height:400px"], img[style*="height:420px"], div[style*="height:400px"] { height: 260px !important; }
  .house-gallery-img[style*="height:520px"] { height: 280px !important; }
  [style*="min-width:280px"] { min-width: 0 !important; }

  /* Process steps: smaller number column so the text isn't squeezed */
  .process-row { gap: 1rem !important; }
  .process-row .step-num { font-size: 2rem !important; flex: 0 0 44px !important; }
  .process-row > div:last-child { padding-left: 1rem !important; }

  .back-to-top { right: 1rem; bottom: 1rem; }
}

@media (max-width: 359px) {
  /* Very narrow phones: the menu carries the CTA via the Contact link */
  .site-header .btn-primary.btn-sm { display: none; }
}

/* Footer columns: stacked on phones/tablets, one row of three on laptop+ */
.footer-cols { display: flex; flex-direction: column; gap: 2.5rem; }
@media (min-width: 861px) {
  .footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); }
}
