/* Color Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111827;
    --gold: #f59e0b;
    --gold-light: #fcd34d;
    --neon-blue: #60a5fa;
    --text-primary: #f9fafb;
    --text-muted: #9ca3af;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
}

/* 3D Book Effects */
.book-3d {
    perspective: 1000px;
    position: relative;
    transition: transform 0.6s ease;
}

.book-3d:hover {
    transform: rotateY(15deg) translateZ(20px) translateY(-10px);
    filter: drop-shadow(0 20px 40px rgba(245, 158, 11, 0.3));
}

.book-front {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.book-cover-wrapper {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.book-cover-wrapper:hover {
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2);
}

.book-3d-detail {
    perspective: 1200px;
    transform-style: preserve-3d;
}

.book-3d-detail:hover {
    transform: rotateY(8deg);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.1) 50%, transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll-triggered animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Book Cards */
.book-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-8px);
}

/* Navigation Styles */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Button Styles */
button {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.98);
}

/* Input Styles */
input, select, textarea {
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(245, 158, 11, 0.2);
    border-radius: 50%;
    border-top-color: #f59e0b;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styles */
::selection {
    background-color: #f59e0b;
    color: #0a0a0f;
}

::-webkit-selection {
    background-color: #f59e0b;
    color: #0a0a0f;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #fcd34d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .book-3d {
        width: 150px !important;
        height: 210px !important;
    }

    .text-5xl {
        font-size: 2.5rem;
    }

    .text-4xl {
        font-size: 1.875rem;
    }

    .glass-card {
        padding: 1rem;
    }

    .book-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .book-3d {
        width: 120px !important;
        height: 170px !important;
    }

    .text-5xl {
        font-size: 2rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .gap-8 {
        gap: 1rem;
    }
}

/* 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-width: 0;
}

/* Focus Visible for Keyboard Navigation */
:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #f59e0b, #fcd34d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Link hovers: prefer explicit Tailwind utilities per component */

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #f9fafb;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #f9fafb;
    font-family: 'DM Sans', sans-serif;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 40;
}

/* Utility Classes */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

.shadow-gold {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.border-gold {
    border-color: #f59e0b;
}

.hover:border-gold:hover {
    border-color: #f59e0b;
}

/* -------------------------------------------------------------------------- */
/* Production UI — skip link, hero, nav, motion preferences                   */
/* -------------------------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #f59e0b;
    color: #0a0a0f;
    font-weight: 600;
    font-size: 0.875rem;
    transform: translateY(-120%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid #fcd34d;
    outline-offset: 2px;
}

.nav-link {
    position: relative;
    padding: 0.25rem 0;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, #f59e0b, #fcd34d);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: #f59e0b;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Hero — liquid / editorial dark (e‑commerce pattern) */
.hero-shell {
    position: relative;
    isolation: isolate;
}

.hero-aurora {
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(245, 158, 11, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 30%, rgba(96, 165, 250, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(245, 158, 11, 0.08), transparent 45%);
}

.hero-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black 30%, transparent 95%);
}

.hero-glow {
    position: absolute;
    inset: -20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22) 0%, transparent 65%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-book-image {
    width: min(100%, 700px);
    height: auto;
    display: block;
    object-fit: contain;
    transition: filter 0.25s ease, transform 0.25s ease;
}

.hero-book-image:hover {
    /* text-like glow effect requested on hover */
    filter: drop-shadow(0 0 14px rgba(252, 211, 77, 0.65));
    transform: translateY(-2px);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.625rem;
    padding: 1rem 1.75rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #f59e0b, #fcd34d);
    color: #0a0a0f;
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 48px rgba(245, 158, 11, 0.35);
}

.btn-primary:focus-visible {
    outline: 2px solid rgba(252, 211, 77, 0.9);
    outline-offset: 3px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(245, 158, 11, 0.55);
    padding: 1rem 1.75rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(245, 158, 11, 0.06);
    color: #fcd34d;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.85);
}

.btn-secondary:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.65);
    outline-offset: 3px;
}

.category-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.category-tile .icon-wrap {
    display: flex;
    height: 3rem;
    width: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.category-tile .icon-wrap .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.contact-line {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.contact-line .icon {
    margin-top: 0.125rem;
    color: #f59e0b;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #f9fafb;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: rgba(245, 158, 11, 0.45);
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.08);
}

.theme-toggle-btn .icon {
    width: 0.95rem;
    height: 0.95rem;
}

/* Light theme overrides */
body.theme-light {
    background: #f8fafc !important;
    color: #0f172a !important;
}

body.theme-light .text-white,
body.theme-light .text-white\/90,
body.theme-light .text-white\/95 {
    color: #0f172a !important;
}

body.theme-light .text-gray-400,
body.theme-light .text-gray-500 {
    color: #475569 !important;
}

body.theme-light nav.scrolled,
body.theme-light #navbar > div {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.theme-light .glass-card {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .bg-secondary,
body.theme-light .bg-primary,
body.theme-light .bg-secondary\/50 {
    background-color: #ffffff !important;
}

body.theme-light .hero-grid {
    opacity: 0.35;
}

body.theme-light .hero-aurora {
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(245, 158, 11, 0.12), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 30%, rgba(37, 99, 235, 0.1), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(245, 158, 11, 0.08), transparent 45%);
}

/* Respect reduced motion (UI UX Pro Max checklist) */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .scroll-animate {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .float,
    .fade-in-up,
    .book-3d:hover,
    .book-card:hover {
        animation: none !important;
        transform: none !important;
    }

    .btn-primary:hover,
    .btn-secondary:hover,
    .category-tile:hover {
        transform: none;
    }
}
