/*
Theme Name: JM Reforma e Manutenção
Description: Tema institucional da JM com portfólio e orçamento por WhatsApp.
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: jm-reforma
*/
:root{--ink:#20262d;--dark:#171c22;--gold:#e5ae42;--deep:#855b10;--paper:#fcfbf8;--sand:#f2eee5;--line:#e3ded4;--muted:#51565b;--white:#fff}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:1rem}
body{margin:0;background:var(--paper);color:var(--ink);font:400 1rem/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
img{max-width:100%;display:block}
a{color:inherit;text-underline-offset:.2em}
button,input,select,textarea{font:inherit}
button,summary{cursor:pointer}
:focus-visible{outline:3px solid #ba8320;outline-offset:4px}
[hidden]{display:none!important}
.wrap{width:min(1160px,calc(100% - 72px));margin-inline:auto}
.skip{position:absolute;z-index:5;left:1rem;top:1rem;background:#fff;color:#111;padding:.5rem 1rem;transform:translateY(-200%)}
.skip:focus{transform:none}
.site-header{background:#101316;color:var(--white);border-bottom:1px solid #2d343b}
.topbar{min-height:88px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand img,.custom-logo-link img{width:158px;height:auto;max-height:75px;object-fit:contain}
.site-nav{display:flex;align-items:center;gap:clamp(18px,3vw,40px)}
.site-nav a{text-decoration:none;font-size:.91rem;font-weight:650}
.site-nav a:hover{color:#ffcf73}
.site-nav .nav-cta{border:1px solid #746038;border-radius:6px;padding:.65rem 1rem;color:#ffcd71}
.menu-button{display:none}
.hero{background:var(--dark);color:#fff;padding:64px 0 74px;overflow:hidden}
.hero-grid{display:grid;grid-template-columns:1.02fr 1fr;align-items:center;gap:clamp(34px,5.3vw,76px)}
.eyebrow{margin:0 0 14px;color:var(--deep);text-transform:uppercase;letter-spacing:.12em;font-weight:780;font-size:.84rem}
.hero .eyebrow,.contact .eyebrow{color:#f5bf60}
h1,h2,h3{line-height:1.08;margin:0;letter-spacing:-.035em;font-weight:780}
h1{font-size:clamp(2.55rem,5.2vw,4.65rem);max-width:12ch}
h2{font-size:clamp(2.1rem,4.2vw,3.5rem)}
h3{font-size:1.25rem}
p{margin:0}
.hero-description{max-width:43ch;color:#e0e1e2;margin:22px 0 28px;font-size:clamp(1rem,1.55vw,1.15rem)}
.actions{display:flex;flex-wrap:wrap;gap:12px}
.button{border:1px solid transparent;display:inline-flex;justify-content:center;align-items:center;min-height:48px;border-radius:6px;font-weight:760;padding:.65rem 1.15rem;text-decoration:none;text-align:center;line-height:1.35}
.gold{background:var(--gold);color:#1b1a16}
.gold:hover{background:#ffc869}
.outline{border-color:#636971;color:var(--white)}
.outline:hover{background:#2b323a}
.hero-image{position:relative;margin:0;isolation:isolate}
.hero-image::before{content:"";position:absolute;inset:15px -15px -15px 15px;border:1px solid #8e6a2f;border-radius:7px;z-index:-1}
.hero-image img{width:100%;aspect-ratio:1.18;object-fit:cover;object-position:52% center;border-radius:7px}
.hero-image figcaption{position:absolute;bottom:14px;left:14px;background:#171c22ed;color:#fff;font-size:.83rem;border-radius:4px;padding:4px 9px}
.section{padding-block:clamp(62px,8vw,105px)}
.intro{color:var(--muted);max-width:59ch;margin-top:16px}
.service-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-top:34px}
.service{border:1px solid var(--line);padding:25px 20px 24px;border-radius:8px;background:#fff}
.service svg{color:var(--deep);margin-bottom:12px}
.service p,.project-copy p:not(.eyebrow),.process li p{color:var(--muted);margin-top:10px}
.portfolio{background:var(--sand)}
.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-top:34px}
.project{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.photo-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;background:#ebe6dd}
.photo-pair figure{margin:0;min-width:0;position:relative}
.photo-pair a{display:block}
.photo-pair a:focus-visible{outline-offset:-5px}
.photo-pair img{width:100%;height:clamp(180px,21vw,270px);object-fit:cover}
.electric img{object-position:center 41%}
.electric figure:first-child img{object-position:center 49%}
.photo-pair figcaption{position:absolute;bottom:9px;left:9px;background:#171c22ed;color:#fff;padding:.2rem .5rem;border-radius:4px;font-size:.82rem;pointer-events:none}
.project-copy{padding:23px}
.project-copy .eyebrow{margin-bottom:7px}
.project-copy h3{font-size:1.46rem}
.process{display:grid;grid-template-columns:.86fr 1.14fr;gap:clamp(30px,8vw,110px)}
.process ol{margin:0;padding:0;list-style:none;counter-reset:step}
.process li{counter-increment:step;border-top:1px solid var(--line);padding:19px 0 19px 58px;position:relative}
.process li:last-child{border-bottom:1px solid var(--line)}
.process li::before{content:counter(step,decimal-leading-zero);color:var(--deep);font-weight:800;position:absolute;left:0;top:17px}
.contact{color:#fff;background:var(--dark)}
.contact-grid{display:grid;grid-template-columns:.86fr 1.14fr;align-items:start;gap:clamp(32px,7vw,90px)}
.contact .intro,.region{color:#d5d8db}
.phone{display:inline-flex;flex-direction:column;gap:2px;margin-block:21px 13px;color:#ffcf73;font-size:1.36rem;font-weight:760;text-decoration:none}
.phone span{font-size:.89rem;font-weight:600;text-decoration:underline}
.contact-box{background:#262d35;border:1px solid #414750;padding:clamp(17px,3vw,28px);border-radius:8px}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.contact form label{display:block;font-weight:660;margin:0 0 13px}
.contact form label span{font-size:.86rem;color:#dedfe2;font-weight:400}
.contact input,.contact select,.contact textarea{display:block;width:100%;min-height:44px;border:1px solid #747a80;border-radius:5px;background:#fcfbf8;color:#20262d;font-size:1rem;margin-top:5px;padding:.55rem .64rem}
.contact textarea{resize:vertical}
.contact form .button{width:100%}
.contact details{margin-top:16px;font-size:.89rem;color:#e0e1e2}
.contact details p{margin-top:8px}
.site-footer{padding:28px 0;background:#101316;color:#e1e1e0}
.footer-main{display:flex;justify-content:space-between;gap:19px;font-size:.93rem}
.footer-brand{color:white;font-weight:770;font-size:1.06rem}
.footer-main a{color:#ffcf73}
@media(max-width:930px){.service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{padding-block:52px 66px}}
@media(max-width:740px){.wrap{width:calc(100% - 36px)}.topbar{min-height:72px;position:relative;flex-wrap:wrap;gap:0}.brand img,.custom-logo-link img{width:132px}.site-nav{flex:1 1 100%;flex-wrap:wrap;gap:8px 16px;padding-bottom:11px}.site-nav a{padding:5px 0}.jm-js .menu-button{display:inline-flex;gap:.58rem;align-items:center;border:1px solid #746038;background:transparent;color:#ffcf73;border-radius:6px;padding:.45rem .65rem}.jm-js .site-nav:not(.open){display:none}.hero-grid,.process,.contact-grid,.project-grid{grid-template-columns:1fr}.hero-grid{gap:25px}.hero{padding-block:34px 48px}.hero-image{margin-right:11px}.hero-image img{aspect-ratio:1.55}.hero-image::before{inset:10px -10px -10px 10px}.hero-description{margin-block:15px 20px}.photo-pair img{height:clamp(178px,47vw,275px)}}
@media(max-width:460px){.service-grid,.fields{grid-template-columns:1fr}.service-grid{gap:10px}.service{padding:17px}.footer-main{flex-direction:column}.section{padding-block:48px}.actions{gap:8px}.button{padding-inline:.8rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.photo-dialog{max-width:min(92vw,900px);max-height:90vh;background:var(--dark);color:#fff;border:1px solid #78736a;border-radius:8px;padding:12px}
.photo-dialog::backdrop{background:#0a0c0fdd}
.photo-dialog button{display:block;margin:0 0 10px auto;background:#e5ae42;color:#171c22;border:0;border-radius:4px;padding:6px 11px;font-weight:700}
.photo-dialog img{max-height:75vh;width:auto;height:auto;margin:auto;object-fit:contain}
.project-cta{display:inline-flex;align-items:center;min-height:44px;margin-top:10px;color:#754e0a;font-weight:760}
.project-cta:hover{color:#38290e}
.mobile-whatsapp{display:none}
@media(max-width:740px){
 .mobile-whatsapp{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;position:fixed;z-index:5;bottom:max(12px,env(safe-area-inset-bottom));right:12px;max-width:calc(100% - 24px);min-height:46px;background:var(--gold);color:#181b1e;border:1px solid #936821;border-radius:7px;padding:.55rem .7rem;font-size:.9rem;font-weight:750;text-decoration:none;box-shadow:0 4px 18px #1118}
 .site-footer{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
}
.hero-image img{object-position:46% 53%}
.paintcase img{object-position:center 40%}
.pumpcase img{object-position:center 63%}
.project{display:flex;flex-direction:column}
.project-copy{display:flex;flex:1;flex-direction:column;align-items:flex-start}
.project-copy .project-cta{margin-top:auto;padding-top:12px}
@media(max-width:360px){.photo-pair figcaption{font-size:.75rem;left:4px;bottom:4px;padding:.15rem .35rem}}

/* JM 1.2: institutional sections, editable photo catalogue and grouped portfolio. */
.hero-area{color:#d9dbdc;font-size:.9rem;margin-top:22px;display:flex;align-items:center;gap:.5rem}
.hero-area span{background:var(--gold);display:block;width:7px;height:7px;border-radius:50%}
.hero-image img{height:auto;object-position:50% 53%;aspect-ratio:1.27}
.section-heading{display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(15px,5vw,90px);align-items:end}
.section-heading .intro{margin-top:0;max-width:48ch}
.audience-grid,.strength-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:32px}
.audience-card{display:flex;flex-direction:column;border:1px solid var(--line);border-top:3px solid #ba8320;border-radius:7px;background:#fff;padding:22px}
.audience-card h3{font-size:1.52rem;margin-bottom:12px}
.audience-card p:not(.eyebrow){color:var(--muted);margin-bottom:12px}
.audience-card .project-cta{align-self:flex-start;margin-top:auto}
.service-section{background:#fff;border-block:1px solid var(--line)}
.service.with-photo{padding:0;display:flex;flex-direction:column;overflow:hidden;min-width:0}
.service-img{background:var(--sand)}
.service-img img{width:100%;height:164px;object-fit:cover;object-position:center 45%}
.service-img-predial img{object-position:center 60%}
.service-copy{padding:18px;display:flex;flex-direction:column;align-items:flex-start;flex:1}
.service-copy .project-cta{margin-top:auto;padding-top:10px}
.portfolio-filters{display:flex;flex-wrap:wrap;gap:8px;margin:28px 0 0}
.portfolio-filters button{min-height:42px;border:1px solid #b8ad97;background:#fff;color:var(--ink);padding:.45rem .85rem;border-radius:5px;font-size:.92rem;font-weight:650}
.portfolio-filters button[aria-pressed=true]{background:var(--ink);color:#fff;border-color:var(--ink)}
.portfolio .project-grid{margin-top:20px}
.photo-pair[data-count="1"]{grid-template-columns:1fr}
.photo-pair[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
.photo-pair[data-count="3"] figcaption{position:static;border-radius:0;font-size:.8rem;min-height:34px;display:flex;align-items:center}
.patio-case img{object-position:center 65%}
.electric img{object-position:center 43%}
.about{display:grid;grid-template-columns:.72fr 1.28fr;align-items:center;gap:clamp(24px,8vw,100px)}
.about-brand{background:#111413;color:#f5bf60;border:1px solid #725d35;border-radius:8px;text-align:center;padding:clamp(25px,5vw,55px)}
.about-brand img{height:auto;width:min(280px,100%);margin:0 auto 16px}
.about-brand p{letter-spacing:.08em;font-weight:650}
.about-copy p:not(.eyebrow){margin-top:14px}
.about-copy .company-id{font-size:.9rem;font-weight:680}
.strengths{background:var(--ink);color:#fff}
.strengths .eyebrow{color:#f5bf60}
.strengths h2{max-width:22ch}
.strength-grid article{border-top:1px solid #9e7c46;padding:18px 5px 0 0}
.strength-grid p{color:#e1e3e5;margin-top:12px}
.form-hint{font-size:.88rem;color:#dbdde1;margin-top:8px}
.screen-reader-text{clip-path:inset(50%);height:1px;width:1px;overflow:hidden;position:absolute;white-space:nowrap}
.screen-reader-text:focus{clip-path:none;height:auto;width:auto}
@media(max-width:920px){.service-img img{height:172px}}
@media(max-width:740px){
 .section-heading,.about,.audience-grid,.strength-grid{grid-template-columns:1fr}
 .section-heading .intro{margin-top:2px}
 .about-brand{order:2}
 .hero-image img{aspect-ratio:1.56}
 .hero-area{margin-top:14px}
 .audience-grid,.strength-grid{margin-top:22px;gap:14px}
 .photo-pair[data-count="3"] img{height:clamp(135px,47vw,250px)}
 .photo-pair[data-count="3"] figcaption{line-height:1.25}
 .mobile-whatsapp.is-in-quote{display:none}
}
@media(max-width:460px){.service-img img{height:170px}.audience-card{padding:17px}.portfolio-filters{gap:7px}.portfolio-filters button{padding-inline:.6rem}}

/* 1.3: a tighter mobile reading rhythm and individual catalogue pages. */
:root{--paper:#faf9f6;--white:#fff;--line:#e4dfd4;--gold:#d9a52e}
.topbar{min-height:78px}
.section{padding-block:clamp(46px,6.2vw,82px)}
.hero{padding-block:52px 62px}
.hero-image img{object-position:64% 52%}
.detail-link{display:inline-flex;align-items:center;gap:7px;min-height:44px;font-weight:750;color:var(--deep);text-decoration:none}
.detail-link:hover{text-decoration:underline}
.service-copy .detail-link,.project-copy .detail-link{margin-top:8px}
.service-copy .project-cta,.project-copy .project-cta{margin-top:0;padding-top:0;font-size:.9rem}
.service-grid{row-gap:16px;margin-top:25px}
.service-copy p{flex:1}
.about-fact{align-self:stretch;background:#f4ead2;border:1px solid #d5bd88;border-radius:8px;padding:clamp(20px,4vw,40px);display:flex;flex-direction:column;justify-content:center}
.about-fact p:not(.eyebrow){font-size:clamp(1.45rem,2.75vw,2.35rem);font-weight:750;line-height:1.15;letter-spacing:-.03em}
.about-fact .detail-link{margin-top:10px}
.faq{display:grid;grid-template-columns:.8fr 1.2fr;gap:clamp(20px,7vw,85px)}
.faq-list{border-top:1px solid var(--line)}
.faq-list details{border-bottom:1px solid var(--line);padding:0 5px}
.faq-list summary{font-weight:720;min-height:48px;padding:12px 0;line-height:1.4}
.faq-list details p{color:var(--muted);margin:0 0 13px;max-width:64ch}
.reviews{background:#f4ead2;border-top:1px solid #e4cf9f}
.review-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:14px;margin-top:22px}
.review-grid figure{margin:0;background:white;border:1px solid var(--line);border-radius:7px;padding:18px;overflow-wrap:anywhere}
.review-grid blockquote{margin:0 0 13px}
.review-grid figcaption{font-size:.9rem;font-weight:700}
.review-grid figcaption a{display:block;font-weight:500}
.contact-links{margin-top:12px;color:#ffcf73;overflow-wrap:anywhere}
.footer-main>div{min-width:0;overflow-wrap:anywhere}
@media(max-width:740px){
 .topbar{min-height:67px}
 .hero{padding-block:26px 37px}
 .hero-grid{gap:19px}
 .hero .eyebrow{margin-bottom:9px}
 .hero-description{margin-block:12px 15px}
 .section{padding-block:36px}
 .section-heading{gap:8px}
 .audience-grid,.strength-grid,.service-grid{margin-top:17px;gap:11px}
 .audience-card h3,.audience-card p:not(.eyebrow){margin-bottom:7px}
 .faq{grid-template-columns:1fr;gap:15px}
 .about-fact{order:2}
 .about{gap:17px}
 .process,.contact-grid{gap:19px}
 .project-copy{padding:16px}
 .contact .intro{margin-top:10px}
 .service-img img{height:145px}
 .phone{margin-block:13px 8px}
}
@media(max-width:390px){h1{font-size:clamp(2.1rem,10vw,2.55rem)}.hero .actions .button{font-size:.92rem}.hero-image figcaption{left:8px;bottom:8px;font-size:.73rem}}
.jm-detail-hero h1{max-width:19ch;font-size:clamp(2.35rem,5.2vw,4.35rem)}
.jm-breadcrumb{font-size:.9rem;display:flex;gap:.65rem;align-items:center;margin-bottom:17px;color:#e0e1e2}
.jm-detail-hero .button{margin-top:8px}
.jm-detail-gallery{margin-top:17px;border-radius:7px;overflow:hidden}
.jm-detail-gallery[data-count="1"] img{object-fit:contain;height:clamp(245px,46vw,530px)}
.jm-detail-body{max-width:min(1160px,calc(100% - 36px))}
.jm-detail-body p,.jm-detail-body li{max-width:65ch}
.jm-detail-body h2 + p,.jm-detail-body h2 + .wp-block-paragraph,.jm-detail-body p + p{margin-top:13px}
.jm-detail-body li+li{margin-top:5px}
.jm-detail-photos + .jm-detail-body{padding-top:0}
.jm-detail-contact .actions{margin-top:16px}

/* 1.4: accessible launch pages and denser navigation. */
.site-nav{gap:clamp(11px,2vw,28px)}
.site-nav a{display:inline-flex;align-items:center;min-height:44px}
.jm14-page{overflow-wrap:anywhere}
.jm14-hero h1{max-width:21ch;font-size:clamp(2.3rem,5.4vw,4.5rem)}
.jm14-hero .intro,.jm14-hero .hero-description{color:#e0e1e2}
.jm14-hero .actions,.jm14-cta .actions{margin-top:18px}
.jm14-content{max-width:880px}
.jm14-content :is(h2,h3,h4){line-height:1.2;margin-block:1.5rem .65rem}
.jm14-content :is(h2):first-child{margin-top:0}
.jm14-content h2{font-size:clamp(1.5rem,3vw,2.25rem)}
.jm14-content p+p{margin-top:.8em}
.jm14-content li+li{margin-top:.35em}
.jm14-condo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:22px}
.jm14-condo-grid :is(article,section){background:#fff;border:1px solid var(--line);border-top:3px solid var(--gold);padding:17px;border-radius:7px}
.jm14-condo-grid :is(article,section) p{margin-top:10px;color:var(--muted)}
.jm14-cta .outline:hover{color:white}
.photo-dialog{width:fit-content}
.photo-dialog button{min-width:44px;min-height:44px}
.form-hint a{color:inherit}
@media(max-width:800px){
 .site-nav{gap:4px 14px}
 .site-nav a{padding-block:.4rem}
 .jm-js .menu-button{min-height:44px}
 .jm14-condo-grid{grid-template-columns:1fr}
}
@media (max-width:460px){
 .hero-image figcaption{max-width:calc(100% - 16px)}
 .service-img img{height:clamp(110px,37vw,158px)}
 .service-copy{padding:14px 15px}
 .mobile-whatsapp{font-size:.86rem;bottom:max(10px,env(safe-area-inset-bottom))}
}
