:root {
    --color-primary: #E07A5F; /* Terracota */
    --color-primary-dark: #C45D42;
    --color-secondary: #2A9D8F; /* Turquesa */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8FAFC;
    --color-text: #333333;
    --color-text-light: #666666;
    --font-main: 'Montserrat', sans-serif;
    --shadow-card: 0 10px 30px -10px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0,0,0,0.2);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-weight: 700; color: #111; margin-bottom: 1rem; letter-spacing: -0.5px; }
p { margin-bottom: 1.5rem; font-weight: 400; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
ul { list-style: none; }

/* HEADER & NAV */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}
nav {
    max-width: 1200px; margin: 0 auto; padding: 0.8rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
}
.logo-img { height: 55px; width: auto; object-fit: contain; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    font-weight: 500; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--color-text); position: relative; padding: 8px 16px; border-radius: 50px;
    transition: all 0.3s ease;
}
.nav-links a:not(.active-link):hover { color: var(--color-primary); }
.nav-links a.active-link {
    background: var(--color-primary); color: white; font-weight: 600;
    box-shadow: 0 4px 12px rgba(224, 122, 95, 0.3);
}

/* MOBILE MENU */
.mobile-toggle { display: none; cursor: pointer; font-size: 1.8rem; color: var(--color-text); }
.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 80%; max-width: 300px; height: 100vh;
    background: white; shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 4rem 2rem; transition: 0.4s ease-in-out; z-index: 999;
    display: flex; flex-direction: column; gap: 2rem;
}
.mobile-menu.active { right: 0; box-shadow: -10px 0 30px rgba(0,0,0,0.2); }
.mobile-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 998; display: none; opacity: 0; transition: opacity 0.3s;
}
.mobile-overlay.active { display: block; opacity: 1; }
.mobile-menu a.active-link { color: var(--color-primary); font-weight: 800; border-left: 4px solid var(--color-primary); padding-left: 10px; }

/* SECTIONS & COMPONENTS */
.hero {
    height: 85vh; background-size: cover; background-position: center;
    display: flex; align-items: center; position: relative;
}
.hero::before {
    content: ''; position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(to right, rgba(0,0,0,0.6), rgba(0,0,0,0.1));
}
.hero-content {
    position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    color: white; width: 100%;
}
.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 1.5rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2.5rem; max-width: 600px; opacity: 0.95; }

.btn {
    display: inline-block; padding: 14px 32px; background: var(--color-primary); color: white;
    font-weight: 600; border-radius: 50px; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px;
    border: 2px solid var(--color-primary); transition: all 0.3s; cursor: pointer;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(224, 122, 95, 0.4); }
.btn-white { background: white; color: var(--color-text); border-color: white; }
.btn-white:hover { background: #f0f0f0; border-color: #f0f0f0; color: var(--color-text); }

.section { padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }
.bg-alt { background-color: var(--color-bg-alt); width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header .subtitle {
    color: var(--color-secondary); font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; font-size: 0.85rem; display: block; margin-bottom: 1rem;
}
.section-header h2 { font-size: 2.5rem; }

.card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow-card); transition: all 0.4s ease;
    cursor: pointer; position: relative;
}
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.card-img-wrapper { overflow: hidden; height: 260px; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img { transform: scale(1.08); }
.card-body { padding: 2rem; }
.card-tag {
    background: var(--color-secondary); color: white; padding: 5px 12px;
    border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    position: absolute; top: 1rem; right: 1rem; z-index: 10;
}
.card-title { font-size: 1.4rem; margin-bottom: 0.5rem; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* FOOTER */
footer { background: #1a1a1a; color: white; padding: 5rem 2rem 2rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; }
.footer-col h4 { color: white; font-size: 1.2rem; margin-bottom: 1.5rem; }
.footer-col a { color: #999; display: block; margin-bottom: 0.8rem; }
.footer-col a:hover { color: var(--color-primary); padding-left: 5px; }
.copyright { text-align: center; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid #333; color: #666; font-size: 0.9rem; }

/* --- GAME STYLES (SNAKE) --- */
.game-wrapper {
    background: #0f172a; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.bg-grid {
    position: absolute; width: 200%; height: 200%; top: -50%; left: -50%;
    background-image: linear-gradient(rgba(42, 157, 143, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(42, 157, 143, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; transform: perspective(500px) rotateX(60deg); animation: gridMove 20s linear infinite; z-index: 0;
}
@keyframes gridMove { 0% { transform: perspective(500px) rotateX(60deg) translateY(0); } 100% { transform: perspective(500px) rotateX(60deg) translateY(40px); } }
.game-ui-container { position: relative; z-index: 10; border-radius: 12px; padding: 4px; background: linear-gradient(45deg, #333, #000); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
canvas { background: #1e293b; border-radius: 8px; display: block; cursor: none; }
.score-hud { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-family: 'Courier New', monospace; color: white; font-size: 1.5rem; font-weight: bold; z-index: 20; display: flex; gap: 2rem; }
.overlay-menu { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(5px); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 30; opacity: 0; pointer-events: none; transition: 0.3s; text-align: center; color: white; }
.overlay-menu.visible { opacity: 1; pointer-events: all; }
.neon-btn { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); padding: 15px 40px; font-size: 1.2rem; font-weight: bold; text-transform: uppercase; cursor: pointer; transition: 0.2s; margin-top: 2rem; font-family: 'Montserrat', sans-serif; }
.neon-btn:hover { background: var(--color-primary); color: white; box-shadow: 0 0 20px var(--color-primary); }

@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    .hero h1 { font-size: 2.5rem; }
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
}
