/* =========================================================================
   Mecânica Sabiá — landing page
   Organização: tokens → base → utilitários → componentes → seções → responsivo
   ========================================================================= */

/* ---------- Fonte (Archivo variável, auto-hospedada, só latin) ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ----------
   [VALIDAR COM CLIENTE] Não há paleta oficial. Azul e creme foram amostrados da fachada
   (azulejos azuis, letreiro e paredes claras). Confirmar com o cliente antes de reutilizar
   em outras peças. */
:root {
  --azul: #1C3D94;          /* azulejo da fachada  [VALIDAR COM CLIENTE] */
  --azul-900: #112664;
  --azul-050: #EAEEF8;
  --creme: #F1ECE1;         /* paredes da fachada  [VALIDAR COM CLIENTE] */
  --papel: #FAF8F3;
  --branco: #FFFFFF;
  --tinta: #141821;
  --tinta-2: #474E5E;
  --linha: #DDD6C7;
  --estrela: #9A6408;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-lg: 32px;
  --r-md: 24px;
  --r-sm: 20px;
  --r-pill: 999px;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(72px, 10vw, 128px);

  --shadow: 0 1px 2px rgba(20, 24, 33, .05), 0 12px 32px -16px rgba(20, 24, 33, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
address { font-style: normal; }
figure { margin: 0; }

:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 6px; }
.tiles :focus-visible, .closing :focus-visible { outline-color: var(--branco); }

/* ---------- Utilitários ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--azul); color: var(--branco); padding: 12px 18px; border-radius: 12px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Elemento assinatura: o azulejo azul da fachada, como grade sutil.
   Usado só em quatro blocos: selo do herói, card de injeção, bloco 1975 e chamada final. */
.tiles {
  background-color: var(--azul);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  color: var(--branco);
}

.eyebrow {
  font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  font-stretch: 112%; color: var(--azul); margin-bottom: 18px;
}
.section { padding-block: var(--section); }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 760px; }
.section-title { font-size: clamp(1.875rem, 4.2vw, 3.25rem); font-stretch: 110%; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-pill);
  font: 700 1rem/1.2 var(--font); text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 44px; padding: 8px 18px; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--azul); color: var(--branco); }
.btn--primary:hover { background: var(--azul-900); }
.btn--ghost { background: transparent; color: var(--tinta); border-color: var(--tinta); }
.btn--ghost:hover { background: var(--tinta); color: var(--branco); }
.btn--light { background: var(--branco); color: var(--azul-900); }
.btn--light:hover { background: var(--creme); }
.btn--outline-light { background: transparent; color: var(--branco); border-color: rgba(255, 255, 255, .85); }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--tinta); color: var(--tinta);
}
.link-arrow { font-weight: 700; color: var(--azul); text-underline-offset: 4px; }
.link-arrow::after { content: " →"; }

