@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;1,500&display=swap');

/* GLOBAL & LAYOUT REFINEMENT */
body {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
.history-page {
  min-height: 100vh;
  background: #f5f4ef;
  color: #142536;
  font-family: Inter, Arial, sans-serif;
  overflow-x: hidden;
}

/* HEADER */
.history-page__header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 88px;
  padding: 0 clamp(24px, 6vw, 96px);
  gap: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0e2a47;
  border-bottom: 1px solid rgba(244, 196, 0, 0.3);
  box-shadow: 0 10px 28px rgba(4, 20, 35, 0.18);
}
.history-page__header img {
  width: 154px;
  height: auto;
}
.history-page__header nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 42px);
  margin-left: auto;
}
.history-page__header nav a, .history-page__back {
  font: 500 11px 'DM Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #dbe5e8;
  text-decoration: none;
  transition: color 0.2s ease;
}
.history-page__header nav a:hover, .history-page__header nav .is-active, .history-page__back:hover {
  color: #f4c400;
}
.history-page__header-cta {
  background: #f4c400 !important;
  color: #0e2a47 !important;
  padding: 13px 17px;
  font-weight: 700 !important;
}
.history-page__back {
  display: none;
}

/* CONTAINER & SPACING REDUCTION (15-25% tighter) */
.history-page article {
  max-width: 1280px;
  margin: auto;
  padding: clamp(50px, 6vw, 85px) clamp(24px, 5vw, 80px) clamp(60px, 7vw, 95px);
}

/* HERO SECTION */
.history-page__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(36px, 5.5vw, 90px);
}
.history-page__intro-copy > span, .history-page__eyebrow {
  color: #77898a;
  font: 500 10px 'DM Mono', monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
}
.history-page h1 {
  max-width: 790px;
  margin: 16px 0 20px;
  color: #0e2a47;
  font: 500 clamp(48px, 5.5vw, 90px) / 0.95 Inter, sans-serif;
  letter-spacing: -0.065em;
}
.history-page h1 em {
  display: block;
  color: #0e2a47;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}
.history-page__lead {
  max-width: 650px;
  margin: 0;
  color: #566b72;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.6;
}

/* FAÇADE PHOTO & YELLOW OFFSET DETAIL */
.history-page__institutional {
  position: relative;
  margin: 0;
  background: #0e2a47;
  box-shadow: 16px 18px 0 #f4c400;
  overflow: hidden;
}
.history-page__institutional-image {
  display: block;
  width: 100%;
  height: clamp(340px, 38vw, 500px);
  object-fit: cover;
  filter: saturate(0.85) contrast(1.02);
  transition: transform 0.7s ease;
}
.history-page__institutional:hover .history-page__institutional-image {
  transform: scale(1.025);
}
.history-page__institutional figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(14, 42, 71, 0.92));
  color: #fff;
  font: 11px 'DM Mono', monospace;
  letter-spacing: 0.03em;
}

/* STATS GRID */
.history-page__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(60px, 8vw, 110px);
  border-top: 1px solid #aebdba;
  border-bottom: 1px solid #aebdba;
}
.history-page__grid section {
  min-height: 170px;
  padding: 28px 24px;
  border-right: 1px solid #aebdba;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.history-page__grid section:last-child {
  border-right: 0;
}
.history-page__grid strong {
  color: #0e2a47;
  font: 500 clamp(64px, 7vw, 108px) / 0.85 'Playfair Display', Georgia, serif;
  transition: color 0.25s ease, transform 0.25s ease;
}
.history-page__grid section:hover strong {
  color: #f4c400;
  transform: translateX(4px);
}
.history-page__grid span {
  color: #53696e;
  font: 500 11px 'DM Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* PRESENÇA E PROXIMIDADE */
.history-page__copy {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 110px);
  padding: clamp(60px, 8vw, 100px) 0 20px;
}
.history-page__copy h2 {
  max-width: 540px;
  margin: 14px 0 0;
  color: #0e2a47;
  font: 500 clamp(36px, 4.5vw, 64px) / 1.05 'Playfair Display', Georgia, serif;
  letter-spacing: -0.04em;
}
.history-page__copy p {
  max-width: 580px;
  margin: 0 0 16px;
  color: #5d7074;
  font-size: 16px;
  line-height: 1.75;
}
.history-page__states {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.history-page__states span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #aebdba;
  color: #0e2a47;
  font: 700 11px 'DM Mono', monospace;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.history-page__states span:hover {
  background: #f4c400;
  border-color: #f4c400;
}

/* CTA "FALAR COM A RIATLA" */
.history-page__cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 15px 24px;
  background: #f4c400;
  color: #0e2a47;
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.history-page__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(14, 42, 71, 0.15);
}
.history-page__cta b {
  font-size: 15px;
}

/* FINAL CTA SECTION ("Quer fazer parte dessa história?") */
.history-page__final-cta {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px clamp(24px, 5vw, 80px) 80px;
  border-top: 1px solid #aebdba;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.history-page__final-cta h2 {
  margin: 0;
  color: #0e2a47;
  font: 500 clamp(32px, 4vw, 56px) / 1.05 'Playfair Display', Georgia, serif;
  letter-spacing: -0.03em;
}
.history-page__final-cta h2 em {
  font-style: italic;
  display: block;
}
.history-page__final-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  background: #f4c400;
  color: #0e2a47;
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.history-page__final-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(14, 42, 71, 0.15);
}

/* RESPONSIVE / MOBILE ADAPTATIONS */
@media (max-width: 850px) {
  .history-page__header nav {
    gap: 13px;
  }
  .history-page__header nav a:not(.history-page__header-cta) {
    font-size: 9px;
  }
  .history-page__intro {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .history-page__intro-copy {
    order: 1;
  }
  .history-page__institutional {
    order: 2;
    max-width: 100%;
    box-shadow: 12px 14px 0 #f4c400;
  }
  .history-page__copy {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .history-page__final-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding-top: 48px;
    padding-bottom: 60px;
  }
  .history-page__final-cta a {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .history-page__header {
    height: 72px;
  }
  .history-page__header nav {
    display: none;
  }
  .history-page__back {
    display: block;
  }
  .history-page__header img {
    width: 128px;
  }
  .history-page article {
    padding: 40px 20px 60px;
  }
  .history-page h1 {
    font-size: clamp(40px, 12vw, 56px);
  }
  .history-page__institutional-image {
    height: 260px;
  }
  .history-page__grid {
    grid-template-columns: 1fr;
    margin-top: 50px;
  }
  .history-page__grid section {
    min-height: 130px;
    padding: 22px 16px;
    border-right: 0;
    border-bottom: 1px solid #aebdba;
  }
  .history-page__grid section:last-child {
    border-bottom: 0;
  }
  .history-page__copy {
    padding-top: 50px;
  }
  .history-page__cta {
    width: 100%;
    justify-content: center;
  }
}
