/* ============================================
   ERIC COSTE - CREDIT HUB
   Brutalist Style with Warm, Welcoming Feel
   Mobile-first responsive design
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-primary: #000;
    --color-secondary: #333;
    --color-accent: #fbbf24;
    --color-bg: #fff;
    --color-bg-alt: #f5f5f5;
    --color-text: #000;
    --color-text-muted: #666;
    --color-border: #000;
    --color-error: #dc2626;
    --color-success: #16a34a;
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --border-width: 3px;
    --transition-fast: 0.15s ease;
    --transition-medium: 0.25s ease;
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --focus-ring: 0 0 0 3px rgba(0,0,0,0.3);
}

/* ---------- CSS Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Utility Classes ---------- */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Focus States (Accessibility) ---------- */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
details:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-thickness: 3px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 3px solid #000;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: #000;
    color: #fff;
}

.btn-primary:hover {
    background-color: #222;
}

.btn-secondary {
    background-color: #fff;
    color: #000;
}

.btn-secondary:hover {
    background-color: #000;
    color: #fff;
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-disabled {
    background-color: #ddd;
    color: #666;
    border-color: #999;
    cursor: not-allowed;
}

.btn-disabled:hover {
    transform: none;
}

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #fff;
    border-bottom: 3px solid #000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.back-link {
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Hero Section ---------- */
.hero {
    padding: 80px 0 100px;
    border-bottom: 3px solid #000;
    background-color: #fafafa;
}

.hero-eyebrow {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    color: #555;
}

.hero-title {
    font-size: clamp(32px, 7vw, 52px);
    margin-bottom: 20px;
    max-width: 750px;
}

.hero-subtitle {
    font-size: clamp(18px, 4vw, 21px);
    margin-bottom: 40px;
    max-width: 600px;
    color: #333;
    line-height: 1.7;
}

/* ---------- Sections ---------- */
.section {
    padding: 80px 0;
    border-bottom: 3px solid #000;
}

.section-title {
    font-size: clamp(26px, 5vw, 38px);
    margin-bottom: 25px;
}

.section-intro {
    font-size: 18px;
    color: #333;
    margin-bottom: 40px;
    max-width: 600px;
}

/* ---------- Empathy Section ---------- */
.empathy-section {
    background-color: #fff;
}

.empathy-content {
    max-width: 700px;
}

.empathy-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.empathy-content p:last-child {
    margin-bottom: 0;
}

/* ---------- Books Section ---------- */
.books-section {
    background-color: #f5f5f5;
}

/* ---------- Trust Stats Section ---------- */
.trust-section {
    background-color: #000;
    color: #fff;
    padding: 60px 0;
}

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

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.trust-number {
    font-size: clamp(36px, 8vw, 48px);
    font-weight: 900;
    line-height: 1;
}

.trust-stars {
    font-size: 24px;
    color: #fbbf24;
    letter-spacing: 2px;
}

.trust-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ccc;
}

/* ---------- Testimonials Section ---------- */
.testimonials-section {
    background-color: #fff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.testimonial-card {
    border: 3px solid #000;
    padding: 30px 25px;
    background-color: #fafafa;
}

.testimonial-stars {
    font-size: 20px;
    color: #fbbf24;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.testimonial-quote {
    font-size: 17px;
    line-height: 1.7;
    margin: 0 0 20px 0;
    color: #333;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-weight: 700;
    font-size: 15px;
}

.author-detail {
    font-size: 13px;
    color: #666;
}

.books-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.book-card {
    display: flex;
    flex-direction: column;
    border: 3px solid #000;
    background-color: #fff;
    overflow: hidden;
}

.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-bottom: 3px solid #000;
    overflow: hidden;
    background-color: #eee;
}

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

.book-details {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-title {
    font-size: 22px;
    margin-bottom: 10px;
}

.book-tagline {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    flex-grow: 1;
}

.book-card .btn {
    text-align: center;
    align-self: stretch;
}

/* ---------- Bundle Badge ---------- */
.bundle-badge {
    display: inline-block;
    background-color: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 10px;
    margin-bottom: 5px;
    margin-right: 8px;
}

.bundle-card {
    border-color: #000;
    background-color: #fff;
}

/* ---------- Price Badge ---------- */
.price-badge {
    display: inline-block;
    background-color: #1a56db;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    margin-bottom: 10px;
}

.price-badge.free-badge {
    background-color: #047857;
}

/* ---------- Learn Section ---------- */
.learn-section {
    background-color: #fff;
}

.learn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.learn-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border: 2px solid #ddd;
    background-color: #fafafa;
}

