/* Shared styles for the land clearing page (index.html) and the silt fence page (silt-fence.html).
   Light theme only. Central Texas palette: limestone, cedar, caliche, rust. No libraries. */

:root {
  --limestone: #F4EFE5;
  --paper: #FBF8F2;
  --band: #EBE2CF;
  --caliche: #D9C6A0;
  --cedar: #2C4631;
  --cedar-soft: #E4E9D7;
  --rust: #A3472A;
  --rust-deep: #843620;
  --ink: #1C1D19;
  --ink-soft: #4C4D45;
  --line: #DDD3C0;
  --line-strong: #C4B79D;
  --on-cedar: #F4EFE5;
  --on-cedar-soft: #CBD5C0;
  --radius: 6px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--limestone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
p { margin: 0; }
a { color: var(--cedar); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; border-radius: 2px; }
svg { display: block; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.05rem, 1.25rem + 3.6vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.55rem); }
h3 { font-size: 1.25rem; line-height: 1.2; }

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 760px) { .wrap { padding-inline: 32px; } }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--radius); }
.skip:focus { left: 16px; color: var(--paper); }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: var(--radius);
  font: 600 1.0625rem/1.2 var(--sans);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--rust); color: #FFF9F0; }
.btn-primary:hover { background: var(--rust-deep); color: #FFF9F0; }
.btn-primary[disabled] { background: #B98C78; cursor: progress; }
.btn-line { background: transparent; color: var(--cedar); border-color: var(--cedar); }
.btn-line:hover { background: var(--cedar); color: var(--on-cedar); }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ header */
.bar { position: sticky; top: 0; z-index: 20; background: var(--limestone); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; gap: 10px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); text-decoration: none; }
.brand svg { width: 32px; height: 32px; }
.brand-text { display: none; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.125rem; }
.brand-sub { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.pagenav { display: flex; gap: 2px; margin-left: auto; }
.pagenav a {
  padding: 10px 7px; border-radius: 4px;
  font-size: 0.875rem; font-weight: 600; white-space: nowrap;
  color: var(--ink-soft); text-decoration: none;
}
.pagenav a:hover { color: var(--ink); }
.pagenav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--rust); border-radius: 0; }
.pagenav .more { display: none; }
.bar .btn { min-height: 44px; padding: 8px 14px; font-size: 1rem; flex: none; }
@media (max-width: 379px) {
  .brand svg { width: 28px; height: 28px; }
  .pagenav a { padding: 10px 5px; font-size: 0.8125rem; }
  .bar .btn { padding: 8px 11px; }
}
@media (min-width: 560px) {
  .brand-text { display: flex; }
}
@media (min-width: 860px) {
  .pagenav { gap: 6px; margin-right: 8px; }
  .pagenav a { padding: 10px 10px; font-size: 0.9375rem; }
  .pagenav .more { display: inline; }
}

/* ------------------------------------------------------------------ hero */
.hero { padding: 26px 0 8px; }
.hero-in { display: grid; gap: 26px; }
.hero h1 { margin-top: 10px; }
.h1-2 {
  display: block; margin-top: 0.38em;
  font-style: italic; font-weight: 500; font-size: 0.6em; line-height: 1.22; letter-spacing: 0;
  color: var(--rust);
}
.lede { margin-top: 18px; max-width: 34em; font-size: 1.125rem; color: var(--ink-soft); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cta-row .btn-primary { flex: 1 1 10.5rem; }
.cta-row .btn-line { flex: 0 1 auto; min-width: 6.5rem; }
.towns-line { margin-top: 18px; font-size: 0.9375rem; color: var(--ink-soft); }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; height: auto; }
.hero-long h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.1rem); }
@media (min-width: 900px) {
  .hero { padding: 56px 0 36px; }
  .hero-in { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 52px; }
  .cta-row .btn-primary { flex: 0 1 auto; }
}

