/* Alamo City Fence — Texas-modern premium contractor theme.
   Static, build-less, SEO-first. Warm limestone + cedar + wrought iron + gold.
   All class names from the original site are preserved; new components added.
   Reveals use CSS animation-timeline (no JS) so crawlability/LCP are unaffected;
   browsers without support simply show content normally. */

:root {
  /* Surfaces */
  --bg: #faf6f0;            /* warm cream */
  --bg-soft: #f1e8dc;       /* Alamo limestone beige */
  --card: #ffffff;
  --line: #e8ddcd;          /* limestone hairline */

  /* Ink */
  --ink: #241f1a;           /* wrought-iron near-black */
  --muted: #6d6053;         /* warm taupe */

  /* Brand accents */
  --cedar: #a9551d;         /* cedar brown — primary */
  --cedar-dark: #8c4316;
  --gold: #c8922a;          /* warm gold highlight */
  --gold-soft: #e7c879;
  --sage: #6f7c5b;          /* dusty green — trust/outdoor */
  --iron: #2c2723;          /* deep iron for dark bands */

  /* Aliases kept so original rules stay themed */
  --accent: var(--cedar);
  --accent-dark: var(--cedar-dark);
  --accent-ink: #ffffff;
  --warn: #b4451f;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 34px rgba(54, 38, 22, 0.10);
  --shadow-lg: 0 24px 60px rgba(54, 38, 22, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: var(--sans); line-height: 1.6; font-size: 17px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.3vw, 2.5rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; color: var(--muted); }
a { color: var(--cedar-dark); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 76px 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow { color: var(--cedar); font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin: 0 0 .5em; }
.lede { font-size: 1.08rem; max-width: 62ch; }
.section-head { max-width: 64ch; margin-bottom: 36px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 246, 240, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.brand { font-family: var(--serif); font-weight: 800; font-size: 1.28rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--cedar); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { position: relative; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; padding: 4px 0; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--cedar); transition: width .22s ease; }
.nav a:hover::after { width: 100%; }
.header-cta { display: flex; align-items: center; gap: 16px; }
.phone-link { font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; }
.phone-link::before { content: "📞 "; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--cedar); color: var(--accent-ink);
  font-family: var(--sans); font-weight: 700; text-decoration: none;
  padding: 14px 24px; min-height: 48px; border-radius: 999px;
  border: 0; cursor: pointer; font-size: 1rem; line-height: 1;
  box-shadow: 0 6px 18px rgba(169, 85, 29, .26);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--cedar-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(169, 85, 29, .32); }
.btn--ghost { background: transparent; color: var(--cedar-dark); border: 1.5px solid var(--cedar); box-shadow: none; }
.btn--ghost:hover { background: rgba(169, 85, 29, .08); color: var(--cedar-dark); }
.btn--lg { padding: 17px 30px; font-size: 1.06rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 70px 0 64px; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.hero--home {
  background-image: linear-gradient(100deg, rgba(250,246,240,.97) 0%, rgba(250,246,240,.88) 40%, rgba(36,31,26,.30) 100%), url("./images/hero-cedar-fence.jpg");
  background-size: cover; background-position: center right;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: .25em; }
.hero h1 em { font-style: italic; color: var(--cedar); font-weight: 600; }
.hero .sub { font-size: 1.12rem; color: var(--ink); max-width: 54ch; }
.hero ul { padding-left: 0; list-style: none; margin: 20px 0 24px; display: grid; gap: 9px; }
.hero ul li { padding-left: 30px; position: relative; color: var(--ink); font-weight: 500; }
.hero ul li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: #fff; background: var(--sage); width: 21px; height: 21px; border-radius: 50%; font-size: .72rem; display: grid; place-items: center; font-weight: 800; }
.hero .microcopy { font-size: .86rem; color: var(--muted); margin-top: 14px; }

/* Quote form card */
.quote-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px; }
.quote-card h3 { font-size: 1.5rem; margin-bottom: .15em; }
.quote-card .form-intro { font-size: .92rem; margin-bottom: 16px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-family: var(--sans); font-size: .82rem; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #b3a695; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cedar); box-shadow: 0 0 0 3px rgba(169, 85, 29, .16); }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-2col .field { margin-bottom: 0; }
.consent { font-size: .72rem; color: var(--muted); margin-top: 12px; line-height: 1.45; }
#quote-success { text-align: center; padding: 14px 0; }
#quote-success h3 { color: var(--sage); }

/* Trust marquee */
.marquee { background: var(--iron); color: #f3ece1; overflow: hidden; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.marquee-track { display: flex; gap: 0; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { padding: 0 30px; font-weight: 600; font-size: .92rem; white-space: nowrap; letter-spacing: .02em; opacity: .92; }
.marquee span::before { content: "✦"; color: var(--gold); margin-right: 30px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Grids + cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--cedar), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #dccdb7; }
.card:hover::before { transform: scaleX(1); }
.card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.12rem; }
.card .icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(169,85,29,.10); color: var(--cedar); margin-bottom: 14px; font-size: 1.3rem; }
.card a { font-weight: 700; text-decoration: none; color: var(--cedar-dark); display: inline-block; margin-top: 6px; }
.card a:hover { color: var(--cedar); }

/* Bento services grid */
.grid--bento { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
.grid--bento .card.feature { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end;
  background-image: linear-gradient(0deg, rgba(36,31,26,.82) 0%, rgba(36,31,26,.30) 55%, rgba(36,31,26,.05) 100%), url("./images/hero-cedar-fence.jpg");
  background-size: cover; background-position: center; color: #fff; border: 0; }
.grid--bento .card.feature h3, .grid--bento .card.feature p { color: #fff; }
.grid--bento .card.feature p { opacity: .92; }
.grid--bento .card.feature a { color: var(--gold-soft); }
.grid--bento .card.feature::before { display: none; }

/* Media band (image + text) */
.media { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.media .media-img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; max-height: 460px; }
.guide-list { display: grid; gap: 12px; }
.guide-item { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.guide-item strong { display: block; color: var(--ink); }
.guide-item .tag { flex: 0 0 auto; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cedar); background: rgba(169,85,29,.10); padding: 6px 10px; border-radius: 999px; align-self: center; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--cedar); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin-bottom: 14px; }
.step h3 { font-family: var(--sans); }

/* Areas chips */
.areas { display: flex; flex-wrap: wrap; gap: 11px; }
.areas a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--ink); transition: all .15s ease; }
.areas a:hover { border-color: var(--cedar); color: var(--cedar-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(54,38,22,.08); }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; margin-bottom: 12px; overflow: hidden; }
.faq summary { font-weight: 700; cursor: pointer; padding: 18px 22px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--cedar); font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--cedar) 0%, var(--cedar-dark) 60%, #6e3410 100%); color: #fff; text-align: center; border-radius: 0; }
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { opacity: .92; }
.cta-band .btn { background: #fff; color: var(--cedar-dark); }
.cta-band .btn:hover { background: var(--gold-soft); color: var(--iron); }
.cta-band .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.cta-card { max-width: var(--maxw); margin: 0 auto; }
.cta-microcopy { font-size: .86rem; opacity: .8; margin-top: 14px; }

/* Footer */
.site-footer { background: var(--iron); color: #cfc6ba; padding: 52px 0 30px; font-size: .94rem; }
.site-footer a { color: #cfc6ba; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 30px; }
.footer-grid h4 { font-family: var(--sans); color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.footer-grid .brand { color: #fff; display: inline-block; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: #9a9085; }
.footer-bottom a { margin-left: 16px; }

/* Sticky mobile CTA bar */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(250,246,240,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(54,38,22,.12); }
.mobile-cta .btn { flex: 1; padding: 13px 10px; min-height: 50px; }
.mobile-cta .btn--ghost { background: #fff; }

/* Scroll reveals — JS-free, content always present in DOM */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(22px); animation: reveal-in linear forwards; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  }
}
@keyframes reveal-in { to { opacity: 1; transform: none; } }

/* Long-form guide / article content */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { font-family: var(--sans); font-weight: 700; margin-top: 1.4em; font-size: 1.12rem; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5em; color: var(--muted); }
.prose .note { background: var(--bg-soft); border-left: 3px solid var(--cedar); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 1.2em 0; font-size: .96rem; }
.price-table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .96rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.price-table th, .price-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.price-table th { background: var(--bg-soft); font-family: var(--sans); font-weight: 700; color: var(--ink); }
.price-table tr:last-child td { border-bottom: 0; }
.price-table td:last-child { font-weight: 700; color: var(--cedar-dark); white-space: nowrap; }

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero--home { background-image: linear-gradient(180deg, rgba(250,246,240,.96), rgba(250,246,240,.92)); }
  .media { grid-template-columns: 1fr; }
  .grid--bento { grid-template-columns: 1fr 1fr; }
  .grid--bento .card.feature { grid-column: span 2; grid-row: auto; min-height: 240px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .mobile-cta { display: flex; }
  body { padding-bottom: 76px; }
}
@media (max-width: 520px) {
  .grid-3, .grid-4, .grid--bento { grid-template-columns: 1fr; }
  .grid--bento .card.feature { grid-column: auto; }
  .form-2col { grid-template-columns: 1fr; }
  .header-cta .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
