/* Linkbio da Dra. Jéssica Eugênio. Cores editáveis no painel.
   Sitka: fonte oficial via Adobe Fonts/Typekit (link no <head> do index.php).
   Perpetua Titling MT: fonte oficial auto-hospedada (@font-face abaixo).
   Georgia permanece apenas como reserva. */

/* ---- Fonte oficial auto-hospedada: Perpetua Titling MT ---- */
@font-face {
    font-family: 'Perpetua Titling MT';
    src: url('fonts/pertili.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* ---- Tokens ---- */
:root {
    /* cor (defaults; index.php sobrescreve o subconjunto editável) */
    --c-bg: #0D0D0D;
    --c-surface: #191919;
    --c-surface-2: #201E19;
    --c-title: #F4EFE6;
    --c-text: #F4EFE6;
    --c-muted: #B8B2A8;
    --c-line: #3A342B;
    --c-line-strong: #C6A66B;
    --c-accent: #C6A66B;
    --c-accent-hover: #D6BA84;
    --c-on-accent: #0D0D0D;
    --c-focus: #F4EFE6;

    /* tipografia */
    --font-ui: 'sitka-text', 'Sitka Text', 'Sitka', 'Sitka Small', Georgia, serif;
    --font-title: 'Perpetua Titling MT', 'Perpetua', Georgia, serif;

    /* nome (defaults; index.php sobrescreve com a aparência do painel) */
    --name-size: 31px;
    --name-color: var(--c-title);
    --name-first-weight: 400;
    --name-last-weight: 400;

    /* título do card principal (duas cores; index.php sobrescreve) */
    --cta-size: 24px;
    --cta-color: var(--c-on-accent);
    --cta-first-weight: 400;
    --cta-last-weight: 700;

    /* espaçamento */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
    --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px; --s14: 56px;

    /* raios */
    --r-card: 17px; --r-accent: 23px; --r-pill: 999px; --r-sm: 10px;

    /* layout (container ~960px de conteúdo; coluna direita flexível) */
    --container: 1008px; --col-left: 330px; --col-right: 558px; --col-gap: 72px;

    /* movimento */
    --dur: .45s; --ease: cubic-bezier(.2, .6, .2, 1);
    --shadow: 0 1px 2px rgba(0, 0, 0, .22);
}

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

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

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---- Fundo animado (WebGL "mesh drift", decorativo) ----
   Canvas fixo atrás de todo o conteúdo. Se o WebGL falhar ou o JS não rodar,
   fica transparente e o fundo permanece em --c-bg (nada quebra). */
#bg-mesh {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
    opacity: .95;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    #bg-mesh { opacity: .7; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--c-title); font-weight: 700; line-height: 1.2; }

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

/* ---- Página / container ---- */
.page {
    position: relative;
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 88px) var(--s6) var(--s12);
}

/* Marca-d'água: um elemento da própria Voz, contraste muito baixo */
.watermark {
    position: absolute;
    top: clamp(40px, 6vw, 88px);
    left: var(--s5);
    width: 320px; max-width: 60vw;
    opacity: .055;
    pointer-events: none; user-select: none; z-index: 0;
}

/* ---- Grade de 2 colunas ---- */
.layout {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; gap: var(--s6); min-width: 0;
}
.col { display: contents; }               /* mobile: promove os blocos */
.block { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
@media (max-width: 719.98px) {
    .page { max-width: 500px; padding: 34px 20px var(--s12); }
    .block, .card, .row-card { width: 100%; min-width: 0; }
    .intro__bio { max-width: 100%; overflow-wrap: anywhere; }
    .card__title, .card__text, .row-card__title, .row-card__sub { overflow-wrap: anywhere; }
}

@media (min-width: 1000px) {
    .layout {
        display: grid;
        grid-template-columns: var(--col-left) minmax(0, 1fr);
        justify-content: center;
        column-gap: var(--col-gap);
        align-items: start;
    }
    .col {
        display: flex; flex-direction: column; gap: var(--s6);
        min-width: 0;
    }
    .col--left  { grid-column: 1; }
    .col--right { grid-column: 2; }
    /* O rodapé agora vive dentro de .col--right (abaixo dos botões); ganha um
       respiro extra para não encostar no último card. */
    .col--right > .footer { margin-top: var(--s4); }

    /* Sticky no desktop: a apresentação (coluna esquerda) acompanha a rolagem
       enquanto a coluna de botões (direita) rola. Com poucos botões a coluna
       direita é curta e quase não há rolagem — a esquerda simplesmente fica
       no lugar. `align-self: start` evita o esticamento do grid (necessário
       para o sticky funcionar). */
    .col--left {
        position: sticky;
        top: clamp(24px, 4vw, 56px);
        align-self: start;
    }
}

/* ---- Mobile (coluna única): apresentação centralizada ---- */
@media (max-width: 999.98px) {
    /* As colunas usam display: contents: seus blocos entram na mesma fila flex. */
    .block--apresentacao { order: -2; }
    .block--principal { order: -1; }
    .col--right > .block { order: 0; }
    .block--atendimento { order: 1; }
    .block--redes { order: 2; }
    .footer { order: 3; }

    .intro {
        align-items: center !important;
        text-align: center !important;
    }
    .watermark {
        top: 28px;
        left: 50% !important;
        transform: translateX(-50%);
        width: min(320px, 80vw);
        max-width: none;
        opacity: .055;
    }
    .card.card--info { background: var(--c-surface); }
}

/* ---- Apresentação ---- */
.intro { gap: var(--s2); align-items: flex-start; text-align: left; }
.intro__brand { margin: var(--s1) 0; }
.intro__brand img { width: min(300px, 100%); max-width: 100%; height: auto; object-fit: contain; }
.portrait {
    width: 108px; height: 108px; border-radius: 50%;
    object-fit: cover; object-position: top center;
    border: 2px solid var(--c-line-strong);
    margin-bottom: var(--s2);
}
.intro__area {
    font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--c-muted); margin: var(--s2) 0 0;   /* agora fica abaixo do nome */
}
/* Nome em display: primeiro nome leve + sobrenome forte (tokens editáveis no painel). */
.intro__name {
    margin: 2px 0 0;
    font-family: var(--font-title);
    font-size: clamp(28px, 9vw, var(--name-size));
    line-height: 1.2; letter-spacing: 0;
    color: var(--name-color);
}
.intro__name-first { font-weight: var(--name-first-weight); }
.intro__name-last  { font-weight: var(--name-last-weight); }
.intro__oab {
    font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: var(--c-muted); margin: var(--s2) 0 0;
}
.intro__bio { font-size: 15px; color: var(--c-text); margin: var(--s2) 0 0; max-width: 40ch; }
.intro__bio strong { color: var(--c-title); font-weight: 700; }
.intro__bio em { font-style: italic; }

/* ---- Cards (base) ---- */
.card {
    background: var(--c-surface); border: 1px solid var(--c-line);
    border-radius: var(--r-card); padding: var(--s6);
    box-shadow: var(--shadow);
}
.card__label {
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--c-accent); margin: 0 0 var(--s2);
}
.card__title { font-size: 18px; margin: 0; }
.card__text { font-size: 15px; color: var(--c-text); margin: var(--s2) 0 0; }

