/* ===== Design tokens ===== */
:root {
  /* Navy extraído da logo oficial da Terravista */
  --navy-dark: #02102a;
  --navy: #03183f;
  --navy-mid: #04235c;
  --navy-light: #063283;
  --gold: #c9a227;
  --gold-light: #f2c34d;
  --white: #ffffff;
  --off-white: #f7f8fb;
  --ink: #16203a;
  --ink-soft: #4a5570;
  --border: #e4e7ef;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(2, 16, 42, 0.16);
  --header-h: 92px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== Typography helpers ===== */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.eyebrow--light { color: var(--gold-light); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
}
.section-title--light { color: var(--white); }

.subsection-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 20px;
}

.section-lead {
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-up {
  opacity: 0;
  animation: fadeUp .8s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: var(--d, 0s);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* staggered reveal for grid children */
.servicos__grid .reveal:nth-child(2) { transition-delay: .08s; }
.servicos__grid .reveal:nth-child(3) { transition-delay: .16s; }
.servicos__grid .reveal:nth-child(4) { transition-delay: .24s; }
.sobre__cards .reveal:nth-child(2) { transition-delay: .08s; }
.sobre__cards .reveal:nth-child(3) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-up, .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .hero__bg, .sobre__bg, .contato__cta-bg { animation: none !important; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(2,16,42,0.22); }

.btn--primary {
  background: var(--gold-light);
  color: var(--navy-dark);
}
.btn--primary:hover { background: var(--gold); color: var(--navy-dark); }

.btn--outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: rgba(2, 16, 42, 0.6);
}
.btn--outline-dark:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn--outline-light {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn--outline-light:hover {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}

.btn--whatsapp {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
  padding: 10px 18px;
}
.btn--whatsapp .icon { width: 18px; height: 18px; }
.btn--whatsapp:hover {
  background: #25D366;
  color: var(--white);
  border-color: #25D366;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--header-h);
  background: var(--navy-dark);
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
  animation: fadeUp .6s ease both;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.header__brand { display: flex; align-items: center; }
.header__logo { height: 78px; width: auto; }

.nav__list {
  display: flex;
  gap: 32px;
}
.nav__link {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--white);
  padding: 6px 2px;
  transition: color .2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}
.nav__link:hover,
.nav__link:focus-visible {
  color: var(--gold-light);
}
.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__actions { display: flex; align-items: center; gap: 16px; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 8px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--white);
  transition: transform .2s ease, opacity .2s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(160deg, rgba(2,16,42,0.94) 0%, rgba(3,24,63,0.9) 45%, rgba(6,50,131,0.68) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 85% 20%, rgba(201,162,39,0.2), transparent 55%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero__text { max-width: 640px; }
.hero__eyebrow {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 0 0 18px;
}
.hero__title {
  font-family: 'Montserrat', var(--font-display);
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 0 20px;
  line-height: 1.1;
}
.hero__title-accent {
  background: linear-gradient(180deg, #f6dfa0 0%, #f2c34d 45%, #c98b1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle {
  font-family: var(--font-body);
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 620px;
  margin: 0 0 40px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ===== Sobre + Valores (seção unificada) ===== */
.sobre {
  position: relative;
  overflow: hidden;
  padding: 110px 0;
  isolation: isolate;
  background: var(--off-white);
}

.sobre__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 40px;
}
.sobre__text p { color: var(--ink-soft); margin: 0 0 20px; }
.sobre__cards { display: grid; gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  border-left: 3px solid var(--gold);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  margin: 0 0 10px;
}
.card__text { color: var(--ink-soft); margin: 0; font-size: 0.96rem; }

.sobre__valores {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.sobre__valores-title {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.1rem;
  margin: 0;
  white-space: nowrap;
}
.valores-chips {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.valores-chips li {
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--off-white);
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: 999px;
  padding: 6px 14px;
  transition: background-color .2s ease, transform .2s ease;
}
.valores-chips li:hover { background: rgba(201,162,39,0.14); transform: translateY(-2px); }

/* ===== Mercado de atuação ===== */
.mercado { padding: 100px 0; background: var(--off-white); }
.mercado--light {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.mercado__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.mercado--light::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgba(2,16,42,0.94) 0%, rgba(3,24,63,0.9) 55%, rgba(2,16,42,0.88) 100%);
}
.mercado--light .section-lead { color: rgba(255,255,255,0.78); }
.mercado--light .mercado__list h3 { color: var(--white); }
.mercado--light .mercado__list p { color: rgba(255,255,255,0.72); }
.mercado__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.mercado__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.mercado__media img { width: 100%; height: 100%; object-fit: cover; }
.mercado__badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: rgba(2,16,42,0.85);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201,162,39,0.5);
}

.mercado__list { display: grid; gap: 24px; margin: 32px 0 0; padding: 0; }
.mercado__list li { display: flex; align-items: flex-start; gap: 18px; }
.mercado__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mercado__icon svg { width: 22px; height: 22px; }
.mercado__list h3 {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.mercado__list p { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

/* ===== Serviços ===== */
.servicos { padding: 100px 0; background: var(--white); }
.servicos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: rgba(201,162,39,0.4); }

.service-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.service-card:hover .service-card__media img { transform: scale(1.06); }
.service-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,16,42,0) 40%, rgba(2,16,42,0.55) 100%);
}

