/*
 * Bilireads — site público.
 * Identidade: roxo #674EA7 (primária), âmbar #F59E0B (destaque), teal #14A094 (apoio).
 * Títulos em Fraunces (serifada, remete a livros); corpo em Inter.
 */
:root {
    --primary: #674ea7;
    --primary-strong: #7a5fc2;
    --primary-soft: #a893e6;
    --accent: #f59e0b;
    --teal: #14a094;

    --bg-color: #0b0912;
    --bg-secondary: #110f1a;
    --bg-raised: #17142266;
    --surface: #15121f;
    --border-color: #26213a;
    --border-strong: #3a3254;

    --text-dark: #f2eff9;
    --text-light: #a39cba;
    --white: #ffffff;

    --font-body: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Apple SD Gothic Neo", sans-serif;
    --font-display: Fraunces, "Iowan Old Style", Georgia, "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif KR", "Noto Serif SC", serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

::selection {
    background: rgba(103, 78, 167, 0.6);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--primary-soft);
    outline-offset: 3px;
}

h1,
h2 {
    font-family: var(--font-display);
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ───────── Nav ───────── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 9, 18, 0.72);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 36px;
    width: auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.lang-select {
    background: var(--surface);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.lang-select:hover {
    border-color: var(--border-strong);
}

/* ───────── Botões ───────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    border-color: var(--primary-soft);
    background: rgba(103, 78, 167, 0.14);
}

.btn:active {
    transform: translateY(1px);
}

.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn.btn-locked,
.btn.btn-locked:hover,
.btn.btn-locked:active {
    opacity: 1;
    cursor: not-allowed;
    transform: none;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.03);
    border-style: dashed;
    border-color: var(--border-strong);
}

.btn-locked .soon {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.btn-locked svg {
    flex: none;
}

.btn.selected {
    border-color: var(--primary);
    background: rgba(103, 78, 167, 0.2);
    color: var(--white);
}

.btn-primary {
    background: linear-gradient(180deg, var(--primary-strong), var(--primary));
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 24px -8px rgba(103, 78, 167, 0.85);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #8a6fd6, var(--primary-strong));
    border-color: var(--primary-soft);
    transform: translateY(-2px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 12px 28px -8px rgba(122, 95, 194, 0.95);
}

.nav-actions .btn {
    padding: 0.55rem 1.05rem;
    font-size: 0.9rem;
}

/* ───────── Carrossel de capas ───────── */
.carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 3rem 0 2.5rem;
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-color));
    position: relative;
}

.carousel-container::before,
.carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 160px;
    z-index: 2;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-secondary), transparent);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-secondary), transparent);
}

.carousel-track {
    display: flex;
    gap: 1.75rem;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    width: 190px;
    border-radius: 6px 12px 12px 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Lombada do livro */
.carousel-item::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.12) 60%, transparent);
    pointer-events: none;
}

.carousel-item:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 28px 40px -14px rgba(103, 78, 167, 0.55), 0 0 0 1px rgba(168, 147, 230, 0.35);
}

.carousel-item img {
    width: 100%;
    height: 285px;
    object-fit: cover;
    display: block;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 0.875rem)); }
}

/* ───────── Hero ───────── */
.hero {
    position: relative;
    padding: 5.5rem 2rem 6rem;
    text-align: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -10% 0 auto 0;
    height: 520px;
    background:
        radial-gradient(520px 260px at 25% 30%, rgba(103, 78, 167, 0.38), transparent 70%),
        radial-gradient(420px 220px at 78% 20%, rgba(20, 160, 148, 0.16), transparent 70%),
        radial-gradient(380px 200px at 60% 70%, rgba(245, 158, 11, 0.1), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem;
    background: rgba(103, 78, 167, 0.16);
    color: var(--primary-soft);
    border: 1px solid rgba(168, 147, 230, 0.3);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
}

.badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.hero-content h1 {
    font-size: clamp(2.6rem, 6.5vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    background: linear-gradient(180deg, #ffffff 30%, #c9bdf0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 0 auto 2.5rem;
    max-width: 640px;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 0.95rem 1.8rem;
}

/* ───────── Seções de funcionalidades ───────── */
.feature-section {
    padding: 6rem 0;
    position: relative;
}

.feature-section + .feature-section {
    border-top: 1px solid var(--border-color);
}

.feature-section:nth-of-type(odd) {
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-color));
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.feature-grid.reversed {
    direction: rtl;
}

.feature-grid.reversed > * {
    direction: ltr;
}

.feature-text h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 1.25rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.feature-text h2::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    background: linear-gradient(90deg, var(--accent), var(--primary-soft));
}

.feature-text p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 30rem;
}

.feature-visual {
    position: relative;
    width: 100%;
    max-width: 310px;
    margin: 0 auto;
}

