/* ══════════════════════════════════════════════════════
   ramanjudge.com — styles.css
   Theme: Deep Charcoal · Warm Ivory · Antique Gold
   UK English. Consistent. Disciplined.
══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
    /* Backgrounds — light to dark */
    --bg-ivory:    #F5F3EF;
    --bg-warm:     #ECEAE3;
    --bg-dark:     #16213e;
    --bg-dark-2:   #1a2a4a;
    --bg-card:     #ffffff;

    /* Text */
    --ink:         #0f172a;
    --ink-mid:     #334155;
    --ink-soft:    #64748b;
    --ink-muted:   #94a3b8;

    /* Gold accent — single accent colour */
    --gold:        #C9A84C;
    --gold-light:  #DDB96A;
    --gold-pale:   rgba(201,168,76,0.12);
    --gold-border: rgba(201,168,76,0.28);

    /* Borders & structure */
    --border:      #E2DED7;
    --border-dark: rgba(255,255,255,0.07);
    --radius:      1.25rem;
    --radius-sm:   0.75rem;

    /* Shadows */
    --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
    --shadow-md:   0 4px 18px rgba(0,0,0,0.09);
    --shadow-lg:   0 12px 36px rgba(0,0,0,0.14);
    --shadow-xl:   0 24px 60px rgba(0,0,0,0.20);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    background-color: var(--bg-ivory);
    color: var(--ink);
    line-height: 1.7;
    letter-spacing: -0.01em;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed; inset: 0;
    background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
    opacity: 0.08;
    pointer-events: none;
    z-index: 9999;
}
img  { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a    { color: inherit; }

/* ── TYPOGRAPHY ── */
.font-montserrat { font-family: 'Montserrat', sans-serif; }
h1, h2, h3 { line-height: 1.1; margin: 0; }

/* Eyebrow — gold label above headings */
.eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.38em;
    color: var(--gold);
    margin-bottom: 0.875rem;
}
/* Eyebrow on dark backgrounds */
.eyebrow-dark {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.38em;
    color: var(--gold);
    margin-bottom: 0.875rem;
    opacity: 0.9;
}

/* ── SECTION RHYTHM ── */
/* Light section — warm ivory */
.section-light {
    padding: 5rem 1.5rem;
    background: var(--bg-ivory);
}
/* Mid section — warm oat */
.section-warm {
    padding: 5rem 1.5rem;
    background: var(--bg-warm);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
/* Dark section — charcoal */
.section-dark {
    padding: 5rem 1.5rem;
    background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
}
.section-inner {
    max-width: 72rem;
    margin: 0 auto;
}

/* ── STICKY NAV ── */
#site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-link {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    text-decoration: none;
    color: var(--ink-mid);
    opacity: 0.75;
    padding: 6px 0;
    position: relative;
    transition: color 0.2s, opacity 0.2s;
    white-space: nowrap;
}
.nav-link:hover  { opacity: 1; color: var(--gold); }
.nav-link.active { opacity: 1; color: var(--gold); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0; right: 0;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
    padding: 6rem 1.5rem 4rem;
    background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    border-bottom: 1px solid var(--border-dark);
}

/* ── CARDS — themed ── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }

/* Card on dark background */
.card-dark {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius);
    border: 1px solid var(--border-dark);
    padding: 2rem;
}

/* Gold-accented card */
.card-gold {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--gold-border);
    padding: 2rem;
    box-shadow: 0 2px 12px var(--gold-pale);
}

/* ── STACK CARDS (homepage book nav) ── */
.stack-card {
    display: block;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease;
    cursor: pointer;
}
.stack-card:hover { transform: translateX(6px); }

/* ── BOOK EFFECT: GOLD GLOW (all book pages) ── */
.book-glow {
    position: relative;
    display: inline-block;
    transition: transform 0.35s ease;
}
.book-glow img {
    border-radius: 4px 10px 10px 4px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.45);
    transition: box-shadow 0.4s ease;
}
.book-glow:hover {
    transform: translateY(-8px);
}
.book-glow:hover img {
    box-shadow:
        0 0 40px 10px rgba(201,168,76,0.28),
        0 0 80px 24px rgba(201,168,76,0.10),
        0 28px 64px rgba(0,0,0,0.45);
}

