/* =========================================================
   The Roof Pack Inc. — Design System
   Tampa Bay roofing | Rebuilt for conversion + SEO/AEO
   ========================================================= */

:root {
  /* Brand */
  --ink:        #0B1A26;
  --navy:       #0E2A3F;
  --navy-700:   #14334b;
  --navy-600:   #1b4a6b;
  --slate:      #3E5366;
  --muted:      #5E7180;
  --line:       #E4E8ED;
  --line-soft:  #EEF1F4;
  --bg:         #FAF9F6;
  --bg-alt:     #EFF3F7;
  --white:      #ffffff;

  --accent:     #F97316;   /* Florida-sun orange — CTAs */
  --accent-600: #E8650C;
  --accent-700: #B8500A;   /* AA-contrast orange for text/links on white */
  --accent-050: #FFF3E9;
  --focus:      #1C6FD6;   /* keyboard focus ring */
  --gold:       #F5B544;
  --green:      #1F9D55;
  --green-050:  #E9F8EF;
  --red:        #D64541;
  --red-050:    #FCEDEC;
  --blue-050:   #EAF2FB;
  --blue:       #1C6FD6;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(11,26,38,.06), 0 1px 3px rgba(11,26,38,.05);
  --shadow:    0 6px 20px rgba(11,26,38,.08), 0 2px 6px rgba(11,26,38,.05);
  --shadow-lg: 0 24px 60px rgba(11,26,38,.16), 0 8px 24px rgba(11,26,38,.10);

  --maxw: 1180px;
  --gut: clamp(18px, 4vw, 40px);

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 92px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent-700); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Keyboard focus visibility (WCAG 2.4.7) */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.hero :focus-visible, .pagehead :focus-visible, .section--navy :focus-visible, .footer :focus-visible, .cta-band :focus-visible, .header :focus-visible { outline-color: #fff; }
/* Skip link */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-family: var(--font-display); font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 12px; text-decoration: none; }
ul { padding-left: 1.1em; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.02em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p { color: var(--slate); }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.section--alt { background: var(--bg-alt); }
.section--navy { background: linear-gradient(165deg, var(--navy) 0%, var(--ink) 100%); color: #DCE6EE; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #AFC2D0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-600);
}
.eyebrow::before { content:""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.section--navy .eyebrow { color: var(--gold); }
.section--navy .eyebrow::before { background: var(--gold); }

.section-head { max-width: 720px; margin-bottom: clamp(34px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 14px; font-size: 1.08rem; }

.lead { font-size: 1.15rem; color: var(--slate); }
.muted { color: var(--muted); }
.text-center { text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(249,115,22,.34); }
.btn--primary:hover { background: var(--accent-600); box-shadow: 0 14px 30px rgba(249,115,22,.42); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #16303f; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #f3f5f7; }
.btn--outline-light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.32); }
.btn--outline-light:hover { background: rgba(255,255,255,.14); }
.btn--lg { padding: 18px 32px; font-size: 1.08rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---- Header / Nav ---- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,249,246,.82); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s, background .25s;
}
.header.is-stuck { box-shadow: var(--shadow-sm); border-color: var(--line-soft); background: rgba(250,249,246,.94); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; color: var(--ink); letter-spacing: -.02em; flex: none; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand span { white-space: nowrap; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.nav__links { display: flex; align-items: center; gap: 1px; list-style: none; padding: 0; margin: 0; }
.nav__links a { color: var(--slate); font-weight: 500; font-size: .92rem; padding: 8px 9px; border-radius: 10px; transition: color .15s, background .15s; white-space: nowrap; }
.nav__links a:hover, .nav__links a.active { color: var(--ink); background: rgba(14,42,63,.06); text-decoration: none; }
.nav__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.nav__actions .btn { padding: 11px 17px; font-size: .92rem; }
.nav__phone { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: .94rem; white-space: nowrap; flex: none; }
.nav__phone:hover { color: var(--accent-600); text-decoration: none; }
.nav__phone svg { color: var(--accent); }
.nav__toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { content:""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .25s; }
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }
.nav__toggle.is-open span { background: transparent; }
.nav__toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.nav__toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* ---- Hero ---- */
.hero { position: relative; background:
  linear-gradient(105deg, rgba(11,26,38,.97) 0%, rgba(11,26,38,.86) 42%, rgba(14,42,63,.62) 100%),
  url("../images/hero.jpg") center / cover no-repeat;
  background-color: #0B1A26; color: #fff; overflow: hidden; }
.hero::after { content:""; position: absolute; inset: 0; background:
  radial-gradient(900px 420px at 82% -8%, rgba(249,115,22,.22), transparent 60%),
  radial-gradient(680px 380px at 8% 108%, rgba(28,111,214,.16), transparent 60%); pointer-events: none; }
.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: clamp(48px, 7vw, 92px) 0 clamp(56px, 7vw, 96px); }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--gold); }
.hero__sub { margin-top: 20px; font-size: 1.18rem; color: #C2D2DE; max-width: 540px; }
.hero__cta { margin-top: 30px; }
.hero__badges { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.hero__badge { display: inline-flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 500; color: #D7E2EA; }
.hero__badge svg { color: var(--gold); flex: none; }
.hero__pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; font-size: .9rem; font-weight: 600; color: #fff; margin-bottom: 22px; }
.hero__pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(31,157,85,.25); }

/* Lead form card */
.lead-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); }
.lead-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.lead-card h3 { font-size: 1.3rem; }
.lead-card__sub { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--slate); margin-bottom: 6px; font-family: var(--font-display); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; font-family: var(--font-body); font-size: .98rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,.16); }
.form-note { font-size: .8rem; color: var(--muted); margin-top: 10px; text-align: center; }
.form-success { display: none; text-align: center; padding: 20px 6px; }
.form-success.show { display: block; }
.form-success .check { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-050); color: var(--green); display: grid; place-items: center; }

