/**
 * A24 Components - Restrained & Elegant
 * Subtle interactions, typography-focused
 */

/* ======================
   Hero - Minimal, No Images
   ====================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 30%, rgba(20, 184, 166, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 70%, rgba(107, 124, 147, 0.05) 0%, transparent 50%);
    z-index: 0;
    animation: subtleShift 30s ease-in-out infinite;
}

@keyframes subtleShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: var(--space-8) var(--space-4);
}

.hero-author {
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: var(--space-3);
    letter-spacing: clamp(0.02em, 0.5vw, 0.08em);
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    white-space: nowrap;
    overflow: visible;
}

.hero-genre {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-steel);
    margin-bottom: var(--space-12);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: var(--space-6);
    line-height: 1.2;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

/* ======================
   Latest Chapter - High Value
   ====================== */
.latest-chapter {
    background: var(--color-void-secondary);
    padding: var(--space-16) 0;
    border-top: 1px solid rgba(107, 124, 147, 0.1);
    border-bottom: 1px solid rgba(107, 124, 147, 0.1);
}

.latest-chapter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.latest-chapter-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-steel);
    margin-bottom: var(--space-3);
}

.latest-chapter-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-4);
    font-weight: 600;
}

.latest-chapter-hook {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    font-style: italic;
    line-height: 1.7;
}

.latest-chapter-meta {
    display: flex;
    gap: var(--space-6);
    justify-content: center;
    font-size: 0.875rem;
    color: var(--color-steel);
    margin-bottom: var(--space-8);
}

/* ======================
   Featured Book - Prominent Display
   ====================== */
.featured-book {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-16);
    padding: var(--space-12);
    background: rgba(18, 21, 32, 0.5);
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.featured-book:hover {
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.15);
}

.featured-book-cover {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.featured-book-cover img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-base);
}

.featured-book:hover .featured-book-cover img {
    transform: scale(1.02);
}

.featured-book-content {
    display: flex;
    flex-direction: column;
}

.featured-book-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.featured-book-title a {
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.featured-book-title a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.featured-book-blurb {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    flex-grow: 1;
}

.featured-book-meta {
    display: flex;
    gap: var(--space-4);
    font-size: 0.875rem;
    color: var(--color-steel);
    margin-bottom: var(--space-6);
}

/* If no cover image, make it single column */
.featured-book:not(:has(.featured-book-cover)) {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ======================
   Book Grid - Text-Focused
   ====================== */
.books-section {
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-steel);
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-4);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-8);
    max-width: 900px;
    margin: 0 auto;
}

.book-card {
    background: rgba(18, 21, 32, 0.5);
    border: 1px solid rgba(107, 124, 147, 0.1);
    border-radius: var(--radius-sm);
    padding: var(--space-8);
    transition: all var(--transition-base);
    cursor: pointer;
}

.book-card:hover {
    border-color: rgba(20, 184, 166, 0.3);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.1);
    transform: translateY(-2px);
}

.book-card-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-3);
    font-weight: 600;
}

.book-card-title a {
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.book-card-title a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.book-card-premise {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: var(--space-6);
}

.book-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(107, 124, 147, 0.1);
}

.book-status {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.book-status.status-published {
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-accent);
}

.book-status.status-serial {
    background: rgba(107, 124, 147, 0.1);
    color: var(--color-steel);
}

.book-status.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.book-chapter-count {
    font-size: 0.875rem;
    color: var(--color-steel);
}

/* ======================
   About Section - Minimal
   ====================== */
.about-section {
    padding: var(--space-16) 0;
    background: var(--color-void-secondary);
    border-top: 1px solid rgba(107, 124, 147, 0.1);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

/* ======================
   Newsletter - High Contrast
   ====================== */
.newsletter-section {
    padding: var(--space-16) 0;
    background: var(--color-accent);
    color: white;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-4);
    color: white;
}

.newsletter-description {
    font-size: 1.125rem;
    margin-bottom: var(--space-8);
    color: rgba(255, 255, 255, 0.9);
}

.newsletter-form {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.newsletter-input {
    flex: 1;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--color-void);
}

.newsletter-input::placeholder {
    color: rgba(11, 13, 16, 0.5);
}

.newsletter-submit {
    padding: var(--space-4) var(--space-8);
    background: var(--color-void);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.newsletter-submit:hover {
    background: var(--color-void-secondary);
    transform: translateY(-1px);
}

.newsletter-trust {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ======================
   Book Detail Page
   ====================== */
.book-header {
    padding: var(--space-12) 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.book-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-4);
}

.book-genre-badge {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-steel);
    margin-bottom: var(--space-6);
}

.book-blurb {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

.book-stats {
    display: flex;
    gap: var(--space-8);
    justify-content: center;
    padding: var(--space-6);
    border-top: 1px solid rgba(107, 124, 147, 0.1);
    border-bottom: 1px solid rgba(107, 124, 147, 0.1);
    margin-bottom: var(--space-8);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-steel);
}

/* ======================
   Chapter List - Clean
   ====================== */
