/* Grimani: parede de azulejos.
   HTML e CSS puros. Sem scripts, sem recursos externos, sem rastreamento.
   Para um app novo: crie um tema .tema-<app> com --app, --app-ink e --app-link e um azulejo em /assets/azulejos/. */

@font-face {
    font-family: "Bricolage Grotesque";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    font-stretch: 75% 100%;
    src: url(/assets/fonts/bricolage-grotesque-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: "Bricolage Grotesque";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    font-stretch: 75% 100%;
    src: url(/assets/fonts/bricolage-grotesque-latin-ext.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --porcelana: #f5f7fb;
    --porcelana-2: #e9edf6;
    --tinta: #0f1733;
    --tinta-2: #46506b;
    --linha: #d3d9e8;
    --cobalto: #1a3a8f;
    --cobalto-2: #284fb8;
    --ocre: #e3a72f;

    /* Cor da área ou do app (padrão: cobalto) */
    --app: var(--cobalto);
    --app-ink: #f5f7fb;
    --app-link: var(--cobalto);

    --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
    --texto: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;

    --largura: 74rem;
    --medida: 40rem;
    --respiro: clamp(4rem, 9vw, 7.5rem);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    color-scheme: light dark;
}

.tema-receitas {
    --app: #a44a33;
    --app-ink: #fff7f0;
    --app-link: #a44a33;
}

@media (prefers-color-scheme: dark) {
    :root {
        --porcelana: #0b1129;
        --porcelana-2: #141c3d;
        --tinta: #eef1f8;
        --tinta-2: #aab3cc;
        --linha: #27315c;
        --cobalto-2: #6d8cf0;
        --app-link: #a9bdff;
    }
    .tema-receitas { --app-link: #f2a48c; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--cobalto-2) var(--porcelana); }

body {
    margin: 0;
    background: var(--porcelana);
    color: var(--tinta);
    font-family: var(--texto);
    font-size: 1.0625rem;
    line-height: 1.65;
    caret-color: var(--cobalto-2);
}
::selection { background: var(--ocre); color: #0f1733; }

a { color: var(--app-link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; border-radius: 2px; }

.pular { position: absolute; left: -999px; top: 0; z-index: 10; background: var(--tinta); color: var(--porcelana); padding: 0.6rem 1rem; }
.pular:focus { left: 1rem; top: 1rem; }

.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.faixa { max-width: var(--largura); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

h1, h2, h3, .marca, .nav, .botao, .placa, summary, .email-grande {
    font-family: var(--display);
    font-optical-sizing: auto;
}
h1, h2, h3 { color: var(--tinta); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 7.2vw, 5.6rem); font-stretch: 88%; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-stretch: 92%; }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; line-height: 1.2; }
p, ul, ol, dl { margin: 0 0 1rem; }
.texto { max-width: var(--medida); }
.apoio { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--tinta-2); max-width: 36rem; text-wrap: pretty; }
.discreto { color: var(--tinta-2); font-size: 0.95rem; }

/* Cabeçalho */
.topo { padding: 1.25rem 0; }
.topo .faixa { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; flex-wrap: wrap; }
.marca { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--tinta); text-decoration: none; font-weight: 750; font-size: 1.5rem; letter-spacing: -0.03em; }
.marca svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; font-size: 1rem; font-weight: 550; }
.nav a { color: var(--tinta); text-decoration: none; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--linha); }
.nav a[aria-current="page"] { border-color: var(--app); }

/* Navegação do app */
.subnav { border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); }
.subnav .faixa { display: flex; gap: 0 1.75rem; flex-wrap: wrap; font-family: var(--display); font-weight: 600; }
.subnav a { display: inline-flex; align-items: center; min-height: 48px; color: var(--tinta-2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--tinta); }
.subnav a[aria-current="page"] { color: var(--tinta); border-color: var(--app); }

