/**
 * GAME CHANGER - MODERN STYLESHEET
 * Clean, bold, editorial design
 */

/* FONT-FACES: Lokal eingebundene Schriftarten */

@font-face {
    font-family: 'Inter';
    src: url('../font/Inter_18pt-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../font/Inter_18pt-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../font/Inter_18pt-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../font/Inter_28pt-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../font/Inter_28pt-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* VARIABLEN: Farben, Schriften, Abstände */

:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray-100: #f7f7f7;
    --color-gray-200: #ebebeb;
    --color-gray-600: #6b6b6b;
    --color-red: #e53935;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;

    --transition-fast: 0.2s;
    --transition-medium: 0.4s;
    --transition-slow: 0.6s;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET: Browser-Standard-Styles zurücksetzen */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.5;
    background: var(--color-black);
    color: var(--color-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
}

/* SECTION HERO: Startseite mit Überschrift und CTA */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-black);
    overflow: hidden;
}

/* Background decorative elements */
.hero__bg-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Hero Content */
.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-md);
}

.hero__title {
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: var(--spacing-md);
}

.hero__title-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
    animation: slide-up 0.8s var(--ease-out) forwards;
}

.hero__title-line:nth-child(2) {
    animation-delay: 0.15s;
}

@keyframes slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    animation: fade-in 0.8s var(--ease-out) 0.4s forwards;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

/* CTA Button */
.hero__cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 1rem 2rem;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 100px;
    opacity: 0;
    animation: fade-in 0.8s var(--ease-out) 0.6s forwards;
    transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease, background var(--transition-fast) ease;
}

.hero__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(229, 57, 53, 0.3);
    background: #c62828;
}

.hero__cta-icon {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast) ease;
}

.hero__cta-button:hover .hero__cta-icon {
    transform: translateY(3px);
}

/* Scroll hint */
.hero__scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fade-in 0.8s var(--ease-out) 1s forwards;
}

.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
    animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {

    0%,
    100% {
        transform: scaleY(1);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(0.5);
        opacity: 1;
    }
}

/* SECTION BIOGRAFIEN: Grid mit allen Persönlichkeiten */
.biografien {
    min-height: 100vh;
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--color-gray-100);
}

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

.biografien__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: var(--spacing-md);
}

/* CARDS: Karten-Design für Persönlichkeiten */
.person-card {
    position: relative;
    display: flex;
    flex-direction: row;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-medium) var(--ease-out), box-shadow var(--transition-medium) ease;

    /* Default size: 1 column in 2-column grid */
    grid-column: span 1;
}

/* Featured cards keep same size in 2x2 grid */
.person-card--featured {
    grid-column: span 1;
    grid-row: span 1;
}

.person-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

/* Image wrapper */
.person-card__image-wrapper {
    position: relative;
    width: 40%;
    min-height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.person-card__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow) var(--ease-out), filter var(--transition-medium) ease;
}

.person-card:hover .person-card__image-wrapper img {
    transform: scale(1.08);
    filter: grayscale(0%);
}

.person-card__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity var(--transition-medium) ease;
}

.person-card:hover .person-card__image-overlay {
    opacity: 1;
}

/* Content */
.person-card__content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.person-card__tag {
    display: inline-block;
    width: fit-content;
    padding: 4px 12px;
    background: var(--color-gray-200);
    color: var(--color-gray-600);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 100px;
    margin-bottom: var(--spacing-xs);
}

.person-card__name {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--color-black);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}

.person-card__role {
    font-size: 0.9rem;
    color: var(--color-gray-600);
    font-weight: 400;
}

/* Arrow */
.person-card__arrow {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-200);
    color: var(--color-gray-600);
    font-size: 1.5rem;
    border-radius: 50%;
    transition: background var(--transition-fast) ease, color var(--transition-fast) ease, transform var(--transition-fast) ease;
}

.person-card:hover .person-card__arrow {
    background: var(--color-red);
    color: var(--color-white);
    transform: translate(4px, 4px);
}

