/* ========== TOKENS + BASE ========== */
:root {
  --brand-green: #0b4221;
  --green-100: #f1f6ee;
  --green-50: #f6faf7;
  --soft-green: #dfeddb;

  --text: #1b2029;
  --muted: #5f6976;
  --line: #dfeae4;
  --white: #ffffff;

  --header-height: 88px;
  --hero-padding-top: 48px;

  --section-padding-y: 72px;
  --section-title-size: clamp(1.8rem, 2.5vw, 2.4rem);

  --shadow-sm: 0 2px 8px rgba(11, 66, 33, 0.12);
  --shadow-md: 0 8px 28px rgba(11, 66, 33, 0.08);
  --shadow-lg: 0 14px 36px rgba(11, 66, 33, 0.12);
  --shadow-cta: 0 8px 28px rgba(11, 66, 33, 0.22);

  --font-sans: "IBM Plex Sans", Helvetica, Arial, sans-serif;

  /* Hero: --hero-fit, --hero-object-position, --hero-mask */
  --hero-fit: contain;
  --hero-object-position: right bottom;
  /* Máscara hero (desktop): véu curto */
  --hero-mask: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 10%,
    rgba(0, 0, 0, 1) 22%
  );
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: #f7faf8;
  color: var(--text);
}

/* Âncoras: scroll suave + offset do header sticky */
html {
  scroll-padding-top: var(--header-height);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

button {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* ========== HEADER + BOTÕES ========== */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  justify-self: start;
  color: inherit;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  border-radius: 20%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--brand-green);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 24px);
  flex-wrap: wrap;
  justify-self: center;
  grid-column: 2;
}

.main-nav a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--brand-green);
}

.main-nav a:active {
  color: var(--brand-green);
  transform: scale(0.95);
}

.main-nav a:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Foco visível (teclado) */
a:focus-visible,
.btn:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.brand:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 4px;
  border-radius: 8px;
}

.footer-col a:focus-visible,
.footer-bottom a:focus-visible,
.calc-cta-free a:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
  border-radius: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.main-nav a:active::after {
  transform: scaleX(1);
}

.main-nav a.is-active {
  color: var(--brand-green);
}

.main-nav a.is-active::after {
  transform: scaleX(1);
}

.btn {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--brand-green);
  color: var(--white);
  padding: 0.8rem 1.3rem;
  box-shadow: none;
}

.btn-primary:hover {
  background: #052b17;
  color: var(--white);
}

.btn-primary:active {
  background: #031508;
  transform: scale(0.98);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

/* Botão desativado (Brevemente) */
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: var(--brand-green);
  color: var(--white);
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: end;
  grid-column: 3;
}

.btn-login-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.btn-secondary {
  background: transparent;
  color: var(--brand-green);
  border: 1px solid rgba(11, 66, 33, 0.35);
  padding: 0.8rem 1.3rem;
}

.btn-secondary:hover {
  background: rgba(11, 66, 33, 0.08);
  border-color: var(--brand-green);
}

.btn-secondary:active {
  background: rgba(11, 66, 33, 0.15);
  transform: scale(0.98);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.hero {
  padding: var(--hero-padding-top) 0 0;
  background: #f1f6ee;
  position: relative;
  overflow: hidden;
}

/* ========== HERO ========== */
/* Desktop: contain + máscara partilhada */
.hero-background-image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: auto;
  height: 100%;
  object-fit: var(--hero-fit);
  object-position: var(--hero-object-position);
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: var(--hero-mask);
  mask-image: var(--hero-mask);
}

.hero-inner {
  display: flex;
  align-items: stretch;
  min-height: 440px;
  position: relative;
  z-index: 2;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  max-width: 560px;
  padding: 24px 0 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  background: var(--soft-green);
  color: var(--brand-green);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 4vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: var(--brand-green);
}

.hero-tagline {
  margin: 12px 0 20px;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--brand-green);
}

.lead {
  margin: 0 0 10px;
  max-width: 560px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.7;
}

.lead:last-of-type {
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.large {
  min-width: 180px;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 18px;
  color: var(--brand-green);
  font-size: 0.92rem;
  font-weight: 500;
  max-width: 760px;
}

.hero-features span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: normal;
  line-height: 1.4;
}