/* Card principal (destaque claro) */
.card--accent {
    background: var(--c-accent); border-color: transparent;
    border-radius: var(--r-accent); padding: var(--s8);
}
.card--accent .card__label { color: #0D0D0D; }
.card--accent .card__title { color: var(--c-on-accent); font-size: 24px; letter-spacing: -.01em; }
/* Título em duas cores (primeira parte leve + resto em destaque), editável no painel. */
.card--accent .card__title--split {
    font-size: clamp(20px, 4.8vw, var(--cta-size));
    color: var(--cta-color);
    line-height: 1.12; letter-spacing: -.01em;
}
.card__title-first { font-weight: var(--cta-first-weight); }
.card__title-last  { font-weight: var(--cta-last-weight); }
.card--accent .card__text { color: #0D0D0D; }
.cta {
    display: inline-flex; align-items: center; gap: var(--s2);
    margin-top: var(--s5); font-size: 12px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--c-on-accent); text-decoration: none;
    min-height: 44px;
}
.cta .vt-arrow { color: currentColor; }

/* Card de atendimento (info) */
.card--info .card__title { font-size: 16px; }
.card--info .cta { color: var(--c-title); margin-top: var(--s4); }

/* ---- Cards de direcionamento / materiais / treinamento ---- */
.group { gap: var(--s3); }
.group__label {
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--c-accent); margin: 0 0 var(--s1);
}
.group__intro { font-size: 15px; color: var(--c-muted); margin: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }

.row-card {
    display: flex; align-items: flex-start; gap: var(--s4);
    background: var(--c-surface); border: 1px solid var(--c-line);
    border-radius: var(--r-card); padding: var(--s5);
    text-decoration: none; color: inherit; box-shadow: var(--shadow);
}
.row-card__body { display: block; flex: 1; min-width: 0; }
.row-card__label {
    display: block;
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--c-accent); margin: 0 0 var(--s1);
}
.row-card__title { display: block; font-size: 17px; font-weight: 700; color: var(--c-title); margin: 0; }
.row-card__sub { display: block; font-size: 14px; color: var(--c-muted); margin: var(--s1) 0 0; }
.row-card__arrow { flex: none; margin-top: 2px; color: var(--c-accent); }
.row-card__icon { flex: none; color: var(--c-accent); }
.row-card__icon .ic { width: 22px; height: 22px; display: block; }
.row-card--highlight .row-card__icon { color: var(--c-accent); }

/* Item sem destino: "Em breve" (sem aparência de link ativo) */
.row-card--soon { cursor: default; opacity: .85; }
.row-card--soon .row-card__title { color: var(--c-text); }
.badge-soon {
    flex: none; align-self: flex-start; margin-top: 2px;
    font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--c-muted); border: 1px solid var(--c-line);
    border-radius: var(--r-pill); padding: 3px 9px;
}
/* Variações de badge (coerentes com o design system, sem cores novas) */
.badge--new  { color: var(--c-title); border-color: var(--c-line); }
.badge--free { color: var(--c-on-accent); background: var(--c-accent); border-color: transparent; }
/* .badge--soon e .badge--neutral usam o padrão acima */

/* ---- Destaque: tratamento sóbrio e elegante (sem brilho/animação) ----
   Superfície levemente elevada, borda mais forte, barra de acento à esquerda
   e título/seta realçados. */
.row-card--highlight {
    background: var(--c-surface-2);
    border-color: var(--c-line-strong);
    box-shadow: inset 3px 0 0 var(--c-accent), var(--shadow);
}
.row-card--highlight .row-card__title { color: var(--c-title); }
.row-card--highlight .row-card__arrow { color: var(--c-title); }
.block--highlight { position: relative; }

/* ---- Serviços (etiquetas) ---- */
.tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s1) 0 0; padding: 0; list-style: none; }
.tag {
    font-size: 13px; color: var(--c-muted);
    border: 1px solid var(--c-line); border-radius: var(--r-pill);
    padding: 8px 14px; white-space: normal;
}
.wide-btn {
    display: flex; align-items: center; justify-content: center; gap: var(--s2);
    margin-top: var(--s4); min-height: 52px;
    background: var(--c-accent); color: var(--c-on-accent);
    border-radius: var(--r-card); text-decoration: none;
    font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* ---- Redes sociais ---- */
.socials { display: flex; flex-wrap: wrap; gap: var(--s6); }
.social { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-decoration: none; min-width: 44px; }
.social__icon {
    width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--c-line); color: var(--c-accent);
}
.social__icon svg { width: 20px; height: 20px; }
.social__label { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }

/* ---- Rodapé ---- */
.footer { text-align: center; padding-top: var(--s8); }
.footer__divider { height: 1px; background: var(--c-line); border: 0; margin: 0 0 var(--s6); }
.footer__logo { margin: 0 0 var(--s4); line-height: 0; }
.footer__logo img { display: block; max-width: 220px; margin: 0 auto; height: auto; }
.footer__address { font-size: 13px; line-height: 1.6; color: var(--c-muted); margin: 0 0 var(--s3); }
.footer__legal { font-size: 12px; color: var(--c-muted); margin: 0 0 var(--s2); }
.footer__domain { font-size: 14px; color: var(--c-text); margin: 0; }
.footer__domain a { text-decoration: none; }

/* ---- Créditos do desenvolvedor (SAIPH) — discreto, abaixo da página ---- */
.credit {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--s2);
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--s6) var(--s10);
    text-decoration: none;
    opacity: .38;
    transition: opacity var(--dur) var(--ease);
}
.credit:hover, .credit:focus-visible { opacity: .75; }
.credit__label {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--c-muted);
}
.credit__logo { width: 88px; height: auto; }
@media (prefers-reduced-motion: reduce) { .credit { transition: none; } }

/* ---- Contato flutuante (FAB) ---- */
.fab {
    position: fixed; z-index: 50;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--c-accent); color: var(--c-on-accent);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35); text-decoration: none;
}
.fab svg { width: 28px; height: 28px; }

/* ---- Seta (ícone) ---- */
.vt-arrow { display: inline-block; width: 16px; height: 16px; flex: none; transition: transform .15s ease; }

/* ============================================================
   Movimento (ver app.js). Conteúdo visível por padrão; só oculta
   sob .vt-anim (adicionada por JS, antes do paint, sem reduced-motion).
   ============================================================ */
.vt-anim [data-animate] { opacity: 0; }

@media (hover: hover) and (pointer: fine) {
    .row-card[href]:hover { border-color: var(--c-accent); background: var(--c-surface-2); transform: translateY(-2px); }
    .row-card[href]:hover .row-card__arrow { transform: translate(2px, -2px); }
    .cta:hover .vt-arrow, .wide-btn:hover .vt-arrow { transform: translate(2px, -2px); }
    .social:hover .social__icon { border-color: var(--c-title); }
    .wide-btn:hover { background: var(--c-accent-hover); }
    .footer__domain a:hover { color: var(--c-accent); }
    .fab:hover { background: var(--c-accent-hover); }
    /* transição liberada só após a entrada (evita CSS+GSAP na mesma prop.) */
    .vt-entered .row-card, .vt-entered .wide-btn, .vt-entered .social__icon { transition: background-color .15s ease, border-color .15s ease; }
}

@media (prefers-reduced-motion: reduce) {
    .vt-anim [data-animate] { opacity: 1; }
    .vt-arrow, .row-card, .wide-btn, .social__icon, .fab { transition: none; }
}

/* Galeria de ponta a ponta, entre o conteúdo e os créditos. */
.gallery { width: 100%; padding: clamp(28px, 5vw, 64px) 0; overflow: hidden; }
.gallery__viewport {
    width: 100%; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -ms-overflow-style: none;
    touch-action: pan-x; cursor: grab;
    mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
}
.gallery__viewport::-webkit-scrollbar { display: none; }
.gallery__viewport:active { cursor: grabbing; }
.gallery__track { display: flex; width: max-content; }
.gallery__group { display: flex; flex: none; gap: clamp(10px, 1.4vw, 18px); padding-right: clamp(10px, 1.4vw, 18px); }
.gallery__item {
    flex: none; margin: 0; width: clamp(170px, 20vw, 260px);
    aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px;
    background: var(--c-surface); border: 1px solid var(--c-line);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}
