/* Crescent Cities Publishing - Main Styles */

:root {
    --bg-color: #080808;
    --text-color: #f5f5f5;
    --accent-color: #f5f5f5;
    /* Using white as primary accent per "Guided" cover style */
    --secondary-bg: #111111;
    --font-heading: 'Didot', 'Bodoni MT', 'Times New Roman', serif;
    --font-body: 'Helvetica Neue', 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    --spacing-unit: 2rem;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    font-weight: 300;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* Typography Utilities */
.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.serif {
    font-family: var(--font-heading);
}

/* Layout */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

header {
    padding: var(--spacing-unit) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.8;
}

/* Homepage — Series Hero */
.series-hero {
    padding: 8rem 0 3rem;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

.series-hero h1 {
    font-size: 3.5rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.75rem;
}

.series-hero .subtitle {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    opacity: 0.5;
    letter-spacing: 0.12em;
    font-style: italic;
}

/* Homepage — Books Showcase (Fanned Covers) */
.books-showcase {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    padding: 2rem 0 4rem;
    position: relative;
}

.showcase-book {
    position: relative;
    width: 240px;
    text-align: center;
    transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    animation: fadeInUp 1.4s ease-out forwards;
}

.showcase-book:nth-child(1) {
    animation-delay: 0.15s;
    transform: rotate(-6deg) translateY(10px);
    z-index: 1;
    margin-right: -30px;
}

.showcase-book:nth-child(2) {
    animation-delay: 0.35s;
    transform: translateY(-10px);
    z-index: 3;
}

.showcase-book:nth-child(3) {
    animation-delay: 0.55s;
    transform: rotate(6deg) translateY(10px);
    z-index: 1;
    margin-left: -30px;
}

.showcase-book:hover {
    z-index: 10;
}

.showcase-book:nth-child(1):hover {
    transform: rotate(-6deg) translateY(-4px);
}

.showcase-book:nth-child(2):hover {
    transform: translateY(-20px);
}

.showcase-book:nth-child(3):hover {
    transform: rotate(6deg) translateY(-4px);
}

.showcase-cover {
    display: block;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transition: box-shadow 0.7s ease;
}

.showcase-book:hover .showcase-cover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 255, 255, 0.03);
}

.showcase-label {
    margin-top: 1.2rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.showcase-book:hover .showcase-label {
    opacity: 1;
}

.showcase-label h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.showcase-label span {
    font-size: 0.75rem;
    opacity: 0.5;
    letter-spacing: 0.08em;
}

/* Homepage — Tagline */
.tagline-section {
    text-align: center;
    padding: 1rem 0 2rem;
    animation: fadeIn 1.5s ease-out;
}

.tagline-section blockquote {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-style: italic;
    opacity: 0.4;
    letter-spacing: 0.04em;
    max-width: 500px;
    margin: 0 auto;
}

/* Homepage — CTA */
.home-cta {
    text-align: center;
    padding: 2rem 0 6rem;
    animation: fadeIn 1.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--text-color);
    background: transparent;
    color: var(--text-color);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #030406;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-top {
    padding: 6rem 1rem 4rem;
    text-align: center;
}

.footer-newsletter {
    max-width: 600px;
    margin: 0 auto;
}

