/* =========================================================
   Leafly Exterior Restoration: landing page
   Brand palette taken from leaflyexteriorrestorations.ca
   ========================================================= */
:root {
  --forest: #0F2922;      /* deep brand green: headings, dark sections */
  --forest-2: #163A30;
  --leaf: #2A7F62;        /* primary action green */
  --leaf-dark: #22694F;
  --mint: #A8D5BA;
  --cream: #E9F5DB;       /* light tint background */
  --lime: #D4E09B;        /* bright accent on dark */
  --lime-dark: #C3D27F;
  --sage: #4F5E5A;        /* body text muted (darkened from #63746F for AA contrast) */
  --mist: #F3F4F4;
  --line: #C3CAC8;
  --white: #FFFFFF;
  --error: #B42318;

  --font-head: "Barlow", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 41, 34, .06), 0 8px 24px rgba(15, 41, 34, .08);
  --shadow-lg: 0 2px 4px rgba(15, 41, 34, .06), 0 18px 40px rgba(15, 41, 34, .14);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--forest);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--leaf-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; color: var(--forest); text-wrap: balance; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .insured :focus-visible, .site-footer :focus-visible, .mobile-bar :focus-visible { outline-color: var(--lime); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--forest); color: var(--white); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.container-narrow { width: min(820px, 100% - 40px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em;
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: .98rem; gap: .28em; }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1.15rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--leaf); color: var(--white); box-shadow: 0 6px 16px rgba(42, 127, 98, .28); }
.btn-primary:hover { background: var(--leaf-dark); color: var(--white); box-shadow: 0 8px 22px rgba(42, 127, 98, .36); }

.btn-lime { background: var(--lime); color: var(--forest); }
.btn-lime:hover { background: var(--lime-dark); color: var(--forest); }

.btn-ghost { background: rgba(255, 255, 255, .08); color: var(--white); border-color: rgba(255, 255, 255, .7); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: var(--white); color: var(--forest); }

.btn-ghost-dark { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .6); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgba(15, 41, 34, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); margin-top: 4px; }

.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-weight: 500; color: var(--forest); text-decoration: none; border-radius: 999px;
  transition: background-color .2s;
}
.main-nav a:hover { background: var(--cream); color: var(--forest); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; color: var(--forest); text-decoration: none; white-space: nowrap;
}
.header-phone svg { color: var(--leaf); }
.header-phone:hover { color: var(--leaf); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--white);
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  padding: 96px 0 72px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(15, 41, 34, .94) 0%, rgba(15, 41, 34, .82) 42%, rgba(15, 41, 34, .35) 75%, rgba(15, 41, 34, .2) 100%),
    url("images/hero-home.webp") center 55% / cover no-repeat;
}
.hero-inner { max-width: 1160px; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.02;
  max-width: 17ch;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--lime); }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 34rem; color: rgba(255, 255, 255, .9); margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.trust-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-row li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  font-size: .95rem; color: rgba(255, 255, 255, .92);
}
.trust-row strong { color: var(--white); font-weight: 700; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 16px; height: 16px; fill: var(--lime); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head); font-weight: 700; font-size: .9rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--leaf); margin-bottom: 12px;
}
.eyebrow-light { color: var(--lime); }

/* ---------- Area strip ---------- */
.area-strip { background: var(--forest); color: var(--white); }
.area-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; padding: 18px 0; }
.area-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--mint); }
.area-strip ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.area-strip li { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.area-strip li + li::before { content: "•"; color: var(--leaf); margin-right: 28px; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--cream); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-lead { color: var(--sage); font-size: 1.1rem; }
.center-cta { text-align: center; margin-top: 48px; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  position: relative;
  background: var(--white);
  border: 1px solid #DDE3E1;
  border-radius: var(--radius);
  padding: 30px 28px 26px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--mint); }
.service-card img {
  width: 72px; height: 72px; object-fit: contain;
  padding: 10px; border-radius: 16px; background: var(--white);
  box-shadow: inset 0 0 0 1px #E4EBE8;
  margin-bottom: 18px;
}
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--sage); margin: 0; }
.service-card-seasonal { background: linear-gradient(160deg, #FFFFFF 40%, var(--cream) 100%); }
.badge {
  position: absolute; top: 20px; right: 20px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--lime); color: var(--forest); padding: 4px 10px; border-radius: 999px;
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; position: relative; }
.step {
  position: relative; text-align: center;
  background: var(--white); border-radius: var(--radius);
  padding: 40px 28px 30px; box-shadow: var(--shadow);
}
.step-icon {
  width: 112px; height: 112px; margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--white);
  box-shadow: 0 0 0 8px var(--cream), 0 0 0 9px var(--mint);
}
.step-icon img { width: 88px; height: 88px; object-fit: contain; border-radius: 50%; }
.step-num {
  position: absolute; top: 18px; left: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.15rem;
  background: var(--forest); color: var(--lime);
}
.step p { color: var(--sage); margin: 0; }

