/* NAFIA · site institucional
   Sem dependências externas: fontes, ícones e imagens ficam no próprio site.
   Ordem: fontes → cores e medidas → base → partes da página (na ordem em que aparecem) → telas pequenas. */

/* ---------- Fontes (Inter, licença OFL em fonts/LICENCA-OFL.txt) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("../fonts/inter-display-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Cores e medidas (tema escuro por padrão; claro segue o aparelho) ---------- */
:root {
  --bg: #15171b;
  --band: #1b1e23;
  --surface: #22262d;
  --surface-2: #2a2f37;
  --fg: #ecebe6;
  --strong: #f2f1ec;
  --muted: #a3a6ad;
  --line: #30343c;
  --accent: #f2b33d;
  --accent-ink: #15171b;
  --accent-soft: rgb(242 179 61 / 0.12);
  --header: rgb(21 23 27 / 0.82);
  --online: #3fb950;
  --shadow: 0 30px 60px -24px rgb(0 0 0 / 0.55);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1120px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --radius: 14px;
  --header-h: 68px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f3ee;
    --band: #ebe9e2;
    --surface: #ffffff;
    --surface-2: #f4f3ee;
    --fg: #1b1d21;
    --strong: #15171b;
    --muted: #55575d;
    --line: #dad7ce;
    --accent: #8f5604; /* âmbar escurecido: contraste de 5,4:1 no fundo claro */
    --accent-ink: #ffffff;
    --accent-soft: rgb(143 86 4 / 0.1);
    --header: rgb(244 243 238 / 0.85);
    --online: #1a7f37;
    --shadow: 0 30px 60px -28px rgb(21 23 27 / 0.35);
    color-scheme: light;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--strong);
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 800;
}

h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter) max(20px, env(safe-area-inset-right, 0px));
}

.section {
  padding-block: clamp(64px, 9vw, 104px);
}

.section--band {
  background: var(--band);
  border-block: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 44px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  font-size: 19px;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Logo: o N com a última haste subindo em seta */
.logo {
  flex: none;
  fill: none;
  stroke-width: 22;
}

.logo__n {
  stroke: currentColor;
  stroke-linecap: square;
}

.logo__arrow {
  stroke: var(--accent);
}

.logo__arrow-head {
  stroke: var(--accent);
  stroke-linecap: square;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 16px/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, background-color 0.15s, border-color 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--fg);
}

.btn--ghost:hover {
  border-color: var(--muted);
}

.btn--sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* ---------- Topo ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--strong);
  font: 800 20px/1 var(--font-display);
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand__ia {
  color: var(--accent);
}

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

.nav a,
.header-login {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.nav a:hover,
.header-login:hover {
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Menu do celular: <details> funciona sem JavaScript; o site.js só fecha ao escolher um link */
.menu {
  display: none;
  position: relative;
}

.menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  list-style: none;
  cursor: pointer;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu__close {
  display: none;
}

.menu[open] .menu__open {
  display: none;
}

.menu[open] .menu__close {
  display: block;
}

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(320px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.menu__panel a:not(.btn) {
  display: block;
  padding: 12px;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}

.menu__panel a:not(.btn):hover {
  background: var(--surface-2);
}

.menu__panel .btn {
  margin-top: 8px;
}

/* ---------- Abertura ---------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto 45%;
  height: 120%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 56px;
  padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 104px);
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}

.hero__checks li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__checks .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  stroke-width: 2.4;
}

/* Exemplo de conversa */
.chat {
  justify-self: end;
  width: 100%;
  max-width: 420px;
  margin: 0;
}

.chat__window {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.chat__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.chat__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--strong);
}

.chat__who {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.chat__who strong {
  color: var(--strong);
  font-size: 15px;
  font-weight: 600;
}

.chat__who span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.chat__who span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
}

.chat__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 18px 16px;
  list-style: none;
  font-size: 15px;
}

.msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.45;
}

.msg--cliente {
  align-self: flex-start;
  background: var(--band);
  border-bottom-left-radius: 4px;
}

.msg--ia {
  align-self: flex-end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 4px;
}

