:root {
    --bg-color: #faf9ee;
    --main-color: #476fad;
    --text-color: #2c3e50;
    --accent-color: #e67e22;
    --transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --container-width: 1200px;
    --card-shadow: 0 20px 40px rgba(71, 111, 173, 0.08);
}

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

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(71, 111, 173, 0.02) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(71, 111, 173, 0.02) 0, transparent 50%);
    color: var(--text-color);
    font-family: 'Jost', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Premium Typography */
h1,
h2,
h3 {
    color: var(--main-color);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    background: rgba(250, 249, 238, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(71, 111, 173, 0.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
}

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

/* Advanced Drawn Oval Mechanics */
.nav-links a svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 160%;
    pointer-events: none;
    z-index: -1;
}

.nav-links a .drawn-oval {
    stroke: var(--main-color);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.35;
}

.nav-links a:hover .drawn-oval {
    stroke-dashoffset: 0;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 5%;
}

section {
    padding: 60px 0;
}

/* Game Cards */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.game-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(71, 111, 173, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(71, 111, 173, 0.1);
    position: relative;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(71, 111, 173, 0.1);
}

.game-actions {
    display: flex;
    margin-top: auto;
    padding-top: 1.5rem;
    flex-wrap: wrap;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 20px;
    color: var(--main-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.play-btn:hover {
    color: var(--main-color);
}

/* Natural Drawn Arrow Mechanics */
.play-btn svg {
    width: 20px;
    height: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.drawn-arrow {
    stroke: var(--main-color);
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke-dashoffset 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4;
}

.play-btn:hover .drawn-arrow {
    stroke-dashoffset: 0;
}

/* Manifesto Entry Animation */
@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
        filter: blur(10px);
    }

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

.manifesto-entry {
    animation: slideInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.game-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.game-description {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1rem;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: rgba(71, 111, 173, 0.1);
    color: var(--main-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Manifesto Styling */
.manifesto-content {
    max-width: 750px;
    margin: 0 auto;
}

.manifesto-text h3 {
    margin: 1.5rem 0 0.5rem !important;
}

.reveal-word {
    opacity: 0; /* Changed to 0 for these specific punchlines */
    transition: opacity 0.5s ease;
    display: inline-block;
}

.reveal-word.active {
    opacity: 1;
}

.manifesto-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.founder-sign {
    margin-top: 3rem;
    font-style: italic;
    color: var(--main-color);
}

/* Team Styling */
.team-section {
    padding: 60px 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 200px);
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    position: relative;
}

.team-member:hover {
    transform: translateY(-5px);
}

.ai-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 250px;
    background-color: white;
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(71, 111, 173, 0.15);
    border: 1px solid rgba(71, 111, 173, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    font-size: 0.85rem;
    text-align: left;
    pointer-events: none;
}

.ai-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.team-member:hover .ai-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(71, 111, 173, 0.1);
    margin-bottom: 1rem;
    border: 2px solid rgba(71, 111, 173, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo::before {
    content: "?";
    font-size: 3rem;
    color: var(--main-color);
    opacity: 0.3;
}

.profile-photo.has-image::before {
    display: none;
}

.member-name {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--main-color);
}

.member-role {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Footer */
footer {
    padding: 4rem 5%;
    text-align: center;
    border-top: 1px solid rgba(71, 111, 173, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1.5rem 5% 1rem;
        gap: 1.5rem;
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-links {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .manifesto-text {
        padding: 1.5rem !important;
        font-size: 1rem;
    }
}