/* ============================================
   HARPER RP - Main Stylesheet
   Black / White / Gray Theme
   ============================================ */

:root {
    --black: #000000;
    --bg: #050505;
    --bg-card: #0a0a0a;
    --bg-elevated: #111111;
    --white: #ffffff;
    --gray-100: #e5e5e5;
    --gray-200: #cccccc;
    --gray-300: #aaaaaa;
    --gray-400: #888888;
    --gray-500: #666666;
    --gray-600: #444444;
    --gray-700: #2a2a2a;
    --gray-800: #1a1a1a;
    --gray-900: #0d0d0d;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glow: rgba(255, 255, 255, 0.05);
    --glow-strong: rgba(255, 255, 255, 0.1);
    --font-heading: 'Chakra Petch', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-600) var(--black);
}

html::-webkit-scrollbar { width: 5px; }
html::-webkit-scrollbar-track { background: var(--black); }
html::-webkit-scrollbar-thumb { background: var(--gray-600); border-radius: 3px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--gray-300);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

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

/* ============================================
   SECTION HEADERS - Consistent sizing
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 3.5rem;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.15em;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.03em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-hover), transparent);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.1rem 0;
    transition: all 0.4s var(--ease-out);
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1001;
}

.logo-mark {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
    clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
    transition: all 0.3s ease;
}

.logo-mark.small {
    width: 28px;
    height: 28px;
    font-size: 1rem;
    border-width: 1.5px;
}

.nav-logo:hover .logo-mark {
    background: var(--white);
    color: var(--black);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.12em;
}

.logo-rp {
    color: var(--gray-400);
    font-weight: 500;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-signin {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-400);
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.btn-signin:hover { color: var(--white); }

.btn-join {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--black);
    background: var(--white);
    padding: 0.55rem 1.5rem;
    clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.btn-join:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
    transition: all 0.3s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Subtle grid pattern */
.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-radial {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
}

.hero-noise {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem 0.4rem 0.6rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--gray-400);
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease-out) 0.1s forwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-row {
    display: block;
    overflow: hidden;
}

.title-word {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: clamp(4rem, 11vw, 9rem);
    font-weight: 700;
    line-height: 0.95;
    color: var(--white);
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out) forwards;
}

.title-word[data-delay="0"] { animation-delay: 0.2s; }
.title-word[data-delay="1"] { animation-delay: 0.35s; }

.title-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--gray-600);
    text-stroke: 2px var(--gray-600);
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--gray-400);
    max-width: 480px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease-out) 0.5s forwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease-out) 0.6s forwards;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--black);
    background: var(--white);
    padding: 0.8rem 2rem;
    clip-path: polygon(6% 0%, 100% 0%, 94% 100%, 0% 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(3px);
}

.btn-secondary {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-400);
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    color: var(--white);
    border-color: var(--border-hover);
}

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease-out) 0.75s forwards;
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--gray-700);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    right: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.scroll-hint span {
    font-size: 0.65rem;
    color: var(--gray-600);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--gray-700);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--white);
    animation: scrollMove 2s ease-in-out infinite;
}

@keyframes scrollMove {
    0% { top: -12px; opacity: 0; }
    30% { opacity: 1; }
    100% { top: 40px; opacity: 0; }
}

/* ============================================
   ABOUT / FEATURES - Redesigned
   ============================================ */
.about {
    position: relative;
    padding: 7rem 0;
    z-index: 2;
}

.about-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-intro {
    max-width: 600px;
}

.about-lead {
    font-size: 1.2rem;
    color: var(--gray-300);
    line-height: 1.8;
    font-weight: 300;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.8rem 2rem;
    position: relative;
    border: 1px solid transparent;
    border-bottom: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
    opacity: 0;
    transform: translateY(15px);
}

.feature-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-item:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.feature-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.feature-item:hover {
    background: var(--bg-card);
}

.feature-item:hover .feature-icon {
    color: var(--white);
    border-color: var(--gray-500);
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 1px solid var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--gray-500);
    transition: all 0.4s ease;
}

.feature-content h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.feature-content p {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.6;
}

.feature-line {
    display: none;
}

/* ============================================
   TEAM
   ============================================ */
.team {
    position: relative;
    padding: 5rem 0 7rem;
    z-index: 2;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.team-member {
    text-align: center;
    transition: transform 0.4s var(--ease-out);
}

.team-member:hover {
    transform: translateY(-8px);
}

.member-img-wrap {
    position: relative;
    width: 180px;
    height: 200px;
    margin: 0 auto 1.2rem;
}

.member-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--gray-800), var(--bg-card));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--gray-700);
    transition: all 0.4s ease;
    overflow: hidden;
}

.member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member:hover .member-img {
    color: var(--gray-500);
}

.member-frame {
    position: absolute;
    inset: -3px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1.5px solid var(--gray-700);
    pointer-events: none;
    transition: border-color 0.4s ease;
    background: transparent;
}

.member-img-wrap::after {
    content: '';
    position: absolute;
    inset: -2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(180deg, var(--gray-600), var(--gray-800));
    z-index: -1;
    transition: all 0.4s ease;
}

.team-member:hover .member-img-wrap::after {
    background: linear-gradient(180deg, var(--gray-400), var(--gray-700));
}

.member-role-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--gray-700);
    color: var(--gray-400);
    margin-top: 0.3rem;
}

.member-role-tag.owner {
    border-color: var(--gray-500);
    color: var(--white);
}

.member-info h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.06em;
    margin-bottom: 0.15rem;
}

.member-info span {
    font-size: 0.78rem;
    color: var(--gray-500);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    padding: 5rem 0 2rem;
    z-index: 2;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.01));
}

.footer-content {
    margin-bottom: 4rem;
}

.footer-text {
    font-size: 0.95rem;
    color: var(--gray-500);
    max-width: 500px;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.social-row {
    display: flex;
    gap: 0.8rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.85rem;
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--border-hover);
    color: var(--white);
    background: var(--bg-elevated);
    transform: translateY(-2px);
}

.social-btn i { font-size: 1.1rem; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-400);
    letter-spacing: 0.08em;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: var(--gray-600);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-right { display: none; }
    .nav-toggle { display: flex; }

    .nav-right.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        z-index: 999;
    }

    .nav-right.open .btn-signin,
    .nav-right.open .btn-join {
        font-size: 1.2rem;
        padding: 0.8rem 2rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .feature-item:nth-child(odd) {
        border-right: none;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .hero { padding: 7rem 1.5rem 3rem; }
    .hero-stats { gap: 1.2rem; }
    .stat-num { font-size: 1.2rem; }
    .scroll-hint { display: none; }

    .section-header {
        flex-wrap: wrap;
    }

    .section-line {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 1.2rem; }
    .title-word { font-size: clamp(3rem, 14vw, 5rem); }
    .hero-stats { flex-wrap: wrap; }
    .team-grid { grid-template-columns: 1fr; }
    .social-row { flex-direction: column; }
    .member-img-wrap { width: 150px; height: 170px; }
}

/* ============================================
   NAV - Dynamic States & Logo
   ============================================ */
.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.nav-user {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.04em;
}

.nav-status {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 1rem;
    letter-spacing: 0.04em;
}

.nav-status.pending {
    color: var(--gray-400);
    border: 1px solid var(--gray-700);
}

.btn-play-now {
    background: var(--white) !important;
    animation: pulse-play 2s ease-in-out infinite;
}

@keyframes pulse-play {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 20px rgba(255,255,255,0.1); }
}

.btn-logout {
    background: none;
    border: 1px solid var(--border);
    color: var(--gray-500);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    color: var(--white);
    border-color: var(--border-hover);
}
