/* ========== RESOURCES PAGE ========== */

/* Keyframes */
@keyframes color-blink-in {
    0%   { color: #22aaee; opacity: 0; }
    20%  { opacity: 1; }
    35%  { color: #22aaee; }
    55%  { opacity: 0.6; }
    70%  { color: inherit; }
    85%  { opacity: 1; }
    100% { opacity: 1; }
}

/* Override body for dark theme */
body {
    background: #0a0f1a;
    color: #b8bcc8;
}

h1, h2, h3, h4, h5, h6 { color: #ffffff; }

nav.dark { border-bottom-color: transparent; }

/* Full-page particle canvas */
.page-particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 1;
    padding-top: 64px;
}

main section { position: relative; }

.section-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========== HERO ========== */
.resources-hero {
    padding: 5rem 0 3rem;
    text-align: center;
}

.resources-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.resources-hero h1 .char {
    display: inline-block;
    opacity: 0;
}

.resources-hero h1 .char.visible {
    animation: color-blink-in 0.6s ease forwards;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #8892a4;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========== RESOURCE GRID ========== */
.resources-grid-section {
    padding: 2rem 0 4rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ========== RESOURCE CARD ========== */
.resource-card {
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 170, 238, 0.12);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.resource-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 170, 238, 0.25);
    box-shadow: 0 12px 40px rgba(34, 170, 238, 0.08);
}

.resource-card.featured {
    border-color: rgba(34, 170, 238, 0.25);
    background: rgba(12, 20, 38, 0.97);
}

/* Coming Soon — cards for tools not yet built */
.resource-card.coming-soon {
    opacity: 0.55;
    cursor: default;
}
.resource-card.coming-soon:hover {
    transform: none;
    border-color: rgba(34, 170, 238, 0.12);
    box-shadow: none;
}
.resource-card.coming-soon .resource-cta {
    background: rgba(255, 255, 255, 0.06);
    color: #6b7689;
    cursor: not-allowed;
    pointer-events: none;
}
.resource-card.coming-soon .resource-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #8892a4 !important;
}

/* Badge */
.resource-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    background: rgba(34, 170, 238, 0.1);
    color: #22aaee;
    margin-bottom: 1.25rem;
    align-self: flex-start;
}

.resource-badge.popular {
    background: rgba(157, 197, 28, 0.12);
    color: #9dc51c;
}

/* Icon */
.resource-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.25rem;
}

.resource-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
}

.resource-icon svg path,
.resource-icon svg rect,
.resource-icon svg circle,
.resource-icon svg line {
    stroke-dasharray: var(--dash-length);
    stroke-dashoffset: var(--dash-length);
    animation: svg-draw 2s ease forwards, svg-draw-loop 6s ease-in-out 2s infinite;
}

@keyframes svg-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes svg-draw-loop {
    0%, 80% { stroke-dashoffset: 0; }
    90% { stroke-dashoffset: var(--dash-length); }
    100% { stroke-dashoffset: 0; }
}

/* Title */
.resource-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

/* Description */
.resource-desc {
    font-size: 0.9rem;
    color: #8892a4;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

/* Meta */
.resource-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: #5a6178;
    margin-bottom: 1.5rem;
}

.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #5a6178;
}

/* Push CTA to bottom of card */
.resource-cta-wrap {
    margin-top: auto;
}

/* CTA Button */
.resource-cta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(34, 170, 238, 0.2);
    background: transparent;
    color: #22aaee;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.resource-cta:hover {
    background: rgba(34, 170, 238, 0.08);
    border-color: #22aaee;
}

.resource-cta.primary {
    background: linear-gradient(135deg, #22aaee, #1a8fd4);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(34, 170, 238, 0.3);
}

.resource-cta.primary:hover {
    box-shadow: 0 6px 24px rgba(34, 170, 238, 0.45);
    transform: translateY(-1px);
}

/* ========== CTA SECTION ========== */
.cta-section {
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-section h2 .char {
    display: inline-block;
    opacity: 0;
}

.cta-section h2 .char.visible {
    animation: color-blink-in 0.6s ease forwards;
}

.cta-subtitle {
    color: #8892a4;
    max-width: 520px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    padding: 0.9rem 2.5rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #22aaee, #1a8fd4);
    color: #ffffff;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 16px rgba(34, 170, 238, 0.3);
}

.cta-button:hover {
    box-shadow: 0 6px 24px rgba(34, 170, 238, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.cta-phone {
    margin-top: 1.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #8892a4;
}

.cta-phone a {
    color: #8892a4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cta-phone a:hover { color: #22aaee; }

/* ========== EMAIL MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #1a1f2e;
    border: 1px solid rgba(34, 170, 238, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1.25rem;
    background: none;
    border: none;
    color: #5a6178;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover { color: #ffffff; }

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-desc {
    font-size: 0.9rem;
    color: #8892a4;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-input {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(34, 170, 238, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-input::placeholder { color: #5a6178; }

.modal-input:focus {
    border-color: #22aaee;
}

.modal-submit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #22aaee, #1a8fd4);
    color: #ffffff;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 16px rgba(34, 170, 238, 0.3);
    margin-top: 0.25rem;
}

.modal-submit:hover {
    box-shadow: 0 6px 24px rgba(34, 170, 238, 0.5);
    transform: translateY(-1px);
}

.modal-success {
    text-align: center;
    padding: 1rem 0;
}

.modal-success p {
    color: #9dc51c;
    font-weight: 600;
    margin-top: 0.75rem;
    font-size: 1rem;
}

.modal-privacy {
    font-size: 0.72rem;
    color: #5a6178;
    text-align: center;
    margin-top: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }

    .resources-hero {
        padding: 3.5rem 0 2rem;
    }

    .resource-card {
        padding: 1.5rem;
    }

    .modal-card {
        padding: 2rem 1.5rem;
    }
}
