/* =========================================================================
   Homepage template — design tokens + base styles
   Swap every value in :root for the new brand's real colors/fonts.
   Structure and section-ordering lessons are documented in README.md —
   read it before deleting anything that looks redundant.
   ========================================================================= */

:root {
  /* -- JL Construction real brand colors, pulled from their own banner/logo -- */
  --brand-primary: #c81e1e;
  --brand-primary-dark: #941414;
  --brand-accent: #1f4d36;
  --brand-accent-dark: #123023;
  --ink: #14151a;
  --ink-soft: #4a4d55;
  --muted: #8a8f9a;
  --bg: #f6f7fa;
  --surface: #ffffff;
  --surface-alt: #eef3fb;
  --border: #dde2ea;
  --error: #b3261e;
  --success: #1f8a4c;

  /* -- placeholder type, swap for the real brand fonts -- */
  --font-display: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --header-h: 76px;
  --topbar-h: 38px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 26px rgba(20, 21, 26, 0.08), 0 2px 6px rgba(20, 21, 26, 0.05);
  --shadow-card-hover: 0 16px 34px rgba(20, 21, 26, 0.12), 0 4px 10px rgba(20, 21, 26, 0.07);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink-soft); font-family: var(--font-body); font-size: 16px; line-height: 1.65; }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
/* Do not delete these two rules — see README "hard-won lessons". */
h1 { font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem); }
h2 { font-size: clamp(1.7rem, 1.35rem + 1.4vw, 2.3rem); }

p { margin: 0; }
input, select, textarea { font: inherit; color: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--radius-sm); z-index: 1000;
  transition: top 200ms var(--ease); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 24px; }
.container-narrow { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 88px; }
.section-alt { background: var(--surface-alt); }
.section-gradient {
  background: linear-gradient(120deg, rgba(47,111,237,0.08), rgba(126,217,87,0.12));
  border-top: 1px solid rgba(47,111,237,0.14);
  border-bottom: 1px solid rgba(126,217,87,0.22);
}

.eyebrow { display: inline-block; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-accent-dark); margin-bottom: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 13px 28px; border-radius: 999px;
  font-weight: 700; font-family: var(--font-display); font-size: 1rem;
  border: 2px solid transparent;
  transition: background-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn-outline { background: transparent; border-color: var(--brand-accent); color: var(--ink); }
.btn-outline:hover { background: var(--brand-accent); color: #fff; transform: translateY(-2px); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---- Header / nav ---------------------------------------------------- */
.topbar { background: var(--ink); color: #fff; display: flex; justify-content: center; align-items: center; gap: 26px; min-height: var(--topbar-h); font-size: 0.8rem; font-weight: 700; }
.topbar a:hover { color: var(--brand-accent); }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid transparent; transition: box-shadow 200ms var(--ease), border-color 200ms var(--ease); }
.site-header.is-scrolled { box-shadow: var(--shadow-card); border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; width: 100%; min-height: var(--header-h); }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink); }

