/* ============================================
   Nexus NFT - Modern UI, mobile-first
   ============================================ */

:root {
    /* Colors - dark theme with cyan accent */
    --bg: #0a0b0f;
    --bg-elevated: #12141c;
    --bg-card: #161922;
    --border: rgba(255, 255, 255, 0.06);
    --text: #e8e9ed;
    --text-muted: #8b8d9a;
    --accent: #00d4aa;
    --accent-dim: rgba(0, 212, 170, 0.15);
    --accent-hover: #00f0c0;
    --danger: #ff6b6b;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --transition: 0.2s ease;
    --font: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --header-h: 72px;
    --container: min(1200px, 100% - 2rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition), opacity var(--transition);
}

a:hover {
    color: var(--accent);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1rem;
}

/* ========== Header ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 11, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.logo-icon {
    color: var(--accent);
    font-size: 1.5rem;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list a:not(.btn) {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-list a:not(.btn):hover {
    color: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    color: var(--text);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-list {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-elevated);
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        border-left: 1px solid var(--border);
    }

    .nav-list.is-open {
        transform: translateX(0);
    }
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-ghost {
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ========== Hero ========== */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-dim), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(0, 212, 170, 0.08), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: var(--accent-dim);
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-title em {
    font-style: normal;
    color: var(--accent);
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ========== Sections ========== */
.section {
    padding: 4rem 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-head h2 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.link-arrow {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
}

.link-arrow::after {
    content: ' →';
}

/* ========== NFT Cards ========== */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.nft-grid-full {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.nft-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.nft-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow), 0 0 0 1px rgba(0, 212, 170, 0.1);
}

.nft-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.nft-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.nft-card:hover .nft-card-image img {
    transform: scale(1.05);
}

.nft-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 100px;
    color: var(--text);
}

.nft-card-body {
    padding: 1.25rem;
}

.nft-card-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.nft-artist {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.nft-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nft-price {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent);
    font-size: 1rem;
}

.nft-likes {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== CTA ========== */
.cta-box {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
}

.cta-box h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ========== Footer ========== */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-brand .logo {
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========== Page heads ========== */
.page-head {
    padding: 3rem 0 2rem;
    text-align: center;
}

.page-head h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-head p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ========== Gallery filter ========== */
.filter-bar {
    margin-bottom: 2rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-tab {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.filter-tab:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.filter-tab.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

/* ========== NFT Detail ========== */
.page-nft-detail {
    padding: 2rem 0 4rem;
}

.back-link {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.back-link:hover {
    color: var(--accent);
}

.nft-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .nft-detail-grid {
        grid-template-columns: 1fr;
    }
}

.nft-detail-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 1;
}

.nft-detail-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nft-detail-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 100px;
    color: var(--text);
}

.nft-detail-info h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.nft-detail-artist {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.nft-detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.meta-value {
    font-size: 1.25rem;
    font-weight: 600;
}

.meta-value.price {
    font-family: var(--font-mono);
    color: var(--accent);
}

.nft-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.nft-detail-desc h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.nft-detail-desc p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ========== Utility: hide filtered ========== */
.nft-card.filtered-out {
    display: none;
}
