/* Fontes locais (arquivos variáveis: um arquivo cobre todos os pesos) */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/schibsted-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Medidas que mudam com a tela (desktop é o padrão) */
:root {
  --gutter: 24px;
  --secao: 96px;
  --secao-meia: 48px;
  /* O hero se ajusta à altura da tela, para caber inteiro na primeira tela de um notebook */
  --hero-topo: clamp(40px, 7vh, 72px);
  --hero-base: clamp(48px, 8vh, 88px);
  --hero-gap: 20px;
  --hero-colunas-gap: 64px;
  --hero-texto-base: 520px;
  --hero-fone-base: 360px;
  --topo-gap: 24px;
  --marca-fonte: 18px;
  --topo-cta-pad: 20px;
  --topo-cta-fonte: 15px;

  /* Escala de tipo: fluida pela largura e, no título do hero, também pela altura da tela */
  --t-display: clamp(2.25rem, min(4.4vw, 7.6vh), 3.75rem);
  --t-headline: clamp(1.75rem, 1rem + 2vw, 2.5rem);
  --t-headline-cta: clamp(1.75rem, 1rem + 2vw, 2.6rem);
  --t-hero-lead: clamp(1.05rem, 0.9rem + 0.4vw, 1.15rem);
  --t-lead: 1.08rem;
  --t-numeral: 2.25rem;
  --t-numeral-lg: clamp(2.1rem, 3.4vw, 2.9rem);
  --t-numeral-xl: clamp(2.75rem, 4.4vw, 4rem);
  --t-price: 2.6rem;
}
/* Tablet: texto e celular do hero lado a lado, para o hero inteiro caber na primeira tela */
@media (min-width: 720px) and (max-width: 1023px) {
  :root {
    --hero-colunas-gap: 36px;
    --hero-texto-base: 340px;
    --hero-fone-base: 300px;
  }
  #topo .fone { zoom: 0.8; }
}
/* Desktop: texto corrido um pouco menor (15px), em proporção com os títulos */
@media (min-width: 1024px) {
  html { font-size: 15px; }
  /* Celulares de exemplo um pouco menores, para o hero caber na altura da tela */
  .fone { zoom: 0.88; }
}
/* Celular: menos respiro vertical e topo em uma linha só */
@media (max-width: 639px) {
  :root {
    --gutter: 20px;
    --secao: 72px;
    --secao-meia: 36px;
    --hero-topo: 56px;
    --hero-base: 72px;
    --topo-gap: 12px;
  }
}
/* Celular estreito (320–374px) */
@media (max-width: 374px) {
  :root {
    --gutter: 16px;
    --topo-gap: 8px;
    --marca-fonte: 15px;
    --topo-cta-pad: 14px;
    --topo-cta-fonte: 14px;
  }
}

