/* =========================================================================
   GLOBAL SYSTEM - LINEAGE TWISTER (NCSOFT REPLICA STYLE)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --clr-bg-base: #06090e;
    --clr-bg-panel: rgba(12, 16, 25, 0.85);
    --clr-primary: #d4a037; /* NCSoft Gold */
    --clr-primary-glow: rgba(212, 160, 55, 0.5);
    --clr-primary-hover: #f3cc63;
    --clr-accent: #b21f1f; /* Crimson */
    --clr-text: #e0e2eb;
    --clr-text-muted: #8b92b3;
    
    /* Gradients */
    --grad-gold: linear-gradient(135deg, #dfb141, #a3751a);
    --grad-red: linear-gradient(135deg, #d32f2f, #b21f1f);
    --grad-dark-glass: linear-gradient(180deg, rgba(20, 24, 38, 0.9) 0%, rgba(8, 11, 16, 0.95) 100%);
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Borders & Shadows */
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-glass: 0 10px 40px 0 rgba(0, 0, 0, 0.8);
    --shadow-gold: 0 0 20px var(--clr-primary-glow);
    
    /* Transitions */
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================================================
   RESET & DEFAULTS
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--clr-bg-base);
    color: var(--clr-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.text-gold { color: var(--clr-primary); }
.text-gradient-gold {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================================================
   NCSOFT STYLE NAVIGATION BAR
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 90px;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(6, 9, 14, 0.95) 0%, rgba(6, 9, 14, 0.6) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(212, 160, 55, 0.15); /* Gold tinted border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4%;
    transition: all var(--transition-smooth);
}

.navbar.scrolled {
    height: 75px;
    background: rgba(6, 9, 14, 0.98);
    box-shadow: 0 5px 30px rgba(0,0,0,0.8);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-brand img {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(212, 160, 55, 0.3));
    transition: transform var(--transition-fast);
}

.nav-brand:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: #b5bbcf;
    position: relative;
    padding: 10px 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--clr-primary);
    transition: width var(--transition-fast);
    box-shadow: var(--shadow-gold);
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

.nav-link:hover::before, .nav-link.active::before {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(212, 160, 55, 0.35);
    border-radius: 6px;
    background: rgba(8, 11, 16, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: #fff;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1098;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(340px, 88vw);
    height: 100vh;
    background: rgba(6, 9, 14, 0.98);
    border-left: 1px solid rgba(212, 160, 55, 0.35);
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform var(--transition-fast);
    z-index: 1099;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu__header img {
    width: 150px;
    height: auto;
}

.mobile-menu__close {
    color: #fff;
    font-size: 2rem;
    line-height: 1;
}

.mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu__link {
    display: block;
    padding: 12px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d3d8ea;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.mobile-menu__link:hover {
    border-color: rgba(212, 160, 55, 0.45);
    color: #fff;
}

.mobile-menu__link.active {
    border-color: rgba(212, 160, 55, 0.55);
    background: rgba(212, 160, 55, 0.12);
    color: #fff;
}

.mobile-menu__actions {
    margin-top: auto;
    display: grid;
    gap: 10px;
}

body.menu-open {
    overflow: hidden;
}

.language-selector {
    position: relative;
}

.language-selector__btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(212, 160, 55, 0.35);
    border-radius: 4px;
    background: rgba(8, 11, 16, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.language-selector__btn:hover {
    border-color: var(--clr-primary);
    box-shadow: var(--shadow-gold);
}

.language-selector__btn img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.language-selector__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 175px;
    padding: 8px;
    background: rgba(6, 9, 14, 0.98);
    border: 1px solid rgba(212, 160, 55, 0.35);
    border-radius: 6px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.65);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition-fast);
    z-index: 1100;
}

.language-selector:hover .language-selector__menu,
.language-selector:focus-within .language-selector__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-form + .language-form {
    margin-top: 6px;
}

.language-selector__item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    color: var(--clr-text);
    background: rgba(20, 24, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.language-selector__item:hover {
    border-color: rgba(212, 160, 55, 0.5);
    background: rgba(212, 160, 55, 0.12);
}

.language-selector__item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* =========================================================================
   BUTTONS (AAA Style)
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    z-index: 1;
}

.btn-primary {
    background: var(--grad-gold);
    color: #2a1f06;
    border: 1px solid #ffd872;
    box-shadow: 0 8px 25px rgba(212, 160, 55, 0.25);
    text-shadow: 0 1px 1px rgba(255,255,255,0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(212, 160, 55, 0.4);
    color: #1a1202;
}

.btn-primary:hover::after {
    left: 150%;
}

.btn-outline {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary);
}

.btn-outline:hover {
    background: rgba(212, 160, 55, 0.15);
    color: #fff;
    border-color: #fff;
    box-shadow: var(--shadow-gold);
}

/* =========================================================================
   NCSOFT STYLE FOOTER
   ========================================================================= */
.site-footer {
    background: #020306;
    border-top: 2px solid #1a1e2b;
    padding: 80px 5% 40px;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr 2fr;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto 42px;
}

.footer-brand img {
    height: 45px;
    margin-bottom: 20px;
    filter: grayscale(100%) brightness(150%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-brand img:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
}

.footer-brand p {
    color: var(--clr-text-muted);
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.1rem;
    position: relative;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #8b92b3;
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.footer-col a:hover {
    color: var(--clr-primary);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #141824;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b92b3;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--clr-primary);
    color: #000;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #141824;
    color: #555c7a;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* =========================================================================
   UTILITIES
   ========================================================================= */
.glass-panel {
    background: var(--clr-bg-panel);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

.section-padding { padding: 100px 5%; }

.page-header-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 500px;
    background-size: cover;
    background-position: center top;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    opacity: 0.6;
}

.global-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.global-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, transparent 0%, rgba(6,9,14, 0.7) 70%, #06090e 100%);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 1200px) {
    .nav-links {
        gap: 18px;
    }

    .btn {
        padding: 12px 20px;
    }
}

@media (max-width: 1024px) {
    .navbar {
        height: 78px;
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-actions .btn {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .section-padding {
        padding: 84px 5%;
    }
}

@media (max-width: 768px) {
    .nav-brand img {
        height: 40px;
    }

    .language-selector__btn {
        width: 40px;
        height: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 26px;
    }

    .footer-brand,
    .footer-col {
        text-align: center;
    }

    .footer-brand img {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-col ul {
        display: grid;
        gap: 6px;
    }

    .footer-bottom {
        line-height: 1.5;
        padding-top: 20px;
        font-size: 0.78rem;
    }

    .section-padding {
        padding: 72px 5%;
    }
}

@media (max-width: 540px) {
    .site-footer {
        padding: 56px 5% 28px;
    }

    .footer-col h4 {
        margin-bottom: 14px;
    }

    .footer-col ul li {
        margin-bottom: 4px;
    }

    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .page-header-bg {
        height: 340px;
    }
}