.site-nav { display: none; align-items: center; gap: 28px; margin-left: auto; }
.site-nav a { font-weight: 700; font-size: 1.05rem; color: var(--ink); padding: 6px 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--brand-primary-dark); border-bottom-color: var(--brand-primary); }
.header-cta { display: none; }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-sm); margin-left: auto; }
.nav-toggle:hover { background: var(--surface-alt); }
.nav-toggle .icon { width: 24px; height: 24px; color: var(--ink); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav { display: none; background: var(--surface); border-top: 1px solid var(--border); padding: 20px 24px; }
.mobile-nav.is-open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.mobile-nav a { display: block; padding: 12px 8px; font-weight: 700; font-size: 1.05rem; color: var(--ink); border-radius: var(--radius-sm); }
.mobile-nav a:hover { background: var(--surface-alt); }
body.nav-open { overflow: hidden; }

/* ---- Hero -------------------------------------------------------------- */
.hero { position: relative; padding-block: 64px 84px; background-size: cover; background-position: center; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(15,16,20,0.88) 0%, rgba(15,16,20,0.64) 42%, rgba(15,16,20,0.22) 68%, rgba(15,16,20,0.06) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
.hero-copy .eyebrow, .hero-copy h1, .hero-copy p.lead { color: #fff; }
.hero-copy h1 { font-size: clamp(2.3rem, 1.7rem + 2.8vw, 3.8rem); margin: 8px 0 22px; }
.hero-copy p.lead { font-size: 1.2rem; max-width: 52ch; margin-bottom: 30px; color: rgba(255,255,255,0.92); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-buttons .btn { min-height: 54px; padding: 15px 30px; font-size: 1.05rem; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.75); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.16); color: #fff; }
.hero-media { position: relative; width: fit-content; max-width: 100%; margin-inline: auto; }
.hero-badge { position: absolute; bottom: -18px; left: 20px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 0.95rem; padding: 16px 22px; border-radius: var(--radius-sm); box-shadow: var(--shadow-card-hover); max-width: 240px; z-index: 2; }

.hero-location { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.85rem; color: #fff; margin-bottom: 14px; backdrop-filter: blur(3px); }
.hero-location svg { width: 16px; height: 16px; color: #fff; flex-shrink: 0; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-badge-chip { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 0.85rem; color: var(--ink); box-shadow: var(--shadow-card); }

.hero-perks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.hero-perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; font-size: 0.98rem; }
.hero-perks li::before { content: "\2713"; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-accent); color: #fff; font-size: 0.72rem; font-weight: 700; flex-shrink: 0; }

/* ---- Hero quote form ----------------------------------------------------
   Posts to Web3Forms (free, no backend) — see README "Quote form email
   delivery" for how to get an access key and where it goes below. */
.quote-form { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card-hover); padding: 32px; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 440px; margin-inline: auto; }
.quote-form h2 { font-size: 1.4rem; }
.quote-form-sub { font-size: 0.92rem; color: var(--ink-soft); margin-top: -6px; }
.quote-form input, .quote-form select, .quote-form textarea { width: 100%; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.quote-form textarea { resize: vertical; min-height: 64px; }
.quote-form .btn { margin-top: 4px; }
.quote-form-note { font-size: 0.8rem; color: var(--muted); text-align: center; }
.quote-form-note.is-error { color: var(--error); }
.quote-form-note.is-success { color: var(--success); font-weight: 700; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---- Photos: natural aspect ratio, never cropped ----------------------- */
.photo-fit { display: block; width: auto; height: auto; max-width: 100%; max-height: 420px; border-radius: var(--radius); box-shadow: var(--shadow-card); margin-inline: auto; }
.photo-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; max-width: 480px; aspect-ratio: 4/3; margin-inline: auto;
  background: var(--surface-alt); border: 2px dashed var(--border); border-radius: var(--radius);
  color: var(--muted); font-size: 0.85rem; padding: 16px;
}

/* ---- Recent work gallery ------------------------------------------------ */
.work-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.work-item { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4/3; transition: box-shadow 0.25s var(--ease); }
.work-item:hover { box-shadow: var(--shadow-card-hover); }
.work-item img { width: 100%; height: 100%; object-fit: cover; }
.work-item figcaption { position: absolute; inset: auto 0 0 0; padding: 28px 16px 14px; background: linear-gradient(0deg, rgba(20,21,26,0.78) 0%, rgba(20,21,26,0) 100%); color: #fff; font-weight: 600; font-size: 0.92rem; }

/* ---- Two-column feature blocks (photo + text) --------------------------- */
.feature-grid { display: grid; gap: 44px; grid-template-columns: 1fr; align-items: center; }
.feature-photo { position: relative; width: fit-content; max-width: 100%; margin-inline: auto; }
.feature-photo::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  background: var(--brand-primary); opacity: 0.10; border-radius: var(--radius); z-index: 0;
}
.feature-photo img, .feature-photo .photo-placeholder { position: relative; z-index: 1; }
.feature-photo .hero-badge { z-index: 2; }
.feature-photo.flip::before { inset: 22px 22px -22px -22px; }

/* ---- Reviews ------------------------------------------------------------ */
.review-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.review-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.review-card .stars { color: #ffc107; letter-spacing: 2px; font-size: 1rem; }
.review-card p { font-size: 0.95rem; }
.review-card .review-author { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.review-card .review-service { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.google-icon { width: 14px; height: 14px; flex-shrink: 0; }

/* ---- How it works (3 steps) --------------------------------------------- */
.steps-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.step-item { text-align: center; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-primary); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 18px; }
.step-item h3 { font-size: 1.15rem; margin-bottom: 10px; }
.step-item p { font-size: 0.94rem; max-width: 32ch; margin-inline: auto; }

/* ---- Trust / verified checklist with icon badges ------------------------ */
.checklist { display: flex; flex-direction: column; gap: 20px; }
.checklist li { display: flex; gap: 18px; align-items: flex-start; }
.checklist h3 { font-size: 1.1rem; margin-bottom: 4px; }
.checklist p { font-size: 0.96rem; }
.badge-dot {
  width: 40px; height: 40px; border-radius: 50%; background: var(--brand-primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.badge-dot svg { width: 20px; height: 20px; }

/* ---- Pricing cards -------------------------------------------------------- */
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.pricing-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 30px; display: flex; flex-direction: column; transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); }
.pricing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-hover); }
.pricing-card.is-popular { border-color: var(--brand-primary); }
.pricing-badge { position: absolute; top: -14px; right: 24px; background: var(--brand-primary); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; padding: 6px 14px; border-radius: 999px; }
.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.pricing-price .amount { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--ink); }
.pricing-price .from { font-size: 0.9rem; color: var(--muted); }
.pricing-card .pricing-desc { font-size: 0.95rem; margin-bottom: 18px; }
.pricing-includes-label { font-size: 0.88rem; font-weight: 700; color: var(--brand-primary-dark); margin-bottom: 10px; }
.pricing-checklist { display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; }
.pricing-checklist li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.92rem; }
.pricing-checklist .check-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.7rem; font-weight: 700; margin-top: 2px; }
.pricing-card .btn { margin-top: auto; }
.pricing-details-link { display: block; text-align: center; margin-top: 12px; font-size: 0.88rem; font-weight: 700; color: var(--brand-primary-dark); }

/* ---- Service area (map or list) ------------------------------------------ */
.area-chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.area-chip { background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.map-frame { position: relative; width: 100%; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); background: var(--surface-alt); }
.map-frame img, .map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }

/* ---- Stats ---------------------------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 30px 20px; text-align: center; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-alt); color: var(--brand-primary-dark); margin-bottom: 14px; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-number { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--ink); }
.stat-label { font-size: 0.9rem; color: var(--ink-soft); margin-top: 4px; }

/* ---- Closing CTA band + footer -------------------------------------------- */
.cta-band { background: var(--ink); padding-block: 68px; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: #c7cacc; margin-bottom: 28px; font-size: 1.05rem; }
.cta-band-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

.site-footer { background: var(--ink); color: #c7cacc; padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; padding-bottom: 44px; }
.footer-col h3 { color: #fff; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col p, .footer-col li { font-size: 0.92rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.16); padding-block: 20px; font-size: 0.8rem; }
.footer-bottom-inner { display: flex; flex-direction: column; gap: 8px; }

/* ---- Scroll reveal (progressive enhancement, content visible without JS) - */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn, .site-header, .skip-link { transition: none; }
}

section[id] { scroll-margin-top: calc(var(--header-h) + var(--topbar-h) + 16px); }

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .site-nav { display: flex; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .hero-inner { grid-template-columns: 0.92fr 1.08fr; gap: 64px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom-inner { flex-direction: row; justify-content: space-between; }
  .review-grid { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { gap: 80px; }
  .feature-grid.feature-grid-emphasis { grid-template-columns: 0.85fr 1.15fr; gap: 100px; }
  .section { padding-block: 108px; }
  .photo-fit { max-height: 480px; }
  .hero-media .photo-fit, .hero-media .photo-placeholder { max-height: 520px; }
  .quote-form { padding: 40px; }
}
@media (max-width: 959.98px) {
  .site-nav { display: none; }
}
