/* ==========================================================================
   Magbor — Construção · Remodelação · Engenharia · Arquitetura
   Folha de estilos principal
   ========================================================================== */

:root {
  /* Paleta da marca */
  --terracota-900: #9F4E39;
  --terracota-600: #C16C45;
  --terracota-300: #D88D6F;
  --cinza-900: #3C3C3B;
  --cinza-600: #706F6F;
  --cinza-300: #B2B2B2;
  --verde-900: #064949;
  --verde-600: #0C716B;
  --verde-300: #89BE9F;
  --tinta: #241F21;

  /* Neutros de interface */
  --fundo: #F7F6F4;
  --branco: #FFFFFF;
  --texto: #241F21;
  --texto-2: #4F4B49;
  --texto-3: #5C5856;
  --linha: #E4E2DE;
  --linha-2: #CFCBC5;
  --campo: #B2B2B2;

  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1280px;
  --gutter: clamp(20px, 5.5vw, 80px);
  --sec-y: clamp(64px, 9vw, 112px);
  --radius: 3px;
  --header-h: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terracota-900); }
a:hover { color: #7A3A2A; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.01em; color: var(--texto); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--verde-600); outline-offset: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--tinta); color: #fff; padding: 12px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: var(--sec-y) 0; overflow: hidden; }
.section--white { background: var(--branco); border-top: 1px solid var(--linha); }

.eyebrow {
  display: block;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--verde-600);
}
.section-title { font-size: clamp(32px, 4vw, 46px); font-weight: 700; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 56px; position: relative; }
.section-head--split { max-width: none; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 64px; }
.section-head--split > div { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.section-head--split > p { font-size: 18px; color: var(--texto-3); max-width: 420px; line-height: 1.55; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border-radius: var(--radius); border: 1.5px solid transparent;
  font-size: 18px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn--primary { background: var(--terracota-900); color: #fff; }
.btn--primary:hover { background: #88412F; color: #fff; }
.btn--outline { border-color: var(--tinta); color: var(--tinta); background: transparent; }
.btn--outline:hover { background: var(--tinta); color: #fff; }
.btn--dark { background: var(--tinta); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--sm { min-height: 48px; padding: 0 22px; font-size: 16px; }

/* Estilhaços (grafismo da marca) */
.shards { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.project-band .wrap, .quote .wrap { z-index: 2; }
.shard { position: absolute; width: 11px; height: 11px; display: block; }
.shard--a { clip-path: polygon(0 0, 100% 25%, 30% 100%); }
.shard--b { clip-path: polygon(20% 0, 100% 70%, 0 100%); }
.shard--c { clip-path: polygon(0 30%, 100% 0, 70% 100%); }
.shard--d { clip-path: polygon(0 0, 100% 0, 55% 100%); }

/* ==========================================================================
   Cabeçalho
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--linha);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(36,31,33,0.08); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 56px; width: auto; }
.nav { display: flex; align-items: center; gap: 36px; }
.nav a:not(.btn) { color: var(--texto); text-decoration: none; font-weight: 500; font-size: 16px; position: relative; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--terracota-900); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }
.menu-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; padding: 0; align-items: center; justify-content: center; cursor: pointer; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 56px; align-items: center; position: relative; }
.hero__text { display: flex; flex-direction: column; gap: 28px; position: relative; }
.hero h1 { font-size: clamp(40px, 5.2vw, 62px); line-height: 1.04; letter-spacing: -0.015em; }
.hero__lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--texto-2); max-width: 540px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }
.hero__media { position: relative; height: 640px; }
.hero__facets { position: absolute; left: 40px; top: 30px; right: calc(-1 * var(--gutter)); bottom: -96px; background: var(--terracota-900); overflow: hidden; }
.hero__facets::before, .hero__facets::after { content: ''; position: absolute; inset: 0; }
.hero__facets::before { background: var(--terracota-600); clip-path: polygon(0 0, 46% 0, 62% 100%, 0 100%); }
.hero__facets::after { background: var(--terracota-300); clip-path: polygon(30% 0, 100% 0, 100% 18%, 52% 58%); }
.hero__img-main { position: absolute; right: 40px; top: 0; width: min(440px, 78%); height: 580px; object-fit: cover; box-shadow: 0 24px 48px rgba(36,31,33,0.22); }
.hero__img-small { position: absolute; left: 0; bottom: 0; width: min(260px, 46%); height: 340px; object-fit: cover; border: 8px solid var(--fundo); }
.hero__badge { position: absolute; right: 64px; bottom: 24px; background: #fff; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.hero__badge span { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--verde-600); }
.hero__badge strong { font-weight: 600; font-size: 17px; }

/* ==========================================================================
   Garantias
   ========================================================================== */
.trust { background: #fff; border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); padding: 56px 0; }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px; }
.trust li { display: flex; flex-direction: column; gap: 12px; }
.trust li::before { content: ''; width: 18px; height: 18px; display: block; background: var(--c, var(--terracota-600)); clip-path: polygon(0 20%, 100% 0, 80% 100%); }
.trust h3 { font-size: 19px; font-weight: 600; line-height: 1.25; }
.trust p { font-size: 16px; color: var(--texto-3); line-height: 1.55; }

/* ==========================================================================
   Serviços
   ========================================================================== */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; position: relative; }
.service { background: #fff; border: 1px solid #ECEAE6; padding: 32px 28px 34px; display: flex; flex-direction: column; gap: 20px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.service:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(36,31,33,0.08); border-color: #E0DDD8; }
.service__icon { width: 96px; height: 96px; background: var(--fundo); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service__icon svg { width: 66px; height: 66px; }
.service h3 { font-size: 20px; font-weight: 600; line-height: 1.25; margin-bottom: 8px; }
.service p { font-size: 15px; color: var(--texto-3); line-height: 1.55; }

/* ==========================================================================
   Engenharia & Arquitetura
   ========================================================================== */
.project-band { position: relative; background: var(--verde-900); color: #fff; padding: clamp(64px, 8vw, 96px) 0; overflow: hidden; }
.project-band::before, .project-band::after { content: ''; position: absolute; inset: 0; }
.project-band::before { background: var(--verde-600); clip-path: polygon(0 0, 38% 0, 70% 100%, 0 100%); }
.project-band::after { background: var(--verde-300); clip-path: polygon(0 0, 30% 0, 0 62%); }
.project-band .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 80px; align-items: center; }
.project-band__intro { display: flex; flex-direction: column; gap: 20px; padding-left: 40px; }
.project-band .eyebrow, .project-band h2 { color: #fff; }
.project-band__intro p { color: #E4F1EC; font-size: 18px; }
.project-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project-card { background: #fff; color: var(--texto); padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.project-card .eyebrow { font-size: 13px; letter-spacing: 0.14em; color: var(--verde-600); }
.project-card h3 { font-size: 24px; font-weight: 600; line-height: 1.2; }
.project-card p { font-size: 16px; color: var(--texto-3); line-height: 1.55; }

/* ==========================================================================
   Antes & depois
   ========================================================================== */
.ba { position: relative; background: var(--tinta); color: #F7F6F4; padding: var(--sec-y) 0; overflow: hidden; }
.ba__texture { position: absolute; inset: 0; background: url('../img/textura-betao.jpg') center / cover; opacity: 0.28; }
.ba .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 72px; align-items: center; }
.ba__intro { display: flex; flex-direction: column; gap: 24px; }
.ba .eyebrow { color: var(--terracota-300); }
.ba h2 { color: #fff; }
.ba__intro > p { color: #D9D6D2; font-size: 18px; line-height: 1.55; }
.ba__tabs { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.ba__tab {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; min-height: 56px; padding: 14px 18px; border-radius: var(--radius); cursor: pointer; text-align: left;
  background: rgba(36,31,33,0.55); color: #F7F6F4; border: 1px solid #706F6F;
  transition: background-color .2s, color .2s, border-color .2s;
}
.ba__tab strong { font-weight: 500; font-size: 17px; }
.ba__tab span { font-size: 15px; color: #D9D6D2; }
.ba__tab:hover { border-color: #B2B2B2; }
.ba__tab[aria-selected="true"] { background: #fff; color: var(--texto); border-color: #fff; }
.ba__tab[aria-selected="true"] span { color: var(--texto-3); }

.compare { --pos: 50%; position: relative; height: 660px; overflow: hidden; background: #111; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare__after { clip-path: inset(0 0 0 var(--pos)); }
.compare__label { position: absolute; top: 24px; padding: 8px 14px; font-size: 13px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; z-index: 2; }
.compare__label--before { left: 24px; background: rgba(36,31,33,0.85); }
.compare__label--after { right: 24px; background: var(--terracota-900); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; z-index: 2; }
.compare__handle::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23241F21' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6-6 6 6 6'/%3E%3Cpath d='m15 6 6 6-6 6'/%3E%3C/svg%3E") center / 26px no-repeat;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.compare:focus-within .compare__handle::after { outline: 3px solid var(--terracota-300); outline-offset: 3px; }
.ba__caption { margin-top: 16px; font-size: 16px; color: #D9D6D2; }

/* ==========================================================================
   Obras
   ========================================================================== */
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; list-style: none; margin: 0; padding: 0; position: relative; }
.work { display: flex; flex-direction: column; gap: 18px; }
.work__img { overflow: hidden; aspect-ratio: 4 / 5; background: #E9E6E1; }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.work:hover .work__img img { transform: scale(1.04); }
.work__meta { display: flex; flex-direction: column; gap: 6px; }
.work__meta .eyebrow { font-size: 13px; letter-spacing: 0.14em; }
.work h3 { font-size: 21px; font-weight: 600; line-height: 1.25; }
.work p { font-size: 16px; color: var(--texto-3); line-height: 1.5; }

/* ==========================================================================
   Processo
   ========================================================================== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 4px solid var(--c); }
.step__n { font-weight: 700; font-size: 44px; line-height: 1; color: var(--c); }
.step h3 { font-size: 21px; font-weight: 600; line-height: 1.25; }
.step p { font-size: 16px; color: var(--texto-3); line-height: 1.55; }

/* ==========================================================================
   Sobre
   ========================================================================== */
.about .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: center; }
.about__panel { position: relative; aspect-ratio: 1 / 1; max-height: 520px; background: var(--cinza-600); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.about__panel::before, .about__panel::after { content: ''; position: absolute; inset: 0; }
.about__panel::before { background: var(--cinza-900); clip-path: polygon(0 0, 68% 0, 42% 46%, 0 12%); }
.about__panel::after { background: var(--cinza-300); clip-path: polygon(68% 0, 100% 0, 100% 88%, 42% 46%); }
.about__panel img { position: relative; z-index: 1; width: 42%; max-width: 220px; }
.about__text { display: flex; flex-direction: column; gap: 24px; }
.about__text > p { font-size: 19px; color: var(--texto-2); }
.chips { list-style: none; margin: 0; padding: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 9px 16px; border: 1px solid var(--linha-2); border-radius: 40px; font-size: 15px; }

/* ==========================================================================
   Orçamento
   ========================================================================== */
.quote { position: relative; background: var(--terracota-900); color: #fff; padding: var(--sec-y) 0; overflow: hidden; }
.quote::before, .quote::after { content: ''; position: absolute; inset: 0; }
.quote::before { background: var(--terracota-600); clip-path: polygon(44% 0, 100% 0, 100% 100%, 64% 100%); }
.quote::after { background: var(--terracota-300); clip-path: polygon(70% 0, 100% 0, 100% 46%); }
.quote .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 80px; }
.quote__intro { display: flex; flex-direction: column; gap: 24px; }
.quote .eyebrow, .quote h2 { color: #fff; }
.quote__intro > p { color: #FBEDE7; font-size: 19px; }
.contact-list { list-style: none; margin: 0; padding: 16px 0 0; display: flex; flex-direction: column; gap: 18px; }
.contact-list a, .contact-list address { display: flex; gap: 14px; align-items: flex-start; color: #fff; text-decoration: none; font-size: 20px; font-weight: 500; font-style: normal; }
.contact-list address { font-size: 17px; font-weight: 400; color: #FBEDE7; line-height: 1.5; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-list svg { flex-shrink: 0; margin-top: 2px; }

.form { background: #fff; color: var(--texto); padding: clamp(24px, 3.2vw, 44px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; box-shadow: 0 24px 60px rgba(36,31,33,0.25); align-self: start; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 500; }
.field--full { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--campo); border-radius: var(--radius);
  font-size: 17px; font-weight: 400; background: var(--fundo); transition: border-color .2s, background-color .2s;
}
.field textarea { padding: 14px 16px; min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--verde-600); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(12,113,107,0.18); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: #B3261E; }
.field__error { font-size: 13px; font-weight: 400; color: #B3261E; min-height: 0; }
.req { color: var(--terracota-900); }

.upload { grid-column: 1 / -1; position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; border: 1.5px dashed var(--campo); border-radius: var(--radius); color: var(--texto-2); font-size: 15px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.upload:hover, .upload:focus-within { border-color: var(--verde-600); background: #F2F7F6; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload__files { font-size: 13px; color: var(--texto-3); }

.consent { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--texto-3); }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--verde-600); flex-shrink: 0; }
.hp { position: absolute !important; left: -9999px !important; }
.form .btn { grid-column: 1 / -1; min-height: 58px; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.form__status { grid-column: 1 / -1; font-size: 15px; padding: 14px 16px; border-radius: var(--radius); display: none; }
.form__status.is-ok { display: block; background: #E6F2EF; color: var(--verde-900); }
.form__status.is-err { display: block; background: #FBECEA; color: #8C1D18; }

/* ==========================================================================
   Rodapé
   ========================================================================== */
.site-footer { position: relative; background: var(--tinta); color: #CFCBC5; padding: 80px 0 40px; overflow: hidden; font-size: 16px; }
.site-footer__texture { position: absolute; inset: 0; background: url('../img/textura-betao.jpg') center / cover; opacity: 0.22; }
.site-footer .wrap { position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
.footer-grid img { width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h2 { font-size: 16px; font-weight: 500; color: #fff; letter-spacing: 0; line-height: 1.4; }
.footer-col a { color: #CFCBC5; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-col address { font-style: normal; line-height: 1.5; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; padding-top: 24px; border-top: 1px solid #4A4547; font-size: 14px; color: #A8A39F; }
.footer-bottom a { color: #A8A39F; }

/* Barra de contacto rápido (telemóvel) */
.quickbar { display: none; }

/* Revelação ao fazer scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1180px) {
  .nav { gap: 24px; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-band .wrap { grid-template-columns: 1fr; gap: 40px; }
  .project-band__intro { padding-left: 0; max-width: 620px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  :root { --header-h: 72px; }
  .brand img { height: 44px; }
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--linha); box-shadow: 0 20px 40px rgba(36,31,33,0.12);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--linha); font-size: 18px; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 20px; }

  .hero .wrap, .ba .wrap, .about .wrap, .quote .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero__media { height: 460px; max-width: 560px; }
  .hero__img-main { height: 400px; right: 20px; width: 70%; }
  .hero__img-small { height: 240px; width: 40%; }
  .hero__facets { left: 30px; right: calc(-1 * var(--gutter)); bottom: -64px; }
  .hero__badge { right: 36px; bottom: 16px; }
  .section-head--split { flex-direction: column; align-items: flex-start; gap: 20px; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .compare { height: 520px; }
  .about__panel { max-height: 360px; aspect-ratio: 16 / 10; }
  .about__panel img { width: 28%; }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .hero .shards, .project-band .shards, .quote .shards { display: none; }
  .hero__ctas .btn { width: 100%; }
  .hero__media { height: 400px; }
  .hero__img-main { height: 340px; width: 72%; right: 16px; }
  .hero__img-small { height: 200px; width: 44%; border-width: 6px; }
  .hero__facets { left: 24px; top: 24px; bottom: -48px; }
  .hero__badge { display: none; }
  .trust { padding: 40px 0; }
  .trust ul { grid-template-columns: 1fr; gap: 28px; }
  .section-head { margin-bottom: 36px; }
  .services { grid-template-columns: 1fr; gap: 12px; }
  .service { flex-direction: row; align-items: center; padding: 14px; gap: 16px; }
  .service__icon { width: 72px; height: 72px; }
  .service__icon svg { width: 52px; height: 52px; }
  .service h3 { font-size: 17px; margin-bottom: 2px; }
  .service p { font-size: 14px; }
  .project-cards { grid-template-columns: 1fr; gap: 12px; }
  .project-card { padding: 24px; }
  .ba__tabs { flex-direction: row; flex-wrap: wrap; }
  .ba__tab { width: auto; min-height: 44px; padding: 0 14px; border-radius: 40px; }
  .ba__tab { gap: 8px; }
  .ba__tab strong { font-size: 15px; }
  .ba__tab span { font-size: 13px; }
  .compare { height: 440px; }
  .compare__label { top: 12px; font-size: 12px; padding: 6px 10px; }
  .compare__label--before { left: 12px; } .compare__label--after { right: 12px; }
  .works { grid-template-columns: 1fr; gap: 32px; }
  .work__img { aspect-ratio: 4 / 3; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .step { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; padding-top: 18px; border-top-width: 2px; }
  .step__n { font-size: 28px; width: 44px; }
  .step > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }
  .step h3 { font-size: 18px; }
  .about__panel { aspect-ratio: 3 / 2; }
  .form { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid img { width: 220px; }
  .footer-bottom { flex-direction: column; gap: 8px; }

  .quickbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--linha);
  }
  .quickbar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: var(--radius); font-weight: 500; font-size: 17px; text-decoration: none; }
  .quickbar__call { border: 1.5px solid var(--tinta); color: var(--tinta); }
  .quickbar__wa { background: var(--verde-600); color: #fff; }
  .quickbar__wa:hover { color: #fff; }
}
