@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-color: #030303;
    --text-main: #f4f4f4;
    --text-muted: #888888;
    --accent-red: #8a0303;
    --mist-color: rgba(20, 20, 20, 0.8);
    /* Added a premium easing curve for all animations */
    --premium-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Added smooth scrolling for the anchor links */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Mist Background */
.mist-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 80%),
        repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px);
    animation: mistDrift 20s infinite alternate ease-in-out;
}

@keyframes mistDrift {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1) translate(-20px, 15px);
        opacity: 0.8;
    }
}

/* Navigation (From Johan.html) */
nav {
    padding: 30px 5%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--text-main);
}

/* --- HERO SECTION ANIMATIONS --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    background: radial-gradient(circle at 50% 50%, rgba(138, 3, 3, 0.15) 0%, transparent 60%);
}

/* Hero variation for content pages (from Johan.html) */
.hero-content {
    height: 85vh;
}

/* Keyframes for Hero Entrance */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    /* Apply animation */
    animation: fadeUp 1.2s var(--premium-ease) forwards;
    opacity: 0;
}

/* Content specific heading format */
.hero-content h1 {
    font-size: clamp(3rem, 7vw, 6rem);
    margin-bottom: 5px;
}

.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: var(--accent-red);
    font-style: italic;
    margin-bottom: 25px;
    animation: fadeUp 1.2s var(--premium-ease) 0.2s forwards;
    opacity: 0;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 40px;
    max-width: 600px;
    /* Staggered delay */
    animation: fadeUp 1.2s var(--premium-ease) 0.3s forwards;
    opacity: 0;
}

.btn {
    padding: 15px 40px;
    border: 1px solid var(--accent-red);
    background: transparent;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s var(--premium-ease);
    text-decoration: none;
    /* Staggered delay */
    animation: fadeUp 1.2s var(--premium-ease) 0.6s forwards;
    opacity: 0;
}

.btn:hover {
    background: var(--accent-red);
    box-shadow: 0 0 20px rgba(138, 3, 3, 0.6);
    transform: translateY(-2px);
}

/* --- ROSTER SECTION --- */
.roster-section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--accent-red);
    letter-spacing: 3px;
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s var(--premium-ease);
}

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

.card {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid #222;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: transform 0.6s var(--premium-ease),
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        opacity 0.8s ease;
}

/* Class added by JavaScript when element is scrolled into view */
.is-visible,
.card.is-visible,
.section-title.is-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--premium-ease);
}

/* Enhanced Hover State */
.card:hover {
    transform: translateY(-8px);
    border-color: rgba(138, 3, 3, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(138, 3, 3, 0.15);
    background: rgba(20, 20, 20, 0.8);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
    transition: color 0.3s ease;
}

.card:hover h3 {
    color: #ffffff;
}

.card h4 {
    color: var(--accent-red);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.card:hover p {
    color: #d1d1d1;
}

/* --- CONTENT SECTION (For character pages like Johan.html) --- */
.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 5% 100px;
}

.article-section {
    margin-bottom: 70px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s var(--premium-ease);
}

.article-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--accent-red);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 12px;
    letter-spacing: 2px;
}

.article-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 80px;
    background: var(--accent-red);
}

.subsection {
    margin-bottom: 35px;
    background: rgba(15, 15, 15, 0.4);
    border: 1px solid #1a1a1a;
    padding: 25px 35px;
    border-left: 3px solid transparent;
    transition: border-left 0.4s ease, background 0.4s ease;
}

.subsection:hover {
    border-left: 3px solid var(--accent-red);
    background: rgba(20, 20, 20, 0.6);
}

.subsection h4 {
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.subsection p {
    color: #b0b0b0;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Conclusion Block */
.conclusion-block {
    background: rgba(138, 3, 3, 0.08);
    border-left: 4px solid var(--accent-red);
    padding: 40px;
    margin-top: 60px;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-style: italic;
    color: var(--text-main);
    line-height: 1.8;
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s var(--premium-ease);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #222;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- IMAGE LINK COMPONENT --- */
.image-link {
    display: inline-block;
    border: 2px solid #222;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(15, 15, 15, 0.6);
    transition: all 0.5s var(--premium-ease);
    animation: fadeUp 1.2s var(--premium-ease) forwards;
    opacity: 0;
    max-width: 280px;
    height: 280px; /* Fixed height for uniformity */
}

.image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center; /* Focuses on characters' faces */
    display: block;
    transition: transform 0.8s var(--premium-ease), filter 0.5s ease;
    filter: grayscale(30%) brightness(0.8);
}

.image-link:hover {
    border-color: var(--accent-red);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(138, 3, 3, 0.3);
    transform: translateY(-8px);
}

.image-link:hover img {
    transform: scale(1.08); /* Cinematic zoom */
    filter: grayscale(0%) brightness(1.1); /* Brings out colors vividly */
}

/* --- HERO PORTRAIT COMPONENT --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-portrait {
    display: inline-block;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(138, 3, 3, 0.5);
    box-shadow: 0 10px 40px rgba(138, 3, 3, 0.3), 0 0 60px rgba(0, 0, 0, 0.5);
    transition: all 0.5s var(--premium-ease);
    animation: float 4s ease-in-out infinite, fadeUp 1.2s var(--premium-ease) forwards;
    opacity: 0;
    margin-bottom: 25px;
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--premium-ease), filter 0.4s ease;
    filter: brightness(0.9);
}

.hero-portrait:hover {
    border-color: var(--accent-red);
    box-shadow: 0 15px 50px rgba(138, 3, 3, 0.5), 0 0 80px rgba(138, 3, 3, 0.2);
    transform: translateY(-6px) scale(1.05);
    animation-play-state: paused;
}

.hero-portrait:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}


