/* DB Fencing & Landscape Bristol: timber yard. Raw timber, charcoal stain, featheredge boards. One light theme. */
:root {
  --paper: #f1e4c8;          /* sawn pine */
  --on-paper: #25282a;
  --on-paper-muted: #4f4a40;
  --stain: #25282a;          /* charcoal stain */
  --on-stain: #f1e4c8;
  --on-stain-muted: #cbbfa6;
  --board: #e2c18d;          /* raw timber board */
  --on-board: #25282a;
  --accent: #ea8a3c;         /* fresh-cut cedar */
  --on-accent: #25282a;
  --field: #fffaf0;
  --on-field: #25282a;
  --err: #9e2a12;
  --ribbon: #ea8a3c;
  --on-ribbon: #25282a;

  --display: "Big Shoulders Stencil", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --wrap: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* featheredge board tile: vertical boards, shadowed overlap on the left edge */
  --feather: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='60'%3E%3Crect width='22' height='60' fill='%233a3e40'/%3E%3Crect width='4' height='60' fill='%23191b1c'/%3E%3Crect x='20.5' width='1.5' height='60' fill='%23565b5e'/%3E%3Cpath d='M11 0v60' stroke='%23303335' stroke-width='1'/%3E%3C/svg%3E");
  --deck: repeating-linear-gradient(180deg, #c99a62 0 22px, #a87a47 22px 24px, #d4a76f 24px 46px, #8f6538 46px 48px);
  --sleeper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='48'%3E%3Crect width='120' height='48' fill='%235e4128'/%3E%3Crect x='2' y='2' width='116' height='20' fill='%238a6440'/%3E%3Crect x='-58' y='26' width='116' height='20' fill='%23785635'/%3E%3Crect x='62' y='26' width='116' height='20' fill='%23785635'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--on-paper);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-wrap: anywhere;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; margin: 0 0 .5em; letter-spacing: .01em; text-transform: uppercase; overflow-wrap: normal; }