/* TIMELINE: 3D-Scroll-Animation für Biografie-Seiten */
.back-link {
    position: fixed;
    top: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 100;
    opacity: 0.7;
    transition: opacity var(--transition-fast) ease;
}

.back-link:hover {
    opacity: 1;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.person-header {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    pointer-events: none;
}

.person-header__name {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.person-header__dates {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.timeline-container {
    position: relative;
    height: 1000vh;
    background: var(--color-black);
}

.timeline-scene {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    perspective: 1500px;
    perspective-origin: 50% 50%;
}



.timeline-track {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.timeline-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(calc(var(--card-index) * -800px));
    width: min(85vw, 720px);
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 56px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
}

.timeline-card__image {
    width: 100%;
    height: 300px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.timeline-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-card__year {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-white);
    background: var(--color-red);
    padding: 4px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.timeline-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-black);
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    line-height: 1.2;
}

.timeline-card__text {
    font-size: 1rem;
    color: var(--color-gray-600);
    line-height: 1.6;
}

.timeline-progress {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-progress__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background var(--transition-fast) ease, transform var(--transition-fast) ease;
}

.timeline-progress__dot:hover {
    transform: scale(1.5);
    background: rgba(255, 255, 255, 0.4);
}

.timeline-progress__dot--active {
    background: var(--color-red);
}

/* RESPONSIVE: Media Queries für mobile Geräte */
@media (max-width: 1024px) {
    .biografien__grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .person-card {
        grid-column: span 3;
    }

    .person-card--featured {
        grid-column: span 3;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .biografien__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .person-card,
    .person-card--featured {
        grid-column: span 1;
        grid-row: span 1;
        flex-direction: column;
    }

    .person-card__image-wrapper {
        width: 100%;
        min-height: 250px;
    }

    .timeline-card {
        left: 50%;
        width: 85vw;
        max-width: 320px;
        padding: 32px;
        transform: translate(-50%, -50%) translateZ(calc(var(--card-index) * -800px));
    }


    .back-link {
        top: 20px;
        left: 20px;
    }

    .timeline-progress {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: clamp(3rem, 18vw, 5rem);
    }

    .person-card__name {
        font-size: 2rem;
    }

    .person-card__content {
        padding: var(--spacing-sm);
    }

    .timeline-card {
        padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* THEME TOGGLE: Dark/Light Mode Styles */

/* Light Mode Overrides */
html.light-mode body {
    background: var(--color-gray-100);
    color: var(--color-black);
}

html.light-mode .hero {
    background: var(--color-gray-100);
}

html.light-mode .hero__title {
    color: var(--color-black);
}

html.light-mode .hero__subtitle {
    color: var(--color-gray-600);
}

html.light-mode .back-link {
    color: var(--color-black);
}

html.light-mode .person-header__name {
    color: var(--color-black);
}

html.light-mode .person-header__dates {
    color: var(--color-gray-600);
}

html.light-mode .timeline-container {
    background: var(--color-gray-100);
}

html.light-mode .timeline-progress__dot {
    background: rgba(0, 0, 0, 0.2);
}

html.light-mode .timeline-progress__dot:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* Biografien Section im Light Mode */
html.light-mode .biografien {
    background: #1a1a1a;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-black);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease, background var(--transition-fast) ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

/* Sun icon (shown in dark mode) */
.theme-toggle__sun {
    display: block;
}

/* Moon icon (shown in light mode) */
.theme-toggle__moon {
    display: none;
}

html.light-mode .theme-toggle {
    background: var(--color-black);
    color: var(--color-white);
}

html.light-mode .theme-toggle__sun {
    display: none;
}

html.light-mode .theme-toggle__moon {
    display: block;
}

/* Smooth color transitions */
body,
.hero,
.hero__title,
.hero__subtitle,
.back-link,
.person-header__name,
.person-header__dates,
.timeline-container,
.biografien,
.theme-toggle {
    transition: background var(--transition-medium) ease, color var(--transition-medium) ease;
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
}