/* Abertura */
.abertura { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.abertura h1 { max-width: 14ch; margin-bottom: 1.5rem; }

/* Parede de azulejos */
.parede {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 3px; /* o rejunte */
    background: var(--porcelana);
}
.az {
    aspect-ratio: 1;
    background-size: 100% 100%;
    rotate: var(--r, 0deg);
    transition: rotate 0.9s var(--ease);
    animation: assentar 1.1s var(--ease) both;
}
.az.r90 { --r: 90deg; }
.az.r180 { --r: 180deg; }
.az.r270 { --r: 270deg; }
.az-quartos { background-image: url(/assets/azulejos/quartos.svg); }
.az-meia-lua { background-image: url(/assets/azulejos/meia-lua.svg); }
.az-triangulo { background-image: url(/assets/azulejos/triangulo.svg); }
.az-ocre { background-image: url(/assets/azulejos/ocre.svg); }
.az-faixas { background-image: url(/assets/azulejos/faixas.svg); }
.az:nth-child(3n+1) { animation-delay: 60ms; }
.az:nth-child(3n+2) { animation-delay: 160ms; }
.az:nth-child(3n) { animation-delay: 260ms; }

@keyframes assentar { from { rotate: calc(var(--r, 0deg) - 90deg); } }

/* O giro: ao escolher uma porta, a parede dá um quarto de volta */
.parede:has(.porta:hover) .az,
.parede:has(.porta:focus-visible) .az { rotate: calc(var(--r, 0deg) + 90deg); }

.porta {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    align-items: flex-end;
    padding: clamp(10px, 1.6vw, 18px);
    background-size: 50% 50%;
    color: #0f1733;
    text-decoration: none;
}
.porta-consultoria { background-image: url(/assets/azulejos/quartos-cobalto.svg); }
.porta-receitas { background-image: url(/assets/azulejos/receitas-da-vo.svg); }
.placa {
    background: #f5f7fb;
    color: #0f1733;
    padding: clamp(0.9rem, 1.8vw, 1.25rem) clamp(1rem, 2vw, 1.4rem);
    width: min(100%, 22rem);
    box-shadow: 0 2px 4px rgb(15 23 51 / 0.14), 0 14px 30px -10px rgb(15 23 51 / 0.35);
    transition: translate 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.placa strong { display: block; font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 720; line-height: 1.1; letter-spacing: -0.02em; }
.placa > span { display: block; font-family: var(--texto); font-size: 0.95rem; color: #46506b; margin-top: 0.3rem; line-height: 1.4; }
.placa .seta { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.8rem; font-weight: 650; color: var(--app); font-size: 0.95rem; }
.seta svg { width: 18px; height: 18px; transition: translate 0.5s var(--ease); }
.porta:hover .placa, .porta:focus-visible .placa { translate: 0 -4px; box-shadow: 0 3px 6px rgb(15 23 51 / 0.16), 0 22px 40px -12px rgb(15 23 51 / 0.45); }
.porta:hover .seta svg, .porta:focus-visible .seta svg { translate: 4px 0; }
.porta:focus-visible { outline-offset: -3px; }

/* Seções */
.secao { padding: var(--respiro) 0 0; }
main > .secao:last-child { padding-bottom: var(--respiro); }
.duas-colunas { display: grid; gap: 2rem clamp(2rem, 6vw, 5rem); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.duas-colunas h2 { max-width: 12ch; }
.duas-colunas .botoes { margin-top: 1.25rem; }
.duas-colunas > div > h2 { margin-bottom: 1.25rem; }

/* Frentes da consultoria: linhas, não cartões */
.frentes { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--tinta); }
.frentes li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 0.5rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--linha); margin: 0; }
.frentes h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.frentes p { margin: 0; color: var(--tinta-2); }

.passos { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--tinta); counter-reset: passo; }
.passos li { padding: 1.25rem 1.5rem 0 0; margin: 0; counter-increment: passo; }
.passos li::before { content: counter(passo); display: block; font-family: var(--display); font-weight: 750; font-size: 2.6rem; line-height: 1; color: var(--cobalto-2); margin-bottom: 0.8rem; font-variant-numeric: tabular-nums; }
.passos strong { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 680; margin-bottom: 0.3rem; }
.passos p { color: var(--tinta-2); margin: 0; font-size: 1rem; }

