/* V3 Design System */

/* Self-hosted fonts from @fontsource */
@font-face {
    font-family: 'Poppins';
    font-weight: 400;
    font-style: normal;
    src: url('/assets/fonts/poppins-latin-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 500;
    font-style: normal;
    src: url('/assets/fonts/poppins-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 600;
    font-style: normal;
    src: url('/assets/fonts/poppins-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-weight: 700;
    font-style: normal;
    src: url('/assets/fonts/poppins-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-weight: 400;
    font-style: normal;
    src: url('/assets/fonts/inter-latin-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-weight: 500;
    font-style: normal;
    src: url('/assets/fonts/inter-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-weight: 600;
    font-style: normal;
    src: url('/assets/fonts/inter-latin-600.woff2') format('woff2');
}

:root {
    --color-primary: #E8704A;
    --color-secondary: #F5A962;
    --color-accent: #4A90E2;
    --color-success: #52B788;
    --color-warm-gray: #F5F3F0;
    --color-dark-gray: #2D2D2D;
    --color-text: #1F1F1F;
    --color-text-light: #666666;
    --color-border: #E8E8E8;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-warm-gray: #1A1A1A;
        --color-dark-gray: #F5F3F0;
        --color-text: #FFFFFF;
        --color-text-light: #CCCCCC;
        --color-border: #333333;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-warm-gray);
}

/* =============== HEADER / NAV =============== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

@media (prefers-color-scheme: dark) {
    header {
        background: rgba(20, 20, 20, 0.95);
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.logo-mark {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.1;
}

.logo-main {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    color: var(--color-text-light);
    letter-spacing: 0.5px;
}

.nav-primary {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

@media (max-width: 768px) {
    .nav-primary {
        display: none;
    }
}

.nav-primary a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-primary a:hover {
    color: var(--color-primary);
}

.nav-controls {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
}

.lang-selector:hover {
    background: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .lang-selector:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

.flag-icon {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    background-size: cover;
    display: inline-block;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s, border-color 0.2s;
    color: var(--color-text);
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .theme-toggle:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* =============== HERO SECTION =============== */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><linearGradient id="g1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgba(232,112,74,0.15);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(245,169,98,0.1);stop-opacity:1" /></linearGradient></defs><rect fill="url(%23g1)" width="1200" height="600"/></svg>') center/cover;
    z-index: 0;
}

.hero-photo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/photos/despair-silhouette-1.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.7) 0%, rgba(45, 45, 45, 0.5) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    text-align: center;
    padding: var(--spacing-xl);
}

.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(28px, 8vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    color: #FFFFFF;
}

.hero-quote {
    font-size: clamp(14px, 2.5vw, 18px);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-md);
    font-style: italic;
    font-weight: 400;
    opacity: 0.95;
}

.hero-content p {
    font-size: clamp(16px, 3vw, 20px);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
    line-height: 1.5;
}

.hero-cta {
    display: inline-flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.btn-primary {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(232, 112, 74, 0.3);
}

.btn-secondary {
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* =============== STATS BAND =============== */
.stats-band {
    background: white;
    padding: var(--spacing-xxl) var(--spacing-lg);
    position: relative;
    z-index: 10;
}

@media (prefers-color-scheme: dark) {
    .stats-band {
        background: #0F0F0F;
    }
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
}

.stats-headline {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.stats-headline h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(24px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xxl);
}

.stat-card {
    background: var(--color-warm-gray);
    padding: var(--spacing-lg);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid var(--color-border);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.stat-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(36px, 8vw, 64px);
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--spacing-md);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-source {
    font-size: 12px;
    color: var(--color-text-light);
    opacity: 0.7;
    margin-top: var(--spacing-sm);
}

.stat-source a {
    color: var(--color-primary);
    text-decoration: none;
}

.stat-source a:hover {
    text-decoration: underline;
}

.stats-cta {
    text-align: center;
}

.stats-cta p {
    font-size: 16px;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

/* =============== STORIES SECTION =============== */
.stories {
    background: white;
    padding: var(--spacing-xxl) var(--spacing-lg);
}

@media (prefers-color-scheme: dark) {
    .stories {
        background: #0F0F0F;
    }
}

.stories-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-headline {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--color-text);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.story-card {
    background: var(--color-warm-gray);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.story-photo {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.story-photo::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../assets/photos/hands-comfort-elderly.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.story-content {
    padding: var(--spacing-lg);
}

.story-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.story-excerpt {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.story-reactions {
    display: flex;
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    font-size: 18px;
    flex-wrap: wrap;
}

.reaction {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.reaction:hover {
    transform: scale(1.15);
}

.reaction-count {
    font-size: 12px;
    color: var(--color-text-light);
    font-weight: 500;
}

.coming-soon-chip {
    display: inline-block;
    background: rgba(232, 112, 74, 0.1);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.stories-footer {
    text-align: center;
}

.stories-footer p {
    font-size: 16px;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

/* =============== FOOTER =============== */
footer {
    background: var(--color-dark-gray);
    color: white;
    padding: var(--spacing-xxl) var(--spacing-lg);
}

@media (prefers-color-scheme: dark) {
    footer {
        background: #0F0F0F;
    }
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
}

.footer-section a {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: var(--spacing-sm);
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-version {
    font-weight: 500;
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .hero-content {
        padding: var(--spacing-lg);
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .header-content {
        padding: var(--spacing-md);
    }
}

@media (max-width: 375px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
    }

    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }

    .stat-number {
        font-size: 40px;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }
}

/* =============== ACCESSIBILITY =============== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-video-container video {
        display: none;
    }

    .hero-photo {
        display: block !important;
    }
}
