:root {
    --brand-950: #082f5f;
    --brand-900: #0b3b75;
    --brand-700: #1559a6;
    --brand-600: #1c6cc8;
    --brand-100: #dcecff;
    --accent: #f0b429;
}

html { scroll-behavior: smooth; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
::selection { background: #bfdbfe; color: #082f5f; }

.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 100;
    border-radius: .75rem;
    background: #fff;
    padding: .75rem 1rem;
    color: #0b3b75;
    box-shadow: 0 10px 30px rgba(8, 47, 95, .18);
    transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
    transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 35px rgba(15, 35, 64, .08); }

.nav-link {
    border-radius: .75rem;
    padding: .7rem .85rem;
    color: #475569;
    font-size: .875rem;
    font-weight: 700;
    transition: .2s ease;
}
.nav-link:hover, .nav-link-active { background: #eff6ff; color: #0b3b75; }

.menu-toggle {
    display: inline-flex;
    height: 2.75rem;
    width: 2.75rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    border-radius: .8rem;
    border: 1px solid #dbe4ef;
    background: #fff;
}
.menu-toggle span { height: 2px; width: 1.25rem; border-radius: 99px; background: #0f172a; }
.menu-overlay { position: fixed; inset: 0; z-index: 55; background: rgba(2, 6, 23, .55); backdrop-filter: blur(3px); }
.mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 60;
    display: flex;
    width: min(22rem, 92vw);
    flex-direction: column;
    background: #fff;
    box-shadow: -30px 0 80px rgba(2, 6, 23, .22);
    transform: translateX(105%);
    transition: transform .28s ease;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-nav-link { display: block; border-radius: .8rem; padding: .85rem 1rem; color: #334155; font-weight: 700; }
.mobile-nav-link:hover, .mobile-nav-link-active { background: #eff6ff; color: #0b3b75; }

.btn-primary, .btn-secondary, .btn-light {
    display: inline-flex;
    min-height: 2.8rem;
    align-items: center;
    gap: .5rem;
    border-radius: .8rem;
    padding: .7rem 1.1rem;
    font-size: .875rem;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--brand-900), var(--brand-600)); color: #fff; box-shadow: 0 10px 26px rgba(21, 89, 166, .22); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(21, 89, 166, .3); }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-light:focus-visible { outline: 3px solid rgba(59, 130, 246, .35); outline-offset: 2px; }
.btn-primary:disabled { cursor: wait; opacity: .7; transform: none; }
.btn-secondary { border: 1px solid #cbd5e1; background: #fff; color: #0f172a; }
.btn-secondary:hover { border-color: #93c5fd; background: #eff6ff; color: #0b3b75; }
.btn-light { background: #fff; color: #0b3b75; box-shadow: 0 12px 30px rgba(2, 6, 23, .18); }
.btn-light:hover { transform: translateY(-1px); background: #eff6ff; }

.eyebrow { font-size: .75rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.section-shell { margin-inline: auto; max-width: 80rem; padding: 5rem 1rem; }
.section-heading { max-width: 48rem; }
.section-heading h2 { margin-top: .65rem; color: #0f172a; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 900; line-height: 1.08; letter-spacing: -.035em; }
.section-heading p:not(.eyebrow) { margin-top: 1rem; color: #64748b; font-size: 1.05rem; line-height: 1.8; }

.surface-card { border: 1px solid #e2e8f0; border-radius: 1.25rem; background: #fff; box-shadow: 0 18px 50px rgba(15, 35, 64, .07); }
.field-label { display: block; margin-bottom: .45rem; color: #334155; font-size: .875rem; font-weight: 800; }
.field-input, .field-select, .field-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: .8rem;
    background: #fff;
    padding: .75rem .9rem;
    color: #0f172a;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field-input:focus, .field-select:focus, .field-textarea:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .13); }
.field-help { margin-top: .35rem; color: #64748b; font-size: .75rem; line-height: 1.5; }

.alert { position: relative; border-radius: 1rem; border: 1px solid; padding: 1rem 3rem 1rem 1rem; font-size: .875rem; }
.alert-success { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.alert-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert-warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.alert-info { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }
.alert-close { position: absolute; right: .8rem; top: .7rem; color: currentColor; font-size: 1.25rem; opacity: .65; }

.book-cover { aspect-ratio: 13 / 19; width: 100%; overflow: hidden; border-radius: .9rem; background: #e2e8f0; box-shadow: 0 16px 35px rgba(15, 23, 42, .16); }
.book-cover img { height: 100%; width: 100%; object-fit: cover; transition: transform .35s ease; }
.group:hover .book-cover img { transform: scale(1.035); }
.article-image { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 1rem; background: #e2e8f0; }
.article-image img { height: 100%; width: 100%; object-fit: cover; transition: transform .35s ease; }
.group:hover .article-image img { transform: scale(1.035); }

.prose-pjp { color: #334155; font-size: 1.05rem; line-height: 1.9; }
.prose-pjp p { margin: 0 0 1.4rem; }
.prose-pjp h2 { margin: 2.25rem 0 .9rem; color: #0f172a; font-size: 1.8rem; font-weight: 900; line-height: 1.25; }
.prose-pjp h3 { margin: 1.8rem 0 .8rem; color: #0f172a; font-size: 1.35rem; font-weight: 850; }
.prose-pjp h4 { margin: 1.5rem 0 .7rem; color: #0f172a; font-size: 1.12rem; font-weight: 850; }
.prose-pjp ul, .prose-pjp ol { margin: 0 0 1.5rem; padding-left: 1.5rem; }
.prose-pjp ul { list-style: disc; }
.prose-pjp ol { list-style: decimal; }
.prose-pjp li { margin: .45rem 0; padding-left: .2rem; }
.prose-pjp a { overflow-wrap: anywhere; color: #1559a6; text-decoration: underline; text-underline-offset: 3px; }
.prose-pjp blockquote { margin: 1.6rem 0; border-left: 5px solid #60a5fa; border-radius: 0 .8rem .8rem 0; background: #eff6ff; padding: 1rem 1.25rem; color: #334155; font-style: italic; }
.prose-pjp hr { margin: 2.25rem 0; border: 0; border-top: 1px solid #cbd5e1; }
.prose-pjp strong, .prose-pjp b { color: #0f172a; font-weight: 850; }
.book-synopsis {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-box-orient: initial !important;
    -webkit-line-clamp: unset !important;
}
.book-synopsis > :last-child { margin-bottom: 0; }

.footer-link { color: inherit; transition: color .2s ease; }
.footer-link:hover { color: #bfdbfe; }
.floating-whatsapp {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 45;
    display: grid;
    height: 3.35rem;
    width: 3.35rem;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    box-shadow: 0 14px 35px rgba(22, 163, 74, .38);
    transition: transform .2s ease;
}
.floating-whatsapp:hover { transform: translateY(-2px) scale(1.03); }
.floating-whatsapp svg { height: 1.65rem; width: 1.65rem; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem; }
.pagination a, .pagination span { display: grid; min-height: 2.5rem; min-width: 2.5rem; place-items: center; border: 1px solid #dbe4ef; border-radius: .7rem; background: #fff; padding: .35rem .65rem; color: #334155; font-size: .875rem; font-weight: 750; }
.pagination a:hover, .pagination .current { border-color: #1559a6; background: #1559a6; color: #fff; }

.header-auth { display: flex; align-items: center; gap: .25rem; }
.header-auth__login, .header-auth__register {
    display: inline-flex;
    min-height: 2.55rem;
    align-items: center;
    justify-content: center;
    border-radius: .75rem;
    padding: .55rem .8rem;
    font-size: .78rem;
    font-weight: 900;
    transition: .18s ease;
}
.header-auth__login { color: #334155; }
.header-auth__login:hover { background: #f1f5f9; color: #0b3b75; }
.header-auth__register { background: #0b3b75; color: #fff; box-shadow: 0 8px 20px rgba(11,59,117,.2); }
.header-auth__register:hover { background: #1559a6; transform: translateY(-1px); }
.header-profile {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .55rem;
    border: 1px solid #dbe4ef;
    border-radius: .85rem;
    background: #fff;
    padding: .35rem .65rem .35rem .4rem;
    transition: .18s ease;
}
.header-profile:hover { border-color: #93c5fd; background: #eff6ff; }
.header-profile__avatar { display: grid; height: 2rem; width: 2rem; flex: none; place-items: center; border-radius: .65rem; background: #0b3b75; color: #fff; font-size: .75rem; font-weight: 900; }
.header-profile__copy { display: none; min-width: 0; line-height: 1.1; }
.header-profile__copy strong { display: block; max-width: 9rem; overflow: hidden; color: #0f172a; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.header-profile__copy small { display: block; margin-top: .2rem; color: #64748b; font-size: .62rem; font-weight: 700; }

.checkout-heading, .checkout-product__title, .checkout-summary__title {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.checkout-layout { align-items: start; }
.checkout-product {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}
.checkout-product__cover {
    aspect-ratio: 7 / 10;
    width: 7rem;
    overflow: hidden;
    border-radius: .8rem;
    background: #e2e8f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .2);
}
.checkout-product__cover img { height: 100%; width: 100%; object-fit: cover; }
.checkout-product__body, .checkout-product__author { min-width: 0; overflow-wrap: anywhere; }
.checkout-payment-option {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    transition: border-color .18s ease, background .18s ease;
}
.checkout-payment-option__copy { overflow-wrap: anywhere; }
.checkout-cost-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
}
.checkout-cost-row dd { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.checkout-cost-row--total { align-items: end; }
.checkout-total-value { line-height: 1.05; }
.checkout-summary { position: static; }

.ad-slot { margin: 2rem auto; max-width: 80rem; padding: 0 1rem; text-align: center; }
.ad-slot img { margin-inline: auto; max-height: 18rem; width: auto; max-width: 100%; border-radius: 1rem; object-fit: contain; }
.ebook-reader-shell__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    background: linear-gradient(135deg, #082f5f, #0f172a);
    padding: 1rem 1.25rem;
    color: #fff;
}
.ebook-reader-shell__eyebrow {
    color: #93c5fd;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.ebook-reader-shell__title {
    margin-top: .25rem;
    max-width: 60rem;
    overflow-wrap: anywhere;
    color: #fff !important;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.35;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}
.ebook-reader-shell__author {
    margin-top: .25rem;
    overflow-wrap: anywhere;
    color: #cbd5e1 !important;
    font-size: .72rem;
    line-height: 1.45;
}
.ebook-reader-shell__badge {
    flex: none;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    padding: .35rem .7rem;
    color: #e0f2fe;
    font-size: .68rem;
    font-weight: 850;
    white-space: nowrap;
}
.ebook-reader {
    height: min(78vh, 960px);
    min-height: 560px;
    display: flex;
    flex-direction: column;
    background: #1e293b;
    color: #fff;
}
.ebook-reader:fullscreen, .ebook-reader.is-native-fullscreen, .ebook-reader.is-focus-mode {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
}
.ebook-reader.is-focus-mode {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    background: #0f172a;
}
body.ebook-reader-focus-active { overflow: hidden !important; }
.ebook-reader__toolbar {
    z-index: 5;
    display: flex;
    min-height: 3.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: #0f172a;
    padding: .55rem .75rem;
}
.ebook-reader__toolbar-group {
    display: flex;
    max-width: 100%;
    flex: none;
    align-items: center;
    gap: .4rem;
}
.ebook-reader__button {
    display: grid;
    min-height: 2.35rem;
    min-width: 2.35rem;
    place-items: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: .65rem;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    transition: .18s ease;
}
.ebook-reader__button:hover, .ebook-reader__button:focus-visible { border-color: #60a5fa; background: #1d4ed8; outline: none; }
.ebook-reader__button.is-active { border-color: #60a5fa; background: #1d4ed8; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ebook-reader__button--text { padding-inline: .7rem; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.ebook-reader__counter { min-width: 7rem; padding-inline: .25rem; color: #dbeafe; font-size: .72rem; font-weight: 800; text-align: center; }
.ebook-reader__hint {
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: #172033;
    padding: .35rem .75rem;
    color: #bfdbfe;
    font-size: .67rem;
    font-weight: 750;
    text-align: center;
}
.ebook-reader__viewport {
    position: relative;
    min-height: 0;
    flex: 1;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    scrollbar-color: #64748b #0f172a;
}
.ebook-reader.is-paged .ebook-reader__viewport { overscroll-behavior-x: contain; }
.ebook-reader__viewport:focus-visible { outline: 3px solid #60a5fa; outline-offset: -3px; }
.ebook-reader__pages {
    display: flex;
    min-height: 100%;
    min-width: max-content;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}
.ebook-reader.is-paged .ebook-reader__pages {
    min-width: 100%;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
}
.ebook-reader.is-paged .ebook-page:not(.is-active) { display: none; }
.ebook-page {
    position: relative;
    overflow: hidden;
    max-width: none;
    flex: none;
    background: #fff;
    box-shadow: 0 18px 45px rgba(2, 6, 23, .35);
}
.ebook-reader.is-paged .ebook-page.is-page-entering-next { animation: ebook-page-next .25s ease both; }
.ebook-reader.is-paged .ebook-page.is-page-entering-previous { animation: ebook-page-previous .25s ease both; }
.ebook-page__placeholder {
    display: grid;
    width: min(780px, calc(100vw - 3rem));
    min-height: 360px;
    place-items: center;
    background: #e2e8f0;
    color: #64748b;
    font-size: .75rem;
    font-weight: 800;
}
.ebook-page__canvas { display: block; max-width: none; user-select: none; }
.ebook-page__watermarks {
    pointer-events: none;
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: repeat(5, 1fr);
    overflow: hidden;
    user-select: none;
}
.ebook-page__watermarks span {
    align-self: center;
    color: rgba(15, 23, 42, .105);
    font-size: clamp(.65rem, 1.5vw, 1rem);
    font-weight: 900;
    letter-spacing: .045em;
    text-align: center;
    transform: rotate(-24deg);
    white-space: nowrap;
}
.ebook-page__failed { width: min(780px, calc(100vw - 3rem)); padding: 4rem 2rem; color: #991b1b; text-align: center; }
.ebook-reader__status {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    background: #1e293b;
    padding: 2rem;
    color: #fff;
    text-align: center;
}
.ebook-reader__status[hidden] { display: none; }
.ebook-reader__status small { max-width: 28rem; color: #cbd5e1; }
.ebook-reader__status--error { background: #1e293b; }
.ebook-reader__spinner {
    height: 2rem;
    width: 2rem;
    border: 3px solid rgba(255,255,255,.25);
    border-top-color: #60a5fa;
    border-radius: 999px;
    animation: ebook-spin .8s linear infinite;
}
.ebook-reader__retry { margin-top: .7rem; border-radius: .7rem; background: #2563eb; padding: .65rem 1rem; font-size: .8rem; font-weight: 900; }
.ebook-reader__noscript { padding: 2rem; color: #fff; text-align: center; }
@keyframes ebook-spin { to { transform: rotate(360deg); } }
@keyframes ebook-page-next {
    from { opacity: .25; transform: perspective(1200px) translateX(3rem) rotateY(-4deg); }
    to { opacity: 1; transform: perspective(1200px) translateX(0) rotateY(0); }
}
@keyframes ebook-page-previous {
    from { opacity: .25; transform: perspective(1200px) translateX(-3rem) rotateY(4deg); }
    to { opacity: 1; transform: perspective(1200px) translateX(0) rotateY(0); }
}

@media print {
    .ebook-reader { display: none !important; }
}

@media (min-width: 640px) {
    .section-shell { padding-inline: 1.5rem; }
    .floating-whatsapp { right: 1.5rem; bottom: 1.5rem; }
    .header-profile__copy { display: block; }
    .ebook-reader__toolbar { padding-inline: 1rem; }
    .ebook-reader__pages { gap: 1.5rem; padding: 1.5rem; }
}
@media (max-width: 639px) {
    .site-header > div { gap: .5rem; }
    .site-header a[aria-label*="Beranda"] > span { display: none; }
    .header-auth__login, .header-auth__register { min-height: 2.35rem; padding-inline: .55rem; font-size: .7rem; }
    .checkout-product { grid-template-columns: 5.25rem minmax(0, 1fr); gap: .9rem; }
    .checkout-product__cover { width: 5.25rem; border-radius: .65rem; }
    .checkout-product__title { font-size: 1rem; line-height: 1.35; }
    .checkout-product__author { font-size: .75rem; }
    .checkout-payment-option { gap: .75rem; padding: .9rem; }
    .checkout-summary { padding: 1.25rem; }
    .ebook-reader-shell__header { align-items: flex-start; padding: .85rem 1rem; }
    .ebook-reader-shell__title { font-size: .9rem; }
    .ebook-reader-shell__badge { padding: .3rem .55rem; font-size: .6rem; }
    .ebook-reader { height: 76vh; min-height: 500px; }
    .ebook-reader__toolbar { justify-content: center; }
    .ebook-reader__toolbar-group { gap: .3rem; }
    .ebook-reader__button { min-height: 2.2rem; min-width: 2.2rem; }
    .ebook-reader__button--text { padding-inline: .55rem; font-size: .64rem; }
    .ebook-reader__counter { min-width: 6.5rem; }
    .ebook-reader__hint { font-size: .62rem; }
    .ebook-reader.is-paged .ebook-reader__pages { padding: .6rem; }
    .ebook-reader.is-focus-mode { height: 100dvh; min-height: 0; }
}
@media (max-width: 420px) {
    .checkout-cost-row--total { grid-template-columns: 1fr; gap: .45rem; }
    .checkout-cost-row--total dd { text-align: left; }
    .checkout-total-value { font-size: 1.75rem; }
    .ebook-reader-shell__header { display: block; }
    .ebook-reader-shell__badge { display: inline-flex; margin-top: .65rem; }
}
@media (min-width: 1024px) {
    .checkout-summary { position: sticky; top: 7rem; }
    .section-shell { padding: 6rem 2rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