/* ---- Trust bar ---- */
.trustbar { background: var(--ink); color: #fff; }
.trustbar__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 28px; padding: 22px 0; }
.trustbar__item { display: flex; align-items: center; gap: 11px; font-size: .96rem; font-weight: 500; color: #C7D3DC; }
.trustbar__item strong { color: #fff; font-family: var(--font-display); }
.trustbar__item svg { color: var(--gold); flex: none; }

/* ---- Cards / grids ---- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }

.service-card { display: flex; flex-direction: column; }
.service-card__icon { width: 54px; height: 54px; border-radius: 14px; background: var(--accent-050); color: var(--accent-600); display: grid; place-items: center; margin-bottom: 18px; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { font-size: .98rem; flex: 1; }
.service-card .link { margin-top: 16px; font-family: var(--font-display); font-weight: 600; color: var(--accent-700); display: inline-flex; align-items: center; gap: 6px; font-size: .96rem; }
.service-card .link svg { transition: transform .15s; }
.service-card:hover .link svg { transform: translateX(4px); }

.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature__icon { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--blue-050); color: var(--blue); display: grid; place-items: center; }
.feature h3 { font-size: 1.12rem; margin-bottom: 5px; }
.feature p { font-size: .97rem; }

/* ---- Process steps ---- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; }
.step__num { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; margin-bottom: 14px; font-size: 1.05rem; }
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { font-size: .94rem; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 14px; }
.stat__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 4vw, 2.9rem); color: #fff; letter-spacing: -.02em; line-height: 1; }
.section--navy .stat__num { background: linear-gradient(180deg,#fff,#cfe0ec); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { margin-top: 8px; font-size: .95rem; color: #AFC2D0; }

/* ---- Reviews ---- */
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.review-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; }
.review-card p { color: var(--ink); font-size: 1.02rem; }
.review-card__person { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.review-card__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.review-card__name { font-family: var(--font-display); font-weight: 600; font-size: .98rem; color: var(--ink); }
.review-card__meta { font-size: .85rem; color: var(--muted); }
.review-card__g { margin-left: auto; }

/* ---- Areas ---- */
.area-list { display: flex; flex-wrap: wrap; gap: 10px; }
.area-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: .96rem; color: var(--ink); transition: .15s; }
.area-chip:hover { border-color: var(--accent); color: var(--accent-600); text-decoration: none; }
.area-chip svg { color: var(--accent); }

/* ---- FAQ ---- */
.faq { max-width: 820px; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.faq__q::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--accent); font-weight: 400; transition: transform .25s; }
.faq__item.open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { padding-bottom: 22px; font-size: 1.02rem; }

