/* === CSS VARIABLES === */
:root {
    --black: #050507;
    --dark: #0d0d12;
    --dark2: #111118;
    --dark3: #1a1a24;
    --dark4: #22222f;
    --burgundy: #6b1020;
    --burgundy2: #8b1428;
    --burgundy3: #a8192f;
    --gold: #c9a84c;
    --gold2: #e8c86a;
    --gold3: #f5e0a0;
    --neon-red: #ff2244;
    --neon-gold: #ffd700;
    --text: #d4c8b0;
    --text-dim: #7a7060;
    --white: #f0e8d8;
    --font-display: 'Bebas Neue', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--black);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: default;
}

/* Grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

a { color: inherit; text-decoration: none; }

a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

img { max-width: 100%; }

/* === SCROLL ANIMATIONS === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* === NAVIGATION === */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    padding: 1.2rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(5,5,7,0.95), transparent);
    backdrop-filter: blur(2px);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 0.3em;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(201,168,76,0.5);
}

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

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.3s ease;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* === HERO === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
}

/* Dramatic background */
.hero-bg {
    position: absolute;
    inset: 0;
    background:
            radial-gradient(ellipse 80% 60% at 50% 20%, rgba(107,16,32,0.35) 0%, transparent 70%),
            radial-gradient(ellipse 60% 80% at 20% 80%, rgba(30,10,15,0.8) 0%, transparent 60%),
            radial-gradient(ellipse 50% 70% at 80% 70%, rgba(20,8,12,0.7) 0%, transparent 60%),
            linear-gradient(180deg, #050507 0%, #0d0508 40%, #120308 70%, #050507 100%);
}

/* City lights effect */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            radial-gradient(1px 1px at 20% 30%, rgba(255,200,100,0.6) 0%, transparent 100%),
            radial-gradient(1px 1px at 80% 20%, rgba(255,150,100,0.4) 0%, transparent 100%),
            radial-gradient(2px 2px at 50% 60%, rgba(200,100,100,0.3) 0%, transparent 100%),
            radial-gradient(1px 1px at 10% 70%, rgba(255,220,150,0.5) 0%, transparent 100%),
            radial-gradient(1px 1px at 90% 80%, rgba(255,180,100,0.4) 0%, transparent 100%);
}

/* Placeholder for hero background illustration */
/* Image: Aerial view of a dark noir city at night, rain-slicked streets reflecting red and amber streetlights,
   silhouette of a man in a fedora in the foreground, dramatic chiaroscuro lighting, movie poster composition */
.hero-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-overline {
    font-family: var(--font-body);
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInDown 1s 0.3s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(6rem, 22vw, 18rem);
    line-height: 0.85;
    letter-spacing: 0.05em;
    color: var(--white);
    text-shadow:
            0 0 80px rgba(200,50,50,0.4),
            0 0 160px rgba(150,20,30,0.2),
            0 4px 20px rgba(0,0,0,0.8);
    opacity: 0;
    animation: heroReveal 1.2s 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
    position: relative;
}

.hero-title::before {
    content: 'МАФИЯ';
    position: absolute;
    inset: 0;
    color: transparent;
    -webkit-text-stroke: 1px rgba(201,168,76,0.15);
    text-shadow: none;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 3vw, 1.6rem);
    color: var(--text-dim);
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInUp 1s 1s forwards;
}

.hero-subtitle span {
    color: var(--neon-red);
    text-shadow: 0 0 20px rgba(255,34,68,0.6);
}

.hero-divider {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 2.5rem auto;
    opacity: 0;
    animation: fadeIn 1s 1.3s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s 1.5s forwards;
}

.btn {
    position: relative;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 1.1rem 3rem;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.btn-primary {
    background: linear-gradient(135deg, var(--burgundy2), var(--burgundy3));
    color: var(--white);
    box-shadow: 0 0 30px rgba(168,25,47,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--neon-red), var(--burgundy2));
    opacity: 0;
    transition: opacity 0.4s ease;
}
.btn-primary:hover {
    box-shadow: 0 0 50px rgba(255,34,68,0.5), 0 0 100px rgba(168,25,47,0.3);
    transform: translateY(-2px);
}
.btn-primary:hover::before { opacity: 1; }