/* ---------- Cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 243, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--linha); }
.topbar { background: var(--azul-900); color: var(--branco); font-size: .875rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.topbar__link { text-decoration: none; font-weight: 700; min-height: 44px; }
.topbar__link:hover { text-decoration: underline; }

.navbar { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.wordmark { display: inline-flex; flex-direction: column; justify-content: center; min-height: 48px; text-decoration: none; color: var(--azul); line-height: .9; }
.wordmark__top { font-size: .72rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; font-stretch: 120%; margin-bottom: 4px; }
.wordmark__name { font-size: 1.75rem; font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: .02em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; color: var(--tinta-2); padding-block: 10px; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--azul); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav a:hover { color: var(--tinta); }
.nav a:hover::after { transform: scaleX(1); }
.navbar__call { display: none; }

/* ---------- Herói ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(64px, 9vw, 120px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero__title { font-size: clamp(2.375rem, 6.4vw, 4.75rem); font-stretch: 115%; font-weight: 850; letter-spacing: -0.035em; line-height: 1; margin-bottom: 28px; color: var(--tinta); }
.hero__lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--tinta-2); max-width: 56ch; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.rating { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; padding: 10px 18px 10px 14px; border-radius: var(--r-pill); background: var(--branco); border: 1px solid var(--linha); min-height: 44px; }
.rating:hover { border-color: var(--tinta-2); }
.rating__stars, .reviews__stars, .review__stars { color: var(--estrela); letter-spacing: 2px; }
.rating__text { font-size: .9375rem; color: var(--tinta-2); }
.rating__text strong { color: var(--tinta); }

.hero__media { position: relative; justify-self: end; width: 100%; max-width: 520px; }
.hero__photo { width: 100%; aspect-ratio: 567 / 450; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.hero__badge {
  position: absolute; left: clamp(-40px, -3vw, -16px); bottom: clamp(-36px, -3vw, -20px);
  display: flex; flex-direction: column; padding: 18px 24px 20px; border-radius: var(--r-md);
  box-shadow: var(--shadow);
}
.hero__badge-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .9; }
.hero__badge-year { font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 900; font-stretch: 125%; line-height: 1; }

/* ---------- Especialização dupla ---------- */
.duo { background: var(--creme); }
.duo__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: stretch; }
.duo-card { border-radius: var(--r-lg); overflow: hidden; display: grid; }
.duo-card__title { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-stretch: 108%; margin-bottom: 16px; }
.duo-card__tag { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.duo-card__body { padding: clamp(28px, 4vw, 44px); }

.duo-card--classic { background: var(--branco); grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }
.duo-card--classic .duo-card__tag { color: var(--azul); }
.duo-card--classic .duo-card__body p:not(.duo-card__tag) { color: var(--tinta-2); }
.duo-card--classic .duo-card__media img { width: 100%; height: 100%; object-fit: cover; }

.duo-card--modern { grid-template-rows: auto 1fr; }
.duo-card--modern .duo-card__body p { color: rgba(255, 255, 255, .92); }
.duo-card__media--wide { padding: 0 clamp(16px, 2.4vw, 24px) clamp(16px, 2.4vw, 24px); }
.duo-card__media--wide img { width: 100%; max-width: 559px; border-radius: var(--r-sm); }
.duo-card__media--wide figcaption { font-size: .875rem; margin-top: 12px; color: rgba(255, 255, 255, .9); }

/* ---------- Serviços + pedido ---------- */
.services__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linha); }
.service { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--linha); }
.service__num { font-size: 1.25rem; font-weight: 800; font-stretch: 125%; color: var(--azul); line-height: 1.5; }
.service__title { font-size: 1.25rem; font-stretch: 105%; margin-bottom: 6px; }
.service p { color: var(--tinta-2); }

.request { position: sticky; top: 140px; }
.request__card { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r-lg); padding: clamp(24px, 3.4vw, 40px); box-shadow: var(--shadow); }
.request__title { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-stretch: 108%; margin-bottom: 10px; }
.request__intro { color: var(--tinta-2); margin-bottom: 24px; }
.request__alt { margin: 18px 0 0; text-align: center; color: var(--tinta-2); font-size: .9375rem; }
.request__alt a { color: var(--azul); font-weight: 700; display: inline-block; padding-block: 12px; }
.request .btn--lg { padding-inline: 18px; font-size: 1rem; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .9375rem; }
.field__hint { font-weight: 500; color: var(--tinta-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: 500 1rem/1.4 var(--font); color: var(--tinta);
  background: var(--papel); border: 1.5px solid #8E8778; border-radius: 14px; appearance: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: #6B6F7A; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--azul); outline-offset: 1px; border-color: var(--azul); }
.field [aria-invalid="true"] { border-color: #B42318; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--tinta); border-bottom: 2px solid var(--tinta); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { padding-right: 40px; }
.form__error { margin: 0; color: #B42318; font-weight: 600; font-size: .9375rem; }

/* ---------- A oficina ---------- */
.story { background: var(--creme); }
.story__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.story__year { container-type: inline-size; border-radius: var(--r-lg); padding: clamp(32px, 5vw, 56px); display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 4 / 5; max-height: 560px; }
.story__year-label { font-size: .875rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.story__year-num { font-size: clamp(3.5rem, 27cqi, 8rem); font-weight: 900; font-stretch: 125%; line-height: .9; letter-spacing: -0.03em; margin: 8px 0 12px; }
.story__year-date { font-size: 1.125rem; font-weight: 600; }
.story__copy > p:not(.eyebrow) { color: var(--tinta-2); max-width: 60ch; margin-top: 24px; font-size: 1.125rem; }
.story__copy strong { color: var(--tinta); }
.story__photos { display: flex; gap: 20px; margin-top: 36px; flex-wrap: wrap; }
.photo-card { width: 210px; }
.photo-card:nth-child(2) { margin-top: 32px; }
.photo-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-sm); box-shadow: var(--shadow); }
.photo-card figcaption { font-size: .875rem; color: var(--tinta-2); margin-top: 10px; }

/* ---------- Avaliações ---------- */
.reviews__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 56px); }
.reviews__head .section-title { max-width: 18ch; }
.reviews__score { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 1.125rem; color: var(--tinta-2); }
.reviews__score strong { color: var(--tinta); }
.reviews__stars { font-size: 1.25rem; }
.reviews__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; }
.review { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r-md); padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; }
.review--feature { grid-column: 1; grid-row: 1 / span 3; background: var(--azul-050); border-color: transparent; }
.review--feature .review__text { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; }
.review--feature::before { content: "\201C"; display: block; font-size: 5rem; line-height: .6; height: 36px; font-weight: 900; color: var(--azul); }
.review__stars { margin: 0 0 14px; font-size: 1rem; }
.review__text { margin: 0 0 20px; flex: 1; }
.review__author { font-weight: 800; font-stretch: 108%; }
.reviews__more { margin-top: 32px; }
.reviews__more a { display: inline-block; padding-block: 10px; }

