:root {
    --bg: #faf8f4;
    --card-bg: #ffffff;
    --text: #2c2822;
    --text-light: #7a7265;
    --border: #e5ded2;
    --accent: #c9a84c;
    --accent-hover: #b8963a;
    --nav-bg: rgba(250, 248, 245, 0.94);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.1);
    --radius: 14px;
    --transition: 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1815;
        --card-bg: #24211c;
        --text: #e8e0d4;
        --text-light: #a09888;
        --border: #3d362c;
        --accent: #d4b04a;
        --accent-hover: #e8c860;
        --nav-bg: rgba(26, 24, 21, 0.94);
        --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.5);
    }
}

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

body {
    background: var(--bg);
    font-family: 'Inter', 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ========== NAVIGATION ========== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    transition: box-shadow 0.3s;
}
.site-nav.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    gap: 1rem;
}
.nav-logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.3px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: opacity 0.2s;
}
.nav-logo:hover {
    opacity: 0.75;
}
.nav-logo .logo-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.1px;
}
.nav-links a:hover,
.nav-links a.active {
    background: rgba(180, 150, 100, 0.12);
    color: var(--accent);
}
/* Dropdown */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.1px;
    user-select: none;
    color: var(--text);
    background: none;
    border: none;
    font-family: inherit;
}
.nav-dropdown-toggle:hover {
    background: rgba(180, 150, 100, 0.12);
    color: var(--accent);
}
.nav-dropdown-toggle .arrow {
    font-size: 0.6rem;
    transition: transform 0.25s;
}
.nav-dropdown.open .nav-dropdown-toggle .arrow {
    transform: rotate(180deg);
}
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    min-width: 220px;
    max-height: 420px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
    z-index: 1001;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 0;
    white-space: nowrap;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
}
.nav-dropdown-menu a:hover {
    background: rgba(180, 150, 100, 0.1);
    color: var(--accent);
}
/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
    z-index: 1002;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
/* Mobile nav */
.mobile-menu {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    padding: 1rem;
    overflow-y: auto;
    flex-direction: column;
    gap: 0.25rem;
}
.mobile-menu.active {
    display: flex;
}
.mobile-menu a {
    display: block;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s;
}
.mobile-menu a:hover,
.mobile-menu a.active {
    background: rgba(180, 150, 100, 0.12);
    color: var(--accent);
}
.mobile-menu .mobile-divider {
    height: 1px;
    background: var(--border);
    margin: 0.4rem 0;
}
.mobile-menu .mobile-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    padding: 0.5rem 1rem 0.2rem;
}

/* ========== HERO ========== */
.hero {
    text-align: center;
    padding: 3.5rem 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.35rem 1.4rem;
    border-radius: 30px;
    margin-bottom: 1rem;
    background: rgba(200, 170, 80, 0.06);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
    margin-bottom: 0.6rem;
    line-height: 1.2;
}
.hero p {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========== GRID ========== */
.palette-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}
.palette-index-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    position: relative;
}
.palette-index-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.palette-index-card .mini-strip {
    display: flex;
    height: 60px;
    flex-shrink: 0;
}
.palette-index-card .mini-strip span {
    flex: 1;
    transition: filter 0.2s;
}
.palette-index-card:hover .mini-strip span {
    filter: brightness(0.9);
}
.palette-index-card .card-body {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.palette-index-card .card-num {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}
.palette-index-card .card-title {
    font-weight: 650;
    font-size: 1.05rem;
    letter-spacing: 0.1px;
    color: var(--text);
}
.palette-index-card .card-sub {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ========== FOOTER ========== */
.site-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-light);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
    max-width: 1400px;
    margin: 0 auto;
    letter-spacing: 0.3px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .hero {
        padding: 2.5rem 1rem 1.5rem;
    }
    .palette-index-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
        padding: 0 1rem;
    }
}
@media (min-width: 769px) {
    .mobile-menu {
        display: none !important;
    }
}