/* ================================================================
   KOWPI.ID - EBOOK CATALOG LANDING PAGE (https://ebook.kowpi.id/)
   Modern Islamic Financial Luxury Theme
   ================================================================ */

:root {
    --brand-50: #fdf8f6;
    --brand-100: #f7ede8;
    --brand-200: #efd6cc;
    --brand-300: #e0b49e;
    --brand-400: #cc8a6a;
    --brand-500: #b86a4a;
    --brand-600: #8c4835;
    --brand-700: #6e3428;
    --brand-800: #4f261e;
    --brand-900: #341916;
    --brand-950: #1e0e0c;
    --gold: #d4a847;
    --gold-light: #f3cf7a;
    --gold-dark: #a67c2e;
    --dark-bg: #0c0807;
    --dark-surface: #140d0b;
    --dark-card: #1c1310;
    --dark-border: rgba(212, 168, 71, 0.15);
    --dark-border-hover: rgba(212, 168, 71, 0.35);
    --text-primary: #f8f4f0;
    --text-secondary: #c4b3ac;
    --text-muted: #8f7d75;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-card: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--dark-border);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: var(--brand-700); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ─── Selection ─── */
::selection { background: var(--brand-600); color: #fff; }

/* ─── Container ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* ─── NAVBAR ─── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.35s ease;
    background: rgba(12, 8, 7, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(212, 168, 71, 0.08);
}
.navbar.scrolled {
    padding: 12px 0;
    background: rgba(12, 8, 7, 0.95);
    border-bottom: 1px solid var(--dark-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}
.navbar-brand img {
    height: 36px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}
.navbar-brand:hover img {
    transform: scale(1.02);
}
.navbar-tagline {
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 12px;
}
.navbar-tagline .title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gold-light);
    text-transform: uppercase;
}
.navbar-tagline .desc {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.btn-nav-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid rgba(212, 168, 71, 0.2);
    background: rgba(30, 20, 18, 0.4);
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-nav-ghost:hover {
    color: #fff;
    border-color: var(--gold);
    background: rgba(212, 168, 71, 0.1);
    transform: translateY(-1px);
}
.btn-nav-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    border: 1px solid var(--brand-500);
    box-shadow: 0 4px 15px rgba(140, 72, 53, 0.35);
    transition: all 0.25s ease;
    white-space: nowrap;
}
.btn-nav-primary:hover {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    box-shadow: 0 6px 20px rgba(140, 72, 53, 0.5);
    transform: translateY(-1px);
}

/* ─── HERO SECTION ─── */
.hero {
    position: relative;
    padding: 150px 0 60px;
    overflow: hidden;
}
.hero-bg-glow {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(140, 72, 53, 0.25) 0%, rgba(212, 168, 71, 0.08) 40%, transparent 70%);
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(212, 168, 71, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 168, 71, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center top, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center top, black 30%, transparent 80%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    background: rgba(212, 168, 71, 0.08);
    border: 1px solid rgba(212, 168, 71, 0.3);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.3rem, 5.5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.18;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}
.hero-title .highlight {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--brand-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── SEARCH & FILTER BAR ─── */
.filter-wrapper {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    margin-bottom: 40px;
}
.search-box {
    position: relative;
    max-width: 580px;
    margin: 0 auto 24px;
}
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 15px 20px 15px 52px;
    background: rgba(22, 15, 13, 0.85);
    border: 1px solid rgba(212, 168, 71, 0.2);
    border-radius: var(--radius-full);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}
.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 12px 35px rgba(212, 168, 71, 0.15);
    background: rgba(26, 17, 15, 0.95);
}
.search-input::placeholder {
    color: var(--text-muted);
}

.category-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 10px;
}
.cat-pill {
    background: rgba(28, 19, 16, 0.6);
    border: 1px solid rgba(212, 168, 71, 0.12);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}
.cat-pill:hover {
    color: #fff;
    border-color: rgba(212, 168, 71, 0.3);
    background: rgba(212, 168, 71, 0.08);
}
.cat-pill.active {
    background: linear-gradient(135deg, var(--gold), #b8860b);
    color: #120b09;
    font-weight: 700;
    border-color: var(--gold-light);
    box-shadow: 0 4px 15px rgba(212, 168, 71, 0.3);
}

/* ─── CATALOG SECTION ─── */
.catalog-section {
    position: relative;
    padding: 20px 0 100px;
}
.section-header {
    margin-bottom: 48px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid rgba(212, 168, 71, 0.1);
    padding-bottom: 20px;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #fff;
    font-weight: 700;
}
.section-title span {
    color: var(--gold);
}
.book-count-badge {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.book-count-badge strong {
    color: var(--gold-light);
}

/* ─── CATALOG GRID ─── */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 36px;
}

/* ─── BOOK CARD ─── */
.book-card-item {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-card);
    position: relative;
}
.book-card-item:hover {
    transform: translateY(-6px);
    border-color: var(--dark-border-hover);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 168, 71, 0.12);
}

/* ─── 3D MOCKUP STAGE ─── */
.book-mockup-stage {
    background: radial-gradient(circle at 50% 40%, rgba(140, 72, 53, 0.25) 0%, rgba(18, 12, 10, 0.95) 75%);
    padding: 44px 20px 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    perspective: 1200px;
    border-bottom: 1px solid rgba(212, 168, 71, 0.08);
    cursor: pointer;
    text-decoration: none;
}
.status-ribbon {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.ribbon-active {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: #fff;
    border: 1px solid rgba(46, 204, 113, 0.4);
}
.ribbon-upcoming {
    background: rgba(45, 31, 26, 0.8);
    color: var(--gold-light);
    border: 1px solid rgba(212, 168, 71, 0.3);
    backdrop-filter: blur(10px);
}

/* 3D BOOK STRUCTURE */
.book-3d {
    position: relative;
    width: 175px;
    height: 250px;
    transform-style: preserve-3d;
    transform: rotateY(-18deg) rotateX(6deg);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
    box-shadow: 
        -15px 20px 30px rgba(0, 0, 0, 0.7),
        -2px 0 8px rgba(0,0,0,0.5);
    border-radius: 4px 12px 12px 4px;
}
.book-card-item:hover .book-3d {
    transform: rotateY(0deg) rotateX(0deg) translateY(-8px) scale(1.04);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.85);
}

