/* ================================================================
   Gestor 365 — Landing Page Ebook API Oficial WhatsApp
   Arquivo: assets/css/main.css
   ================================================================ */

/* ----------------------------------------------------------------
   Tipografia: Futura PT (licenciada) / Jost (substituto gratuito)
   ---------------------------------------------------------------- */
input, button, summary { font-family: inherit; }

/* ----------------------------------------------------------------
   Design Tokens (variáveis CSS)
   ---------------------------------------------------------------- */
:root {
    color-scheme: dark;
    --bg:      #07142B;
    --surface: #0E2244;
    --text:    #EAF1FF;
    --muted:   #A9BCDB;
    --line:    #223C6B;
    --navy:    #0A2F63;
    --blue:    #0B7BC2;
    --cta:     #12874A;
    --cta-h:   #0E7040;
    --err:     #FF8A80;
    --soft:    #0A1B38;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: env(safe-area-inset-top, 0px);
    overflow-x: hidden;
}

body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Futura PT", "Futura PT Book", Futura, Jost, "Century Gothic", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; }
[hidden]  { display: none !important; }

/* ----------------------------------------------------------------
   Layout
   ---------------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */
.hero {
    overflow-x: clip;
    background:
        radial-gradient(900px 400px at 85% 10%, rgba(5, 110, 175, .40), transparent 60%),
        linear-gradient(160deg, #081C3D 0%, #07142B 70%);
    color: var(--text);
    padding-top: max(22px, env(safe-area-inset-top, 22px));
    padding-bottom: 16px;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 0 20px;
}

.brand {
    display: flex;
    align-items: center;
    background: #fff;
    color: #0A2F63;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.brand img { display: block; height: 36px; width: auto; max-width: 180px; }

.fb {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    letter-spacing: .5px;
    font-size: 0.98rem;
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.tag {
    display: none;
    font-size: .78rem;
    font-weight: 600;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    padding: 6px 12px;
    border-radius: 99px;
    white-space: nowrap;
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 14px;
}

h1 {
    font-size: clamp(1.65rem, 5.2vw, 2.9rem);
    line-height: 1.14;
    margin: 0 0 14px;
    letter-spacing: -.02em;
    overflow-wrap: break-word;
}

.lead { font-size: clamp(1rem, 2.6vw, 1.15rem); color: var(--muted); margin: 0 0 20px; }

.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before {
    content: "\2713";
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #25D366;
    color: #052e16;
    font-weight: 800;
    display: grid;
    place-items: center;
    font-size: .8rem;
    margin-top: 2px;
}

/* ----------------------------------------------------------------
   Showcase — Mockup 3D Realista de Ebook
   ---------------------------------------------------------------- */
.hero-content {
    order: 1;
}

.showcase {
    order: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 0 0;
    max-width: 100%;
    overflow-x: clip;
}

.ebook-stage {
    --b-w: min(260px, 68vw);
    --b-h: calc(var(--b-w) * 1.42);
    --b-depth: 32px;
    perspective: 1200px;
    perspective-origin: 50% 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    user-select: none;
}

.ebook-3d {
    position: relative;
    width: var(--b-w);
    height: var(--b-h);
    transform-style: preserve-3d;
    transform: rotateY(-22deg) rotateX(10deg) rotateZ(-2.5deg);
    cursor: pointer;
    outline: none;
}

/* Capa Frontal */
.ebook-cover {
    position: absolute;
    inset: 0;
    border-radius: 2px 7px 7px 2px;
    overflow: hidden;
    transform: translateZ(calc(var(--b-depth) / 2));
    background: #042B52;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.16),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.ebook-cover .cover-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vinco / Dobra realista da lombada */
.ebook-crease {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 34px;
    pointer-events: none;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.42) 0%,
        rgba(255, 255, 255, 0.25) 12%,
        rgba(0, 0, 0, 0.18) 24%,
        rgba(255, 255, 255, 0.08) 38%,
        transparent 100%
    );
    box-shadow: inset -1px 0 1px rgba(0, 0, 0, 0.25);
}

/* Reflexo de luz na capa (Gloss) */
.ebook-gloss {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        130deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.06) 32%,
        transparent 65%
    );
}

