/* Camada responsiva final — carregada após os estilos do projeto. */

p {
  text-align: left;
}

.hero-copy > p,
.about-copy > p,
.service-card > p,
.page-hero-inner > p:last-child,
.story-copy > p:not(.eyebrow),
.values-grid article > p,
.catalog-heading > p,
.catalog-body > p,
.contact-intro > p:not(.eyebrow),
.form-heading > p,
.location-heading > div:first-child > p:not(.eyebrow),
.error-page p:not(.eyebrow),
.footer-about > p {
  text-align: justify;
  text-justify: inter-word;
}

.eyebrow,
.benefits p,
.contact-list p,
.contact-list span,
.location-address p,
.cta-band p,
.form-status,
.footer-column p {
  text-align: left;
}

.skip-link { font-size: 16px; }

/* Base desktop */
.footer-grid { grid-template-columns: 1.15fr .8fr 1fr 1.35fr; }

/* Até 375px */
@media (max-width: 375px) {
  .container { width: calc(100% - 24px); }
  .topbar-contacts a:first-child { display: none; }
  .topbar-inner { justify-content: center; }
  .socials { margin-left: auto; }
  .navbar { height: 72px; }
  .brand-lockup { height: 54px; gap: 7px; }
  .brand-lockup img:first-child { width: auto; height: 42px; }
  .brand-lockup img:last-child { width: auto; height: 38px; }
  .brand-divider { height: 34px; }
  .main-nav { top: 72px; }
  .hero h1 { font-size: 36px; }
  .page-hero h1, .error-page h1 { font-size: 35px; }
  .page-hero-inner > p:last-child { font-size: 16px; }
  .cta-band h2 { font-size: 22px; }
  .contact-list > div { grid-template-columns: 42px minmax(0, 1fr); gap: 10px; }
  .contact-list > div > i { width: 42px; height: 42px; }
  .copyright-inner { align-items: flex-start; flex-direction: column; padding-block: 14px; }
}