.chat__input {
  margin: 0 16px 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.chat figcaption,
.phones__caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Cartões (o que faz, para quem) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card p {
  color: var(--muted);
  font-size: 16px;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Como funciona ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
}

.step {
  counter-increment: passo;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step::before {
  content: counter(passo);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font: 800 16px/1 var(--font-display);
}

.step__tag {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step p {
  color: var(--muted);
  font-size: 16px;
}

/* ---------- O app ---------- */
.phones {
  margin: 0 0 48px;
}

.phones__row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phone {
  flex: none;
  width: 260px;
  margin: 0;
}

.phone:nth-child(2) {
  margin-top: 40px;
}

.phone:nth-child(3) {
  margin-top: 80px;
}

.phone__frame {
  padding: 8px;
  background: #0b0c0e;
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.phone__frame img {
  width: 100%;
  height: auto;
  border-radius: 26px;
}

.phone figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.phone figcaption strong {
  display: block;
  color: var(--strong);
  font-size: 15px;
}

.app-details {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 40px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 12px;
}

.checklist .icon {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--accent);
  stroke-width: 2.4;
}

.install {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.install ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.install ol li::marker {
  color: var(--accent);
  font-weight: 600;
}

.install strong {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- Quanto custa ---------- */
.numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.number {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-top: 16px;
  border-top: 3px solid var(--accent);
}

.number dt {
  order: 2;
  color: var(--muted);
  font-size: 16px;
}

.number dd {
  order: 1;
  margin: 0;
  color: var(--strong);
  font: 800 clamp(30px, 4vw, 42px)/1.1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

.fine {
  max-width: 72ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
}

.pricing__cta {
  margin-top: 32px;
}

/* ---------- Dúvidas ---------- */
.faq {
  max-width: 840px;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  color: var(--strong);
  font-size: 18px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 70ch;
  padding: 0 4px 22px;
  color: var(--muted);
}

/* ---------- Quem está por trás ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.about:has(.about__photo) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
}

.about__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
}

/* ---------- Contato ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 40px;
}

.contact .section__head {
  margin-bottom: 0;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.copy-row__value {
  color: var(--strong);
  font-size: 18px;
  font-weight: 600;
  word-break: break-all;
  user-select: all;
}

.copy-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font: 600 14px/1 var(--font);
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--muted);
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Rodapé ---------- */
.site-footer {
  padding-top: 56px;
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.site-footer__about {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 34ch;
}

.site-footer h2 {
  margin-bottom: 12px;
  color: var(--strong);
  font: 600 14px/1.3 var(--font);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.site-footer .brand,
.site-footer .brand:hover {
  color: var(--strong);
  text-decoration: none;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* ---------- Páginas de texto (privacidade, termos) ---------- */
.legal {
  padding-block: clamp(48px, 7vw, 88px);
}

.legal__inner {
  max-width: 820px;
}

.legal h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.legal__date {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.legal h2 {
  margin: 48px 0 14px;
  font-size: clamp(22px, 2.6vw, 28px);
}

.legal h3 {
  margin: 24px 0 8px;
}

.legal p + p {
  margin-top: 12px;
}

.legal ul,
.legal ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal ul + p,
.legal ol + p {
  margin-top: 12px;
}

.legal strong {
  color: var(--strong);
  font-weight: 600;
}

.legal__summary {
  margin-top: 28px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal__summary ul {
  margin-top: 0;
}

/* Campo que ainda falta preencher num rascunho */
.preencher {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--strong);
  outline: 1px dashed var(--accent);
}

/* ---------- Página de erro (404) ---------- */
.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.error-page__box {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 520px;
}

/* ---------- Telas médias ---------- */
@media (max-width: 1060px) {
  .cards,
  .cards--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phones__row {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
    scrollbar-width: thin;
  }

  .phone {
    scroll-snap-align: center;
  }

  .phone:nth-child(2),
  .phone:nth-child(3) {
    margin-top: 0;
  }
}

/* ---------- Celular ---------- */
@media (max-width: 900px) {
  :root {
    --header-h: 60px;
  }

  .nav,
  .header-login,
  .header-actions .btn {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu {
    display: block;
  }

  .hero__grid,
  .app-details,
  .about,
  .about:has(.about__photo),
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__grid {
    gap: 40px;
  }

  .hero::before {
    display: none;
  }

  .chat {
    justify-self: stretch;
    max-width: none;
  }

  .about__photo {
    max-width: 360px;
  }

  .steps,
  .numbers {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .site-footer__about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .cards,
  .cards--5 {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn-row .btn {
    flex: 1 1 100%;
  }

  .phone {
    width: 230px;
  }
}

@media print {
  .site-header {
    position: static;
    backdrop-filter: none;
  }

  .skip-link,
  .header-actions {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
