/* Moriá Móveis Planejados: CSS do site, carregado depois do kit (assets/system.css).
   Mobile-first; toda imagem tem width/height no HTML (zero CLS). */

/* seções de conteúdo crescem com o texto em vez de cortar (páginas de SEO têm texto longo) */
main > :is(section, .section):not(.hero) { height: auto; min-height: calc(var(--h, 1) * 100svh); }
main > :is(section, .section).section--auto:not(.hero) { min-height: 0; padding-block: 0; }

/* hero de todas as páginas: cresce com o conteúdo em telas baixas (nada passa por cima da seção seguinte) */
main > .hero { height: auto; min-height: 100svh; }
main > .hero > .wrap { height: auto; }
.hero-text.hero-split { height: auto; }
@media (min-width: 1024px) {
  .hero-split > .hero-copy { height: auto; }
  .hero-split > .hero-visual { height: auto; min-height: min(68svh, 640px); }
  .hero-split > .hero-copy > .hero-facts { margin-top: var(--s-7); }
}
@media (max-width: 1023px) { .hero-split > .hero-visual { flex: none; aspect-ratio: 4 / 3; } }

/* ===== Home: hero escuro com colagem de fotos ===== */
.hero--home { background: var(--p-inv-bg); color: var(--p-inv-ink); overflow: hidden; padding: calc(var(--nav) + var(--s-8)) 0 var(--s-8); display: flex; flex-direction: column; justify-content: center; }
.hero--home::before { content: ""; position: absolute; inset: auto -20% -40% auto; width: 70vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgb(179 20 28 / .35), transparent); pointer-events: none; z-index: -1; }
.hero--home .kicker { color: var(--p-inv-muted); }
.hero--home .btn--primary { --action: #c8161f; --action-ink: #fff; }
.hero--home .btn--secondary { color: var(--p-inv-ink); border-color: rgb(244 241 236 / .35); background: transparent; }
.home-hero { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 1024px) { .home-hero { grid-template-columns: 1.05fr 1fr; gap: var(--s-9); } }
.home-hero__text h1 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -0.035em; margin: 0; max-width: 17ch; }
.home-hero__text .t-lead { color: rgb(244 241 236 / .82); max-width: 46ch; margin: var(--s-6) 0 0; }
.home-hero__text .btn-row { margin-top: var(--s-7); }
.home-hero .rot { color: #ff4a50; white-space: nowrap; }
.home-hero__pay { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: var(--s-6) 0 0; }
.home-hero__pay li { font-size: 14px; padding: 6px 12px; border: 1px solid rgb(244 241 236 / .22); border-radius: 999px; color: rgb(244 241 236 / .8); }

.home-hero__art { position: relative; aspect-ratio: 1 / .92; width: 100%; }
.hh-photo { position: absolute; margin: 0; overflow: hidden; border-radius: var(--r-lg); box-shadow: 0 24px 60px rgb(0 0 0 / .35); background: var(--p-inv-surface); }
.hh-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.hh-photo:hover img { transform: scale(1.04); }
.hh-photo--a { left: 0; top: 4%; width: 54%; height: 88%; z-index: 2; }
.hh-photo--b { right: 0; top: 0; width: 42%; height: 46%; }
.hh-photo--c { right: 0; bottom: 0; width: 42%; height: 48%; }
.hh-badge { position: absolute; left: 40%; bottom: -2%; z-index: 3; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--p-bg); color: var(--p-ink); border-radius: var(--r-md); box-shadow: 0 16px 40px rgb(0 0 0 / .3); font-size: 14px; line-height: 1.3; }
.hh-badge__num { font: 500 36px/1 var(--font-display); color: var(--p-accent); letter-spacing: -0.03em; }

.home-hero__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); margin: var(--s-9) 0 0; padding-top: var(--s-6); border-top: 1px solid rgb(244 241 236 / .15); }
@media (min-width: 1024px) { .home-hero__stats { grid-template-columns: repeat(4, 1fr); } }
.home-hero__stats dt { font-size: 14px; color: var(--p-inv-muted); }
.home-hero__stats dd { margin: var(--s-1) 0 0; font: 400 clamp(20px, 1.8vw, 28px)/1.2 var(--font-display); letter-spacing: -0.02em; }

