/* Index specific styles extracted from inline styles */
html {
    scroll-behavior: smooth;
}

/* Accessibility: Focus styles */
*:focus-visible {
    outline: 2px solid #2c3e50 !important;
    outline-offset: 2px !important;
}

/* Skip navigation link */
.skip-nav {
    position: fixed;
    top: -50px;
    left: 0;
    background: #2c3e50;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-nav:focus {
    top: 0;
}

h1 {
    color: #2c3e50;
}

.expert-profile {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.expert-profile .profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-right: 20px;
    border: 3px solid #2c3e50;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    min-width: 120px;
    max-width: 120px;
    min-height: 120px;
    max-height: 120px;
    aspect-ratio: 1/1;
}

.expert-profile .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.expert-profile div {
    flex: 1;
}

.expert-profile h4 {
    margin-top: 0;
    color: #2c3e50;
    margin-bottom: 0.5em;
}

.expert-profile h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.expert-profile h4 a:hover {
    text-decoration: underline;
}

.expert-profile h4 a.linkedin-icon {
    margin-left: 8px;
    font-size: 1em;
    color: #0077b5;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.2s ease-in-out;
}

.expert-profile h4 a.linkedin-icon:hover {
    color: #DAA520;
}

.expert-profile h4 a.linkedin-icon i {
    vertical-align: baseline;
}

.expert-profile p.text {
    font-size: 0.9em;
    line-height: 1.6;
}

.contributor-list {
    columns: 3;
    -webkit-columns: 3;
    -moz-columns: 3;
    list-style-type: none;
    padding-left: 0;
}

.contributor-list li {
    margin-bottom: 8px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .contributor-list {
        columns: 2;
        -webkit-columns: 2;
        -moz-columns: 2;
    }
}

@media (max-width: 480px) {
    .contributor-list {
        columns: 1;
        -webkit-columns: 1;
        -moz-columns: 1;
    }

    /* Stack expert profiles vertically on small screens */
    .expert-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .expert-profile .profile-image {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .expert-profile div {
        width: 100%;
    }
}

.key-focus-area {
    margin-bottom: 20px;
}

.key-focus-area h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.key-focus-area p {
    font-size: 0.9em;
    color: #555;
    margin-top: 0;
}

.forthcoming-book-container {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 30px;
}

.forthcoming-book-image {
    max-width: 300px;
    flex-shrink: 0;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.forthcoming-book-content {
    flex: 1;
}

.forthcoming-book-content h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.forthcoming-book-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: bold;
}

.forthcoming-book-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .forthcoming-book-container {
        flex-direction: column;
        gap: 20px;
    }

    .forthcoming-book-image {
        max-width: 250px;
        margin: 0 auto;
    }
}

.section-spacer {
    margin-top: 2em;
}

.big-framework-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.big-framework-button:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.big-framework-button i {
    margin-left: 10px;
}

/* ==========================================================================
   BUTTON STYLES - Using design system tokens
   ========================================================================== */

.button,
a.button {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    font-weight: var(--weight-semibold, 600);
    text-transform: none;
    letter-spacing: var(--letter-spacing-wide, 0.02em);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.button:hover::before {
    width: 300px;
    height: 300px;
}

.button:hover,
a.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-pink);
}

/* Glassmorphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* Animations are defined in design-system.css */

.corona-effect {
    position: relative;
    border-radius: var(--radius-xl);
}

