/* ============================================================
   SET Soluções Contábeis — estilos de produção
   Tokens conforme PRD.md seção 6.
   ============================================================ */

@font-face {
  font-family: "Asterone";
  src: url("../assets/fonts/Asterone-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Asterone";
  src: url("../assets/fonts/Asterone-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f3f2f2;
  --text: #201e1d;
  --text-secondary: #4c5058;
  --text-tertiary: #6e6e6e; /* ajustado de #7d7979 (handoff original) para atingir contraste AA (4.5:1) em texto normal sobre --bg e branco */
  --slate: #595d67;
  --dark: #33363d;
  --accent: #c4308d;
  --accent-hover: #9c2570;
  --border-neutral: #d2d0d0;
  --white: #ffffff;

  --font-display: "Asterone", "Archivo", sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;

  --container-max: 1240px;
  --container-pad: 28px;
  --section-gap: 88px;

  /* Ponto único de configuração do tratamento de fotos (PRD seção 7) */
  --photo-filter: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid #e3aed1;
}
a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}

button,
input,
textarea {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: #f6d6ea;
}

::placeholder {
  color: var(--text-tertiary); /* ajustado de #9b9797 (handoff original), que falhava contraste AA sobre branco */
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-gap) var(--container-pad) 0;
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

h1 {
  font-size: clamp(36px, 5.2vw, 58px);
  line-height: 1.18;
  text-wrap: balance;
  /* Asterone Bold é uma fonte larga: em telas muito estreitas, no tamanho
     mínimo do clamp, palavras como "estratégica" isoladas ultrapassam a
     coluna. overflow-wrap é só um último recurso (só quebra se a palavra
     realmente não couber) — não usar hyphens:auto aqui, pois hifeniza
     também títulos com espaço de sobra (ex.: banner CTA final). */
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.08;
  max-width: 26ch;
  margin-bottom: 40px;
  overflow-wrap: break-word;
}

.photo {
  width: 100%;
  filter: var(--photo-filter);
}

/* ---------- Botões ---------- */
.btn {
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 26px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white);
}
.btn-secondary {
  border: 2px solid var(--dark);
  background: transparent;
  color: var(--dark);
  padding: 15px 26px;
}
.btn-secondary:hover {
  background: var(--dark);
  color: var(--white);
}
.btn-arrow {
  font-size: 20px;
  line-height: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--white);
  border-bottom: 2px solid var(--slate);
}
.header-bar {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.logo-link {
  border: none;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: 8px;
}
.logo-mark {
  width: auto;
  display: block;
}
.logo-link .logo-mark {
  height: 38px;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--text);
}
.logo-name--footer {
  font-size: 22px;
}
.logo-tagline {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo .logo-mark {
  height: 42px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.main-nav a {
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}
.client-area-btn {
  border: none;
  background: none;
  padding: 10px 0;
  margin: -10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
}

.client-note {
  background: var(--dark);
  color: var(--white);
  padding: 12px var(--container-pad);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}
.client-note[hidden] {
  display: none;
}
.client-note a {
  border: none;
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(48px, 8vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 56px;
  align-items: center;
}
.hero p {
  font-size: 18px;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 0 34px;
  color: var(--text-secondary);
  text-wrap: pretty;
}
.hero h1 {
  margin-bottom: 26px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 38px;
}
.hero-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border-top: 2px solid var(--slate);
  border-left: 2px solid var(--slate);
}
.hero-chips div {
  padding: 16px 18px;
  border-right: 2px solid var(--slate);
  border-bottom: 2px solid var(--slate);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.hero-photo {
  aspect-ratio: 4 / 5;
}

/* Tema escuro do Hero (briefing v3) — fixo como padrão, sem toggle */
.hero-band {
  background: var(--dark);
}
.hero-band .kicker {
  color: #f0a8d4;
}
.hero-band h1 {
  color: var(--white);
}
.hero-band .hero p {
  color: #c9c8cb;
}
.hero-band .btn-secondary {
  border-color: var(--white);
  color: var(--white);
}
.hero-band .btn-secondary:hover {
  background: var(--white);
  color: var(--dark);
}
.hero-band .hero-chips {
  border-top-color: #6b6f78;
  border-left-color: #6b6f78;
}
.hero-band .hero-chips div {
  border-right-color: #6b6f78;
  border-bottom-color: #6b6f78;
  color: var(--white);
}

/* ---------- Grades com regua (rule grid) ---------- */
.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 2px solid var(--slate);
  border-left: 2px solid var(--slate);
}
.rule-grid > * {
  background: var(--white);
  padding: 26px 24px;
  border-right: 2px solid var(--slate);
  border-bottom: 2px solid var(--slate);
}
.rule-grid .card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}
.rule-grid p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.audience-grid > * {
  padding: 30px 26px;
}
.audience-grid .card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  display: block;
}
.audience-grid p {
  font-size: 15px;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.services-grid > * {
  padding: 28px 24px;
}
.services-grid .card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  display: block;
}

