/* Google Fonts: Inter & Playfair Display */
:root {
    --primary-color: #2B4553; /* Deep teal/slate from the book cover text */
    --secondary-color: #D4AF37; /* Gold accent from '50' */
    --accent-color: #EFE8DF; /* Soft cream background from the cover */
    --text-dark: #1A1A1A;
    --text-light: #555555;
    --bg-white: #FFFFFF;
    --bg-offwhite: #F8F9FA;
    --border-color: #E2E8F0;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: #1a2a33;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.btn-outline-light {
    border-color: var(--bg-white);
    color: var(--bg-white);
    background: transparent;
}

.btn-outline-light:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-word {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
}

.logo-dot {
    color: var(--secondary-color);
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-light);
    position: relative;
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--bg-white);
    z-index: 999;
    padding: 6rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
}

.mobile-menu.open {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-dark);
}

.mobile-btn {
    margin-top: 1rem;
    text-align: center;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 10rem 0 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-offwhite) 0%, var(--accent-color) 100%);
    overflow: hidden;
}

.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 0;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background-color: rgba(212, 175, 55, 0.2); /* Goldish */
    top: -100px;
    right: -100px;
    animation: float 8s infinite alternate ease-in-out;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background-color: rgba(43, 69, 83, 0.1); /* Primary color */
    bottom: -150px;
    left: -150px;
    animation: float 12s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(212, 175, 55, 0.15);
    color: #9e8122;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    color: var(--secondary-color);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.3;
}

.stat-divider {
    width: 2px;
    height: 40px;
    background-color: var(--border-color);
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

/* Soft brand-colored halo so the white cover stands out */
.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 35% 30%,
        rgba(212, 175, 55, 0.30) 0%,
        rgba(43, 69, 83, 0.14) 55%,
        transparent 74%);
    z-index: 0;
}

.book-showcase {
    position: relative;
    transform-style: preserve-3d;
    animation: floating-book 6s ease-in-out infinite;
}

@keyframes floating-book {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.book-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 6px;
    box-shadow: 15px 25px 40px rgba(0,0,0,0.28);
    position: relative;
    z-index: 2;
}

/* Style for when image is missing/placeholder */
.placeholder-img {
    filter: sepia(0.3) hue-rotate(180deg);
}

.book-shadow {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) rotateY(-15deg);
    width: 80%;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 70%);
    filter: blur(5px);
    z-index: 1;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-offwhite);
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: var(--bg-white);
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* About Book Section */
.about-book {
    padding: 6rem 0;
    background-color: var(--bg-offwhite);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 560px;
}

/* Rounded gradient panel behind the mockup to fill the column */
.about-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 440px;
    height: 520px;
    transform: translate(-50%, -50%) rotate(-4deg);
    background: linear-gradient(150deg, var(--primary-color) 0%, #1c2f38 100%);
    border-radius: 24px;
    z-index: 0;
}

/* Small gold accent square, top-right of the panel */
.about-image::after {
    content: '';
    position: absolute;
    top: 6%;
    right: 8%;
    width: 70px;
    height: 70px;
    border: 3px solid var(--secondary-color);
    border-radius: 12px;
    z-index: 0;
}

.book-mockup {
    position: relative;
    width: auto;
    max-width: 100%;
    max-height: 480px;
    display: block;
    margin: 0 auto;
    z-index: 1;
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.45);
    border-radius: 8px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.learning-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.learning-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.learning-list i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 2px;
}

.learning-list strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.learning-list p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Author Section */
.author {
    padding: 6rem 0;
    background-color: var(--bg-white);
}