.btn-secondary {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,0.4);
    box-shadow: 0 0 20px rgba(201,168,76,0.1), inset 0 0 20px rgba(201,168,76,0.03);
}
.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(201,168,76,0.08);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.btn-secondary:hover {
    border-color: var(--gold);
    box-shadow: 0 0 40px rgba(201,168,76,0.3), inset 0 0 30px rgba(201,168,76,0.08);
    transform: translateY(-2px);
}
.btn-secondary:hover::before { opacity: 1; }

.btn span { position: relative; z-index: 1; }

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s 2.2s forwards;
}
.hero-scroll span {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollPulse 2s infinite;
}

/* === SECTION BASE === */
section {
    position: relative;
    padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem);
    max-width: 1400px;
    margin: 0 auto;
}

.section-full {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.section-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.section-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.section-label::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: var(--gold);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-title em {
    font-style: italic;
    color: var(--gold2);
}

/* === SECTION SEPARATOR === */
.sep {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.2), transparent);
    margin: 0;
}

/* === ABOUT SECTION === */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.about-visual {
    position: sticky;
    top: 120px;
}

/* Placeholder: Noir illustration of shadowy figures sitting around a circular table under a single hanging lamp,
   faces obscured, playing cards visible, smoke rising, dark alley city visible through rain-streaked window,
   deep burgundy and black palette with amber light pools */
.placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background:
            radial-gradient(ellipse 60% 40% at 50% 30%, rgba(107,16,32,0.3), transparent),
            linear-gradient(160deg, #1a0a10, #0d0508, #050307);
    border: 1px solid rgba(201,168,76,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.placeholder::before {
    content: attr(data-icon);
    font-size: 5rem;
    opacity: 0.15;
}
.placeholder::after {
    content: attr(data-desc);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    font-size: 0.6rem;
    color: rgba(201,168,76,0.3);
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    font-style: italic;
    line-height: 1.4;
}
.placeholder-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(201,168,76,0.3);
    border-style: solid;
}
.placeholder-corner.tl { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.placeholder-corner.tr { top: 8px; right: 8px; border-width: 1px 1px 0 0; }
.placeholder-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 1px 1px; }
.placeholder-corner.br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

.about-text .section-label { margin-bottom: 0.8rem; }
.about-text .section-title { margin-bottom: 2.5rem; }

.about-text p {
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.about-text p:first-of-type::first-letter {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--burgundy3);
    float: left;
    line-height: 0.8;
    margin: 0.1em 0.1em 0 0;
    text-shadow: 0 0 30px rgba(168,25,47,0.5);
}

.about-quote {
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    border-left: 2px solid var(--burgundy3);
    background: rgba(107,16,32,0.1);
    position: relative;
}
.about-quote::before {
    content: '❝';
    font-family: var(--font-serif);
    font-size: 3rem;
    color: rgba(168,25,47,0.3);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    line-height: 1;
}
.about-quote p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--gold3);
    margin: 0;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}
.stat {
    text-align: center;
    padding: 1.5rem 1rem;
    border: 1px solid rgba(201,168,76,0.1);
    background: rgba(201,168,76,0.03);
}
.stat-num {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--gold);
    letter-spacing: 0.05em;
    display: block;
    text-shadow: 0 0 20px rgba(201,168,76,0.3);
}
.stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

/* === ROLES SECTION === */
.roles-section {
    background: linear-gradient(180deg, #050507 0%, #0a0510 50%, #050507 100%);
    position: relative;
}
.roles-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 100% 50% at 50% 50%, rgba(107,16,32,0.08), transparent);
    pointer-events: none;
}

.roles-header {
    text-align: center;
    margin-bottom: 4rem;
}
.roles-header .section-label {
    justify-content: center;
}
.roles-header .section-label::before { display: none; }

.faction-block {
    margin-bottom: 4rem;
}

.faction-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.faction-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.2;
}