.footer-heading {
    font-family: 'Didot', 'Times New Roman', serif;
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.footer-text {
    color: #a0aab5;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.footer-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-input {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.footer-input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.footer-btn {
    padding: 1rem 2.5rem;
    white-space: nowrap;
}

.footer-bottom {
    padding: 2rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #010203;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    color: #707b86;
    font-size: 0.85rem;
}

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

.footer-links a {
    color: #707b86;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .footer-bottom-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Page Headers */
.page-header {
    padding: 8rem 0 4rem;
    animation: fadeIn 1s ease-out;
}

.page-header h1 {
    font-size: 3.5rem;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.page-header p {
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    opacity: 0.6;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Book Details */
.book-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 6rem 0;
    align-items: start;
}

.book-cover-large {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    /* Center in its column */
    justify-self: center;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 4rem;
    padding-bottom: 8rem;
    animation: fadeIn 1.2s ease-out;
}

.book-card {
    text-align: center;
    transition: transform 0.4s ease;
}

.book-card:hover {
    transform: translateY(-10px);
}

.book-cover-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}

/* Subtle glow effect for placeholders */
.book-cover-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 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.book-card:hover .book-cover-placeholder::after {
    opacity: 1;
}

.book-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 400;
}

.book-card p {
    opacity: 0.6;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.btn-text {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 4px;
    opacity: 0.8;
}

.btn-text:hover {
    border-bottom-color: var(--text-color);
    opacity: 1;
}

/* Form Styles */
input,
textarea {
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--text-color) !important;
}

/* Active State */
nav a.active {
    opacity: 1;
    border-bottom: 1px solid white;
}


.powered-by {
    display: none;
}

.poweredby {
    display: none;
}

/* Reading Page */
.reading-page {
    max-width: 100%;
    padding: 0;
}

.reading-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
}

.chapter-header {
    text-align: center;
    padding: 5rem 0 3rem;
    animation: fadeIn 1s ease;
}

.chapter-header h1 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.chapter-header h2 {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.chapter-text {
    font-size: 1.125rem;
    line-height: 1.85;
    color: rgba(245, 245, 245, 0.88);
    padding-bottom: 2rem;
}

.chapter-text p {
    margin-bottom: 1.4rem;
    text-indent: 0;
}

.chapter-text em {
    font-style: italic;
}

.chapter-text strong {
    font-weight: 600;
    letter-spacing: 0.04em;
}

.scene-break {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 3rem auto;
}

.scene-break-large {
    width: 80px;
    margin: 4rem auto;
}

.time-jump {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.6;
    padding: 1rem 0;
}

.chapter-cta {
    text-align: center;
    padding: 1.5rem 0;
}

.chapter-cta-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 2rem;
}

.chapter-cta-top p {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    opacity: 0.5;
    text-transform: uppercase;
}

.chapter-cta-top a {
    opacity: 0.7;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1px;
    transition: opacity 0.3s ease;
}

.chapter-cta-top a:hover {
    opacity: 1;
}

.chapter-cta-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4rem 0 5rem;
    animation: fadeIn 0.8s ease;
}

.cta-hook {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    margin-bottom: 0.8rem;
}

.cta-sub {
    font-size: 1rem;
    opacity: 0.6;
    margin-bottom: 2.5rem;
    letter-spacing: 0.03em;
}

.chapter-cta-bottom .btn {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    transition: all 0.4s ease;
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
}

.chapter-cta-bottom .btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .book-detail,
    .content-wrapper,
    .books-grid {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }

    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    .series-hero {
        padding: 4rem 0 2rem;
    }

    .series-hero h1 {
        font-size: 2.2rem;
        letter-spacing: 0.12em;
    }

    .books-showcase {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        padding: 2rem 0 3rem;
    }

    .showcase-book {
        width: 200px;
    }

    .showcase-book:nth-child(1),
    .showcase-book:nth-child(2),
    .showcase-book:nth-child(3) {
        transform: none;
        margin: 0;
    }

    .showcase-book:nth-child(1):hover,
    .showcase-book:nth-child(2):hover,
    .showcase-book:nth-child(3):hover {
        transform: translateY(-8px);
    }

    .showcase-label {
        opacity: 1;
    }

    .author-image-placeholder,
    .book-cover-large {
        margin: 0 auto;
    }

    .book-info {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .book-info h1 {
        font-size: 2.5rem !important;
    }

    .book-detail {
        overflow: hidden;
        max-width: 100%;
    }

    .reading-container {
        padding: 0 1.25rem;
    }

    .chapter-header {
        padding: 3rem 0 2rem;
    }

    .chapter-header h1 {
        font-size: 1.4rem;
    }

    .chapter-header h2 {
        font-size: 1.8rem;
    }

    .chapter-text {
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .cta-hook {
        font-size: 1.4rem;
    }

    .chapter-cta-bottom {
        padding: 3rem 0 4rem;
    }
}

/* Form Enhancements */
input[type=checkbox] {
    margin-right: 0.5rem;
}

.error {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.success {
    color: #51cf66;
    margin-bottom: 1rem;
}

.required {
    color: #ff6b6b;
    font-size: 0.8rem;
}

/* ─── Signup Page (The Inner Circle) ─── */

.signup-page-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
    /* Account for header and footer to keep centered */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.signup-intro {
    padding: 2rem 0 3rem;
}

.signup-intro h1 {
    font-size: 3rem;
    letter-spacing: 0.25em;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.signup-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(245, 245, 245, 0.7);
    max-width: 560px;
    margin: 0 auto;
    font-family: var(--font-body);
    font-weight: 300;
    letter-spacing: 0.03em;
}

/* Adjust newsletter form overrides for signup page context */
.signup-page-container #newsletter {
    animation: fadeIn 1.2s ease-out;
}

.signup-page-container .newsletter-form-container {
    margin-top: 1rem !important;
}

@media (max-width: 768px) {
    .signup-intro h1 {
        font-size: 2rem;
        letter-spacing: 0.15em;
    }

    .signup-intro p {
        font-size: 1rem;
    }
}

/* =========================================================================
   Shop & Collections Layout
   ========================================================================= */

.shop-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
    text-align: center;
}

