/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Colors - Dark Theme */
    --bg-color: #050505;
    --bg-surface: #121212;
    --bg-surface-elevated: #1e1e1e;
    
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-tertiary: #6c757d;
    
    --accent-color: #7b2cbf;
    --accent-glow: rgba(123, 44, 191, 0.4);
    --gradient-primary: linear-gradient(135deg, #7b2cbf 0%, #3a0ca3 100%);
    --gradient-text: linear-gradient(90deg, #c77dff 0%, #7b2cbf 100%);
    
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Border Radius */
    --rs-sm: 4px;
    --rs-md: 8px;
    --rs-lg: 16px;
    --rs-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --container-width: 1200px;
    --container-padding: 2rem;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--space-xl) 0;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--accent-color);
}

/* ==========================================================================
   Custom Cursor
   ========================================================================== */
@media (pointer: fine) {
    body {
        cursor: none;
    }
    
    .cursor-dot, .cursor-outline {
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 9999;
        pointer-events: none;
    }
    
    .cursor-dot {
        width: 8px;
        height: 8px;
        background-color: var(--accent-color);
    }
    
    .cursor-outline {
        width: 40px;
        height: 40px;
        border: 1px solid rgba(123, 44, 191, 0.5);
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }
    
    /* Hover state added via JS */
    .cursor-outline.hover {
        width: 60px;
        height: 60px;
        background-color: var(--accent-glow);
        border-color: transparent;
    }
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.section-header {
    margin-bottom: var(--space-lg);
}

.section-header.align-center {
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(123, 44, 191, 0.1);
    color: #c77dff;
    border-radius: var(--rs-full);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    border: 1px solid rgba(123, 44, 191, 0.2);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-header:not(.align-center) .section-desc {
    margin: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--rs-full);
    font-weight: 500;
    transition: all var(--transition-base);
    cursor: none; /* Let custom cursor handle it */
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    font-family: var(--font-primary);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #9d4edd 0%, #5a189a 100%);
    z-index: -1;
    transition: opacity var(--transition-base);
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-color);
    background: rgba(123, 44, 191, 0.05);
}

.btn-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-color);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-circle:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.text-link {
    color: var(--text-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.text-link:hover {
    color: var(--accent-color);
}

.arrow {
    transition: transform var(--transition-base);
}

.btn:hover .arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo-accent {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-surface);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-link {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.mobile-nav.active .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 120px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.05); /* Prevent edges showing on paralax */
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(5, 5, 5, 0.4) 0%,
        rgba(5, 5, 5, 0.8) 50%,
        var(--bg-color) 100%
    );
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
}

.hero-eyebrow {
    font-family: var(--font-secondary);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity var(--transition-base);
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite cubic-bezier(0.15, 0.41, 0.69, 0.94);
}

@keyframes scroll {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 15px); }
}

.scroll-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Services Section (Our Expertise)
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--rs-lg);
    padding: var(--space-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(123, 44, 191, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(123, 44, 191, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(123, 44, 191, 0.1);
    border-radius: var(--rs-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--accent-color);
    transition: transform var(--transition-base);
}

.service-card:hover .service-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-primary);
    color: white;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-content p {
    color: var(--text-secondary);
}

/* ==========================================================================
   Publications Section
   ========================================================================== */
.featured-book {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xl);
    background: var(--bg-surface);
    border-radius: var(--rs-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
}

.book-visual {
    position: relative;
    border-radius: var(--rs-md);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.book-visual img {
    width: 100%;
    display: block;
    transition: transform var(--transition-slow);
}

.featured-book:hover .book-visual img {
    transform: scale(1.05);
}

.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.tag {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    font-weight: 600;
}

.price {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: white;
    font-style: italic;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.book-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.book-author {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.book-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}

.book-card-vertical {
    border-radius: var(--rs-md);
    overflow: hidden;
}

.card-image-wrap {
    position: relative;
    border-radius: var(--rs-md);
    overflow: hidden;
    aspect-ratio: 3/4;
    margin-bottom: 1.5rem;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.book-card-vertical:hover .card-image-wrap img {
    transform: scale(1.05);
}

.price-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    padding: 0.5rem 1rem;
    border-radius: var(--rs-full);
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
}

.hover-action {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(123, 44, 191, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-base);
}

.book-card-vertical:hover .hover-action {
    opacity: 1;
}

.hover-action .btn-circle {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.book-card-vertical:hover .hover-action .btn-circle {
    transform: translateY(0);
}

.card-content .tag {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    display: block;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.card-author {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.shop-all-container {
    text-align: center;
    margin-top: var(--space-xl);
}

/* ==========================================================================
   Banner / CTA
   ========================================================================== */
.banner {
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-lg) 0;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(123, 44, 191, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.banner-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    position: relative;
    z-index: 1;
}

.banner-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}

.banner-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-color);
    padding: var(--space-xl) 0 var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-desc {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links-group h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-links-group ul {
    list-style: none;
}

.footer-links-group li {
    margin-bottom: 0.75rem;
}

.footer-links-group a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links-group a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .featured-book {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .banner-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-height: 700px) {
    .scroll-indicator {
        display: none;
    }
}