/* ---- CTA band ---- */
.cta-band { position: relative; background: linear-gradient(120deg, #E8650C 0%, #d24f08 100%); color: #fff; border-radius: var(--radius-xl); padding: clamp(36px, 6vw, 64px); overflow: hidden; }
.cta-band::after { content:""; position: absolute; right: -40px; bottom: -60px; width: 320px; height: 320px; background: rgba(255,255,255,.10); border-radius: 50%; }
.cta-band__inner { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; max-width: 620px; }
.cta-band p { color: rgba(255,255,255,.92); margin-top: 10px; max-width: 560px; }

/* ---- Page hero (interior) ---- */
.pagehead { background:
  linear-gradient(165deg, rgba(14,42,63,.93) 0%, rgba(11,26,38,.92) 100%),
  url("../images/pagehead.jpg") center / cover no-repeat;
  background-color: #0B1A26; color: #fff; padding: clamp(40px,6vw,76px) 0 clamp(44px,6vw,72px); position: relative; overflow: hidden; }
.pagehead::after { content:""; position: absolute; inset: 0; background: radial-gradient(700px 320px at 85% -20%, rgba(249,115,22,.18), transparent 60%); }
.pagehead__inner { position: relative; z-index: 2; max-width: 760px; }
.pagehead h1 { color: #fff; }
.pagehead p { color: #B6C7D4; margin-top: 16px; font-size: 1.12rem; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .88rem; color: #8FA6B5; margin-bottom: 18px; }
.breadcrumb a { color: #BBD0DE; }
.breadcrumb span { color: #5f7686; }

/* ---- Prose ---- */
.prose { max-width: 760px; }
.prose h2 { margin: 38px 0 14px; }
.prose h3 { margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin-bottom: 8px; color: var(--slate); }
.prose strong { color: var(--ink); }

/* checklist */
.check-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--slate); }
.check-list li::before { content:""; flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--green-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231F9D55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* ---- Split / image-ish blocks ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,60px); align-items: start; }
.split--center { align-items: center; }
.media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; background:
  linear-gradient(135deg,#13354f,#0b1a26); position: relative; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media__tag { position: absolute; left: 18px; bottom: 18px; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: 12px; font-family: var(--font-display); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); display:flex; gap:8px; align-items:center; }
.media__tag svg { color: var(--accent); }

/* ---- Badge tags (playbook) ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; vertical-align: middle; }
.badge--verified { background: var(--green-050); color: #157a41; }
.badge--practitioner { background: var(--blue-050); color: #1559a8; }
.badge--myth { background: var(--red-050); color: #b3322e; }

/* ---- Playbook layout ---- */
.playbook { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: .92rem; }
.toc h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ul { list-style: none; padding: 0; display: grid; gap: 3px; }
.toc a { display: block; color: var(--slate); padding: 6px 12px; border-radius: 8px; border-left: 2px solid var(--line); }
.toc a:hover, .toc a.active { color: var(--ink); background: #fff; border-left-color: var(--accent); text-decoration: none; }
.pb-card { background:#fff; border:1px solid var(--line-soft); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm); margin-bottom: 22px; scroll-margin-top: 96px; }
.pb-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-050); padding: 16px 18px; border-radius: 0 12px 12px 0; margin: 16px 0; }
.callout p { color: var(--ink); margin: 0; font-size: .98rem; }
.callout--myth { border-color: var(--red); background: var(--red-050); }
.callout--verified { border-color: var(--green); background: var(--green-050); }

/* ---- Footer ---- */
.footer { background: var(--ink); color: #9FB2BF; padding: clamp(48px,6vw,72px) 0 30px; }
.footer a { color: #C2D2DC; }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.10); }
.footer__brand .brand { color: #fff; }
.footer__brand p { color: #92A7B5; margin-top: 14px; font-size: .95rem; max-width: 320px; }
.footer h4 { color: #fff; font-size: .92rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: .95rem; }
.footer__nap { display: grid; gap: 12px; font-size: .95rem; }
.footer__nap div { display: flex; gap: 10px; align-items: flex-start; }
.footer__nap svg { color: var(--accent); flex: none; margin-top: 3px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: .85rem; color: #7B8F9C; }
.footer__bottom a { color: #9FB2BF; }

/* ---- Mobile sticky call bar ---- */
.callbar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(11,26,38,.10); padding: 10px 14px env(safe-area-inset-bottom); gap: 10px; }
.callbar .btn { flex: 1; padding: 13px; }

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

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .lead-card { max-width: 460px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 30px; }
  .playbook { grid-template-columns: 1fr; }
  .toc { position: static; display: none; }
}
/* Nav collapses to hamburger earlier than the layout grids */
@media (max-width: 1040px) {
  .nav__links, .nav__phone { display: none; }
  .nav__toggle { display: flex; }
  .header.nav-open .nav__links {
    display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 14px; gap: 4px; box-shadow: var(--shadow-lg); border-top: 1px solid var(--line-soft);
  }
  .header.nav-open .nav__links a { padding: 13px 14px; font-size: 1.02rem; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .media { aspect-ratio: 16/10; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .callbar { display: flex; }
  body { padding-bottom: 72px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row .btn { width: auto; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Appointment chatbot — "Roofy" (scoped .rp-*, token-based)
   ========================================================= */
:root { --callbar-h: 72px; }
#rp-chat, #rp-chat * { box-sizing: border-box; }
.rp-fab { position: fixed; right: 24px; bottom: 24px; z-index: 120; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; background: var(--accent); color: #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; transition: transform .15s, background .2s; }
.rp-fab:hover { background: var(--accent-600); transform: translateY(-2px); }
.rp-fab svg { width: 28px; height: 28px; }
.rp-fab.rp-hidden { display: none; }
.rp-greet { position: fixed; right: 24px; bottom: 98px; z-index: 119; max-width: 232px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 12px 30px 12px 14px; box-shadow: var(--shadow-lg); font-size: .92rem; font-family: var(--font-body); line-height: 1.4; }
.rp-greet button { position: absolute; top: 6px; right: 8px; border: none; background: none; cursor: pointer; color: var(--muted); font-size: 17px; line-height: 1; }
.rp-panel { position: fixed; right: 24px; bottom: 24px; z-index: 121; width: 380px; max-width: calc(100vw - 32px); height: 580px; max-height: calc(100vh - 48px); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; font-family: var(--font-body); }
.rp-panel.rp-open { display: flex; animation: rp-in .22s ease; }
@keyframes rp-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rp-head { background: linear-gradient(165deg, var(--navy), var(--ink)); color: #fff; padding: 13px 14px; display: flex; align-items: center; gap: 10px; }
.rp-ava { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; }
.rp-head h3 { color: #fff; font-size: 1.05rem; margin: 0; font-family: var(--font-display); }
.rp-status { font-size: .74rem; color: #AFC2D0; display: flex; align-items: center; gap: 6px; }
.rp-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(31,157,85,.25); }
.rp-close { margin-left: auto; width: 38px; height: 38px; border: none; background: rgba(255,255,255,.1); color: #fff; border-radius: 10px; cursor: pointer; font-size: 20px; display: grid; place-items: center; flex: none; }
.rp-close:hover { background: rgba(255,255,255,.2); }
.rp-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.rp-msg { max-width: 85%; padding: 10px 13px; border-radius: 15px; font-size: .95rem; line-height: 1.5; }
.rp-msg.bot { background: #fff; color: var(--ink); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; align-self: flex-start; }
.rp-msg.user { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.rp-msg a { color: inherit; text-decoration: underline; }
.rp-typing { align-self: flex-start; display: flex; gap: 4px; padding: 13px 14px; background: #fff; border: 1px solid var(--line-soft); border-radius: 15px; }
.rp-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: rp-bounce 1s infinite; }
.rp-typing span:nth-child(2) { animation-delay: .15s; }
.rp-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes rp-bounce { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.rp-summary { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; align-self: stretch; }
.rp-summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .9rem; }
.rp-summary dt { color: var(--muted); }
.rp-summary dd { margin: 0; color: var(--ink); font-weight: 600; }
.rp-success { text-align: center; padding: 10px; }
.rp-success .rp-check { width: 54px; height: 54px; border-radius: 50%; background: var(--green-050); color: var(--green); display: grid; place-items: center; margin: 0 auto 12px; }
.rp-foot { border-top: 1px solid var(--line); padding: 12px; background: #fff; }
.rp-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chip { font-family: var(--font-display); font-weight: 600; font-size: .88rem; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s, color .15s; }
.rp-chip:hover { border-color: var(--accent); color: var(--accent-700); }
.rp-chip--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rp-chip--primary:hover { background: var(--accent-600); color: #fff; }
.rp-inrow { display: flex; gap: 8px; }
.rp-inrow input, .rp-inrow textarea { flex: 1; width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-family: var(--font-body); font-size: .95rem; color: var(--ink); resize: vertical; }
.rp-inrow input:focus, .rp-inrow textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,.16); }
.rp-send { flex: none; width: 46px; border: none; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; }
.rp-send:hover { background: var(--accent-600); }
.rp-err { color: #b3322e; font-size: .82rem; margin: 6px 2px 0; }
@media (max-width: 860px) {
  .rp-fab { bottom: calc(var(--callbar-h) + 14px + env(safe-area-inset-bottom)); right: 16px; width: 54px; height: 54px; }
  .rp-greet { bottom: calc(var(--callbar-h) + 80px + env(safe-area-inset-bottom)); right: 16px; }
}
@media (max-width: 560px) {
  .rp-panel { inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-panel.rp-open { animation: none; }
  .rp-typing span { animation: none; }
  .rp-fab { transition: none; }
}
