/* ==========================================================================
   Blue Crown Renovations — 1:1 rebuild
   Design tokens extracted from the original Houzz theme.
   ========================================================================== */

:root {
  --dark:      #283618;   /* forest      */
  --light:     #F0EBE6;   /* bone        */
  --neutral:   #645E55;   /* taupe       */
  --primary:   #A99985;   /* warm tan    */
  --secondary: #DAD2BC;   /* sand        */
  --white:     #FFFFFF;
  --blue:      #1f8bef;   /* logo crown accent */

  --font-serif: "Bodoni Moda", "Times New Roman", Times, serif;
  --font-sans:  "Didact Gothic", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --maxw: 1200px;
  --pad: 24px;
  --header-h: 92px;
}

/* ----- reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--neutral); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--dark); }

/* ----- typography ----- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
.t1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 400; line-height: 1.2; color: var(--dark);
}
.t2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 30px);
  font-weight: 500; line-height: 1.35; color: var(--dark);
}
.t3 { /* lowercase sub-headers */
  font-family: var(--font-sans);
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 400; line-height: 1.3; color: var(--neutral);
  margin-top: 6px;
}
.eyebrow {
  font-family: var(--font-sans);
  letter-spacing: .12em; text-transform: uppercase;
  font-size: 14px; color: var(--neutral);
}
p { margin: 0 0 1em; }
.lead { font-size: 18px; line-height: 1.6; }
.muted { color: var(--neutral); }

/* ----- layout ----- */
main { overflow-x: clip; } /* contains side-slide reveal animations, no h-scrollbar */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.container--narrow { max-width: 820px; }
.section { padding: 84px 0; }
.section--bone  { background: var(--light); }
.section--white { background: var(--white); }
.section--sand  { background: var(--secondary); }
.center { text-align: center; }
.section-head { margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ----- buttons ----- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 18px; line-height: 1.6; letter-spacing: .1em;
  padding: 13px 32px; border: 2px solid var(--dark); border-radius: 0;
  background: var(--dark); color: var(--light);
  cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: transparent; color: var(--dark); }
.btn--ghost { background: transparent; color: var(--dark); }
.btn--ghost:hover { background: var(--dark); color: var(--light); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--light);
  border-bottom: 1px solid rgba(40,54,24,.08);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 12px var(--pad);
}
.logo { display: inline-flex; align-items: center; }
.logo img { width: 400px; max-width: 100%; height: auto; } /* matches original (size 400) */
.nav { display: flex; align-items: center; }
.nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--font-sans); font-size: 16px; letter-spacing: .04em;
  color: var(--neutral); padding: 6px 0; position: relative;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--dark); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--primary);
}
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 8px; color: var(--neutral);
}
.nav-toggle svg { width: 100%; height: 100%; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background-size: cover; background-position: center;
  background-attachment: fixed; /* pinned/parallax — falls back to scroll on iOS Safari */
  display: flex; align-items: center;
}
.hero--standard { min-height: 78vh; }
.hero--short    { min-height: 46vh; }

/* Decorative full-width parallax image bands (pinned background) */
.image-band {
  position: relative;
  background-size: cover; background-position: center;
  background-attachment: fixed; /* pinned/parallax — falls back to scroll on iOS Safari */
  min-height: 340px;
}
.image-band::before {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.10);
}
@media (max-width: 640px) { .image-band { min-height: 220px; } }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.18);
}
.hero .container { position: relative; width: 100%; }
.hero-card {
  background: rgba(240, 235, 230, .78);
  padding: clamp(28px, 4vw, 52px);
  max-width: 640px;
}
.hero-card .t3 { color: var(--neutral); }
.hero-card .btn { margin-top: 24px; }