.feature-icon {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  color: var(--brand-green);
}

.hero-disclaimer {
  margin: auto 0 0;
  padding-top: 32px;
  max-width: 560px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section-lead {
  margin: 0 0 24px;
  max-width: 480px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ========== FEATURE CARDS ========== */
.feature-cards {
  padding: var(--section-padding-y) 0;
  background: var(--white);
}

.feature-cards-title {
  margin: 0 0 32px;
  font-size: var(--section-title-size);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--brand-green);
  max-width: 560px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

/* Landing: grelha de 4 cartões */
.cards-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 24px;
  min-height: 380px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Cartões sem CTA (altura mais baixa) */
.service-card--compact {
  min-height: 0;
}

.service-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--soft-green);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.service-card-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--brand-green);
  letter-spacing: -0.02em;
  max-width: 220px;
}

.service-card p {
  margin: 0;
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 260px;
}

.service-card-btn {
  margin-top: auto;
  align-self: flex-start;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

/* Imagem decorativa do cartão */
.service-card-image {
  position: absolute;
  right: -20px;
  bottom: 12px;
  width: 195px;
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  /* Sombra: PNG claro precisa de contraste no cartão */
  filter: drop-shadow(0 10px 18px rgba(5, 43, 23, 0.16));
  transition: transform 0.25s ease;
}

.service-card:hover .service-card-image {
  transform: translateY(-4px);
}

.service-card-image--lg {
  width: 225px;
}

/* Cartão 1: ajuste de tamanho/posição */
.service-card-image--sm {
  width: 180px;
  right: -12px;
}

.service-card-image--inset {
  right: 4px;
}

.service-card-icon,
.service-card h3,
.service-card p {
  position: relative;
  z-index: 1;
}

/* ========== MAP ========== */
.map-section {
  padding: var(--section-padding-y) 0;
  background: var(--green-50);
}

.map-section-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.map-section-copy h2 {
  margin: 0 0 14px;
  font-size: var(--section-title-size);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--brand-green);
  max-width: 420px;
}

.map-info-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 380px;
}

.map-info-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: var(--brand-green);
}

.map-info-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-green);
  font-size: 0.95rem;
}

.map-info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.map-preview {
  min-height: 380px;
}

.map-canvas {
  position: relative;
  height: 100%;
  min-height: 380px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.map-mockup-image {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: blur(3px);
  transform: scale(1.04);
}

.map-canvas-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
}

.map-open-btn {
  box-shadow: var(--shadow-cta);
}

.map-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
}

.map-controls button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--white);
  color: var(--brand-green);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* ========== NEWSLETTER ========== */
.newsletter {
  padding: var(--section-padding-y) 0;
  background: var(--green-50);
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--soft-green);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 32px;
}

.newsletter-copy {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}

.newsletter-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--brand-green);
}

.newsletter-copy h2 {
  margin: 0 0 8px;
  font-size: var(--section-title-size);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--brand-green);
}

.newsletter-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter-form input {
  min-width: 260px;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: var(--white);
  color: var(--text);
}

.newsletter-form input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.newsletter-form .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ========== FOOTER ========== */
.site-footer {
  padding: var(--section-padding-y) 0 48px;
  background: var(--green-100);
  border-top: 1px solid var(--line);
}

.footer-inner {
  /* MVP: marca | navegação | badge */
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 32px 40px;
  align-items: start;
}

.footer-brand,
.footer-badge {
  align-self: center;
}

.footer-brand p {
  margin: 16px 0 20px;
  max-width: 260px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-green);
  border: 1px solid var(--brand-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  background: #052b17;
  border-color: #052b17;
  transform: translateY(-2px);
}

.social-links a:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 3px;
}

.social-links svg {
  width: 18px;
  height: 18px;
}

.footer-col h3 {
  margin: 0 0 16px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-green);
}

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

.footer-col li + li {
  margin-top: 10px;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--brand-green);
}

.footer-badge {
  padding: 20px;
  background: var(--soft-green);
  border-radius: 14px;
  text-align: center;
}

