* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #000000;
    --surface: #0d0d0d;
    --line: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.68);
    --paper: #fbf8f1;
    --paper-ink: #1d1b18;
    --paper-muted: #7a746a;
}

html { scroll-behavior: smooth; scrollbar-color: var(--accent) #000; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------------------------------------------------------------- botões */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    border: 2px solid var(--accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, 0.5); }
.btn-ghost:hover { border-color: #fff; box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 18px 34px; font-size: 18px; }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}

/* ---------------------------------------------------------------- topo */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.brand img { height: 48px; width: auto; margin: -8px 0; }

/* ---------------------------------------------------------------- hero */

.hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: 64px 24px 72px;
    display: grid;
    grid-template-columns: minmax(240px, 380px) 1fr;
    gap: 64px;
    align-items: center;
}
.hero-cover img {
    width: 100%;
    height: auto;
    border-radius: 4px 10px 10px 4px;
    box-shadow: -6px 0 0 rgba(0, 0, 0, 0.25) inset, 0 30px 80px -20px var(--accent), 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: perspective(1200px) rotateY(-8deg);
    transition: transform 0.5s ease;
}
.hero-cover img:hover { transform: perspective(1200px) rotateY(0deg); }
.hero-copy h1 {
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin: 12px 0 10px;
}
.subtitle { font-size: clamp(18px, 2.2vw, 22px); font-weight: 500; color: var(--accent); margin-bottom: 20px; }
.hook { font-size: 17px; color: var(--muted); max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.meta { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- benefícios */

.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.cols {
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.cols h2, .author h2 { font-size: 22px; margin-bottom: 18px; }
.checks { list-style: none; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; color: var(--muted); }
.checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.note { margin-top: 18px; font-size: 14px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 12px; }

/* ---------------------------------------------------------------- amostra */

.sample { padding: 80px 24px 0; }
.sample-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.sample-head h2 { font-size: clamp(28px, 4vw, 38px); margin: 8px 0 10px; letter-spacing: -0.5px; }
.sample-head p { color: var(--muted); }

.pages { max-width: 620px; margin: 0 auto; display: grid; gap: 28px; }

.page {
    position: relative;
    background: var(--paper);
    color: var(--paper-ink);
    border-radius: 6px;
    padding: 48px 56px 40px;
    min-height: 760px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 24px 60px -24px rgba(0, 0, 0, 0.9);
    font-family: 'Literata', Georgia, serif;
    scroll-margin-top: 80px;
}
.page-run, .page-num {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--paper-muted);
    text-align: center;
}
.page-run { margin-bottom: 28px; }
.page-num { margin-top: 28px; }
.page-body { flex: 1; font-size: 16.5px; line-height: 1.75; }
.page-body p { text-align: justify; hyphens: auto; margin-bottom: 1em; }
.page-center .page-body { display: flex; flex-direction: column; justify-content: center; }

.dedication p { text-align: right; font-style: italic; margin: 0; color: #4a463f; }
.dedication p:nth-child(5) { margin-bottom: 1.6em; }
.dedication.prose p { text-align: justify; margin-bottom: 1em; }
.dedication.prose p:nth-child(5) { margin-bottom: 1em; }

.epigraph { margin: 0 auto 40px; max-width: 420px; }
.epigraph:last-child { margin-bottom: 0; }
.epigraph blockquote { font-style: italic; font-size: 18px; line-height: 1.6; }
.epigraph figcaption { margin-top: 10px; text-align: right; font-size: 14px; color: var(--paper-muted); }

.ch-head { text-align: center; margin: 24px 0 40px; }
.ch-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--paper-muted);
    margin-bottom: 10px;
}
.ch-title { font-size: 28px; font-weight: 600; line-height: 1.25; }
.ch-head::after { content: ''; display: block; width: 48px; height: 3px; background: var(--accent); margin: 22px auto 0; }
.sub { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 1.6em 0 0.8em; }
.pull { margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--accent); font-size: 19px; }

/* sumário */
.toc-title { font-size: 26px; font-weight: 600; text-align: center; margin-bottom: 24px; }
.toc { list-style: none; font-family: 'Inter', sans-serif; font-size: 14.5px; }
.toc-part {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--paper-muted);
    margin: 18px 0 6px;
}
.toc-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.toc-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.toc-item span { flex: 1; }
.toc-item.locked a { color: #9a948a; }
.toc-item.locked a:hover { background: rgba(0, 0, 0, 0.05); color: var(--paper-ink); }
.toc-item.free a { font-weight: 600; }
.toc-item.free svg { color: var(--accent); }
.toc-item em {
    font-style: normal;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 2px 8px;
    border-radius: 99px;
}
.toc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px;
    border-radius: 10px;
    background: var(--paper-ink);
    color: var(--paper);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.toc-cta svg { width: 16px; height: 16px; }
.toc-cta:hover { background: #000; }

/* última página some em direção ao bloqueio */
.page-last { overflow: hidden; max-height: 760px; }
.page-last::after {
    content: '';
    position: absolute;
    inset: 35% 0 0 0;
    background: linear-gradient(to bottom, rgba(251, 248, 241, 0) 0%, var(--paper) 70%);
    pointer-events: none;
}
.page-last .page-num { display: none; }

/* ---------------------------------------------------------------- paywall */

.paywall { padding: 0 24px 80px; margin-top: -120px; position: relative; z-index: 2; }
.paywall-box {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    padding: 56px 32px 40px;
    border-radius: 16px;
    background: linear-gradient(180deg, #111 0%, #050505 100%);
    border: 1px solid var(--accent);
    box-shadow: 0 30px 80px -30px var(--accent);
    position: relative;
}
.paywall-lock {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    display: grid;
    place-items: center;
}
.paywall-lock svg { width: 26px; height: 26px; }
.paywall-cover { width: 120px; height: auto; margin: 0 auto 24px; border-radius: 3px 6px 6px 3px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); }
.paywall h2 { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.2; margin-bottom: 10px; }
.paywall p { color: var(--muted); margin-bottom: 24px; }
.paywall .meta { margin: 16px 0 0; }

/* ---------------------------------------------------------------- autor / rodapé */

.author { max-width: 720px; margin: 0 auto; padding: 24px 24px 64px; text-align: center; }
.author p { color: var(--muted); }
.foot { border-top: 1px solid var(--line); padding: 28px 24px 100px; text-align: center; font-size: 13px; color: var(--muted); }
.foot a { color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------- barra de compra (mobile) */

.buybar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px 10px 16px;
    border-radius: 14px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--line);
    backdrop-filter: blur(10px);
    transform: translateY(140%);
    transition: transform 0.3s ease;
}
.buybar.show { transform: translateY(0); }
.buybar div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.buybar strong { font-size: 14px; }
.buybar span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- responsivo */

/* Formulário de e-mail antes do checkout */
.buy-dialog {
    margin: auto;
    width: min(440px, calc(100% - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
}
.buy-dialog::backdrop { background: rgba(0, 0, 0, 0.75); }
.buy-dialog form { position: relative; padding: 32px 28px 26px; display: flex; flex-direction: column; }
.buy-dialog h2 { font-size: 22px; line-height: 1.2; margin: 0 28px 10px 0; }
.buy-dialog p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.buy-dialog label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.buy-dialog input {
    font: inherit;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.buy-dialog input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.buy-dialog .btn { justify-content: center; margin-top: 4px; }
.buy-dialog .meta { text-align: center; margin: 14px 0 0; font-size: 13px; }
.buy-dialog .buy-error { color: #ff8080; font-size: 14px; margin: -6px 0 12px; }
.buy-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.buy-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; gap: 36px; padding: 36px 16px 56px; text-align: center; }
    .hero-cover img { max-width: 260px; margin: 0 auto; transform: none; }
    .hero-actions { justify-content: center; }
    .hook { margin-left: auto; margin-right: auto; }
    .cols { grid-template-columns: 1fr; padding: 44px 16px; gap: 40px; }
    .sample { padding: 56px 16px 0; }
    .paywall { padding: 0 16px 64px; }
    .page { padding: 32px 22px 28px; min-height: 0; }
    .page-body { font-size: 16px; }
    .page-body p { text-align: left; }
    .page-center { min-height: 420px; }
    .page-last { max-height: 640px; }
    .buybar { display: flex; }
    .topbar { padding: 10px 16px; }
}
