/* 
   Mockup 2: Mystical & Ethereal 
   Inspired by 'Into Wolf Territory' cover (Violet, deep purple, and warm gold)
*/

@font-face {
    font-family: 'Cinzel Decorative';
    src: url('Fonts/CinzelDecorative-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Cinzel Decorative';
    src: url('Fonts/CinzelDecorative-Bold.ttf') format('truetype');
    font-weight: 700;
}

@font-face {
    font-family: 'Cinzel Decorative';
    src: url('Fonts/CinzelDecorative-Black.ttf') format('truetype');
    font-weight: 900;
}

@font-face {
    font-family: 'Raleway';
    src: url('Fonts/Raleway-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
}

@font-face {
    font-family: 'Raleway Italic';
    src: url('Fonts/Raleway-Italic-VariableFont_wght.ttf') format('truetype');
    font-style: italic;
    font-weight: 100 900;
}

:root {
    --bg-dark: #070414;
    /* Deep space black/purple */
    --bg-card: rgba(18, 10, 38, 0.65);
    /* Translucent cosmic card */
    --text-primary: #f0f0f5;
    --text-secondary: #a395c2;
    --accent-purple: #7e38ba;
    --accent-purple-hover: #9c4be0;
    --accent-gold: #f4d03f;
    /* Starlight gold */
    --border-color: rgba(126, 56, 186, 0.3);

    --font-heading: 'Cinzel Decorative', serif;
    --font-ui: 'Raleway', sans-serif;
    --font-body: 'Raleway', sans-serif;
}


/* === Author Name: Raleway semi-bold + small-caps everywhere === */
.author-name {
    font-family: var(--font-ui);
    font-weight: 600;
    font-style: normal;
    font-variant: small-caps;
    letter-spacing: 0.06em;
    color: inherit;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    /* Romantic floral rose & vine repeating pattern layered over dark base */
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(7, 4, 20, 0.55) 0%, transparent 70%),
        url('Images/floral-pattern.svg');
    background-size: auto, 280px 280px;
    background-repeat: no-repeat, repeat;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* === Theme Switcher (UI Only) === */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(26, 15, 46, 0.9);
    padding: 15px;
    border: 1px solid var(--accent-purple);
    border-radius: 8px;
    z-index: 9999;
    font-family: var(--font-ui);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.theme-switcher p {
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-switcher button {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-ui);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.theme-switcher button:hover {
    border-color: var(--accent-gold);
}

.theme-switcher button.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #fff;
}

/* === Navigation === */
.navbar {
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(26, 15, 46, 0.95) 0%, rgba(26, 15, 46, 0) 100%);
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--accent-gold);
    text-decoration: none;
    letter-spacing: 2px;
    font-style: italic;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    font-family: var(--font-ui);
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s, text-shadow 0.3s;
}

.nav-links a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(241, 196, 15, 0.5);
}

/* === Hero Section === */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 70px 20px 30px;
    overflow: hidden;
    /* Transparent back so HTML patterns show through */
    background-color: transparent;
}

/* Ethereal Nebula Base */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 50% 50%, rgba(126, 56, 186, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(68, 30, 114, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(45, 15, 84, 0.4) 0%, transparent 50%);
    animation: nebulaMove 40s ease-in-out infinite alternate;
    z-index: -3;
    filter: blur(30px);
}

/* Second Nebula Layer for depth */
.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 70% 60%, rgba(244, 208, 63, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 30% 40%, rgba(156, 75, 224, 0.15) 0%, transparent 40%);
    animation: nebulaMove2 35s ease-in-out infinite alternate-reverse;
    z-index: -2;
    filter: blur(40px);
}

@keyframes nebulaMove {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(-2%, 5%);
    }
}

@keyframes nebulaMove2 {
    0% {
        transform: scale(1.1) translate(0, 0);
    }

    100% {
        transform: scale(1.3) translate(5%, -2%);
    }
}

/* Ethereal Glow */
.hero-glow {
    position: absolute;
    top: 30%;
    right: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(126, 56, 186, 0.15) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-text h2 {
    font-family: var(--font-ui);
    color: var(--accent-purple-hover);
    letter-spacing: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(156, 75, 224, 0.5);
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 5px;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
    line-height: 1.7;
}

.newsletter-cta {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(126, 56, 186, 0.1);
    position: relative;
    overflow: hidden;
}

.newsletter-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-gold));
}

.newsletter-cta h3 {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.newsletter-cta h3 em {
    color: #fff;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(126, 56, 186, 0.4);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(244, 208, 63, 0.2);
    background: rgba(0, 0, 0, 0.7);
}

.arc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}

.arc-checkbox input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-purple-hover);
}

.arc-checkbox strong {
    color: var(--accent-gold);
}

.cta-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-purple) 0%, #4a216e 100%);
    color: #fff;
    border: 1px solid rgba(156, 75, 224, 0.5);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(126, 56, 186, 0.4), 0 0 15px rgba(126, 56, 186, 0.6);
    background: linear-gradient(135deg, var(--accent-purple-hover) 0%, var(--accent-purple) 100%);
}

.hero-image {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: visible;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.8s ease;
    border-radius: 6px;
    box-shadow: 0 0 50px rgba(126, 56, 186, 0.6), 0 0 25px rgba(244, 208, 63, 0.4);
}

.hero-image:hover img {
    transform: scale(1.03);
    box-shadow: 0 0 70px rgba(126, 56, 186, 0.8), 0 0 40px rgba(244, 208, 63, 0.6);
}

/* === Books Section === */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
    font-style: italic;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
}

.book-card {
    background: rgba(42, 27, 66, 0.4);
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: visible;
    transition: all 0.4s ease;
    border: 1px solid rgba(142, 68, 173, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.book-card:hover {
    transform: translateY(-10px);
    border-color: rgba(142, 68, 173, 0.6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(142, 68, 173, 0.2);
}

.js-tilt-glare {
    border-radius: inherit;
}

.book-cover {
    height: 450px;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.book-cover img {
    height: 100%;
    width: auto;
    object-fit: cover;
    transition: all 0.7s;
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(244, 208, 63, 0.5), 0 0 15px rgba(244, 208, 63, 0.3);
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
    box-shadow: 0 0 60px rgba(244, 208, 63, 0.7), 0 0 25px rgba(244, 208, 63, 0.5);
}

.book-details {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.badge {
    display: inline-block;
    align-self: center;
    padding: 6px 15px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: rgba(241, 196, 15, 0.1);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 30px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.badge.free {
    background: rgba(142, 68, 173, 0.1);
    color: var(--accent-purple-hover);
    border-color: var(--accent-purple-hover);
}

.book-details h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #fff;
    font-style: italic;
}

.book-details h4 {
    font-family: var(--font-ui);
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 25px;
}

.book-details p {
    color: var(--text-primary);
    margin-bottom: 35px;
    font-weight: 300;
    flex-grow: 1;
}

.buy-button {
    display: block;
    text-align: center;
    padding: 15px;
    background: var(--text-primary);
    color: var(--bg-dark);
    text-decoration: none;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 30px;
    transition: all 0.3s;
}

.buy-button:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.buy-button.outline {
    background: transparent;
    border: 2px solid var(--accent-purple-hover);
    color: var(--accent-purple-hover);
}

.buy-button.outline:hover {
    background: var(--accent-purple-hover);
    color: #fff;
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.4);
}

/* === About Section === */
.about-section {
    position: relative;
    padding: 30px 0;
}

.about-content {
    display: flex;
    flex-direction: row-reverse;
    /* Swap sides for variety */
    gap: 80px;
    align-items: center;
}

.author-placeholder {
    width: 100%;
    padding-bottom: 110%;
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.2) 0%, rgba(26, 15, 46, 0.8) 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.author-placeholder::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 25px;
    color: #fff;
    font-style: italic;
}

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-weight: 300;
}

.social-links {
    display: flex;
    gap: 25px;
}

.social-icon {
    color: var(--accent-gold);
    text-decoration: none;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s, color 0.3s;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

/* === Footer === */
footer {
    padding: 40px 20px 30px;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-purple-hover);
    font-style: italic;
}

footer p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-gold);
}


/* === Responsive Design === */
@media (max-width: 968px) {
    .theme-switcher {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 4rem;
    }

    .hero-text p {
        margin: 0 auto 40px;
    }

    .newsletter-cta {
        text-align: left;
    }

    .input-group {
        flex-direction: column;
    }

    .hero-image {
        grid-row: 1;
        max-width: 350px;
    }

    .about-content {
        flex-direction: column;
    }

    .about-text {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 3.2rem;
    }

    .nav-links {
        display: none;
    }
}