/*
 * myFinancialTracker — Shared Common Styles
 * Extracted from home.css so sub-pages don't carry unused homepage code.
 * Loaded on every page alongside styles.css; home.css is index-only.
 */

/* ============================================================
   SECTION CONTAINERS & HEADERS
   ============================================================ */

.section-container {
    width: 100%;
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.section-eyebrow {
    display: inline-block;
    font-family: var(--md-sys-typescale-label-large-font, 'Roboto', sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--md-sys-color-secondary, #00a651);
    background: color-mix(in srgb, var(--md-sys-color-secondary, #00a651) 10%, transparent);
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--md-sys-color-on-surface, #1a1c1e);
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--md-sys-color-primary, #203448) 0%, var(--md-sys-color-secondary, #00a651) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--md-sys-color-on-surface-variant, #42474e);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================================
   SHARED KEYFRAME ANIMATIONS (consolidated — single source of truth)
   ============================================================ */

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

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ============================================================
   CTA SECTION (used on index + signup pages)
   ============================================================ */

.cta-section {
    padding: 5rem 0 5rem;
    background: var(--md-sys-color-surface, #ffffff);
}

.cta-card {
    position: relative;
    background: linear-gradient(135deg,
        var(--md-sys-color-primary, #203448) 0%,
        color-mix(in srgb, var(--md-sys-color-primary, #203448) 80%, #0f172a) 100%);
    border-radius: 32px;
    padding: 1rem 1rem;
    text-align: center;
    overflow: hidden;
    color: white;
}

.cta-card-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cta-card h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: white;
    position: relative;
    z-index: 1;
}

.cta-card p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.8);
    max-width: 550px;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
}

.cta-card .cta-buttons {
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-card .btn.primary {
    background: white;
    color: var(--md-sys-color-primary, #203448);
}

.cta-card .btn.primary:hover {
    background: var(--md-sys-color-secondary, #00a651);
    color: white;
    box-shadow: 0 8px 30px rgba(0, 166, 81, 0.3);
}

.cta-trust {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    position: relative;
    z-index: 1;
}

.cta-trust span {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-trust i {
    font-size: 1rem;
}

/* ============================================================
   ENHANCED BUTTON VARIANTS
   ============================================================ */

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn--lg {
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    min-height: 50px;
}

.btn--full {
    width: 100%;
    justify-content: center;
}

.btn.primary .fa-arrow-right {
    margin-left: 0.5rem;
    transition: transform var(--md-motion-duration-short4, 150ms) var(--md-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
}

.btn.primary:hover .fa-arrow-right {
    transform: translateX(4px);
}

/* ============================================================
   SKIP TO MAIN CONTENT (WCAG 2.1 Level A)
   ============================================================ */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 2000;
    padding: 0.6rem 1.25rem;
    background: var(--md-sys-color-primary, #203448);
    color: var(--md-sys-color-on-primary, #ffffff);
    border-radius: 0 0 var(--md-shape-corner-small, 8px) var(--md-shape-corner-small, 8px);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: top var(--md-motion-duration-short4, 200ms) var(--md-motion-easing-standard);
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--md-sys-color-secondary, #00a651);
    outline-offset: 2px;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.section-max-800 { max-width: 800px; }
.section-max-900 { max-width: 900px; }
.legal-intro-text {
    line-height: 1.8;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 2rem;
}
.feature-check-icon {
    color: var(--md-sys-color-secondary, #00a651);
}
.page-content--centered {
    padding: 6rem 1.5rem;
    text-align: center;
}

/* ============================================================
   TESTIMONIAL AVATARS
   ============================================================ */

.testimonial-attribution {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid var(--md-sys-color-surface-container-highest, #e5e7eb);
    padding-top: 1rem;
}

.testimonial-attribution-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--md-sys-color-surface-container-highest, #e5e7eb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.testimonial-avatar--initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--md-sys-color-primary, #203448);
    background: color-mix(in srgb, var(--md-sys-color-primary, #203448) 10%, transparent);
    border: 2px solid color-mix(in srgb, var(--md-sys-color-primary, #203448) 15%, transparent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.testimonial-attribution strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface, #1a1c1e);
}

.testimonial-attribution span {
    font-size: 0.78rem;
    color: var(--md-sys-color-on-surface-variant, #42474e);
}

/* ============================================================
   SCREENSHOT SHOWCASE GALLERY
   ============================================================ */

.screenshots-section {
    padding: 4rem 0 5rem;
    background: var(--md-sys-color-surface-container-low, #f7f9fc);
    overflow: hidden;
}

.screenshot-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.5rem 1.5rem;
    margin: 0 -1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--md-sys-color-outline-variant, #c1c7ce) transparent;
    cursor: grab;
}

.screenshot-gallery:active {
    cursor: grabbing;
}

.screenshot-gallery::-webkit-scrollbar {
    height: 6px;
}

.screenshot-gallery::-webkit-scrollbar-track {
    background: transparent;
    margin: 0 1.5rem;
}

.screenshot-gallery::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-outline-variant, #c1c7ce);
    border-radius: 3px;
}

.screenshot-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: center;
}

.screenshot-img {
    display: block;
    width: 340px;
    height: auto;
    aspect-ratio: 1206 / 2622;
    border-radius: 24px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 12px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--md-sys-color-surface-container-highest, #e5e7eb);
    background: var(--md-sys-color-surface, #ffffff);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshot-item:hover .screenshot-img {
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 20px 50px rgba(0, 0, 0, 0.06);
}

.screenshot-item figcaption {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant, #42474e);
    letter-spacing: 0.01em;
}

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

@media (max-width: 1024px) {
    .section-header--left h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
}

@media (max-width: 768px) {
    .section-container { padding: 0 1rem; }
    .section-header { margin-bottom: 2rem; }
    .cta-card {
        padding: 1.5rem 1.5rem;
        border-radius: 24px;
    }
    .cta-card h2 { font-size: 1.5rem; }
    .cta-trust { gap: 1.5rem; flex-direction: column; align-items: center; }
    .screenshot-gallery {
        gap: 1rem;
        padding: 0.75rem 1rem 1.25rem;
        margin: 0 -1rem;
    }
    .screenshot-img {
        width: 260px;
        border-radius: 18px;
    }
    .testimonial-avatar,
    .testimonial-avatar--initials {
        width: 40px;
        height: 40px;
    }
    .testimonial-avatar--initials {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .section-eyebrow { font-size: 0.72rem; }
    .btn--lg { width: 100%; justify-content: center; }
    .cta-trust { gap: 0.5rem; }
    .screenshot-img {
        width: 220px;
        border-radius: 16px;
    }
    .screenshot-item figcaption {
        font-size: 0.75rem;
    }
}
