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

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 200;
    padding: 12px 24px;
    background: var(--navy);
    color: #fff;
    border-radius: 0 0 8px 8px;
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    transition: top var(--transition);
}
.skip-link:focus {
    top: 0;
    color: #fff;
}

:root {
    --navy: #0A2540;
    --navy-light: #1A3A5C;
    --meedi8: #22C58B;
    --meedi8-bg: rgba(34, 197, 139, 0.08);
    --earnr: #FFB627;
    --earnr-bg: rgba(255, 182, 39, 0.08);
    --mira: #5BA4D6;
    --mira-bg: rgba(91, 164, 214, 0.08);
    --bg: #FFFFFF;
    --bg-alt: #F6F9FC;
    --text: #525F7F;
    --text-light: #8898AA;
    --border: #E6EBF1;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 2px 8px rgba(10, 37, 64, 0.06);
    --shadow-lg: 0 8px 30px rgba(10, 37, 64, 0.08);
    --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    font-family: 'Lexend', sans-serif;
    color: var(--navy);
    line-height: 1.3;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); }

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--meedi8); }
a:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}
.btn:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

img { max-width: 100%; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.content-narrow { max-width: 780px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: 'Lexend', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); color: #fff; }

.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.btn-meedi8 { background: var(--meedi8); color: #fff; }
.btn-meedi8:hover { background: #1aad79; color: #fff; }

.btn-earnr { background: var(--earnr); color: var(--navy); }
.btn-earnr:hover { background: #e6a420; color: var(--navy); }

.btn-mira { background: var(--mira); color: #fff; }
.btn-mira:hover { background: #4a93c5; color: #fff; }

.btn-sm { padding: 8px 20px; font-size: 0.875rem; }
.btn-full { width: 100%; }

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.header.scrolled { box-shadow: var(--shadow); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo { display: flex; align-items: center; font-family: 'Lexend', sans-serif; font-size: 1.25rem; font-weight: 700; }
.logo-safe { color: var(--navy); }
.logo-ai { color: var(--meedi8); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.nav a:hover, .nav a.active { color: var(--navy); }
.nav .btn { color: #fff; }
.nav .btn:hover { color: #fff; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.menu-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--navy);
    margin: 5px 0;
    transition: all var(--transition);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #F6F9FC 0%, #EEF4FB 40%, #E8F5F0 100%);
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 139, 0.08) 0%, transparent 70%);
}

.hero-inner { max-width: 720px; }

.hero-content h1 { margin-bottom: 20px; }
.hero-sub { font-size: 1.15rem; color: var(--text); margin-bottom: 36px; max-width: 600px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Page Hero (subpages) ===== */
.page-hero {
    padding: 140px 0 60px;
    background: var(--bg-alt);
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero .hero-sub { font-size: 1.1rem; max-width: 600px; }

.page-hero-meedi8 { background: linear-gradient(135deg, #F6F9FC 0%, #E8F5F0 100%); }
.page-hero-earnr { background: linear-gradient(135deg, #F6F9FC 0%, #FFF8E8 100%); }
.page-hero-mira { background: linear-gradient(135deg, #F6F9FC 0%, #E8F0F8 100%); }

.page-hero .product-logo { margin-bottom: 16px; }

/* ===== Products Section (homepage) ===== */
.products { padding: 100px 0; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { color: var(--text); margin-top: 12px; font-size: 1.05rem; }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.product-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.product-card {
    display: block;
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text);
}

.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); color: var(--text); }

.product-meedi8 { background: var(--meedi8-bg); border-color: rgba(34, 197, 139, 0.15); }
.product-earnr { background: var(--earnr-bg); border-color: rgba(255, 182, 39, 0.15); }
.product-mira { background: var(--mira-bg); border-color: rgba(91, 164, 214, 0.15); }

.product-logo { margin-bottom: 16px; }
.product-logo img { height: 48px; width: auto; }
.product-feature .product-logo img { height: 120px; }
.product-card h3 { margin-bottom: 4px; }
.product-tagline { color: var(--text-light); font-weight: 500; margin-bottom: 12px; font-size: 0.95rem; }
.product-desc { margin-bottom: 20px; font-size: 0.9rem; line-height: 1.6; }

.card-link {
    font-family: 'Lexend', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    transition: color var(--transition);
}
.product-meedi8:hover .card-link { color: var(--meedi8); }
.product-earnr:hover .card-link { color: var(--earnr); }
.product-mira:hover .card-link { color: var(--mira); }

/* ===== Product Feature Section (products page) ===== */
.product-feature { padding: 80px 0; }
.product-feature.alt { background: var(--bg-alt); }

.product-feature-content h2 { margin-bottom: 8px; }
.product-feature-content .product-tagline { margin-bottom: 16px; }
.product-feature-content p { margin-bottom: 12px; }

.product-features {
    list-style: none;
    margin: 20px 0 28px;
}
.product-features li {
    padding: 6px 0 6px 20px;
    position: relative;
    font-size: 0.9rem;
}
.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--meedi8);
}
.product-earnr .product-features li::before,
.product-feature:nth-child(3) .product-features li::before { background: var(--earnr); }
.product-mira .product-features li::before,
.product-feature:nth-child(4) .product-features li::before { background: var(--mira); }

.product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ===== Product Detail Pages ===== */
.product-detail { padding: 60px 0 80px; }

.detail-section { margin-bottom: 56px; }
.detail-section h2 { margin-bottom: 20px; }
.detail-section p { margin-bottom: 12px; }

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.feature-item {
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.feature-item h4 { margin-bottom: 8px; }
.feature-item p { font-size: 0.9rem; margin-bottom: 0; }

.audience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.audience-item {
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.audience-item h4 { margin-bottom: 8px; }
.audience-item p { font-size: 0.9rem; margin-bottom: 0; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.step-item {
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
}

.step-item h4 { margin-bottom: 8px; }
.step-item p { font-size: 0.9rem; margin-bottom: 0; }

.detail-cta {
    text-align: center;
    padding: 48px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.detail-cta h2 { margin-bottom: 12px; }
.detail-cta p { margin-bottom: 24px; }

/* ===== Comparison Grid (MIRA page) ===== */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.comparison-item {
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.comparison-item.positive { background: rgba(34, 197, 139, 0.06); border-color: rgba(34, 197, 139, 0.2); }
.comparison-item.negative { background: var(--bg-alt); }

.comparison-item h4 { margin-bottom: 16px; }
.comparison-item ul { list-style: none; }
.comparison-item ul li {
    padding: 6px 0 6px 24px;
    position: relative;
    font-size: 0.9rem;
}
.comparison-item.positive ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--meedi8);
    font-weight: 700;
}
.comparison-item.negative ul li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--text-light);
    font-weight: 700;
}

/* ===== Mission Brief (homepage) ===== */
.mission-brief { padding: 80px 0; background: var(--bg-alt); }
.mission-brief-inner { max-width: 680px; }
.mission-brief-inner h2 { margin-bottom: 16px; }
.mission-brief-inner p { margin-bottom: 24px; }

/* ===== Mission Page Values ===== */
.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.value-card {
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.value-card h4 { margin-bottom: 8px; }
.value-card p { font-size: 0.9rem; margin-bottom: 0; }

.impact-list { list-style: none; margin-top: 16px; }
.impact-list li { padding: 8px 0; font-size: 0.95rem; }

/* ===== Content Sections ===== */
.content-section { padding: 60px 0 80px; }

/* ===== About Page ===== */
.about-products { margin-top: 24px; }

.about-product-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.about-product-item:last-child { border-bottom: none; }
.about-product-item img { flex-shrink: 0; }
.about-product-item p { flex: 1; font-size: 0.9rem; margin: 0; }
.about-product-item a { flex-shrink: 0; font-size: 0.9rem; font-weight: 500; color: var(--meedi8); }

.info-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.info-table td { padding: 12px 0; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
.info-table td:first-child { font-weight: 500; color: var(--navy); width: 180px; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg);
}
.timeline-marker.active {
    border-color: var(--meedi8);
    background: var(--meedi8);
}

.timeline-content h4 { margin-bottom: 8px; }
.timeline-content p { font-size: 0.95rem; }

/* ===== Team Page ===== */
.team-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.team-card {
    display: flex;
    gap: 32px;
    padding: 32px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    align-items: flex-start;
}

.team-avatar { flex-shrink: 0; }
.team-avatar img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }

.team-info { flex: 1; }
.team-info h3 { margin-bottom: 4px; }

.team-role { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.team-bio { font-size: 0.9rem; }

.team-bio-wrap { position: relative; }
.team-bio-text {
    max-height: 7.5em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.team-bio-text.expanded { max-height: none; }

.team-bio-toggle {
    background: none;
    border: none;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 0 0;
    font-family: 'Inter', sans-serif;
}
.team-bio-toggle:hover { text-decoration: underline; }

/* ===== Contact Page ===== */
.contact-section { padding: 60px 0 100px; }

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }

.contact-form-wrap {
    padding: 40px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--navy);
    background: var(--bg);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy);
}

.form-group textarea { resize: vertical; }

.form-note { margin-top: 16px; font-size: 0.85rem; text-align: center; }

.info-card { margin-bottom: 28px; }
.info-card h3 { font-size: 1rem; margin-bottom: 8px; }
.info-card p { font-size: 0.9rem; margin-bottom: 4px; }
.info-card a { color: var(--meedi8); font-weight: 500; }
.info-card a:hover { color: var(--navy); }

/* ===== Legal Pages ===== */
.legal-content h2 { font-size: 1.3rem; margin-top: 40px; margin-bottom: 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1.1rem; margin-top: 28px; margin-bottom: 8px; }
.legal-content p { margin-bottom: 12px; }
.legal-content ul { margin: 12px 0 20px 20px; }
.legal-content ul li { margin-bottom: 6px; font-size: 0.95rem; }

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 0.9rem;
}
.cookie-table th, .cookie-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.cookie-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--navy);
    font-size: 0.85rem;
}

/* ===== CTA Section ===== */
.cta-section { padding: 80px 0; }

.cta-inner {
    text-align: center;
    padding: 64px 48px;
    border-radius: var(--radius-lg);
    background: var(--navy);
    color: #fff;
}

.cta-inner h2 { color: #fff; margin-bottom: 16px; }
.cta-inner p { color: rgba(255, 255, 255, 0.7); margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-inner .btn-primary { background: var(--meedi8); color: #fff; }
.cta-inner .btn-primary:hover { background: #1aad79; }

/* ===== Footer ===== */
.footer {
    padding: 60px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: start; }

.footer-brand p { font-size: 0.8rem; color: var(--text-light); margin-top: 12px; line-height: 1.6; }

.footer-links { display: flex; gap: 56px; }

.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h5 { margin-bottom: 4px; }
.footer-col a { font-size: 0.85rem; color: var(--text); }
.footer-col a:hover { color: var(--meedi8); }

.footer-bottom {
    grid-column: 1 / -1;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-light); }

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .nav {
        display: none;
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    .nav.open { display: flex; }
    .nav .btn { width: fit-content; }

    .hero { padding: 120px 0 72px; }
    .hero-sub { font-size: 1rem; }

    .product-grid { grid-template-columns: 1fr; }
    .product-grid-3 { grid-template-columns: 1fr; }
    .product-card { padding: 28px; }

    .feature-grid { grid-template-columns: 1fr; }
    .audience-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-form-wrap { padding: 28px; }

    .about-product-item { flex-direction: column; text-align: center; gap: 12px; }

    .team-card { flex-direction: column; text-align: center; align-items: center; }
    .team-avatar { display: flex; justify-content: center; width: 100%; }

    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .footer-links { flex-wrap: wrap; gap: 32px; }

    .cta-inner { padding: 40px 24px; }

    .info-table td:first-child { width: auto; }
}
