/* Cumberland Fence Co, version 2.
   Layout: dark corrugated-metal header and bands, light galvanized sections between,
   split photo/text sections that alternate sides. The logo's six cedar slats are the motif:
   picket-shaped hero panels, slat strips, slat progress bar. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  interpolate-size: allow-keywords;
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f6f7f3;
  --tint: #eceeea;
  --card: #ffffff;
  --text: #15211b;
  --muted: #38463f;
  --line: #d3d9d2;
  --fir: #1d4a36;
  --fir-deep: #12301f;
  --cedar: #a8551f;
  --cedar-bright: #c9702f;
  --ochre: #d99a4e;
  --cream: #f3ead9;
  --band: #1a1e1d;
  --band-rib: #202524;
  --band-text: #eef1ec;
  --band-muted: #bcc5be;
  --band-line: #3a423f;
  --wood-line: #5b3516;
  --rot: #8d928b;
  --grass: #5d8450;
  --ok: #2f7d4f;
  --warn: #c48a14;
  --bad: #c03a2b;
  --slat-1: #8a5a33; --slat-2: #5e2f1c; --slat-3: #dcb47c;
  --slat-4: #7a3a20; --slat-5: #c99a5b; --slat-6: #a56a33;
  --shadow: 0 5px 15px rgba(21, 33, 27, 0.16);
  --shadow-lg: 0 14px 34px rgba(21, 33, 27, 0.26);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 92px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.125rem/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--band);
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: var(--cedar); text-underline-offset: 3px; }
a:hover { color: var(--fir); }
p { margin: 0 0 1em; text-wrap: pretty; }
li { text-wrap: pretty; }
main a:not(.btn) { font-weight: 600; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3 { margin: 0 0 0.5em; font-family: var(--display); font-weight: 800; line-height: 1.02; text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 5.4vw, 4.6rem); }
h2 { font-size: clamp(2.2rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.6rem; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.site-header :focus-visible, .band :focus-visible, .strip :focus-visible, .site-footer :focus-visible, dialog :focus-visible { outline-color: var(--ochre); }
.cats a:focus-visible, .drop-tiles a:focus-visible, .tile:focus-visible { outline-offset: -4px; outline-color: var(--ochre); }
.float-cta:focus-visible { outline-color: var(--ochre); }
::selection { background: var(--ochre); color: var(--text); }
[hidden] { display: none !important; }

.wrap { max-width: 1320px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--cream); color: var(--text); padding: 10px 16px; font-weight: 700; }
.skip-link:focus { left: 8px; top: 8px; }
.c-cedar { color: var(--cedar); }
.c-fir { color: var(--fir); }
.c-ochre { color: var(--ochre); }
.c-cedar-l { color: var(--cedar-bright); }
.eyebrow { margin: 0 0 6px; font-family: var(--display); font-weight: 600; font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* ---------- Buttons: shine sweep plus a border that traces round on hover ---------- */
.btn {
  position: relative; display: inline-block; overflow: hidden; cursor: pointer;
  padding: 15px 22px; border: 0; background: var(--cedar); color: #fff;
  font: 800 1.05rem/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35); box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 9px 14px rgba(0, 0, 0, 0.26); }