/* ---------- Insured band ---------- */
.insured { background: var(--forest); color: rgba(255, 255, 255, .88); padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.insured::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 213, 186, .14), transparent 70%);
  pointer-events: none;
}
.insured-inner { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.insured-badge { width: 200px; height: 200px; border-radius: 50%; background: var(--white); padding: 6px; box-shadow: 0 0 0 6px rgba(212, 224, 155, .25); }
.insured h2 { color: var(--white); }
.insured p { max-width: 40rem; font-size: 1.08rem; }
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; margin-top: 20px; }
.check-list li { position: relative; padding-left: 32px; color: var(--white); font-weight: 500; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230F2922' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-list details {
  background: var(--white); border: 1px solid #DDE3E1; border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.faq-list details[open] { border-color: var(--mint); box-shadow: var(--shadow); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 16px 22px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%232A7F62' stroke-width='2.6' stroke-linecap='round' d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .25s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 22px 20px; margin: 0; color: var(--sage); }

/* ---------- Quote ---------- */
.quote-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.quote-copy p { color: var(--sage); font-size: 1.08rem; max-width: 30rem; }
.contact-list { display: grid; gap: 14px; margin-top: 28px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; word-break: break-word; }
.contact-list svg { flex: none; color: var(--leaf); }
.contact-list a { color: var(--forest); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.contact-list a:hover { color: var(--leaf); text-decoration: underline; }

.quote-form { background: var(--white); border-radius: 20px; padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-lg); }
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.req { color: var(--leaf); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--forest);
  background: var(--mist); border: 1.5px solid transparent; border-radius: var(--radius-sm);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--white); border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(42, 127, 98, .16);
}
.field [aria-invalid="true"] { border-color: var(--error); background: #FEF3F2; }
.error { color: var(--error); font-size: .9rem; font-weight: 500; margin: 6px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border: 1.5px solid var(--line); border-radius: 999px;
  font-size: .95rem; font-weight: 500;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover span { border-color: var(--leaf); }
.chip input:checked + span { background: var(--leaf); border-color: var(--leaf); color: var(--white); }
.chip input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--leaf); outline-offset: 2px; }

.form-note { text-align: center; color: var(--sage); font-size: .95rem; margin: 14px 0 0; }
.form-status { margin-top: 14px; }
.form-status:empty { display: none; }
.form-status.is-success, .form-status.is-error { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.form-status.is-success { background: var(--cream); color: var(--forest); border: 1px solid var(--mint); }
.form-status.is-error { background: #FEF3F2; color: var(--error); border: 1px solid #FECDCA; }

/* ---------- Footer ---------- */
.site-footer { background: #0B1F1A; color: rgba(255, 255, 255, .78); padding: 56px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 32px; align-items: start; padding-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 72px; height: 72px; filter: brightness(0) invert(1); }
.footer-name { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--white); margin: 0; }
.footer-tag { margin: 2px 0 0; color: var(--lime); font-weight: 500; }
.footer-links { display: grid; gap: 4px; }
.footer-links a, .footer-contact a { color: rgba(255, 255, 255, .85); text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.footer-links a:hover, .footer-contact a:hover { color: var(--lime); text-decoration: underline; }
.footer-contact { display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.footer-contact span { margin-top: 8px; color: rgba(255, 255, 255, .7); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 20px 0; font-size: .9rem; color: rgba(255, 255, 255, .7); }
.footer-bottom p { margin: 0; }

/* ---------- Mobile action bar ---------- */
.mobile-bar { display: none; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .insured-inner { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .insured-badge { margin-inline: auto; width: 160px; height: 160px; }
  .insured p { margin-inline: auto; }
  .check-list { text-align: left; max-width: 520px; margin-inline: auto; }
  .quote-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .header-phone { display: none; }
  .brand img { width: 46px; height: 46px; }
  .brand-name { font-size: 1.3rem; }
  .brand-sub { font-size: .64rem; }
  .hero { padding: 64px 0 56px; min-height: auto; }
  .hero-bg {
    background:
      linear-gradient(180deg, rgba(15, 41, 34, .82) 0%, rgba(15, 41, 34, .9) 60%, rgba(15, 41, 34, .95) 100%),
      url("images/hero-home.webp") center / cover no-repeat;
  }
  .hero-ctas .btn { flex: 1 1 100%; }
  .trust-row li { font-size: .88rem; padding: 8px 14px; }
  .services-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .check-list { grid-template-columns: 1fr; }
  .area-strip li + li::before { content: none; }
  .area-strip ul { gap: 6px 22px; }
  .header-actions .btn-sm { padding: 8px 16px; white-space: nowrap; }
  .header-actions .btn-sm .long { display: none; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(15, 41, 34, .97); backdrop-filter: blur(8px);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .18);
    transform: translateY(110%); transition: transform .3s var(--ease);
  }
  .mobile-bar.is-visible { transform: none; }
  .mobile-bar .btn { min-height: 48px; }
  body { padding-bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .service-card:hover { transform: none; }
}
