/* ============================================================
   Ludington Fence Company — styles.css
   Palette: cedar/rust clay, off-white paper, deep slate
   Mobile-first, no frameworks.
   ============================================================ */

:root {
  --clay: #b4552d;
  --clay-dark: #8f3f1e;
  --clay-soft: #f3e2d8;
  --slate: #2e3a42;
  --slate-deep: #202a31;
  --slate-mid: #46545e;
  --paper: #f7f4ee;
  --sand: #ede7db;
  --ink: #26313a;
  --muted: #5c6a74;
  --line: #ddd5c6;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(32, 42, 49, 0.10);
  --font: "Outfit", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--clay-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--clay); }

.container { width: min(1120px, 92%); margin: 0 auto; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  color: var(--slate);
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.9rem, 5.4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.15rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.22rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1rem; }

ul.checks { list-style: none; margin: 0 0 1rem; }
ul.checks li {
  padding: 0.3rem 0 0.3rem 1.9rem;
  position: relative;
}
ul.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62rem;
  width: 1.15rem; height: 1.15rem;
  background: var(--clay);
  border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.55 17.3 4.8 12.55l1.4-1.4 3.35 3.34 8.25-8.24 1.4 1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.55 17.3 4.8 12.55l1.4-1.4 3.35 3.34 8.25-8.24 1.4 1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
}

article ul:not(.checks), .prose ul { margin: 0 0 1rem 1.3rem; }
article ul:not(.checks) li, .prose ul li { margin-bottom: 0.35rem; }
article ol, .prose ol { margin: 0 0 1rem 1.3rem; }
article ol li { margin-bottom: 0.45rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--clay); color: var(--white); }
.btn-primary:hover { background: var(--clay-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }
.btn-outline { background: transparent; color: var(--slate); border-color: var(--slate); }
.btn-outline:hover { background: var(--slate); color: var(--white); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Header ---------- */
.topbar {
  background: var(--slate-deep);
  color: #cdd6dc;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topbar a { color: #f0d9cc; font-weight: 600; text-decoration: none; }
.topbar a:hover { color: var(--white); }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--slate);
}
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-text { line-height: 1.1; font-size: 0.95rem; font-weight: 500; color: var(--slate-mid); }
.brand-text strong { display: block; font-size: 1.15rem; font-weight: 800; color: var(--slate); letter-spacing: -0.01em; }

.site-nav > ul { list-style: none; display: flex; align-items: center; gap: 0.25rem; }
.site-nav a, .sub-toggle {
  display: block;
  padding: 0.55rem 0.75rem;
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}
.site-nav a:hover, .sub-toggle:hover { background: var(--sand); color: var(--slate); }

.has-sub { position: relative; }
.sub-toggle::after { content: " ▾"; font-size: 0.75em; }
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  z-index: 60;
}
.sub-menu li { width: 100%; }
.sub-menu a { padding: 0.5rem 0.7rem; border-radius: 6px; font-weight: 500; }
.has-sub.open .sub-menu { display: block; }
@media (hover: hover) {
  .has-sub:hover .sub-menu { display: block; }
}
.site-nav .sub-menu ul { display: block; }