/* ==========================================================================
   Mission / two-column text+media
   ========================================================================== */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px); align-items: center;
}
.split--text-first { grid-template-columns: 1.05fr .95fr; }
.stack-photos { display: grid; gap: 18px; }
.stack-photos img { width: 100%; height: 100%; object-fit: cover; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.prose .t2 + .t3 { margin-bottom: 18px; }
.prose .btn { margin-top: 10px; }

/* ==========================================================================
   Photo gallery band (4-up)
   ========================================================================== */
.photo-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.photo-band img { width: 100%; aspect-ratio: 1/1.15; object-fit: cover; }

/* ==========================================================================
   How We Work — process steps
   ========================================================================== */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px; margin-top: 8px;
}
.step {
  background: var(--white); padding: 36px 28px; text-align: center;
  border: 1px solid rgba(40,54,24,.06);
}
.step__num {
  font-family: var(--font-serif); font-size: 46px; color: var(--primary);
  line-height: 1; margin-bottom: 14px;
}
.step__title {
  font-family: var(--font-serif); font-size: 19px; letter-spacing: .04em;
  color: var(--dark); margin-bottom: 14px;
}
.step__divider { width: 46px; height: 2px; background: var(--secondary); margin: 0 auto 16px; }
.step p { font-size: 16px; color: var(--neutral); margin: 0; }

/* ==========================================================================
   CTA card
   ========================================================================== */
.cta-card {
  background: var(--white); padding: clamp(32px, 5vw, 60px);
  max-width: 720px; border: 1px solid rgba(40,54,24,.06);
}
.cta-card .t3 { margin-bottom: 16px; }
.cta-card p { color: var(--neutral); margin-bottom: 24px; }

/* ==========================================================================
   Projects gallery
   ========================================================================== */
.project-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.project {
  position: relative; overflow: hidden; aspect-ratio: 4/3; display: block;
  width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit;
}
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project:hover img { transform: scale(1.05); }
.project__cap {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  padding: 18px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%);
  font-family: var(--font-serif); font-size: 20px; opacity: 0;
  transition: opacity .3s ease;
}
.project:hover .project__cap { opacity: 1; }

