:root {
    /* Colors */
    --primary-color: #2c3e50;    /* Deep Slate */
    --secondary-color: #c5a059;  /* Egyptian Gold */
    --accent-color: #e67e22;     /* Ochre */
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #eeeeee;
    --card-bg: #fdfdfd;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Crimson Pro', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

/* Header & Navigation */
header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Hero Section */
.hero {
    padding: var(--spacing-lg) 0;
    text-align: center;
    background: linear-gradient(180deg, #f9f9f9 0%, #ffffff 100%);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
}

.hero-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
    filter: grayscale(20%) contrast(1.1);
}

.grid-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    margin-bottom: var(--spacing-sm);
    filter: sepia(15%) contrast(1.05);
    background-color: #f0f0f0;
}

/* Book Section */
.book-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    padding: var(--spacing-lg) 0;
}

.book-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 550px;
    object-fit: contain;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    display: block;
}

.book-info h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.book-info .tagline {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    display: block;
}

/* Features/Arcs Section */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.arc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    width: 100%;
    max-width: 100%;
}

.arc-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: var(--spacing-md);
    border-radius: 4px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.arc-card:hover {
    transform: translateY(-5px);
}

.arc-card h3, .arc-card h4 {
    margin-bottom: var(--spacing-sm);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-sm);
    font-size: 1rem;
}

th {
    background: #f8f9fa;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

td, th {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    padding-bottom: var(--spacing-md);
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--spacing-md);
    /* Dynamic padding to align the first card with the .container */
    padding: var(--spacing-md) calc((100vw - 1100px) / 2 + var(--spacing-sm));
    scrollbar-width: none;
}

/* Fallback for small screens or browsers that don't support calc/vw well in this context */
@media (max-width: 1140px) {
    .carousel-track {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    flex: 0 0 350px;
    scroll-snap-align: center;
    background: rgba(255, 255, 255, 0.08);
    padding: 2.5rem; /* Increased padding for better text breathing room */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    /* Removed overflow: hidden to prevent "cutoff" look on background numbers */
    display: flex;
    flex-direction: column;
    min-height: 320px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.carousel-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
}

.carousel-card h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.carousel-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 2;
}

.card-num {
    font-family: var(--font-heading);
    font-size: 10rem;
    color: white;
    opacity: 0.03; /* Slightly more subtle */
    position: absolute;
    bottom: -20px;
    right: 5%; /* Positioned relative to card width to avoid edge-cutting */
    line-height: 1;
    pointer-events: none;
    font-weight: 800;
    z-index: 1;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.nav-btn {
    background: var(--secondary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Call to Action */
.cta-section {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--secondary-color);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-top: var(--spacing-md);
    transition: background 0.3s ease;
}

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

/* Footer */
footer {
    padding: var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .book-showcase { grid-template-columns: 1fr; text-align: center; }
    .nav-links { display: none; }
}

@media (max-width: 480px) {
    .carousel-card { flex: 0 0 280px; }
}
