/* Hill Country Stain Co. — landing page styles
   Palette: cedar (stained wood), walnut, charcoal, cream, sage (Hill Country), sun (CTA) */
:root {
  --cedar: #B4652A;
  --cedar-deep: #9C4F1E;
  --walnut: #5C3A1E;
  --charcoal: #1F1B17;
  --ink: #2B2520;
  --muted: #6F655C;
  --cream: #FAF6F0;
  --cream-2: #F1EADF;
  --line: #E4DACB;
  --sage: #6B7F5E;
  --sun: #E9A23B;
  --sun-deep: #C9821B;
  --white: #FFFFFF;
  --ok: #2F7D4F;
  --err: #B3261E;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 27, 23, 0.10);
  --shadow-lg: 0 24px 60px rgba(31, 27, 23, 0.18);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; color: var(--charcoal); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.alt { background: var(--white); }
.section.dark { background: var(--charcoal); color: var(--cream); }
.section.dark h2, .section.dark h3 { color: var(--cream); }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cedar-deep); margin-bottom: 0.8rem; }
.section.dark .eyebrow { color: var(--sun); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.center .lead { margin-inline: auto; }
[hidden] { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.85rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sun); color: var(--charcoal); box-shadow: 0 8px 20px rgba(233, 162, 59, 0.35); }
.btn-primary:hover { background: #F0AE4E; }
.btn-secondary { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.section.dark .btn-secondary { color: var(--cream); border-color: var(--cream); }
.btn-ghost { background: transparent; color: var(--muted); min-height: 44px; padding-inline: 0.75rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 240, 0.92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.topbar .logo { height: 40px; width: auto; }
.topbar .actions { display: flex; gap: 0.6rem; align-items: center; }
.topbar .btn { min-height: 44px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }
.topbar .call { font-weight: 700; text-decoration: none; color: var(--charcoal); white-space: nowrap; }
@media (max-width: 640px) { .topbar .call span { display: none; } .topbar .btn-primary { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(233, 162, 59, 0.22), transparent 60%),
    radial-gradient(50% 40% at 0% 100%, rgba(107, 127, 94, 0.18), transparent 60%),
    var(--cream);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 em { font-style: italic; color: var(--cedar-deep); }
.hero .lead { font-size: 1.2rem; margin-bottom: 1.4rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0; margin: 0; list-style: none; }
.trust li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.95rem; color: var(--ink); font-weight: 600; }
.trust svg { width: 18px; height: 18px; color: var(--sage); flex: none; }

/* Before / after visual in hero */
.hero-visual { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.swatch { position: relative; border-radius: var(--radius); aspect-ratio: 4 / 3; overflow: hidden; box-shadow: var(--shadow); }
.swatch .label { position: absolute; left: 0.75rem; bottom: 0.75rem; background: rgba(31, 27, 23, 0.82); color: var(--cream); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.35rem 0.6rem; border-radius: 6px; }
.wood { background-size: 100% 100%, 100% 100%, 12px 100%; }
.wood.gray { background-image:
  repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 2px, transparent 2px 30px),
  linear-gradient(180deg, rgba(255,255,255,0.15), rgba(0,0,0,0.12)),
  linear-gradient(90deg, #A8A29A, #8E8880); }
.wood.cedar { background-image:
  repeating-linear-gradient(90deg, rgba(0,0,0,0.10) 0 2px, transparent 2px 30px),
  linear-gradient(180deg, rgba(255,255,255,0.14), rgba(0,0,0,0.16)),
  linear-gradient(90deg, #C7793A, #9C4F1E); }
.swatch img { width: 100%; height: 100%; object-fit: cover; }

/* Quote card */
.quote-card {
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow-lg); padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line); position: relative;
}
.quote-card .qc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.quote-card .qc-head h2, .quote-card .qc-head h1 { font-size: 1.35rem; margin: 0; }
.quote-card .qc-head .step-count { font-size: 0.85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.progress { height: 6px; background: var(--cream-2); border-radius: 999px; overflow: hidden; margin-bottom: 1.25rem; }
.progress > span { display: block; height: 100%; width: 10%; background: linear-gradient(90deg, var(--cedar), var(--sun)); transition: width 0.25s ease; }
.step { animation: fade 0.22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.step .hint { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.tiles.one { grid-template-columns: 1fr; }
.tile {
  display: flex; align-items: center; gap: 0.7rem; min-height: 60px; padding: 0.8rem 0.95rem;
  border: 2px solid var(--line); border-radius: 12px; background: var(--white);
  font: inherit; font-weight: 600; text-align: left; cursor: pointer; color: var(--ink);
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.tile:hover { border-color: var(--cedar); }
.tile:active { transform: scale(0.99); }
.tile[aria-pressed="true"] { border-color: var(--cedar); background: #FFF6EA; }
.tile .ico { width: 28px; height: 28px; flex: none; color: var(--cedar-deep); }
.tile small { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; }
.field { margin-bottom: 0.85rem; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1.02rem; padding: 0.8rem 0.9rem; border: 2px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
  min-height: 52px;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cedar); box-shadow: 0 0 0 4px rgba(180, 101, 42, 0.14); }
.field.invalid input { border-color: var(--err); }
.field .error { color: var(--err); font-size: 0.85rem; margin-top: 0.3rem; display: none; }
.field.invalid .error { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.82rem; color: var(--muted); line-height: 1.4; margin: 0.5rem 0 1rem; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--cedar); }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.step-nav .btn-primary { flex: 1; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
.photos .ph { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--cream-2); position: relative; }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(31,27,23,0.8); color: #fff; font-weight: 700; cursor: pointer; }
.upload-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.6rem 1rem; border: 2px dashed var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); background: var(--cream); }
.upload-btn input { display: none; }
.thanks { text-align: center; padding: 1rem 0; }
.thanks .check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: #E6F4EA; color: var(--ok); display: grid; place-items: center; }
.thanks h3 { font-size: 1.5rem; }
.alert { background: #FDECEA; color: var(--err); border-radius: 10px; padding: 0.75rem 0.9rem; font-size: 0.92rem; margin-bottom: 0.75rem; }
.qc-foot { margin-top: 0.9rem; font-size: 0.8rem; color: var(--muted); text-align: center; }

/* Price band */
.price-band { background: var(--charcoal); color: var(--cream); }
.price-band .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding-block: 1.75rem; }
@media (max-width: 760px) { .price-band .wrap { grid-template-columns: 1fr; gap: 1rem; } }
.price-band .stat strong { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--sun); line-height: 1.1; }
.price-band .stat span { font-size: 0.95rem; color: #D9CFC2; }

/* Cards / grids */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 2px 0 rgba(31,27,23,0.03); }
.section.dark .card { background: #2A241F; border-color: #3A322B; }
.card .num { width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--charcoal); font-weight: 800; display: grid; place-items: center; margin-bottom: 0.9rem; font-family: var(--font-display); font-size: 1.15rem; }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; color: var(--muted); }
.section.dark .card p { color: #D9CFC2; }

/* Before/after gallery */
.ba { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .ba { grid-template-columns: 1fr; } }
.ba figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.ba .pair { display: grid; grid-template-columns: 1fr 1fr; }
.ba .pair .swatch { border-radius: 0; box-shadow: none; aspect-ratio: 1; }
.ba figcaption { padding: 0.8rem 1rem; font-size: 0.92rem; color: var(--muted); }
.ba figcaption strong { color: var(--ink); }

/* Colors */
.colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; }
@media (max-width: 860px) { .colors { grid-template-columns: repeat(3, 1fr); } }
.color { text-align: center; font-size: 0.85rem; font-weight: 600; }
.color .chip { aspect-ratio: 1; border-radius: 12px; margin-bottom: 0.45rem; border: 1px solid rgba(0,0,0,0.08); background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.08) 0 2px, transparent 2px 22px), linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.14)); }