/* Glossy Send Button Style */
.send-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 32px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.send-button span {
    background: linear-gradient(135deg, #ffffff 0%, #e8eaff 50%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.send-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.send-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.send-button:hover::before {
    width: 300px;
    height: 300px;
}

/* --- SWIPER CAROUSEL STYLES --- */
.framework-carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 0;
    box-sizing: border-box;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.framework-carousel {
    position: relative;
    background-color: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.framework-carousel .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
}

.framework-carousel .swiper-slide-inner {
    margin: 0;
    width: 100%;
    height: auto;
}

.framework-carousel .swiper-slide-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.framework-carousel .swiper-button-prev,
.framework-carousel .swiper-button-next {
    background-color: rgba(44, 62, 80, 0.5);
    color: white;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: none;
    outline: none;
}

.framework-carousel .swiper-button-prev:after,
.framework-carousel .swiper-button-next:after {
    display: none;
}

.framework-carousel .swiper-button-prev:hover,
.framework-carousel .swiper-button-next:hover {
    background-color: rgba(44, 62, 80, 0.8);
}

.framework-carousel .swiper-pagination {
    position: relative;
    margin-top: 10px;
}

.framework-carousel .swiper-pagination-bullet {
    background-color: #ccc;
    opacity: 1;
}

.framework-carousel .swiper-pagination-bullet-active {
    background-color: #2c3e50;
}

/* Reduce vertical spacing for carousel section */
.container.blog.main.gray:has(.framework-carousel-wrapper) {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* For older browsers that don't support :has() */
#carousel-section {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* Honeypot field - ensure it's completely hidden on all devices */
input[name="_gotcha"] {
    display: none !important;
    position: absolute !important;
    left: -5000px !important;
    height: 0 !important;
    width: 0 !important;
    line-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Extra safety for mobile devices */
@media screen and (max-width: 768px) {
    input[name="_gotcha"] {
        display: none !important;
        visibility: hidden !important;
        position: fixed !important;
        left: -9999px !important;
        top: -9999px !important;
    }
}

/* Video Player Styles */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.video-player {
    width: 100%;
    display: block;
    background: #000;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(52, 73, 94, 0.9) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-overlay:hover .play-button {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.play-icon {
    width: 0;
    height: 0;
    border-left: 25px solid #2c3e50;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 5px;
}

.video-title {
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.video-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    text-align: center;
}

.video-duration {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

/* ===== BOOK-FIRST HERO STYLES ===== */
.hero-book-first {
    min-height: 88vh;
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

/* Swirl background now handled by shared .swirly-header class from header-swirl.css */

.hero-book-first .hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.book-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-3d {
    perspective: 1000px;
    margin-bottom: 30px;
}

.book-cover-hero {
    width: 320px;
    height: auto;
    border-radius: 4px;
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.5),
        -5px -5px 20px rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: rotateY(15deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.book-cover-hero:hover {
    transform: rotateY(5deg) rotateX(2deg) scale(1.02);
}

.preorder-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #CA65A7 0%, #a8548b 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 25px;
    box-shadow: 0 8px 20px rgba(202, 101, 167, 0.3);
    line-height: 1.4;
    text-align: center;
    max-width: fit-content;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .preorder-badge {
        white-space: normal;
        border-radius: 20px;
        padding: 15px 20px;
    }
}

.preorder-badge i {
    font-size: 1.2em;
    opacity: 0.9;
}

.hero-text {
    color: white;
}

.hero-subtitle {
    color: #7fb3d5;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    font-weight: 500;
}

.hero-title {
    font-size: var(--text-3xl, 3.2em);
    font-weight: var(--weight-bold, 700);
    line-height: var(--leading-tight, 1.1);
    margin-bottom: var(--space-5, 20px);
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.4em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 35px;
    max-width: 550px;
    line-height: 1.7;
}

.hero-authors {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-authors .author-photos {
    display: flex;
}

.hero-authors .author-photos .hero-portrait-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-left: -20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Ensure background is white for zoomed-out images */
    background-color: white;
    position: relative;
    z-index: 1;
}

.hero-authors .author-photos .hero-portrait-wrapper:first-child {
    margin-left: 0;
    z-index: 2;
    /* Keep first one on top? or standard stacking? Override if needed */
}

.hero-authors .author-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    display: block;
}

/* About Section Portrait Wrapper */
.about-portrait-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #2c3e50;
    overflow: hidden;
    flex-shrink: 0;
    background-color: white;
}

.about-portrait-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-authors .author-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
}

.hero-authors .author-info strong {
    display: block;
    color: white;
}

.hero-authors .author-info span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
}

.hero-cta-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 35px;
    background: linear-gradient(135deg, #CA65A7 0%, #a8548b 100%);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(202, 101, 167, 0.4);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(202, 101, 167, 0.5);
    color: white;
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 35px;
    background: transparent;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* CTA button - used in subscription/connect cards */
.cta-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.cta-button:hover {
    background: linear-gradient(135deg, #4a5f7a 0%, #5a6f8a 100%);
}

.cta-button--link {
    display: block;
}

.hero-retailers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-retailers>span:first-child {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    font-weight: 500;
    margin-right: 4px;
}

.retailer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.2em;
}

.retailer-btn:hover {
    background: white;
    color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.retailer-btn img {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.retailer-btn:hover img {
    filter: none;
    opacity: 1;
}

.retailer-btn img.no-filter {
    mix-blend-mode: normal;
    filter: none;
    opacity: 0.95;
}

.discount-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85em;
    color: #aed6f1;
    margin-left: 0;
    /* Removed auto margin to prevent wrap jumps */
}

@media (max-width: 900px) {
    .discount-note {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }
}

.discount-note i {
    color: #7fb3d5;
    font-size: 1.1em;
}

.discount-note strong {
    color: #7fb3d5;
}

.code-badge {
    background: rgba(127, 179, 213, 0.35);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

/* Testimonials Section */
.testimonials-section {
    background: #f8f9fa;
    padding: 80px 40px;
    overflow: hidden;
    max-width: 100vw;
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 50px 15px;
    }
}

.testimonials-content {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

@media (max-width: 768px) {
    .testimonials-content {
        max-width: 100%;
        overflow: hidden;
    }
}

.testimonials-header {
    text-align: center;
    margin-bottom: 50px;
}

.testimonials-header h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.testimonials-header p {
    color: #666;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.testimonial-card blockquote {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.7;
    border: none;
    padding: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 18px;
}

.testimonial-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 10%;
    flex-shrink: 0;
    border: 3px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Prevent moiré patterns on sketched portraits */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: blur(0.3px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.placeholder-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.testimonial-author-info strong {
    display: block;
    color: #2c3e50;
    font-size: 0.95em;
}

.testimonial-author-info span {
    color: #888;
    font-size: 0.85em;
}

/* ==========================================================================
   SECTION ENTRANCE ANIMATIONS
   ========================================================================== */

/* Base animation class for sections */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.animate-on-scroll.is-visible .animate-child {
    opacity: 1;
    transform: translateY(0);
}

.animate-child {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-child:nth-child(1) { transition-delay: 0.1s; }
.animate-child:nth-child(2) { transition-delay: 0.15s; }
.animate-child:nth-child(3) { transition-delay: 0.2s; }
.animate-child:nth-child(4) { transition-delay: 0.25s; }
.animate-child:nth-child(5) { transition-delay: 0.3s; }
.animate-child:nth-child(6) { transition-delay: 0.35s; }
.animate-child:nth-child(7) { transition-delay: 0.4s; }
.animate-child:nth-child(8) { transition-delay: 0.45s; }

/* Slide from left variant */
.animate-from-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-from-left.is-visible {
    opacity: 1;
    transform: none;
}

/* Slide from right variant */
.animate-from-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.animate-from-right.is-visible {
    opacity: 1;
    transform: none;
}

/* Scale up variant */
.animate-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Reduced motion - show everything immediately */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .animate-from-left,
    .animate-from-right,
    .animate-scale,
    .animate-child {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Framework Preview Section */
.framework-preview-section {
    background: white;
    padding: 80px 40px;
}

.framework-preview-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.framework-preview-content>h2 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 15px;
}

.framework-preview-content>p {
    color: #666;
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Framework Teaser - Enhanced Design */
.framework-teaser {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 50px;
    max-width: 900px;
    padding: 50px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    border-radius: 24px;
    border: 1px solid rgba(44, 62, 80, 0.06);
    box-shadow:
        0 20px 60px rgba(44, 62, 80, 0.08),
        0 8px 25px rgba(44, 62, 80, 0.04);
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
.framework-teaser::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(231, 76, 60, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(13, 148, 136, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.teaser-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 40px;
    background: white;
    border-radius: 20px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    max-width: 260px;
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
}

.teaser-stat:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.06);
}

/* Inhibitors card styling */
.teaser-inhibitors {
    border-color: rgba(231, 76, 60, 0.15);
    background: linear-gradient(180deg, white 0%, rgba(231, 76, 60, 0.02) 100%);
}

.teaser-inhibitors:hover {
    border-color: rgba(231, 76, 60, 0.4);
    box-shadow:
        0 20px 40px rgba(231, 76, 60, 0.15),
        0 8px 20px rgba(231, 76, 60, 0.08);
}

/* Drivers card styling */
.teaser-drivers {
    border-color: rgba(13, 148, 136, 0.15);
    background: linear-gradient(180deg, white 0%, rgba(13, 148, 136, 0.02) 100%);
}

.teaser-drivers:hover {
    border-color: rgba(13, 148, 136, 0.4);
    box-shadow:
        0 20px 40px rgba(13, 148, 136, 0.15),
        0 8px 20px rgba(13, 148, 136, 0.08);
}

/* Icon ring */
.teaser-icon-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.teaser-stat:hover .teaser-icon-ring {
    transform: scale(1.1);
}

.teaser-inhibitors .teaser-icon-ring {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    border: 2px solid rgba(231, 76, 60, 0.2);
}

.teaser-inhibitors:hover .teaser-icon-ring {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(231, 76, 60, 0.08) 100%);
    border-color: rgba(231, 76, 60, 0.4);
}

.teaser-drivers .teaser-icon-ring {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(13, 148, 136, 0.05) 100%);
    border: 2px solid rgba(13, 148, 136, 0.2);
}

.teaser-drivers:hover .teaser-icon-ring {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, rgba(13, 148, 136, 0.08) 100%);
    border-color: rgba(13, 148, 136, 0.4);
}

.teaser-icon-ring i {
    font-size: 1.8em;
}

.teaser-inhibitors .teaser-icon-ring i {
    color: #e74c3c;
}

.teaser-drivers .teaser-icon-ring i {
    color: #0d9488;
}

.teaser-number {
    font-size: 3.5em;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.3s ease;
}

.teaser-stat:hover .teaser-number {
    transform: scale(1.05);
}

.teaser-inhibitors .teaser-number {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.teaser-drivers .teaser-number {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.teaser-label {
    font-size: 1.15em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.teaser-inhibitors .teaser-label {
    color: #c0392b;
}

.teaser-drivers .teaser-label {
    color: #0f766e;
}

.teaser-desc {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    line-height: 1.5;
    max-width: 180px;
}

/* Center balance element */
.teaser-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 25px;
    position: relative;
    z-index: 2;
}

.teaser-balance {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 30px rgba(44, 62, 80, 0.3),
        0 4px 10px rgba(44, 62, 80, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    position: relative;
    animation: teaser-pulse 3s ease-in-out infinite;
}

.teaser-balance::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(44, 62, 80, 0.15);
    border-radius: 50%;
    animation: teaser-ring 3s ease-in-out infinite;
}

@keyframes teaser-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes teaser-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.2;
    }
}

.teaser-balance i {
    color: white;
    font-size: 2em;
}

/* Connection lines */
.teaser-connector {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 3px;
    border-radius: 2px;
}

.teaser-connector-left {
    right: 100%;
    margin-right: 15px;
    background: linear-gradient(to left, #2c3e50, rgba(231, 76, 60, 0.5));
}

.teaser-connector-right {
    left: 100%;
    margin-left: 15px;
    background: linear-gradient(to right, #2c3e50, rgba(13, 148, 136, 0.5));
}

.teaser-vs-text {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
    font-weight: 500;
}

/* Framework Teaser - Responsive */
@media (max-width: 800px) {
    .framework-teaser {
        flex-direction: column;
        gap: 25px;
        padding: 35px 25px;
    }

    .teaser-stat {
        max-width: 100%;
        width: 100%;
        padding: 25px 30px;
    }

    .teaser-center {
        flex-direction: row;
        padding: 20px 0;
        order: -1;
    }

    .teaser-connector {
        display: none;
    }

    .teaser-balance {
        width: 65px;
        height: 65px;
    }

    .teaser-balance::before {
        width: 85px;
        height: 85px;
    }

    .teaser-balance i {
        font-size: 1.6em;
    }

    .teaser-number {
        font-size: 3em;
    }

    .teaser-icon-ring {
        width: 60px;
        height: 60px;
    }

    .teaser-icon-ring i {
        font-size: 1.5em;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .framework-teaser {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .teaser-balance {
        animation: none;
    }

    .teaser-balance::before {
        animation: none;
    }

    .teaser-stat:hover {
        transform: none;
    }

    .teaser-stat:hover .teaser-icon-ring,
    .teaser-stat:hover .teaser-number {
        transform: none;
    }
}

.framework-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.framework-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
    color: white;
}

/* Hero responsive */
@media (max-width: 1024px) {
    .hero-book-first .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .book-showcase {
        order: -1;
    }

    .hero-description {
        margin: 0 auto 35px;
    }

    .hero-authors {
        justify-content: center;
    }

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

    .hero-retailers {
        justify-content: center;
    }

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

@media (max-width: 768px) {
    .hero-book-first {
        padding: 40px 20px;
        overflow-x: hidden;
    }

    .hero-book-first .hero-content {
        max-width: 100%;
        padding: 0;
    }

    .hero-title {
        font-size: var(--text-2xl, 2.2em);
    }

    .book-cover-hero {
        width: 250px;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }

    .book-showcase,
    .hero-text {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Fix author section stacking on mobile */
    .hero-authors {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }

    .hero-authors .author-photos {
        justify-content: center;
    }

    .hero-authors .author-info {
        text-align: center;
    }

    .hero-authors .author-info span {
        display: block;
        line-height: 1.4;
    }

    /* Smaller author photos on mobile */
    .hero-authors .author-photos .hero-portrait-wrapper {
        width: 80px;
        height: 80px;
        margin-left: -15px;
    }

    .hero-authors .author-photos .hero-portrait-wrapper:first-child {
        margin-left: 0;
    }

    /* Better description text on mobile */
    .hero-description {
        font-size: 1em;
        line-height: 1.6;
    }

    .hero-tagline {
        font-size: 1.2em;
    }

    .hero-subtitle {
        font-size: 0.85em;
        letter-spacing: 2px;
    }

    /* Fix retailers section on mobile */
    .hero-retailers {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding-top: 15px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-retailers > span:first-child {
        margin-right: 0;
    }

    .discount-note {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        padding: 12px;
        max-width: calc(100vw - 40px);
        box-sizing: border-box;
        word-wrap: break-word;
    }

    .discount-note .code-badge {
        margin-top: 4px;
    }
}

/* Testimonials Carousel */
.testimonials-carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 70px;
    overflow: visible;
}

.testimonials-carousel,
.testimonials-carousel.swiper {
    padding: 20px 10px;
    overflow: hidden;
    position: static;
}

.testimonials-carousel .swiper-wrapper {
    align-items: stretch;
    z-index: 1;
}

.testimonials-carousel .swiper-slide {
    z-index: 1;
    height: auto;
    padding: 10px 20px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
    /* Prevent layout recalculation during transitions */
    contain: layout style;
}

/* Ensure carousel avatars are GPU-accelerated and pre-rendered */
.testimonials-carousel .testimonial-avatar {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    /* Prevent image from being unloaded */
    content-visibility: visible;
}

.testimonials-carousel .testimonial-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    position: relative;
    z-index: 1;
}

.testimonials-carousel .testimonial-card blockquote {
    flex-grow: 1;
}

.testimonials-carousel .swiper-button-prev,
.testimonials-carousel .swiper-button-next {
    color: #2c3e50;
    background: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    top: calc(50% - 30px);
    z-index: 100 !important;
}

.testimonials-carousel .swiper-button-prev::after,
.testimonials-carousel .swiper-button-next::after {
    font-size: 18px;
    font-weight: bold;
}

.testimonials-carousel .swiper-button-prev {
    left: 62px;
}

.testimonials-carousel .swiper-button-next {
    right: 62px;
}

/* Pagination dots positioned BELOW the carousel */
.testimonials-carousel .swiper-pagination {
    position: relative !important;
    bottom: auto !important;
    top: auto !important;
    margin-top: 80px;
    width: 100%;
    text-align: center;
}

.testimonials-carousel .swiper-pagination-bullet {
    background: #2c3e50;
    opacity: 0.3;
    width: 10px;
    height: 10px;
    margin: 0 6px !important;
}

.testimonials-carousel .swiper-pagination-bullet-active {
    opacity: 1;
}

@media (max-width: 768px) {
    .testimonials-carousel-wrapper {
        padding: 0 10px;
        max-width: 100vw !important;
        overflow: hidden !important;
        box-sizing: border-box;
    }

    .testimonials-carousel,
    .testimonials-carousel.swiper {
        overflow: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .testimonials-carousel .swiper-wrapper {
        max-width: 100% !important;
    }

    .testimonials-carousel .swiper-slide {
        padding: 10px 5px;
        width: calc(100vw - 50px) !important;
        max-width: calc(100vw - 50px) !important;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .testimonials-carousel .testimonial-card {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 20px;
    }

    .testimonials-carousel .testimonial-card blockquote {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }

    .testimonial-author {
        flex-wrap: wrap;
        gap: 12px;
        max-width: 100%;
    }

    .testimonial-author-info {
        max-width: calc(100% - 100px);
        word-wrap: break-word;
    }

    .testimonial-avatar {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }

    .testimonials-carousel .swiper-button-prev,
    .testimonials-carousel .swiper-button-next {
        display: none;
    }

    .testimonials-carousel .swiper-pagination {
        margin-top: 30px;
    }

    /* Fix picture element overflow in testimonials */
    .testimonial-author picture {
        flex-shrink: 0;
        width: 80px;
        height: 80px;
    }

    .testimonial-author picture img {
        width: 100%;
        height: 100%;
    }

    /* Authors grid mobile fix */
    .authors-grid {
        gap: 20px !important;
    }

    .authors-grid > div {
        flex-direction: column !important;
        text-align: center;
        padding: 20px !important;
    }

    .authors-grid .about-portrait-wrapper {
        margin: 0 auto 15px;
    }
}

/* Scroll Indicator - needs .hero-book-first prefix to override .swirly-header>* specificity */
.hero-book-first .scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
    text-decoration: none;
}

.hero-book-first .scroll-indicator:hover {
    color: rgba(255, 255, 255, 0.9);
}

.hero-book-first .scroll-indicator .chevron {
    animation: bounce 2s 3;
}

/* bounce animation defined in design-system.css */

/* Look Inside Section */
.look-inside-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 80px 40px;
}

.look-inside-content {
    max-width: 1000px;
    margin: 0 auto;
}

.look-inside-header {
    text-align: center;
    margin-bottom: 50px;
}

.look-inside-header h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 10px;
}

.look-inside-header p {
    color: #666;
    font-size: 1.1em;
}

.book-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.toc-preview {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.toc-list > li {
    display: block;
}

.toc-preview h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Collapsible Part Headers */
.toc-part-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toc-part-header:hover {
    background: #f8f9fa;
    /* Removed margin/padding changes that caused layout jumps */
}

.toc-part-header .toc-toggle {
    color: #7f8c8d;
    font-size: 0.75em;
    transition: transform 0.3s ease;
    width: 16px;
    text-align: center;
}

.toc-part-header.expanded .toc-toggle {
    transform: rotate(90deg);
}

.toc-part {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    flex-shrink: 0;
}

.toc-part-title {
    color: #2c3e50;
    font-weight: 600;
    flex: 1;
}

/* Collapsible Chapters */
.toc-chapters {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
    margin: 0 -15px;
    padding: 0 15px;
}

.toc-chapters.expanded {
    max-height: 800px;
}

.toc-chapter-item {
    padding: 12px 0 12px 28px;
    border-bottom: 1px solid #e9ecef;
}

.toc-chapter-item:last-child {
    border-bottom: none;
}

.toc-chapter-num {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    margin-right: 10px;
}

.toc-chapter-title {
    color: #2c3e50;
    font-weight: 500;
}

.toc-chapter-desc {
    display: block;
    color: #7f8c8d;
    font-size: 0.85em;
    margin-top: 4px;
    padding-left: 50px;
    line-height: 1.4;
}

.toc-chapter {
    color: #2c3e50;
    font-weight: 500;
}

.foreword-preview {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.foreword-preview h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.foreword-preview blockquote {
    font-style: italic;
    color: #555;
    line-height: 1.8;
    margin: 0 0 25px 0;
    padding: 0;
    border: none;
    font-size: 1em;
}

.foreword-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.foreword-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 17%;
    border: 3px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.foreword-author-info strong {
    display: block;
    color: #2c3e50;
    font-size: 0.95em;
}

.foreword-author-info span {
    color: #888;
    font-size: 0.85em;
}

@media (max-width: 900px) {
    .book-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .look-inside-section {
        padding: 40px 15px;
        overflow: hidden;
    }

    .look-inside-content {
        max-width: 100%;
        overflow: hidden;
    }

    .toc-preview,
    .foreword-preview {
        padding: 20px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .foreword-author {
        flex-wrap: wrap;
        gap: 12px;
    }

    .foreword-avatar {
        width: 80px;
        height: 80px;
    }

    .hero-book-first .scroll-indicator {
        position: relative;
        bottom: auto;
        margin-top: 30px;
    }

    /* Ensure hero section has enough space for stacked content */
    .hero-book-first {
        min-height: auto;
        padding-bottom: 30px;
    }

    .hero-book-first .hero-content {
        padding-bottom: 0;
    }
}

/* Typography is handled by typography.css - do not override here */

/* Nell Watson specific style override */
.nell-portrait {
    transform: scale(1.0);
    object-position: 50% 13%;
}

/* Ali Hessami specific style override */
.ali-portrait {
    object-position: 50% 17%;
    transform: none;
}

/* John McDermid specific style override */
.testimonial-avatar[alt*="McDermid"] {
    object-position: 50% 15%;
}

/* Koen Holtman specific style override */
.testimonial-avatar[alt*="Koen Holtman"] {
    object-position: 50% 48%;
    transform: scale(1.1);
}

/* Resources Card - Elegant Style */
.resources-card {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Soft premium shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resources-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

.resources-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.1em;
    color: #2c3e50;
    /* Match standard dark blue text */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resources-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #f8f9fa;
    /* Subtle grey background instead of white-on-white */
    border-radius: 8px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.resource-link i {
    color: #0d9488;
    /* Keep the teal accent for icons */
}

.resource-link:hover {
    background: white;
    border-color: #0d9488;
    color: #0d9488;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
    transform: translateY(-2px);
}

/* Table of Contents Refinement */
.toc-part-header {
    background: var(--bg-white, white);
    background-color: var(--bg-white, white);
    color: var(--color-primary, #2c3e50);
    border: 1px solid var(--gray-300, #eee);
    padding: var(--space-4, 15px) var(--space-5, 20px);
    border-radius: var(--radius-md, 8px);
    margin-bottom: var(--space-3, 10px);
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
    position: relative;
}

.toc-part-header:hover {
    background-color: var(--bg-light, #f8f9fa);
    border-color: var(--gray-400, #ddd);
}

.toc-part-header .toc-part {
    background: #2c3e50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 10px;
    margin-right: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.toc-part-header .toc-part-title {
    font-weight: 600;
    font-size: 1em;
    flex: 1;
    min-width: 0;
}

.toc-toggle {
    color: #aaa;
    font-size: 0.9em;
    transition: transform 0.3s ease;
    width: 16px;
    flex-shrink: 0;
    text-align: center;
}

/* Rotate chevron when active - implies JS toggles class 'active' on parent or icon */
.toc-part-header.active .toc-toggle {
    transform: rotate(90deg);
    color: #2c3e50;
}

/* Sticky Book Banner */
.sticky-book-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-book-banner.visible {
    transform: translateY(0);
}

.sticky-book-banner img {
    height: 50px;
    width: auto;
    aspect-ratio: 1277 / 1916;
    border-radius: 4px;
    object-fit: cover;
}

.sticky-banner-text {
    color: white;
}

.sticky-banner-text strong {
    display: block;
    font-size: 1em;
}

.sticky-banner-text span {
    font-size: 0.85em;
    opacity: 0.8;
}

.sticky-book-banner .cta-primary {
    padding: 12px 25px;
    font-size: 0.95em;
}

@media (max-width: 768px) {
    .sticky-book-banner {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px 20px;
    }
}

/* ==========================================================================
   DRIVERS & INHIBITORS OVERVIEW (HTML5 Version) - Enhanced Design v2
   ========================================================================== */

.drivers-inhibitors-overview {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: stretch;
    margin: 50px 0;
    text-align: left;
    padding: 40px 35px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 28px;
    border: 1px solid rgba(44, 62, 80, 0.06);
    box-shadow:
        0 4px 6px rgba(44, 62, 80, 0.02),
        0 12px 40px rgba(44, 62, 80, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

/* Subtle decorative gradient orbs */
.drivers-inhibitors-overview::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.drivers-inhibitors-overview::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* Column styles */
.dio-column {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.dio-header {
    font-weight: 700;
    margin-bottom: 20px;
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.dio-header i {
    font-size: 1em;
}

.dio-header--inhibitor {
    color: #c0392b;
    justify-content: flex-end;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.03) 0%, rgba(231, 76, 60, 0.08) 100%);
    border: 1px solid rgba(231, 76, 60, 0.12);
}

.dio-header--driver {
    color: #0f766e;
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.08) 0%, rgba(13, 148, 136, 0.03) 100%);
    border: 1px solid rgba(13, 148, 136, 0.12);
}

/* Items list */
.dio-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Card styles */
.dio-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(44, 62, 80, 0.04),
        0 2px 8px rgba(44, 62, 80, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1.5px solid rgba(44, 62, 80, 0.06);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on hover */
.dio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.dio-card:hover {
    box-shadow:
        0 4px 12px rgba(44, 62, 80, 0.08),
        0 8px 24px rgba(44, 62, 80, 0.06);
    transform: translateY(-3px);
}

.dio-card:hover::before {
    left: 100%;
}

/* Inhibitor cards - reversed layout */
.dio-inhibitors .dio-card {
    flex-direction: row-reverse;
    text-align: right;
}

.dio-inhibitors .dio-card:hover {
    border-color: rgba(231, 76, 60, 0.25);
    background: linear-gradient(135deg, white 0%, rgba(231, 76, 60, 0.02) 100%);
    box-shadow:
        0 4px 12px rgba(231, 76, 60, 0.1),
        0 8px 24px rgba(231, 76, 60, 0.08);
}

/* Driver cards */
.dio-drivers .dio-card:hover {
    border-color: rgba(13, 148, 136, 0.25);
    background: linear-gradient(135deg, white 0%, rgba(13, 148, 136, 0.02) 100%);
    box-shadow:
        0 4px 12px rgba(13, 148, 136, 0.1),
        0 8px 24px rgba(13, 148, 136, 0.08);
}

/* Badge */
.dio-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
}

.dio-card:hover .dio-badge {
    transform: scale(1.08);
    border-radius: 12px;
}

.dio-badge--inhibitor {
    background: linear-gradient(145deg, #ef5350 0%, #c62828 100%);
    box-shadow:
        0 2px 8px rgba(231, 76, 60, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dio-card:hover .dio-badge--inhibitor {
    box-shadow:
        0 4px 16px rgba(231, 76, 60, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.dio-badge--driver {
    background: linear-gradient(145deg, #26a69a 0%, #00796b 100%);
    box-shadow:
        0 2px 8px rgba(13, 148, 136, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dio-card:hover .dio-badge--driver {
    box-shadow:
        0 4px 16px rgba(13, 148, 136, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Content */
.dio-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.dio-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    display: block;
    transition: color 0.2s ease;
    line-height: 1.3;
}

.dio-inhibitors .dio-card:hover .dio-title {
    color: #b91c1c;
}

.dio-drivers .dio-card:hover .dio-title {
    color: #047857;
}

.dio-desc {
    font-size: 0.75rem;
    color: #888;
    display: block;
    margin-top: 3px;
}

/* Percentage */
.dio-pct {
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.dio-pct--inhibitor {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.dio-card:hover .dio-pct--inhibitor {
    background: rgba(231, 76, 60, 0.2);
}

.dio-pct--driver {
    color: #0d9488;
    background: rgba(13, 148, 136, 0.1);
}

.dio-card:hover .dio-pct--driver {
    background: rgba(13, 148, 136, 0.2);
}

/* Center Hub */
.dio-center {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 15px;
    align-self: center;
}

.dio-hub {
    width: 160px;
    height: 160px;
    background: linear-gradient(145deg, #34495e 0%, #1a252f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow:
        0 8px 32px rgba(44, 62, 80, 0.25),
        0 2px 8px rgba(44, 62, 80, 0.15),
        inset 0 -4px 12px rgba(0, 0, 0, 0.2),
        inset 0 4px 12px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
    border: 3px solid rgba(255, 255, 255, 0.08);
}

/* Glowing outer ring */
.dio-hub::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(231, 76, 60, 0.15),
        rgba(231, 76, 60, 0.05) 25%,
        rgba(13, 148, 136, 0.05) 50%,
        rgba(13, 148, 136, 0.15) 75%,
        rgba(231, 76, 60, 0.15)
    );
    animation: dio-rotate 12s linear infinite;
    z-index: -1;
}

/* Soft glow */
.dio-hub::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 62, 80, 0.15) 0%, transparent 70%);
    z-index: -2;
}

@keyframes dio-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Connection lines - elegant gradient bars */
.dio-center .dio-connector-left,
.dio-center .dio-connector-right {
    position: absolute;
    top: 50%;
    height: 2px;
    width: 50px;
    z-index: 1;
    transform: translateY(-50%);
}

/* Flow indicators via pseudo-elements on hub wrapper */
.drivers-inhibitors-overview .dio-center::before,
.drivers-inhibitors-overview .dio-center::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 2px;
    width: 45px;
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 2px;
}

.drivers-inhibitors-overview .dio-center::before {
    right: calc(50% + 90px);
    background: linear-gradient(to left, rgba(44, 62, 80, 0.4), rgba(231, 76, 60, 0.3));
}

.drivers-inhibitors-overview .dio-center::after {
    left: calc(50% + 90px);
    background: linear-gradient(to right, rgba(44, 62, 80, 0.4), rgba(13, 148, 136, 0.3));
}

.dio-hub-text {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dio-hub-text i {
    display: block;
    margin-bottom: 8px;
    font-size: 2.2em;
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Legend */
.dio-legend {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 25px 0 35px;
    padding: 16px 24px;
    background: rgba(44, 62, 80, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(44, 62, 80, 0.04);
}

.dio-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.dio-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dio-legend-dot--inhibitor {
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
}

.dio-legend-dot--driver {
    background: linear-gradient(135deg, #26a69a 0%, #00796b 100%);
}

/* Staggered animation on load */
.dio-card {
    animation: dio-fadeIn 0.5s ease-out backwards;
}

.dio-items .dio-card:nth-child(1) { animation-delay: 0.1s; }
.dio-items .dio-card:nth-child(2) { animation-delay: 0.15s; }
.dio-items .dio-card:nth-child(3) { animation-delay: 0.2s; }
.dio-items .dio-card:nth-child(4) { animation-delay: 0.25s; }
.dio-items .dio-card:nth-child(5) { animation-delay: 0.3s; }
.dio-items .dio-card:nth-child(6) { animation-delay: 0.35s; }
.dio-items .dio-card:nth-child(7) { animation-delay: 0.4s; }
.dio-items .dio-card:nth-child(8) { animation-delay: 0.45s; }
.dio-items .dio-card:nth-child(9) { animation-delay: 0.5s; }

@keyframes dio-fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1100px) {
    .drivers-inhibitors-overview {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }

    .drivers-inhibitors-overview::before,
    .drivers-inhibitors-overview::after {
        display: none;
    }

    .dio-center {
        order: -1;
        padding: 15px;
    }

    .drivers-inhibitors-overview .dio-center::before,
    .drivers-inhibitors-overview .dio-center::after {
        display: none;
    }

    .dio-header {
        justify-content: center !important;
    }

    .dio-inhibitors .dio-card {
        flex-direction: row;
        text-align: left;
    }

    .dio-hub {
        width: 140px;
        height: 140px;
    }

    .dio-hub::before {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }

    .dio-hub-text {
        font-size: 0.8rem;
        letter-spacing: 1.5px;
    }

    .dio-hub-text i {
        font-size: 1.8em;
        margin-bottom: 6px;
    }
}

@media (max-width: 600px) {
    .drivers-inhibitors-overview {
        padding: 24px 16px;
        margin: 25px 0;
        border-radius: 20px;
        gap: 24px;
    }

    .dio-card {
        padding: 10px 14px;
        border-radius: 12px;
    }

    .dio-badge {
        width: 34px;
        height: 34px;
        font-size: 0.7rem;
        border-radius: 8px;
    }

    .dio-title {
        font-size: 0.85rem;
    }

    .dio-pct {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .dio-legend {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        padding: 14px 20px;
    }

    .dio-hub {
        width: 120px;
        height: 120px;
    }

    .dio-hub::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }

    .dio-hub-text {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .dio-hub-text i {
        font-size: 1.6em;
        margin-bottom: 5px;
    }

    .dio-header {
        font-size: 0.75rem;
        padding: 8px 14px;
    }

    .dio-items {
        gap: 6px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .dio-card {
        animation: none;
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .dio-card::before {
        display: none;
    }

    .dio-hub::before {
        animation: none;
    }

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

    .dio-card:hover .dio-badge {
        transform: none;
    }
}

/* ==========================================================================
   PORTRAIT LIGHTBOX EFFECT
   Hover-triggered mini lightbox for all portrait images
   Optimized for smooth transitions with proper layer promotion
   ========================================================================== */

/* The lightbox container */
.portrait-lightbox {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: white;
    padding: 8px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 0 60px rgba(255, 255, 255, 0.4),
        0 0 120px rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85);
    /* Sync with mid-res transition for smooth appearance */
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-sizing: border-box;
    /* Layer promotion hints for GPU acceleration */
    will-change: transform, opacity;
    contain: layout style paint;
    /* Safari flicker prevention */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.portrait-lightbox.visible {
    opacity: 1;
    transform: scale(1);
}

/* Image container for layered blur-up effect */
.portrait-lightbox .lightbox-images {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    /* Promote to own layer */
    will-change: contents;
}

.portrait-lightbox img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    border-radius: 50%;
    /* GPU acceleration for image transitions */
    will-change: opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Blurred placeholder - scales up the thumbnail */
.portrait-lightbox .lightbox-placeholder {
    filter: blur(8px);
    transform: scale(1.05); /* Slightly larger to hide blur edges */
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

/* Loading shimmer overlay */
.portrait-lightbox .lightbox-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 80%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mid-res image - fades in over placeholder */
.portrait-lightbox .lightbox-midres {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.portrait-lightbox .lightbox-midres.loaded {
    opacity: 1;
}

/* Hide placeholder once mid-res is loaded */
.portrait-lightbox.midres-ready .lightbox-placeholder {
    opacity: 0;
}

/* Hide shimmer AND stop animation once mid-res is loaded (saves GPU) */
.portrait-lightbox.midres-ready .lightbox-shimmer {
    opacity: 0;
    animation: none;
}

/* Make portrait images interactive */
.hero-portrait-wrapper img,
.about-portrait-wrapper img,
.testimonial-avatar,
.foreword-avatar {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Subtle hover effect on the original portrait */
.hero-portrait-wrapper:hover,
.about-portrait-wrapper:hover {
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.4),
        0 8px 25px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
}

.testimonial-avatar:hover,
.foreword-avatar:hover {
    box-shadow:
        0 0 0 3px rgba(44, 62, 80, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.18);
    transform: scale(1.03);
}

/* Ensure containers can show hover effects */
.hero-portrait-wrapper,
.about-portrait-wrapper {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hero section overflow visible */
.hero-authors .author-photos {
    overflow: visible;
}

/* Testimonial/foreword containers */
.testimonial-author,
.foreword-author {
    overflow: visible;
}

/* Mobile: disable lightbox popup */
@media (max-width: 768px) {
    .portrait-lightbox {
        display: none;
    }
}

/* Reduced motion: instant transitions, no animations */
@media (prefers-reduced-motion: reduce) {
    .portrait-lightbox {
        transition: opacity 0.1s;
        transform: scale(1);
        will-change: auto;
    }

    .portrait-lightbox .lightbox-shimmer {
        animation: none;
    }

    .hero-portrait-wrapper:hover,
    .about-portrait-wrapper:hover,
    .testimonial-avatar:hover,
    .foreword-avatar:hover {
        transform: none;
    }
}