/* entrada: fotos sobem em sequência, depois flutuam devagar */
@keyframes hh-in { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes hh-float { 50% { transform: translateY(-10px); } }
.hh-photo--a { animation: hh-in 900ms var(--ease) 150ms both, hh-float 7s ease-in-out 1.2s infinite; }
.hh-photo--b { animation: hh-in 900ms var(--ease) 350ms both, hh-float 8s ease-in-out 1.4s infinite; }
.hh-photo--c { animation: hh-in 900ms var(--ease) 550ms both, hh-float 9s ease-in-out 1.6s infinite; }
.hh-badge { animation: hh-in 700ms var(--ease) 900ms both; }
@media (max-width: 1023px) { .home-hero__art { max-width: 560px; } }

/* faixa de fotos em movimento logo abaixo do hero */
.marquee { overflow: hidden; padding-block: var(--s-6) !important; background: var(--p-inv-bg); }
.marquee__track { display: flex; gap: var(--s-4); width: max-content; animation: mq 60s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee figure { margin: 0; width: 280px; height: 200px; flex: none; border-radius: var(--r-md); overflow: hidden; }
.marquee img { width: 100%; height: 100%; object-fit: cover; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .hh-photo, .hh-badge { animation: none; }
}

/* logo */
.nav__logo .logo-mark { width: 32px; height: 32px; flex: none; }
.nav__logo { display: inline-flex; align-items: center; gap: var(--s-3); }

/* sobretítulo do hero */
.kicker { display: inline-flex; align-items: center; gap: var(--s-2); font: 500 var(--t-label)/1.3 var(--font-text); color: var(--muted); margin: 0 0 var(--s-5); }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--p-accent); }

/* hero: foto ocupa a coluna inteira */
.hero-visual.frame--photo { overflow: hidden; border-radius: var(--r-lg); }
.hero-visual .frame__img { width: 100%; height: 100%; object-fit: cover; }

/* texto corrido */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--s-5); }
.prose p, .prose li { font-size: 18px; line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: var(--s-2); }
.bluf { font-size: var(--t-lead); line-height: 1.55; max-width: 62ch; margin: var(--s-5) 0 0; }
.section-head + .bluf { margin-top: 0; }

/* tabelas comparativas */
.table-wrap { overflow-x: auto; margin-top: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-md); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 16px; line-height: 1.5; }
caption { text-align: left; padding: var(--s-4) var(--s-5); font: 500 var(--t-label)/1.3 var(--font-text); color: var(--muted); }
th, td { text-align: left; vertical-align: top; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); }
thead th { background: var(--p-surface); font-weight: 500; }
tbody th { font-weight: 500; }

/* cartões de ambiente */
.tiles { display: grid; gap: var(--s-6); grid-template-columns: 1fr; margin-top: var(--s-7); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tiles--3 { grid-template-columns: repeat(3, 1fr); } }
.tile h3 { margin: 0; font: 500 var(--t-card)/1.3 var(--font-text); }
.tile p { margin: 0; }
a.tile { text-decoration: none; }
a.tile .tile__more { color: var(--action); font-weight: 500; }

/* parede de fotos */
.wall { display: grid; gap: 2px; grid-template-columns: repeat(2, 1fr); margin-top: var(--s-7); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 1024px) { .wall { grid-template-columns: repeat(4, 1fr); } .wall > :first-child { grid-column: span 2; grid-row: span 2; } }
.wall figure { margin: 0; overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.wall img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
@media (hover: hover) { .wall figure:hover img { transform: scale(1.03); } }

/* etapas numeradas */
.steps { list-style: none; padding: 0; margin: var(--s-7) 0 0; display: grid; gap: var(--s-6); counter-reset: st; }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: st; border-top: 2px solid var(--ink); padding-top: var(--s-5); }
.steps li::before { content: "0" counter(st); display: block; font: 400 40px/1 var(--font-display); letter-spacing: -0.03em; color: var(--p-accent); margin-bottom: var(--s-4); }
.steps h3 { margin: 0 0 var(--s-2); font: 500 var(--t-card)/1.3 var(--font-text); }
.steps p { margin: 0; }