/* ---------- Sobre ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}
.about-photo {
  aspect-ratio: 1 / 1;
}
.about p {
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 18px;
  color: var(--text-secondary);
  max-width: 52ch;
}
.about h2 {
  margin-bottom: 22px;
}

/* ---------- Como funciona ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-top: 2px solid var(--slate);
  border-left: 2px solid var(--slate);
}
.steps-grid > * {
  padding: 26px 22px;
  border-right: 2px solid var(--slate);
  border-bottom: 2px solid var(--slate);
}
.step-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 14px;
}
.step-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.steps-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ---------- Casos de sucesso ---------- */
.portfolio-intro {
  font-size: 15px;
  color: var(--text-tertiary);
  margin: 0 0 36px;
  max-width: 56ch;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.case-photo {
  aspect-ratio: 4 / 3;
  margin-bottom: 14px;
}
.case-name {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
}
.case-summary {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-tertiary);
}
.photo-credit {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ---------- Orçamento / formulário ---------- */
.budget-section {
  padding-bottom: var(--section-gap);
}
.budget-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 36px;
  max-width: 56ch;
}
.budget-form {
  display: grid;
  gap: 20px;
  max-width: 720px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.field label,
.field-group > span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 8px;
}
.field-group > span {
  margin-bottom: 10px;
}
.budget-form input[type="text"],
.budget-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--slate);
  background: var(--white);
  font-size: 16px;
  color: var(--dark);
}
.budget-form textarea {
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.checkbox-grid label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 2px solid var(--border-neutral);
  background: var(--white);
  cursor: pointer;
  font-size: 14.5px;
}
.budget-form button[type="submit"] {
  justify-self: start;
}

/* ---------- Banner CTA final ---------- */
.cta-banner {
  background: var(--dark);
  padding: clamp(48px, 7vw, 80px) var(--container-pad);
}
.cta-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}
.cta-banner h2 {
  margin: 0 0 12px;
  color: var(--white);
}
.cta-banner p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #c9c8cb;
  max-width: 48ch;
}
.cta-banner .btn {
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 56px var(--container-pad) 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-tertiary);
  max-width: 32ch;
}
.footer-heading {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 12px;
}
.footer-contact {
  font-size: 14.5px;
  line-height: 2;
  color: var(--dark);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
}
.footer-links a {
  border: none;
  color: var(--dark);
}
.footer-links button {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font-size: 14.5px;
  color: var(--dark);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--border-neutral);
  color: var(--dark);
}
.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.footer-bottom {
  border-top: 2px solid var(--slate);
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-float {
  border: none;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(32, 30, 29, 0.28);
}
.whatsapp-float:hover {
  background: var(--accent-hover);
}

@media (max-width: 720px) {
  .hero,
  .about {
    /* minmax(0, 1fr), não "1fr": um item de grid tem min-width:auto por padrão,
       então sem o 0 explícito o conteúdo (ex. imagem) força overflow horizontal
       na página inteira em vez de encolher para caber na coluna única. */
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-photo,
  .about-photo {
    order: -1;
  }
}