.header-phone { padding: 0.6rem 1.1rem; font-size: 0.95rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--slate);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='160'%3E%3Cpath d='M14 34 L28 20 L42 34 V160 H14 Z' fill='%23ffffff' fill-opacity='0.035'/%3E%3Crect x='0' y='58' width='56' height='7' fill='%23ffffff' fill-opacity='0.03'/%3E%3Crect x='0' y='112' width='56' height='7' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E") repeat,
    linear-gradient(150deg, var(--slate-deep) 0%, var(--slate) 62%, #3a4a55 100%);
  color: #e9eef1;
  padding: 3.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--clay) 0 42px, var(--clay-dark) 42px 84px);
}
.hero .eyebrow { color: #e8a17e; }
.hero h1 { color: var(--white); margin-bottom: 1rem; max-width: 21ch; }
.hero .lede { font-size: 1.15rem; max-width: 56ch; color: #cfd8dd; margin-bottom: 1.6rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.4rem; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-size: 0.95rem; color: #b9c5cc; }
.hero-points li { padding-left: 1.3rem; position: relative; }
.hero-points li::before { content: "✓"; position: absolute; left: 0; color: #e8a17e; font-weight: 800; }

.hero-inner { display: grid; gap: 2rem; align-items: center; }

/* Page hero (interior) */
.page-hero {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='160'%3E%3Cpath d='M14 34 L28 20 L42 34 V160 H14 Z' fill='%23ffffff' fill-opacity='0.035'/%3E%3Crect x='0' y='58' width='56' height='7' fill='%23ffffff' fill-opacity='0.03'/%3E%3Crect x='0' y='112' width='56' height='7' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E") repeat,
    linear-gradient(150deg, var(--slate-deep), var(--slate));
  color: #e9eef1;
  padding: 2.8rem 0 3rem;
  position: relative;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--clay) 0 42px, var(--clay-dark) 42px 84px);
}
.page-hero h1 { color: var(--white); margin-bottom: 0.7rem; }
.page-hero .lede { color: #cfd8dd; max-width: 62ch; font-size: 1.1rem; margin-bottom: 1.3rem; }
.page-hero .eyebrow { color: #e8a17e; }
.crumbs { font-size: 0.85rem; margin-bottom: 1.1rem; color: #9fadb5; }
.crumbs a { color: #cfd8dd; }

/* ---------- Sections ---------- */
.section { padding: 3.2rem 0; }
.section-sand { background: var(--sand); }
.section-slate { background: var(--slate-deep); color: #d5dde2; }
.section-slate h2, .section-slate h3 { color: var(--white); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }
.section-slate .section-head p { color: #b7c2c9; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .card-icon {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: var(--clay-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.9rem;
}
.card .card-icon svg { width: 30px; height: 30px; }
.card p { color: var(--muted); font-size: 0.98rem; flex: 1; }
.card .card-link { font-weight: 700; text-decoration: none; color: var(--clay-dark); }
.card .card-link::after { content: " →"; }
.card .card-link:hover { color: var(--clay); text-decoration: underline; }

/* ---------- Split layouts ---------- */
.split { display: grid; gap: 2rem; align-items: start; }
.split .panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 0.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; min-width: 520px; }
caption { text-align: left; padding: 0.9rem 1rem 0.4rem; font-weight: 700; color: var(--slate); }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--slate); color: var(--white); font-weight: 700; border-bottom: none; }
tbody tr:nth-child(even) { background: var(--paper); }
tbody tr:last-child td { border-bottom: none; }
.note { font-size: 0.88rem; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 1rem; }
.steps li {
  counter-increment: step;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.2rem 4rem;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem; top: 1.15rem;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--clay);
  color: var(--white);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.steps h3 { font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ---------- FAQ ---------- */
details.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 0.8rem;
}
details.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--slate);
  padding: 1rem 2.6rem 1rem 1.2rem;
  list-style: none;
  position: relative;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--clay);
  font-weight: 600;
}
details.faq-item[open] summary::after { content: "–"; }
details.faq-item .faq-body { padding: 0 1.2rem 1.1rem; color: var(--muted); }
details.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Quote form ---------- */
.quote-section {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='160'%3E%3Cpath d='M14 34 L28 20 L42 34 V160 H14 Z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E") repeat,
    linear-gradient(150deg, var(--slate-deep), var(--slate));
  color: #dbe2e7;
  padding: 3.2rem 0;
}
.quote-section h2 { color: var(--white); }
.quote-grid { display: grid; gap: 2rem; }
.quote-copy p { color: #b9c5cc; }
.quote-copy .checks li::before { background: #e8a17e; }
.quote-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  margin-top: 0.4rem;
}
.quote-phone svg { width: 1.2em; height: 1.2em; }
.quote-phone:hover { color: #e8a17e; }

.quote-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.quote-form h3 { margin-bottom: 1rem; }
.field { margin-bottom: 0.95rem; }
.field label { display: block; font-size: 0.9rem; font-weight: 700; color: var(--slate); margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
  border-color: var(--clay);
}
.field textarea { min-height: 110px; resize: vertical; }
.quote-form .btn { width: 100%; justify-content: center; border: none; }
.form-note { font-size: 0.82rem; color: var(--muted); margin: 0.7rem 0 0; text-align: center; }
.hp-field { display: none !important; }

/* ---------- CTA strip ---------- */
.cta-strip { background: var(--clay); color: var(--white); padding: 2.4rem 0; }
.cta-strip .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.cta-strip h2 { color: var(--white); margin: 0; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.cta-strip p { margin: 0.25rem 0 0; color: #f6ddcf; }
.cta-strip .btn { background: var(--white); color: var(--clay-dark); }
.cta-strip .btn:hover { background: var(--paper); }

/* ---------- Area chips ---------- */
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip-list li a, .chip-list li span {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
}
.chip-list li a:hover { border-color: var(--clay); color: var(--clay-dark); }

/* ---------- Article / prose pages ---------- */
.article-layout { display: grid; gap: 2.4rem; padding: 3rem 0; }
.article-main h2 { margin-top: 2.2rem; }
.article-main h2:first-child { margin-top: 0; }
.article-main h3 { margin-top: 1.5rem; }
.article-aside > * + * { margin-top: 1.3rem; }
.aside-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
}
.aside-card.accent { background: var(--slate); color: #d5dde2; border: none; }
.aside-card.accent h3 { color: var(--white); }
.aside-card.accent a.btn { width: 100%; justify-content: center; margin-top: 0.6rem; }
.aside-card ul { list-style: none; }
.aside-card ul li { border-bottom: 1px solid var(--line); }
.aside-card ul li:last-child { border-bottom: none; }
.aside-card ul a { display: block; padding: 0.55rem 0; text-decoration: none; font-weight: 600; color: var(--slate); }
.aside-card ul a:hover { color: var(--clay-dark); }
.aside-card .aside-phone { font-size: 1.25rem; font-weight: 800; color: var(--white); text-decoration: none; display: inline-block; margin-top: 0.3rem; }
.aside-card .aside-phone:hover { color: #e8a17e; }

blockquote.callout {
  border-left: 4px solid var(--clay);
  background: var(--clay-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  color: var(--slate);
  font-size: 0.98rem;
}
blockquote.callout p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-deep); color: #aeb9c0; font-size: 0.95rem; }
.footer-top {
  border-top: 6px solid var(--clay);
  padding: 3rem 0 2rem;
  display: grid;
  gap: 2rem;
}
.site-footer h4 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.45rem; }
.site-footer a { color: #c6d0d6; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-brand .brand-text { color: #c6d0d6; }
.footer-brand .brand-text strong { color: var(--white); }
.footer-phone { font-size: 1.2rem; font-weight: 800; color: var(--white) !important; }
.footer-bottom {
  border-top: 1px solid #35424b;
  padding: 1.1rem 0 5.2rem;
  font-size: 0.85rem;
}
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; }

/* ---------- Sticky mobile call bar ---------- */
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--clay);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.95rem 1rem calc(0.95rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(32,42,49,0.25);
}
.call-bar:hover { color: var(--white); background: var(--clay-dark); }
.call-bar svg { width: 1.2em; height: 1.2em; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.lead { font-size: 1.12rem; }
.muted { color: var(--muted); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 899px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.6rem 4%;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a, .sub-toggle { width: 100%; text-align: left; padding: 0.8rem 0.5rem; border-bottom: 1px solid var(--paper); }
  .sub-menu { position: static; border: none; box-shadow: none; padding: 0 0 0 1rem; min-width: 0; }
  .nav-toggle { display: block; }
  .header-phone span.phone-label { display: none; }
  .header-phone { padding: 0.6rem 0.8rem; }
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid.grid-4 { grid-template-columns: repeat(4, 1fr); }
  .quote-grid { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .split { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: minmax(0, 2.1fr) minmax(260px, 1fr); }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .call-bar { display: none; }
  .footer-bottom { padding-bottom: 1.1rem; }
  .hero-inner { grid-template-columns: 1.25fr 1fr; }
}

@media (min-width: 1100px) {
  .hero { padding: 4.5rem 0 5.5rem; }
}
