/* =============================================
   ROBERT ENRIGHT - IMMERSIVE AUTHOR WEBSITE
   Dark cinematic theme inspired by thriller novels
   ============================================= */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core palette - dark, gritty, fire */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-elevated: #1a1a1a;
    --text-primary: #f0ece4;
    --text-secondary: #9a9590;
    --text-muted: #5a5550;
    --accent: #e8552e;
    --accent-hover: #ff6b3d;
    --accent-glow: rgba(232, 85, 46, 0.3);
    --gold: #c9a84c;
    --gold-dim: rgba(201, 168, 76, 0.15);

    /* Spacing */
    --section-padding: clamp(80px, 12vh, 160px);
    --container-width: 1280px;
    --container-padding: clamp(20px, 4vw, 60px);

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: default;
}

::selection {
    background: var(--accent);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ---------- CURSOR GLOW ---------- */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 85, 46, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ---------- LOADER ---------- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    text-align: center;
}

.loader-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 30px;
}

.loader-letter {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(28px, 5vw, 56px);
    letter-spacing: 0.15em;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
    animation: letterFadeIn 0.5s var(--ease-out-expo) forwards;
}

.loader-spacer {
    width: 15px;
}

.loader-letter:nth-child(1) { animation-delay: 0.05s; }
.loader-letter:nth-child(2) { animation-delay: 0.1s; }
.loader-letter:nth-child(3) { animation-delay: 0.15s; }
.loader-letter:nth-child(4) { animation-delay: 0.2s; }
.loader-letter:nth-child(5) { animation-delay: 0.25s; }
.loader-letter:nth-child(6) { animation-delay: 0.3s; }
.loader-letter:nth-child(7) { animation-delay: 0.35s; }
.loader-letter:nth-child(8) { animation-delay: 0.4s; }
.loader-letter:nth-child(9) { animation-delay: 0.45s; }
.loader-letter:nth-child(10) { animation-delay: 0.5s; }
.loader-letter:nth-child(11) { animation-delay: 0.55s; }
.loader-letter:nth-child(12) { animation-delay: 0.6s; }
.loader-letter:nth-child(13) { animation-delay: 0.65s; }
.loader-letter:nth-child(14) { animation-delay: 0.7s; }

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

.loader-bar {
    width: 200px;
    height: 2px;
    background: var(--bg-elevated);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

/* ---------- PARTICLE CANVAS ---------- */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ---------- NAVIGATION ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.4s, padding 0.4s, backdrop-filter 0.4s;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 12px;
    padding-bottom: 12px;
}

.nav-logo a {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    transition: color 0.3s;
}

.nav-logo a:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out-expo);
}

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

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

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

.nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.97);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.mobile-link {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
    display: block;
}

.mobile-link:hover {
    color: var(--accent);
    transform: translateX(10px);
}

/* ---------- HERO SECTION ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

#heroEmberCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(232, 85, 46, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 70%, rgba(232, 85, 46, 0.06) 0%, transparent 50%);
}

.hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero-overline {
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
    opacity: 0;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(60px, 14vw, 180px);
    line-height: 0.9;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.hero-title-line {
    display: block;
    overflow: hidden;
}

.hero-title-line span {
    display: inline-block;
}

.hero-tagline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    opacity: 0;
}

.tagline-line {
    width: 60px;
    height: 1px;
    background: var(--text-muted);
}

.tagline-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(16px, 2vw, 22px);
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-cta {
    opacity: 0;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.hero-scroll-indicator span {
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

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

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    padding: 14px 36px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s var(--ease-out-expo);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--accent-glow);
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-small {
    display: inline-block;
    padding: 10px 24px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: var(--accent);
    color: #fff;
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
}

.btn-small:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ---------- SECTION COMMON ---------- */
.section {
    position: relative;
    padding: var(--section-padding) 0;
    z-index: 2;
}

.section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(42px, 7vw, 80px);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(100px, 20vw, 300px);
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* ---------- LATEST SECTION ---------- */
.section-latest {
    background: var(--bg-primary);
    overflow: hidden;
}

.latest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.book-3d {
    position: relative;
    perspective: 1200px;
    display: flex;
    justify-content: center;
}

.book-cover {
    position: relative;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.6s var(--ease-out-expo);
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.5),
        5px 5px 20px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    max-width: 380px;
    display: block;
}

.book-3d:hover .book-cover {
    transform: rotateY(-5deg) rotateX(2deg) scale(1.03);
    box-shadow:
        30px 30px 80px rgba(0, 0, 0, 0.6),
        10px 10px 30px rgba(232, 85, 46, 0.1);
}

.book-spine {
    position: absolute;
    top: 0;
    left: -20px;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, #1a1a1a, #2a2a2a);
    transform: rotateY(90deg);
    transform-origin: right center;
}

.book-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 30px;
    background: radial-gradient(ellipse, rgba(232, 85, 46, 0.15), transparent);
    filter: blur(15px);
}

.latest-info {
    padding: 20px 0;
}