/* faixa de CTA no meio (fundo escuro da marca) */
.band-cta .wrap { justify-content: center; gap: var(--s-6); }
footer.closing { height: auto; min-height: 0; }
.closing__cta.close--type { justify-content: center; gap: var(--s-6); }
.band-cta .band-cta__big, .closing__cta .band-cta__big { font: 400 clamp(36px, 4.4vw, 64px)/1.05 var(--font-display); letter-spacing: -0.03em; max-width: 18ch; margin: 0; }

/* foto que revela (picture-develops) */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(560px, 70svh); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .develop { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-7); } }

/* blog */
.post-meta { color: var(--muted); font-size: var(--t-small); margin: var(--s-4) 0 0; }
.crumbs { font-size: var(--t-small); color: var(--muted); margin: 0 0 var(--s-5); }
.crumbs a { color: inherit; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); }

/* contato */
.channels { display: grid; gap: var(--s-5); margin-top: var(--s-7); grid-template-columns: 1fr; }
@media (min-width: 768px) { .channels { grid-template-columns: repeat(3, 1fr); } }
.channel { display: grid; gap: var(--s-3); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: inherit; transition: transform 200ms var(--ease); }
.channel:hover { transform: translateY(-2px); }
.channel svg { width: 28px; height: 28px; color: var(--p-accent); }
.channel strong { font: 500 var(--t-card)/1.3 var(--font-text); }
.map { margin-top: var(--s-7); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
address { font-style: normal; }
.nap { line-height: 1.7; }

/* rodapé */
.footer .socials a { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; color: inherit; }
.footer .socials svg { width: 20px; height: 20px; }
.footer__col .t-label { margin: 0 0 var(--s-3); }

/* botão flutuante de WhatsApp (celular) */
.wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 9; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #1f8f4e; color: #fff; box-shadow: 0 6px 20px rgb(0 0 0 / .18); transition: transform 200ms var(--ease); }
.wa-float:hover { transform: translateY(-2px); }
.wa-float svg { width: 28px; height: 28px; }

/* ===== tudo centralizado fora dos heróis ===== */
main > section:not(.hero) .section-head,
main > section:not(.hero) .bluf { text-align: center; margin-inline: auto; }
main > section:not(.hero) .section-head h2 { margin-inline: auto; max-width: 22ch; }
main > section:not(.hero) .bluf { max-width: 62ch; }
main > section:not(.hero) .prose { text-align: center; margin-inline: auto; }
main > section:not(.hero) .prose :is(ul, ol) { display: table; text-align: left; margin-inline: auto; }
main > section:not(.hero) .rows { max-width: 760px; margin-inline: auto; width: 100%; }
main > section:not(.hero) .table-wrap { max-width: 1040px; margin-inline: auto; width: 100%; }
main > section:not(.hero) .tile { text-align: center; justify-items: center; }
main > section:not(.hero) .steps li { text-align: center; }
main > section:not(.hero) .faq { max-width: 820px; margin: var(--s-7) auto 0; width: 100%; text-align: center; }
main > section:not(.hero) .faq__item { justify-items: center; }
main > section:not(.hero) .btn-row { justify-content: center; }
main > section:not(.hero) :is(.band-cta__big, .t-lead) { text-align: center; margin-inline: auto; }
.band-cta .wrap, .closing__cta.close--type { align-items: center; }
main > section:not(.hero) > .wrap > p:not(.bluf) { text-align: center; }
.develop--wide { width: 100%; max-width: 1040px; margin: var(--s-7) auto 0; height: min(520px, 60svh); }
.channel { justify-items: center; text-align: center; }
#endereco .grid { align-items: start; }
#endereco .nap { text-align: center; }
@media (min-width: 1024px) { #endereco .nap { text-align: left; } }

/* links cruzados centralizados */
.related .wrap { align-items: center; text-align: center; }
.related__list { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) var(--s-6); }

/* cabeçalho com o nome completo no celular */
@media (max-width: 639px) {
  header.nav .nav__bar > .nav__actions { display: none !important; }
  header.nav .nav__bar { display: flex; justify-content: space-between; align-items: center; }
  .nav__bar .nav__logo { font-size: 16px; gap: var(--s-2); }
  .nav__bar .nav__logo .logo-mark { width: 28px; height: 28px; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .nav__bar .nav__logo { font-size: 17px; } }
