/* RiskApp Public Landing Page Styles - v3.6 UNIFIED TYPOGRAPHY */
/* Mahere Limited Branding: Gold #e5cf34, Charcoal #323232, Grey #f8f9fa */
/* NOW MATCHES APP.PY TYPOGRAPHY SYSTEM FOR COHESIVE USER EXPERIENCE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.6;
    color: #323232;
    background-color: #ffffff;
    font-size: 16px; /* Base 1rem = 16px, matches app typography */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== UNIFIED TYPOGRAPHY SYSTEM ===== */
/* Matches app.py typography exactly for consistency */

/* Hero Section */
.hero {
    background: #ffffff;
    color: #323232;
    text-align: center;
    padding: 80px 20px 60px;
    border-bottom: 3px solid #e5cf34;  /* Gold accent line */
}

.logo {
    width: 60px;
    height: auto;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.5rem;      /* 40px - Matches TYPOGRAPHY.brand.size_desktop */
    font-weight: 700;
    color: #e5cf34;
    margin-bottom: 10px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;     /* 20px - Matches subsection size */
    color: #666;
    font-weight: 400;
    margin-top: 0;
    line-height: 1.6;
    text-align: center;     /* Center the text */
    /* No max-width - line breaks handled in HTML */
}

/* Main Content */
.main-content {
    padding: 60px 20px;
}

.intro-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.intro-section h2 {
    font-size: 2rem;        /* 32px - Matches TYPOGRAPHY.page_title */
    font-weight: 600;
    color: #323232;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.intro-text {
    font-size: 1.15rem;     /* 18.4px - Larger for better readability */
    line-height: 1.7;
    color: #555;
    font-weight: 400;
    margin-bottom: 20px;
    text-align: justify;
}

.intro-text strong {
    color: #323232;
    font-weight: 600;
}

.compliance-badge {
    margin-top: 30px;
}

.badge {
    display: inline-block;
    background-color: #e5cf34;
    color: #1a1b1e;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin: 5px;
    font-size: 0.875rem;    /* 14px - Matches TYPOGRAPHY.label */
}

/* Call to Action */
.cta-section {
    text-align: center;
    margin: 60px 0;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.cta-button {
    display: inline-block;
    background-color: #e5cf34;
    color: #1a1b1e;
    font-size: 1.25rem;     /* 20px - subsection size for emphasis */
    font-weight: 600;
    padding: 16px 48px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background-color: #d4be23;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cta-subtext {
    margin-top: 15px;
    color: #888;
    font-size: 0.875rem;    /* 14px - label size */
}

/* Features Section */
.features-section {
    margin: 80px 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;        /* 32px - page title */
    font-weight: 600;
    color: #323232;
    margin-bottom: 50px;
    line-height: 1.3;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #e5cf34;
    box-shadow: 0 8px 16px rgba(229, 207, 52, 0.2);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.25rem;     /* 20px - subsection */
    font-weight: 500;
    color: #323232;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.feature-card p {
    font-size: 1rem;        /* 16px - body */
    font-weight: 400;
    color: #555;
    line-height: 1.6;
}

/* Methodology Section */
.methodology-section {
    background-color: #f8f9fa;
    padding: 60px 40px;
    border-radius: 12px;
    margin: 60px 0;
}

.methodology-section h2 {
    font-size: 1.5rem;      /* 24px - section header */
    font-weight: 500;
    color: #323232;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.methodology-content {
    max-width: 800px;
}

.methodology-content p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.methodology-list {
    list-style: none;
    padding-left: 0;
}

.methodology-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1rem;        /* Body text */
    line-height: 1.6;
    color: #555;
    font-weight: 400;
}

.methodology-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #e5cf34;
    font-weight: bold;
    font-size: 1.2em;
}

.methodology-list strong {
    color: #323232;
    font-weight: 600;
}

/* Audience Section */
.audience-section {
    margin: 80px 0;
}