h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); max-width: 18ch; }
h3 { font-size: 1.8rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, .done:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ribbon { margin: 0; padding: 6px 16px; text-align: center; font-size: .82rem; font-weight: 600; background: var(--ribbon); color: var(--on-ribbon); }

/* buttons: sharp corners throughout */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 22px; border: 2px solid transparent;
  font: 700 1.05rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-accent:hover { background: var(--board); color: var(--on-board); border-color: var(--board); }
.btn-line { background: transparent; color: inherit; border-color: currentColor; }

/* header */
.top { background: var(--stain); color: var(--on-stain); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #3a3e40; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; line-height: 1; }
.brand em { font-style: normal; color: var(--on-stain-muted); }
.brand strong { color: var(--accent); }
.top nav { display: flex; gap: 22px; margin-left: auto; font-weight: 600; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.top-call { min-height: 42px; padding: 0 16px; }

/* hero */
.hero { background: var(--stain); color: var(--on-stain); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; padding-top: 64px; }
.hero-copy { padding-bottom: 72px; }
.eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: .85rem; color: var(--accent); margin-bottom: 14px; }
h1 { font-size: clamp(2.8rem, 5.4vw, 4.6rem); line-height: .95; max-width: 15ch; }
.lede { font-size: 1.2rem; max-width: 40ch; color: var(--on-stain-muted); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { margin: 0; align-self: end; }
.hero-art svg { width: 100%; height: auto; }

/* boards go up one by one on load */
.b { transform-box: fill-box; transform-origin: bottom; }
.rail, .iron { transform-box: fill-box; }
@media (prefers-reduced-motion: no-preference) {
  .b { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 150ms); }
  .iron { animation: fade .4s ease both 1.3s; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
  @keyframes fade { from { opacity: 0; } }
}

/* proof band */
.proof { background: var(--board); color: var(--on-board); }
.proof-in { display: flex; align-items: baseline; gap: 28px; padding-top: 30px; padding-bottom: 30px; }
.proof-big { margin: 0; font-family: var(--display); font-size: clamp(2.4rem, 6vw, 3.4rem); text-transform: uppercase; line-height: 1; white-space: nowrap; }
.proof-big strong { font-weight: 800; }
.proof-text { margin: 0; max-width: 56ch; font-size: 1.1rem; }
.proof-text a { font-weight: 700; }

/* services bento */
.services { padding: 88px 0 72px; }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(200px, auto); gap: 14px; margin-top: 36px; }
.cell { padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--field); color: var(--on-field); border: 2px solid var(--stain); }
.cell p { margin: 0; max-width: 40ch; }
.cell .label { background: var(--paper); color: var(--on-paper); padding: 18px 20px; max-width: 360px; }
.c-fence { grid-column: span 2; grid-row: span 2; background: var(--stain) var(--feather); color: var(--on-stain); min-height: 420px; }
.c-gates { grid-column: span 2; background: var(--board); color: var(--on-board); }
.c-deck { background: var(--stain) var(--deck); color: var(--on-stain); padding: 14px; }
.c-sleep { background: var(--stain) var(--sleeper); color: var(--on-stain); padding: 14px; }
.c-deck .label, .c-sleep .label { padding: 14px 16px; }
.c-room { grid-column: span 2; background: var(--stain); color: var(--on-stain); }
.c-room p { color: var(--on-stain-muted); }
.c-land { grid-column: span 2; background: var(--field); color: var(--on-field); }
.link { display: inline-block; margin-top: 14px; font-weight: 700; }

/* work plates */
.work { padding: 24px 0 88px; }
.plates { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; margin-top: 28px; }
.plate {
  display: grid; place-items: center; min-height: 190px; padding: 24px; text-align: center;
  background: var(--board) repeating-linear-gradient(90deg, transparent 0 46px, rgba(37,40,42,.08) 46px 48px);
  color: var(--on-board); border: 3px dashed var(--stain);
}
.plate p { margin: 0; max-width: 26ch; font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.1; text-transform: uppercase; }
.plate-lg { grid-row: span 2; min-height: 400px; }
.plate-lg p { font-size: 2rem; }

/* area */
.area { background: var(--board); color: var(--on-board); padding: 72px 0; }
.area-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.area-word { font-size: clamp(3rem, 10vw, 7rem); line-height: .9; margin: 0; max-width: none; }
.area-word span { display: block; }
.area-copy p { font-size: 1.15rem; }

/* quote form */
.quote { padding: 88px 0 96px; }
.quote-in { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.quote-side { position: sticky; top: 100px; }
.quote-side p { font-size: 1.15rem; color: var(--on-paper-muted); }
form { background: var(--field); color: var(--on-field); border: 2px solid var(--stain); padding: 28px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
label, legend { font-weight: 700; padding: 0; }
.opt { font-weight: 400; color: var(--on-paper-muted); }
input:not([type=checkbox]), textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--on-paper-muted); border-radius: 0;
  background: var(--field); color: var(--on-field);
}
input[aria-invalid=true] { border-color: var(--err); }
.err { color: var(--err); margin: 0; font-weight: 600; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips label { position: relative; font-weight: 600; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span { display: block; padding: 9px 14px; border: 2px solid var(--stain); background: var(--field); color: var(--on-field); }
.chips input:checked + span { background: var(--stain); color: var(--on-stain); }
.chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
form .btn { justify-self: start; }
.done { background: var(--board); color: var(--on-board); padding: 20px; }
.done h3 { font-size: 1.6rem; }
.done p { margin: 0; }

/* footer */
.foot { background: var(--stain); color: var(--on-stain); padding: 48px 0 40px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr; gap: 24px 40px; }
.foot-name { font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; line-height: 1; }
.foot a { font-weight: 700; }
.privacy { grid-column: 1 / -1; color: var(--on-stain-muted); font-size: .95rem; margin: 0; padding-top: 20px; border-top: 1px solid #3a3e40; }

/* mobile dock */
.dock { display: none; }

@media (max-width: 860px) {
  .top nav { display: none; }
  .top-call { margin-left: auto; }
  .hero-in { grid-template-columns: 1fr; gap: 8px; padding-top: 40px; }
  .hero-copy { padding-bottom: 8px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .c-fence { min-height: 340px; }
  .plates { grid-template-columns: 1fr; grid-template-rows: none; }
  .plate-lg { grid-row: auto; min-height: 260px; }
  .area-in, .quote-in, .foot-in { grid-template-columns: 1fr; }
  .quote-side { position: static; }
  .proof-in { flex-direction: column; gap: 6px; }
  body { padding-bottom: 76px; }
  .dock {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--stain); color: var(--on-stain);
  }
  .dock .btn { padding: 0 10px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 1.1rem; }
  .brand em { display: none; }
  .top-call { display: none; }
  .bento { grid-template-columns: 1fr; }
  .c-fence, .c-gates, .c-room, .c-land { grid-column: auto; grid-row: auto; }
  .c-deck, .c-sleep { min-height: 200px; }
  form { padding: 20px 16px; }
  .btn { white-space: normal; text-align: center; line-height: 1.15; }
  h1 { font-size: clamp(2.5rem, 12vw, 3.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