.btn:active { transform: translateY(0); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transition: left 0.5s ease 0.25s;
}
.btn:hover::after { left: 100%; }
.btn > i { position: absolute; display: block; background: #fff; transition: all 0.5s ease; }
.btn > i:nth-child(1) { top: 0; left: 0; width: 0; height: 1px; }
.btn:hover > i:nth-child(1) { width: 100%; transform: translateX(100%); }
.btn > i:nth-child(2) { top: 0; left: 0; width: 1px; height: 0; }
.btn:hover > i:nth-child(2) { height: 100%; transform: translateY(100%); }
.btn > i:nth-child(3) { bottom: 0; right: 0; width: 0; height: 1px; }
.btn:hover > i:nth-child(3) { width: 100%; transform: translateX(-100%); }
.btn > i:nth-child(4) { bottom: 0; right: 0; width: 1px; height: 0; }
.btn:hover > i:nth-child(4) { height: 100%; transform: translateY(-100%); }
.btn-fir { background: var(--fir); }
.btn-ochre { background: var(--ochre); color: var(--text); text-shadow: none; }
.btn-ochre:hover { color: var(--text); }
.btn-ochre > i { background: var(--text); }
.btn-small { padding: 13px 16px; font-size: 0.92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--band); color: var(--band-text); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.28);
}
.header-row { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); transition: min-height 0.3s var(--ease); }
.brand { flex: none; display: block; padding-block: 8px; }
.brand img { height: 76px; width: auto; transition: height 0.3s var(--ease); }
.is-scrolled .header-row { min-height: 68px; }
.is-scrolled .brand img { height: 54px; }
.site-nav { margin-left: auto; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link {
  display: block; padding: 12px 13px; border: 0; background: none; cursor: pointer;
  color: var(--band-text); font: 800 1rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover, .nav-link.is-current, .has-drop.is-open > .nav-link { color: var(--ochre); }
.has-drop > .nav-link::after { content: ""; display: inline-block; margin-left: 7px; border: 5px solid transparent; border-top-color: currentColor; border-bottom-width: 0; vertical-align: middle; transition: transform 0.2s; }
.has-drop.is-open > .nav-link::after { transform: rotate(180deg); }
.drop {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 2;
  background: var(--fir); color: #fff; box-shadow: var(--shadow-lg);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s 0.22s;
}
.has-drop.is-open > .drop { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.drop-inner { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 30px; align-items: center; padding-block: 26px; }
.drop-title { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; text-transform: uppercase; }
.drop-head p:last-child { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 1rem; }
.drop-tiles { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.drop-tiles a { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); }
.drop-tiles picture { width: 100%; height: 100%; }
.drop-tiles img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.drop-tiles a:hover img, .drop-tiles a:focus-visible img { transform: scale(1.1); }
.drop-tiles span {
  position: absolute; left: 0; bottom: 0; padding: 8px 12px; background: var(--cedar); color: #fff;
  font: 800 1.05rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em;
}
.header-cta { flex: none; }
.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 48px; height: 48px; margin-left: auto; padding: 0 10px; border: 0; background: none; cursor: pointer; }
.menu-toggle span { display: block; height: 3px; background: var(--band-text); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; overflow: hidden; }
.progress span {
  display: block; height: 100%; transform-origin: left; transform: scaleX(0);
  background: repeating-linear-gradient(90deg, var(--slat-1) 0 34px, var(--slat-2) 34px 68px, var(--slat-3) 68px 102px, var(--slat-4) 102px 136px, var(--slat-5) 136px 170px, var(--slat-6) 170px 204px);
}
@supports (animation-timeline: scroll()) {
  .progress span { animation: progress-grow linear both; animation-timeline: scroll(root); }
}
@keyframes progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 1099px) {
  .site-nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }
  :root { --header-h: 76px; }
  .brand img { height: 60px; }
}

