/* =============================================
   ECHOES OF SLUMBER
   Fonts: Tiraroum (display/nav) + Jockey One (body)
   BG: #060b17  |  Blue: #487cb7 / #5691d3
   Feature cards: white bg, black text (Figma exact)
   ============================================= */

@font-face {
    font-family: 'Tiraroum';
    src: url('Tiraroum.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg:        #060b17;
    --bg2:       #0c1428;
    --bg3:       #111c38;
    --blue:      rgba(72,  124, 183, 1);
    --blue-lt:   rgba(86,  145, 211, 1);
    --blue-dim:  rgba(51,  127, 165, 0.3);
    --white:     rgba(255, 255, 255, 1);
    --black:     rgba(0,   0,   0,   1);
    --fog:       rgba(255, 255, 255, 0.6);
    --dark-text: rgba(6,   11,  23,  1);
    --card-bg:   rgba(251, 251, 251, 0.9);  /* Figma: fbfbfb */

    --font-title: 'Tiraroum', sans-serif;
    --font-body:  'Jockey One', 'Inter', sans-serif;
    --tr: 0.3s ease;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.5;
}

/* =============================================
   LOADING
   ============================================= */
#loading-screen {
    position: fixed; inset: 0;
    background: var(--bg);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loading-inner {
    display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
    text-align: center;
}

.loading-gif {
    width: 120px;
    height: 120px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 20px var(--blue));
    transform: translateZ(0);
    will-change: filter;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.loading-bar {
    width: 240px; height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px; overflow: hidden;
}
.loading-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--blue-lt));
    width: 0;
    animation: loadFill 3s ease-in-out forwards;
}
@keyframes loadFill { to { width: 100%; } }

.loading-text {
    font-family: var(--font-body);
    font-size: 0.8rem; letter-spacing: 0.15em;
    color: var(--fog);
}

/* =============================================
   SPLASH / INTRO SCREEN
   ============================================= */
#splash-screen {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    cursor: pointer;
}
#splash-screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    position: absolute;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease, transform 3.1s cubic-bezier(0.1, 0.8, 0.3, 1.0);
    transform: scale(0.95);
}

.citm-logo {
    max-width: 85vw;
    height: auto;
    max-height: 380px;
    filter: brightness(0) invert(1);
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.15));
}

.studio-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
}

.studio-icon {
    max-width: 80vw;
    height: auto;
    max-height: 350px;
    filter: brightness(0) invert(1);
    filter: drop-shadow(0 0 50px rgba(72, 124, 183, 0.3));
}

.studio-text {
    font-family: var(--font-title);
    font-size: 2.2rem;
    letter-spacing: 0.15em;
    color: var(--white);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
}

.skip-prompt {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    text-transform: uppercase;
}
#splash-screen:hover .skip-prompt {
    opacity: 1;
}

/* Splash responsive overrides */
@media (max-width: 768px) {
    .citm-logo {
        max-height: 280px;
    }
    .studio-icon {
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .citm-logo {
        max-height: 220px;
    }
    .studio-icon {
        max-height: 140px;
    }
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    position: fixed; top: -80px; left: 0; right: 0; z-index: 1000;
    padding: 1rem 0;
    opacity: 0;
    transition: top 0.8s cubic-bezier(0.1, 0.8, 0.3, 1.0) 0.5s, opacity 0.8s ease 0.5s, background var(--tr), padding var(--tr);
}
body.loaded .navbar {
    top: 0;
    opacity: 1;
}
.navbar.scrolled {
    background: rgba(6,11,23,0.96);
    backdrop-filter: blur(12px);
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(72,124,183,0.2);
}

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
}

.nav-logo-img { height: 30px; width: auto; }

.nav-menu { list-style: none; display: flex; gap: 2.5rem; }

.nav-link {
    font-family: var(--font-title);
    font-size: 1.4rem;          /* Figma: 36px nav links */
    color: var(--fog);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color var(--tr);
    position: relative;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -3px; left: 0;
    width: 0; height: 1px; background: var(--blue-lt);
    transition: width var(--tr);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 22px; height: 2px; background: var(--blue-lt); border-radius: 1px; transition: var(--tr); }

/* =============================================
   HERO
   ============================================= */
.hero {
    position: relative;
    height: 100vh; min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
    background: var(--bg);
}

