@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

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

:root {
    --havok: #FF33FF;
    --havok-dim: #dd00dd;
    --havok-glow: rgba(255, 0, 255, 0.25);
    --dark: #0a0a0c;
    --dark-mid: #111114;
    --dark-light: #1a1a1f;
    --grey: #b8b8b8;
    --light: #eeebe4;
    --white: #faf8f4;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.75;
    font-size: 22px;
    font-weight: 500;
    overflow-x: hidden;
}

/* --- Tarahn Silhouette Background --- */
.bg-taran {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    background-image: url('assets/taran.png');
    background-size: 50%;
    background-position: center top;
    background-repeat: no-repeat;
    opacity: 0.22;
    filter: brightness(0.65) contrast(1.2) saturate(0);
}

.bg-veil {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, var(--dark) 85%),
        radial-gradient(ellipse at 20% 0%, rgba(255,0,255,0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(255,0,255,0.02) 0%, transparent 50%);
}

.border-glow-left, .border-glow-right {
    position: fixed; top: 0; width: 2px; height: 100%;
    pointer-events: none; z-index: 2;
}
.border-glow-left {
    left: 0;
    background: linear-gradient(180deg, transparent 5%, rgba(255,0,255,0.12) 30%, rgba(255,0,255,0.06) 70%, transparent 95%);
    box-shadow: 0 0 15px 3px rgba(255,0,255,0.04);
}
.border-glow-right {
    right: 0;
    background: linear-gradient(180deg, transparent 5%, rgba(255,0,255,0.12) 30%, rgba(255,0,255,0.06) 70%, transparent 95%);
    box-shadow: 0 0 15px 3px rgba(255,0,255,0.04);
}

/* --- Side Portraits (EXPERIMENT) --- */
.side-portrait {
    position: fixed; top: 0; width: 320px; height: 100%;
    pointer-events: none; z-index: 1;
    background-image: url('assets/taran.png');
    background-size: auto 100%;
    background-repeat: no-repeat;
    filter: saturate(0) contrast(1.1);
}
.side-portrait-left {
    left: 0; background-position: center top;
    mask-image: linear-gradient(to right, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 50%, transparent 100%);
}
.side-portrait-right {
    right: 0;
    background-image: url('assets/covers-montage.png');
    background-size: cover; background-position: left top;
    mask-image: linear-gradient(to left, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 50%, transparent 100%);
}
@media (max-width: 1200px) { .side-portrait { width: 220px; } }
@media (max-width: 900px) { .side-portrait { display: none; } }

/* --- Fixed Logo --- */
.logo-fixed {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 200; pointer-events: none;
    text-align: center;
    padding: 8px 20px 0;
    background: linear-gradient(to bottom, var(--dark) 40%, rgba(10,10,12,0.8) 70%, transparent 100%);
    padding-bottom: 25px;
}
.logo-fixed .logo-container { pointer-events: auto; }
.logo-container { max-width: 450px; margin: 0 auto; }
.logo-container img { width: 100%; height: auto; opacity: 0.92; transition: opacity 0.3s ease; }
.logo-container img:hover { opacity: 1; }
.logo-container a { display: block; }

/* --- Header --- */
header {
    position: relative; z-index: 1;
    text-align: center;
    padding: 620px 20px 60px;
    border-bottom: 1px solid rgba(255,0,255,0.1);
}
.tagline {
    font-family: 'Cinzel', serif;
    font-size: 2rem; letter-spacing: 0.35em;
    text-transform: uppercase; color: var(--havok);
    font-weight: 700;
    text-shadow: 0 0 12px var(--havok-glow), 0 0 25px rgba(255,0,255,0.08);
    margin-bottom: 30px;
}
.hero-text {
    max-width: 680px; margin: 0 auto;
    font-size: 1.45rem; font-style: italic;
    color: var(--grey); line-height: 1.8;
}
.hero-hook {
    font-family: 'Cinzel', serif;
    font-size: 1.55rem; font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--white);
    text-shadow: 0 0 20px var(--havok-glow), 0 0 40px rgba(255,0,255,0.06);
    margin-top: 80px;
}

/* --- Navigation --- */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,12,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,0,255,0.08);
    padding: 15px 0; text-align: center;
}
nav a {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem; letter-spacing: 0.25em;
    text-transform: uppercase; color: var(--grey);
    text-decoration: none; margin: 0 20px;
    transition: color 0.3s ease;
}
nav a:hover { color: var(--havok); }

