/* ============================================================
   CIA do Formando — style.css
   CSS autoral, mobile-first. Sem frameworks.
   ============================================================ */

/* ---- Reset leve ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
address { font-style: normal; }

/* ============================================================
   Tokens
   ============================================================ */
:root {
    --azul-marca:   #3498FF;
    --azul-hover:   #1E7FE0;
    --azul-suave:   #EAF3FF;
    --preto:        #131414;
    --grafite:      #2A2C2E;
    --cinza-sub:    #888888;
    --cinza-fundo:  #F5F5F5;
    --cinza-borda:  #E6E6E6;
    --branco:       #FFFFFF;

    /* Espaçamento — múltiplos de 8px */
    --sp-1: 8px;   --sp-2: 16px;  --sp-3: 24px;  --sp-4: 32px;
    --sp-5: 40px;  --sp-6: 48px;  --sp-8: 64px;  --sp-10: 80px;
    --sp-12: 96px; --sp-16: 128px;

    /* Cinza para textos secundários pequenos — derivado de --cinza-sub,
       escurecido para cumprir contraste WCAG AA sobre branco */
    --cinza-texto:  #6B6D70;

    --wrap: 1120px;
    --radius: 8px;      /* botões, elementos pequenos */
    --radius-lg: 14px;  /* blocos maiores (mapa, mídia) */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --font-corpo: 'Inter', system-ui, -apple-system, sans-serif;
    --font-titulo: 'Sora', 'Inter', system-ui, sans-serif;
}

/* ============================================================
   Base
   ============================================================ */
body {
    font-family: var(--font-corpo);
    color: var(--preto);
    background: var(--branco);
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3 {
    font-family: var(--font-titulo);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* ---- Foco visível e seleção da marca ---- */
:focus-visible {
    outline: 2px solid var(--azul-marca);
    outline-offset: 3px;
    border-radius: 2px;
}
::selection { background: var(--azul-suave); color: var(--preto); }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--sp-3);
}

.section { padding-block: var(--sp-12); }
.section--alt { background: var(--cinza-fundo); }

@media (min-width: 720px) {
    .section { padding-block: var(--sp-16); }
}

/* ---- Eyebrow (assinatura editorial — eco do "FORMATURAS" da logo) ---- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cinza-texto);
    margin-bottom: var(--sp-2);
}
.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--azul-marca);
}
.eyebrow--light { color: #A9ABAD; }

/* ---- Botões ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color .2s var(--ease), color .2s var(--ease),
                border-color .2s var(--ease), transform .2s var(--ease);
}
.btn--primary { background: var(--azul-marca); color: var(--branco); }
.btn--primary:hover { background: var(--azul-hover); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--cinza-borda); color: var(--preto); }
.btn--ghost:hover { border-color: var(--preto); transform: translateY(-2px); }
.btn--lg { padding: 17px 34px; font-size: 1rem; }

/* ---- Link com seta ---- */
.link-seta {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-weight: 600;
    color: var(--azul-marca);
    position: relative;
}
.link-seta::after { content: '→'; transition: transform .2s var(--ease); }
.link-seta:hover::after { transform: translateX(4px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    view-transition-name: site-header;
    transition: background-color .3s var(--ease), box-shadow .3s var(--ease),
                border-color .3s var(--ease);
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--cinza-borda);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}
.brand { view-transition-name: site-logo; display: inline-flex; align-items: center; }
.brand__logo { height: 44px; width: auto; }
.brand__fallback { font-family: var(--font-titulo); font-weight: 800; font-size: 1.15rem; }

.nav { display: flex; align-items: center; gap: var(--sp-4); }
.nav a { font-weight: 500; font-size: 0.95rem; position: relative; }
.nav a:not(.nav__cta)::after {
    content: '';
    position: absolute; left: 0; bottom: -4px;
    width: 100%; height: 2px;
    background: var(--azul-marca);
    transform: scaleX(0); transform-origin: left;
    transition: transform .25s var(--ease);
}
.nav a:not(.nav__cta):hover::after,
.nav a.is-active:not(.nav__cta)::after { transform: scaleX(1); }
.nav__cta {
    background: var(--preto); color: var(--branco);
    padding: 10px 18px; border-radius: var(--radius);
    transition: background-color .2s var(--ease);
}
.nav__cta:hover { background: var(--azul-marca); }