/* Figma group-4: level screenshots in a row at 25% opacity */
.hero-bg-levels {
    position: absolute; inset: 0; z-index: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr;
    opacity: 0.25;
}
.hero-bg-cell {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}
.hbl {
    position: absolute;
    max-width: none;
    filter: saturate(0.7);
}
.hbl-3 { width: 205.53%; height: 100%; top: 0; left: 0; }
.hbl-2 { width: 389.01%; height: 111.49%; top: -7%; left: -31.3%; }
.hbl-1 { width: 219.13%; height: 136.78%; top: -18.46%; left: -9.49%; }
.hbl-4 { width: 180.46%; height: 100%; top: 0; left: -80.46%; }

/* Figma rectangle-17: blue tint overlay 30% */
.hero-blue-tint {
    position: absolute; inset: 0; z-index: 1;
    background: rgba(72,124,183,1);
    opacity: 0.3;
}

/* Character: opacity 20% */
.hero-kid {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    z-index: 2;
    height: 80%; width: auto; object-fit: contain;
    opacity: 0.2;
    filter: brightness(2);
}

/* Figma rectangle-1: blurred teal rect 30% */
.hero-blur-rect {
    position: absolute; inset: 0; z-index: 3;
    background: rgba(51,127,165,0.3);
    backdrop-filter: blur(27px);
    -webkit-backdrop-filter: blur(27px);
    /* Only show in center area */
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 40%, transparent 100%);
}

/* Particles Canvas */
.hero-particle-canvas {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Final dark vignette */
.hero-vignette {
    position: absolute; inset: 0; z-index: 4;
    background: radial-gradient(ellipse at center, rgba(6,11,23,0.1) 20%, rgba(6,11,23,0.75) 100%);
}

.hero-content {
    position: relative; z-index: 5;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    padding: 0 1.5rem;
    opacity: 0;
}
body.loaded .hero-content {
    animation: fadeUp 1.2s cubic-bezier(0.1, 0.8, 0.3, 1.0) 0.2s both;
}

.hero-logo {
    width: min(460px, 82vw);
    filter: drop-shadow(0 0 50px rgba(72,124,183,0.45));
    opacity: 0;
    transform: scale(0.9);
}
body.loaded .hero-logo {
    animation: logoEntrance 1.5s cubic-bezier(0.1, 0.8, 0.3, 1.0) 0.3s both;
}
@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: scale(0.85);
        filter: drop-shadow(0 0 10px rgba(72,124,183,0));
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 50px rgba(72,124,183,0.45));
    }
}

.hero-tagline {
    font-family: var(--font-title);
    font-size: clamp(1.4rem, 3.5vw, 2.5rem);   /* Figma: 48px */
    letter-spacing: 0.15em;
    color: var(--white);
}
.accent-blue { color: var(--blue-lt); }

/* CTA button using boto1 asset as frame */
.hero-cta-wrap { margin-top: 0.5rem; }
.hero-cta {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: transform var(--tr), filter var(--tr);
}
.hero-cta:hover { transform: scale(1.06); filter: brightness(1.15); }
.cta-bg {
    width: 200px;
    display: block;
    filter: brightness(0) saturate(100%) invert(50%) sepia(21%) saturate(1142%) hue-rotate(174deg) brightness(88%) contrast(85%);
}
.cta-text {
    position: absolute;
    font-family: var(--font-title);
    font-size: 1.6rem;          /* Figma: 40px Play now */
    letter-spacing: 0.06em;
    color: var(--white);
    pointer-events: none;
    text-align: right;
}

.scroll-cue {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 5;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    opacity: 0;
}
body.loaded .scroll-cue {
    animation: fadeUp 0.8s ease 1.5s forwards;
}
.scroll-line {
    width: 1px; height: 36px;
    background: linear-gradient(to bottom, transparent, var(--blue-lt));
    animation: scrollDrop 2s ease-in-out infinite;
}
.scroll-cue span { font-family: var(--font-body); font-size: 0.65rem; letter-spacing: 0.2em; color: var(--fog); }
@keyframes scrollDrop {
    0%,100% { transform: scaleY(1); opacity: 0.5; }
    50%      { transform: scaleY(1.3); opacity: 1; }
}

/* =============================================
   LAYOUT
   ============================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.section-title {
    font-family: var(--font-title);
    font-size: clamp(3rem, 6vw, 6rem);   /* Figma: 96px */
    letter-spacing: 0.03em;
    color: var(--white);
    text-align: center;
    margin-bottom: 3rem;
}

/* =============================================
   GAMEPLAY / STORY
   ============================================= */
.gameplay-section {
    padding: 7rem 0 5rem;
    background: var(--bg2);
}

.gameplay-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}