.chapters-section {
    padding: var(--space-12) 0;
    max-width: 800px;
    margin: 0 auto;
}

.chapters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
}

.chapters-list {
    list-style: none;
    display: grid;
    gap: var(--space-3);
}

.chapter-item {
    background: rgba(18, 21, 32, 0.3);
    border-left: 2px solid var(--color-accent);
    transition: all var(--transition-fast);
}

.chapter-item:hover {
    background: rgba(18, 21, 32, 0.6);
    border-left-width: 4px;
}

.chapter-item a {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-4) var(--space-6);
    color: var(--color-text);
}

.chapter-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-accent);
    min-width: 50px;
}

.chapter-title-text {
    flex: 1;
    font-weight: 500;
}

.chapter-meta {
    font-size: 0.875rem;
    color: var(--color-steel);
}

.chapter-locked {
    opacity: 0.5;
    border-left-color: var(--color-steel);
}

.chapter-locked .chapter-number {
    color: var(--color-steel);
}

.chapter-locked::after {
    content: '🔒';
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

/* ======================
   Chapter Reader
   ====================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    z-index: 10000;
    transition: width 0.1s linear;
}

.reader-controls {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: rgba(18, 21, 32, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(107, 124, 147, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    display: flex;
    gap: var(--space-3);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.reader-control-btn {
    background: transparent;
    border: 1px solid rgba(107, 124, 147, 0.3);
    color: var(--color-text);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.reader-control-btn:hover {
    border-color: var(--color-accent);
    background: rgba(20, 184, 166, 0.1);
}

.reader-control-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.chapter-reader {
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-12) 0;
}

.chapter-header {
    text-align: center;
    margin-bottom: var(--space-12);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid rgba(107, 124, 147, 0.1);
}

.chapter-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-steel);
    margin-bottom: var(--space-3);
}

.chapter-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-4);
}

.chapter-info {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--color-steel);
}

.chapter-content {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--color-text-muted);
    margin-bottom: var(--space-16);
}

.chapter-content p {
    margin-bottom: var(--space-8);
    color: var(--color-text-muted);
}

.chapter-content p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 600;
    float: left;
    line-height: 1;
    margin: 0.1em 0.15em 0 0;
    color: var(--color-accent);
    font-family: var(--font-display);
}

.chapter-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-4);
    padding-top: var(--space-8);
    border-top: 1px solid rgba(107, 124, 147, 0.1);
}

/* ======================
   Buttons - Restrained
   ====================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
    opacity: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(107, 124, 147, 0.3);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    background: rgba(20, 184, 166, 0.1);
    opacity: 1;
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

/* ======================
   Forms - Clean
   ====================== */
.form-container {
    max-width: 500px;
    margin: var(--space-16) auto;
    padding: var(--space-12);
    background: rgba(18, 21, 32, 0.5);
    border: 1px solid rgba(107, 124, 147, 0.1);
    border-radius: var(--radius-md);
}

.form-container h1 {
    text-align: center;
    margin-bottom: var(--space-8);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-4);
    background: var(--color-void);
    border: 1px solid rgba(107, 124, 147, 0.2);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-button {
    width: 100%;
    padding: var(--space-4);
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.form-link {
    text-align: center;
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(107, 124, 147, 0.1);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ======================
   Empty States
   ====================== */
.empty-state {
    text-align: center;
    padding: var(--space-24) var(--space-8);
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-6);
    opacity: 0.2;
}

.empty-state-title {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

/* ======================
   Breadcrumbs
   ====================== */
.breadcrumbs {
    margin-bottom: var(--space-8);
    padding: var(--space-4) 0;
}

.breadcrumbs ol {
    display: flex;
    list-style: none;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '→';
    margin-left: var(--space-2);
    color: var(--color-steel);
}

.breadcrumbs a {
    color: var(--color-steel);
}

.breadcrumbs a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.breadcrumbs span {
    color: var(--color-text);
}

/* ======================
   Status Badge
   ====================== */
.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.status-badge.locked {
    background: rgba(107, 124, 147, 0.1);
    color: var(--color-steel);
}

/* ======================
   Responsive
   ====================== */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
    }

    .featured-book {
        grid-template-columns: 1fr;
        padding: var(--space-6);
        gap: var(--space-6);
    }

    .featured-book-cover {
        max-width: 250px;
        margin: 0 auto;
    }

    .featured-book-content {
        text-align: center;
    }

    .featured-book-meta {
        justify-content: center;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .chapter-navigation {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .reader-controls {
        bottom: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
        justify-content: center;
    }

    .chapter-content {
        font-size: 1rem;
    }

    .book-stats {
        flex-direction: column;
        gap: var(--space-4);
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: var(--space-6) var(--space-3);
    }

    .hero-author {
        font-size: clamp(1.75rem, 10vw, 3rem);
        letter-spacing: 0.02em;
        line-height: 1.1;
        white-space: normal;
    }

    .hero-genre {
        letter-spacing: 0.1em;
        white-space: normal;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .form-container {
        padding: var(--space-6);
    }
}