.footer-badge small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.footer-bottom a {
  color: var(--brand-green);
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.footer-bottom a:hover {
  opacity: 0.75;
}

/* Footer FINAL (colunas completas) */
.footer-inner--final {
  grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr;
  gap: 32px 24px;
}

/* ========== LANDING CALCULADORA ========== */
.calc-hero .hero-inner {
  min-height: 520px;
}

/* Hero calculadora: sem object-position do index */
.calc-hero {
  --hero-object-position: right bottom;
  /* Desktop: máscara curta */
  --hero-mask: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 10%,
    rgba(0, 0, 0, 1) 22%
  );
}

.calc-hero .hero-background-image {
  right: 0;
}

.calc-hero .hero-copy h1 {
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.calc-trust {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  max-width: 480px;
  color: var(--brand-green);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
}

.calc-trust-icon {
  width: 36px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  color: var(--brand-green);
}

.calc-how {
  padding: var(--section-padding-y) 0;
  background: var(--green-100);
  position: relative;
  overflow: hidden;
}

.calc-how-inner {
  position: relative;
  display: block;
  min-height: 0;
}

.calc-how-copy {
  position: relative;
  z-index: 2;
  max-width: 480px;
  /* Fundo suave atrás do texto (legibilidade) */
  padding: 8px 20px 8px 0;
}

.calc-how-copy h2 {
  margin: 0 0 32px;
  font-size: var(--section-title-size);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--brand-green);
}

.calc-steps {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-steps li {
  display: flex;
  gap: 16px;
  align-items: center;
}

.calc-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-steps h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--brand-green);
  letter-spacing: -0.02em;
}

.calc-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.calc-access-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.calc-access-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--brand-green);
  margin-top: 2px;
}

.calc-access-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.calc-access-note strong {
  color: var(--brand-green);
  font-weight: 700;
}

/* Nota de acesso: estilo destaque */
.calc-how-media {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: min(78%, 700px);
  pointer-events: none;
}

.calc-product-image {
  width: 100%;
  max-height: 580px;
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  filter: none;
  box-shadow: none;
}

.calc-cta {
  padding: var(--section-padding-y) 0;
  background: var(--white);
}

/* CTA final: imagem | copy | checklist */
.calc-cta-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.calc-cta-media {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  max-height: 100%;
  overflow: hidden;
}

.calc-cta-illustration {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  object-position: center top;
  display: block;
}

.calc-cta-copy {
  min-width: 0;
}

.calc-cta-copy h2 {
  margin: 0 0 16px;
  font-size: var(--section-title-size);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--brand-green);
}

.calc-cta-copy .section-lead {
  margin-bottom: 24px;
  max-width: none;
}

.calc-cta-copy .hero-actions {
  margin-bottom: 16px;
}

/* MVP: link versão gratuita */
.calc-cta-free {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted, #5c6b66);
  line-height: 1.45;
}

.calc-cta-free a {
  color: var(--brand-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.calc-cta-free a:hover {
  text-decoration-thickness: 2px;
}

.calc-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-self: stretch;
  align-self: center;
}

.calc-checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

.calc-checklist svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--brand-green);
}

@media (prefers-reduced-motion: reduce) {
  .service-card-image,
  .service-card:hover .service-card-image {
    transition: none;
    transform: none;
  }
}

/* ========== RESPONSIVE ==========
   Intermédio ~961–1200 | tablet ≤960 | mobile ≤640
*/

