:root {
    --navy: #0B1426;
    --navy-mid: #152038;
    --navy-light: #1E2D4F;
    --gold: #C4A35A;
    --gold-light: #D9BD7A;
    --gold-pale: #F0E6D0;
    --gold-dim: rgba(196, 163, 90, 0.15);
    --cream: #FAFAF7;
    --warm-gray: #F5F4F1;
    --white: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #555555;
    --text-light: #999999;
    --border: #E8E6E1;
    --border-light: #F0EEEA;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 8px 30px rgba(0,0,0,0.07);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.10);
    --shadow-xl: 0 30px 70px rgba(0,0,0,0.14);
    --radius: 6px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s var(--ease);
}

.site-header.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 1px 30px rgba(0,0,0,0.06);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    transition: opacity 0.3s;
}

.logo:hover { opacity: 0.7; }

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-line1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 3px;
    color: var(--navy);
    text-transform: uppercase;
}

.logo-line2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 5px;
    color: var(--gold);
    text-transform: uppercase;
}

.main-nav { display: flex; gap: 36px; align-items: center; }

.main-nav a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: all 0.3s var(--ease);
    transform: translateX(-50%);
}

.main-nav a:hover { color: var(--navy); }
.main-nav a:hover::after { width: 100%; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--navy);
    transition: all 0.3s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(11, 20, 38, 0.94) 0%,
        rgba(21, 32, 56, 0.88) 35%,
        rgba(11, 20, 38, 0.80) 100%
    );
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 30%, rgba(196,163,90,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 60%, rgba(196,163,90,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 50%, rgba(196,163,90,0.15) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 70% 20%, rgba(196,163,90,0.25) 0%, transparent 100%);
    opacity: 0;
    animation: particleFade 2s ease 0.5s forwards;
}

@keyframes particleFade { to { opacity: 1; } }

.hero-container {
    position: relative;
    z-index: 2;
    padding-top: 80px;
}

.hero-content {
    max-width: 640px;
    padding: 60px 0 100px;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s var(--ease-out) 0.3s forwards;
}

.badge-line {
    width: 28px;
    height: 1px;
    background: var(--gold);
}

.badge-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--gold);
}

.hero-title {
    font-size: 64px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.05;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.9s var(--ease-out) 0.5s forwards;
}

.hero-rule {
    margin-bottom: 28px;
    opacity: 0;
    animation: slideUp 0.8s var(--ease-out) 0.65s forwards;
}

.hero-rule span {
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-bio {
    font-size: 16px;
    line-height: 1.85;
    color: rgba(255,255,255,0.65);
    margin-bottom: 44px;
    font-weight: 300;
    max-width: 520px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero-actions {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s var(--ease-out) 0.95s forwards;
}

.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold);
    color: var(--navy);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    transition: all 0.4s var(--ease);
    border: none;
    cursor: pointer;
}

.btn-primary-custom:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(196,163,90,0.3);
}

.btn-primary-custom svg { transition: transform 0.3s var(--ease); }
.btn-primary-custom:hover svg { transform: translate(2px, -2px); }

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.hero-scroll-indicator span {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(196,163,90,0.5), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

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

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ============================================================
   SECTIONS COMMON
   ============================================================ */
.section-header { text-align: center; margin-bottom: 72px; }

.section-kicker {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.section-title {
    font-size: 46px;
    color: var(--navy);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 300;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================================
   BOOKS SECTION
   ============================================================ */
.books-section {
    padding: 120px 0;
    background: var(--white);
    position: relative;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.book-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.5s var(--ease);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.book-cover {
    aspect-ratio: 3 / 4;
    background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 28px;
    position: relative;
}

.book-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,20,38,0.2) 0%, transparent 40%);
    pointer-events: none;
}

.book-cover img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    transition: transform 0.6s var(--ease);
    position: relative;
    z-index: 1;
}

.book-card:hover .book-cover img {
    transform: scale(1.04) translateY(-4px);
}

.cover-placeholder {
    padding: 32px;
    text-align: center;
    color: var(--gold-pale);
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    line-height: 1.4;
    font-style: italic;
}

.cover-placeholder.large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 100%);
    border-radius: var(--radius-lg);
    min-height: 400px;
}

.book-info {
    padding: 28px 28px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-info h3 {
    font-size: 21px;
    color: var(--navy);
    margin-bottom: 6px;
    line-height: 1.3;
    transition: color 0.3s;
}

.book-card:hover .book-info h3 { color: var(--gold); }

.book-subtitle {
    color: var(--text-light);
    font-size: 14px;
    font-style: italic;
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 20px;
    line-height: 1.5;
}

.book-link {
    margin-top: auto;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s var(--ease);
}

.book-link svg {
    transition: transform 0.3s var(--ease);
}

.book-card:hover .book-link svg { transform: translateX(4px); }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
    padding: 120px 0;
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--gold-dim);
    filter: blur(100px);
    pointer-events: none;
}

