/*
 Theme Name: TriviaCharlie
 Theme URI: https://triviacharlie.com
 Author: Brilliantio Ltd
 Description: Warm, senior-friendly child theme for TriviaCharlie.com — trivia books by Charlie Mercer.
 Version: 4.0.0
 Requires at least: 6.0
 Tested up to: 6.9
 Requires PHP: 7.4
 Template: generatepress
 Text Domain: triviacharlie
*/

/* =========================================
   Brand Tokens
   ========================================= */
:root {
    --tc-primary: #D4843E;
    --tc-primary-hover: #BF7232;
    --tc-primary-dark: #A6622A;
    --tc-secondary: #2B4C7E;
    --tc-secondary-hover: #1E3A63;
    --tc-accent-light: #FFF0E0;
    --tc-cream: #F5F0E8;
    --tc-warm-white: #FFF8F0;
    --tc-border: #E8E2D8;
    --tc-text: #333333;
    --tc-text-muted: #555555;
    --tc-success: #2D6A4F;
    --tc-error: #C0392B;
    --tc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --tc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    --tc-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
    --tc-shadow-glow: 0 4px 20px rgba(212, 132, 62, 0.25);
    --tc-radius: 12px;
    --tc-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Base
   ========================================= */
body {
    font-size: 19px;
}

:focus-visible {
    outline: 3px solid var(--tc-secondary);
    outline-offset: 2px;
}

/* =========================================
   Hero Section
   ========================================= */
.tlc-hero {
    position: relative;
    overflow: hidden;
}

.tlc-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 132, 62, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tlc-hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 132, 62, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

.tlc-hero__title {
    animation: fadeInUp 0.8s ease-out;
}

.tlc-hero > .wp-block-paragraph {
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.tlc-hero > .wp-block-buttons {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* =========================================
   Buttons — Primary (amber)
   ========================================= */
.tlc-btn-primary .wp-block-button__link {
    transition: all var(--tc-transition);
    box-shadow: var(--tc-shadow-sm);
    position: relative;
    overflow: hidden;
}

.tlc-btn-primary .wp-block-button__link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--tc-transition);
}

.tlc-btn-primary .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--tc-shadow-glow);
    background-color: var(--tc-primary-dark) !important;
}

.tlc-btn-primary .wp-block-button__link:hover::after {
    opacity: 1;
}

.tlc-btn-primary .wp-block-button__link:active {
    transform: translateY(0);
    box-shadow: var(--tc-shadow-sm);
}

/* =========================================
   Buttons — Secondary (blue)
   ========================================= */
.tlc-btn-secondary .wp-block-button__link {
    transition: all var(--tc-transition);
    box-shadow: var(--tc-shadow-sm);
}

.tlc-btn-secondary .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--tc-shadow-md);
    background-color: var(--tc-secondary-hover) !important;
}

.tlc-btn-secondary .wp-block-button__link:active {
    transform: translateY(0);
}

/* =========================================
   Buttons — Ghost (coming soon)
   ========================================= */
.tlc-btn-ghost .wp-block-button__link {
    transition: all var(--tc-transition);
    border: 2px solid var(--tc-border);
    background: transparent !important;
}

.tlc-btn-ghost .wp-block-button__link:hover {
    border-color: var(--tc-primary);
    color: var(--tc-primary) !important;
    transform: translateY(-1px);
}

/* =========================================
   Book Cards
   ========================================= */
.tlc-book-card {
    background: #ffffff;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius) !important;
    box-shadow: var(--tc-shadow-sm);
    transition: all var(--tc-transition);
    overflow: hidden;
}

.tlc-book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--tc-shadow-lg);
}

.tlc-book-card__header {
    position: relative;
}

.tlc-book-card__header p:first-child {
    transition: transform var(--tc-transition);
}

.tlc-book-card:hover .tlc-book-card__header p:first-child {
    transform: scale(1.1);
}

/* Coming soon card has muted look */
.tlc-book-card--coming-soon {
    opacity: 0.85;
}

.tlc-book-card--coming-soon:hover {
    opacity: 1;
}

/* Badge styling */
.tlc-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

/* =========================================
   Testimonial Cards
   ========================================= */
.tlc-testimonial-card {
    background: #ffffff;
    border-radius: var(--tc-radius);
    border-left: 4px solid var(--tc-primary);
    padding: 2rem 1.75rem;
    box-shadow: var(--tc-shadow-sm);
    transition: all var(--tc-transition);
    position: relative;
}

.tlc-testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 0.75rem;
    left: 1.25rem;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--tc-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    pointer-events: none;
}

.tlc-testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tc-shadow-md);
    border-left-color: var(--tc-primary-dark);
}

.tlc-testimonial-card__quote {
    position: relative;
    z-index: 1;
    font-style: italic;
}

.tlc-testimonial-card__author {
    position: relative;
    z-index: 1;
}

/* =========================================
   About Section — decorative accent
   ========================================= */
.tlc-about {
    position: relative;
}

.tlc-about > h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--tc-primary);
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* =========================================
   Bottom CTA — subtle pulse on button
   ========================================= */
@keyframes subtlePulse {
    0%, 100% { box-shadow: var(--tc-shadow-sm); }
    50% { box-shadow: var(--tc-shadow-glow); }
}

.tlc-bottom-cta .tlc-btn-primary .wp-block-button__link {
    animation: subtlePulse 3s ease-in-out infinite;
}

.tlc-bottom-cta .tlc-btn-primary .wp-block-button__link:hover {
    animation: none;
    box-shadow: var(--tc-shadow-glow);
}

/* =========================================
   Signup Section — form polish
   ========================================= */
.tlc-signup-section {
    position: relative;
}

.tlc-signup-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--tc-primary), transparent);
    border-radius: 2px;
}

/* =========================================
   Site Header — warm accent
   ========================================= */
.main-title a,
.site-logo a {
    color: var(--tc-primary) !important;
    transition: color var(--tc-transition);
}

.main-title a:hover,
.site-logo a:hover {
    color: var(--tc-primary-hover) !important;
}

/* =========================================
   Navigation CTA
   ========================================= */
.main-navigation .menu > li.tlc-nav-cta > a {
    background: var(--tc-primary);
    color: #FFFFFF !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--tc-transition);
}

.main-navigation .menu > li.tlc-nav-cta > a:hover {
    background: var(--tc-primary-hover);
    box-shadow: var(--tc-shadow-sm);
}

/* =========================================
   Sidebar
   ========================================= */
.inside-right-sidebar .widget-title {
    color: var(--tc-primary);
}

.inside-right-sidebar a:hover {
    color: var(--tc-primary);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    border-top: 1px solid var(--tc-border);
}

/* =========================================
   Responsive — Mobile polish
   ========================================= */
@media (max-width: 768px) {
    .tlc-hero {
        padding-top: 4rem !important;
        padding-bottom: 3rem !important;
    }

    .tlc-hero::before,
    .tlc-hero::after {
        display: none;
    }

    .tlc-book-card:hover,
    .tlc-testimonial-card:hover {
        transform: none;
    }

    .tlc-testimonial-card {
        padding: 1.5rem 1.25rem;
    }

    .tlc-testimonial-card::before {
        font-size: 2.5rem;
        top: 0.5rem;
        left: 1rem;
    }
}

/* =========================================
   Smooth scroll for anchor links
   ========================================= */
html {
    scroll-behavior: smooth;
}

/* =========================================
   Reduced motion — respect user preference
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
