/* =========================================================
   Fort Collins Crack Repair — site stylesheet
   Plain CSS, no build step. Design tokens + components per
   wiki/components/component-library.md.
   ========================================================= */

:root {
  --brand:        #C0392B;
  --brand-dark:   #a93226;
  --navy:         #152244;
  --navy-dark:    #0e1830;
  --teal:         #2980B9;
  --teal-dark:    #2172a4;
  --gold:         #C8A040;
  --gold-dark:    #a8863a;
  --ink:          #1a1a2e;
  --ink-soft:     #4a5a6a;
  --line:         #e3e8ee;
  --bg:           #fff;
  --bg-alt:       #f5f7fa;
  --max:          1160px;
  --radius:       6px;
  --font-head: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--ink); line-height: 1.7; background: var(--bg); -webkit-font-smoothing: antialiased; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- motion: respect user preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- focus (keyboard) ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--teal); outline-offset: 2px;
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-bottom: .6em; }
h3 { font-size: 1.2rem; margin-bottom: .35em; }
p  { margin-bottom: 1rem; color: var(--ink-soft); }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul  { list-style: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; color: #fff; padding: 13px 26px; border-radius: var(--radius);
  font-weight: 600; font-family: var(--font-body); border: none; cursor: pointer;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease; font-size: .98rem;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.15); }
.btn:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(0,0,0,.12); }
.btn--red  { background: var(--brand); } .btn--red:hover  { background: var(--brand-dark); }
.btn--navy { background: var(--navy); }  .btn--navy:hover { background: var(--navy-dark); }
.btn--gold { background: var(--gold); color: var(--navy); } .btn--gold:hover { background: var(--gold-dark); }
.btn--teal { background: var(--teal); }  .btn--teal:hover { background: var(--teal-dark); }
.btn--ghost { background: transparent; color: #fff; border: 2px solid #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.15); }
.btn--outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--lg { padding: 17px 34px; font-size: 1.05rem; }
.muted { color: var(--ink-soft); font-size: .9rem; }

/* ---------- header / nav (two-row) ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0,0,0,.14); }
.header-top { background: var(--navy); }
.header-top__inner {
  max-width: var(--max); margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav__logo { color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.nav__logo:hover { text-decoration: none; }
.header-contact { display: flex; gap: 20px; }
.header-contact__item { color: rgba(255,255,255,.85); font-size: .88rem; }
.header-contact__item a { color: rgba(255,255,255,.9); font-weight: 600; }

.site-nav { background: var(--brand); }
.site-nav__inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links > li { position: relative; }
.nav__links a { display: block; color: #fff; font-weight: 600; font-size: .93rem; padding: 15px 14px; transition: background .15s ease; }
.nav__links > li > a:hover { background: rgba(0,0,0,.12); text-decoration: none; }

.has-dropdown .dropdown {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 0; box-shadow: 0 12px 30px rgba(0,0,0,.14); z-index: 10;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.has-dropdown::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.has-dropdown:hover .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear 0s;
}
.dropdown a { color: var(--ink); padding: 10px 18px; font-weight: 500; transition: background .12s ease, padding-left .12s ease; }
.dropdown a:hover { background: var(--bg-alt); text-decoration: none; padding-left: 22px; }

.nav__call { background: var(--gold) !important; color: var(--navy) !important; font-weight: 700; }
.nav__call:hover { background: var(--gold-dark) !important; }

.nav__toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: #fff; padding: 10px 20px; transition: transform .2s ease; }
.nav__toggle.open { transform: rotate(90deg); }
@media (max-width: 900px) {
  .nav__links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--brand); max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .35s ease, opacity .25s ease;
  }
  .nav__links.open { max-height: 700px; opacity: 1; }
  .nav__links > li { width: 100%; }
  .has-dropdown .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0; background: rgba(0,0,0,.08); padding: 0;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .has-dropdown.open .dropdown { max-height: 600px; }
  .nav__toggle { display: block; }
  .site-nav__inner { position: relative; }
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, #dceaf7 0%, #eef4fa 60%, #ffffff 100%); }
.hero__split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 56px 0; }
.hero__inner { max-width: 640px; }
.hero__eyebrow {
  display: inline-block; background: var(--navy); color: #fff; text-transform: uppercase;
  letter-spacing: .06em; font-size: .78rem; font-weight: 700; padding: 6px 14px; border-radius: 20px; margin-bottom: 16px;
}
.hero h1 { color: var(--navy); text-transform: uppercase; margin-bottom: 14px; max-width: 16ch; }
.hero__lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 48ch; margin-bottom: 18px; }
.hero__checklist { margin: 18px 0; }
.hero__checklist li { padding-left: 26px; position: relative; color: var(--ink); font-weight: 500; margin-bottom: 8px; }
.hero__checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.hero__cta { margin-top: 22px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__photo img { border-radius: var(--radius); width: 100%; }
.hero__inner { animation: heroFadeUp .6s ease both; }
.hero__photo { animation: heroFadeUp .7s ease .12s both; }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) { .hero__split { grid-template-columns: 1fr; padding: 36px 0; } }
@media (max-width: 600px) { .hero__cta { flex-direction: column; align-items: stretch; } .hero__cta .btn { text-align: center; } }

/* inner-page hero (service, location, utility) — no split */
.hero--inner .hero__inner { max-width: 720px; padding: 44px 0; }
.hero--inner h1 { text-transform: none; }

/* ---------- sections ---------- */
.section { padding: 60px 0; }
.section--alt { background: var(--bg-alt); }
.section__lead { max-width: 68ch; }
.center { text-align: center; }
.center .section__lead { margin: 0 auto; }

/* split layout (about, contact, estimate) */
.split { display: grid; grid-template-columns: 60fr 40fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* card grid */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 24px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(0,0,0,.09); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

/* link list */
.linklist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 800px) { .linklist { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .linklist { grid-template-columns: 1fr; } }
.linklist a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font-weight: 600; transition: border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease; }
.linklist a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.07); }