/* --- Sections --- */
section {
    position: relative; z-index: 1;
    max-width: 650px; margin: 0 auto;
    padding: 80px 30px;
}
.section-title {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem; letter-spacing: 0.4em;
    text-transform: uppercase; color: var(--havok);
    font-weight: 700;
    text-shadow: 0 0 10px var(--havok-glow), 0 0 20px rgba(255,0,255,0.06);
    margin-bottom: 40px; padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,0,255,0.15);
}
h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem; font-weight: 600;
    color: var(--white); margin-bottom: 25px; line-height: 1.3;
}
p { margin-bottom: 20px; color: var(--light); }
.muted { color: var(--grey); }

/* --- Dividers --- */
.divider {
    text-align: center; padding: 40px 0;
    color: rgba(255,0,255,0.3);
    font-size: 1.5rem; letter-spacing: 0.5em;
}

/* --- Book Card (featured) --- */
.book-card {
    background: var(--dark-mid);
    border: 1px solid rgba(255,0,255,0.08);
    border-radius: 4px;
    padding: 50px 40px; margin: 30px 0;
    position: relative; overflow: hidden;
}
.book-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; width: 3px; height: 100%;
    background: linear-gradient(180deg, var(--havok), transparent);
}
.book-card .book-number {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem; letter-spacing: 0.4em;
    text-transform: uppercase; color: var(--havok-dim);
    font-weight: 600;
    margin-bottom: 15px;
}
.book-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem; font-weight: 600;
    color: var(--white); margin-bottom: 20px;
}
.book-card h3 a { color: var(--white); text-decoration: none; transition: color 0.3s; }
.book-card h3 a:hover { color: var(--havok); }
.book-card p { font-size: 1.2rem; line-height: 1.8; }

/* --- Pull Quotes --- */
blockquote {
    border-left: 2px solid var(--havok);
    padding: 5px 25px; margin: 35px 0;
    font-style: italic; color: var(--grey);
    font-size: 1.35rem;
}

/* --- Book Grid (scalable) --- */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.books-grid-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.books-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255,0,255,0.15);
}
.books-grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s ease;
}
.books-grid-item:hover img {
    filter: brightness(1.1);
}
.books-grid-item .grid-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 30px 12px 12px;
    background: linear-gradient(transparent, rgba(10,10,12,0.95));
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--white);
    text-align: center;
}
.books-grid-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* --- Themes Grid --- */
.themes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px; margin-top: 30px;
}
.theme-item {
    padding: 25px;
    background: var(--dark-mid);
    border: 1px solid rgba(255,0,255,0.05);
    border-radius: 3px;
}
.theme-item h4 {
    font-family: 'Cinzel', serif;
    font-size: 1rem; color: var(--havok);
    font-weight: 700;
    text-shadow: 0 0 8px var(--havok-glow);
    margin-bottom: 10px; letter-spacing: 0.1em;
}
.theme-item p {
    font-size: 1.1rem; margin-bottom: 0;
    color: var(--grey); line-height: 1.6;
}

/* --- Author --- */
.author-section { text-align: center; }
.author-name {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem; font-weight: 600;
    color: var(--white); margin-bottom: 25px;
}
.author-section p { max-width: 650px; margin-left: auto; margin-right: auto; font-size: 1.15rem; }

