/* ==========================================================================
   Island Home Renovations — core stylesheet
   Everything is local: fonts, images, scripts. No external requests.
   Palette and typefaces are carried over from the original brand theme
   (sage #59756F, Bitter + Source Sans) and extended with cedar + fog tones.
   ========================================================================== */

/* --- Fonts (local, variable, subset to latin) --------------------------- */
@font-face {
  font-family: 'Bitter';
  src: url('../fonts/Bitter.woff2') format('woff2-variations'),
       url('../fonts/Bitter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/SourceSans3.woff2') format('woff2-variations'),
       url('../fonts/SourceSans3.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens ------------------------------------------------------------- */
:root {
  --fir: #16211e;
  --fir-2: #1e2c29;
  --fir-3: #2a3a36;
  --sage: #59756f;
  --sage-600: #4a635e;
  --sage-300: #8cb2a8;
  --sage-100: #d9e3df;
  --cedar: #b4794a;
  --cedar-light: #d8a470;
  --cedar-soft: #f0e2d3;
  --paper: #f6f7f4;
  --mist: #e7eae4;
  --ink: #151b19;
  --muted: #5c6b66;
  --line: #d5dbd6;
  --white: #fff;

  --ff-display: 'Bitter', Georgia, 'Times New Roman', serif;
  --ff-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.75vw, 1.85rem);
  --step-3: clamp(1.72rem, 1.45rem + 1.3vw, 2.5rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.3vw, 3.4rem);
  --step-5: clamp(2.5rem, 1.7rem + 3.6vw, 4.6rem);

  --wrap: 1200px;
  --wrap-narrow: 760px;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --section: clamp(3.7rem, 8vw, 7rem);

  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(21, 27, 25, .06), 0 4px 14px -6px rgba(21, 27, 25, .12);
  --shadow-md: 0 2px 6px rgba(21, 27, 25, .07), 0 18px 40px -20px rgba(21, 27, 25, .28);
  --shadow-lg: 0 30px 70px -32px rgba(21, 27, 25, .45);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-h: 76px;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px);   overflow-x: clip;
}
body {
  font-family: var(--ff-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--sage-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cedar); }
h1, h2, h3, h4, h5 { font-family: var(--ff-display); line-height: 1.14; font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
:focus-visible { outline: 3px solid var(--cedar); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--sage); color: #fff; }

/* --- Utilities ---------------------------------------------------------- */
.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - (var(--gutter) * 2), var(--wrap-narrow)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(2.6rem, 5vw, 4rem); }
.section--paper { background: var(--paper); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--fir); color: #e8ede9; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark a { color: var(--sage-300); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -60px; left: 12px; z-index: 999; background: var(--cedar);
  color: #fff; padding: .6rem 1.1rem; border-radius: var(--r-md); transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* Eyebrow label — small caps with a ruler tick, the site's structural motif */
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--sage-600); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ''; width: 34px; height: 9px; flex: none;
  background-image: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 5px);
  opacity: .75;
}
.section--dark .eyebrow { color: var(--sage-300); }

/* Tape-measure rule — signature divider */
.tape-rule {
  height: 14px; width: 100%;
  background-image: repeating-linear-gradient(90deg, var(--sage) 0 1px, transparent 1px 8px);
  opacity: .35; margin-block: 1.4rem;
}

.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.55; }
.section--dark .lede { color: #b9c8c2; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.6rem; border-radius: var(--r-md);
  font-weight: 650; font-size: .98rem; letter-spacing: .01em;
  text-decoration: none; border: 1.5px solid transparent; position: relative;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cedar); color: #fff; box-shadow: 0 10px 24px -14px rgba(180, 121, 74, .9); }