/* ------------------------------------------------------------------ sections */
.section { padding: 56px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.band { background: var(--band); }
.sec-head { max-width: 40em; margin-bottom: 28px; }
.sec-head h2 { margin-top: 8px; }
.sec-head p:not(.eyebrow) { margin-top: 12px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ estimate */
.calc { display: grid; gap: 26px; }
@media (min-width: 900px) {
  .calc { grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: start; }
  .calc-out { position: sticky; top: 86px; }
}
.field { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 1.0625rem; }
.hint { margin-top: 8px; font-size: 0.875rem; color: var(--ink-soft); }

.stepper {
  display: flex; align-items: stretch; max-width: 22rem;
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
}
.stepper button {
  flex: none; width: 56px; min-height: 56px; border: 0; background: transparent;
  font: 500 1.625rem/1 var(--sans); color: var(--cedar); cursor: pointer;
}
.stepper button:hover { background: var(--cedar-soft); }
.stepper button:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stepper button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stepper .qty {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  border-inline: 1.5px solid var(--line);
}
.stepper input {
  width: 3.4em; min-width: 0; padding: 8px 0; border: 0; background: transparent;
  font: 600 1.375rem/1 var(--sans); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink);
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.stepper .qty:focus-within { outline: 3px solid var(--rust); outline-offset: 2px; border-radius: 2px; }
.stepper .unit { font-weight: 600; color: var(--ink-soft); }

.choices { display: grid; gap: 10px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 16px;
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer;
}
.choice input, .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice .dot {
  flex: none; width: 22px; height: 22px; display: grid; place-items: center;
  border: 2px solid var(--ink-soft); border-radius: 50%; background: #fff;
}
.choice input:checked ~ .dot { border-color: var(--cedar); }
.choice input:checked ~ .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cedar); }
.choice input:focus-visible ~ .dot { outline: 3px solid var(--rust); outline-offset: 3px; }
.choice:has(input:checked) { border-color: var(--cedar); background: var(--cedar-soft); box-shadow: inset 0 0 0 1px var(--cedar); }
.choice-name { flex: 1; font-weight: 600; line-height: 1.3; }
.choice-price { font-size: 0.9375rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
}
.seg-3 { grid-template-columns: repeat(3, 1fr); max-width: 22rem; }
.seg label {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 10px;
  font-weight: 600; font-size: 0.9375rem; line-height: 1.25; text-align: center; cursor: pointer;
}
.seg-3 label { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.seg label + label { border-left: 1.5px solid var(--line-strong); }
.seg label:has(input:checked) { background: var(--cedar); color: var(--on-cedar); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--rust); outline-offset: -5px; }

