/* CSS Design System for Matthew Landis - Author Website (White Background & Red Accent) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --accent-gold: #dc2626; /* Using red accent for --accent-gold to preserve HTML variables */
    --accent-gold-hover: #b91c1c;
    --text-primary: #0f172a; /* Slate 900 - Blue-Black */
    --text-secondary: #334155; /* Slate 700 - Deep Blue-Gray */
    --text-muted: #64748b; /* Slate 500 - Muted Slate */
    --border-color: #e2e8f0; /* Slate 200 - Light border */
    
    /* Fonts */
    --font-sans: 'Inter', sans-serif;
    --font-title: 'Outfit', sans-serif;
    
    /* Transitions & Shadows */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px rgba(15, 23, 42, 0.05);
    --shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.1);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
    margin-top: 0.2rem;
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 350;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

/* Layout Containers */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    padding: 8rem 0;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

header.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

.logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-transform: uppercase;
}

.logo span {
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-family: var(--font-title);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent-gold);
}

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

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-smooth);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-gold);
}

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

.btn-secondary:hover {
    background-color: rgba(15, 23, 42, 0.05);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    background: radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(15, 23, 42, 0.03) 0%, transparent 60%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-subtitle {
    font-family: var(--font-title);
    color: var(--accent-gold);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: var(--transition-smooth);
}

.hero-image:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: var(--shadow-hover);
}

/* Hero Carousel */
.hero-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 10;
}

.hero-carousel:hover .carousel-prev,
.hero-carousel:hover .carousel-next {
    opacity: 0.85;
}

.carousel-prev:hover,
.carousel-next:hover {
    opacity: 1 !important;
    background: var(--accent-gold);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-indicators {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.indicator.active {
    background: var(--accent-gold);
    width: 22px;
    border-radius: 10px;
}

/* Quote Spotlight Banner */
.quote-slides-container {
    position: relative;
    min-height: 110px;
}

.quote-slide {
    display: none;
    animation: fadeInQuote 0.5s ease forwards;
}

.quote-slide.active {
    display: block;
}

@keyframes fadeInQuote {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* About Carousel */
.about-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.about-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.about-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.about-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.about-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-prev,
.about-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 10;
}

.about-carousel:hover .about-prev,
.about-carousel:hover .about-next {
    opacity: 0.85;
}

.about-prev:hover,
.about-next:hover {
    opacity: 1 !important;
    background: var(--accent-gold);
}

.about-prev { left: 10px; }
.about-next { right: 10px; }

.about-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.about-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.about-indicator.active {
    background: var(--accent-gold);
    width: 20px;
    border-radius: 8px;
}

/* Feature Grid / Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: var(--shadow-hover);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Books Section & Book Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.book-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
    box-shadow: var(--shadow-premium);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(220, 38, 38, 0.3);
}

.book-cover-container {
    background-color: var(--bg-secondary);
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    min-height: 320px;
}

.book-cover {
    width: 160px;
    height: 240px;
    background-color: transparent;
    border-radius: 6px;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.2);
    display: block;
    padding: 0;
    border: none;
    object-fit: cover;
}

.book-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-tag {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.book-info h3 {
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.book-info p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
}

/* School Visits Styling */
.visit-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.visit-offerings {
    list-style: none;
}

.visit-offerings li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-weight: 350;
}

.visit-offerings li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: 700;
}

.rv-badge {
    background-color: rgba(220, 38, 38, 0.08);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Forms styling */
.form-container {
    max-width: 600px;
    margin: 3rem auto 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem;
    box-shadow: var(--shadow-premium);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Testimonials / Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.stat-item h4 {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-family: var(--font-title);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

/* Footer styling - Deep Slate/Blue-Black Footer for Grounding */
footer {
    background-color: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5rem 0 3rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

footer h3, footer h5 {
    color: #ffffff;
}

footer p {
    color: #94a3b8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info h3 {
    margin-bottom: 1rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-links-grid h5 {
    color: #ffffff;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.footer-links-grid ul {
    list-style: none;
}

.footer-links-grid ul li {
    margin-bottom: 0.75rem;
}

.footer-links-grid ul a {
    color: #cbd5e1;
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transition: var(--transition-smooth);
}

.social-icon:hover {
    background-color: var(--accent-gold);
    color: #ffffff;
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    color: #64748b;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-image-wrapper {
        order: -1;
    }
    
    .hero-image {
        max-width: 300px;
    }
    
    .btn-group {
        justify-content: center;
    }
    
    .visit-details {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.85rem;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3rem;
        transform: translateX(100%);
        transition: var(--transition-smooth);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-premium);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