/* Book Cover Front */
.book-cover-front {
    position: absolute;
    inset: 0;
    border-radius: 4px 12px 12px 4px;
    overflow: hidden;
    background: #251613;
    z-index: 2;
}
.book-cover-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Spine edge highlight */
.book-cover-front::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

/* Book Spine (Punggung Buku 3D) */
.book-spine {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 28px;
    transform: rotateY(90deg) translateZ(0px);
    transform-origin: left;
    background: linear-gradient(90deg, #180d0b 0%, #2f1712 50%, #150a08 100%);
    border-radius: 3px 0 0 3px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Book Pages Edge (Tepi Kertas) */
.book-pages-edge {
    position: absolute;
    top: 4px;
    right: -12px;
    bottom: 4px;
    width: 14px;
    background: repeating-linear-gradient(
        90deg,
        #f4ece1 0px,
        #dcd0c0 1px,
        #f4ece1 2px
    );
    transform: rotateY(90deg) translateZ(168px);
    border-radius: 0 3px 3px 0;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
}

/* ─── CARD DETAILS ─── */
.book-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.book-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.book-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.book-item-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.35;
}
.book-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.book-item-title a:hover {
    color: var(--gold-light);
}
.book-author {
    font-size: 0.82rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.book-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Action CTA inside card */
.card-cta-area {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 18px;
}
.btn-book-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}
.btn-active-action {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    border: 1px solid var(--brand-500);
    box-shadow: 0 4px 15px rgba(140, 72, 53, 0.3);
}
.btn-active-action:hover {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    box-shadow: 0 6px 25px rgba(140, 72, 53, 0.5);
    transform: translateY(-2px);
    color: #fff;
}
.btn-upcoming-action {
    background: rgba(45, 31, 26, 0.4);
    color: var(--text-muted);
    border: 1px solid rgba(212, 168, 71, 0.15);
    cursor: default;
}

/* ─── VALUE PROPOSITION SECTION ─── */
.values-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, #110b0a 100%);
    border-top: 1px solid rgba(212, 168, 71, 0.08);
}
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.value-card {
    background: rgba(24, 16, 14, 0.5);
    border: 1px solid rgba(212, 168, 71, 0.12);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    transition: transform 0.3s, border-color 0.3s;
}
.value-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 71, 0.3);
}
.value-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212, 168, 71, 0.15), rgba(140, 72, 53, 0.2));
    border: 1px solid rgba(212, 168, 71, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    margin-bottom: 20px;
}
.value-card h3 {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 700;
}
.value-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ─── COMMUNITY BANNER ─── */
.community-banner {
    padding: 60px 0 90px;
}
.community-box {
    background: radial-gradient(ellipse at center, #241410 0%, #160c0a 100%);
    border: 1px solid rgba(212, 168, 71, 0.25);
    border-radius: 24px;
    padding: 48px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}
.community-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.community-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    color: #fff;
    margin-bottom: 14px;
}
.community-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.6;
}
.btn-community-wa {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    font-weight: 700;
    padding: 15px 32px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
    transition: all 0.3s ease;
}
.btn-community-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

/* ─── FOOTER ─── */
.footer {
    background: #080504;
    border-top: 1px solid rgba(212, 168, 71, 0.1);
    padding: 40px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.footer-logo img {
    height: 30px;
    width: auto;
    opacity: 0.85;
}
.footer-disclaimer {
    font-size: 0.78rem;
    color: #6d5b54;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 20px;
    text-align: center;
}

/* ─── RESPONSIVE BREAKPOINTS ─── */
@media (max-width: 768px) {
    .navbar { padding: 12px 0; }
    .navbar-inner { padding: 0 16px; }
    .navbar-tagline { display: none; }
    .navbar-brand img { height: 30px; }
    .btn-nav-ghost { padding: 6px 12px; font-size: 0.74rem; }
    .btn-nav-primary { padding: 6px 14px; font-size: 0.74rem; }
    
    .hero { padding: 120px 0 40px; }
    .hero-eyebrow { font-size: 0.72rem; padding: 5px 14px; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 24px; }
    
    .catalog-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
    .community-box { padding: 36px 20px; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .navbar { padding: 10px 0; }
    .navbar-inner { padding: 0 12px; }
    .navbar-brand img { height: 26px; }
    .navbar-actions { gap: 6px; }
    .btn-nav-ghost { padding: 5px 10px; font-size: 0.7rem; }
    .btn-nav-primary { padding: 5px 11px; font-size: 0.7rem; }
    
    .search-box { margin-bottom: 16px; }
    .search-input { font-size: 0.85rem; padding: 12px 16px 12px 46px; }
    .cat-pill { padding: 6px 14px; font-size: 0.75rem; }
    
    .book-mockup-stage { padding: 36px 16px 28px; }
    .book-3d { width: 150px; height: 215px; }
    .book-card-body { padding: 20px; }
    .book-item-title { font-size: 1.25rem; }
}

@media (max-width: 360px) {
    .navbar-inner { padding: 0 8px; }
    .navbar-brand img { height: 23px; }
    .btn-nav-ghost { padding: 5px 8px; font-size: 0.68rem; }
    .btn-nav-primary { padding: 5px 9px; font-size: 0.68rem; }
}