/* Video */
.video-frame { position: relative; border-radius: 4px; }
.vc {
    position: absolute; width: 18px; height: 18px;
    border-color: var(--blue-lt); border-style: solid; opacity: 0.6;
}
.vc.tl { top:-5px; left:-5px;   border-width:2px 0 0 2px; }
.vc.tr { top:-5px; right:-5px;  border-width:2px 2px 0 0; }
.vc.bl { bottom:-5px; left:-5px;  border-width:0 0 2px 2px; }
.vc.br { bottom:-5px; right:-5px; border-width:0 2px 2px 0; }

.video-wrapper {
    position: relative; padding-bottom: 56.25%; height: 0;
    background: var(--bg3); border-radius: 4px; overflow: hidden;
    border: 1px solid rgba(72,124,183,0.25);
}
.video-wrapper iframe,
.video-wrapper .trailer-placeholder {
    position: absolute; inset: 0; width: 100%; height: 100%;
}
.trailer-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bg3), var(--bg2));
}
.trailer-label {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 6rem);   /* Figma: 96px TRAILER */
    letter-spacing: 0.1em;
    color: var(--black);
    background: rgba(217,217,217,0.5);
    padding: 1rem 2rem;
    border-radius: 8px;
}

/* Level thumbs */
.levels-strip {
    display: flex; gap: 0.6rem; margin-top: 1.25rem;
    overflow-x: auto; scrollbar-width: none;
}
.levels-strip::-webkit-scrollbar { display: none; }
.level-thumb {
    flex: 0 0 auto; height: 70px; width: auto; border-radius: 3px;
    border: 1px solid rgba(72,124,183,0.2); object-fit: cover;
    transition: border-color var(--tr), transform var(--tr); cursor: pointer;
}
.level-thumb:hover { border-color: var(--blue-lt); transform: scale(1.05); }

/* Tabs */
.tab-nav {
    display: flex; flex-wrap: wrap; gap: 0.2rem;
    border-bottom: 1px solid rgba(72,124,183,0.2);
    margin-bottom: 1.5rem;
}
.tab-btn {
    font-family: var(--font-title);
    font-size: 1.5rem;    /* Figma: 40px tab labels */
    color: var(--fog); background: none; border: none;
    padding: 0.4rem 1rem; cursor: pointer;
    border-bottom: 2px solid transparent;
    position: relative; bottom: -1px;
    transition: color var(--tr), border-color var(--tr);
    /* Figma: rect-12 blue bg at 50% for active tab */
}
.tab-btn:hover { color: var(--white); }
.tab-btn.active {
    color: var(--white);
    border-bottom-color: var(--blue-lt);
    background: rgba(72,124,183,0.5);
    border-radius: 10px 10px 0 0;
}

.tab-panel { display: none; min-height: 130px; }
.tab-panel.active { display: block; animation: fadeIn 0.35s ease; }
.tab-panel p {
    font-family: var(--font-body);
    font-size: 14px; text-align: justify;   /* Figma: 14px Jockey One */
    color: var(--white); line-height: 1.75; margin-bottom: 0.85rem;
}
.tab-panel p:last-child { margin-bottom: 0; }

/* =============================================
   FEATURES
   Figma: white/fbfbfb cards, black text, Tiraroum 48px titles
   ============================================= */
.features-section {
    padding: 7rem 0;
    background: var(--bg);
}

.features-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}

.feat-card {
    background: var(--card-bg);
    border-radius: 10px; overflow: hidden;
    transition: transform var(--tr), box-shadow var(--tr);
}
.feat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(72,124,183,0.25);
}

.feat-wide { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: stretch; }

.feat-img-area {
    position: relative; overflow: hidden; background: rgba(217,217,217,1);
    display: flex; align-items: center; justify-content: center;
}
.feat-card:not(.feat-wide) .feat-img-area { height: 180px; }
.feat-wide .feat-img-area { width: 300px; flex-shrink: 0; }

.feat-bg-asset {
    width: 100%; height: 100%; object-fit: cover;
}

.feat-body { padding: 1.5rem 2rem; }