.author-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.author-name {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.author-credentials {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.author-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.role-tag {
    padding: 0.4rem 1rem;
    background-color: var(--bg-offwhite);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
}

.author-bio {
    color: var(--text-light);
    font-size: 1.05rem;
}

.author-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.author-image-bg {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 16px;
    z-index: 1;
}

.author-image {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 16px;
    z-index: 2;
    box-shadow: var(--shadow-lg);
    display: block;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background-color: var(--primary-color);
    color: var(--bg-white);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-section h2 {
    color: var(--bg-white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Enquiry / pre-order form (on dark CTA panel) */
.enquiry-form {
    max-width: 560px;
    margin: 2rem auto 0;
    text-align: left;
}

.enquiry-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.enquiry-form .field {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.enquiry-form .form-row + .field { margin-bottom: 1rem; }

.enquiry-form input,
.enquiry-form select,
.enquiry-form textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--bg-white);
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    transition: var(--transition);
}

.enquiry-form textarea { resize: vertical; }

.enquiry-form input::placeholder,
.enquiry-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.enquiry-form select { color: rgba(255, 255, 255, 0.6); }
.enquiry-form select:valid { color: var(--bg-white); }
.enquiry-form select option { color: var(--text-dark); }

.enquiry-form input:focus,
.enquiry-form select:focus,
.enquiry-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.14);
}

.enquiry-form input[aria-invalid="true"],
.enquiry-form textarea[aria-invalid="true"] {
    border-color: #ff9a8a;
}

.enquiry-form .form-submit {
    width: 100%;
    margin-top: 0.5rem;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
    border: none;
}

.enquiry-form .form-submit:hover { filter: brightness(1.06); }
.enquiry-form .form-submit:disabled { opacity: 0.6; cursor: default; }

.field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #ffb4a8;
}

/* Honeypot: hidden from real users */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Success / form-level error banners (empty until Formspree fills them) */
.form-status {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    font-size: 1rem;
    border-radius: 10px;
}
.form-status:not(:empty) { padding: 0.9rem 1.2rem; margin-bottom: 1rem; }
.form-status.success:not(:empty) {
    background-color: rgba(168, 230, 176, 0.15);
    color: #cdeecd;
    border: 1px solid rgba(168, 230, 176, 0.4);
}
.form-status.error:not(:empty) {
    background-color: rgba(255, 154, 138, 0.15);
    color: #ffcfc7;
    border: 1px solid rgba(255, 154, 138, 0.4);
}

@media (max-width: 600px) {
    .enquiry-form .form-row { flex-direction: column; gap: 1rem; }
}

/* Enquiry / pre-order form (on dark CTA panel) */
.enquiry-form {
    max-width: 560px;
    margin: 2.5rem auto 0;
    text-align: left;
}

.enquiry-form .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.enquiry-form input,
.enquiry-form select,
.enquiry-form textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--bg-white);
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    transition: var(--transition);
}

.enquiry-form textarea {
    margin-bottom: 1.25rem;
    resize: vertical;
}

.enquiry-form input::placeholder,
.enquiry-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.enquiry-form select { color: rgba(255, 255, 255, 0.6); }
.enquiry-form select:valid { color: var(--bg-white); }
.enquiry-form select option { color: var(--text-dark); }

.enquiry-form input:focus,
.enquiry-form select:focus,
.enquiry-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.14);
}

.enquiry-form .form-submit {
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
    border: none;
}

.enquiry-form .form-submit:hover { filter: brightness(1.06); }
.enquiry-form .form-submit:disabled { opacity: 0.6; cursor: default; }

/* Honeypot: hidden from real users */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    min-height: 1.2em;
}
.form-status.success { color: #a8e6b0; }
.form-status.error { color: #ffb4a8; }

@media (max-width: 600px) {
    .enquiry-form .form-row { flex-direction: column; gap: 1rem; }
}

/* Footer */
.footer {
    background-color: #1a2a33;
    color: #a0aec0;
    padding: 5rem 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.logo-img {
    height: 34px;
    width: auto;
    display: block;
}

.footer-logo-img {
    height: 40px;
}

.footer-desc {
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--bg-white);
    transform: translateY(-3px);
}

.footer-links h4, .footer-contact h4 {
    color: var(--bg-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.footer-links a {
    display: block;
    margin-bottom: 0.8rem;
}

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

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.footer-contact i {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.footer-bottom {
    background-color: #111d24;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-container, .about-container, .author-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        margin: 0 auto;
    }
    
    .hero-buttons, .hero-stats {
        justify-content: center;
    }
    
    .learning-list li {
        text-align: left;
    }
    
    .author-roles {
        justify-content: center;
    }
    
    .author-container .author-content {
        order: 2;
    }
    
    .author-container .author-image-wrapper {
        order: 1;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .cta-actions {
        flex-direction: column;
    }
}

@media (max-width: 500px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}
