/* ==========================================================================
   base.css — reset, tipografia, botões, cabeçalho, rodapé, revelação
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* `hidden` sempre vence display: grid/flex (confirmação nunca aparece sem envio). */
[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.olive {
  color: var(--olive);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--radius-s);
  background: var(--green-800);
  color: var(--on-dark);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

main:focus {
  outline: none;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--green-800);
  color: var(--on-dark);
  font: 600 1rem/1.1 var(--f-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.25s;
}

.btn:hover {
  background: var(--green-700);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(24, 62, 50, 0.22);
}

.btn:active {
  transform: translateY(0);
}

.btn--sm {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.94rem;
}

.btn--lg {
  min-height: 60px;
  padding: 0 10px 0 26px;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

.btn-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--lime);
  color: var(--green-800);
  transition: transform 0.35s var(--ease-out);
}

.btn-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(246, 245, 238, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(246, 245, 238, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 700 1.02rem/1 var(--f-display);
  letter-spacing: -0.02em;
}

.brand-logo {
  width: auto;
  height: 30px;
}

.brand-sep {
  width: 1px;
  height: 26px;
  background: var(--line-strong);
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav a {
  position: relative;
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav a:hover {
  color: var(--ink);
}

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

/* ---------- Rodapé ---------- */
.site-footer {
  padding: 56px 0 calc(56px + env(safe-area-inset-bottom, 0px));
  background: var(--green-900);
  color: var(--on-dark-2);
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  width: auto;
  height: 40px;
}

.footer-tagline {
  margin-top: 14px;
}

.footer-link {
  color: var(--lime);
  font-size: var(--fs-small);
  text-underline-offset: 4px;
}

/* ---------- Revelação ao rolar (só com JS e sem movimento reduzido) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .btn-arrow {
    transition: none;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .header-inner {
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    height: 24px;
  }

  .brand-sep {
    height: 22px;
  }

  .brand-name {
    font-size: 0.82rem;
    line-height: 1.15;
    max-width: 9.5em;
  }

  .site-header .btn--sm {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.86rem;
  }
}

/* Telas muito estreitas: a identificação fica; o botão do cabeçalho sai
   (a primeira dobra tem o botão principal e o atalho fixo aparece ao rolar). */
@media (max-width: 379px) {
  .site-header .btn--sm {
    display: none;
  }
}

/* Textos longos em botões de largura total podem quebrar no celular. */
@media (max-width: 760px) {
  .btn--block,
  .hero-actions .btn--lg {
    white-space: normal;
    text-align: left;
  }
}
