/* Eastern Kentucky Fence — eky.css
   Regional contractor identity: deep ridge green, warm paper, copper accent.
   Deliberately distinct from longhuntergates.com (dark/brass) and
   americanfencekits.com (industrial orange/steel). */

:root {
  --paper: #f7f5f0;
  --card: #ffffff;
  --ink: #1e241f;
  --muted: #5c655e;
  --line: #dcd9cf;

  --ridge: #234433;        /* deep Appalachian green */
  --ridge-dark: #182f24;
  --copper: #a9581f;       /* accent — CTAs, emphasis */
  --copper-light: #c26c2c;
  --clay: #f0e3d7;

  --good: #2f6b46;
  --good-soft: #e4efe8;

  --display: "Zilla Slab", Georgia, serif;
  --body: "Source Sans 3", system-ui, -apple-system, sans-serif;

  --maxw: 1080px;
  --radius: 5px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141815;
    --card: #1c211d;
    --ink: #e9ece8;
    --muted: #a3aca5;
    --line: #2f3631;
    --ridge: #7fae8e;
    --ridge-dark: #6d9b7c;
    --copper: #d98a4a;
    --copper-light: #e9a065;
    --clay: #2a231d;
    --good: #7fb894;
    --good-soft: #1b2721;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 44rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .7rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }
a { color: var(--copper); }

.eyebrow {
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--copper);
  margin: 0 0 .5rem;
}
.lede { font-size: 1.14rem; color: var(--muted); }

/* ---------- header ---------- */
.hdr {
  background: var(--ridge-dark);
  color: #eef2ee;
  position: sticky; top: 0; z-index: 40;
}
.hdr .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .85rem; flex-wrap: wrap; }
.logo {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
  line-height: 1.1;
}
.logo small { display: block; font-family: var(--body); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: #a9c4b1; font-weight: 600; }
.hdr .spacer { flex: 1; }
.hdr nav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.hdr nav a { color: #dfe8e1; text-decoration: none; font-size: .93rem; font-weight: 600; }
.hdr nav a:hover { color: var(--copper-light); }
.hdr .tel { font-weight: 700; color: #fff; white-space: nowrap; }

/* ---------- hero ---------- */
.hero {
  background:
    linear-gradient(180deg, var(--ridge) 0%, var(--ridge-dark) 100%);
  color: #eef2ee;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lede { color: #cfdcd3; max-width: 46ch; margin-bottom: 1.6rem; }
.hero .lede strong { color: #fff; }

.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.pill {
  font-size: .76rem; font-weight: 600; letter-spacing: .03em;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 99px; padding: .3rem .8rem; color: #dfe8e1;
}
.pill.hot { border-color: var(--copper-light); color: var(--copper-light); }

/* ---------- sections ---------- */
.section { padding: clamp(2.6rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--card); border-block: 1px solid var(--line); }
.section.clay { background: var(--clay); }

/* ---------- materials ---------- */
.mats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.8rem; }
@media (max-width: 860px) { .mats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .mats { grid-template-columns: 1fr; } }
.mat {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem;
}
.mat.lead { border-top-color: var(--copper); }
.mat h3 { margin-bottom: .35rem; }
.mat .tag {
  display: inline-block; font-size: .66rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--copper); margin-bottom: .5rem;
}
.mat p { font-size: .93rem; color: var(--muted); margin: 0; }

/* ---------- towns ---------- */
.towns { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
@media (max-width: 760px) { .towns { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .towns { grid-template-columns: 1fr; } }
.towns li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  font-size: .93rem;
}
.towns li b { display: block; font-weight: 700; }
.towns li span { color: var(--muted); font-size: .8rem; }

/* ---------- table ---------- */
.tblwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 1.4rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: .87rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .9rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
}
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-light); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.3); color: #eef2ee; }
.btn-ghost:hover { border-color: var(--copper-light); color: var(--copper-light); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--copper); color: var(--copper); }
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }

/* ---------- form ---------- */
.form { max-width: 38rem; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 600px) { .f2 { grid-template-columns: 1fr; } }
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .9rem;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px;
  font-family: var(--body); font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--copper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 22%, transparent);
}
.field textarea { resize: vertical; min-height: 5rem; }
.hp { position: absolute; left: -9999px; }
.formnote { font-size: .87rem; color: var(--muted); margin-top: .7rem; }

/* ---------- confirmation ---------- */
.confirmed {
  background: var(--card); border: 1px solid var(--line);
  border-top: 4px solid var(--good); border-radius: var(--radius);
  padding: 1.9rem 1.8rem; max-width: 38rem;
}
.confirmed-tick {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--good-soft); color: var(--good);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 700; margin-bottom: 1rem;
}
.confirmed h3 { font-size: 1.6rem; }
.confirmed-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem 1rem; margin: 1.2rem 0; }
.confirmed-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.confirmed-row:last-child { border-bottom: none; }
.confirmed-row span:first-child { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; flex: 0 0 6rem; }
.confirmed-row span:last-child { text-align: right; }
.confirmed-steps { margin: 0 0 1.3rem; padding-left: 1.15rem; display: grid; gap: .5rem; font-size: .93rem; color: var(--muted); }
.confirmed-steps strong { color: var(--ink); }
.confirmed-foot { margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); max-width: 44rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: .95rem 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--copper); font-size: 1.35rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { padding: 0 0 1rem; margin: 0; color: var(--muted); }

/* ---------- footer ---------- */
.ftr { background: var(--ridge-dark); color: #b9c8bf; padding: 2.4rem 0; margin-top: 3rem; font-size: .92rem; }
.ftr .wrap { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; }
.ftr a { color: #dfe8e1; }
.ftr .fnav { display: flex; gap: 1rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
