:root {
    --c-blue: #002fa7; /* Klein Blue */
    --c-emerald: #00c957; /* Geek Emerald */
    --c-dark-bg: #030305;
    --c-light-bg: #f6f8fb;
    --c-white: #ffffff;
    --c-black-text: #0b0c10;
    --c-border: rgba(11, 12, 16, 0.1);
    
    --font-head: 'Outfit', sans-serif;
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--c-light-bg);
    color: var(--c-black-text);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
    background-color: var(--c-blue);
    color: var(--c-white);
}

/* Base Utility Classes */
.bg-light-gray { background: var(--c-light-bg); }
.bg-white { background: var(--c-white); }
.bg-emerald { background: var(--c-emerald); color: var(--c-white); }
.bg-dark { background: var(--c-dark-bg); color: var(--c-white); }
.bg-blue { background: var(--c-blue); color: var(--c-white); }

.light-text { color: var(--c-white) !important; }
.border-tags span { border-color: rgba(255,255,255,0.3) !important; color: var(--c-white) !important; }
.border-white { border: 2px solid rgba(255,255,255,0.2) !important; }
.shadow-heavy { box-shadow: 0 40px 100px -20px rgba(0,0,0,0.5); }

/* Stacking Cards Engine */
.stacking-container {
    position: relative;
    width: 100vw;
    /* Extra padding to prevent the last card from sticking forever */
    padding-bottom: 2vh; 
}

.stack-card {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh; /* Exactly fullscreen */
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid var(--c-border);
    transform-origin: center top;
    will-change: transform;
    /* Drop shadow to emphasize overlapping */
    box-shadow: 0 -24px 64px -12px rgba(0,0,0,0.08); 
}

.tilt-trigger {
    padding: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* -- HEADER / HERO -- */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.1em;
    z-index: 10;
}
.logo { display: flex; align-items: center; gap: 1rem; font-size: 1.25rem; }
.status { font-size: 0.85rem; color: var(--c-blue); padding: 0.5rem 1rem; background: rgba(0,47,167,0.1); border-radius: 4px; border: 1px solid rgba(0,47,167,0.3); }

.card-hero .tilt-trigger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0 10%;
}

.card-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(5rem, 10vw, 12rem);
    line-height: 0.85;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    color: var(--c-black-text);
    text-transform: uppercase;
}

.manifesto {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 600px;
    font-weight: 500;
    color: rgba(11,12,16,0.7);
    border-left: 4px solid var(--c-blue);
    padding-left: 2rem;
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 10%;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    font-family: var(--font-head);
    letter-spacing: 0.2em;
    font-size: 0.85rem;
}

.wireframe-dec {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(0,47,167,0.2) 10px, rgba(0,47,167,0.2) 20px);
}
.border-top { top: 15vh; }
.border-bottom { bottom: 15vh; }

/* -- GAMES PORTFOLIO -- */
.game-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    height: 100%;
}

.game-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-icon {
    width: 120px;
    height: 120px;
    border-radius: 20%;
    margin-bottom: 2rem;
    border: 1px solid var(--c-border);
    background: #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.game-meta h2 {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 1;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.game-subtitle {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.game-desc {
    font-size: 1.15rem;
    max-width: 80%;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.tags { display: flex; gap: 1rem; flex-wrap: wrap; }
.tags span {
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-head);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.game-gallery {
    width: 100%;
    height: 60vh;
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--c-blue) rgba(0,0,0,0.1);
}

.game-gallery::-webkit-scrollbar {
    height: 8px;
}
.game-gallery::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}
.game-gallery::-webkit-scrollbar-thumb {
    background: var(--c-blue);
    border-radius: 4px;
}
.dark-gallery::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}
.dark-gallery::-webkit-scrollbar-thumb {
    background: var(--c-white);
}

.game-gallery img {
    height: 100%;
    width: auto;
    max-width: 90vw;
    object-fit: contain;
    scroll-snap-align: center;
    border-radius: 0.5rem;
    background: rgba(0,0,0,0.03); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dark-gallery img {
    background: rgba(255,255,255,0.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* -- SERVICES GRID -- */
.services-wrapper { padding: 4rem; width: 100%; max-width: 1400px; margin: 0 auto; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.services-wrapper h3 { font-family: var(--font-head); font-size: 3rem; font-weight: 800; margin-bottom: 4rem; opacity: 0.1; }

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.service-block {
    padding: 3rem;
    border: 1px solid var(--c-border);
    transition: background 0.3s ease;
    background: transparent;
}
.service-block:hover {
    background: var(--c-light-bg);
}
.service-block svg { color: var(--c-blue); margin-bottom: 1.5rem; }
.service-block h4 { font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 1rem; font-weight: 700; }
.service-block p { opacity: 0.7; font-size: 1.05rem; }


/* -- CONTACT FORM -- */
.card-contact .tilt-trigger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 900px;
}
.card-contact h2 { font-family: var(--font-head); font-size: 4rem; font-weight: 800; margin-bottom: 3rem; }

#sgc-contact { display: flex; flex-direction: column; gap: 2rem; width: 100%; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.form-row-1 { display: grid; grid-template-columns: 1fr; }

.input-group { display: flex; flex-direction: column; gap: 0.5rem; position: relative; }
.input-group label { font-family: var(--font-head); font-size: 0.85rem; font-weight: 600; opacity: 0.8; letter-spacing: 0.05em; text-transform: uppercase; }

input, select, textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    color: var(--c-white);
    font-family: var(--font-body);
    font-size: 1.15rem;
    padding: 1rem 0;
    transition: border-color 0.3s;
    outline: none;
    border-radius: 0;
}
input::placeholder, textarea::placeholder, option { color: rgba(255,255,255,0.4); }
input:focus, select:focus, textarea:focus { border-color: var(--c-white); }
textarea { resize: vertical; min-height: 100px; }

/* Custom Select styling to remove browser defaults */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.select-wrapper { position: relative; }
.select-arrow {
    position: absolute;
    right: 0;
    bottom: 20px;
    pointer-events: none;
    opacity: 0.6;
}
/* Ensure options text is visible on different OS dropdowns natively */
option { background: var(--c-blue); color: #fff; }

.submit-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--c-white);
    color: var(--c-blue);
    border: none;
    padding: 1rem 3rem;
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    margin-top: 2rem;
}
.submit-btn:hover { transform: translateY(-5px); }

.terminal-footer {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    left: 0;
    padding: 0 4rem;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-head);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .game-split-layout { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .game-visual { height: 40vh; }
    .game-meta { align-items: center; }
    .game-visual-left { order: 0; }
    .service-grid { grid-template-columns: 1fr; }
    .card-hero h1 { font-size: 4rem; }
    .top-nav { padding: 1.5rem; flex-direction: column; gap: 1rem; }
    .tilt-trigger { padding: 1.5rem; }
}
@media (max-width: 600px) {
    .form-row-2 { grid-template-columns: 1fr; gap: 1rem; }
    .terminal-footer { flex-direction: column; gap: 0.5rem; padding: 0 1.5rem; align-items: center; }
}