/* Lombada do Livro (Face lateral esquerda) */
.ebook-spine {
    position: absolute;
    width: var(--b-depth);
    height: 100%;
    left: 0;
    top: 0;
    transform-origin: left center;
    transform: rotateY(-90deg);
    background: linear-gradient(
        to bottom,
        #0C3875 0%,
        #07244C 35%,
        #04162E 100%
    );
    border-radius: 2px 0 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.55);
}

.spine-text {
    transform: rotate(90deg);
    white-space: nowrap;
    color: #EDF4FF;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 2.2px;
    opacity: 0.85;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Páginas do Miolo (Corte Lateral Direito) */
.ebook-pages-right {
    position: absolute;
    width: var(--b-depth);
    height: calc(100% - 6px);
    right: 0;
    top: 3px;
    transform-origin: right center;
    transform: rotateY(90deg);
    background: repeating-linear-gradient(
        to bottom,
        #fbfbfb 0px,
        #ebebeb 1px,
        #d1d5db 2px,
        #f3f4f6 3px
    );
    border-radius: 0 2px 2px 0;
    box-shadow:
        inset 4px 0 8px rgba(0, 0, 0, 0.22),
        inset -4px 0 8px rgba(0, 0, 0, 0.28);
}

/* Páginas do Miolo (Corte Superior) */
.ebook-pages-top {
    position: absolute;
    width: calc(100% - 4px);
    height: var(--b-depth);
    left: 2px;
    top: 0;
    transform-origin: top center;
    transform: rotateX(90deg);
    background: repeating-linear-gradient(
        to right,
        #f9f9f9 0px,
        #e3e3e3 2px,
        #ffffff 3px
    );
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.22);
}

/* Páginas do Miolo (Corte Inferior) */
.ebook-pages-bottom {
    position: absolute;
    width: calc(100% - 4px);
    height: var(--b-depth);
    left: 2px;
    bottom: 0;
    transform-origin: bottom center;
    transform: rotateX(-90deg);
    background: repeating-linear-gradient(
        to right,
        #dedede 0px,
        #f3f3f3 2px,
        #c8c8c8 4px
    );
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.4);
}

/* Selo Edição 2026 */
.ebook-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    transform: translateZ(calc(var(--b-depth) / 2 + 2px));
    background: linear-gradient(135deg, #10B981, #059669);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 99px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.25);
    letter-spacing: 0.3px;
    pointer-events: none;
}

/* Sombra Realista de Mesa/Chão */
.ebook-ground-shadow {
    width: calc(var(--b-w) * 1.15);
    height: 42px;
    margin-top: 6px;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(4, 15, 33, 0.48) 45%,
        transparent 75%
    );
    transform: rotateX(75deg) rotateZ(-6deg) scaleY(1.2);
    filter: blur(10px);
    pointer-events: none;
}

.note { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }

/* ----------------------------------------------------------------
   Botão CTA
   ---------------------------------------------------------------- */
.btn {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--cta);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.btn:hover          { background: var(--cta-h); }
.btn:active         { transform: scale(.98); }
.btn[disabled]      { opacity: .7; cursor: wait; }
.hero-btn           { width: auto; min-width: min(260px, 100%); max-width: 100%; padding: 0 28px; }

/* ----------------------------------------------------------------
   Dialog / Modal
   ---------------------------------------------------------------- */
