/* Blue Cedar Constructions — editorial theme
   Warm off-white canvas, serif display type, tracked uppercase labels, pill buttons,
   full-bleed image bands. Plain CSS, no build step (WordPress/Elementor friendly). */

:root {
  --navy: #172B45;
  --charcoal: #24272B;
  --white: #FFFFFF;
  --canvas: #F4F2EE;     /* warm off-white page background */
  --sand: #E9E6DF;       /* alternate band */
  --grey-light: #F3F4F5;
  --grey-mid: #858B93;
  --line: #D9D5CC;

  --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', 'Inter', sans-serif;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
  --radius: 2px;
  --pill: 999px;
  --container: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.75; color: var(--charcoal); background: var(--canvas); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); font-weight: 400; line-height: 1.12; margin: 0 0 var(--s3); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.55rem; }
h1 em, h2 em { font-style: italic; }
p { margin: 0 0 var(--s2); }
.lead { font-size: 1.1rem; color: #4a4f55; }
.eyebrow { font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--navy); display: block; margin-bottom: var(--s3); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s5); }
.section { padding: var(--s6) 0; }
.section--alt { background: var(--sand); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3, .section--navy .eyebrow { color: var(--white); }
.section--navy .lead, .section--navy p { color: #d3d9e1; }
.section-head { max-width: 760px; margin-bottom: var(--s5); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons: pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--s4); border-radius: var(--pill); font-family: var(--font-body); font-weight: 600; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn--primary { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--primary:hover { background: transparent; color: var(--navy); }
.btn--light { background: var(--canvas); color: var(--navy); border-color: var(--canvas); }
.btn--light:hover { background: transparent; color: var(--white); border-color: var(--white); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--outline-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.link-arrow { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--navy); padding-bottom: 3px; }
.link-arrow:hover { border-color: transparent; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; color: var(--navy); }
.logo__main { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; letter-spacing: .3em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 5px; }
.logo__sub { font-family: var(--font-body); font-weight: 500; font-size: .55rem; letter-spacing: .42em; text-transform: uppercase; margin-top: 7px; color: var(--grey-mid); }
.logo__img { display: block; height: 84px; width: auto; max-width: 340px; object-fit: contain; mix-blend-mode: multiply; transition: height .25s ease; }
.site-header.is-shrunk .logo__img { height: 52px; }
.site-header.is-shrunk .site-header__inner { min-height: 64px; }
.site-header.is-shrunk .nav a:not(.btn) { font-size: .68rem; }
.site-header.is-shrunk .nav .btn { min-height: 36px; font-size: .68rem; }
@media (max-width: 600px) { .logo__img { height: 56px; } .site-header.is-shrunk .logo__img { height: 44px; } }
.logo--light { color: var(--white); }
.logo--light .logo__sub { color: #aeb6c1; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--canvas); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 112px; gap: var(--s3); transition: min-height .25s ease; }
.nav { display: flex; align-items: center; gap: var(--s5); }
.nav ul { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--charcoal); padding: 8px 0; border-bottom: 1px solid transparent; transition: font-size .25s ease; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { border-color: var(--navy); color: var(--navy); }
.nav .btn { min-height: 40px; padding: 0 var(--s3); }
.has-sub { position: relative; }
.nav .sub { display: none; position: absolute; top: 100%; left: -20px; min-width: 300px; background: var(--canvas); border: 1px solid var(--line); padding: 10px 0; flex-direction: column; gap: 0 !important; }
.nav .has-sub:hover .sub, .nav .has-sub.is-open .sub { display: flex; }
.sub-toggle { display: inline-block; width: 24px; height: 24px; margin-left: 2px; background: none; border: 0; cursor: pointer; vertical-align: middle; padding: 0; position: relative; }
.sub-toggle::before { content: ''; position: absolute; left: 8px; top: 6px; width: 5px; height: 5px; border-right: 1px solid var(--navy); border-bottom: 1px solid var(--navy); transform: rotate(45deg); transition: transform .2s; }
.has-sub.is-open .sub-toggle::before { transform: rotate(-135deg); top: 9px; }
.sub a { display: block; padding: 10px 22px !important; border: 0 !important; text-transform: none !important; letter-spacing: 0 !important; font-size: .95rem !important; font-weight: 400 !important; }
.sub a:hover { background: var(--sand); }
.nav-toggle { display: none; background: none; border: 0; width: 48px; height: 48px; cursor: pointer; padding: 0; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 24px; height: 1px; background: var(--navy); position: relative; margin: 0 auto; content: ''; }
.nav-toggle span::before { position: absolute; top: -7px; left: 0; }
.nav-toggle span::after { position: absolute; top: 7px; left: 0; }

/* ---------- Images ---------- */
.ph { position: relative; background: var(--sand); overflow: hidden; }
.ph::after { display: none; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.ratio-16-10 { aspect-ratio: 16/10; } .ratio-4-3 { aspect-ratio: 4/3; } .ratio-4-5 { aspect-ratio: 4/5; } .ratio-1-1 { aspect-ratio: 1/1; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--white); min-height: 640px; display: flex; align-items: center; background: var(--navy); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(23,43,69,.42); z-index: 1; }
.hero .container { position: relative; z-index: 2; padding-top: var(--s6); padding-bottom: var(--s6); }
.hero h1 { color: var(--white); max-width: 900px; }
.hero p { max-width: 620px; font-size: 1.1rem; color: #e4e8ee; margin-bottom: var(--s4); }
.hero--band { min-height: 78vh; align-items: flex-end; }
.hero--band .container { padding-bottom: var(--s6); }
.hero--band h1 { max-width: none; font-size: clamp(2.8rem, 6.5vw, 5.5rem); text-align: center; margin: 0 auto; }
.hero--band::before { background: linear-gradient(180deg, rgba(23,43,69,.1) 0%, rgba(23,43,69,.55) 100%); }
.hero--sub { min-height: 0; background: var(--canvas); color: var(--charcoal); }
.hero--sub::before { display: none; }
.hero--sub .hero__bg { display: none; }
.hero--sub h1 { color: var(--navy); max-width: 820px; }
.hero--sub p { color: #4a4f55; }
.hero--sub .container { padding-top: var(--s6); padding-bottom: var(--s6); }
.hero--sub .btn--light { background: var(--navy); color: var(--white); border-color: var(--navy); }
.hero--sub .btn--light:hover { background: transparent; color: var(--navy); }
.breadcrumb { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; margin-bottom: var(--s4); color: var(--grey-mid); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Statement block (after hero on home) ---------- */
.statement .container { max-width: 900px; }
.statement__text { font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.3; color: var(--navy); margin-bottom: var(--s5); }
.statement .eyebrow { margin-bottom: var(--s3); }

/* ---------- Layout helpers ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: center; }
.split--rev > :first-child { order: 2; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4) var(--s4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
.checklist { list-style: none; padding: 0; margin: 0 0 var(--s4); }
.checklist li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li:first-child { border-top: 1px solid var(--line); }

/* ---------- Cards ---------- */
.card { background: transparent; border: 0; display: flex; flex-direction: column; }
.card .ph:hover img { transform: scale(1.04); }
.card__body { padding: var(--s3) 0 0; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { margin-bottom: var(--s1); }
.card__body p { color: #4a4f55; font-size: .95rem; }
.card__body .link-arrow { margin-top: auto; align-self: flex-start; }

.feature { padding: var(--s4) 0 0; border-top: 1px solid var(--navy); }
.feature h3 { font-size: 1.4rem; margin-bottom: var(--s1); }
.feature p { font-size: .95rem; color: #4a4f55; margin: 0; }
.icon { width: 36px; height: 36px; margin-bottom: var(--s3); color: var(--navy); }
.icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }

.project .ph:hover img { transform: scale(1.04); }
.project__meta { padding-top: var(--s2); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.project__meta h3 { margin: 0; font-size: 1.35rem; }
.project__meta span { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--grey-mid); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.step { padding-top: var(--s3); border-top: 1px solid var(--navy); }
.step .icon { width: 32px; height: 32px; }
.step__num { font-size: .66rem; letter-spacing: .22em; font-weight: 600; color: var(--grey-mid); display: block; margin-bottom: var(--s2); }
.step h3 { font-size: 1.4rem; }
.step p { font-size: .95rem; color: #4a4f55; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { font-family: var(--font-head); font-size: 1.35rem; color: var(--navy); padding: var(--s3) 40px var(--s3) 0; cursor: pointer; list-style: none; position: relative; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; color: var(--navy); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: var(--s3); color: #4a4f55; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .container { max-width: 820px; }
.cta-band .btn-row { justify-content: center; }
.cta-band--split.cta-band { text-align: left; }
.cta-band--split .container.cta-split { max-width: 1120px; }
.cta-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start; }
.cta-split > * { min-width: 0; }
.cta-split__text .btn-row { justify-content: flex-start; }
.cta-split__form h2 { margin: 0 0 var(--s3); font-size: 1.75rem; }
.cta-split__form .form { gap: var(--s3); }
.cta-split__form .form__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); }
.cta-split__form .field { min-width: 0; }
.cta-split__form .field label { color: #d3d9e1; }
.cta-split__form .field input, .cta-split__form .field select, .cta-split__form .field textarea { color: var(--white); border-bottom-color: rgba(255,255,255,.45); }
.cta-split__form .field select option { color: var(--charcoal); }
.cta-split__form .field input:focus, .cta-split__form .field select:focus, .cta-split__form .field textarea:focus { border-bottom-color: var(--white); }
.cta-split__form .field textarea { min-height: 96px; }
.cta-split__form .btn { width: 100%; margin-top: var(--s1); }
.cta-split__form .form-note { color: #a9b3c1; font-size: .8rem; margin: 0; }
.cta-split__form .form-ok { color: var(--charcoal); border-left-color: var(--white); }
@media (max-width: 1024px) {
  .cta-split { gap: var(--s5); }
  .cta-split__form .form__row { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cta-split { grid-template-columns: 1fr; }
}

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s6); }
.filter { font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--navy); background: transparent; color: var(--navy); border-radius: var(--pill); cursor: pointer; }
.filter:hover { background: var(--sand); }
.filter.is-active { background: var(--navy); color: var(--white); }
.masonry { column-count: 3; column-gap: var(--s4); }
.tile { break-inside: avoid; margin-bottom: var(--s4); position: relative; cursor: pointer; border: 0; padding: 0; background: none; width: 100%; display: block; text-align: left; font: inherit; }
.tile .ph { width: 100%; }
.tile:hover .ph img { transform: scale(1.04); }
.tile__over { position: static; color: var(--charcoal); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); padding: var(--s2) 0 0; opacity: 1; }
.tile__over strong { font-family: var(--font-head); font-weight: 400; font-size: 1.3rem; color: var(--navy); }
.tile__over span { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--grey-mid); text-align: right; }
.tile[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; background: rgba(23,43,69,.94); z-index: 100; display: none; align-items: center; justify-content: center; padding: var(--s3); }
.lightbox.is-open { display: flex; }
.lightbox__inner { max-width: 1040px; width: 100%; color: var(--white); }
.lightbox__inner .ph { width: 100%; aspect-ratio: 16/10; background: #0f1e32; }
.lightbox__cap { padding-top: var(--s2); display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.lightbox__cap strong { font-family: var(--font-head); font-weight: 400; font-size: 1.4rem; }
.lightbox__cap span { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 48px; height: 48px; background: none; border: 0; color: var(--white); font-size: 2rem; cursor: pointer; }

.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.08); color: var(--white); font-size: 2.2rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 4px; z-index: 2; }
.lightbox__nav:hover { background: var(--white); color: var(--navy); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lb-count { font-size: .85rem; color: #c8d0db; margin-left: auto; }
@media (max-width: 860px) {
  .lightbox { padding: var(--s2); }
  .lightbox__nav { width: 48px; height: 48px; top: auto; bottom: 16px; transform: none; }
  .lightbox__nav--prev { left: 16px; }
  .lightbox__nav--next { right: 16px; }
  .lightbox__inner { padding-bottom: 72px; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s4); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.field label { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 8px; color: var(--navy); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 0; font: inherit; font-size: 1rem; color: var(--charcoal); border: 0; border-bottom: 1px solid var(--charcoal); border-radius: 0; background: transparent; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-bottom: 2px solid var(--navy); }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s6); align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0 0 var(--s4); }
.info-list li { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.info-list strong { display: block; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--grey-mid); margin-bottom: 4px; }
.map { aspect-ratio: 16/9; background: var(--sand); display: flex; align-items: center; justify-content: center; color: #5a6068; font-size: .9rem; text-align: center; padding: var(--s2); }
.form-note { font-size: .85rem; color: var(--grey-mid); }
.form-ok { display: none; padding: var(--s2); background: var(--sand); border-left: 2px solid var(--navy); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c8d0db; padding: var(--s6) 0 var(--s3); font-size: .95rem; }
.site-footer h4 { color: var(--white); font-family: var(--font-body); font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; margin-bottom: var(--s3); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.2fr; gap: var(--s6); margin-bottom: var(--s6); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.social { display: flex; gap: 12px; margin-top: var(--s3); }
.social a { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.social a:hover { background: var(--white); color: var(--navy); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.18); padding-top: var(--s3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 var(--s4); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: var(--s5); }
  .split { gap: var(--s5); }
  .masonry { column-count: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { gap: var(--s6); }
  .section { padding: var(--s5) 0; }
  .hero--band { min-height: 60vh; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--canvas); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: var(--s2) var(--s4) var(--s4); gap: var(--s3); max-height: calc(100vh - 112px); overflow: auto; }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .has-sub { display: flex; flex-wrap: wrap; align-items: center; }
  .has-sub > a { flex: 1; }
  .sub-toggle { width: 48px; height: 48px; }
  .sub-toggle::before { left: 21px; top: 18px; }
  .has-sub.is-open .sub-toggle::before { top: 21px; }
  .nav .has-sub:hover .sub { display: none; }
  .nav .has-sub.is-open .sub { display: flex; width: 100%; }
  .nav .sub { display: none; position: static; border: 0; padding: 0 0 0 var(--s2); min-width: 0; }
  .sub a { padding: 12px 0 !important; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split--rev > :first-child { order: 0; }
  .btn { width: 100%; }
  .btn-row .btn { flex: 1 1 100%; }
  .nav .btn { width: 100%; }
  .form__row { grid-template-columns: 1fr; }
  .hero { min-height: 520px; }
}
@media (max-width: 600px) {
  .container { padding: 0 var(--s3); }
  .grid-4, .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .masonry { column-count: 1; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .section { padding: var(--s5) 0; }
  .hero--band { min-height: 70vh; }
  .hero--band h1 { font-size: 2.4rem; }
  .statement__text { font-size: 1.6rem; }
  .project__meta, .tile__over { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