.calc-out { padding: 24px 20px; border-radius: 10px; background: var(--cedar); color: var(--on-cedar); }
@media (min-width: 600px) { .calc-out { padding: 28px 28px; } }
.out-label { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-cedar-soft); }
.out-range {
  margin-top: 6px;
  font-family: var(--serif); font-weight: 600; font-size: clamp(2.05rem, 1.6rem + 2vw, 2.8rem); line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums; color: #fff;
}
.out-lines { margin: 18px 0 0; }
.ln { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid rgba(244, 239, 229, 0.2); }
.ln dt { font-weight: 600; }
.ln dt .ln-detail { display: block; margin-top: 2px; font-weight: 400; font-size: 0.875rem; color: var(--on-cedar-soft); }
.ln dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ln.total { border-top: 1.5px solid rgba(244, 239, 229, 0.55); }
.ln.total dt, .ln.total dd { font-size: 1.125rem; color: #fff; }
.out-empty { margin-top: 18px; color: var(--on-cedar-soft); }
.out-note { margin-top: 16px; font-weight: 600; color: #fff; }
.calc-out .btn { margin-top: 16px; }
.calc-out .btn:focus-visible { outline-color: var(--on-cedar); }
.out-fine { margin-top: 12px; font-size: 0.8125rem; color: var(--on-cedar-soft); }

/* ------------------------------------------------------------------ steps */
.steps-list { list-style: none; margin: 30px 0 0; padding: 0; display: grid; }
.steps-list li { position: relative; padding: 0 0 30px 62px; }
.steps-list li:last-child { padding-bottom: 0; }
.steps-list li::before { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--line-strong); }
.steps-list li:last-child::before { display: none; }
.num {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid var(--cedar); border-radius: 50%; background: var(--paper);
  font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--cedar);
}
.steps-list h3 { padding-top: 9px; }
.steps-list p { margin-top: 6px; color: var(--ink-soft); }
@media (min-width: 900px) {
  .steps-list { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .steps-list li { padding: 64px 0 0; }
  .steps-list li::before { left: 54px; right: -22px; top: 21px; bottom: auto; width: auto; height: 2px; }
  .steps-list h3 { padding-top: 0; }
}

/* ------------------------------------------------------------------ area */
.area-in { display: grid; gap: 30px; }
@media (min-width: 900px) { .area-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; } }
.towns { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.towns li {
  padding: 7px 13px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--paper);
  font-weight: 600; font-size: 0.9375rem;
}
.area p:not(.eyebrow) { margin-top: 18px; color: var(--ink-soft); }
.map { margin: 0; max-width: 520px; }
.map-svg { width: 100%; height: auto; }
.map-town { font: 600 21px var(--sans); fill: var(--ink); }
.map-ref { font: 500 17px var(--sans); fill: var(--ink-soft); }
.map-river { font: italic 500 15px var(--serif); fill: #3F6464; }

/* ------------------------------------------------------------------ faq */
.faq-in { display: grid; gap: 22px; }
@media (min-width: 900px) { .faq-in { grid-template-columns: 0.8fr 1.2fr; gap: 56px; } }
.qa { margin: 0; border-top: 1.5px solid var(--line-strong); }
.qa div { padding: 20px 0; border-bottom: 1.5px solid var(--line-strong); }
.qa dt { font-family: var(--serif); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; }
.qa dd { margin: 8px 0 0; max-width: 38em; color: var(--ink-soft); }

/* ------------------------------------------------------------------ quote form */
.quote-in { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .quote-in { grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
  .quote-head { position: sticky; top: 100px; }
}
.quote-head p:not(.eyebrow) { margin-top: 12px; color: var(--ink-soft); }
.quote-head .alt { margin-top: 18px; }
.alt-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.alt-links .btn { min-height: 48px; padding: 10px 18px; }

.lead { padding: 20px 16px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; }
@media (min-width: 600px) { .lead { padding: 30px 28px; } }
.f { margin-bottom: 18px; min-width: 0; }
.f > label:not(.file-btn), .f-pair > legend { display: block; margin-bottom: 6px; font-weight: 700; }
.f-pair { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.f-pair > legend { padding: 0; }
.f-pair .req { display: block; font-weight: 400; font-size: 0.875rem; color: var(--ink-soft); }
.pair { display: grid; gap: 12px; margin-top: 4px; }
@media (min-width: 600px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair .f { margin: 0; }
.pair .f > label { font-weight: 600; font-size: 0.9375rem; }
.opt { font-weight: 400; color: var(--ink-soft); }
.lead input:not([type="file"]):not([type="checkbox"]):not([type="radio"]), .lead select, .lead textarea {
  display: block; width: 100%; min-height: 52px; padding: 12px 14px;
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: #FFFDF9; border: 1.5px solid var(--line-strong); border-radius: var(--radius);
}
.lead textarea { min-height: 112px; resize: vertical; }
.lead select {
  -webkit-appearance: none; appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232C4631' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
}
.lead input:focus, .lead select:focus, .lead textarea:focus { border-color: var(--cedar); outline: 3px solid rgba(44, 70, 49, 0.28); outline-offset: 0; }
.lead [aria-invalid="true"] { border-color: var(--rust); }
.err { margin-top: 6px; font-size: 0.9375rem; font-weight: 600; color: var(--rust-deep); }
.photos .file-btn { position: relative; cursor: pointer; }
.photos input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photos input[type="file"]:focus-visible + .file-btn { outline: 3px solid var(--rust); outline-offset: 3px; }
.photo-count { margin-top: 8px; font-size: 0.9375rem; font-weight: 600; color: var(--cedar); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-err { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--rust); background: #F6E6DD; font-weight: 600; }
.thanks { padding: 28px 22px; background: var(--cedar); color: var(--on-cedar); border-radius: 10px; }
.thanks p { font-size: 1.25rem; line-height: 1.4; }
.thanks strong { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; display: block; margin-bottom: 4px; color: #fff; }
.thanks:focus { outline: 3px solid var(--rust); outline-offset: 3px; }

/* ------------------------------------------------------------------ footer */
.foot { padding: 26px 0 34px; border-top: 1px solid var(--line-strong); font-size: 0.9375rem; color: var(--ink-soft); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--ink-soft); }

/* ------------------------------------------------------------------ small parts */
.seg label > span { display: block; }
.seg small { display: block; margin-top: 2px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-soft); }
.seg label:has(input:checked) small { color: var(--on-cedar-soft); }
.f-label { margin-bottom: 8px; }