.latest-desc {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.latest-desc-accent {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 18px;
    line-height: 1.7;
    color: var(--gold);
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 2px solid var(--accent);
}

.latest-cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- SERIES CARDS ---------- */
.section-series {
    background: transparent;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.series-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3 / 4;
}

.series-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.4s, transform 0.5s var(--ease-out-expo);
}

.series-card:hover .series-card-inner {
    border-color: rgba(232, 85, 46, 0.3);
    transform: translateY(-8px);
}

.series-card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    transition: opacity 0.5s;
}

.series-card:hover .series-card-bg {
    opacity: 0.5;
}

.series-card-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    transition: transform 0.6s var(--ease-out-expo), opacity 0.6s;
    z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.series-card:hover .series-card-image {
    transform: translate(-50%, -55%) scale(0.9);
}

.series-card-image img {
    max-height: 280px;
    width: auto;
}

.series-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 24px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 30%, transparent 100%);
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s var(--ease-out-expo);
}

.series-card:hover .series-card-content {
    transform: translateY(0);
    opacity: 1;
}

.series-card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.series-card-count {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.series-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ---------- QUOTE SECTION ---------- */
.section-quote {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.quote-parallax-bg {
    position: absolute;
    inset: -50px;
    background:
        radial-gradient(ellipse at center, rgba(232, 85, 46, 0.06) 0%, transparent 70%);
}

.quote-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.quote-mark {
    font-family: 'Playfair Display', serif;
    font-size: 120px;
    color: var(--accent);
    opacity: 0.3;
    line-height: 0.5;
    margin-bottom: 20px;
}

.quote-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto 20px;
}

.quote-cite {
    font-size: 14px;
    font-style: normal;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- JOURNEY / HORIZONTAL SCROLL ---------- */
.section-journey {
    background: var(--bg-primary);
    overflow: hidden;
}

.journey-grid-wrapper {
    padding: 0 var(--container-padding);
}

.journey-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 24px;
}

.journey-book {
    position: relative;
    text-align: center;
    transition: transform 0.5s var(--ease-out-expo);
}

.journey-book:hover {
    transform: translateY(-12px) scale(1.05);
}

.journey-book img {
    width: 100%;
    aspect-ratio: 280 / 404;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.5s;
}

.journey-book:hover img {
    box-shadow: 0 25px 60px rgba(232, 85, 46, 0.2), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.journey-book-title {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.journey-book-num {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    color: var(--accent);
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* ---------- ABOUT SECTION ---------- */
.section-about {
    background: transparent;
}

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

.about-image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.about-image-frame img {
    width: 100%;
    filter: grayscale(40%) contrast(1.1);
    transition: filter 0.6s;
}

.about-image-frame:hover img {
    filter: grayscale(0%) contrast(1);
}

.about-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232, 85, 46, 0.15), transparent 60%);
    pointer-events: none;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.8;
}

.about-content p strong {
    color: var(--gold);
    font-weight: 600;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 42px;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ---------- FREE SECTION ---------- */
.section-free {
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

.free-glow {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 85, 46, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.free-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.free-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.free-content p strong {
    color: var(--accent);
    font-weight: 600;
}

.free-subtitle {
    margin-bottom: 30px !important;
}

.subscribe-form {
    margin-top: 20px;
}

.form-group {
    display: flex;
    gap: 0;
    max-width: 500px;
}

.form-group input {
    flex: 1;
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    border-color: var(--accent);
}

.form-group .btn {
    white-space: nowrap;
    border-radius: 0;
}

.form-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

.free-image {
    display: flex;
    justify-content: center;
}

.free-image img {
    max-width: 350px;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
    transition: transform 0.6s var(--ease-out-expo);
}

.free-image:hover img {
    transform: translateY(-10px) scale(1.03);
}

/* ---------- BOX SETS ---------- */
.section-boxsets {
    background: transparent;
}

.boxsets-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.boxset-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s var(--ease-out-expo);
}

.boxset-card:hover {
    transform: translateY(-10px) scale(1.03);
}

.boxset-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: filter 0.5s;
}

.boxset-card:hover img {
    filter: brightness(0.7);
}

.boxset-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.6);
    opacity: 0;
    transition: opacity 0.4s;
}

.boxset-card:hover .boxset-overlay {
    opacity: 1;
}

.boxset-overlay span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

