/* Global Styles */
:root {
    --bg-0: #070511;
    --bg-1: #10081f;
    --bg-2: #1b0d31;
    --surface: rgba(20, 12, 36, 0.62);
    --surface-strong: rgba(31, 18, 54, 0.78);
    --surface-soft: rgba(255, 255, 255, 0.035);
    --line: rgba(196, 160, 255, 0.12);
    --line-strong: rgba(206, 174, 255, 0.22);
    --text: #fbf9ff;
    --muted: #b9adc9;
    --subtle: #857895;
    --accent: #a855f7;
    --accent-2: #ec4899;
    --accent-3: #7c3aed;
    --shadow-purple: 0 24px 80px rgba(92, 41, 173, 0.22);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background:
        radial-gradient(1200px 700px at 50% -20%, rgba(124, 58, 237, 0.28), transparent 64%),
        radial-gradient(900px 650px at 0% 30%, rgba(236, 72, 153, 0.12), transparent 58%),
        linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 4rem;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 24%),
        radial-gradient(1000px 500px at 85% 10%, rgba(168, 85, 247, 0.16), transparent 70%);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    z-index: 9;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
    background: rgba(8, 5, 18, 0.72);
    backdrop-filter: blur(22px);
}

/* Navigation */
.brand-mark {
    display: inline-block;
    position: relative;
    z-index: 10;
    font-family: 'Baumans';
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    padding-bottom: 0.08em;
    text-decoration: none;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.34));
    animation: fadeInUp 1s ease-out 0.6s both;
}

.brand-mark::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--text);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: var(--text);
    transition: width 0.45s ease;
    pointer-events: none;
}

.brand-mark:hover::after,
.brand-mark:focus-visible::after {
    width: 100%;
}

.brand-mark:hover,
.brand-mark:focus-visible {
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 10;
    padding: 0.5rem;
    border-radius: 12px;
    transition: background 0.3s ease, border 0.3s ease;
}

.nav-menu.scrolled {
    background: transparent;
    border: none;
    padding: 0.5rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    line-height: 1;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 0.42rem 0.85rem;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.nav-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(196, 160, 255, 0.18);
    backdrop-filter: blur(10px);
}

.nav-link.current {
    color: var(--text);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(236, 72, 153, 0.18));
    border-color: rgba(206, 174, 255, 0.26);
}

.nav-account {
    position: relative;
    margin-left: 0.18rem;
}

.nav-account .nav-link {
    display: inline-flex;
    color: var(--text);
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(206, 174, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 34px rgba(7, 5, 17, 0.22);
}

.nav-account .nav-link:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(236, 72, 153, 0.14));
    border-color: rgba(216, 197, 255, 0.34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 44px rgba(124, 58, 237, 0.18);
}

.account-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 150px;
    padding: 0.45rem;
    background: rgba(13, 7, 27, 0.94);
    border: 1px solid var(--line);
    border-radius: 10px;
    backdrop-filter: blur(18px);
    z-index: 20;
    box-shadow: 0 22px 70px rgba(7, 5, 17, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-account:hover .account-menu,
.nav-account:focus-within .account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.8rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 7px;
    transition: background 0.2s ease, color 0.2s ease;
}

.account-menu-link:hover {
    color: var(--text);
    background: rgba(168, 85, 247, 0.13);
}

/* Back Home Link */
.back-home {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    z-index: 10;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.back-home:hover {
    color: var(--text);
    background: rgba(168, 85, 247, 0.12);
    border-color: var(--line-strong);
    backdrop-filter: blur(10px);
}

.back-home.scrolled {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
}

/* Mobile Menu */
.hamburger-menu {
    display: none;
    position: relative;
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 24px;
    height: auto;
    padding: 0.25rem 0;
    border-radius: 8px;
    transition: background 0.3s ease, border 0.3s ease;
}

.hamburger-menu.scrolled {
    background: transparent;
    border: none;
    padding: 0.25rem 0;
}

.hamburger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--muted);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 5, 18, 0.94);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0;
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: relative;
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 2rem);
}

.mobile-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--text);
    background: rgba(168, 85, 247, 0.12);
    border-color: var(--line-strong);
    backdrop-filter: blur(10px);
}

.mobile-nav-link.current {
    color: var(--text);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.24), rgba(236, 72, 153, 0.16));
    border-color: rgba(206, 174, 255, 0.24);
}

.mobile-account {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.mobile-nav-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 500;
    padding: 1rem 2rem 0.25rem;
}

.mobile-sub-link {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    min-width: 180px;
}

/* Background Grid */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.22;
    z-index: 1;
    background-image: 
        linear-gradient(rgba(210, 180, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(210, 180, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
    animation: gridMove 8s linear infinite;
}

/* Logo */
.logo {
    display: inline-block;
    font-family: 'Baumans';
    font-weight: 700;
    letter-spacing: 0;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 5, 17, 0.82);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup {
    background: var(--surface-strong);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-purple);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.show .popup {
    transform: scale(1);
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 200;
    color: var(--text);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-message {
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.popup-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(196, 160, 255, 0.22);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.popup-button:hover {
    background: rgba(168, 85, 247, 0.24);
    border-color: rgba(206, 174, 255, 0.36);
    transform: translateY(-1px);
}

/* Footer */
.footer {
    margin-top: 6rem;
    padding: 3rem 2rem 2rem 2rem;
    border-top: 1px solid rgba(196, 160, 255, 0.08);
    background: rgba(8, 5, 18, 0.72);
    backdrop-filter: blur(22px);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1340px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--text);
}

.footer-logo {
    font-family: 'Baumans';
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--subtle);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.footer-note,
.footer-copy {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: rgba(7, 5, 17, 0.46);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
}

.newsletter-input:focus {
    outline: none;
    border-color: rgba(168, 85, 247, 0.55);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.newsletter-button {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 48%, #7c3aed 100%);
    background-size: 190% 190%;
    border: 1px solid rgba(206, 174, 255, 0.28);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 18px 52px rgba(168, 85, 247, 0.22);
    transition: transform 0.2s ease, background-position 0.35s ease, box-shadow 0.25s ease;
}

.newsletter-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 8%, rgba(255, 255, 255, 0.2) 46%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
}

.newsletter-button:hover {
    transform: translateY(-3px);
    background-position: 100% 50%;
    box-shadow: 0 22px 70px rgba(168, 85, 247, 0.34), 0 0 34px rgba(236, 72, 153, 0.2);
}

.newsletter-button:hover::before {
    transform: translateX(120%);
}

.footer-bottom {
    margin-top: 2rem;
    text-align: center;
    color: var(--subtle);
    font-size: 0.8rem;
}

.footer-bottom a {
    color: var(--subtle);
    text-decoration: none;
    font-weight: 400;
}

.footer-bottom a:hover {
    color: var(--muted);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 3.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .back-home {
        top: 1rem;
    }

    .brand-mark {
        font-size: 1.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}