.about-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 80px;
    align-items: start;
}

.photo-frame {
    position: relative;
}

.photo-frame img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.photo-accent {
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 60%;
    height: 60%;
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    opacity: 0.3;
}

.about-text h2 {
    font-size: 42px;
    color: var(--navy);
    margin-bottom: 8px;
}

.about-title {
    font-size: 15px;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.about-bio {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.about-stats {
    display: flex;
    gap: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat { text-align: center; }

.stat-number {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-light);
}

/* ============================================================
   BOOK DETAIL PAGE
   ============================================================ */
.book-detail {
    padding: 40px 0 100px;
    margin-top: 80px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 48px;
    transition: all 0.3s var(--ease);
    padding: 8px 0;
}

.back-link:hover { color: var(--navy); }
.back-link:hover svg { transform: translateX(-3px); }
.back-link svg { transition: transform 0.3s var(--ease); }

.book-header {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 64px;
    margin-bottom: 80px;
    align-items: start;
}

.book-cover-large {
    position: sticky;
    top: 104px;
}

.cover-frame {
    position: relative;
}

.cover-frame img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.cover-glow {
    position: absolute;
    bottom: -20px;
    left: 10%;
    right: 10%;
    height: 60px;
    background: var(--navy);
    filter: blur(30px);
    opacity: 0.25;
    border-radius: 50%;
}

.book-meta h1 {
    font-size: 44px;
    color: var(--navy);
    margin-bottom: 12px;
}

.book-subtitle-large {
    font-size: 20px;
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    margin-bottom: 16px;
}

.book-author {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.book-description {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* Editions */
.editions-section {
    border-top: 1px solid var(--border);
    padding-top: 64px;
}

.editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.edition-card {
    background: var(--cream);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.4s var(--ease);
}

.edition-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--gold-pale);
    transform: translateY(-4px);
}

.edition-cover {
    padding: 24px 24px 0;
    text-align: center;
}

.edition-cover img {
    max-height: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: inline-block;
}

.edition-content { padding: 28px; }

.edition-card h3 {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gold);
}

.detail-row {
    font-size: 14px;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.detail-value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

.buy-links {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--navy);
    color: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.4s var(--ease);
    border: 2px solid var(--navy);
}

.btn-buy:hover {
    background: transparent;
    color: var(--navy);
    transform: translateY(-2px);
}

.btn-buy svg { transition: transform 0.3s var(--ease); }
.btn-buy:hover svg { transform: translate(2px, -2px); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--navy);
    padding: 64px 0 32px;
}

.footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    opacity: 0.7;
}

.footer-name {
    display: block;
    color: rgba(255,255,255,0.9);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 1px;
}

.footer-tagline {
    display: block;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
    margin-top: 2px;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    color: rgba(255,255,255,0.45);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s;
}

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

.footer-bottom p {
    color: rgba(255,255,255,0.25);
    font-size: 12px;
}

/* ============================================================
   404
   ============================================================ */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    padding: 40px 32px;
    margin-top: 80px;
}

.error-page h1 {
    font-size: 160px;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 8px;
    font-weight: 300;
}

.error-page p {
    font-size: 17px;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .container { max-width: 100%; }
    .hero-title { font-size: 52px; }
    .about-grid { grid-template-columns: 300px 1fr; gap: 48px; }
    .book-header { grid-template-columns: 320px 1fr; gap: 48px; }
}

@media (max-width: 768px) {
    .site-header .container { height: 64px; }
    .main-nav { display: none; }
    .nav-toggle { display: flex; }

    .hero { min-height: 90vh; }
    .hero-container { padding-top: 64px; }
    .hero-content { padding: 40px 0 80px; }
    .hero-title { font-size: 40px; }
    .hero-bio { font-size: 15px; }
    .hero-scroll-indicator { display: none; }

    .books-section { padding: 80px 0; }
    .books-grid { grid-template-columns: 1fr; gap: 24px; }
    .section-title { font-size: 36px; }
    .section-header { margin-bottom: 48px; }

    .about-section { padding: 80px 0; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-photo { max-width: 280px; }
    .about-text h2 { font-size: 34px; }
    .about-stats { gap: 24px; }

    .book-detail { padding: 24px 0 60px; margin-top: 64px; }
    .book-header { grid-template-columns: 1fr; gap: 32px; }
    .book-cover-large { position: static; max-width: 300px; }
    .book-meta h1 { font-size: 32px; }
    .editions-grid { grid-template-columns: 1fr; }

    .footer-top { flex-direction: column; gap: 24px; }
}

@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .hero-title { font-size: 34px; }
    .hero-bio { font-size: 14px; }
    .book-cover { padding: 20px; }
    .logo-line1 { font-size: 14px; }
    .logo-line2 { font-size: 10px; }
    .about-stats { flex-direction: column; gap: 16px; }
    .section-title { font-size: 30px; }
}