/* ---- Toggle mobile ---- */
.nav-toggle { display: none; width: 44px; height: 44px; flex-direction: column;
    gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--preto);
    transition: transform .3s var(--ease), opacity .3s var(--ease); }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav {
        position: fixed; inset: 0 0 0 auto;
        width: min(80vw, 340px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: var(--sp-4);
        padding: var(--sp-8) var(--sp-5);
        background: var(--branco);
        box-shadow: -20px 0 60px rgba(0,0,0,0.08);
        transform: translateX(100%);
        transition: transform .4s var(--ease);
    }
    .nav a { font-size: 1.4rem; font-family: var(--font-titulo); font-weight: 600; }
    body.nav-open .nav { transform: translateX(0); }
    body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-block: clamp(var(--sp-10), 12vw, var(--sp-16)); }
.hero__titulo {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--sp-4);
}
.hero__titulo em { color: var(--azul-marca); font-style: normal; }
.hero__lead { max-width: 60ch; color: var(--grafite); font-size: 1.1rem; margin-bottom: var(--sp-5); }
.hero__acoes { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* Page hero (páginas internas) */
.page-hero { padding-block: clamp(var(--sp-10), 10vw, var(--sp-12)) var(--sp-6); }
.page-hero__titulo { font-size: clamp(2.2rem, 5vw, 3.75rem); font-weight: 800; }

/* ============================================================
   Intro + stats
   ============================================================ */
.intro { display: grid; gap: var(--sp-8); }
.intro__frase { font-size: clamp(1.4rem, 3vw, 2rem); font-family: var(--font-titulo);
    font-weight: 600; line-height: 1.3; max-width: 22ch; letter-spacing: -0.01em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4);
    border-top: 1px solid var(--cinza-borda); padding-top: var(--sp-6); }
.stats__item + .stats__item { border-left: 1px solid var(--cinza-borda);
    padding-left: var(--sp-4); }
.stats__item strong { display: block; font-family: var(--font-titulo); font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--azul-marca); line-height: 1; }
.stats__item span { color: var(--cinza-texto); font-size: 0.9rem; }

@media (min-width: 860px) {
    .intro { grid-template-columns: 1.1fr 1fr; align-items: center; }
}

/* ============================================================
   Section head
   ============================================================ */
.section__head { max-width: 40ch; margin-bottom: var(--sp-8); }
.section__titulo { font-size: clamp(1.8rem, 4vw, 3rem); }
.section__acao { margin-top: var(--sp-6); }

/* ---- Serviços (home) ---- */
.servicos-lista { display: grid; gap: 0; }
.servico { display: flex; gap: var(--sp-4); padding-block: var(--sp-5);
    border-top: 1px solid var(--cinza-borda); }
.servico:last-child { border-bottom: 1px solid var(--cinza-borda); }
.servico__num { font-family: var(--font-titulo); font-weight: 700; font-size: 0.9rem;
    color: var(--azul-marca); padding-top: .3em; min-width: 2.5em; }
.servico h3 { font-size: 1.4rem; margin-bottom: var(--sp-1); }
.servico p { color: var(--grafite); max-width: 62ch; }
@media (min-width: 720px) {
    .servico { gap: var(--sp-8); }
    .servico h3 { font-size: 1.75rem; }
}

/* ---- Serviços (página detalhe) ---- */
.servicos-detalhe { display: grid; gap: var(--sp-8); }
.sd { display: grid; gap: var(--sp-2); padding-bottom: var(--sp-8);
    border-bottom: 1px solid var(--cinza-borda); }
.sd:last-child { border-bottom: 0; }
.sd__num { font-family: var(--font-titulo); font-weight: 700; color: var(--azul-marca); }
.sd__corpo h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: var(--sp-2); }
.sd__corpo p { color: var(--grafite); max-width: 68ch; }
@media (min-width: 720px) {
    .sd { grid-template-columns: 4rem 1fr; gap: var(--sp-6); align-items: start; }
    .sd__num { font-size: 1.1rem; padding-top: .4em; }
}

/* ---- Valores (Sobre) ---- */
.valores { display: grid; gap: var(--sp-6); }
.valor { padding-top: var(--sp-4); border-top: 2px solid var(--preto); }
.valor h3 { font-size: 1.4rem; margin-bottom: var(--sp-1); }
.valor p { color: var(--grafite); }
@media (min-width: 720px) { .valores { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); } }