.faction-town .faction-title { color: #5ba3d9; }
.faction-mafia .faction-title { color: var(--neon-red); }
.faction-neutral .faction-title { color: #9b59b6; }
.faction-undead .faction-title { color: #2ecc71; }

.faction-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

.role-card {
    position: relative;
    background: var(--dark2);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.8rem 1.5rem;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: default;
}
.role-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-accent, rgba(255,255,255,0.1));
    transition: height 0.4s ease;
}
.role-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.role-card:hover::before { height: 3px; }

/* Faction accents */
.faction-town .role-card { --card-accent: linear-gradient(90deg, #3a7bd5, #5ba3d9); }
.faction-mafia .role-card { --card-accent: linear-gradient(90deg, var(--burgundy), var(--neon-red)); }
.faction-neutral .role-card { --card-accent: linear-gradient(90deg, #6c3483, #9b59b6); }
.faction-undead .role-card { --card-accent: linear-gradient(90deg, #145a32, #2ecc71); }

.role-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    display: block;
    transition: filter 0.4s ease, transform 0.4s ease;
}
.role-icon svg {
    width: 100%;
    height: 100%;
}
.role-card:hover .role-icon {
    filter: drop-shadow(0 0 8px currentColor);
    transform: scale(1.1);
}
.faction-town .role-card:hover .role-icon  { filter: drop-shadow(0 0 8px #5ba3d9); }
.faction-mafia .role-card:hover .role-icon { filter: drop-shadow(0 0 8px #ff4466); }
.faction-neutral .role-card:hover .role-icon { filter: drop-shadow(0 0 8px #c39bd3); }
.faction-undead .role-card:hover .role-icon  { filter: drop-shadow(0 0 8px #58d68d); }

.role-name {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
}

.role-faction-tag {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
    display: block;
}

.faction-town .role-faction-tag { color: #5ba3d9; }
.faction-mafia .role-faction-tag { color: #ff6680; }
.faction-neutral .role-faction-tag { color: #c39bd3; }
.faction-undead .role-faction-tag { color: #58d68d; }

.role-desc {
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text-dim);
}

.role-card-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 3rem;
    position: relative;
}

/* === HOW TO PLAY === */
.howto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.phase-block { margin-bottom: 1rem; }

.phase-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.phase-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    position: relative;
}
.night-icon { background: radial-gradient(circle, #0a0520, #050310); border: 1px solid rgba(100,60,200,0.3); box-shadow: 0 0 20px rgba(80,40,180,0.3); }
.day-icon { background: radial-gradient(circle, #1a0d05, #0d0803); border: 1px solid rgba(201,168,76,0.3); box-shadow: 0 0 20px rgba(201,168,76,0.3); }

.phase-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: 0.15em;
}
.night-phase .phase-title { color: #9b7fe8; }
.day-phase .phase-title { color: var(--gold2); }

.steps-list {
    list-style: none;
    counter-reset: step;
}

.steps-list li {
    counter-increment: step;
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: relative;
}
.steps-list li:last-child { border-bottom: none; }

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(201,168,76,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--gold);
    margin-top: 0.1rem;
}

.step-content h4 {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
}
.step-content p {
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-dim);
}

/* === VARIATIONS === */
.variations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.var-card {
    padding: 2rem;
    background: var(--dark2);
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}
.var-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--var-color, rgba(201,168,76,0.3));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}
.var-card:hover {
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.var-card:hover::after { transform: scaleX(1); }

.var-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.var-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.var-tag {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--var-tag-color, var(--gold));
    margin-bottom: 0.8rem;
    display: block;
}

.var-desc {
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-dim);
}

/* === FOOTER === */
footer {
    background: var(--black);
    border-top: 1px solid rgba(201,168,76,0.08);
    padding: 3rem 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(201,168,76,0.3);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}
.footer-socials a {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.3s ease;
}
.footer-socials a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.04);
    padding-top: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}
.footer-bottom p {
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    line-height: 1.6;
}
.footer-bottom p:first-child {
    color: var(--text);
    font-weight: 600;
}

/* === HAMBURGER BUTTON === */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid rgba(201,168,76,0.2);
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1300;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav-burger:hover { border-color: rgba(201,168,76,0.5); }

.nav-burger.open {
    border-color: rgba(201,168,76,0.6);
    box-shadow: 0 0 16px rgba(201,168,76,0.2), inset 0 0 12px rgba(201,168,76,0.05);
}

.nav-burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--gold);
    /* each line is 1.5px tall, gap between them is 5px → step = 1.5 + 5 = 6.5px */
    transition:
            transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
            opacity   0.25s ease,
            width     0.3s  ease;
    transform-origin: center;
}

/* top line slides down and rotates → \ */
.nav-burger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
/* middle line fades out */
.nav-burger.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}
/* bottom line slides up and rotates → / */
.nav-burger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* === MOBILE MENU OVERLAY === */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 6rem 2.5rem 3rem;
    pointer-events: none;
    visibility: hidden;
}

.mobile-menu.open {
    pointer-events: all;
    visibility: visible;
}

.mobile-menu-bg {
    position: absolute;
    inset: 0;
    background:
            radial-gradient(ellipse 80% 60% at 10% 50%, rgba(107,16,32,0.25), transparent),
            rgba(5,5,7,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.23,1,0.32,1);
}
.mobile-menu.open .mobile-menu-bg {
    transform: translateX(0);
}

.mobile-menu-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(201,168,76,0.3), transparent);
}

.mobile-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.mobile-link {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.23,1,0.32,1), color 0.3s ease;
    text-decoration: none;
}

.mobile-menu.open .mobile-link:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: 0.22s; }
.mobile-menu.open .mobile-link:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: 0.29s; }
.mobile-menu.open .mobile-link:nth-child(4) { opacity: 1; transform: translateX(0); transition-delay: 0.36s; }

.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover .mobile-link-text { color: var(--gold); }
.mobile-link:hover .mobile-link-num { color: var(--burgundy3); }

.mobile-link-num {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: rgba(201,168,76,0.3);
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
    flex-shrink: 0;
    width: 28px;
}

.mobile-link-text {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 8vw, 3rem);
    letter-spacing: 0.08em;
    color: var(--white);
    line-height: 1;
    transition: color 0.3s ease;
}

.mobile-menu-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}
.mobile-menu.open .mobile-menu-footer {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-footer span:first-child {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(201,168,76,0.4);
}

body.menu-open { overflow: hidden; }

/* === KEYFRAMES === */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes heroReveal {
    from { opacity: 0; transform: scale(0.95) translateY(20px); filter: blur(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(0.7); }
}
@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 20px rgba(201,168,76,0.3); }
    50% { text-shadow: 0 0 40px rgba(201,168,76,0.6), 0 0 80px rgba(201,168,76,0.2); }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    nav { padding: 1rem 2rem; }
    .about { grid-template-columns: 1fr; gap: 3rem; }
    .about-visual { position: static; }
    .about-visual .placeholder { aspect-ratio: 16/9; max-height: 400px; }
    .howto-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    section { padding: clamp(3rem, 8vw, 5rem) clamp(1.2rem, 4vw, 2rem); }
    .about-stats { grid-template-columns: 1fr 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .about-stats { grid-template-columns: 1fr; }
    .roles-grid { grid-template-columns: 1fr 1fr; }
}

/* === ROLE CARD WITH IMAGE === */
.role-card-img {
    position: relative;
    background: var(--dark2);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
}
.role-card-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-accent, rgba(255,255,255,0.1));
    transition: height 0.4s ease;
    z-index: 2;
}
.role-card-img:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 24px 70px rgba(0,0,0,0.6);
}
.role-card-img:hover::before { height: 3px; }

