/* =====================================================================
   ESP Painting — static site styles
   Recreates the esppainting.com design system: Patua One headings,
   Open Sans body, slate (#425469) + navy (#112e5b) palette.
   Self-hosted fonts, first-party only. No third-party CSS.
   ===================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Patua One';
  src: url('/assets/fonts/patua-one.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('/assets/fonts/open-sans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #112e5b;
  --navy-dark: #0d2340;
  --slate: #425469;
  --slate-dark: #394a5c;
  --text: #626262;
  --heading: #425469;
  --muted: #7a8794;
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --bg-gray: #f8f8f8;
  --line: #e4e7ea;
  --white: #ffffff;
  --gold: #f0b323;
  --shadow: 0 6px 24px rgba(17, 46, 91, .10);
  --shadow-lg: 0 18px 50px rgba(17, 46, 91, .18);
  --wrap: 1160px;
  --radius: 6px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: 'Patua One', Georgia, serif;
  font-weight: 400;
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: 'Patua One', serif;
  font-size: 1.05rem;
  line-height: 1.2;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--bg-soft); color: var(--navy); }
.btn-lg { font-size: 1.2rem; padding: 18px 38px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 12px 24px; max-width: 1240px; margin: 0 auto;
}
.brand { flex: 0 0 auto; }
.brand img { width: 150px; height: auto; display: block; }
.header-right { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.nav-cta-mobile, .nav-phone-mobile { display: none; }
.header-phone {
  font-family: 'Patua One', serif; color: var(--navy); font-size: 1.15rem; white-space: nowrap;
}
.header-phone:hover { text-decoration: none; color: var(--slate); }

/* Primary nav */
.primary-nav { }
.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block; padding: 12px 12px; color: var(--slate); font-weight: 600; font-size: .95rem; border-radius: 5px; white-space: nowrap;
}
.nav-list > li > a:hover, .nav-list > li.has-children:hover > a { background: var(--bg-soft); text-decoration: none; color: var(--navy); }
.nav-list a[aria-current="page"] { color: var(--navy); }
.has-children > a::after { content: "▾"; font-size: .7em; margin-left: 6px; color: var(--muted); }

/* Dropdowns */
.submenu {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
  min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s; z-index: 120;
}
.has-children:hover > .submenu,
.has-children:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 9px 14px; color: var(--slate); font-size: .95rem; border-radius: 5px; }
.submenu a:hover { background: var(--bg-soft); color: var(--navy); text-decoration: none; }

/* Mobile toggle */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  color: var(--slate); flex-direction: column; gap: 5px;
}
.nav-toggle span { width: 26px; height: 3px; background: currentColor; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  background: linear-gradient(rgba(17,32,52,.42), rgba(17,32,52,.5)), var(--hero-img, none);
  background-size: cover; background-position: center;
  min-height: 520px; display: flex; align-items: center; justify-content: center;
}
.hero-inner { max-width: 860px; padding: 80px 24px; }
.hero h1 { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.35); margin-bottom: .4em; }
.hero p.lead { color: #fff; font-size: clamp(1.05rem, 2.2vw, 1.4rem); text-shadow: 0 1px 10px rgba(0,0,0,.4); margin-bottom: 1.6em; }
.hero-badge { position: absolute; right: 4%; bottom: 6%; width: 118px; opacity: .95; }

/* Page hero (interior pages) */
.page-hero {
  background: var(--slate); color: #fff; text-align: center; padding: 66px 24px;
}
.page-hero.with-img {
  background: linear-gradient(rgba(45,58,74,.72), rgba(45,58,74,.82)), var(--hero-img, none);
  background-size: cover; background-position: center;
}
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: rgba(255,255,255,.92); font-size: 1.15rem; max-width: 720px; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,.9); }

/* ---------- Section bands ---------- */
.band-slate {
  background: var(--slate); color: #fff; text-align: center; padding: 34px 24px;
}
.band-slate h2 { color: #fff; margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); }

.section { padding: 68px 0; }
.section-soft { background: var(--bg-soft); }
.section-gray { background: var(--bg-gray); }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-tight { padding: 48px 0; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--slate); }

/* Prose / content */
.prose { max-width: 820px; }
.prose.center { margin: 0 auto; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { color: var(--slate); margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--navy); text-decoration: underline; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; }

/* Two-column intro */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.cols-2 .colimg img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Service / feature cards ---------- */
.card-grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.photo-card {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 260px;
  display: flex; align-items: center; justify-content: center; color: #fff; text-align: center;
  box-shadow: var(--shadow); background-size: cover; background-position: center;
}
.photo-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(17,32,52,.35), rgba(17,32,52,.55)); transition: background .2s;
}
.photo-card:hover::before { background: linear-gradient(rgba(17,32,52,.5), rgba(17,32,52,.68)); }
.photo-card span, .photo-card h3 {
  position: relative; z-index: 1; font-family: 'Patua One', serif; color: #fff;
  font-size: 1.7rem; text-shadow: 0 2px 12px rgba(0,0,0,.4); margin: 0;
}
a.photo-card:hover { text-decoration: none; }

.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow); text-align: center;
}
.feature-card .icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--slate); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.feature-card .icon svg { width: 30px; height: 30px; }
.feature-card h3 { color: var(--slate); text-transform: uppercase; letter-spacing: .3px; font-size: 1.15rem; }

/* ---------- Process steps ---------- */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.process-step { text-align: center; }
.process-step .icon {
  width: 78px; height: 78px; border-radius: 50%; background: var(--slate); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.process-step .icon svg { width: 36px; height: 36px; }
.process-step h3 { text-transform: uppercase; color: var(--slate); font-size: 1.15rem; }

/* ---------- Stats band (diagonal) ---------- */
.stats {
  background: var(--navy) var(--stats-img, none); background-size: cover; background-position: center;
  position: relative; color: #fff; padding: 74px 0;
}
.stats::before { content: ""; position: absolute; inset: 0; background: rgba(17,46,91,.9); }
.stats .wrap { position: relative; z-index: 1; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.stat h3 { color: #fff; text-transform: uppercase; font-size: 1.1rem; margin-bottom: 4px; }
.stat .num { font-family: 'Patua One', serif; font-size: 3.2rem; line-height: 1; color: var(--white); display: block; margin: 6px 0 14px; }
.stat p { color: rgba(255,255,255,.85); font-size: .96rem; }

/* ---------- Reviews (static snapshot) ---------- */
.reviews-head { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 34px; }
.reviews-head .score { font-family: 'Patua One', serif; font-size: 2.4rem; color: var(--slate); }
.reviews-head .stars { color: var(--gold); font-size: 1.5rem; letter-spacing: 2px; }
.reviews-head .meta { color: var(--muted); font-size: .95rem; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.review-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 10px; }
.review-card .rtext { font-size: .96rem; color: #4c5560; margin-bottom: 14px; }
.review-card .rname { font-weight: 700; color: var(--slate); font-family: 'Open Sans', sans-serif; }
.review-card .rdate { font-size: .82rem; color: var(--muted); }
.review-card .gbadge { font-size: .78rem; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 5px; }

/* ---------- Credentials strip ---------- */
.cred-strip { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: center; }
.cred-strip img { max-height: 78px; width: auto; opacity: .9; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--slate); color: #fff; text-align: center; padding: 56px 24px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 640px; margin: 0 auto 22px; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 34px; box-shadow: var(--shadow); max-width: 720px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--slate); margin-bottom: 6px; font-size: .95rem; }
.field .req { color: #c0392b; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #cdd3d9; border-radius: var(--radius);
  font: inherit; color: var(--text); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(17,46,91,.12); }
.field textarea { min-height: 130px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #e8f5ec; color: #1d6b39; border: 1px solid #b7dfc4; }
.form-status.err { background: #fbeaea; color: #a02222; border: 1px solid #efc2c2; }

/* ---------- Testimonial list ---------- */
.tst-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.tst { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--slate); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.tst .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; }
.tst .rname { font-weight: 700; color: var(--slate); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #c9d3e0; padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { color: #fff; font-family: 'Patua One', serif; font-size: 1.1rem; margin-bottom: 14px; }
.site-footer a { color: #c9d3e0; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-logo { width: 170px; margin-bottom: 16px; background: #fff; padding: 10px 14px; border-radius: 6px; }
.footer-cta .btn { margin-top: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: #9fb0c4; font-size: .85rem; }
.footer-bottom a { color: #9fb0c4; }
.lic-line { color: #9fb0c4; font-size: .88rem; margin-top: 10px; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.cta-inline { margin: 28px 0; }
.cta-inline .btn { margin: 6px 8px 6px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; order: 3; }
  .header-inner { padding: 12px 18px; }
  .header-right { display: none; } /* CTA + phone move into the drawer */
  .nav-list .nav-cta-mobile { display: block; margin-top: 14px; }
  .nav-list .nav-cta-mobile a { display: block; text-align: center; }
  .nav-list .nav-phone-mobile { display: block; margin-top: 10px; text-align: center; }
  .nav-list .nav-phone-mobile a { font-family: 'Patua One', serif; color: var(--navy); font-size: 1.15rem; }
  .primary-nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw); background: #fff;
    transform: translateX(100%); transition: transform .24s ease; padding: 78px 16px 24px;
    overflow-y: auto; box-shadow: var(--shadow-lg); z-index: 130;
  }
  body.nav-open .primary-nav { transform: translateX(0); }
  body.nav-open .nav-overlay { opacity: 1; visibility: visible; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(10,20,35,.5); opacity: 0; visibility: hidden; transition: .24s; z-index: 125; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li > a { padding: 13px 12px; border-radius: 6px; }
  .has-children > a::after { float: right; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 6px 12px;
    padding: 0; display: none;
  }
  .has-children.open > .submenu { display: block; }
  .process-grid, .stats-grid, .review-grid, .grid-3 { grid-template-columns: 1fr; }
  .cols-2, .form-row, .tst-grid { grid-template-columns: 1fr; gap: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .header-phone { display: none; }
  .hero { min-height: 440px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