/* Desktop estreito (~961–1200px) */
@media (max-width: 1200px) and (min-width: 961px) {
  .service-card-image {
    width: 145px;
    right: -14px;
    opacity: 0.82;
  }

  .service-card-image--lg {
    width: 165px;
  }

  .service-card-image--sm {
    width: 135px;
    right: -8px;
  }

  .service-card {
    padding-bottom: 40px;
  }

  .hero-background-image {
    right: -14%;
  }

  .calc-hero .hero-background-image {
    right: 0;
  }

  .hero-features {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
}

/* --- Tablet (≤960px) --- */
@media (max-width: 960px) {
  :root {
    --section-padding-y: 56px;
    --header-height: 76px;
    --hero-fit: cover;
    --hero-object-position: -35% top;
    /* Índice: véu longo à esquerda (legibilidade), semelhante à calculadora */
    --hero-mask: linear-gradient(
      to right,
      transparent 0%,
      transparent 28%,
      rgba(0, 0, 0, 0.12) 44%,
      rgba(0, 0, 0, 0.45) 58%,
      rgba(0, 0, 0, 0.85) 76%,
      rgba(0, 0, 0, 1) 90%
    );
  }

  .container {
    width: min(1200px, calc(100% - 40px));
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .main-nav {
    justify-self: end;
    grid-column: auto;
    gap: 14px;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .brand-text {
    font-size: 1.25rem;
  }

  .hero-inner {
    min-height: 420px;
    justify-content: flex-start;
  }

  .hero-copy {
    max-width: 420px;
    margin: 0;
    text-align: left;
    align-items: flex-start;
    padding: 20px 0 24px;
  }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-features {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0;
    text-align: left;
  }

  .hero-background-image {
    inset: 0;
    width: 100%;
    height: 100%;
    right: 0;
    left: 0;
  }

  /* Calculadora: centrado + máscara forte */
  .calc-hero {
    --hero-object-position: center top;
    --hero-mask: linear-gradient(
      to right,
      transparent 0%,
      transparent 32%,
      rgba(0, 0, 0, 0.12) 48%,
      rgba(0, 0, 0, 0.45) 62%,
      rgba(0, 0, 0, 0.85) 78%,
      rgba(0, 0, 0, 1) 90%
    );
  }

  .feature-cards-title {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
    max-width: 28ch;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .cards-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card {
    min-height: 340px;
    padding: 28px 22px 22px;
  }

  .service-card-image {
    width: 160px;
    right: -8px;
    bottom: 10px;
    opacity: 0.92;
  }

  .service-card-image--lg {
    width: 180px;
    right: -4px;
  }

  .service-card-image--sm {
    width: 148px;
    right: 0;
  }

  .service-card h3,
  .service-card p {
    max-width: none;
    padding-right: 96px;
  }

  .footer-inner,
  .footer-inner--final {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand .brand {
    justify-content: flex-start;
  }

  .footer-brand .brand-text {
    text-align: left;
  }

  .footer-brand p {
    max-width: 340px;
  }

  .social-links {
    justify-content: center;
  }

  .footer-col {
    width: 100%;
  }

  .footer-badge {
    width: min(100%, 380px);
  }

  /* Como funciona: media atrás do texto */
  .calc-how-inner {
    display: block;
    position: relative;
    min-height: 0;
  }

  .calc-how-copy {
    position: relative;
    z-index: 2;
    max-width: 540px;
    padding: 8px 24px 8px 0;
    text-align: left;
    background: linear-gradient(
      90deg,
      var(--green-100) 0%,
      rgba(241, 246, 238, 0.75) 55%,
      rgba(241, 246, 238, 0.25) 85%,
      transparent 100%
    );
  }

  .calc-how-copy .eyebrow {
    margin-left: 0;
  }

  .calc-steps {
    text-align: left;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .calc-access-note {
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .calc-how-media {
    position: absolute;
    right: -6%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: min(58%, 340px);
    margin: 0;
    pointer-events: none;
    opacity: 0.38;
  }

  .calc-product-image {
    max-height: 460px;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.55) 22%,
      rgba(0, 0, 0, 1) 48%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.55) 22%,
      rgba(0, 0, 0, 1) 48%
    );
  }

  .calc-cta-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: left;
    justify-items: stretch;
  }

  .calc-cta-media {
    order: -1;
    justify-content: center;
    justify-self: center;
    width: 100%;
  }

  .calc-cta-illustration {
    max-height: 240px;
  }

  .calc-cta-copy {
    width: 100%;
    max-width: none;
  }

  .calc-cta-copy .hero-actions {
    justify-content: center;
  }

  .calc-cta-free {
    text-align: center;
  }

  .calc-checklist {
    justify-self: stretch;
    text-align: left;
    max-width: 480px;
  }

  .map-section-inner {
    grid-template-columns: 1fr;
  }
}

/* --- Mobile (≤640px) --- */
@media (max-width: 640px) {
  :root {
    --section-padding-y: 48px;
    --header-height: 68px;
    --hero-padding-top: 24px;
    --section-title-size: clamp(1.5rem, 6.5vw, 1.9rem);
    --hero-object-position: 12% top;
    /* Telemóvel: véu ainda mais forte no index (texto à esquerda) */
    --hero-mask: linear-gradient(
      to right,
      transparent 0%,
      transparent 36%,
      rgba(0, 0, 0, 0.1) 50%,
      rgba(0, 0, 0, 0.4) 64%,
      rgba(0, 0, 0, 0.85) 80%,
      rgba(0, 0, 0, 1) 92%
    );
  }

  /* Calculadora: centrado + máscara máxima */
  .calc-hero {
    --hero-object-position: center top;
    --hero-mask: linear-gradient(
      to right,
      transparent 0%,
      transparent 38%,
      rgba(0, 0, 0, 0.1) 52%,
      rgba(0, 0, 0, 0.4) 65%,
      rgba(0, 0, 0, 0.85) 80%,
      rgba(0, 0, 0, 1) 92%
    );
  }

  .container {
    width: calc(100% - 32px);
  }

  .header-inner {
    min-height: var(--header-height);
    gap: 8px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .main-nav {
    gap: 12px;
  }

  .main-nav a {
    font-size: 0.88rem;
  }

  .hero-inner {
    min-height: 0;
    justify-content: flex-start;
  }

  .hero-copy {
    max-width: min(100%, 300px);
    width: 100%;
    margin: 0;
    padding: 12px 0 28px;
    text-align: left;
    align-items: flex-start;
    position: relative;
    z-index: 2;
  }

  .hero-copy h1 {
    font-size: clamp(2.15rem, 9vw, 2.75rem);
    line-height: 1.02;
  }

  .hero-tagline {
    font-size: clamp(1.2rem, 4.8vw, 1.5rem);
    margin: 10px 0 14px;
  }

  .lead {
    font-size: 0.98rem;
    line-height: 1.65;
    margin-left: 0;
    margin-right: 0;
  }

  .eyebrow {
    font-size: 0.65rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 280px;
    margin: 0;
    gap: 10px;
  }

  .hero-actions .btn.large,
  .hero-actions .large {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }

  .hero-features {
    max-width: 100%;
    margin: 0;
    gap: 12px;
  }

  .hero-disclaimer {
    padding-top: 24px;
    margin: 0;
  }

  .feature-cards-title {
    margin-bottom: 24px;
    text-align: left;
    max-width: 18ch;
  }

  .cards-grid,
  .cards-grid--4 {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .service-card {
    height: auto;
    min-height: 0;
    padding: 24px 20px 18px;
  }

  .service-card--compact {
    min-height: 0;
    padding-bottom: 22px;
  }

  .service-card h3,
  .service-card p {
    max-width: none;
    padding-right: 96px;
  }

  .service-card p {
    flex: 1 1 auto;
    margin-bottom: 16px;
  }

  .service-card-btn {
    margin-top: auto;
  }

  /* Ilustrações: largura fixa, altura automática */
  .service-card-image {
    width: 108px;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
    right: 10px;
    bottom: 14px;
    opacity: 0.95;
  }

  .service-card-image--lg {
    width: 120px;
    right: 8px;
  }

  .service-card-image--sm {
    width: 112px;
    right: 8px;
    bottom: 12px;
    transform: none;
  }

  .service-card-image--inset {
    right: 12px;
    width: 112px;
  }

  .service-card:hover .service-card-image--sm {
    transform: translateY(-4px);
  }

  .site-footer {
    padding-bottom: 32px;
  }

  .calc-trust {
    justify-content: flex-start;
  }

  .calc-how-copy {
    background: linear-gradient(
      90deg,
      var(--green-100) 0%,
      rgba(241, 246, 238, 0.8) 58%,
      rgba(241, 246, 238, 0.3) 88%,
      transparent 100%
    );
  }

  .calc-how-media {
    right: -12%;
    width: min(78%, 300px);
    opacity: 0.34;
  }

  .calc-product-image {
    max-height: 400px;
  }

  .calc-cta-illustration {
    max-height: 200px;
  }

  .calc-access-note {
    flex-direction: row;
    gap: 12px;
    padding: 16px 18px;
  }

  .calc-cta-free {
    font-size: 0.92rem;
    text-align: center;
  }

  .calc-cta-copy .hero-actions {
    margin-left: auto;
    margin-right: auto;
  }

  .newsletter-inner {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-form input {
    min-width: 0;
    width: 100%;
  }
}
