/*
Theme Name: Rio Chimney Repair
Theme URI: https://riochimneyrepair.site/
Author: Rio Chimney Repair
Description: One-page theme for Rio Chimney Repair - chimney sweeping, inspection, masonry and relining in Framingham, MA and MetroWest. Navy and flame-orange design with bold grotesque type, angled sections and a warning-signs checklist.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: rio-chimney
*/

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
  --navy: #10223a;
  --navy-2: #1a3354;
  --navy-3: #24426a;
  --flame: #ff6b2c;
  --flame-dk: #e2531a;
  --ember: #ffb347;
  --smoke: #eef1f5;
  --ash: #f7f8fa;
  --paper: #ffffff;
  --text: #34404f;
  --muted: #667385;
  --line: #dde3ea;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 22px 44px -26px rgba(16, 34, 58, .55);
  --shadow-sm: 0 10px 24px -16px rgba(16, 34, 58, .45);
  --display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--paper); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--flame-dk); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { color: var(--navy); margin: 0 0 .5em; line-height: 1.1; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); }
h2 { font-size: clamp(1.95rem, 3.9vw, 3rem); }
h3 { font-family: var(--display); font-size: 1.24rem; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg[aria-hidden] { width: 1.15em; height: 1.15em; flex: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sec { padding: 104px 0; position: relative; }
.sec--smoke { background: var(--smoke); }
.sec--navy { background: var(--navy); color: #c9d4e3; }
.sec--navy h2, .sec--navy h3 { color: #fff; }
[id] { scroll-margin-top: 90px; }
.center { text-align: center; }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 62ch; }
.sec--navy .lead { color: #aebcd0; }
.center .lead { margin-left: auto; margin-right: auto; }
.head { margin-bottom: 56px; }
.note { font-size: .88rem; color: var(--muted); }

.tag { display: inline-flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--flame-dk); margin-bottom: 14px; }
.tag::before { content: ""; width: 26px; height: 3px; background: var(--flame); border-radius: 2px; }
.sec--navy .tag { color: var(--ember); }

.skip { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--navy); color: #fff; padding: 10px 16px; }
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: var(--r); border: 2px solid transparent; font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1.2; cursor: pointer; transition: transform .15s ease, background .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn--flame { background: var(--flame); color: #fff; box-shadow: 0 14px 26px -14px rgba(255, 107, 44, .95); }
.btn--flame:hover { background: var(--flame-dk); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-3); color: #fff; }
.btn--line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--line:hover { background: #fff; color: var(--navy); }
.btn--white { background: #fff; color: var(--navy); }
.btn--white:hover { background: var(--smoke); color: var(--navy); }
.btn--sm { padding: 11px 18px; font-size: .92rem; }

/* ------------------------------------------------------------------
   Top bar + nav
------------------------------------------------------------------ */
.topbar { background: var(--flame); color: #fff; font-size: .87rem; font-weight: 500; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px; min-height: 40px; flex-wrap: wrap; }
.topbar ul { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar li { display: flex; align-items: center; gap: 8px; }
.topbar a { color: #fff; font-weight: 700; }
.topbar a:hover { color: var(--navy); }

.nav { position: sticky; top: 0; z-index: 50; background: var(--navy); box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .6); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { color: #fff; }
.brand img { width: 48px; height: 48px; }
.brand > span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { font-family: var(--display); font-size: 1.36rem; font-weight: 800; letter-spacing: -.01em; }
.brand span span { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ember); margin-top: 5px; font-weight: 700; }

.menu { display: flex; gap: 26px; }
.menu a { color: #dbe4ef; font-weight: 600; font-size: .95rem; }
.menu a:hover { color: var(--ember); }

.navside { display: flex; align-items: center; gap: 18px; }
.navtel { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.navtel small { font-size: .7rem; color: #93a5bd; text-transform: uppercase; letter-spacing: .12em; }
.navtel a { font-weight: 800; color: #fff; font-size: 1.06rem; }
.burger { display: none; width: 46px; height: 46px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; border-radius: var(--r); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.burger i { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */
.hero { position: relative; background: var(--navy); color: #c9d4e3; padding: 84px 0 140px; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 70px), 0 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 85% 30%, rgba(255, 107, 44, .22), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(36, 66, 106, .9), transparent 70%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--flame); }
.hero .lead { color: #b8c6d8; font-size: 1.2rem; margin-bottom: 30px; }
.hero__acts { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero__checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; max-width: 520px; }
.hero__checks li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; font-size: .96rem; }
.hero__checks svg { color: var(--navy); background: var(--ember); border-radius: 6px; padding: 3px; width: 22px; height: 22px; }
.hero__art { position: relative; }
.hero__art img { width: 100%; border-radius: var(--r-lg); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.hero__badge { position: absolute; right: -18px; bottom: -26px; background: var(--flame); color: #fff; border-radius: var(--r-lg); padding: 18px 22px; box-shadow: var(--shadow); max-width: 250px; }
.hero__badge b { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1.05; }
.hero__badge small { font-size: .86rem; opacity: .92; }

/* Stats */
.stats { position: relative; margin-top: -66px; z-index: 2; }
.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.stats li { padding: 28px 24px; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; }
.stats b { display: block; font-family: var(--display); font-size: 1.45rem; font-weight: 800; color: var(--navy); line-height: 1.1; margin-bottom: 4px; }
.stats span { font-size: .9rem; color: var(--muted); }

/* ------------------------------------------------------------------
   Services
------------------------------------------------------------------ */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 24px 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; overflow: hidden; }
.svc::after { content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0; background: var(--flame); transition: width .25s ease; }
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.svc:hover::after { width: 100%; }
.svc__num { position: absolute; right: 20px; top: 16px; font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: var(--smoke); line-height: 1; }
.svc__ico { width: 56px; height: 56px; border-radius: 12px; background: var(--navy); color: var(--ember); display: grid; place-items: center; margin-bottom: 20px; position: relative; }
.svc__ico svg { width: 28px; height: 28px; }
.svc h3 { margin-bottom: 8px; }
.svc p { font-size: .95rem; color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------
   Warning signs
------------------------------------------------------------------ */
.signs { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.signs__list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.signs__list li { background: var(--navy-2); border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--r-lg); padding: 20px 20px 18px; }
.signs__list b { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 1.02rem; margin-bottom: 6px; }
.signs__list b svg { color: var(--flame); width: 22px; height: 22px; }
.signs__list p { margin: 0; font-size: .92rem; color: #aebcd0; }
.signs__alert { margin-top: 30px; display: flex; gap: 16px; align-items: flex-start; background: rgba(255, 107, 44, .12); border: 1px solid rgba(255, 107, 44, .4); border-radius: var(--r-lg); padding: 20px 22px; color: #ffd9c7; font-size: .95rem; }
.signs__alert svg { color: var(--flame); width: 26px; height: 26px; margin-top: 2px; }
.signs__alert b { color: #fff; }

/* ------------------------------------------------------------------
   Work gallery
------------------------------------------------------------------ */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work { background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.work img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.work div { padding: 22px 24px 26px; }
.work span { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--flame-dk); margin-bottom: 6px; }
.work p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------------------------
   Why us
------------------------------------------------------------------ */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.why__art img { border-radius: var(--r-lg); box-shadow: var(--shadow); width: 100%; }
.why__list { display: grid; gap: 18px; margin-top: 30px; }
.why__list li { display: flex; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.why__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.why__list span { width: 46px; height: 46px; border-radius: 12px; background: #fff1ea; color: var(--flame-dk); display: grid; place-items: center; flex: none; }
.why__list span svg { width: 22px; height: 22px; }
.why__list b { display: block; color: var(--navy); margin-bottom: 2px; font-size: 1.04rem; }
.why__list p { margin: 0; font-size: .94rem; color: var(--muted); }

/* ------------------------------------------------------------------
   Process
------------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; position: relative; }
.steps::before { content: ""; position: absolute; left: 12%; right: 12%; top: 31px; height: 2px; background: repeating-linear-gradient(90deg, var(--flame) 0 10px, transparent 10px 18px); }
.step { position: relative; text-align: center; padding: 0 16px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--display); font-size: 1.6rem; font-weight: 800; border: 5px solid var(--smoke); position: relative; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------------------------
   Areas
------------------------------------------------------------------ */
.areas { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.towns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.towns li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-weight: 600; color: var(--navy); font-size: .94rem; }
.towns li svg { color: var(--flame); width: 16px; height: 16px; }
.towns li.home { background: var(--navy); color: #fff; border-color: var(--navy); }
.towns li.home svg { color: var(--ember); }

/* ------------------------------------------------------------------
   FAQ
------------------------------------------------------------------ */
.faq { max-width: 880px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 12px; overflow: hidden; }
.faq details[open] { border-color: var(--flame); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 64px 22px 24px; font-weight: 700; color: var(--navy); position: relative; font-size: 1.04rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; border-right: 3px solid var(--flame); border-bottom: 3px solid var(--flame); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details > div { padding: 0 24px 22px; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* ------------------------------------------------------------------
   Contact
------------------------------------------------------------------ */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.form { background: #fff; border-radius: var(--r-lg); padding: 40px; box-shadow: var(--shadow); border-top: 5px solid var(--flame); }
.form h3 { font-size: 1.7rem; font-weight: 800; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.fgrid .full { grid-column: 1 / -1; }
.form label { display: block; font-size: .84rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--navy); background: var(--ash); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--flame); background: #fff; box-shadow: 0 0 0 4px rgba(255, 107, 44, .15); }
.form textarea { min-height: 110px; resize: vertical; }
.form .btn { width: 100%; margin-top: 20px; }
.form .note { margin: 14px 0 0; text-align: center; }
.hp { position: absolute; left: -9999px; }
.alert { border-radius: var(--r); padding: 14px 18px; font-weight: 600; margin-top: 16px; }
.alert--ok { background: #e3f4ea; color: #134d2c; }
.alert--err { background: #ffe6dc; color: #8a2d10; }

.info { display: grid; gap: 16px; }
.card { background: #fff; border-radius: var(--r-lg); padding: 26px 28px; border: 1px solid var(--line); }
.card h4 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card h4 svg { color: var(--flame); }
.card p { margin: 0; }
.card .big { font-family: var(--display); font-size: 1.8rem; font-weight: 800; color: #fff; }
.card--navy { background: var(--navy); color: #c9d4e3; border-color: var(--navy); }
.card--navy h4 { color: #fff; }

.map { margin-top: 56px; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }
.map__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 24px; background: #fff; }
.map__bar b { color: var(--navy); }

/* ------------------------------------------------------------------
   CTA + footer
------------------------------------------------------------------ */
.cta { background: var(--flame); color: #fff; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.cta .wrap { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-top: 62px; padding-bottom: 62px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { margin: 0; color: #fff1ea; font-size: 1.1rem; }
.cta__acts { display: flex; gap: 14px; flex-wrap: wrap; }

.foot { background: #0b1829; color: #9fb0c6; font-size: .94rem; padding-top: 76px; }
.foot__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
.foot h4 { color: #fff; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; }
.foot li { margin-bottom: 10px; }
.foot a { color: #d6e0ec; }
.foot a:hover { color: var(--ember); }
.foot__base { margin-top: 56px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }

.dock { display: none; }

/* WordPress content */
.entry img { border-radius: var(--r); }
.entry h2, .entry h3 { margin-top: 1.4em; }
.entry ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .menu { gap: 18px; }
  .navtel { display: none; }
}

@media (max-width: 960px) {
  .sec { padding: 80px 0; }
  .hero { padding: 56px 0 130px; }
  .hero .wrap, .why, .areas, .contact, .signs { grid-template-columns: 1fr; gap: 44px; }
  .hero__art { max-width: 580px; }
  .hero__badge { right: 12px; }
  .stats ul { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .works { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 0; }
  .steps::before { display: none; }
  .foot__grid { grid-template-columns: 1fr 1fr; }

  .burger { display: flex; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--navy); box-shadow: var(--shadow); }
  .menu.open { display: flex; }
  .menu a { padding: 16px 24px; border-top: 1px solid rgba(255, 255, 255, .08); }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 68px; }
  .wrap { padding: 0 16px; }
  .sec { padding: 64px 0; }
  .head { margin-bottom: 38px; }
  .topbar .wrap { justify-content: center; padding-top: 8px; padding-bottom: 8px; }
  .topbar ul { gap: 6px 16px; justify-content: center; }
  .topbar .topbar__addr { display: none; }
  .nav .wrap { min-height: 66px; }
  .brand img { width: 40px; height: 40px; }
  .brand b { font-size: 1.15rem; }
  .navside .btn { display: none; }
  .hero { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 36px), 0 100%); padding-bottom: 110px; }
  .hero__acts .btn { flex: 1 1 100%; }
  .hero__checks { grid-template-columns: 1fr; }
  .hero__badge { position: static; margin-top: 16px; max-width: none; }
  .stats li { padding: 20px 14px; }
  .stats b { font-size: 1.15rem; }
  .services, .works, .steps, .signs__list, .fgrid { grid-template-columns: 1fr; }
  .towns { grid-template-columns: 1fr 1fr; }
  .form { padding: 28px 20px; }
  .map iframe { height: 320px; }
  .cta .wrap { padding-top: 50px; padding-bottom: 50px; }
  .cta__acts, .cta__acts .btn { width: 100%; }
  .foot__grid { grid-template-columns: 1fr; gap: 30px; }

  .dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--navy); box-shadow: 0 -10px 24px -16px rgba(0, 0, 0, .6); }
  .dock a { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--flame); color: #fff; font-weight: 800; border-radius: var(--r); padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .svc, .svc::after { transition: none; }
}