/* --- CTA --- */
.cta-section {
    text-align: center; padding: 80px 30px;
    background: var(--dark-mid);
    border-top: 1px solid rgba(255,0,255,0.08);
    border-bottom: 1px solid rgba(255,0,255,0.08);
}
.cta-section h2 { font-size: 1.8rem; margin-bottom: 15px; }
.cta-section p { color: var(--grey); max-width: 500px; margin: 0 auto 30px; }
.cta-form {
    display: flex; justify-content: center;
    gap: 10px; max-width: 450px; margin: 0 auto;
}
.cta-form input[type="email"] {
    flex: 1; padding: 12px 18px;
    background: var(--dark);
    border: 1px solid rgba(255,0,255,0.15);
    border-radius: 3px; color: var(--light);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem; outline: none;
    transition: border-color 0.3s ease;
}
.cta-form input[type="email"]:focus { border-color: var(--havok); }
.cta-form input[type="email"]::placeholder { color: #555; }
.cta-form button {
    padding: 12px 25px; background: transparent;
    border: 1px solid var(--havok); color: var(--havok);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem; letter-spacing: 0.2em;
    text-transform: uppercase; cursor: pointer;
    border-radius: 3px; transition: all 0.3s ease;
}
.cta-form button:hover { background: var(--havok); color: var(--dark); }

/* --- Subscribe Success --- */
.signup-success {
    padding: 28px 24px;
    border: 1px solid rgba(255,0,255,0.2);
    border-radius: 3px;
    background: rgba(255,0,255,0.04);
    max-width: 450px;
    margin: 0 auto;
    animation: successFade 0.6s ease forwards;
}
.signup-success-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--havok);
    text-shadow: 0 0 15px var(--havok-glow), 0 0 30px rgba(255,0,255,0.1);
    margin-bottom: 12px;
}
.signup-success-sub {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--light);
    margin-bottom: 6px;
}
.signup-success-note {
    font-size: 0.95rem;
    color: var(--grey);
    margin-bottom: 0;
}
@keyframes successFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Excerpt --- */
.excerpt {
    background: rgba(20,20,24,0.5);
    border: 1px solid rgba(255,0,255,0.05);
    border-radius: 4px;
    padding: 45px 40px; margin: 30px 0;
    font-size: 1.2rem; line-height: 1.9;
}
.excerpt p { color: var(--light); }
.excerpt p:last-child { margin-bottom: 0; }
.excerpt-label {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem; letter-spacing: 0.4em;
    text-transform: uppercase; color: var(--havok-dim);
    font-weight: 600;
    margin-bottom: 25px;
}

/* --- Footer --- */
footer {
    position: relative; z-index: 1;
    text-align: center; padding: 50px 20px;
    font-size: 1rem; color: #444;
}
footer .footer-logo { width: 150px; opacity: 0.3; margin-bottom: 20px; }

/* --- Book Detail Page --- */
.book-hero {
    display: flex; gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}
.book-hero-cover { flex: 0 0 280px; }
.book-hero-cover img {
    width: 100%; border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}
.book-hero-info { flex: 1; }
.book-hero-info h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem; font-weight: 600;
    color: var(--white); margin-bottom: 10px; line-height: 1.2;
}
.book-hero-info .book-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem; letter-spacing: 0.3em;
    text-transform: uppercase; color: var(--havok-dim);
    font-weight: 600;
    margin-bottom: 20px;
}
.book-hero-info .book-tagline {
    font-size: 1.3rem; font-style: italic;
    color: var(--grey); margin-bottom: 25px; line-height: 1.6;
}
.book-meta {
    display: grid; grid-template-columns: auto 1fr;
    gap: 8px 20px; font-size: 1rem;
}
.book-meta dt {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--havok-dim);
    font-weight: 600;
    padding-top: 3px;
}
.book-meta dd { color: var(--light); margin: 0; }

.detail-section { margin-top: 50px; }
.detail-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem; letter-spacing: 0.3em;
    text-transform: uppercase; color: var(--havok);
    font-weight: 700;
    text-shadow: 0 0 10px var(--havok-glow);
    margin-bottom: 20px; padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,0,255,0.1);
}
.detail-section p { font-size: 1.1rem; line-height: 1.8; }

.back-link {
    display: inline-block; margin-bottom: 30px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem; letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--grey); text-decoration: none;
    transition: color 0.3s;
}
.back-link:hover { color: var(--havok); }

/* --- Fade-in --- */
.fade-in {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive --- */
@media (max-width: 768px) {
    header { padding: 180px 20px 40px; }
    .logo-fixed { padding: 5px 20px 0; }
    .logo-fixed .logo-container { max-width: 250px; }
    .hero-text { font-size: 1.1rem; }
    section { padding: 60px 20px; }
    h2 { font-size: 1.5rem; }
    .themes-grid { grid-template-columns: 1fr; }
    .book-card { padding: 35px 25px; }
    nav a { margin: 0 10px; font-size: 0.65rem; }
    .cta-form { flex-direction: column; }
    .excerpt { padding: 30px 25px; }
    .book-hero { flex-direction: column; }
    .book-hero-cover { flex: none; max-width: 250px; }
    .books-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
}