/* Reviews */
.review { display: flex; flex-direction: column; gap: 0.6rem; }
.stars { color: var(--sun); letter-spacing: 2px; font-size: 1.05rem; }
.review .who { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* Area */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; padding: 0; margin: 0; list-style: none; }
.chips li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.95rem; font-weight: 600; }

/* FAQ */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 0 1.1rem; margin-bottom: 0.7rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--cedar-deep); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1rem; margin: 0; color: var(--muted); }

/* Final CTA */
.final { text-align: center; }
.final h2 { max-width: 20ch; margin-inline: auto; }
.final .cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* Footer */
footer { padding: 2rem 0 6rem; font-size: 0.88rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
footer a { color: var(--muted); }
@media (min-width: 761px) { footer { padding-bottom: 2rem; } }

/* Mobile sticky CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom)); background: rgba(250,246,240,0.96); border-top: 1px solid var(--line); display: none; gap: 0.5rem; backdrop-filter: blur(10px); }
.sticky-cta .btn { flex: 1; min-height: 50px; }
@media (max-width: 760px) { .sticky-cta { display: flex; } .sticky-cta.hide { display: none; } }

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* /quote — ad landing page: the form is the page */
.hero-quote { padding-top: clamp(1.25rem, 4vw, 2.5rem); }
.hero-quote .wrap { display: block; width: min(560px, calc(100% - 2rem)); }
.hero-quote .eyebrow { display: block; text-align: center; margin-bottom: 0.9rem; }
.hero-quote .trust-center { justify-content: center; margin-top: 1.25rem; }
.hero-quote .trust li { font-size: 0.88rem; color: var(--muted); }
.quote-page footer { padding-bottom: 2rem; }

/* ===== Generated inner pages (scripts/build.mjs) ===== */
.mainnav { display: flex; gap: 0.15rem; }
.mainnav a { text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--ink); padding: 0.45rem 0.7rem; border-radius: 999px; }
.mainnav a:hover, .mainnav a[aria-current="page"] { background: var(--cream-2); color: var(--charcoal); }
@media (max-width: 900px) { .mainnav { display: none; } }
.page-hero { position: relative; padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 85% 10%, rgba(233, 162, 59, 0.18), transparent 60%), var(--cream); }
.page-hero h1 { max-width: 22ch; }
.page-hero .lead { max-width: 64ch; margin-bottom: 1.2rem; }
.page-hero .trust { margin-top: 0.25rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.two-col .side { position: sticky; top: 84px; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } .two-col .side { position: static; order: -1; } }
.article { max-width: 72ch; min-width: 0; }
.article section { margin-bottom: 2rem; }
.article h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin-top: 0; }
.article h3 { margin-top: 1.25rem; }
.article p, .article li { color: var(--ink); }
.article ol, .article ul { padding-left: 1.3rem; }
.article li { margin-bottom: 0.5rem; }
.article ul.chips { padding: 0; justify-content: flex-start; }
.article .chips a { text-decoration: none; }
.article .small { font-size: 0.88rem; color: var(--muted); }
.article .nearby, .article .crosslinks { font-size: 0.92rem; color: var(--muted); }
.article .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.article .example { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.article .example h2 { font-size: 1.3rem; }
.article table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0 0 1rem; }
.article th, .article td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.article .tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--white); margin-bottom: 1rem; }
.article .tablewrap table { margin: 0; min-width: 520px; }
.article .faq h2 { margin-bottom: 0.75rem; }
.article .note { border-left: 4px solid var(--sun); background: #FFF6EA; padding: 0.9rem 1.1rem; border-radius: 0 10px 10px 0; margin: 0 0 1rem; }
.article .note p:last-child { margin: 0; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 0 0 1rem; aspect-ratio: 16 / 9; background: var(--cream-2); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.related ul, .postlist { list-style: none; padding: 0; margin: 0; }
.postlist li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.postlist li a { text-decoration: none; font-family: var(--font-display); font-size: 1.2rem; }
.postlist li .small { display: block; margin: 0.15rem 0 0.4rem; }
.postlist li p { margin: 0; color: var(--muted); }
/* Color swatches on /fence-stain-colors */
.tones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 1rem; padding: 0; list-style: none; }
@media (max-width: 640px) { .tones { grid-template-columns: repeat(2, 1fr); } }
.tone .chip { aspect-ratio: 4 / 3; border-radius: 12px; margin-bottom: 0.5rem; border: 1px solid rgba(0,0,0,0.08); background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.08) 0 2px, transparent 2px 22px), linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.14)); }
.tone strong { display: block; }
.tone span { font-size: 0.85rem; color: var(--muted); }
/* Footer link block */
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: 1.5rem 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; width: 100%; }
@media (max-width: 760px) { .footer-links { grid-template-columns: 1fr 1fr; } }
.footer-links h3 { font-family: var(--font-body); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 0.6rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.35rem; font-size: 0.9rem; }
.footer-links a { text-decoration: none; color: var(--ink); }
.footer-links a:hover { color: var(--cedar-deep); text-decoration: underline; }
footer .wrap { flex-wrap: wrap; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; width: 100%; align-items: center; }