.learn-icon {
    font-size: 20px;
    font-weight: 900;
    color: #000;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}

.learn-item p {
    font-size: 17px;
    margin: 0;
}

/* ---------- FAQ Section ---------- */
.faq-section {
    background-color: #f5f5f5;
}

.faq-list {
    max-width: 700px;
}

.faq-item {
    border: 3px solid #000;
    margin-bottom: 15px;
    background-color: #fff;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    font-weight: 900;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-item[open] .faq-question {
    border-bottom: 2px solid #000;
}

.faq-answer {
    padding: 20px;
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

/* ---------- Lead Capture Section ---------- */
.lead-section {
    background-color: #fff;
}

.lead-box {
    border: 3px solid #000;
    padding: 40px 30px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background-color: #fafafa;
}

.lead-title {
    font-size: clamp(24px, 5vw, 32px);
    margin-bottom: 15px;
}

.lead-subtitle {
    font-size: 18px;
    color: #333;
    margin-bottom: 30px;
}

.lead-form {
    max-width: 400px;
    margin: 0 auto;
}

.lead-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lead-form .form-input {
    width: 100%;
    min-width: 0;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 18px;
    font-family: inherit;
    border: 3px solid #000;
    background-color: #fff;
    outline: none;
    box-sizing: border-box;
}

.form-input:focus {
    background-color: #f0f0f0;
}

.form-input::placeholder {
    color: #666;
}

.form-message {
    margin-top: 15px;
    font-size: 16px;
    font-weight: 700;
}

.form-message.success {
    color: #000;
}

.form-message.error {
    color: #900;
}

.form-note {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* Hidden honeypot field for Netlify Forms */
.hidden-field {
    display: none;
}

/* ---------- Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: #fff;
    border: 3px solid #000;
    width: 100%;
    max-width: 450px;
    padding: 40px 30px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
}

.modal-close:hover {
    background-color: #000;
    color: #fff;
}

.modal-title {
    font-size: 26px;
    margin-bottom: 10px;
}

.modal-intro {
    margin-bottom: 25px;
    color: #333;
    font-size: 16px;
}

.modal-form .form-field {
    margin-bottom: 15px;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.btn-free-guide {
    width: 100%;
    cursor: pointer;
}

/* ---------- CTA Section ---------- */
.cta-section {
    background-color: #000;
    color: #fff;
    text-align: center;
}

.cta-section .section-title {
    color: #fff;
}

.cta-subtitle {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 35px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-primary {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.cta-section .btn-primary:hover {
    background-color: #eee;
}

/* ---------- Sticky Bottom Bar ---------- */
.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border-top: 3px solid #000;
    padding: 15px 20px;
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.sticky-bar.hidden {
    transform: translateY(100%);
}

.sticky-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    gap: 15px;
}

.sticky-text {
    font-weight: 700;
    font-size: 16px;
}

/* ---------- Footer ---------- */
.footer {
    padding: 40px 0;
    text-align: center;
    /* Extra padding at bottom for sticky bar on mobile */
    padding-bottom: 100px;
}

.footer-copyright {
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-link {
    font-size: 14px;
}

/* ============================================
   RESPONSIVE STYLES - Tablet and up
   ============================================ */
@media (min-width: 600px) {
    /* Books grid - 2 columns */
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Trust grid - 3 columns */
    .trust-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    /* Testimonials grid - 2 columns */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Learn grid - 2 columns */
    .learn-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Lead form - horizontal */
    .lead-form .form-group {
        flex-direction: row;
        align-items: stretch;
    }
    
    .lead-form .form-input {
        flex: 1;
        min-width: 0;
    }
    
    .lead-form .btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ============================================
   RESPONSIVE STYLES - Desktop
   ============================================ */
@media (min-width: 900px) {
    body {
        font-size: 19px;
    }
    
    .header-inner {
        padding: 20px 40px;
    }
    
    .hero {
        padding: 120px 0 140px;
    }
    
    .section {
        padding: 100px 0;
    }
    
    /* Books grid - 3 columns */
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Testimonials grid - 3 columns */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Learn grid - 3 columns */
    .learn-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Sticky bar adjustments for desktop */
    .sticky-bar {
        padding: 20px 40px;
    }
    
    .sticky-text {
        font-size: 18px;
    }
    
    .footer {
        padding-bottom: 120px;
    }
}

/* ============================================
   RESPONSIVE STYLES - Large Desktop
   ============================================ */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
    }
    
    .header-inner {
        max-width: 1400px;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .header,
    .sticky-bar,
    .lead-section,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .section {
        border-bottom: 1px solid #000;
        padding: 20px 0;
    }
    
    .footer {
        padding-bottom: 20px;
    }
}