/* Base */
body { margin: 0; background: #FFFFFF; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
p, li { text-wrap: pretty; }
h3 { text-wrap: balance; line-height: 1.3; }

/* "Iago": a Figtree desenha o I igual a um l ("lago"). Só o I vai na Schibsted, que tem serifa. */
.i-serif { font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-weight: inherit; }
a { color: #3340D8; }
a:hover { color: #2430B0; }

::selection { background: #A5ADFF; color: #14161F; }

/* Menu do topo: some quando marca, links e botão não cabem numa linha (tablets e celulares) */
.nav-links { display: flex; }
@media (max-width: 959px) { .nav-links { display: none; } }

/* Alvos de toque de 44px sem mudar o desenho do topo */
.marca { min-height: 44px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; color: #C9CCD8; transition: color 150ms ease-out; }

/* Botões: só cor muda, o formato continua inline no HTML */
.btn { transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out; }
.btn-primary { background: #3340D8; }
.btn-ghost { border: 1px solid rgba(255,255,255,0.28); }
.btn-outline { border: 1.5px solid #3340D8; color: #3340D8; }

/* Hover só onde existe mouse: no toque, a cor não fica presa depois do toque */
@media (hover: hover) {
  .nav-link:hover { color: #FFFFFF; }
  .btn-primary:hover { background: #2430B0; }
  .btn-ghost:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.06); }
  .btn-outline:hover { background: #3340D8; color: #FFFFFF; }
}
.btn-primary:active { background: #1C268F; }
.btn-ghost:active { background: rgba(255,255,255,0.12); }
.btn-outline:active { background: #2430B0; border-color: #2430B0; color: #FFFFFF; }

/* Grades em tablet: evita um card sozinho na última linha */
@media (min-width: 640px) and (max-width: 987px) {
  .grade-pilares { --colunas: repeat(2, 1fr); }
  .grade-pilares > :last-child { grid-column: 1 / -1; }
}
/* Desktop: recursos em 2 × 2 e regras em 3 × 2, sem card sozinho */
@media (min-width: 1100px) {
  .grade-recursos { --colunas: repeat(2, 1fr); }
}
@media (min-width: 868px) {
  .grade-regras { --colunas: repeat(3, 1fr); }
}
@media (min-width: 560px) and (max-width: 1091px) {
  .grade-implantacao { --colunas: repeat(2, 1fr); }
}
@media (min-width: 560px) and (max-width: 1095px) {
  .grade-legenda { --colunas: repeat(2, 1fr); }
}
@media (min-width: 700px) and (max-width: 1187px) {
  .grade-fechamento { --colunas: repeat(3, 1fr); }
}

/* Custos de uso: recolhidos, abrem ao toque */
.custos summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; cursor: pointer; list-style: none; border-radius: 12px; }
.custos summary::-webkit-details-marker { display: none; }
.custos-acao { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #3340D8; font-weight: 700; }
.custos-acao::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 150ms ease-out; }
.custos[open] .custos-acao::after { transform: translateY(2px) rotate(-135deg); }
.custos summary:focus-visible { outline: 2px solid #3340D8; outline-offset: 4px; }
@media (hover: hover) { .custos summary:hover .custos-acao { color: #2430B0; } }

/* Barra fixa de WhatsApp: só no celular, aparece depois do hero e some no chamado final */
.barra-whats { display: none; }
@media (max-width: 639px) {
  .barra-whats {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
    background: rgba(20,22,31,0.94); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(100%); visibility: hidden; transition: transform 200ms ease-out, visibility 200ms;
  }
  .barra-whats.visivel { transform: none; visibility: visible; }
  body { padding-bottom: 76px; }
}

/* Tabela de custos */
.tabela-custos { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.97rem; }
.tabela-custos thead tr { text-align: left; color: #565B6B; font-size: 12px; letter-spacing: 0.1em; }
.tabela-custos thead th { padding: 16px 20px; border-bottom: 1px solid #E2E4EC; font-weight: 700; }
.tabela-custos thead th + th { text-align: right; }
.tabela-custos tbody { font-variant-numeric: tabular-nums; }
.tabela-custos tbody th { padding: 14px 20px; border-bottom: 1px solid #EEF0F4; text-align: left; font-weight: 600; }
.tabela-custos td { padding: 14px 20px; border-bottom: 1px solid #EEF0F4; text-align: right; }
.tabela-custos tbody tr:last-child > * { border-bottom: 0; }
/* Celular: cada item vira um bloco com os três valores rotulados, sem rolagem lateral */
@media (max-width: 699px) {
  .tabela-custos, .tabela-custos tbody { display: block; min-width: 0; }
  .tabela-custos thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tabela-custos tbody tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; padding: 16px 20px; border-bottom: 1px solid #EEF0F4; }
  .tabela-custos tbody tr:last-child { border-bottom: 0; }
  .tabela-custos tbody th { grid-column: 1 / -1; padding: 0; border: 0; }
  .tabela-custos td { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; text-align: left; }
  .tabela-custos td::before { content: attr(data-label); font-size: 12px; color: #5F6475; }
}

/* Foco do teclado: azul no claro, lavanda no escuro */
a:focus-visible { outline: 2px solid #3340D8; outline-offset: 3px; }
.btn:focus-visible { outline-offset: 4px; }
.escuro a:focus-visible { outline-color: #A5ADFF; }
.marca:focus-visible { border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-link, .btn, .barra-whats, .custos-acao::after { transition: none; }
}