/* ── ALTERNATING VOLUME ROW (fm-excellence) ── */
.vol-row         { display:flex; gap:2.5rem; align-items:flex-start; flex-wrap:wrap; }
.vol-row.flip    { flex-direction:row-reverse; }
@media (max-width:640px) {
    .vol-row, .vol-row.flip { flex-direction:column; }
}

/* ── BUY BUTTONS — charcoal family, ordered shades ── */
.buy-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    border-radius: 0.5rem;
    /* Equal width: flex-basis makes all buttons same width in a row */
    flex: 1 1 0;
    min-width: 90px;
    max-width: 140px;
    padding: 10px 8px;
    min-height: 40px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-buy:hover { transform: translateY(-2px); }

/* Shade 1 — deepest: NotionPress (primary publisher) */
.btn-notion {
    background: #0f172a;
    color: #C9A84C;
    box-shadow: 0 2px 8px rgba(15,23,42,0.28);
}
.btn-notion:hover { background: #1a2a4a; box-shadow: 0 6px 18px rgba(15,23,42,0.4); }

/* Shade 2 — Kindle (digital primary) */
.btn-kindle {
    background: #1e293b;
    color: rgba(255,255,255,0.92);
    box-shadow: 0 2px 8px rgba(30,41,59,0.22);
}
.btn-kindle:hover { background: #263447; box-shadow: 0 6px 18px rgba(30,41,59,0.35); }

/* Shade 3 — Amazon IN */
.btn-amazon-in {
    background: #2d3f55;
    color: rgba(255,255,255,0.88);
    box-shadow: 0 2px 8px rgba(45,63,85,0.2);
}
.btn-amazon-in:hover { background: #354a63; box-shadow: 0 6px 18px rgba(45,63,85,0.32); }

/* Shade 4 — Amazon Global */
.btn-amazon-global {
    background: #3d5068;
    color: rgba(255,255,255,0.84);
    box-shadow: 0 2px 8px rgba(61,80,104,0.18);
}
.btn-amazon-global:hover { background: #476079; box-shadow: 0 6px 18px rgba(61,80,104,0.3); }

/* Shade 5 — Flipkart (lightest) */
.btn-flipkart {
    background: #4e6070;
    color: rgba(255,255,255,0.80);
    box-shadow: 0 2px 8px rgba(78,96,112,0.16);
}
.btn-flipkart:hover { background: #5a6e80; box-shadow: 0 6px 18px rgba(78,96,112,0.28); }

/* ── STAT CARDS ── */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
}
.stat-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
    margin: 0 0 4px;
    line-height: 1;
}
.stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    margin: 0;
}
/* Stat card on dark bg */
.stat-card-dark {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    text-align: center;
}

/* ── PULSE DOT (latest release) ── */
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(201,168,76,0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(201,168,76,0); }
    100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}
.pulse-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse-ring 2.2s ease-out infinite;
    flex-shrink: 0;
    vertical-align: middle;
}

/* ── GOLD DIVIDER ── */
.gold-rule {
    width: 40px; height: 2px;
    background: var(--gold);
    border-radius: 2px;
    margin: 0 0 2rem;
}
.gold-rule-center { margin: 0 auto 2rem; }

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-pale);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.field-error { font-size: 11px; color: #dc2626; margin-top: 4px; display: none; }
.field-error.visible { display: block; }
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select { border-color: #dc2626; }

/* ── SUCCESS BOX ── */
.success-box {
    display: none;
    padding: 2.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    text-align: center;
}
.success-box h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #166534;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.success-box p { color: #166534; font-size: 14px; margin: 0; }

/* ── ACCESSIBILITY ── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .pulse-dot { animation: none; }
}

/* ── SCROLLBAR ── */
@media (min-width: 768px) {
    ::-webkit-scrollbar { width: 7px; }
    ::-webkit-scrollbar-track { background: #f0efec; }
    ::-webkit-scrollbar-thumb { background: #c4bfb5; border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--gold); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .section-light,
    .section-warm,
    .section-dark  { padding: 3.5rem 1rem; }
    .page-hero     { padding: 5rem 1rem 3rem; }
    .btn-buy       { flex: 1 1 calc(50% - 0.25rem); max-width: none; }
}
