@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #0A130F;
    --bg-panel: #0F1E17;
    --bg-card: #132A20;
    --bg-card-hover: #17331F;
    --ivory: #F4F0E6;
    --muted: #93A398;
    --muted-dim: #5E6D63;
    --gold: #C9A659;
    --gold-soft: #E7D5A8;
    --emerald: #3E8768;
    --emerald-bright: #4FA37C;
    --border: rgba(201, 166, 89, 0.16);
    --border-strong: rgba(201, 166, 89, 0.32);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ivory);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(62, 135, 104, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(201, 166, 89, 0.06), transparent);
}

h1, h2, h3, h4, .serif {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Custom cursor ---------- */
#cursor-dot, #cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
}
#cursor-dot {
    width: 6px; height: 6px;
    background: var(--gold);
}
#cursor-ring {
    width: 34px; height: 34px;
    border: 1px solid var(--border-strong);
    transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
}
.cursor-hover #cursor-ring {
    width: 56px; height: 56px;
    background: rgba(201, 166, 89, 0.08);
    border-color: var(--gold);
}
@media (hover: none), (pointer: coarse) {
    #cursor-dot, #cursor-ring { display: none; }
}

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(10,19,15,0.92), transparent);
    backdrop-filter: blur(6px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    letter-spacing: 0.02em;
}
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ivory); }
.nav-cta {
    background: var(--gold);
    color: #0A130F;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 90px;
}
#hero-canvas {
    position: absolute;
    top: 0; right: 0;
    width: 55%; height: 100%;
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-soft);
    border: 1px solid var(--border-strong);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
}
.eyebrow::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--emerald-bright);
    border-radius: 50%;
}
.hero h1 {
    font-size: clamp(38px, 5.5vw, 62px);
    margin-bottom: 20px;
}
.hero h1 em {
    font-style: italic;
    color: var(--gold);
}
.hero p {
    color: var(--muted);
    font-size: 17px;
    max-width: 460px;
    margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    transition: transform .25s ease, box-shadow .25s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--emerald-bright), var(--emerald));
    color: #06120C;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(79, 163, 124, 0.3); }
.btn-outline {
    border: 1px solid var(--border-strong);
    color: var(--ivory);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.hero-stats {
    display: flex;
    gap: 36px;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.hero-stats div strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 26px;
    color: var(--gold-soft);
}
.hero-stats div span { font-size: 13px; color: var(--muted-dim); }

/* ---------- Section shared ---------- */
section { padding: 110px 0; position: relative; }
.section-head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 60px;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------- Book grid ---------- */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
}
.book-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform .35s ease, border-color .35s ease, background .35s ease;
    position: relative;
    overflow: hidden;
}
.book-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
}
.book-card .cover-wrap {
    perspective: 900px;
    margin-bottom: 22px;
}
.book-cover {
    width: 130px;
    height: 178px;
    margin: 0 auto;
    border-radius: 3px 6px 6px 3px;
    background: linear-gradient(135deg, var(--emerald), #1c3d2c);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -6px 8px 22px rgba(0,0,0,0.45), inset -3px 0 0 rgba(0,0,0,0.25);
    transform: rotateY(-18deg);
    transition: transform .4s ease;
    padding: 16px;
    text-align: center;
    color: var(--gold-soft);
    font-family: 'Fraunces', serif;
    font-size: 13px;
    line-height: 1.35;
    border: 1px solid rgba(201,166,89,0.25);
}
.book-card:hover .book-cover { transform: rotateY(-6deg) scale(1.03); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px 6px 6px 3px; }

.book-card h3 { font-size: 19px; margin-bottom: 6px; }
.book-card .subtitle { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; min-height: 34px; }
.book-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--muted-dim);
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.book-meta span { display: flex; align-items: center; gap: 5px; }
.price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
}
.price-now { font-family: 'Fraunces', serif; font-size: 24px; color: var(--gold-soft); }
.price-mrp { font-size: 14px; color: var(--muted-dim); text-decoration: line-through; }
.book-card .btn { width: 100%; justify-content: center; }

/* ---------- Why / trust ---------- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.why-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    background: var(--bg-panel);
}
.why-card .num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    color: var(--gold);
    font-size: 15px;
    margin-bottom: 14px;
    display: block;
}
.why-card h4 { font-size: 18px; margin-bottom: 10px; }
.why-card p { color: var(--muted); font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(135deg, #0F241B, #0A1712);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 64px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(201,166,89,0.12), transparent 60%);
}
.cta-band h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 16px; position: relative; }
.cta-band p { color: var(--muted); margin-bottom: 30px; position: relative; }
.cta-band .btn { position: relative; }

/* ---------- Footer ---------- */
footer {
    border-top: 1px solid var(--border);
    padding: 50px 0 30px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--gold); }
.copyright { color: var(--muted-dim); font-size: 13px; }

/* ---------- Book detail page ---------- */
.book-detail {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 60px;
    padding-top: 130px;
    align-items: start;
}
.detail-cover-wrap { perspective: 1200px; position: sticky; top: 130px; }
.detail-cover {
    width: 100%;
    aspect-ratio: 3/4.2;
    border-radius: 4px 10px 10px 4px;
    background: linear-gradient(135deg, var(--emerald), #1c3d2c);
    box-shadow: -14px 18px 50px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: var(--gold-soft);
    font-family: 'Fraunces', serif;
    font-size: 20px;
    border: 1px solid rgba(201,166,89,0.25);
    transform: rotateY(-14deg);
    transition: transform .4s ease;
}
.detail-cover:hover { transform: rotateY(-4deg); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px 10px 10px 4px; }
.detail-info .eyebrow { margin-bottom: 18px; }
.detail-info h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; }
.detail-info .subtitle { color: var(--muted); font-size: 17px; margin-bottom: 26px; }
.detail-info .description { color: var(--muted); margin-bottom: 30px; max-width: 560px; }
.buy-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 420px;
}
.buy-box .price-row { margin-bottom: 4px; }
.buy-box .save-badge {
    display: inline-block;
    font-size: 12px;
    background: rgba(79,163,124,0.15);
    color: var(--emerald-bright);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.buy-box .btn { width: 100%; justify-content: center; margin-top: 10px; }
.trust-note { font-size: 13px; color: var(--muted-dim); margin-top: 16px; text-align: center; }

/* ---------- Forms (checkout) ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--ivory);
    font-family: inherit;
    font-size: 14.5px;
}
.form-group input:focus { outline: none; border-color: var(--gold); }

/* ---------- Success page ---------- */
.success-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.success-icon {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(79,163,124,0.15);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 26px;
    font-size: 30px;
    color: var(--emerald-bright);
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    * { scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .book-detail { grid-template-columns: 1fr; }
    .detail-cover-wrap { position: static; max-width: 280px; margin: 0 auto 20px; }
    .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    #hero-canvas { width: 100%; opacity: 0.35; }
    .hero-content { max-width: 100%; }
    .nav-links { display: none; }
    .nav-toggle { display: block; }
}
@media (max-width: 480px) {
    section { padding: 70px 0; }
    .hero-stats { gap: 22px; flex-wrap: wrap; }
    .book-grid { grid-template-columns: 1fr; }
}