/* area links (service areas page) */
.area-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 800px) { .area-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .area-links { grid-template-columns: 1fr; } }
.area-link { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.area-link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.07); }
.area-link__name { font-weight: 700; }
.area-link__city { color: var(--ink-soft); font-size: .85rem; }

/* cost table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; }
th { background: var(--bg-alt); font-weight: 700; color: var(--ink); }
tr:last-child td { border-bottom: 0; }

/* FAQ accordion */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; margin-bottom: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq details[open] { border-color: var(--brand); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--font-head); font-size: 1.08rem; padding: 16px 0; list-style: none; color: var(--navy); transition: color .15s ease; }
.faq summary:hover { color: var(--brand); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-size: 1.3rem; line-height: 1; display: inline-block; transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding-bottom: 16px; margin-bottom: 0; }
.faq details[open] > p { animation: faqFadeIn .3s ease; }
@keyframes faqFadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* phone strip (preferred CTA pattern) */
.phone-strip { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 44px 0; text-align: center; }
.phone-strip h2 { margin-bottom: 6px; }
.phone-strip .sub { color: var(--ink-soft); margin-bottom: 20px; }
.phone-strip .btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 500px) { .phone-strip .btns { flex-direction: column; } }

/* legacy CTA band — kept for reference only, not used in new builds */
.cta-band { background: var(--navy); color: #fff; text-align: center; padding: 52px 20px; }
.cta-band h2, .cta-band p { color: #fff; }

/* image band */
.image-band { padding: 18px 0; }
.image-band img { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); }

/* forms */
.form-card--teal { background: var(--teal); color: #fff; border-radius: var(--radius); padding: 30px; }
.form-card--teal h3 { color: #fff; }
.form-card--teal p.italic { font-style: italic; color: rgba(255,255,255,.9); margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: #fff; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(255,255,255,.4); border-radius: 6px;
  font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--ink);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--navy); box-shadow: 0 0 0 3px rgba(21,34,68,.15); outline: none;
}
.field textarea { min-height: 110px; resize: vertical; }

/* split layout non-form panels use dark-on-light card */
.info-card { background: var(--bg-alt); border-radius: var(--radius); padding: 26px; }
.info-card h3 { color: var(--navy); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.8); padding: 52px 0 26px; }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-family: var(--font-body); font-size: 1rem; letter-spacing: .02em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.8); font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 18px; font-size: .84rem; color: rgba(255,255,255,.55); }
.footer-disclaimer { font-size: .82rem; color: rgba(255,255,255,.55); margin-top: 10px; line-height: 1.5; }

/* phone link — stable hook for call-tracking number insertion */
.wc-phone { font-weight: 700; }

/* image placeholder note badge (build-time only — remove once real photos are added) */
.placeholder-note { display: block; font-size: .72rem; color: var(--ink-soft); text-align: center; margin-top: 4px; font-style: italic; }