/* Lista de aplicativos */
.apps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.apps li { margin: 0; }
.app {
    display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 1.25rem; align-items: center;
    color: var(--tinta); text-decoration: none;
    padding: 1.4rem 0 0; border-top: 2px solid var(--app);
}
.app img { width: 88px; height: 88px; border-radius: 22%; box-shadow: 0 1px 2px rgb(15 23 51 / 0.12), 0 8px 18px -6px rgb(15 23 51 / 0.3); }
.app strong { display: block; font-family: var(--display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.app span { display: block; color: var(--tinta-2); font-size: 0.98rem; margin-top: 0.25rem; line-height: 1.45; }
.app:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* Faixa de contato: um campo de cor inteiro */
.contato { margin-top: var(--respiro); background: var(--app); color: var(--app-ink); padding: clamp(3rem, 8vw, 6rem) 0; position: relative; overflow: hidden; }
.contato::after {
    content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: min(34vw, 26rem);
    background-image: url(/assets/azulejos/quartos-cobalto.svg); background-size: clamp(80px, 9vw, 130px);
    opacity: 0.22; pointer-events: none;
}
.tema-receitas .contato::after { background-image: url(/assets/azulejos/receitas-da-vo.svg); opacity: 0.3; }
.contato .faixa { position: relative; z-index: 1; }
.contato h2 { color: inherit; max-width: 16ch; margin-bottom: 1rem; }
.contato p { max-width: 34rem; }
.contato p a { color: inherit; }
.email-grande { display: inline-block; margin-top: 0.5rem; font-weight: 650; font-size: clamp(1.35rem, 4.2vw, 2.6rem); letter-spacing: -0.02em; color: inherit; text-decoration: underline; text-decoration-color: var(--ocre); text-decoration-thickness: 3px; text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.email-grande:hover { text-decoration-thickness: 5px; }

/* Botões */
.botoes { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.botao { display: inline-flex; align-items: center; min-height: 52px; padding: 0.75rem 1.4rem; background: var(--app); color: var(--app-ink); font-weight: 650; font-size: 1.05rem; text-decoration: none; border: 2px solid var(--app); transition: background-color 0.3s var(--ease); }
.botao:hover { background: color-mix(in oklab, var(--app) 84%, black); text-decoration: none; }
.botao.vazado { background: transparent; color: var(--app-link); border-color: currentColor; }
.botao.vazado:hover { background: color-mix(in oklab, var(--app-link) 12%, transparent); }
.botao[aria-disabled="true"] { cursor: default; }
.botao[aria-disabled="true"]:hover { background: var(--app); }

/* Página de app */
.app-abertura { padding: clamp(2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem); }
.app-abertura .faixa { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); align-items: center; }
.app-abertura img { width: clamp(104px, 14vw, 160px); height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 2px 4px rgb(15 23 51 / 0.12), 0 18px 36px -12px rgb(15 23 51 / 0.4); }
.app-abertura h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); margin-bottom: 0.75rem; }
.app-abertura .apoio { margin: 0; }
.friso { height: clamp(48px, 7vw, 80px); background-image: url(/assets/azulejos/quartos-cobalto.svg); background-size: auto 100%; background-repeat: repeat-x; }
.friso.fim { margin-top: var(--respiro); }
.tema-receitas .friso { background-image: url(/assets/azulejos/receitas-da-vo.svg); }

.recursos { margin: 0; border-top: 2px solid var(--tinta); }
.recursos div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 0.4rem 2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--linha); }
.recursos dt { font-family: var(--display); font-weight: 680; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.3; }
.recursos dd { margin: 0; color: var(--tinta-2); }

.destaque { background: var(--porcelana-2); padding: 1.5rem clamp(1.25rem, 3vw, 2rem); margin: 2.5rem 0; max-width: 46rem; }
.destaque p:last-child { margin-bottom: 0; }
.destaque.aviso { margin: 2rem 0 0; max-width: 36rem; border-top: 3px solid var(--app); }

/* Documentos (ajuda, privacidade) */
.documento { padding-top: clamp(2rem, 5vw, 4rem); }
.documento .faixa > * { max-width: 46rem; }
.documento h1 { font-size: clamp(2.3rem, 6vw, 4rem); margin-bottom: 1rem; }
.documento h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); margin: 3rem 0 0.75rem; letter-spacing: -0.015em; }
.documento li { margin-bottom: 0.4rem; }

dl.dados { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1.5rem; }
dl.dados dt { color: var(--tinta-2); }
dl.dados dd { margin: 0; font-variant-numeric: tabular-nums; }

details { border-top: 1px solid var(--linha); }
details:last-of-type { border-bottom: 1px solid var(--linha); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: 60px; padding: 0.7rem 0; font-weight: 640; font-size: 1.15rem; line-height: 1.3; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 22px; height: 22px; background: var(--app-link); mask: url(/assets/azulejos/mais.svg) center / contain no-repeat; transition: rotate 0.4s var(--ease); }
details[open] summary::after { rotate: 45deg; }
details > :not(summary) { max-width: 40rem; }
details[open] { padding-bottom: 1rem; }

/* Rodapé */
.rodape { padding: 2.5rem 0 3rem; font-size: 0.92rem; color: var(--tinta-2); }
.rodape .faixa { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: end; }
.rodape p { margin: 0 0 0.3rem; }
.rodape a { color: var(--tinta-2); }
.rodape .cnpj { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Telas menores */
@media (max-width: 52rem) {
    .duas-colunas, .frentes li, .recursos div { grid-template-columns: minmax(0, 1fr); }
    .passos { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
    .rodape .faixa { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
    .parede { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .porta { grid-column: span 4; grid-row: span 2; background-size: 25% 50%; }
    .az.so-largo { display: none; }
    .app-abertura .faixa { grid-template-columns: minmax(0, 1fr); }
    .contato::after { display: none; }
    .passos { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .az, .placa, .seta svg, summary::after, .botao { animation: none; transition: none; }
    .parede:has(.porta:hover) .az, .parede:has(.porta:focus-visible) .az { rotate: var(--r, 0deg); }
}