/* ---------- Phone menu ---------- */
.mobile-menu {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) var(--gutter-r) calc(env(safe-area-inset-bottom, 0px) + 28px) var(--gutter-l);
  background: var(--band); color: var(--band-text); text-align: center; overflow-y: auto;
}
.mobile-menu[open] { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: fade-in 0.25s var(--ease); }
.mobile-menu::backdrop { background: var(--band); }
.mobile-menu > img { height: 110px; width: auto; }
.mobile-menu nav { display: flex; flex-direction: column; width: min(320px, 100%); }
.mobile-menu nav a, .mobile-menu summary {
  display: block; padding: 12px 0; color: var(--band-text); cursor: pointer; list-style: none;
  font: 800 1.9rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after { content: "+"; margin-left: 10px; color: var(--ochre); }
.mobile-menu details[open] summary::after { content: "\2212"; }
.mobile-menu details a { font: 600 1.1rem/1.2 var(--body); letter-spacing: 0.03em; padding: 9px 0; color: var(--band-muted); }
.mobile-menu nav a:hover { color: var(--ochre); }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
.menu-close { align-self: flex-end; width: 48px; height: 48px; border: 0; background: none; color: var(--band-text); font-size: 2.6rem; line-height: 1; cursor: pointer; }

/* ---------- Scroll-in reveals (only when the script is running) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; }
  .js [data-reveal].is-in { animation: pop-in 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms); }
}
@keyframes pop-in { from { opacity: 0; transform: scale(0.92) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { background: var(--bg); padding-block: clamp(28px, 5vw, 64px); box-shadow: 0 5px 15px rgba(39, 44, 63, 0.06); position: relative; }
.hero-grid { display: grid; gap: clamp(26px, 4vw, 60px); align-items: center; }
.hero-text { min-width: 0; }
.hero-intro { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.pickets { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 2vw, 26px); min-width: 0; }
.picket { transition: transform 0.4s var(--ease); }
.picket:hover { transform: translateY(-8px); }
.picket .show { aspect-ratio: 9 / 16; max-width: 100%; border-radius: clamp(8px, 1.4vw, 18px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
}
@media (max-width: 899px) {
  .hero-text { text-align: center; order: 2; }
  .hero-intro { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .picket .show { aspect-ratio: 2 / 3; }
}

/* ---------- Slideshow ---------- */
.show { position: relative; overflow: hidden; background: var(--band); }
.show-items { position: absolute; inset: 0; }
.show-item { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.show-item.is-active { opacity: 1; z-index: 1; }
.show-item picture, .show-item img { width: 100%; height: 100%; }
.show-item img { object-fit: cover; }
.show-item.is-fit { background-size: cover; background-position: center; }
.show-item.is-fit::before { content: ""; position: absolute; inset: 0; -webkit-backdrop-filter: blur(24px) brightness(0.6); backdrop-filter: blur(24px) brightness(0.6); }
.show-item.is-fit picture { position: relative; }
.show-item.is-fit img { object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .show-item.is-active:not(.is-fit) img { animation: drift 7s ease-out both; }
}
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1); } }
.split-media .show { aspect-ratio: var(--ratio, 16 / 10); max-width: 100%; box-shadow: var(--shadow-lg); }
.show-dots { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: center; gap: 0; }
.show-dots button { position: relative; width: 30px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.show-dots button::before { content: ""; position: absolute; left: 8px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.78); transition: background 0.2s, transform 0.2s; }
.show-dots button[aria-current="true"]::before { background: var(--ochre); transform: scale(1.25); }
.show-mark { position: absolute; right: 14px; top: 14px; z-index: 3; display: flex; gap: 3px; opacity: 0.92; }
.show-mark i { display: block; width: 9px; height: 34px; border-radius: 2px; }
.show-mark i:nth-child(1) { background: var(--slat-1); } .show-mark i:nth-child(2) { background: var(--slat-2); }
.show-mark i:nth-child(3) { background: var(--slat-3); } .show-mark i:nth-child(4) { background: var(--slat-4); }
.show-mark i:nth-child(5) { background: var(--slat-5); } .show-mark i:nth-child(6) { background: var(--slat-6); }
.show.is-changing .show-mark i { animation: slat-in 0.6s var(--ease) both; animation-delay: calc(var(--n) * 60ms); }
.show-mark i:nth-child(1) { --n: 0; } .show-mark i:nth-child(2) { --n: 1; } .show-mark i:nth-child(3) { --n: 2; }
.show-mark i:nth-child(4) { --n: 3; } .show-mark i:nth-child(5) { --n: 4; } .show-mark i:nth-child(6) { --n: 5; }
@keyframes slat-in { from { transform: translateY(-46px); opacity: 0; } to { transform: none; opacity: 1; } }
.picket .show-mark { display: none; }

/* ---------- Promise strip ---------- */
.strip { background: var(--fir); color: #fff; box-shadow: 0 5px 15px rgba(39, 44, 63, 0.4); position: relative; z-index: 1; }
.strip-row { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-block: 26px; }
.strip-row li { display: flex; align-items: center; justify-content: center; gap: 12px; font: 800 clamp(1.05rem, 2.4vw, 1.7rem)/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.04em; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2); transition: transform 0.3s; }
.strip-row li:hover { transform: scale(1.04); }
.strip-row b { color: #ecc084; font-weight: 800; }
.slats { display: inline-flex; gap: 3px; flex: none; }
.slats i { display: block; width: 7px; height: 28px; border-radius: 1px; background: var(--cream); }
.slats i:nth-child(2) { background: var(--ochre); }
@media (max-width: 640px) {
  .strip-row li { flex-direction: column; text-align: center; gap: 8px; }
}

/* ---------- Sections ---------- */
.sec { padding-block: clamp(48px, 7vw, 96px); position: relative; }
.sec-tint { background: var(--tint); box-shadow: 0 5px 15px rgba(39, 44, 63, 0.12); }
.sec-head { margin-bottom: 30px; }
.band {
  color: var(--band-text); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
  background: var(--band) repeating-linear-gradient(90deg, transparent 0 13px, var(--band-rib) 13px 26px);
}
.band .eyebrow, .band .lede { color: var(--band-muted); }
.band a:not(.btn) { color: var(--ochre); }
.band a:not(.btn):hover { color: var(--cream); }
.sub-h { margin-top: clamp(44px, 6vw, 72px); }

.split { display: grid; gap: clamp(26px, 4vw, 64px); align-items: start; }
.split > * { min-width: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .split-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .split-flip .split-media { order: 2; }
  .split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.split-text p { max-width: 58ch; }
.callout { color: var(--cedar); font: 800 1.7rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; text-wrap: balance; }
.ticks { list-style: none; display: grid; gap: 10px; margin-bottom: 1em; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 16px; height: 9px; border-left: 3px solid var(--ochre); border-bottom: 3px solid var(--ochre); transform: rotate(-45deg); }
.chips, .towns { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1em; }
.chips li, .towns li { padding: 7px 13px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 0.98rem; }
.towns li { background: var(--fir); border-color: var(--fir); color: #fff; font: 700 1.2rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 14px; transition: transform 0.2s var(--ease), background 0.2s; }
.towns li:hover { transform: translateY(-3px); background: var(--cedar); border-color: var(--cedar); }

/* ---------- Service tiles ---------- */
.cats { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cats li { background: var(--card); box-shadow: 0 5px 10px rgba(39, 44, 63, 0.2); }
.cats li:last-child { grid-column: 1 / -1; }
.cats a { display: block; color: var(--text); text-decoration: none; }
.cats picture { overflow: hidden; aspect-ratio: 9 / 7; }
.cats li:last-child picture { aspect-ratio: 18 / 7; }
.cats img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cats a:hover img, .cats a:focus-visible img { transform: scale(1.1); }
.cats span { display: block; padding: 14px 10px; text-align: center; font: 800 1.45rem/1.05 var(--display); text-transform: uppercase; letter-spacing: 0.03em; transition: color 0.2s; }
.cats a:hover span { color: var(--cedar); }
@media (min-width: 900px) {
  .cats { grid-template-columns: repeat(5, 1fr); gap: 0; }
  .cats li:last-child { grid-column: auto; }
  .cats li:last-child picture { aspect-ratio: 9 / 7; }
}

/* ---------- Fence demo ---------- */
.fence-demo { margin-top: clamp(40px, 6vw, 72px); padding: 22px clamp(14px, 3vw, 30px) 0; background: var(--card); box-shadow: var(--shadow); }
.fence-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-bottom: 14px; }
.fence-switch { display: inline-flex; align-items: center; gap: 14px; padding: 6px 0; border: 0; background: none; cursor: pointer; color: var(--text); font: 800 1.45rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; text-align: left; }
.fence-track { flex: none; width: 84px; height: 44px; padding: 4px; border-radius: 22px; background: var(--line); transition: background 0.3s; }
.fence-knob { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--rot); transition: transform 0.4s var(--ease), background 0.3s; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.is-fixed .fence-track { background: var(--ochre); }
.is-fixed .fence-knob { transform: translateX(40px); background: var(--cedar); }
.fence-caption { margin: 0; color: var(--muted); }
.fence-caption .when-after, .is-fixed .when-before { display: none; }
.is-fixed .when-after { display: inline; }
.fence-view { overflow-x: auto; }
.fence-svg { display: block; width: max(100%, 760px); max-width: none; height: auto; }
.f-b { stroke: var(--wood-line); stroke-width: 0.9; stroke-linejoin: round; }
.f-b1 { fill: #c9a15f; } .f-b2 { fill: #b9853d; } .f-b3 { fill: #b06f2e; }
.f-b4 { fill: #c9822f; } .f-b5 { fill: #a8662a; } .f-b6 { fill: #bf9048; }
.f-grain { fill: none; stroke: var(--wood-line); stroke-width: 0.7; opacity: 0.28; }
.f-knot { fill: var(--wood-line); opacity: 0.4; }
.f-nail { fill: var(--wood-line); opacity: 0.65; }
.f-post { fill: #a8662a; stroke: var(--wood-line); stroke-width: 1.1; stroke-linejoin: round; }
.f-post-bad { fill: var(--rot); transition: fill 0.5s 0.15s; }
.f-cap-hi { stroke: var(--wood-line); stroke-width: 1.4; fill: none; }
.f-rotmark { fill: var(--wood-line); opacity: 0.5; transition: opacity 0.4s 0.15s; }
.f-crack { fill: none; stroke: var(--wood-line); stroke-width: 1.2; opacity: 0.6; }
.f-grass { fill: var(--grass); }
.f-tuft { fill: none; stroke: var(--grass); stroke-width: 1.6; stroke-linecap: round; }
.f-lean { transform: rotate(var(--lean)); transform-box: view-box; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.f-sag { transform: skewX(var(--sag)); transform-box: view-box; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.f-mark { stroke: var(--text); stroke-width: 1.5; }
.f-mark-ok { fill: var(--ok); }
.f-mark-warn { fill: var(--warn); }
.f-mark-bad { fill: var(--bad); transition: opacity 0.3s 0.3s; }
.f-mark-fixed { fill: var(--ok); opacity: 0; transition: opacity 0.3s 0.3s; }
.is-fixed .f-lean, .is-fixed .f-sag { transform: none; }
.is-fixed .f-post-bad { fill: #a8662a; }
.is-fixed .f-rotmark, .is-fixed .f-mark-bad { opacity: 0; }
.is-fixed .f-mark-fixed { opacity: 1; }

.points { list-style: none; display: grid; gap: 16px; margin-top: 28px; }
.points li { padding: 18px 20px; background: var(--card); border-top: 5px solid var(--cedar); box-shadow: var(--shadow); transition: transform 0.3s var(--ease); }
.points li:nth-child(2) { border-color: var(--fir); }
.points li:nth-child(3) { border-color: var(--ochre); }
.points li:nth-child(4) { border-color: var(--slat-2); }
.points li:hover { transform: translateY(-5px); }
.points strong { display: block; margin-bottom: 4px; font: 800 1.4rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
@media (min-width: 700px) { .points { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .points { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Survey ---------- */
.survey-sketch {
  margin: 0; padding: 18px; color: var(--text); background-color: var(--card); box-shadow: var(--shadow-lg);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px -1px;
}
.survey-sketch svg { display: block; width: 100%; height: auto; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-weight: 600; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend svg { width: 18px; height: 18px; flex: none; }
.mk { stroke: currentColor; stroke-width: 1.2; }
.mk-ok { fill: var(--ok); } .mk-warn { fill: var(--warn); } .mk-bad { fill: var(--bad); }
@media (prefers-reduced-motion: no-preference) {
  .js .survey-sketch .mk > * { opacity: 0; transform-box: fill-box; transform-origin: center; }
  .js .survey-sketch.is-in .mk > * { animation: mark-in 0.4s var(--ease) both; animation-delay: calc(0.5s + var(--m, 0) * 90ms); }
}
@keyframes mark-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

.steps { list-style: none; counter-reset: step; display: grid; gap: 18px; margin-top: 24px; }
.steps li { counter-increment: step; position: relative; padding: 46px 18px 18px; background: var(--card); box-shadow: var(--shadow); transition: transform 0.3s var(--ease); }
.steps li:hover { transform: translateY(-5px); }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: -18px; width: 44px; height: 54px; padding-top: 12px;
  background: var(--cedar); color: #fff; text-align: center; font: 800 1.6rem/1 var(--display);
  clip-path: polygon(50% 0, 100% 22%, 100% 100%, 0 100%, 0 22%);
}
.steps li:nth-child(even)::before { background: var(--fir); }
.steps strong { display: block; margin-bottom: 4px; font: 800 1.3rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.steps span { color: var(--muted); font-size: 1rem; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 34px 18px; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Estimates ---------- */
.options { list-style: none; display: grid; gap: 18px; }
.options li { padding: 24px 22px; background: var(--band-text); color: var(--text); border-bottom: 8px solid var(--ochre); box-shadow: var(--shadow-lg); transition: transform 0.3s var(--ease); }
.options li:nth-child(2) { border-color: var(--cedar-bright); }
.options li:nth-child(3) { border-color: var(--slat-2); }
.options li:hover { transform: translateY(-8px); }
.options p { margin: 0; }
.opt-n { display: block; margin-bottom: 6px; color: var(--cedar); font: 700 1.1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.1em; }
.suits { margin: 26px 0 0; color: var(--band-muted); }
.suits strong { color: var(--band-text); }
@media (min-width: 800px) { .options { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Recent work ---------- */
.pairs { display: grid; gap: 28px; margin-bottom: 40px; }
.pairs > * { min-width: 0; }
@media (min-width: 860px) { .pairs { grid-template-columns: repeat(2, 1fr); } }
.pair h3 { margin-top: 16px; }
.pair p { color: var(--muted); margin: 0; }
.blend { --mix: 0; }
.blend-frame { position: relative; aspect-ratio: var(--ar); max-width: 100%; overflow: hidden; background: var(--line); box-shadow: var(--shadow-lg); }
.blend-frame picture, .blend-top { position: absolute; inset: 0; }
.blend-frame img { width: 100%; height: 100%; object-fit: cover; }
.blend-top { opacity: var(--mix); }
.blend-bar { display: flex; align-items: center; gap: 12px; padding-top: 10px; font: 800 1.15rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.05em; }
.blend-bar input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--cedar); cursor: ew-resize; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { min-height: 44px; padding: 10px 16px; border: 2px solid var(--fir); background: transparent; color: var(--fir); cursor: pointer; font: 800 1.1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.05em; transition: background 0.2s, color 0.2s, transform 0.2s var(--ease); }
.chip:hover { transform: translateY(-2px); }
.chip.is-on { background: var(--fir); color: #fff; }
.gallery { list-style: none; column-gap: 16px; }
.gallery > li { break-inside: avoid; margin-bottom: 16px; }
.gallery > li.is-entering { animation: pop-in 0.45s var(--ease) both; }
@media (min-width: 600px) { .gallery { columns: 2; } }
@media (min-width: 960px) { .gallery { columns: 3; } }
.tile { position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: var(--band); cursor: zoom-in; box-shadow: var(--shadow); text-align: left; }
.tile img { width: 100%; transition: transform 0.5s ease, opacity 0.3s; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.08); opacity: 0.78; }
.tile-tab { position: absolute; left: 0; top: 0; padding: 7px 11px; background: var(--cedar); color: #fff; font: 800 0.95rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.tile-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  font: 800 1.3rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.02em;
  transform: translateY(100%); transition: transform 0.35s var(--ease);
}
.tile:hover .tile-title, .tile:focus-visible .tile-title { transform: none; }
@media (hover: none) { .tile-title { transform: none; } }
.more-social { margin: 22px 0 0; font-weight: 600; }

.lightbox { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 15, 14, 0.96); color: #fff; }
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; animation: fade-in 0.2s; }
.lightbox::backdrop { background: rgba(12, 15, 14, 0.96); }
.lightbox figure { margin: 0; padding: 56px 4px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; height: 100dvh; }
.lightbox img { flex: 1; min-height: 0; max-width: 100%; object-fit: contain; }
.lightbox figcaption { max-width: 70ch; text-align: center; font-size: 1rem; color: var(--band-muted); }
.lightbox figcaption strong { display: block; color: #fff; font: 800 1.5rem/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.lb-nav, .lb-close { border: 0; background: none; color: #fff; cursor: pointer; line-height: 1; transition: color 0.2s, transform 0.2s; }
.lb-nav { width: clamp(40px, 7vw, 72px); height: 96px; font-size: 3.4rem; }
.lb-nav:hover, .lb-close:hover { color: var(--ochre); transform: scale(1.15); }
.lb-close { position: absolute; right: max(8px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 6px); z-index: 2; width: 48px; height: 48px; font-size: 2.6rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 960px; border-top: 2px solid var(--text); }
.faq details { border-bottom: 2px solid var(--line); }
.faq details[open] summary { color: var(--cedar); }
.faq summary { position: relative; padding: 20px 56px 20px 0; cursor: pointer; list-style: none; font: 800 1.35rem/1.15 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--cedar); font-size: 2rem; line-height: 1; transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--cedar); }
.faq details p { margin: 0; padding: 0 0 22px; max-width: 70ch; color: var(--muted); }
.faq details[open] p { animation: fade-in 0.4s; }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* ---------- Book ---------- */
.book { overflow: hidden; }
.book::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: repeating-linear-gradient(90deg, var(--slat-1) 0 34px, var(--slat-2) 34px 68px, var(--slat-3) 68px 102px, var(--slat-4) 102px 136px, var(--slat-5) 136px 170px, var(--slat-6) 170px 204px);
}
.book-facts { list-style: none; display: grid; gap: 8px; margin-bottom: 1.2em; color: var(--band-muted); max-width: 58ch; }
.book-facts strong { color: var(--band-text); }
.hs-form-frame { min-height: 180px; padding: 24px; background: #fff; color: var(--text); box-shadow: var(--shadow-lg); border-top: 8px solid var(--ochre); }
.hs-form-frame:empty::before { content: "Loading the booking form\2026"; color: var(--muted); }
.hs-form-frame.is-preview:empty::before { content: "The booking form appears here on the live site."; }
.booking-embed:not(:empty) { margin-top: 24px; }
.booking-embed iframe { display: block; width: 100%; height: 760px; border: 0; background: #fff; }
.booking-fallback { margin-top: 20px; }
.booking-fallback p { margin-bottom: 10px; color: var(--band-muted); }
.booking-thanks { margin-top: 20px; padding: 16px 18px; background: var(--band-text); color: var(--band); font-weight: 600; }
.booking-thanks span { display: block; font-weight: 400; margin-top: 4px; }

/* ---------- Contact ---------- */
.contact-list { display: grid; gap: 0; margin: 0; }
.contact-list div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list dt { font: 800 1.15rem/1.4 var(--display); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 480px) { .contact-list div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--band); color: var(--band-muted); box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.3); }
.footer-grid { display: grid; gap: 30px; padding-block: 44px; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-brand img { height: 130px; width: auto; }
.site-footer h3 { color: var(--band-text); font-size: 1.5rem; margin-bottom: 10px; }
.site-footer h3.c-cedar-l { color: var(--cedar-bright); }
.site-footer h3.c-ochre { color: var(--ochre); }
.site-footer ul { list-style: none; display: grid; gap: 0; }
.site-footer li { min-height: 44px; display: flex; align-items: center; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer li a { color: var(--band-muted); text-decoration: none; transition: color 0.2s, padding-left 0.2s; overflow-wrap: anywhere; }
.site-footer li a:hover { color: var(--ochre); padding-left: 5px; }
.footer-bar { background: var(--fir); color: #fff; font-size: 0.95rem; }
.footer-bar-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-block: 10px; }
.footer-bar p { margin: 0; }
.footer-bar a { color: #fff; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.2fr; } }

.float-cta {
  position: fixed; z-index: 40;
  right: calc(env(safe-area-inset-right, 0px) + 22px); bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  background: var(--fir); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s var(--ease), opacity 0.3s, visibility 0.3s;
}
.float-cta:hover { transform: translateX(-5px); }
.float-cta.is-away { opacity: 0; visibility: hidden; transform: translateY(20px); }
@media (max-width: 640px) {
  .float-cta { left: 0; right: 0; bottom: 0; text-align: center; padding: 16px var(--gutter-r) calc(env(safe-area-inset-bottom, 0px) + 16px) var(--gutter-l); }
  .float-cta:hover { transform: none; }
  .float-cta.is-away { transform: translateY(100%); }
  .footer-bar { padding-bottom: 8px; }
}

/* ---------- Plain pages (privacy) ---------- */
.prose { max-width: 792px; }
.prose h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.prose h2 { font-size: 1.9rem; margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: 6px; }

.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px var(--gutter-r) calc(env(safe-area-inset-bottom, 0px) + 14px) var(--gutter-l); background: var(--band); color: var(--band-text); box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.4); }
.consent p { margin: 0; flex: 1 1 320px; }
.consent a { color: var(--ochre); }
.consent-actions { display: flex; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn::after, .btn > i { display: none; }
  .btn, .picket, .f-lean, .f-sag, .fence-knob, .points li, .steps li, .options li, .towns li, .chip, .strip-row li, .cats img, .drop-tiles img, .tile img, .tile-title, .float-cta, .brand img, .header-row { transition: none; }
  .mobile-menu[open], .lightbox[open], .gallery > li.is-entering, .show.is-changing .show-mark i { animation: none; }
  .faq details::details-content { transition: none; }
}
@media print {
  .site-header, .float-cta, .consent, .booking-embed, .mobile-menu, .lightbox { display: none !important; }
  [data-reveal] { opacity: 1 !important; }
}