.service-card__icon {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(2,16,42,0.3);
  transition: transform .25s ease;
}
.service-card:hover .service-card__icon { transform: scale(1.08) rotate(-4deg); }
.service-card__icon svg { width: 26px; height: 26px; }

.service-card__body { padding: 34px 24px 28px; }
.service-card__title {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.05rem;
  margin: 0 0 10px;
}
.service-card__text { color: var(--ink-soft); font-size: 0.94rem; margin: 0; }

/* ===== Contato ===== */
.cta-banner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 90px 0;
  text-align: center;
}
.cta-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgba(2,16,42,0.94) 0%, rgba(3,24,63,0.9) 55%, rgba(6,50,131,0.75) 100%);
}
.cta-banner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 640px;
}
.cta-banner__inner h2 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0;
}
.cta-banner__inner p {
  color: rgba(255,255,255,0.85);
  margin: 0;
  font-size: 1.05rem;
}

.contato { padding: 100px 0; background: var(--off-white); }
.contato__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: stretch;
}
.contato__info {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.contato__list { display: grid; gap: 22px; margin-bottom: 30px; }
.contato__list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--ink-soft);
}
.contato__list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--gold);
  margin-top: 2px;
}
.contato__list a:hover { color: var(--navy); text-decoration: underline; }

.contato__cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  padding: 40px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.contato__cta-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .6s ease;
}
.contato__cta:hover .contato__cta-bg { transform: scale(1.05); }
.contato__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, rgba(2,16,42,0.92) 0%, rgba(3,24,63,0.88) 60%, rgba(6,50,131,0.6) 100%);
}
.contato__cta h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0;
}
.contato__cta p { color: rgba(255,255,255,0.85); margin: 0; }
.contato__cta .btn { align-self: flex-start; }

/* ===== Footer ===== */
.footer {
  position: relative;
  background: var(--navy-dark);
  padding: 96px 0 0;
  color: rgba(255,255,255,0.75);
}
.footer__wave {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  height: 60px;
  color: var(--navy-dark);
  margin-bottom: -1px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer__logo { height: 76px; width: auto; }
.footer__tagline { color: rgba(255,255,255,0.65); font-size: 0.92rem; margin: 0; max-width: 280px; }
.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.92rem;
  width: fit-content;
  transition: color .2s ease, transform .2s ease;
}
.footer__social svg { width: 20px; height: 20px; }
.footer__social:hover { color: var(--gold); transform: translateY(-2px); }

.footer__heading {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 18px;
}
.footer__col ul { display: grid; gap: 12px; }
.footer__col li { font-size: 0.92rem; color: rgba(255,255,255,0.65); }
.footer__col a { position: relative; transition: color .2s ease; }
.footer__col a:hover { color: var(--gold-light); }
.footer__whats { margin-top: 20px; }

.footer__bottom { padding: 24px 0; }
.footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.footer__bottom-inner p { margin: 0; }

/* ===== WhatsApp float button ===== */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 600;
  transition: background-color .2s ease, transform .2s ease;
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover { background: #1ebe57; transform: scale(1.06); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .sobre__grid,
  .contato__grid,
  .mercado__grid { grid-template-columns: 1fr; }
  .mercado__media { aspect-ratio: 16 / 9; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .hero__inner { flex-direction: column; text-align: center; }
  .hero__text { max-width: 100%; }
  .hero__actions { justify-content: center; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--navy-dark); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .nav.is-open { max-height: 400px; }
  .nav__list { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .nav__list li { border-top: 1px solid rgba(255,255,255,0.08); }
  .nav__link { display: block; padding: 14px 0; }
  .nav__toggle { display: flex; }
  .btn--whatsapp span { display: none; }
}

@media (max-width: 640px) {
  .hero { padding: calc(var(--header-h) + 20px) 0 50px; }
  .sobre, .servicos, .contato, .mercado { padding: 70px 0; }
  .servicos__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { text-align: center; }
}