.role-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
}
.role-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.6s ease;
    filter: saturate(0.85) contrast(1.05);
}
.role-card-img:hover .role-card-img-wrap img {
    transform: scale(1.06);
}

/* Cinematic overlays */
.role-card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
            linear-gradient(to top, rgba(13,13,18,1) 0%, rgba(13,13,18,0.4) 40%, transparent 70%),
            linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 30%);
    z-index: 1;
    pointer-events: none;
}

/* Vignette sides */
.role-card-img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Faction color tint on hover */
.faction-town .role-card-img-wrap img   { --tint: rgba(91,163,217,0.08); }
.faction-mafia .role-card-img-wrap img  { --tint: rgba(255,34,68,0.08); }

.role-card-img-wrap .role-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 3px 10px;
    font-family: var(--font-body);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    border: 1px solid currentColor;
}
.faction-town .role-card-badge   { color: #5ba3d9; background: rgba(91,163,217,0.1); }
.faction-mafia .role-card-badge  { color: #ff6680; background: rgba(255,34,68,0.1); }

.role-card-img-body {
    padding: 1.2rem 1.4rem 1.6rem;
    position: relative;
    z-index: 2;
    margin-top: -2px;
    background: var(--dark2);
}

.role-card-img .role-name {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}
.role-card-img .role-faction-tag {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
    display: block;
}
.role-card-img .role-desc {
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text-dim);
}

/* Decorative corner bracket */
.role-card-img-wrap .corner-tl,
.role-card-img-wrap .corner-br {
    position: absolute;
    width: 14px;
    height: 14px;
    z-index: 4;
    border-color: rgba(201,168,76,0.4);
    border-style: solid;
}
.role-card-img-wrap .corner-tl { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.role-card-img-wrap .corner-br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }
