@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-color: #FAFAFA;
    --text-color: #2D3436;
    --text-light: #636e72;
    --brand-primary: #6C5CE7;
    --brand-secondary: #fd79a8;
    --brand-gradient: linear-gradient(135deg, #6C5CE7 0%, #fd79a8 100%);
    --surface-color: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 4px 6px rgba(108, 92, 231, 0.1);
    --shadow-lg: 0 20px 40px rgba(108, 92, 231, 0.15);
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    /* Richer background with mesh gradient and noise */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(108, 92, 231, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(253, 121, 168, 0.08) 0%, transparent 25%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    background-attachment: fixed;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    line-height: 1.1;
    color: #000;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    padding: 1.5rem 0;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.nav-links a:hover {
    color: var(--brand-primary);
}

.btn-primary {
    background: var(--brand-gradient);
    color: white !important;
    padding: 0.8rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fd79a8 0%, #6C5CE7 100%);
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 0px;
    /* Reduced to zero to connect with next section */
    overflow: hidden;
    /* For shapes */
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
}

.hero-text {
    z-index: 2;
}

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--brand-primary);
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-full);
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #2D3436, #636e72);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    /* Wraps tightly around text */
    opacity: 0;
    white-space: nowrap;
    /* Force single line on desktop */
    /* Removed undefined gradientFlow animation */
    animation: titleReveal 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

.hero h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0px;
    /* Moved slightly down */
    height: 8px;
    /* Thicker line */
    width: 100%;
    /* Start at full width but animate scaleX instead for better performance, or width */
    background: var(--brand-gradient);
    border-radius: 4px;
    transform-origin: left;
    transform: scaleX(0);
    animation: lineSlide 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.6s forwards;
    z-index: -1;
    opacity: 0.8;
}

@keyframes titleReveal {
    0% {
        transform: translateY(30px);
        opacity: 0;
        filter: blur(10px);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes lineSlide {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: 20px 20px 80px rgba(0, 0, 0, 0.2), -5px -5px 30px rgba(255, 255, 255, 1);
    transform: rotate(3deg);
    transition: var(--transition);
    border: 8px solid white;
}

.hero-image:hover img {
    transform: rotate(0deg) scale(1.02);
}

/* Dynamic Shapes */
.floating-shape {
    position: absolute;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s ease-in-out infinite;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ffeaa7 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ffcccc 0%, transparent 70%);
    bottom: -10%;
    left: -10%;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -50px);
    }
}

/* Features Section */
.features {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
    background: white;
    /* Explicit background */
    margin-top: -5rem;
    /* Pull up to overlap with hero if needed, or just 0 */
    padding-top: 8rem;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
    /* Slant effect top */
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    /* Removing gap for a connected list look, or keeping small */
    background: white;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    overflow: hidden;
}

.feature-card {
    background: transparent;
    /* Parent has bg */
    padding: 4rem 2rem;
    border-radius: 0;
    text-align: center;
    transition: var(--transition);
    border: none;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card:last-child {
    border-right: none;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    /* Top accent instead of side */
    background: var(--brand-gradient);
    transition: 0.5s ease;
    transform: scaleX(0);
    transform-origin: left;
}

.feature-card:hover {
    transform: translateY(0);
    /* No lift, just color change */
    background: #fdfdfd;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Author Section */
.author {
    padding: 8rem 0;
    margin: 0;
    /* Removed margin */
    background: var(--text-color);
    /* Dark section for contrast */
    color: white;
    position: relative;
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 100%);
    /* Slant effect */
    margin-top: -4rem;
    /* Overlap effect */
    padding-top: 10rem;
    z-index: 1;
}

.author h2 {
    color: white;
    background: none;
    -webkit-text-fill-color: initial;
}

.author .hero-subtitle {
    background: rgba(255, 255, 255, 0.1);
    color: #fd79a8;
}

.author-content {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.author-image-wrapper {
    position: relative;
    height: 450px;
    border-radius: 20px;
    /* Changed shape */
    background: var(--surface-color);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: rotate(-3deg);
    border: 5px solid rgba(255, 255, 255, 0.1);
}

.author-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display';
    font-size: 4rem;
    color: white;
    background: var(--brand-gradient);
}

.author-text h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

/* Purchase Section */
.purchase {
    padding: 10rem 0 6rem 0;
    margin: 0;
    text-align: center;
    background-color: #fff0f6;
    /* Soft pink bg */
    background-image: none;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
    margin-top: -4rem;
    z-index: 2;
    position: relative;
}

.book-price {
    font-size: 6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--text-color);
    background: none;
    -webkit-text-fill-color: initial;
    margin: 1rem 0;
    letter-spacing: -3px;
    line-height: 1;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 52, 54, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    transform: scale(0.9);
    transition: var(--transition);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: #f1f2f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    transition: 0.3s;
}

.modal-close:hover {
    background: #ff7675;
    color: white;
    transform: rotate(90deg);
}

.form-group input,
.form-group textarea {
    background: #f8f9fa;
    border: 2px solid transparent;
}

.form-group input:focus,
.form-group textarea:focus {
    background: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--brand-primary);
    border-right: 4px solid var(--brand-secondary);
}

/* Stats Strip */
.stats-strip {
    background: var(--brand-gradient);
    padding: 3rem 0;
    color: white;
    margin-top: -3rem;
    /* Overlap hero */
    position: relative;
    z-index: 10;
    border-radius: 20px;
    margin-left: 2rem;
    margin-right: 2rem;
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.3);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-separator {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
}

/* Testimonials */
.testimonials {
    padding: 8rem 0;
    background: transparent;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.stars {
    color: #f1c40f;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.testimonial-card p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.reviewer {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {

    .hero-content,
    .author-content,
    .feature-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
        white-space: normal;
        /* Allow wrapping on mobile */
    }

    .author-image-wrapper {
        border-radius: 20px;
        height: auto;
        /* Allow full height */
        aspect-ratio: 1/1;
        /* Square aspect ratio for a nice portrait look */
    }

    .stats-strip {
        margin: 1rem;
        padding: 2rem 0;
    }

    .stats-grid {
        flex-direction: column;
        gap: 2rem;
    }

    .stat-separator {
        width: 50px;
        height: 1px;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}