/* Foundation Repair Waxahachie — 26 Nov 2026
   Palette: deep navy / slate with amber accent. System sans-serif. */
:root{
  --navy:#0f1c2e;
  --navy-2:#16263d;
  --slate:#1e3148;
  --ink:#152033;
  --ink-soft:#2c3d50;
  --muted:#4a5b6c;
  --paper:#f6f8fb;
  --paper-2:#eef3f8;
  --white:#ffffff;
  --line:#d5dee8;
  --accent:#b45309;
  --accent-hover:#9a3f07;
  --accent-soft:#fff4e5;
  --link:#0b4f8a;
  --link-hover:#083a66;
  --ok:#1f6b4a;
  --warn:#9a4a12;
  --max:72rem;
  --read:44rem;
  --radius:16px;
  --shadow:0 10px 28px rgba(15,28,46,.08);
  --shadow-sm:0 2px 10px rgba(15,28,46,.06);
  --header-h:4.25rem;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  background:var(--paper);
  line-height:1.65;
  font-size:1.0625rem;
}
a{color:var(--link);text-decoration-thickness:1px;text-underline-offset:2px}
a:hover{color:var(--link-hover)}
a:focus-visible, button:focus-visible, .btn:focus-visible, .nav-toggle-label:focus-visible, .nav-toggle:focus-visible + .nav-toggle-label{
  outline:3px solid var(--accent);
  outline-offset:3px;
}
img{max-width:100%;height:auto;display:block}
.skip{
  position:absolute;left:-999px;top:0;
  background:var(--navy);color:#fff;
  padding:.5rem 1rem;z-index:40;
}
.skip:focus{left:1rem;top:1rem}
.wrap{width:min(var(--max), calc(100% - 2.5rem));margin-inline:auto}
.visually-hidden{
  position:absolute;width:1px;height:1px;
  padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Sticky header */
.site-header{
  position:sticky;top:0;z-index:30;
  background:rgba(15,28,46,.94);
  color:#f4f7fb;
  border-bottom:3px solid var(--accent);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.site-header a{color:#f4f7fb;text-decoration:none}
.header-inner{
  display:flex;align-items:center;justify-content:space-between;
  gap:1rem;flex-wrap:wrap;min-height:var(--header-h);
}
.brand{display:flex;flex-direction:column;gap:.12rem;padding:.7rem 0}
.brand strong{font-size:1.05rem;letter-spacing:.01em;font-weight:700}
.brand span{font-size:.78rem;color:#c5d0dc;font-weight:500}
nav.primary{font-size:.92rem}
nav.primary ul{display:flex;flex-wrap:wrap;gap:.15rem .2rem;list-style:none;margin:0;padding:0}
nav.primary a{
  display:inline-block;padding:.45rem .7rem;border-radius:8px;
  border-bottom:none;
}
nav.primary a:hover{background:rgba(255,255,255,.08)}
nav.primary a[aria-current="page"]{
  background:rgba(180,83,9,.22);
  box-shadow:inset 0 -2px 0 var(--accent);
}
.nav-toggle{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.nav-toggle-label{display:none}

/* Hero with image + gradient overlay */
.hero{
  position:relative;
  min-height:clamp(22rem, 62vw, 32rem);
  display:flex;align-items:flex-end;
  color:#f8fafc;
  overflow:hidden;
  margin:0 0 2rem;
}
.hero-img{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;object-position:center 60%;
  z-index:0;
}
.hero-overlay{
  position:absolute;inset:0;z-index:1;
  background:
    linear-gradient(180deg, rgba(15,28,46,.28) 0%, rgba(15,28,46,.55) 42%, rgba(15,28,46,.88) 100%),
    linear-gradient(90deg, rgba(15,28,46,.55) 0%, rgba(15,28,46,.15) 60%, rgba(15,28,46,.35) 100%);
}
.hero-copy{
  position:relative;z-index:2;
  padding:3.2rem 0 2.8rem;
  max-width:var(--max);
}
.eyebrow{
  display:inline-block;
  font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:#f3d5a8;margin:0 0 .7rem;
}
.hero h1{color:#fff;max-width:14em;margin:0 0 .85rem;text-shadow:0 1px 2px rgba(0,0,0,.25)}
.hero .lede{color:#e8eef5;max-width:38rem;font-size:1.15rem;margin:0}
.btn-row{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.35rem}
.btn{
  font-family:var(--font);
  display:inline-block;
  background:var(--accent);
  color:#fff !important;
  text-decoration:none;
  padding:.7rem 1.15rem;
  border-radius:10px;
  font-size:.98rem;
  font-weight:650;
  border:2px solid transparent;
  box-shadow:0 1px 0 rgba(0,0,0,.1);
}
.btn:hover{background:var(--accent-hover);color:#fff !important}
.btn.secondary{
  background:transparent;
  color:#fff !important;
  border-color:rgba(255,255,255,.75);
  box-shadow:none;
}
.btn.secondary:hover{background:rgba(255,255,255,.1);border-color:#fff}

main{padding:1.4rem 0 3.6rem}
.crumbs{font-size:.85rem;color:var(--muted);margin:0 0 1.1rem}
.crumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:.35rem;margin:0;padding:0}
.crumbs li:not(:last-child)::after{content:"/";margin-left:.4rem;color:#9aa8b6}
.crumbs a{color:var(--link)}
.article, .prose{max-width:var(--read)}
h1,h2,h3,h4{
  font-family:var(--font);
  line-height:1.22;
  color:var(--ink);
  font-weight:750;
  letter-spacing:-.015em;
}
h1{font-size:clamp(1.75rem, 3.2vw, 2.4rem);margin:.15rem 0 1rem}
h2{font-size:1.35rem;margin:2.3rem 0 .75rem}
h3{font-size:1.1rem;margin:1.5rem 0 .4rem}
.lede{font-size:1.15rem;color:var(--ink-soft)}
.meta-line{font-size:.85rem;color:var(--muted);margin:0 0 1.25rem}

.page-figure{
  margin:0 0 1.6rem;
  max-width:none;
}
.page-figure img{
  width:100%;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  aspect-ratio:4/3;
  object-fit:cover;
  background:var(--paper-2);
}
.hero + main .page-figure img,
.page-figure.hero-like img{aspect-ratio:16/9}
.page-figure figcaption{
  font-size:.85rem;color:var(--muted);
  margin:.65rem 0 0;
}

.sources, .related, .callout{
  border:1px solid var(--line);
  background:#fff;
  border-radius:var(--radius);
  padding:1.15rem 1.25rem;
  margin:1.8rem 0;
  font-size:.95rem;
  box-shadow:var(--shadow-sm);
}
.callout{border-color:#efd2a8;background:var(--accent-soft)}
.callout strong{color:var(--warn)}
.sources h2, .related h2{margin-top:0}
.sources ul, .related ul{margin:.4rem 0 0;padding-left:1.15rem}

.grid-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(16.5rem,1fr));
  gap:1.25rem;
  margin:1.5rem 0 2.2rem;
  max-width:none;
}
.card{
  display:flex;flex-direction:column;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow);
  border-color:#c5b09a;
  color:inherit;
}
.card img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  background:var(--paper-2);
}
.card-body{display:block;padding:1.05rem 1.15rem 1.2rem}
.card h2, .card h3{margin:.1rem 0 .4rem;font-size:1.08rem;letter-spacing:0}
.card p{margin:0;color:var(--ink-soft);font-size:.95rem}

ul.plain{padding-left:1.2rem}
table{
  width:100%;
  border-collapse:collapse;
  font-size:.92rem;
  margin:1rem 0 1.4rem;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  box-shadow:var(--shadow-sm);
}
th,td{border:1px solid var(--line);padding:.6rem .7rem;text-align:left;vertical-align:top}
th{background:var(--paper-2);font-weight:650}
.caption{font-size:.85rem;color:var(--muted);margin:.2rem 0 1.2rem}

.site-footer{
  background:var(--navy);
  color:#c5d0dc;
  font-size:.88rem;
  padding:2.4rem 0 2.6rem;
}
.site-footer a{color:#f0d5a8}
.site-footer .wrap{display:grid;gap:1.1rem}
.footer-links{display:flex;flex-wrap:wrap;gap:.45rem 1.1rem}
.disclaimer{max-width:50rem;color:#b7c3d0}

@media (max-width:860px){
  .wrap{width:min(var(--max), calc(100% - 1.6rem))}
  .nav-toggle-label{
    display:flex;align-items:center;justify-content:center;
    width:2.6rem;height:2.6rem;margin:.4rem 0;
    border-radius:8px;cursor:pointer;
    border:1px solid rgba(255,255,255,.25);
  }
  .nav-toggle-label .hamburger,
  .nav-toggle-label .hamburger::before,
  .nav-toggle-label .hamburger::after{
    display:block;width:1.1rem;height:2px;background:#f4f7fb;border-radius:1px;
    position:relative;content:"";
  }
  .nav-toggle-label .hamburger::before{position:absolute;top:-6px}
  .nav-toggle-label .hamburger::after{position:absolute;top:6px}
  nav.primary{
    display:none;
    width:100%;
    padding:0 0 1rem;
  }
  .nav-toggle:checked ~ nav.primary{display:block}
  nav.primary ul{flex-direction:column;gap:.15rem}
  nav.primary a{display:block;padding:.65rem .75rem}
  .hero{min-height:22rem}
  .hero-copy{padding:2.2rem 0 1.8rem}
  body{font-size:1rem}
}
@media (max-width:520px){
  .grid-cards{grid-template-columns:1fr;gap:1rem}
  .btn{width:100%;text-align:center}
}

/* Home: let the service card grid use the full wrap width */
body.home article.prose{max-width:none}
body.home article.prose > p,
body.home article.prose > h2,
body.home article.prose > .lede,
body.home article.prose > .sources,
body.home article.prose > .related,
body.home article.prose > .callout{
  max-width:var(--read);
}