.audience-section h2 {
    text-align: center;
    font-size: 2rem;        /* Page title */
    font-weight: 600;
    color: #323232;
    margin-bottom: 50px;
    line-height: 1.3;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.audience-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.audience-card:hover {
    transform: translateY(-6px);
}

.audience-card h3 {
    font-size: 1.25rem;     /* Subsection */
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.4;
}

.audience-card p {
    font-size: 1rem;        /* Body */
    font-weight: 400;
    line-height: 1.6;
    opacity: 0.95;
}

/* Visualization Section */
.visualization-section {
    margin: 80px 0;
    padding: 60px 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

.visualization-section h2 {
    text-align: center;
    font-size: 2rem;        /* Page title */
    font-weight: 600;
    color: #323232;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.viz-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1rem;        /* Body */
    font-weight: 400;
    line-height: 1.6;
    color: #555;
}

.viz-container {
    margin: 40px 0;
}

.viz-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.viz-card:hover {
    border-color: #e5cf34;
    box-shadow: 0 8px 24px rgba(229, 207, 52, 0.15);
}

.viz-card h3 {
    font-size: 1.5rem;      /* Section header */
    font-weight: 500;
    color: #323232;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    border-left: 4px solid #e5cf34;
    padding-left: 15px;
}

.viz-description {
    font-size: 1rem;        /* Body */
    font-weight: 400;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    height: 650px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.risk-iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}

.viz-image {
    width: 100%;
    max-width: 900px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: block;
    margin: 0 auto;
}

.viz-image-portrait {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: block;
    margin: 0 auto;
}

.viz-footer {
    margin-top: 40px;
    padding: 25px 40px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border-left: 5px solid #e5cf34;
    color: #323232;
}

.viz-footer p {
    margin: 0;
    font-size: 1rem;        /* Body */
    font-weight: 400;
    line-height: 1.6;
}

.viz-footer strong {
    color: #323232;
    font-weight: 600;
}

.viz-footer sup {
    font-size: 0.75rem;     /* Caption */
}

/* Footer */
.footer {
    background-color: #2C3E50;
    color: #cccccc;
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

.footer-text {
    font-size: 0.875rem;    /* Label size */
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-text strong {
    color: #e5cf34;
    font-weight: 600;
}

.footer-text a {
    transition: opacity 0.3s ease;
}

.footer-text a:hover {
    opacity: 0.8;
}

.footer-reference {
    font-size: 0.75rem;     /* Caption */
    font-weight: 400;
    color: #999;
    font-style: italic;
    margin-top: 10px;
    line-height: 1.4;
}

.footer-copyright {
    font-size: 0.75rem;     /* Caption */
    font-weight: 400;
    color: #999;
    margin-top: 15px;
    line-height: 1.4;
}

/* ===== MOBILE RESPONSIVE ===== */
/* Matches app.py mobile breakpoint at 768px */

@media (max-width: 768px) {
    /* Typography scales down matching app */
    .hero-title {
        font-size: 1.8rem;  /* Matches TYPOGRAPHY.brand.size_mobile */
    }
    
    .hero-subtitle {
        font-size: 1.1rem;  /* Matches subsection mobile */
        text-align: center;
        /* Line breaks in HTML handle the layout */
    }
    
    .intro-section h2,
    .features-section h2,
    .audience-section h2,
    .visualization-section h2 {
        font-size: 1.5rem;  /* Matches page_title mobile (24px) */
    }
    
    .methodology-section h2,
    .viz-card h3 {
        font-size: 1.25rem; /* Matches section_header mobile (20px) */
    }
    
    .feature-card h3,
    .audience-card h3 {
        font-size: 1.1rem;  /* Matches subsection mobile (18px) */
    }
    
    .intro-text,
    .feature-card p,
    .methodology-content p,
    .methodology-list li,
    .audience-card p,
    .viz-intro,
    .viz-description,
    .viz-footer p {
        font-size: 1rem; /* 16px on mobile - still readable, slightly smaller than desktop */
    }
    
    .badge,
    .cta-subtext,
    .footer-text {
        font-size: 0.85rem; /* Matches label mobile (14px) */
    }
    
    .footer-reference,
    .footer-copyright,
    .viz-footer sup {
        font-size: 0.75rem; /* Caption stays same */
    }
    
    .cta-button {
        font-size: 1.1rem;
        padding: 12px 32px;
    }
    
    .features-grid,
    .audience-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .methodology-section {
        padding: 40px 20px;
    }
    
    .badge {
        display: block;
        margin: 10px auto;
        width: fit-content;
    }
    
    .viz-card {
        padding: 25px 20px;
    }
    
    .viz-footer {
        padding: 20px 25px;
    }
    
    .iframe-wrapper {
        height: 400px;
    }
    
    .viz-image-portrait {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 20px 40px;
    }
    
    .logo {
        width: 45px;
    }
    
    .hero-title {
        font-size: 1.5rem;  /* Further scale down */
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
        /* Line breaks in HTML handle the layout */
    }
    
    .main-content {
        padding: 40px 20px;
    }
    
    .viz-card {
        padding: 20px 15px;
    }
    
    .viz-description {
        font-size: 0.9rem;
    }
    
    .iframe-wrapper {
        height: 350px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .cta-section,
    .iframe-wrapper {
        display: none;
    }
    
    .hero {
        border-bottom: 2px solid #323232;
        padding: 40px 20px;
    }
    
    .viz-image,
    .viz-image-portrait {
        max-width: 100%;
        page-break-inside: avoid;
    }
}
