/* ============================================
   ERIC COSTE - RESOURCES PAGE
   Free Downloads & Guides
   Mobile-first responsive design
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-primary: #000;
    --color-secondary: #333;
    --color-accent: #16a34a;
    --color-accent-light: #f0fdf4;
    --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);
}

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

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

body {
    font-family: var(--font-stack);
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -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 ---------- */
: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: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: text-decoration-thickness var(--transition-fast);
}

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: var(--border-width) solid var(--color-border);
    cursor: pointer;
    transition: 
        background-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-bg);
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--color-bg);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-bg);
    transform: translateY(-2px);
}

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

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-bg);
    border-bottom: var(--border-width) solid var(--color-border);
}

.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;
}

.header-nav {
    display: flex;
    gap: 20px;
}

.back-link {
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* ---------- Hero Section ---------- */
.hero {
    padding: 60px 0 80px;
    border-bottom: var(--border-width) solid var(--color-border);
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-bg) 100%);
}

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

.hero-title {
    font-size: clamp(28px, 7vw, 48px);
    margin-bottom: 20px;
    max-width: 700px;
}

.hero-subtitle {
    font-size: clamp(16px, 3.5vw, 20px);
    margin-bottom: 0;
    max-width: 600px;
    color: var(--color-secondary);
    line-height: 1.7;
}

/* ---------- Sections ---------- */
.section {
    padding: 80px 0;
    border-bottom: var(--border-width) solid var(--color-border);
}

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

/* ---------- Resources Grid ---------- */
.resources-section {
    background-color: var(--color-bg-alt);
}

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

.resource-card {
    background-color: var(--color-bg);
    border: var(--border-width) solid var(--color-border);
    padding: 25px;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.resource-card.resource-coming-soon {
    opacity: 0.7;
    background-color: #fafafa;
}

.resource-card.resource-coming-soon:hover {
    transform: none;
    box-shadow: none;
}

.resource-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    margin-bottom: 20px;
    border: 2px solid var(--color-border);
    overflow: hidden;
    background-color: #eee;
}

.resource-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-medium);
}

.resource-card:hover .resource-cover img {
    transform: scale(1.02);
}

.resource-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ddd;
}

.placeholder-text {
    font-size: 18px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resource-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.resource-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.resource-badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--color-accent);
    color: var(--color-bg);
    margin-bottom: 15px;
    align-self: flex-start;
}

.resource-coming-soon .resource-badge {
    background-color: #999;
}

.resource-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.resource-description {
    font-size: 15px;
    color: var(--color-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.resource-includes {
    list-style: none;
    margin-bottom: 25px;
    padding: 0;
    flex: 1;
}

.resource-includes li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--color-secondary);
}

.resource-includes li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

.resource-card .btn {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

/* ---------- CTA Section ---------- */
.cta-section {
    background-color: var(--color-bg);
    text-align: center;
}

.cta-subtitle {
    font-size: 18px;
    color: var(--color-secondary);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

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

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background-color: var(--color-bg);
    border: var(--border-width) solid var(--color-border);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px 30px;
    position: relative;
    animation: slideUp 0.25s ease;
    text-align: center;
}

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

.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;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--color-primary);
    color: var(--color-bg);
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.modal-intro {
    margin-bottom: 25px;
    color: var(--color-secondary);
    font-size: 16px;
}

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

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 18px;
    font-family: inherit;
    border: var(--border-width) solid var(--color-border);
    background-color: var(--color-bg);
    outline: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.form-input:focus {
    background-color: var(--color-bg-alt);
    border-color: var(--color-secondary);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

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

.form-message.success {
    color: var(--color-success);
}

.form-message.error {
    color: var(--color-error);
}

.form-note {
    margin-top: 15px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.hidden-field {
    display: none;
}

/* ---------- Footer ---------- */
.footer {
    padding: 40px 0;
    text-align: center;
}

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

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

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (min-width: 600px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-buttons {
        flex-direction: row;
    }
}

@media (min-width: 900px) {
    .hero {
        padding: 80px 0 100px;
    }
    
    .section {
        padding: 100px 0;
    }
    
    .resources-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .header-inner {
        padding: 20px 40px;
    }
}

/* ---------- Reduced Motion ---------- */
@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;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    .header,
    .btn,
    .modal-overlay,
    .cta-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    .section {
        border-bottom: 1px solid #000;
        padding: 20px 0;
    }
}