.feat-title {
    font-family: var(--font-title);
    font-size: 2rem;        /* Figma: 48px feature titles */
    color: var(--black);
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.feat-desc {
    font-family: var(--font-body);
    font-size: 16px;        /* Figma: 24px Jockey One */
    color: var(--black);
    line-height: 1.6;
}

/* =============================================
   TEAM
   Figma: Tiraroum 24px col labels, Jockey 16px names, white roles in blue
   ============================================= */
.team-section { padding: 7rem 0; background: var(--bg2); }

.team-wrapper {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
}

.team-col-label {
    font-family: var(--font-title);
    font-size: 1.5rem;      /* Figma: 24px col labels */
    color: var(--white);
    border-bottom: 1px solid rgba(72,124,183,0.3);
    padding-bottom: 0.75rem; margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.team-member {
    display: flex; align-items: flex-start; gap: 0.9rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(72,124,183,0.08);
    transition: padding-left var(--tr);
}
.team-member:last-child { border-bottom: none; }
.team-member:hover { padding-left: 0.5rem; }

.member-avatar {
    width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    border: 2px solid rgba(72,124,183,0.35);
    background: var(--bg3);
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }

.letter-av {
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-body); font-size: 0.85rem;
    color: var(--blue-lt);
    background: rgba(72,124,183,0.12);
}
.av-lead { border-color: var(--blue-lt); background: rgba(86,145,211,0.18); }

.member-info h4 {
    font-family: var(--font-body);
    font-size: 16px;        /* Figma: 16px Jockey One */
    color: var(--white); margin-bottom: 0.1rem;
    transition: color var(--tr);
}
.team-member:hover .member-info h4 { color: var(--blue-lt); }

.member-role {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 12px;        /* Figma: 12px blue role text */
    color: var(--blue-lt);
    margin-bottom: 0.2rem;
    letter-spacing: 0.05em;
}

.member-info p {
    font-family: var(--font-body);
    font-size: 12px;        /* Figma: 12px role desc in white chip */
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
}

/* =============================================
   DOWNLOAD — JotPK-style two-column layout
   ============================================= */
.download-section {
    padding: 7rem 0 3rem 0; background: var(--bg);
    text-align: center; position: relative; overflow: hidden;
}

.download-particle-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Two-column layout like JotPK */
.download-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: left;
    position: relative; z-index: 1;
}

.download-description {
    font-family: var(--font-body);
    font-size: 1rem; line-height: 1.75;
    color: var(--fog);
    margin-bottom: 2rem;
}

.system-requirements {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(72,124,183,0.2);
    border-radius: 10px;
    padding: 1.5rem;
}
.system-requirements h4 {
    font-family: var(--font-title);
    font-size: 1.1rem; letter-spacing: 0.08em;
    color: var(--blue-lt); margin-bottom: 1rem;
}
.system-requirements ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.system-requirements li {
    display: flex; align-items: center; gap: 0.75rem;
    font-family: var(--font-body); font-size: 0.9rem; color: var(--fog);
}
.system-requirements i { color: var(--blue); width: 16px; flex-shrink: 0; }

/* Right column: version + button */
.download-actions { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }

.version-info { text-align: center; }
.version-tag {
    display: inline-block;
    font-family: var(--font-title);
    font-size: 0.85rem; letter-spacing: 0.15em;
    color: var(--dark-text);
    background: rgba(255,255,255,0.85);
    padding: 0.3rem 1rem; border-radius: 20px;
    margin-bottom: 0.6rem;
}
.version-info h3 {
    font-family: var(--font-title);
    font-size: 1.6rem; color: var(--white); margin-bottom: 0.2rem;
}
.version-info p { font-family: var(--font-body); font-size: 0.85rem; color: var(--fog); }