/* ---- Prosa (textos longos) ---- */
.prosa { max-width: 65ch; }
.prosa p { margin-bottom: var(--sp-3); font-size: 1.12rem; color: var(--grafite); }
.prosa--legal { max-width: 72ch; }
.prosa--legal h2 { font-size: 1.3rem; margin-top: var(--sp-6); margin-bottom: var(--sp-2); }
.prosa--legal p { font-size: 1rem; }
.prosa a, .prosa--legal a { color: var(--azul-marca); text-decoration: underline;
    text-underline-offset: 3px; }

/* ============================================================
   Contato
   ============================================================ */
.contato { display: grid; gap: var(--sp-8); }
.contato__dados { display: grid; gap: var(--sp-6); align-content: start; }
.contato__bloco { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--cinza-borda); }
.contato__bloco:last-child { border-bottom: 0; }
.contato__destaque { font-family: var(--font-titulo); font-weight: 700;
    font-size: 1.8rem; margin-bottom: var(--sp-3); }
.contato__bloco a { color: var(--azul-marca); }
.contato__endereco { color: var(--grafite); max-width: 40ch; }
.contato__mapa { min-height: 340px; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--cinza-borda); }
.contato__mapa iframe { height: 100%; min-height: 340px; }
@media (min-width: 860px) {
    .contato { grid-template-columns: 1fr 1.2fr; gap: var(--sp-10); align-items: stretch; }
}

/* ============================================================
   CTA
   ============================================================ */
.cta { background: var(--preto); color: var(--branco); padding-block: var(--sp-12); }
.cta__inner { text-align: center; max-width: 44ch; margin-inline: auto; }
.cta__inner::before { content: ''; display: block; width: 48px; height: 2px;
    background: var(--azul-marca); margin: 0 auto var(--sp-4); }
.cta__titulo { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: var(--sp-3); }
.cta__texto { color: #C9CACB; margin-bottom: var(--sp-5); }

/* ============================================================
   Erro 404
   ============================================================ */
.erro { padding-block: var(--sp-16); text-align: center; }
.erro__cod { font-family: var(--font-titulo); font-weight: 800;
    font-size: clamp(4rem, 16vw, 9rem); color: var(--azul-suave);
    line-height: 1; display: block; }
.erro__titulo { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: var(--sp-2); }
.erro__texto { color: var(--grafite); max-width: 44ch; margin: 0 auto var(--sp-5); }
.erro__acoes { display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { view-transition-name: site-footer; background: var(--grafite);
    color: #D7D8D9; padding-top: var(--sp-10); }
.site-footer__grid { display: grid; gap: var(--sp-6); padding-bottom: var(--sp-8); }
.site-footer__nome { font-family: var(--font-titulo); font-weight: 700; font-size: 1.2rem;
    color: var(--branco); margin-top: var(--sp-1); }
.site-footer__razao { color: #B7B8B9; }
.site-footer__doc { color: #9B9DA0; font-size: 0.9rem; margin-top: var(--sp-1); }
.site-footer__titulo { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em;
    color: #9B9DA0; margin-bottom: var(--sp-2); font-family: var(--font-corpo);
    font-weight: 600; }
.site-footer__endereco { line-height: 1.8; }
.site-footer__endereco a:hover { color: var(--branco); }
.site-footer__links { display: grid; gap: 6px; }
.site-footer__links a:hover { color: var(--branco); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between;
    gap: var(--sp-2); padding-block: var(--sp-4); border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem; color: #9B9DA0; }
@media (min-width: 720px) {
    .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-8); }
}

/* ============================================================
   WhatsApp flutuante
   ============================================================ */
.wa-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 90;
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: #25D366; color: var(--branco);
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
    animation: wa-in .5s var(--ease) .8s both;
    transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: #25D366; opacity: 0.5; z-index: -1;
    animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-in { from { opacity: 0; transform: scale(0.5) translateY(10px); } }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .5; }
    70%, 100% { transform: scale(1.6); opacity: 0; } }

/* ============================================================
   Mídia (fotos futuras) — zoom sutil no hover
   ============================================================ */
.media { overflow: hidden; border-radius: var(--radius-lg); }
.media img { width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s var(--ease); }
.media:hover img { transform: scale(1.03); }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px);
    transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   View Transitions (MPA / cross-document)
   ============================================================ */
@view-transition { navigation: auto; }

::view-transition-old(root) {
    animation: vt-fade-out 260ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
::view-transition-new(root) {
    animation: vt-fade-in 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes vt-fade-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    .wa-float::before { display: none; }
    .media:hover img { transform: none; }
    .btn--primary:hover, .btn--ghost:hover { transform: none; }
}