/* ---------- FOOTER ---------- */
.footer {
    position: relative;
    padding: 100px 0 40px;
    background: transparent;
    z-index: 2;
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    line-height: 1;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.footer-links h3,
.footer-social h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.footer-links a,
.footer-social a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    padding: 6px 0;
    transition: color 0.3s, transform 0.3s;
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .journey-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .boxsets-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .latest-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .latest-desc-accent {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid var(--accent);
        padding-top: 16px;
    }

    .latest-cta-group {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .about-stats {
        justify-content: center;
    }

    .free-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .form-group {
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-links a,
    .footer-social a {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: clamp(50px, 8vh, 100px);
        --container-padding: 20px;
    }

    /* Hide cursor glow on touch */
    .cursor-glow {
        display: none;
    }

    /* Nav */
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav {
        padding: 14px var(--container-padding);
    }

    .nav.scrolled {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* Mobile menu links - bigger tap targets */
    .mobile-link {
        font-size: 36px;
        padding: 8px 0;
    }

    /* Hero */
    .hero {
        min-height: 100svh;
    }

    .hero-overline {
        font-size: 10px;
        letter-spacing: 0.25em;
        margin-bottom: 14px;
    }

    .hero-title {
        font-size: clamp(50px, 14vw, 100px);
        margin-bottom: 20px;
    }

    .hero-tagline {
        gap: 12px;
        margin-bottom: 30px;
    }

    .tagline-text {
        font-size: 16px;
    }

    .tagline-line {
        width: 30px;
    }

    .hero-scroll-indicator {
        bottom: 24px;
    }

    /* Buttons - bigger tap targets */
    .btn {
        padding: 16px 32px;
        font-size: 13px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-small {
        padding: 12px 20px;
        min-height: 44px;
    }

    /* Section titles */
    .section-title {
        font-size: clamp(36px, 10vw, 60px);
    }

    .section-subtitle {
        font-size: 14px;
    }

    .section-label {
        font-size: 10px;
    }

    /* Latest book */
    .book-cover {
        transform: none;
    }

    .book-cover img {
        max-width: 260px;
    }

    .book-3d:hover .book-cover {
        transform: none;
    }

    .book-spine {
        display: none;
    }

    .latest-desc {
        font-size: 15px;
        line-height: 1.7;
    }

    .latest-desc-accent {
        font-size: 16px;
    }

    .latest-cta-group {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .latest-cta-group .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Series cards */
    .series-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        max-width: none;
        margin: 0;
    }

    .series-card {
        aspect-ratio: 3 / 4.5;
    }

    .series-card-title {
        font-size: 18px;
    }

    .series-card-desc {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .series-card-content .btn {
        padding: 10px 16px;
        font-size: 10px;
    }

    /* Quote */
    .section-quote {
        min-height: 40vh;
    }

    .quote-mark {
        font-size: 80px;
        margin-bottom: 10px;
    }

    .quote-text {
        font-size: clamp(20px, 5vw, 32px);
    }

    .quote-cite {
        font-size: 13px;
    }

    /* Journey grid */
    .journey-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 12px;
    }

    .journey-book-title {
        font-size: 11px;
        margin-top: 8px;
    }

    .journey-book-num {
        font-size: 12px;
    }

    /* About */
    .about-image-frame img {
        max-width: 280px;
        margin: 0 auto;
    }

    .about-content p {
        font-size: 15px;
        line-height: 1.7;
    }

    .about-stats {
        gap: 24px;
        flex-wrap: wrap;
    }

    .stat-number {
        font-size: 34px;
    }

    .stat-label {
        font-size: 10px;
    }

    /* Free section */
    .free-content p {
        font-size: 15px;
    }

    .free-image img {
        max-width: 250px;
    }

    .form-group {
        flex-direction: column;
        max-width: 100%;
    }

    .form-group input {
        padding: 14px 16px;
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .form-group .btn {
        width: 100%;
    }

    /* Box sets */
    .boxsets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .boxset-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(10, 10, 10, 0.7), transparent 60%);
    }

    .boxset-overlay span {
        font-size: 18px;
    }

    .boxset-card:hover {
        transform: none;
    }

    /* Footer */
    .footer {
        padding: 60px 0 30px;
    }

    .footer-logo {
        font-size: 36px;
    }

    .footer-grid {
        gap: 30px;
    }

    .footer-links h3,
    .footer-social h3 {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .footer-links a,
    .footer-social a {
        padding: 8px 0;
        font-size: 14px;
    }

    /* Section background text - smaller to prevent overflow */
    .section-bg-text {
        font-size: clamp(60px, 15vw, 150px);
    }
}

/* Small phones */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(44px, 16vw, 80px);
    }

    .journey-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 10px;
    }

    .boxsets-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .latest-cta-group .btn {
        max-width: 100%;
    }

    .series-grid {
        gap: 10px;
    }

    .loader-spacer {
        width: 8px;
    }

    .loader-letter {
        letter-spacing: 0.08em;
    }
}

/* Prevent hover effects on touch devices */
@media (hover: none) {
    .book-3d:hover .book-cover {
        transform: none;
        box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.5), 5px 5px 20px rgba(0, 0, 0, 0.3);
    }

    .journey-book:hover {
        transform: none;
    }

    .boxset-card:hover {
        transform: none;
    }

    .boxset-card:hover img {
        filter: none;
    }

    .boxset-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(10, 10, 10, 0.7), transparent 60%);
    }

    .series-card-content {
        opacity: 1;
        transform: translateY(0);
    }

    .series-card:hover .series-card-inner {
        transform: none;
    }

    .footer-links a:hover,
    .footer-social a:hover {
        transform: none;
    }
}

/* ---------- ANIMATIONS (used by GSAP) ---------- */
/* Initial states are set via JS (gsap.set) to avoid flash-of-content.
   No CSS opacity:0 here — GSAP handles it after load. */

/* Grain overlay for cinematic feel */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    opacity: 0.5;
}

/* Ensure nothing is visible before JS inits */
.hero-overline,
.hero-tagline,
.hero-cta {
    opacity: 0;
}