dialog {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0;
    background: var(--surface);
    color: var(--text);
    width: min(460px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

dialog::backdrop { background: rgba(3, 10, 25, .75); backdrop-filter: blur(3px); }

.x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.card           { position: relative; padding: 28px 22px; }
.card h2        { margin: 0 0 4px; font-size: 1.3rem; padding-right: 36px; }
.card .sub      { margin: 0 0 18px; color: var(--muted); font-size: .93rem; }

/* ----------------------------------------------------------------
   Formulário
   ---------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.f    { margin-bottom: 14px; }

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: var(--bg);
    color: var(--text);
    min-height: 48px;
}

input:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

input[aria-invalid="true"] { border-color: var(--err); }

.err { display: none; color: var(--err); font-size: .82rem; margin-top: 5px; }
.f.bad .err { display: block; }

/* Prefixo DDI */
.pre       { display: flex; }
.pre span  {
    display: grid;
    place-items: center;
    padding: 0 12px;
    border: 1.5px solid var(--line);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: var(--soft);
    font-weight: 600;
    font-size: .95rem;
}
.pre input { border-radius: 0 12px 12px 0; }

/* Consentimento LGPD */
.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: .8rem;
    color: var(--muted);
    margin: 4px 0 16px;
}
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--cta); }

/* Honeypot anti-spam — mantido fora do viewport */
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Erro geral do formulário */
.msg { display: none; color: var(--err); font-size: .88rem; margin-bottom: 12px; text-align: center; }

/* ----------------------------------------------------------------
   Estado de sucesso
   ---------------------------------------------------------------- */
.ok { display: none; text-align: center; padding: 12px 4px; }
.ok .big {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #25D366;
    color: #052e16;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 900;
}
.done .ok           { display: block; }
.done form,
.done .head         { display: none; }

/* ----------------------------------------------------------------
   Seções de conteúdo
   ---------------------------------------------------------------- */
section.s { padding: 42px 0; }
section.s:first-of-type { padding-top: 18px; }

h2.t {
    font-size: clamp(1.4rem, 3.8vw, 2rem);
    margin: 0 0 8px;
    text-align: center;
    letter-spacing: -.01em;
}

.t-sub { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 620px; }

.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }

.it {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
}

.it .n {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(5, 110, 175, .28);
    color: #8DBBFF;
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 10px;
}

.it h3 { margin: 0 0 6px; font-size: 1.05rem; }
.it p  { margin: 0; color: var(--muted); font-size: .94rem; }

.alt     { background: var(--soft); }
.alt .it { background: var(--surface); }

/* ----------------------------------------------------------------
   FAQ — Accordion nativo
   ---------------------------------------------------------------- */
details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 10px;
}
summary        { cursor: pointer; font-weight: 700; }
details p      { margin: 10px 0 0; color: var(--muted); }
.faq           { max-width: 760px; margin: 0 auto; }

/* ----------------------------------------------------------------
   CTA Secundária
   ---------------------------------------------------------------- */
.cta2   { text-align: center; margin-top: 28px; }
.cta2 a {
    display: inline-block;
    background: var(--cta);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    padding: 15px 28px;
    border-radius: 14px;
}

/* ----------------------------------------------------------------
   Rodapé
   ---------------------------------------------------------------- */
footer {
    padding: 28px 0 40px;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
    border-top: 1px solid var(--line);
}

/* ----------------------------------------------------------------
   Breakpoints Responsivos
   ---------------------------------------------------------------- */
@media (min-width: 640px) {
    .nav   { flex-direction: row; justify-content: space-between; }
    .tag   { display: inline-block; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .card  { padding: 30px 28px; }
    .book  { width: 130px; }
}

@media (min-width: 960px) {
    .hero                   { padding-top: max(20px, env(safe-area-inset-top, 0px)); padding-bottom: 72px; }
    .nav                    { padding: 28px 0 24px; }
    .grid                   { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; margin-top: 52px; }
    .hero-content           { order: 1; }
    .showcase               { order: 2; padding: 10px 0 20px; }
    .cards                  { grid-template-columns: repeat(3, 1fr); }
    .ebook-stage            { --b-w: 305px; --b-depth: 34px; }
    section.s               { padding: 56px 0; }
    section.s:first-of-type { padding-top: 56px; }
}

/* Respeita preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