.btn--primary:hover { background: #a06a3e; color: #fff; box-shadow: 0 16px 30px -14px rgba(180, 121, 74, .95); }
.btn--sage { background: var(--sage); color: #fff; }
.btn--sage:hover { background: var(--sage-600); color: #fff; }
.btn--ghost { border-color: var(--sage); color: var(--sage-600); }
.btn--ghost:hover { background: var(--sage); color: #fff; }
.btn--light { background: #fff; color: var(--fir); }
.btn--light:hover { background: var(--sage-100); color: var(--fir); }
.btn--outline-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }
.btn--block { width: 100%; }
.btn .ic { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 650;
  text-decoration: none; color: var(--sage-600);
}
.link-arrow::after { content: '→'; transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(246, 247, 244, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.site-header.is-stuck { background: rgba(246, 247, 244, .96); border-bottom-color: var(--line); box-shadow: 0 6px 22px -18px rgba(21, 27, 25, .8); }
.header-inner { display: flex; align-items: center; gap: 1.4rem; width: min(100% - (var(--gutter) * 2), 1320px); margin-inline: auto; }
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand-text { display: none; }

.nav { display: flex; align-items: center; gap: .2rem; }
.nav a {
  position: relative; padding: .55rem .8rem; border-radius: var(--r-sm);
  font-size: .95rem; font-weight: 600; color: var(--ink); text-decoration: none;
  transition: color .2s;
}
.nav a::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .28rem; height: 2px;
  background: var(--cedar); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--sage-600); }

.has-drop { position: relative; }
.has-drop > button {
  display: flex; align-items: center; gap: .35rem; padding: .55rem .8rem;
  font-size: .95rem; font-weight: 600; color: var(--ink); border-radius: var(--r-sm);
}
.has-drop > button svg { width: 12px; height: 12px; transition: transform .3s var(--ease); }
.has-drop[data-open="true"] > button svg { transform: rotate(180deg); }
.drop {
  position: absolute; top: calc(100% + 10px); left: -10px; min-width: 286px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: .5rem; opacity: 0; visibility: hidden;
  transform: translateY(-8px); transition: opacity .22s, transform .22s var(--ease), visibility .22s;
}
.has-drop[data-open="true"] .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.drop a { display: block; padding: .6rem .8rem; border-radius: var(--r-md); font-size: .93rem; }
.drop a::after { display: none; }
.drop a:hover { background: var(--mist); }
.drop a span { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); }

.header-cta { display: none; }
.header-phone {
  display: none; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none;
  color: var(--fir); font-size: .95rem;
}
.header-phone svg { width: 17px; height: 17px; color: var(--cedar); }

.burger {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md);
  border: 1px solid var(--line); background: #fff;
}
.burger span { display: block; width: 19px; height: 1.8px; background: var(--ink); position: relative; transition: background .2s; }
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 19px; height: 1.8px; background: var(--ink);
  transition: transform .3s var(--ease), top .2s;
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { top: 0; transform: rotate(45deg); }
body.nav-open .burger span::after { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 99; background: var(--fir); color: #fff;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem; overflow-y: auto;
  transform: translateX(100%); visibility: hidden;
  transition: transform .42s var(--ease-out), visibility .42s;
  display: flex; flex-direction: column; gap: .25rem;
}
body.nav-open .drawer { transform: translateX(0); visibility: visible; }
.drawer a { color: #fff; text-decoration: none; font-family: var(--ff-display); font-size: 1.35rem; padding: .55rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); display: block; }
.drawer .drawer-sub a { font-family: var(--ff-body); font-size: 1rem; padding-left: 1rem; color: #b9c8c2; border-bottom: 0; }
.drawer-group-title { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sage-300); margin-top: 1.4rem; }
.drawer-foot { margin-top: auto; padding-top: 2rem; display: grid; gap: .8rem; }
.drawer-foot a.btn { font-family: var(--ff-body); font-size: 1rem; border-bottom: 0; }

@media (min-width: 1040px) {
  .burger, .drawer { display: none; }
  .header-cta, .header-phone { display: inline-flex; }
  .brand-text { display: block; font-family: var(--ff-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; line-height: 1.1; }
  .brand-text small { display: block; font-family: var(--ff-body); font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-600); }
}
@media (max-width: 1039px) { .nav { display: none; } }

main { padding-top: var(--header-h); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative; background: var(--fir); color: #fff; overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(140, 178, 168, .09) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(140, 178, 168, .09) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 20% 0%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 90% at 20% 0%, #000 25%, transparent 75%);
}
.hero::after {
  content: ''; position: absolute; width: 60vw; height: 60vw; right: -18vw; top: -22vw;
  background: radial-gradient(circle, rgba(89, 117, 111, .55), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 2; display: grid; gap: clamp(2.2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); } }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--cedar-light); }
.hero p.lede { color: #c3d1cc; max-width: 46ch; margin-top: 1.3rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 1.6rem 2.6rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .13); }
.hero-facts div strong { display: block; font-family: var(--ff-display); font-size: 1.9rem; color: #fff; line-height: 1; }
.hero-facts div span { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-300); }

/* --- Before / after slider (signature element) -------------------------- */
.ba {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); background: var(--fir-2); touch-action: pan-y;
  aspect-ratio: 3 / 2; isolation: isolate; user-select: none;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px;
  background: #fff; transform: translateX(-1px); z-index: 3; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
}
.ba-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--fir);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  cursor: ew-resize; font-size: 1rem; letter-spacing: -2px; font-weight: 700;
  transition: transform .25s var(--ease), background-color .2s;
}
.ba:hover .ba-knob { transform: translate(-50%, -50%) scale(1.07); }
.ba-tag {
  position: absolute; bottom: 14px; z-index: 4; font-size: .7rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; padding: .38rem .7rem; border-radius: 100px;
  background: rgba(22, 33, 30, .72); color: #fff; backdrop-filter: blur(6px);
}
.ba-tag--l { left: 14px; }
.ba-tag--r { right: 14px; background: rgba(180, 121, 74, .88); }
.ba-caption { margin-top: .9rem; font-size: .86rem; color: #a9bbb5; display: flex; gap: .5rem; align-items: center; }
.ba input[type="range"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: ew-resize; z-index: 5; }

/* --- Cards -------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.9rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--sage-300); }
.card-media { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--mist); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card-body h3 { font-size: var(--step-1); }
.card-body p { color: var(--muted); font-size: .96rem; }
.card-body .link-arrow { margin-top: auto; padding-top: .4rem; }
.card-index {
  position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(22, 33, 30, .8);
  color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  padding: .3rem .6rem; border-radius: 100px; backdrop-filter: blur(6px);
}
.tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sage-600); background: var(--sage-100);
  padding: .3rem .62rem; border-radius: 100px;
}
.tag--cedar { color: #8a5a33; background: var(--cedar-soft); }

/* Service card with feature list */
.svc-card .svc-list { font-size: .9rem; color: var(--muted); display: grid; gap: .3rem; margin: .3rem 0 .2rem; }
.svc-card .svc-list li { padding-left: 1.15rem; position: relative; }
.svc-card .svc-list li::before {
  content: ''; position: absolute; left: 0; top: .58em; width: 7px; height: 7px;
  border-radius: 1px; background: var(--cedar); transform: rotate(45deg);
}
.svc-price { font-size: .82rem; font-weight: 700; color: var(--sage-600); letter-spacing: .04em; }

/* --- Stats -------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: #fff; padding: 1.7rem 1.4rem; text-align: center; }
.stat strong { display: block; font-family: var(--ff-display); font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1; color: var(--sage-600); }
.stat span { display: block; margin-top: .5rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.section--dark .stats { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .12); }
.section--dark .stat { background: var(--fir-2); }
.section--dark .stat strong { color: var(--cedar-light); }
.section--dark .stat span { color: var(--sage-300); }

/* --- Process timeline (a real sequence, so it is numbered) -------------- */
.process { counter-reset: step; display: grid; gap: 0; }
.process-step {
  display: grid; gap: .3rem 1.6rem; padding: 1.7rem 0; border-top: 1px solid var(--line);
  grid-template-columns: auto 1fr; align-items: start;
}
.process-step:last-child { border-bottom: 1px solid var(--line); }
.process-step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--ff-display); font-size: 1.5rem; color: var(--cedar);
  grid-row: span 2; width: 3.2rem;
}
.process-step h3 { font-size: var(--step-1); }
.process-step p { color: var(--muted); max-width: 62ch; }
.process-step .step-when { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-600); margin-top: .35rem; }
.section--dark .process-step { border-color: rgba(255, 255, 255, .12); }
.section--dark .process-step p { color: #b1c1bb; }
.section--dark .process-step .step-when { color: var(--sage-300); }

/* --- Gallery + lightbox ------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-btn {
  padding: .5rem 1.05rem; border-radius: 100px; border: 1px solid var(--line);
  background: #fff; font-size: .87rem; font-weight: 600; color: var(--muted);
  transition: all .25s var(--ease);
}
.filter-btn:hover { border-color: var(--sage); color: var(--sage-600); }
.filter-btn[aria-pressed="true"] { background: var(--fir); border-color: var(--fir); color: #fff; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--r-lg); aspect-ratio: 3 / 2;
  background: var(--mist); border: 0; padding: 0; width: 100%;
  transition: opacity .35s, transform .35s var(--ease);
}
.gallery-item:nth-child(4n+1) { grid-column: span 2; aspect-ratio: 3 / 2; }
@media (max-width: 560px) { .gallery-item:nth-child(4n+1) { grid-column: span 1; } }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.4rem .95rem .85rem; text-align: left;
  background: linear-gradient(transparent, rgba(21, 27, 25, .82));
  color: #fff; font-size: .87rem; font-weight: 600;
  transform: translateY(6px); opacity: 0; transition: all .35s var(--ease);
}
.gallery-item:hover figcaption, .gallery-item:focus-visible figcaption { transform: translateY(0); opacity: 1; }
.gallery-item.is-hidden { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(12, 18, 16, .94);
  display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox[data-open="true"] { opacity: 1; visibility: visible; }
.lightbox img { max-height: 78vh; width: auto; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.lightbox figcaption { color: #cfd9d5; text-align: center; margin-top: 1rem; font-size: .92rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; color: #fff;
  background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: 1.3rem;
  transition: background .2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, .28); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* --- Testimonials ------------------------------------------------------- */
.quotes { position: relative; overflow: hidden; }
.quotes-track { display: flex; transition: transform .55s var(--ease-out); }
.quote { flex: 0 0 100%; padding: .4rem clamp(.2rem, 3vw, 3rem); text-align: center; }
.quote blockquote { font-family: var(--ff-display); font-size: var(--step-2); line-height: 1.4; }
.quote blockquote::before { content: '“'; display: block; font-size: 3.4rem; line-height: .6; color: var(--cedar); margin-bottom: .5rem; }
.quote figcaption { margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }
.quote figcaption strong { display: block; color: var(--ink); font-size: 1rem; }
.section--dark .quote figcaption { color: var(--sage-300); }
.section--dark .quote figcaption strong { color: #fff; }
.quotes-nav { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.quotes-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: all .3s; }
.section--dark .quotes-dot { background: rgba(255, 255, 255, .25); }
.quotes-dot[aria-selected="true"] { background: var(--cedar); width: 30px; border-radius: 100px; }

/* --- Accordion ---------------------------------------------------------- */
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:first-child { border-top: 1px solid var(--line); }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0; text-align: left; font-family: var(--ff-display); font-size: var(--step-1);
  font-weight: 600; color: var(--ink); transition: color .2s;
}
.acc-trigger:hover { color: var(--sage-600); }
.acc-icon { flex: none; width: 26px; height: 26px; position: relative; }
.acc-icon::before, .acc-icon::after {
  content: ''; position: absolute; top: 50%; left: 50%; background: var(--cedar);
  transform: translate(-50%, -50%); transition: transform .35s var(--ease);
}
.acc-icon::before { width: 15px; height: 1.8px; }
.acc-icon::after { width: 1.8px; height: 15px; }
.acc-trigger[aria-expanded="true"] .acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-panel { overflow: hidden; height: 0; transition: height .38s var(--ease); }
.acc-panel > div { padding-bottom: 1.4rem; color: var(--muted); max-width: 72ch; }
.acc-panel p + p { margin-top: .8rem; }

/* --- Estimator ---------------------------------------------------------- */
.estimator {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.estimator-head { padding: 1.5rem clamp(1.2rem, 3vw, 2.2rem); border-bottom: 1px solid var(--line); background: var(--mist); }
.estimator-body { padding: clamp(1.2rem, 3vw, 2.2rem); display: grid; gap: 1.6rem; }
.field { display: grid; gap: .55rem; }
.field > label, .field > legend { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-600); }
.field small { color: var(--muted); font-size: .84rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: block; padding: .6rem 1.05rem; border: 1.5px solid var(--line); border-radius: 100px;
  font-size: .9rem; font-weight: 600; color: var(--muted); transition: all .25s var(--ease); cursor: pointer;
}
.chip input:checked + span { background: var(--sage); border-color: var(--sage); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--cedar); outline-offset: 2px; }
.chip span:hover { border-color: var(--sage); color: var(--sage-600); }
.chip input:checked + span:hover { color: #fff; }

input[type="range"].slider { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 100px; background: var(--mist); }
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--cedar);
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); cursor: grab;
}
input[type="range"].slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--cedar); border: 3px solid #fff; cursor: grab;
}
.estimate-out {
  background: var(--fir); color: #fff; padding: 1.6rem clamp(1.2rem, 3vw, 2.2rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.estimate-out .amount { font-family: var(--ff-display); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; }
.estimate-out small { display: block; color: var(--sage-300); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .4rem; }
.estimate-note { font-size: .82rem; color: #a9bbb5; max-width: 34ch; }

/* --- Forms -------------------------------------------------------------- */
.form { display: grid; gap: 1.15rem; }
.form-row { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form label { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-600); display: block; margin-bottom: .45rem; }
.form input, .form textarea, .form select {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(89, 117, 111, .16);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .error-msg { display: none; color: #a3352c; font-size: .84rem; margin-top: .35rem; }
.form [data-invalid="true"] input, .form [data-invalid="true"] textarea, .form [data-invalid="true"] select { border-color: #c0453a; }
.form [data-invalid="true"] .error-msg { display: block; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-success {
  display: none; align-items: flex-start; gap: .9rem; padding: 1.1rem 1.2rem;
  background: var(--sage-100); border-left: 3px solid var(--sage); border-radius: var(--r-md);
}
.form-success[data-show="true"] { display: flex; }
.checkbox-line { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.checkbox-line input { width: 18px; height: 18px; flex: none; margin-top: .2rem; accent-color: var(--sage); }
.checkbox-line label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .9rem; color: var(--muted); margin: 0; }

/* --- Article ------------------------------------------------------------ */
.page-hero { background: var(--fir); color: #fff; padding-block: clamp(3rem, 7vw, 5rem) clamp(2.6rem, 6vw, 4rem); position: relative; overflow: hidden; }
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(140, 178, 168, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 178, 168, .07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(100% 80% at 15% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(100% 80% at 15% 0%, #000 20%, transparent 78%);
}
.page-hero > * { position: relative; z-index: 2; }
.page-hero h1 { font-size: var(--step-4); max-width: 22ch; }
.page-hero .lede { color: #c3d1cc; max-width: 60ch; margin-top: 1.1rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .82rem; color: var(--sage-300); margin-bottom: 1.4rem; }
.crumbs a { color: var(--sage-300); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span[aria-current] { color: #fff; }

.article-meta { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; font-size: .88rem; color: var(--sage-300); margin-top: 1.6rem; }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

.reading-bar { position: fixed; top: var(--header-h); left: 0; height: 3px; background: var(--cedar); width: 0; z-index: 98; transition: width .1s linear; }

.article-layout { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.article-layout > * { min-width: 0; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.article-body { max-width: 72ch; min-width: 0; font-size: 1.07rem; }
.article-body > * + * { margin-top: 1.15rem; }
.article-body h2 { font-size: var(--step-3); margin-top: 2.8rem; scroll-margin-top: 110px; }
.article-body h3 { font-size: var(--step-1); margin-top: 2rem; }
.article-body p { color: #303c39; }
.article-body ul, .article-body ol { display: grid; gap: .6rem; padding-left: 0; }
.article-body ul li { position: relative; padding-left: 1.5rem; }
.article-body ul li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; background: var(--cedar); transform: rotate(45deg); border-radius: 1px; }
.article-body ol { counter-reset: li; }
.article-body ol li { position: relative; padding-left: 2.2rem; counter-increment: li; }
.article-body ol li::before {
  content: counter(li); position: absolute; left: 0; top: .05em; font-family: var(--ff-display);
  font-size: .9rem; font-weight: 700; color: var(--cedar); width: 1.5rem; text-align: right;
}
.article-body figure { margin-block: 2rem; }
.article-body figure img { border-radius: var(--r-lg); width: 100%; }
.article-body figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; padding-left: .9rem; border-left: 2px solid var(--sage-300); }
.article-body blockquote {
  border-left: 3px solid var(--cedar); padding: .3rem 0 .3rem 1.4rem; margin-block: 2rem;
  font-family: var(--ff-display); font-size: var(--step-1); line-height: 1.45; color: var(--fir);
}
.article-body table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-block: 1.8rem; }
.article-body th, .article-body td { padding: .78rem .9rem; text-align: left; border-bottom: 1px solid var(--line); }
.article-body thead th { background: var(--mist); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-600); }
.article-body tbody tr:hover { background: #fbfcfa; }
.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 34rem; }

.callout {
  background: var(--sage-100); border-radius: var(--r-lg); padding: 1.3rem 1.5rem;
  border-left: 3px solid var(--sage); margin-block: 2rem;
}
.callout h4 { font-size: 1.05rem; margin-bottom: .4rem; }
.callout--cedar { background: var(--cedar-soft); border-left-color: var(--cedar); }
.callout p { font-size: .97rem; color: #3d4a46; }

.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem 1.4rem; }
.aside-card + .aside-card { margin-top: 1.2rem; }
.aside-card h4 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-600); margin-bottom: .9rem; font-family: var(--ff-body); }
.toc { display: grid; gap: .1rem; font-size: .92rem; }
.toc a { display: block; padding: .38rem .7rem; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; transition: all .2s; }
.toc a:hover { color: var(--sage-600); border-left-color: var(--sage-300); }
.toc a.is-active { color: var(--fir); border-left-color: var(--cedar); font-weight: 650; background: #fff; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 24px); }

.share { display: flex; gap: .5rem; flex-wrap: wrap; }
.share button, .share a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; font-size: .84rem;
  font-weight: 600; border: 1px solid var(--line); border-radius: 100px; color: var(--muted);
  text-decoration: none; transition: all .25s;
}
.share button:hover, .share a:hover { border-color: var(--sage); color: var(--sage-600); }

/* Legal pages */
.legal-body { max-width: 74ch; }
.legal-body h2 { font-size: var(--step-2); margin-top: 2.6rem; scroll-margin-top: 110px; }
.legal-body h3 { font-size: var(--step-1); margin-top: 1.8rem; }
.legal-body > * + * { margin-top: 1rem; }
.legal-body ul li { position: relative; padding-left: 1.4rem; }
.legal-body ul li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--sage-300); transform: rotate(45deg); }
.legal-body ul { display: grid; gap: .5rem; }
.updated-chip {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted);
  background: var(--mist); padding: .4rem .85rem; border-radius: 100px;
}

/* --- Media / feature rows ---------------------------------------------- */
.split { display: grid; gap: clamp(1.8rem, 4vw, 3.4rem); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split--wide-media { grid-template-columns: 1.15fr 1fr; } }
.split img { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.split--reverse > *:first-child { order: 2; }
@media (max-width: 859px) { .split--reverse > *:first-child { order: 0; } }
.media-stack { position: relative; }
.media-stack img:last-child {
  position: absolute; right: -8%; bottom: -12%; width: 46%; border: 6px solid var(--paper);
  box-shadow: var(--shadow-md);
}
@media (max-width: 600px) { .media-stack img:last-child { position: static; width: 100%; border: 0; margin-top: 1rem; } }

.checklist { display: grid; gap: .75rem; margin-top: 1.5rem; }
.checklist li { display: flex; gap: .8rem; align-items: flex-start; }
.checklist svg { flex: none; width: 21px; height: 21px; color: var(--cedar); margin-top: .18rem; }
.section--dark .checklist li { color: #c8d5d0; }

/* --- Blog list ---------------------------------------------------------- */
.post-search { position: relative; max-width: 420px; }
.post-search input { width: 100%; padding: .82rem 1rem .82rem 2.6rem; border: 1.5px solid var(--line); border-radius: 100px; background: #fff; }
.post-search input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(89, 117, 111, .15); }
.post-search svg { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.no-results { display: none; padding: 3rem 0; text-align: center; color: var(--muted); }
.no-results[data-show="true"] { display: block; }
.post-card.is-hidden { display: none; }

.post-feature { display: grid; gap: clamp(1.4rem, 3vw, 2.6rem); align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 800px) { .post-feature { grid-template-columns: 1.1fr 1fr; } }
.post-feature img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.post-feature-body { padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.4rem, 3vw, 2.4rem) clamp(1.4rem, 3vw, 2.4rem) 0; }
@media (max-width: 799px) { .post-feature-body { padding: 0 1.4rem 1.8rem; } }

/* --- Footer ------------------------------------------------------------- */
.site-footer { background: var(--fir); color: #b4c4bf; padding-block: clamp(3rem, 6vw, 4.6rem) 2rem; }
.footer-grid { display: grid; gap: 2.4rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.footer-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } .footer-grid > div:first-child { grid-column: auto; } }
.site-footer h5 { font-family: var(--ff-body); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.site-footer a { color: #b4c4bf; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { display: grid; gap: .55rem; font-size: .93rem; }
.footer-brand img { height: 42px; margin-bottom: 1.1rem; object-fit: contain; }
.footer-brand p { font-size: .93rem; max-width: 34ch; }
.footer-contact { display: grid; gap: .7rem; font-size: .95rem; }
.footer-contact a { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; color: var(--sage-300); flex: none; margin-top: .28rem; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.socials { display: flex; gap: .6rem; }
.socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); display: grid; place-items: center; transition: all .25s; }
.socials a:hover { background: var(--sage); border-color: var(--sage); }
.socials svg { width: 17px; height: 17px; }

/* --- CTA band ----------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; background: var(--sage-600); color: #fff; }
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 16px);
}
.cta-band .wrap { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-inner { display: grid; gap: 1.8rem; align-items: center; }
@media (min-width: 820px) { .cta-inner { grid-template-columns: 1.4fr auto; } }

/* --- Cookie banner + back to top --------------------------------------- */
.cookie-bar {
  position: fixed; z-index: 150; left: clamp(.7rem, 3vw, 1.6rem); right: clamp(.7rem, 3vw, 1.6rem);
  bottom: clamp(.7rem, 3vw, 1.6rem); max-width: 560px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 1.25rem 1.4rem;
  display: grid; gap: 1rem; transform: translateY(150%);
  visibility: hidden; pointer-events: none;
  transition: transform .5s var(--ease-out), visibility .5s;
}
.cookie-bar[data-show="true"] { transform: translateY(0); visibility: visible; pointer-events: auto; }
.cookie-bar p { font-size: .9rem; color: var(--muted); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cookie-actions .btn { padding: .6rem 1.1rem; font-size: .88rem; }

.to-top {
  position: fixed; right: clamp(.9rem, 3vw, 1.8rem); bottom: clamp(.9rem, 3vw, 1.8rem); z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; background: var(--fir); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s, background-color .2s;
}
.to-top[data-show="true"] { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--cedar); }
.to-top svg { width: 19px; height: 19px; }

/* --- Motion ------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .75s var(--ease-out), transform .75s var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-reveal="left"] { transform: translateX(-28px); }
[data-reveal][data-reveal="right"] { transform: translateX(28px); }
[data-reveal][data-reveal="scale"] { transform: scale(.96); }
[data-reveal].is-visible { transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
[data-stagger].is-visible > * { opacity: 1; transform: none; }

@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.floaty { animation: floaty 7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal], [data-stagger] > * { opacity: 1 !important; transform: none !important; }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  .site-header, .drawer, .cookie-bar, .to-top, .cta-band, .site-footer, .reading-bar, .sticky-side { display: none !important; }
  body { background: #fff; }
  main { padding-top: 0; }
  .page-hero { background: #fff; color: #000; }
  .page-hero h1, .page-hero .lede { color: #000; }
}

.ba-caption, .ba-tag, .ba-handle, .ba-handle + input{
  display: none!important;
}

.tag{
  width: max-content;
}