.gallery__item img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .45s ease; }
.gallery.is-ready .gallery__track { animation: gallery-flow var(--gallery-duration) linear infinite; }
.gallery:focus-within .gallery__track { animation-play-state: paused; }
@keyframes gallery-flow { to { transform: translateX(calc(-1 * var(--gallery-distance))); } }
@media (hover: hover) and (pointer: fine) {
    .gallery:hover .gallery__track { animation-play-state: paused; }
    .gallery__item:hover img { transform: scale(1.035); }
}
@media (max-width: 600px) {
    .gallery { padding-block: 32px 38px; }
    .gallery__item { width: clamp(150px, 48vw, 210px); border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .gallery.is-ready .gallery__track { animation: none; }
    .gallery__item img { transition: none; }
}

/* Formulário que se abre dentro do próprio card. */
.capture-card { display: block; padding: 0; overflow: hidden; }
.capture-card__toggle {
    display: flex; align-items: flex-start; gap: var(--s4); width: 100%; padding: var(--s5);
    border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.capture-card__toggle .row-card__arrow { transition: transform .25s ease; }
.capture-card.is-open .capture-card__toggle .row-card__arrow { transform: rotate(135deg); }
.capture-card__panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .56s cubic-bezier(.22,1,.36,1), opacity .38s ease; }
.capture-card__panel[hidden] { display: none; }
.capture-card.is-open .capture-card__panel { grid-template-rows: 1fr; opacity: 1; }
.capture-card__inner { min-height: 0; overflow: hidden; padding: 0 var(--s5) var(--s5); }
.capture-card__intro { border-top: 1px solid var(--c-line); padding-top: var(--s4); margin-bottom: var(--s4); }
.capture-card__intro h3 { font-size: 18px; margin: 0 0 6px; }
.capture-card__intro p { color: var(--c-muted); font-size: 14px; margin: 0; }
.capture-form { display: grid; gap: 14px; }
.capture-form__field { display: grid; gap: 5px; min-width: 0; }
.capture-form__field label { font-size: 13px; font-weight: 700; color: var(--c-title); }
.capture-form__field input:not([type=checkbox]), .capture-form__field select, .capture-form__field textarea {
    width: 100%; min-height: 48px; padding: 11px 13px; background: var(--c-surface); color: var(--c-title);
    border: 1px solid var(--c-line); border-radius: 9px; font: inherit; font-size: 15px;
}
.capture-form__field input::placeholder, .capture-form__field textarea::placeholder { color: var(--c-muted); opacity: 1; }
.capture-form__field textarea { min-height: 92px; resize: vertical; }
.capture-form__field input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--c-accent); }
.capture-form__field :is(input, select, textarea):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.capture-form__field [aria-invalid=true] { border-color: #e68888 !important; box-shadow: 0 0 0 1px #e68888; }
.capture-form__help { color: var(--c-muted); font-size: 12px; }
.capture-form__help:empty, .capture-form__error:empty, .capture-form__status:empty { display: none; }
.capture-form__error { color: #f2a5a5; font-size: 12px; font-weight: 600; }
.capture-form__privacy { color: var(--c-muted); font-size: 12px; line-height: 1.5; margin: 4px 0 0; }
.capture-form__privacy a { text-underline-offset: 2px; }
.capture-form__status { margin: 0; color: var(--c-text); font-size: 13px; }
.capture-form__submit { min-height: 50px; border: 0; border-radius: 9px; background: var(--c-title); color: var(--c-bg); font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .04em; cursor: pointer; }
.capture-form__submit:disabled { opacity: .65; cursor: wait; }
.capture-card__close { display: block; margin: 14px auto 0; padding: 9px; border: 0; background: transparent; color: var(--c-muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.capture-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .capture-card__toggle:hover { background: rgba(255,255,255,.025); } }
@media (prefers-reduced-motion: reduce) { .capture-card__panel, .capture-card__toggle .row-card__arrow { transition: none; } }