.shop-hero {
    margin-bottom: 5rem;
    animation: fadeIn 1s ease-out;
}

.shop-title {
    font-size: 3rem;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    font-weight: normal;
    text-transform: uppercase;
}

.shop-intro {
    font-size: 1.2rem;
    color: #a0aab5;
    font-weight: 300;
}

/* Premium Product Card (Trilogy Set) */
.product-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.premium-product {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 18, 24, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 3rem;
    margin-bottom: 4rem;
    text-align: left;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUpFade 1.2s ease-out;
}

.product-image-wrapper {
    flex: 1;
    position: relative;
    padding-right: 3rem;
}

.product-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    transition: transform 0.4s ease;
}

.product-image:hover {
    transform: translateY(-5px);
}

.exclusive-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #d4af37;
    color: #080808;
    padding: 0.4rem 0.8rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    font-weight: bold;
    border-radius: 2px;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.product-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #c0c8d0;
    margin-bottom: 2rem;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 300;
    color: #ffffff;
    font-family: 'Didot', 'Times New Roman', serif;
}

.shipping-note {
    font-size: 0.85rem;
    color: #8c96a0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid #2a3441;
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
}

.buy-now-btn {
    display: inline-block;
    background: #ffffff;
    color: #000000;
    padding: 1rem 3rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: 2px;
    transition: all 0.3s ease;
    border: 1px solid #ffffff;
    text-decoration: none;
    margin-bottom: 1rem;
}

.buy-now-btn:hover {
    background: transparent;
    color: #ffffff;
}

.returns-policy {
    color: #707b86;
    font-style: italic;
    font-size: 0.9rem;
}

/* Divider */
.shop-divider {
    position: relative;
    width: 100%;
    margin: 3rem 0;
    text-align: center;
}

.shop-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.shop-divider span {
    background: var(--bg-color, #080808);
    padding: 0 1.5rem;
    color: #8c96a0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    position: relative;
    z-index: 1;
}

/* Individual Books Grid */
.individual-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1000px;
    animation: fadeIn 1.5s ease-out;
}

.minor-product-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.minor-product-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
}

.minor-product-image {
    width: 100%;
    max-width: 160px;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
}

.minor-product-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    font-weight: normal;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* Animations included implicitly since slideUpFade and fadeIn might be in older css.
   If slideUpFade doesn't exist, we add it. */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .premium-product {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .product-image-wrapper {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .exclusive-badge {
        left: 50%;
        transform: translateX(-50%);
        top: -10px;
    }

    .product-meta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .shop-title {
        font-size: 2.2rem;
    }

    .product-name {
        font-size: 1.8rem;
    }

    .shop-page-container {
        padding: 4rem 1rem;
    }
}