/* ============================================================
   THE FENCING CO shared stylesheet
   Design tokens + shared components for all pages.
   Homepage keeps its own inline styles; this drives the
   fence-type and suburb pages so they stay visually identical.
   ============================================================ */
:root {
  --ink: #191c1f;
  --paper: #f6f7f8;
  --dark: #14171a;
  --accent: #c9ef4a;
  --accent-dark: #b3d93a;
  --accent-ink: #1a2405;
  --line: #e3e6e8;
  --muted: #5b6a66;
  --card: #ffffff;
  --radius: 0px;
  --pill: 0px;
  --max: 1120px;
  --font: "Anuphan", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Anuphan", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.65; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; height: auto; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 76px 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 16px; }
h3 { font-size: 21px; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
a { color: var(--ink); }
.kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.18em; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink); max-width: 720px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.narrow { max-width: 760px; }

/* ---- buttons ---- */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 14px 28px; border-radius: var(--pill); text-decoration: none; border: none; font-size: 16px; cursor: pointer; transition: background 0.15s, transform 0.1s; }
.btn:hover { background: var(--accent-dark); color: var(--accent-ink); }
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 16px 34px; font-size: 17px; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ---- header (solid dark on inner pages) ---- */
header.site-header { background: var(--dark); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; gap: 16px; }
.logo { display: inline-block; text-decoration: none; }
.logo img { height: 34px; width: auto; display: block; }
nav.main-nav { display: flex; gap: 26px; }
nav.main-nav a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 14.5px; font-weight: 600; }
nav.main-nav a:hover { color: #fff; }
.btn-header { padding: 10px 20px; font-size: 14.5px; }

/* ---- mobile drawer nav ---- */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 46px; height: 44px; padding: 11px 9px; margin-left: 2px; }
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle span + span { margin-top: 5px; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease; z-index: 65; }
body.menu-open .menu-backdrop { opacity: 1; visibility: visible; }
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; width: min(330px, 84vw); background: var(--dark); z-index: 70; transform: translateX(105%); transition: transform .28s ease; padding: 72px 28px 40px; overflow-y: auto; box-shadow: -10px 0 44px rgba(0,0,0,.45); }
body.menu-open .mobile-menu { transform: none; }
.mobile-menu a { display: block; color: #fff; text-decoration: none; font-size: 17px; font-weight: 600; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu .menu-label { color: rgba(255,255,255,.4); font-size: 11.5px; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; margin: 22px 0 2px; }
.mobile-menu .btn { display: block; margin-top: 26px; text-align: center; border-bottom: 0; color: var(--accent-ink); }
.mobile-menu .btn:hover { color: var(--accent-ink); }
.nav-close { position: absolute; top: 15px; right: 16px; background: none; border: 0; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; width: 40px; height: 40px; padding: 0; }
@media (max-width: 900px) { .nav-toggle { display: block; } }
@media (min-width: 901px) { .mobile-menu, .menu-backdrop { display: none; } }

/* ---- breadcrumb ---- */
.crumbs { background: var(--dark); border-top: 1px solid rgba(255,255,255,0.08); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 0; font-size: 13px; }
.crumbs li { color: rgba(255,255,255,0.55); }
.crumbs a { color: rgba(255,255,255,0.8); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs li + li::before { content: "\203A"; margin-right: 8px; color: rgba(255,255,255,0.35); }

/* ---- page hero (image banner) ---- */
.page-hero { position: relative; color: #fff; background-size: cover; background-position: center; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,22,17,0.45) 0%, rgba(11,22,17,0.35) 40%, rgba(11,22,17,0.78) 100%); }
.page-hero .wrap { position: relative; z-index: 2; padding-top: 92px; padding-bottom: 84px; }
.page-hero .kicker { color: var(--accent); text-shadow: 0 1px 10px rgba(0,0,0,0.4); }
.page-hero h1 { font-size: clamp(38px, 5.4vw, 66px); letter-spacing: -0.03em; margin-bottom: 18px; max-width: 780px; text-shadow: 0 2px 26px rgba(0,0,0,0.4); }
.page-hero p { font-size: clamp(17px, 2.2vw, 20px); color: rgba(255,255,255,0.94); max-width: 620px; margin-bottom: 28px; text-shadow: 0 1px 16px rgba(0,0,0,0.45); }
.page-hero .trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; }
.page-hero .trust span { color: #eaf3ee; font-size: 16px; font-weight: 600; text-shadow: 0 1px 10px rgba(0,0,0,0.45); }
.page-hero .trust span::before { content: "\2713 "; color: var(--accent); font-weight: 800; }

/* ---- prose intro ---- */
.prose { max-width: 760px; }
.prose p { color: #33403b; font-size: 17.5px; }
.prose h2 { margin-top: 8px; }
.prose h3 { margin: 30px 0 10px; }
.prose ul { margin: 0 0 16px 20px; }
.prose li { margin-bottom: 8px; color: #33403b; }
.section-alt { background: #eceff1; }
.section-dark { background: var(--dark); color: #eef1f0; }
.section-dark h2 { color: #fff; }
.section-dark p { color: #c3cfca; }
.section-dark .kicker { color: var(--accent); }

/* ---- benefits grid ---- */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.benefit { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.benefit .b-mark { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 50px; padding-top: 9px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40.51 43'%3E%3Cpolygon points='20.25 0 .05 15.89 0 43 40.51 43 40.45 15.89 20.25 0' fill='%23c9ef4a'/%3E%3C/svg%3E") no-repeat center / contain; color: var(--accent-ink); font-weight: 800; font-size: 15px; letter-spacing: 0.02em; margin-bottom: 16px; }
.benefit h3 { font-size: 18px; margin-bottom: 6px; }
.benefit p { font-size: 15px; color: var(--muted); }

/* ---- gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
.gallery figure { margin: 0; border: 1px solid var(--line); background: var(--card); }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery figcaption { padding: 12px 16px; font-size: 14px; color: var(--muted); }
.gallery .wide { grid-column: 1 / -1; }
.gallery .wide img { aspect-ratio: 16 / 7; }

/* ---- FAQ ---- */
.faq { max-width: 820px; margin-top: 32px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--font-display); font-weight: 700; font-size: 18.5px; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 26px; font-weight: 400; color: var(--accent-ink); background: var(--accent); width: 30px; height: 30px; line-height: 30px; text-align: center; transition: transform .2s; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: #33403b; font-size: 16.5px; padding: 0 8px 20px 0; }

/* ---- inline quote CTA form ---- */
.quote-band { background: #eceff1; }
.quote-grid { display: grid; grid-template-columns: 1fr 480px; gap: 44px; align-items: start; }
.quote-copy h2 { margin-bottom: 12px; }
.quote-copy p { color: var(--muted); max-width: 460px; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 0; padding: 30px 26px; box-shadow: 0 10px 36px rgba(28,36,32,0.08); }
.form-title { font-family: var(--font-display); font-weight: 700; font-size: 25px; letter-spacing: -0.02em; margin-bottom: 4px; }
.form-subtitle { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 15px; }
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 0; font-size: 16px; font-family: var(--font); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); border-color: var(--ink); }
textarea { resize: vertical; min-height: 84px; }
.consent { font-size: 13px; color: var(--muted); margin: 12px 0 16px; }
.form-msg { display: none; margin-top: 16px; padding: 14px; font-weight: 600; font-size: 15px; }
.form-msg.ok { background: #e5f2ea; color: #143f30; display: block; }
.form-msg.err { background: #fbeaea; color: #8c2f2f; display: block; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---- related links ---- */
.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.related a { display: block; background: var(--card); border: 1px solid var(--line); padding: 20px; text-decoration: none; color: var(--ink); font-weight: 700; font-family: var(--font-display); transition: transform .18s ease, box-shadow .18s ease; }
.related a:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(16,33,26,0.12); border-color: var(--accent); }
.related a span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---- footer ---- */
footer { background: var(--dark); color: #a5b2ac; padding: 60px 0 84px; font-size: 14px; position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 11px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='11' viewBox='0 0 22 11'%3E%3Cpath d='M0 11 L11 0 L22 11 Z' fill='%2314171a'/%3E%3C/svg%3E") repeat-x; background-size: 22px 11px; }
.footer-logo { display: block; margin-bottom: 40px; }
.footer-logo img { width: min(600px, 100%); height: auto; display: block; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand { max-width: 400px; }
.footer-blurb { color: #a5b2ac; font-size: 14.5px; line-height: 1.6; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-family: var(--font-display); font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; margin-bottom: 14px; }
.footer-col a { display: block; color: #cfd6cd; text-decoration: none; font-size: 14.5px; margin-bottom: 9px; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { padding-top: 28px; }
.footer-legal { color: #7f8c86; font-size: 12.5px; line-height: 1.6; max-width: 820px; margin-bottom: 20px; }
.footer-baseline { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; color: #7f8c86; font-size: 12.5px; }
footer a { color: #cfd6cd; }

/* ---- motion ---- */
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
html.js .reveal.in { opacity: 1; transform: none; }
.benefit, .related a { transition: transform .2s ease, box-shadow .2s ease; }

/* ---- mobile ---- */
@media (max-width: 900px) { nav.main-nav { display: none; } }
@media (max-width: 820px) {
  section { padding: 52px 0; }
  .page-hero .wrap { padding-top: 64px; padding-bottom: 56px; }
  .benefits { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; gap: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr 1fr; }
  .btn-header { display: none; }
}
@media (max-width: 460px) { .related { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   CONTRACTOR PAGE — dark theme (scoped, homeowner pages unaffected)
   ============================================================ */
.contractor-page { background: var(--dark); }
.contractor-page section { background: var(--dark); color: #fff; }
.contractor-page section h2 { color: #fff; }
.contractor-page .kicker { color: var(--accent); }
/* benefit cards on dark */
.contractor-page .benefit { background: #1b2024; border-color: #2b3237; }
.contractor-page .benefit h3 { color: #fff; }
.contractor-page .benefit p { color: rgba(255,255,255,0.68); }
/* faq on dark */
.contractor-page .faq details { border-bottom-color: #2b3237; }
.contractor-page .faq summary { color: #fff; }
.contractor-page .faq details p { color: rgba(255,255,255,0.72); }
/* partner form band: deeper black for rhythm, white card pops */
.contractor-page .quote-band { background: #0f1315; }
.contractor-page .quote-copy h2 { color: #fff; }
.contractor-page .quote-copy p { color: rgba(255,255,255,0.70); }
/* keep the white form card readable (labels/title inherit ink, not the dark-theme white) */
.contractor-page .form-card { color: var(--ink); }
/* value checklist beside the form */
.nowrap { white-space: nowrap; }
.reg-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.reg-points li { position: relative; padding-left: 32px; font-weight: 600; font-size: 16.5px; }
.reg-points li::before { content: "\2713"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; line-height: 22px; text-align: center; font-size: 13px; font-weight: 800; color: var(--accent-ink); background: var(--accent); }