/* ==========================================================================
   Blog
   ========================================================================== */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
}
.post-card { background: var(--white); display: flex; flex-direction: column; }
.post-card__img { aspect-ratio: 1/1; overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card__img img { transform: scale(1.04); }
.post-card__body { padding: 22px 4px; }
.post-card__date { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.post-card__title {
  font-family: var(--font-serif); font-size: 24px; line-height: 1.25;
  color: var(--dark); margin: 10px 0 12px;
}
.post-card__excerpt { font-size: 16px; color: var(--neutral); margin: 0; }

/* ==========================================================================
   Blog article (single post)
   ========================================================================== */
.article { max-width: 768px; margin: 0 auto; }
.article-back { display: inline-block; font-size: 14px; letter-spacing: .04em; color: var(--neutral); margin-bottom: 28px; }
.article-back:hover { color: var(--dark); }
.article__date { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.article__title { font-family: var(--font-serif); font-size: clamp(30px, 4.4vw, 44px); line-height: 1.2; color: var(--dark); margin: 12px 0 0; }
.article__cover { margin: 34px 0 38px; }
.article__cover img { width: 100%; height: auto; }
.article-body { font-size: 18px; line-height: 1.7; color: var(--dark); }
.article-body p { margin: 0 0 1.15em; }
.article-body p > strong:only-child { display: inline-block; font-family: var(--font-serif); font-weight: 500; font-size: 22px; margin-top: .4em; color: var(--dark); }
.article-body ul, .article-body ol { margin: 0 0 1.3em 1.2em; padding: 0; }
.article-body li { margin-bottom: .55em; }
.article-body strong { color: var(--dark); }
.article-body a { color: var(--neutral); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--dark); }
.article-cta { margin-top: 48px; padding-top: 36px; border-top: 1px solid rgba(40,54,24,.12); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1.5fr .85fr; gap: clamp(40px, 5vw, 72px); align-items: start; }
.form-card { background: var(--light); padding: clamp(32px, 4vw, 56px); }
.form-row { display: grid; gap: 22px; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
.field { margin-bottom: 24px; }
.field:last-of-type { margin-bottom: 0; }
.field label { display: block; font-size: 17px; color: var(--dark); margin-bottom: 9px; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-sans); font-size: 17px; color: var(--dark);
  background: var(--white); border: 2px solid var(--primary); border-radius: 0;
  padding: 15px 18px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--dark); }
.field textarea { min-height: 200px; resize: vertical; }
.btn--block { display: block; width: 100%; margin-top: 28px; padding: 17px 32px; font-size: 19px; }

/* Info / "how to reach us" panel — enlarged */
.contact-aside { font-size: 17px; }
.contact-aside .t2 { margin-bottom: 6px; }
.contact-list { list-style: none; margin: 26px 0 0; padding: 0; }
.contact-list li { display: flex; gap: 16px; margin-bottom: 24px; color: var(--dark); font-size: 18px; line-height: 1.4; }
.contact-list a { color: var(--dark); }
.contact-list a:hover { color: var(--neutral); }
.contact-list svg { flex: none; width: 26px; height: 26px; color: var(--primary); margin-top: 2px; }
.social-row { display: flex; gap: 20px; margin-bottom: 34px; }
.social-row a { display: inline-flex; width: 28px; height: 28px; color: var(--primary); }
.social-row a:hover { color: var(--dark); }
/* Honeypot — hidden from humans, bots fill it */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
/* Form status message states */
.form-note--success { color: var(--dark); font-weight: 500; }
.form-note--error { color: #b3261e; }

/* ==========================================================================
   Privacy / legal prose
   ========================================================================== */
.legal h2 { font-family: var(--font-serif); font-size: 24px; margin: 32px 0 12px; color: var(--dark); }
.legal p, .legal li { color: var(--neutral); font-size: 16px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--light); color: var(--primary); padding: 64px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-logo img { height: 78px; width: auto; margin-bottom: 16px; }
.footer h4 { font-family: var(--font-serif); font-size: 18px; color: var(--dark); margin-bottom: 16px; }
.footer a, .footer p { color: var(--neutral); font-size: 15px; }
.footer a:hover { color: var(--dark); }
.footer-contact li { list-style: none; margin: 0 0 10px; }
.footer-contact ul { margin: 0; padding: 0; }
.footer-social { display: flex; gap: 16px; margin-top: 4px; }
.footer-social a { display: inline-flex; width: 22px; height: 22px; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(40,54,24,.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  /* Header: centered logo + hamburger top-right (matches original mobile) */
  .header-inner { justify-content: center; position: relative; padding: 12px 16px; }
  .logo img { width: 180px; }
  .nav-toggle { display: inline-flex; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--light); border-bottom: 1px solid rgba(40,54,24,.1);
    box-shadow: 0 10px 18px rgba(0,0,0,.07);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav ul { flex-direction: column; gap: 0; padding: 6px 16px 16px; }
  .nav a { display: block; padding: 14px 0; font-size: 18px; border-bottom: 1px solid rgba(40,54,24,.06); }
  .nav a[aria-current="page"]::after { display: none; }
  /* Parallax doesn't behave on mobile — use a normal background so images show fully */
  .hero, .image-band { background-attachment: scroll; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .photo-band { grid-template-columns: repeat(2, 1fr); }
  .project-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .logo img { width: 168px; }
  .split, .split--text-first { grid-template-columns: 1fr; }
  .steps, .project-grid, .post-grid, .photo-band, .footer-inner { grid-template-columns: 1fr; }
  .form-row--2 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .footer-inner { gap: 28px; text-align: center; }
  .footer-logo img { margin-left: auto; margin-right: auto; }
  .footer-contact ul, .footer-social { justify-content: center; }
  .hero-card { max-width: 100%; }
}

/* ==========================================================================
   Scroll reveal — replicates the original Houzz animation, measured live:
   fade + directional slide, 0.5s ease, staggered. Classes are added by JS,
   so no-JS users always see content.
   ========================================================================== */
@keyframes bcr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bcr-ttb  { from { transform: translateY(-48px); } to { transform: translateY(0); } }
@keyframes bcr-ltr  { from { transform: translateX(-50%); }  to { transform: translateX(0); } }
@keyframes bcr-rtl  { from { transform: translateX(50%); }   to { transform: translateX(0); } }

.anim { opacity: 0; }                  /* initial hidden state until triggered */
.anim.ttb.run { animation: bcr-fade .5s ease var(--anim-delay, .05s) both, bcr-ttb .5s ease var(--anim-delay, .05s) both; }
.anim.ltr.run { animation: bcr-fade .5s ease var(--anim-delay, .05s) both, bcr-ltr .5s ease var(--anim-delay, .05s) both; }
.anim.rtl.run { animation: bcr-fade .5s ease var(--anim-delay, .05s) both, bcr-rtl .5s ease var(--anim-delay, .05s) both; }

@media (prefers-reduced-motion: reduce) {
  .anim { opacity: 1 !important; }
  .anim.run { animation: none !important; }
}

/* ==========================================================================
   Project lightbox — click a project to expand its photos full-screen
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  gap: 1.5vw; padding: clamp(16px, 4vw, 56px);
  background: rgba(26, 23, 20, .94);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__stage {
  margin: 0; max-width: 1100px; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.lightbox__img {
  max-width: 100%; max-height: 82vh; width: auto; height: auto;
  object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5);
  transform: scale(.96); opacity: 0;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .35s ease;
}
.lightbox.open .lightbox__img { transform: scale(1); opacity: 1; }
.lightbox__cap {
  text-align: center; color: var(--light);
  font-family: var(--font-sans); font-size: 15px; letter-spacing: .04em;
  display: flex; gap: 14px; align-items: baseline;
}
.lightbox__title { font-family: var(--font-serif); font-size: 20px; color: #fff; }
.lightbox__count { color: var(--primary); font-size: 13px; letter-spacing: .12em; }
.lightbox__nav, .lightbox__close {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: #fff; cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease;
}
.lightbox__nav { width: 54px; height: 54px; font-size: 30px; flex: none; }
.lightbox__nav:hover, .lightbox__close:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
.lightbox__close {
  position: absolute; top: clamp(14px, 3vw, 30px); right: clamp(14px, 3vw, 30px);
  width: 46px; height: 46px; font-size: 30px; line-height: 1;
}
.lightbox[data-single="true"] .lightbox__nav { display: none; }
body.lb-open { overflow: hidden; }
@media (max-width: 640px) {
  .lightbox__nav { position: absolute; bottom: 22px; width: 48px; height: 48px; }
  .lightbox__prev { left: 20px; } .lightbox__next { right: 20px; }
  .lightbox__img { max-height: 70vh; }
}

/* ==========================================================================
   Project detail page — centered title + photo slideshow (matches original)
   ========================================================================== */
.project-detail { padding: 64px 0 88px; }
.project-back {
  display: inline-block; font-size: 14px; letter-spacing: .04em;
  color: var(--neutral); margin-bottom: 26px;
}
.project-back:hover { color: var(--dark); }
.project-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 40px); line-height: 1.2; color: var(--dark);
  text-align: center; margin: 0 0 14px;
}
.project-desc { text-align: center; color: var(--neutral); max-width: 640px; margin: 0 auto 30px; }
.slideshow { position: relative; max-width: 920px; margin: 30px auto 0; }
.slideshow__viewport { overflow: hidden; background: var(--light); }
.slideshow__img {
  width: 100%; height: auto; max-height: 76vh; object-fit: contain; display: block;
  margin: 0 auto; background: var(--light);
}
.slideshow__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,.85); border: 1px solid rgba(40,54,24,.15);
  color: var(--dark); font-size: 28px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, box-shadow .2s ease;
}
.slideshow__nav:hover { background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.slideshow__prev { left: 16px; }
.slideshow__next { right: 16px; }
.slideshow[data-single="true"] .slideshow__nav { display: none; }
.slideshow__count {
  text-align: center; margin-top: 18px; color: var(--primary);
  font-size: 13px; letter-spacing: .14em;
}
@media (max-width: 640px) {
  .slideshow__nav { width: 42px; height: 42px; font-size: 24px; }
  .slideshow__prev { left: 8px; } .slideshow__next { right: 8px; }
}