/* Big download button using boto1 asset */
.dl-btn-full {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: transform var(--tr), filter var(--tr);
}
.dl-btn-full:hover { transform: scale(1.06); filter: brightness(1.2); }
.dl-btn-bg-full {
    width: 320px;
    display: block;
    filter: brightness(0) saturate(100%) invert(50%) sepia(21%) saturate(1142%) hue-rotate(174deg) brightness(88%) contrast(85%);
}
.dl-btn-inner-shadow {
    position: absolute;
    inset: 0;
    background-color: #487cb7;
    -webkit-mask-image: url('../images/boto1-141.png');
    mask-image: url('../images/boto1-141.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: multiply;
}
.dl-btn-inner-full {
    position: absolute;
    inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
    pointer-events: none;
    z-index: 1;
}
.dl-btn-main-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.dl-icon-full { width: 24px; height: auto; display: block; }
.dl-btn-label-full {
    font-family: var(--font-title);
    font-size: 1.65rem; letter-spacing: 0.1em; color: var(--white);
}
.file-size {
    font-family: var(--font-body);
    font-size: 0.75rem; color: rgba(255,255,255,0.7);
    transition: opacity 0.3s ease;
}

.download-links {
    display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.btn-outline {
    font-family: var(--font-body);
    font-size: 0.82rem; letter-spacing: 0.06em;
    color: var(--fog); text-decoration: none;
    padding: 0.65rem 1.25rem;
    border: 1px solid rgba(72,124,183,0.35);
    border-radius: 4px;
    display: flex; align-items: center; gap: 0.5rem;
    transition: all var(--tr);
}
.btn-outline:hover {
    color: var(--white);
    border-color: var(--blue-lt);
    background: rgba(72,124,183,0.1);
}

/* =============================================
   FOOTER — silhouette strip like image 1
   ============================================= */
.footer {
    background: var(--bg);
    position: relative; overflow: hidden;
}

/* The panoramic silhouette strip exactly as image 1 */
.footer-silhouettes-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    /* Maintain aspect ratio of the 1440x364 Figma block */
    aspect-ratio: 1440 / 364;
    max-height: 364px;
    background: transparent;
}
.footer-silhouettes-canvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1440px;
    height: 364px;
    transform-origin: top center;
}
/* Responsive scale down if viewport < 1440px */
@media (max-width: 1440px) {
    .footer-silhouettes-canvas {
        transform: translateX(-50%) scale(calc(100vw / 1440));
    }
}
.sil {
    position: absolute;
    pointer-events: none;
}
.sil.sil-flip {
    transform: scaleX(-1);
}
.sil-inner {
    position: absolute;
    inset: 0;
    background-position: bottom;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Blue border line at top of footer, like image 1 */
.footer-border {
    width: 100%;
    height: 2px;
    background: var(--blue);
}

.footer-logos-row {
    display: flex; align-items: center; justify-content: center;
    gap: 4rem; flex-wrap: wrap; margin-bottom: 0;
    position: absolute;
    top: 136px; /* Offset from top of footer */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 10;
}
.footer-logo {
    height: auto; width: auto; opacity: 0.7;
    filter: brightness(0) invert(1);
    transition: opacity var(--tr);
}
.footer-logo:nth-child(1) { height: 62px; } /* Hidden Studios */
.footer-logo:nth-child(2) { height: 92px; }    /* CITM/UPC */
.footer-logo:nth-child(3) { height: 62px; } /* Echoes of Slumber */
.footer-logo:hover { opacity: 1; }

@media (max-width: 768px) {
    .footer-logos-row {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        gap: 2rem;
        padding: 2.5rem 1rem 1.5rem;
        box-sizing: border-box;
    }
    .footer-logo:nth-child(1) { height: 40px; }
    .footer-logo:nth-child(2) { height: 55px; max-width: 70vw; }
    .footer-logo:nth-child(3) { height: 40px; }
}

@media (max-width: 480px) {
    .footer-logos-row {
        gap: 1.25rem;
        padding: 2rem 1rem 1rem;
    }
    .footer-logo:nth-child(1) { height: 32px; }
    .footer-logo:nth-child(2) { height: 45px; max-width: 80vw; }
    .footer-logo:nth-child(3) { height: 32px; }
    .footer-silhouettes-container {
        height: max(131px, calc(100vw * 364 / 1440));
    }
    .footer-silhouettes-canvas {
        transform: translateX(-50%) scale(max(0.36, calc(100vw / 1440)));
    }
}

.footer-copy {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.8rem; color: var(--fog); opacity: 0.55;
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.scroll-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
    from { opacity:0; transform: translateY(22px); }
    to   { opacity:1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .gameplay-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .feat-wide { flex-direction: column; }
    .feat-wide .feat-img-area { width: 100%; height: 180px; }
    .team-wrapper { grid-template-columns: 1fr; }
    .download-content { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .download-info { text-align: center; }
    .system-requirements ul { align-items: flex-start; display: inline-flex; flex-direction: column; }
    .nav-link { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: relative;
        z-index: 1010;
    }
    .nav-brand {
        position: relative;
        z-index: 1010;
    }

    .nav-menu {
        position: fixed; inset: 0;
        background: rgba(6,11,23,0.97);
        flex-direction: column; align-items: center; justify-content: center;
        gap: 2rem;
        transform: translateX(100%);
        visibility: hidden;
        z-index: 1000;
        transition: transform var(--tr), visibility var(--tr);
        backdrop-filter: blur(20px);
    }
    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
    }
    .nav-link { font-size: 2rem; }

    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

    .tab-btn { font-size: 1rem; }
    .section-title { font-size: clamp(2rem, 8vw, 3.5rem); }
    .feat-title { font-size: 1.5rem; }
    .sil-asset { height: clamp(50px, 10vw, 90px); }

    .footer-silhouettes-container {
        aspect-ratio: auto;
        height: max(164px, calc(100vw * 364 / 1440));
    }
    .footer-silhouettes-canvas {
        transform: translateX(-50%) scale(max(0.45, calc(100vw / 1440)));
        transform-origin: bottom center;
        top: auto;
        bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}