/* 376–479px */
@media (min-width: 376px) and (max-width: 479px) {
  .container { width: calc(100% - 28px); }
  .topbar-contacts a:first-child { display: none; }
  .topbar-inner { justify-content: center; }
  .socials { margin-left: auto; }
  .page-hero h1, .error-page h1 { font-size: 38px; }
  .contact-list > div { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .contact-list > div > i { width: 44px; height: 44px; }
}

/* Comportamento compartilhado até 479px */
@media (max-width: 479px) {
  .hero-actions, .error-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .location-address { grid-template-columns: 44px minmax(0, 1fr); padding-left: 0; }
  .map-frame { height: 340px; }
}

/* 480–767px */
@media (min-width: 480px) and (max-width: 767px) {
  .container { width: min(100% - 36px, 720px); }
  .hero h1 { font-size: clamp(40px, 8vw, 48px); }
  .page-hero h1 { font-size: clamp(40px, 8vw, 48px); }
  .map-frame { height: 380px; }
}

/* Todos os celulares */
@media (max-width: 767px) {
  .catalog-grid, .values-grid, .footer-grid { grid-template-columns: 1fr; }
  .catalog-heading, .location-heading { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid > div + div, .footer-grid > div:nth-child(3) {
    padding: 24px 0 0;
    border-top: 1px solid #ddd5c8;
    border-left: 0;
  }
  .cta-grid { grid-template-columns: 42px 1fr; }
  .cta-grid .button { grid-column: 1 / -1; }
  .location-address { border-top: 1px solid var(--gold); border-left: 0; padding-top: 22px; }
}

/* Navegação móvel e tablets até 991px */
@media (max-width: 991px) {
  html { scroll-padding-top: 78px; }
  .navbar { position: relative; height: 78px; }
  .nav-inner { gap: 20px; }
  .brand-lockup { height: 58px; gap: 12px; }
  .brand-lockup img:first-child { width: auto; height: 50px; }
  .brand-lockup img:last-child { width: auto; height: 46px; }
  .brand-divider { height: 42px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    z-index: 20;
    inset: 78px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 22px;
    background: #fff;
    box-shadow: 0 14px 24px rgba(0, 0, 0, .14);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 4px; }
  .main-nav a::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* 768–991px */
@media (min-width: 768px) and (max-width: 991px) {
  .container { width: min(100% - 48px, 900px); }
  .catalog-grid { grid-template-columns: 1fr 1fr; }
  .story-grid, .contact-layout { grid-template-columns: 1fr; gap: 52px; }
  .story-grid .image-placeholder { width: calc(100% - 18px); max-width: 680px; }
  .values-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .values-grid article { padding: 32px 22px; }
  .catalog-heading, .location-heading { grid-template-columns: 1fr; gap: 26px; }
  .cta-grid { grid-template-columns: 54px 1fr auto; }
  .cta-band p { display: none; }
  .footer-grid > div:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* 992–1199px */
@media (min-width: 992px) and (max-width: 1199px) {
  .container { width: min(100% - 48px, 1080px); }
  .main-nav { gap: 18px; }
  .brand-lockup { gap: 16px; }
  .brand-lockup img:first-child, .brand-lockup img:last-child { height: 52px; }
  .catalog-grid { gap: 22px; }
  .story-grid, .contact-layout { gap: 52px; }
  .cta-grid { grid-template-columns: 58px minmax(280px, 1.4fr) minmax(200px, 1fr) 215px; gap: 16px; }
  .cta-band .button-gold { width: 215px; }
  .footer-grid { grid-template-columns: 1.05fr .8fr 1fr 1.25fr; gap: 18px; }
  .footer-grid > div + div { padding-left: 18px; }
}

/* 1200–1439px */
@media (min-width: 1200px) and (max-width: 1439px) {
  .container { width: min(1160px, calc(100% - 80px)); }
}

/* 1440px+ */
@media (min-width: 1440px) {
  .container { width: min(1240px, calc(100% - 96px)); }
  .hero-grid { min-height: 580px; }
  .page-hero-inner { min-height: 350px; }
  .catalog-grid { gap: 32px; }
}

/* Precedência final para as faixas menores. */
@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-media { display: none; }
  .about-grid { display: flex; flex-direction: column; }
  .about-grid .union-card { order: 1; }
  .about-grid .about-copy { order: 2; }
  .benefits-grid { grid-template-columns: 1fr; }
  .benefits article,
  .benefits article:first-child,
  .benefits article:nth-child(2) {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 90px;
    padding: 15px 4px;
    border-right: 0;
    border-bottom: 1px solid #ddd5ca;
  }
  .benefits article:last-child { border-bottom: 0; }
  .benefits .line-icon {
    display: grid;
    place-items: center;
    width: 56px;
    min-width: 56px;
    text-align: center;
  }
  .benefits p { width: 100%; max-width: none; }
}

@media (max-width: 375px) {
  .navbar { height: 72px; }
  .main-nav { inset: 72px 0 auto; }
  .brand-lockup { height: 54px; gap: 7px; }
  .brand-lockup img:first-child { height: 42px; }
  .brand-lockup img:last-child { height: 38px; }
  .brand-divider { height: 34px; }
}

/* Escala tipográfica dos títulos no mobile */
@media (max-width: 767px) {
  .hero h1,
  .page-hero h1,
  .error-page h1 {
    font-size: clamp(36px, 8vw, 42px);
    line-height: 1.08;
  }

  .about h2,
  .section-heading h2,
  .internal-section h2,
  .catalog-heading h2,
  .location-heading h2 {
    font-size: clamp(31px, 7.8vw, 36px);
    line-height: 1.12;
  }

  .form-heading h3 {
    font-size: 28px;
  }

  .cta-band h2 {
    font-size: 22px;
  }

  .catalog-body h3 {
    font-size: 20px;
  }
}

@media (max-width: 375px) {
  .hero h1,
  .page-hero h1,
  .error-page h1 {
    font-size: 34px;
  }

  .about h2,
  .section-heading h2,
  .internal-section h2,
  .catalog-heading h2,
  .location-heading h2 {
    font-size: 30px;
  }
}