/* ---------- Como chegar ---------- */
.location { padding-top: 0; }
.location__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.facts { margin: 32px 0 20px; display: grid; gap: 0; border-top: 1px solid var(--linha); }
.facts__row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--linha); }
.facts dt { font-weight: 700; font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--azul); padding-top: 3px; }
.facts dd { margin: 0; }
.facts dd a { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; }
.location__note { color: var(--tinta-2); }
.location__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.location__map { border-radius: var(--r-lg); overflow: hidden; min-height: 360px; background: var(--creme); border: 1px solid var(--linha); }
.location__map iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }

/* ---------- Chamada final ---------- */
.closing { padding-bottom: var(--section); }
.closing__card { border-radius: var(--r-lg); padding: clamp(40px, 7vw, 96px) clamp(24px, 6vw, 88px); text-align: left; }
.closing__title { font-size: clamp(2rem, 5vw, 3.75rem); font-stretch: 115%; max-width: 16ch; margin-bottom: 18px; }
.closing__text { font-size: 1.1875rem; max-width: 46ch; margin-bottom: 32px; color: rgba(255, 255, 255, .92); }
.closing__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--azul-900); color: rgba(255, 255, 255, .9); padding-top: 64px; font-size: .9375rem; }
.site-footer a { color: var(--branco); }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.wordmark--footer { color: var(--branco); }
.footer__tagline { margin-top: 16px; max-width: 30ch; }
.footer__heading { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; color: var(--branco); }
.site-footer p a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.footer__bottom { font-size: .875rem; }
.footer__bottom p { border-top: 1px solid rgba(255, 255, 255, .18); padding-block: 20px; margin: 0; }

/* ---------- Barra fixa mobile ---------- */
.mobile-bar { display: none; }

/* ---------- Revelação suave ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (hover: hover) {
  .hero__photo, .photo-card img, .duo-card__media img { transition: transform .5s var(--ease); }
  .duo-card:hover .duo-card__media img, .photo-card:hover img { transform: scale(1.02); }
}

/* =========================================================================
   Responsivo
   ========================================================================= */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .duo__grid { grid-template-columns: 1fr; }
  .duo-card--classic { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .duo-card--modern { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
  .duo-card--modern .duo-card__media--wide { padding: clamp(16px, 2.4vw, 24px); }
}

@media (max-width: 900px) {
  .topbar { display: none; }
  .nav, .navbar__cta { display: none; }
  .navbar { justify-content: space-between; min-height: 68px; }
  .navbar__call { display: inline-grid; }
  html { scroll-padding-top: 76px; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { justify-self: start; max-width: 567px; margin-bottom: 24px; }
  .hero__badge { left: auto; right: 16px; bottom: -24px; }

  .services__grid { grid-template-columns: 1fr; }
  .request { position: static; }

  .story__grid { grid-template-columns: 1fr; }
  .story__year { aspect-ratio: auto; min-height: 240px; }

  .location__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr auto; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(250, 248, 243, .97); border-top: 1px solid var(--linha);
    backdrop-filter: blur(10px);
  }
  .mobile-bar .btn { min-height: 52px; }
  .mobile-bar__call { padding-inline: 18px; }
  body { padding-bottom: 76px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero__actions .btn, .request .btn--lg { width: 100%; padding-inline: 16px; font-size: 1rem; gap: 8px; }
  .mobile-bar .btn { font-size: .9375rem; padding-inline: 14px; gap: 8px; }
  .hero__badge { padding: 14px 18px 16px; }
  .duo-card--classic { grid-template-columns: 1fr; }
  .duo-card--classic .duo-card__media { max-height: 300px; overflow: hidden; }
  .duo-card--modern { grid-template-columns: 1fr; }
  .duo-card--modern .duo-card__media--wide { padding-top: 0; }
  .service { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 20px 0; }
  .reviews__grid { grid-template-columns: 1fr; }
  .review--feature { grid-row: auto; }
  .photo-card { width: calc(50% - 10px); }
  .photo-card:nth-child(2) { margin-top: 24px; }
  .facts__row { grid-template-columns: 1fr; gap: 4px; }
  .closing__actions .btn, .location__actions .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 400px) {
  .btn--lg .icon { display: none; }
}
