/* Brycen Autrey | Bartlett Roofing
   Contrast notes (WCAG AA):
   - #253038 text on #6BB8A4 buttons: ~5.8:1
   - #FFFFFF on #253038: ~13.6:1
   - #49545A on #FFFFFF: ~7.6:1, on #E0E3E6: ~5.8:1
   - #6BB8A4 is never used as text on white. */

:root {
  --brand: #2A3440;
  --accent: #6BB8A4;
  --dark: #253038;
  --muted: #49545A;
  --light: #E0E3E6;
  --white: #FFFFFF;
  --radius: 10px;
  --gutter: 20px;
  --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--brand);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* room for the sticky mobile bar + floating reviews button */
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 92px);
}

h1, h2, h3 { color: var(--brand); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 7vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 5vw, 2.25rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100;
  background: var(--dark); color: var(--white); padding: 12px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.icon { width: 20px; height: 20px; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 20px;
  border-radius: var(--radius); border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; line-height: 1.2;
  cursor: pointer; transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 14px 26px; font-size: 1.1rem; }

.btn-primary { background: var(--accent); color: var(--dark); border-color: var(--accent); }
.btn-primary:hover { background: #83C5B4; border-color: #83C5B4; }

.btn-outline { background: var(--white); color: var(--brand); border-color: var(--accent); }
.btn-outline:hover { background: var(--light); }
.btn-outline .icon { color: var(--brand); }

.btn-dark { background: var(--dark); color: var(--white); border-color: var(--dark); }
.btn-dark:hover { background: var(--brand); }
.btn-dark .icon { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--light);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; flex-direction: column; text-decoration: none; min-height: 44px; justify-content: center; }
.brand-name { font-size: 1.3rem; font-weight: 800; color: var(--brand); letter-spacing: -.01em; }
.brand-sub { font-size: .9rem; color: var(--muted); }

.header-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.header-actions .btn { padding-left: 8px; padding-right: 8px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--dark);
  color: var(--white);
  padding: 56px 0 64px;
  border-bottom: 6px solid var(--accent);
}
.hero h1 { color: var(--white); max-width: 16ch; }
.hero .lead { font-size: clamp(1.1rem, 3.6vw, 1.35rem); max-width: 40ch; margin-bottom: 1.75em; color: var(--white); }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--white); border-left: 4px solid var(--accent); padding-left: 10px; margin-bottom: 1.25em;
}
.hero .btn { width: 100%; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-light { background: var(--light); }
.section-intro { color: var(--muted); max-width: 60ch; }
.body-lg { font-size: 1.15rem; }
.fine-print { font-size: .9rem; color: var(--muted); margin-bottom: 1.5em; }
.section-light .btn-lg { width: 100%; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.step {
  position: relative; background: var(--white); border: 1px solid var(--light);
  border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 24px;
}
.step p { color: var(--muted); margin: 0; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--dark); color: var(--white); font-weight: 800; margin-bottom: 12px;
}

/* Service cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card { background: var(--white); border: 1px solid var(--light); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); margin: 0; }
.card-icon {
  width: 44px; height: 44px; padding: 9px; border-radius: 10px;
  background: var(--dark); color: var(--accent); margin-bottom: 14px;
}

/* About */
.about { display: grid; gap: 28px; align-items: center; }
.about-copy p:not(.body-lg) { color: var(--muted); }
.photo-placeholder {
  aspect-ratio: 4 / 5; width: 100%; max-width: 360px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--white); border: 2px dashed var(--muted); border-radius: var(--radius);
  color: var(--muted); font-weight: 700; padding: 16px;
}
.about-photo img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; border-radius: var(--radius); }

/* Booking */
.booking {
  position: relative; background: var(--white); border: 1px solid var(--light);
  border-radius: var(--radius); overflow: hidden; margin: 8px 0 24px;
}
.booking-frame { display: block; width: 100%; height: 720px; border: 0; }
.booking-frame:not([src]) { display: none; }
.booking-empty { margin: 0; padding: 40px 20px; text-align: center; color: var(--muted); }
.booking .btn { width: 100%; }

/* Reviews */
.reviews-embed { min-height: 120px; margin: 8px 0 24px; }
.reviews-placeholder {
  display: flex; align-items: center; justify-content: center; min-height: 120px; margin: 0;
  border: 2px dashed var(--muted); border-radius: var(--radius);
  color: var(--muted); font-weight: 700; padding: 16px; text-align: center;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--white); padding: 40px 0 32px; text-align: center; }
.site-footer a:not(.btn) { color: var(--white); }
.footer-id { font-weight: 700; margin-bottom: 20px; }
.footer-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 480px; margin: 0 auto 24px; }
.footer-actions .btn { padding-left: 8px; padding-right: 8px; }
.footer-fine { font-size: .875rem; margin: 0 0 .5em; color: var(--white); opacity: .92; }

/* ---------- Floating reviews button ---------- */
.reviews-fab {
  position: fixed; z-index: 45;
  right: 16px; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 14px);
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 64px; padding: 14px 26px;
  background: var(--accent); color: var(--dark);
  border: 3px solid var(--white); border-radius: 999px;
  box-shadow: 0 8px 24px rgba(37, 48, 56, .45);
  font-size: 1.25rem; font-weight: 800; text-decoration: none; line-height: 1.1;
  transition: transform .15s, box-shadow .15s;
}
.reviews-fab .icon { width: 28px; height: 28px; color: var(--dark); }
.reviews-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 48, 56, .55); }
.reviews-fab:focus-visible { outline: 3px solid var(--dark); outline-offset: 3px; }

/* ---------- Sticky mobile bar ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--dark); border-top: 3px solid var(--accent);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--bar-h); color: var(--white); text-decoration: none;
  font-size: .85rem; font-weight: 700;
}
.mobile-bar a .icon { color: var(--accent); width: 22px; height: 22px; }
.mobile-bar .mobile-bar-primary { background: var(--accent); color: var(--dark); }
.mobile-bar .mobile-bar-primary .icon { color: var(--dark); }
.mobile-bar a:focus-visible { outline-offset: -4px; outline-color: var(--white); }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .hero .btn, .section-light .btn-lg, .booking .btn { width: auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  body { padding-bottom: 104px; }
  .mobile-bar { display: none; }
  .reviews-fab { right: 28px; bottom: 28px; min-height: 76px; padding: 16px 34px; font-size: 1.5rem; }
  .reviews-fab .icon { width: 32px; height: 32px; }

  .site-header { position: sticky; top: 0; z-index: 40; }
  html { scroll-padding-top: 88px; }
  .header-actions { display: flex; width: auto; }
  .header-actions .btn { padding-left: 14px; padding-right: 14px; }

  .hero { padding: 96px 0 104px; }
  .section { padding: 80px 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .about { grid-template-columns: 2fr 3fr; gap: 48px; }
}

@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
}