.feature-visual::before {
    content: "";
    position: absolute;
    inset: 8% -25% 8% -25%;
    background: radial-gradient(closest-side, rgba(103, 78, 167, 0.4), transparent);
    z-index: -1;
}

.media-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: 38px;
    border: 7px solid #1b1727;
    outline: 1px solid var(--border-strong);
    background: #000;
    box-shadow: 0 40px 70px -20px rgba(0, 0, 0, 0.85), 0 0 80px -30px rgba(103, 78, 167, 0.7);
    aspect-ratio: 9 / 19.5;
}

.media-carousel::-webkit-scrollbar {
    display: none;
}

.media-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    height: 100%;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 1.25rem;
    letter-spacing: 0.02em;
}

/* ───────── Destaque em vídeo ───────── */
.video-highlight {
    padding: 6rem 0;
    text-align: center;
    background:
        radial-gradient(600px 360px at 50% 55%, rgba(103, 78, 167, 0.34), transparent 70%),
        var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.video-highlight h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.video-highlight p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.video-highlight video {
    width: 100%;
    max-width: 310px;
    border-radius: 38px;
    border: 7px solid #1b1727;
    outline: 1px solid var(--border-strong);
    box-shadow: 0 40px 70px -20px rgba(0, 0, 0, 0.85), 0 0 90px -20px rgba(103, 78, 167, 0.8);
    margin: 3rem auto 0;
    display: block;
}

/* ───────── Rodapé ───────── */
footer {
    background: var(--bg-secondary);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-brand p {
    color: var(--text-light);
    margin-top: 1.25rem;
    max-width: 320px;
}

.footer-links h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    color: var(--primary-soft);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.2s;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-color);
    color: #7a7391;
    font-size: 0.85rem;
}

/* Rodapé simples (preços / obrigado) */
footer:not(:has(.footer-content)) {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2.5rem 2rem;
}

footer:not(:has(.footer-content)) .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    max-width: 640px;
    justify-content: flex-end;
}

footer:not(:has(.footer-content)) .footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

footer:not(:has(.footer-content)) .footer-links a:hover {
    color: var(--white);
}

/* ───────── Páginas internas (preços / obrigado) ───────── */
main {
    max-width: 960px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 6rem;
}

main h1 {
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin-bottom: 1rem;
}

.lead {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 40rem;
    margin-bottom: 2.5rem;
}

.notice {
    display: none;
    margin-bottom: 1.5rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: rgba(20, 160, 148, 0.12);
    border: 1px solid rgba(20, 160, 148, 0.4);
    color: #7ee0d6;
}

.plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.price {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 1rem 0 1.25rem;
    line-height: 1.1;
}

.card ul {
    list-style: none;
    margin: 0 0 2rem;
    display: grid;
    gap: 0.7rem;
    flex: 1;
}

.card li {
    position: relative;
    padding-left: 1.7rem;
    color: var(--text-dark);
    opacity: 0.88;
}

.card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: rgba(103, 78, 167, 0.3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c3b3f5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l3 3 5-6'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Plano pago em destaque */
.plans .card:nth-child(2) {
    position: relative;
    border-color: transparent;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(160deg, var(--primary-soft), var(--primary) 45%, var(--accent)) border-box;
    box-shadow: 0 30px 60px -30px rgba(103, 78, 167, 0.8);
}

.actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fine {
    margin-top: 1.75rem;
    color: var(--text-light);
    font-size: 0.92rem;
}

.error {
    color: #f58aa5;
}

.checkout {
    margin-top: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
}

.checkout-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkout-head h2 {
    font-size: 1.3rem;
}

#checkout {
    min-height: 28rem;
}

/* Obrigado */
main > .actions {
    margin-top: 0.5rem;
}

.email {
    display: none;
    margin-bottom: 1.75rem;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    font-size: 1.1rem;
    font-weight: 700;
    word-break: break-all;
}

/* ───────── Animação de entrada (ativada via JS) ───────── */
.js-reveal .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js-reveal .reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .carousel-track {
        animation: none;
    }

    .js-reveal .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ───────── Responsivo ───────── */
@media (max-width: 992px) {
    .feature-section {
        padding: 4.5rem 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3.5rem;
    }

    .feature-grid.reversed {
        direction: ltr;
    }

    .feature-text h2::before,
    .feature-text p {
        margin-inline: auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .carousel-container::before,
    .carousel-container::after {
        width: 50px;
    }
}

@media (max-width: 720px) {
    nav {
        padding: 0.8rem 1rem;
    }

    .logo img {
        height: 30px;
    }

    .plans {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 4rem 1.25rem 4.5rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .carousel-item {
        width: 150px;
    }

    .carousel-item img {
        height: 225px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }

    footer:not(:has(.footer-content)) .footer-links {
        justify-content: flex-start;
    }
}
