/* ============================================
   CSS Variables - Vercel-Inspired Dark Theme
   ============================================ */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --border-color: #27272a;
    --border-hover: #3f3f46;
    --accent-purple: #9333ea;
    --accent-purple-hover: #a855f7;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Background Logo with Blur and Vignette */
.background-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
    animation: bounceLogo 3s ease-in-out infinite;
}

.background-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 0%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 0.95) 100%);
    pointer-events: none;
}

.background-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

@keyframes bounceLogo {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-20px);
    }
}

/* Ensure content is above background logo */
.navbar,
.hero,
.categories-preview,
.category-section,
.page-header,
.footer {
    position: relative;
    z-index: 1;
}

/* ============================================
   Navigation - Vercel Style
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    border-bottom-color: var(--border-hover);
}

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

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.logo-image {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 50%;
}

.nav-logo a:hover .logo-image {
    opacity: 0.8;
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.bar {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

/* ============================================
   Hero Section - Vercel Style
   ============================================ */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: var(--bg-primary);
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#changing-word {
    color: var(--accent-purple);
    font-weight: 700;
}

/* Respect accessibility: disable animation if prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    #changing-word {
        transition: none;
    }
}

/* ============================================
   Buttons - Vercel Style
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--text-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Category Preview Section
   ============================================ */
.categories-preview {
    padding: 8rem 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-secondary);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    background: var(--bg-tertiary);
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* ============================================
   Page Header (for category pages)
   ============================================ */
.page-header {
    padding: 10rem 2rem 4rem;
    text-align: center;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.page-header p {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   Category Sections
   ============================================ */
.category-section {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.category-section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ============================================
   Product Cards - Vercel Style
   ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card-image-placeholder {
    width: 100%;
    height: 240px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.card-button {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.875rem;
}

.card-button:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

/* ============================================
   Footer - Vercel Style
   ============================================ */
.footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9375rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media screen and (max-width: 768px) {
    /* Primary mobile adjustments (touch targets, spacing, readable type) */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.98);
        backdrop-filter: none; /* avoid heavy blurs on mid-low devices */
        -webkit-backdrop-filter: none;
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 200ms ease;
        box-shadow: none;
        padding: 5.5rem 0 2rem;
        gap: 0;
        justify-content: flex-start;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0.75rem 0;
    }

    /* Increase tap target for nav links */
    .nav-link {
        font-size: 1.0625rem;
        padding: 0.75rem 1rem; /* larger vertical padding for thumbs */
        display: inline-block;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.06);
    }

    .nav-link:focus {
        outline: 3px solid rgba(108,92,231,0.16);
        outline-offset: 3px;
    }

    /* Reduce hero vertical footprint so content appears sooner */
    .hero {
        min-height: 56vh;
        padding: 4.5rem 1.25rem 2rem;
    }

    .hero-content {
        max-width: 640px;
        padding: 0 0.25rem;
    }

    /* Make hero text comfortably readable on small screens */
    .hero-title {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
        line-height: 1.08;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 3.2vw, 1.125rem);
        margin-bottom: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    /* Buttons full-width and larger tap targets */
    .btn {
        width: 100%;
        max-width: 100%;
        padding: 0.9rem 1rem;
        font-size: 1rem; /* ensure ≥1rem */
        border-radius: 10px;
        touch-action: manipulation;
    }

    /* Category and card grids collapse to single column (already set), ensure spacing */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Make card actions easy to tap */
    .card-button {
        display: block;
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 1rem;
        text-align: center;
        margin-top: 0.75rem;
    }

    .category-card {
        padding: 1.25rem 1rem;
        min-height: auto;
        touch-action: manipulation;
    }

    .category-card h3 {
        font-size: 1.125rem;
    }

    .category-card p {
        font-size: 1rem; /* maintain readable text */
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .categories-preview {
        padding: 3rem 0;
    }

    .page-header {
        padding: 6.5rem 1rem 2rem;
    }

    /* Ensure mobile text minimum size and line-height for readability */
    body {
        font-size: 16px;
    }
}

/* Very small screens: reduce heavy visuals and disable expensive effects for performance */
@media screen and (max-width: 480px) {
    /* Disable animated background/logo for performance */
    .background-logo {
        display: none !important;
        animation: none !important;
        filter: none !important;
        opacity: 0 !important;
    }

    /* Remove backdrop-filter and heavy shadows */
    .navbar,
    .nav-menu {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: rgba(0,0,0,0.95) !important;
        box-shadow: none !important;
    }

    /* Disable entrance animations on very small devices */
    .hero-content,
    .product-card,
    .category-card,
    .reveal {
        animation: none !important;
        transition: none !important;
    }

    /* Reduce image placeholder height for smaller screens */
    .card-image-placeholder {
        height: 160px;
    }

    /* Ensure focus outlines remain visible without heavy glows */
    .nav-link:focus,
    .btn:focus,
    .card-button:focus {
        outline: 3px solid rgba(108,92,231,0.16);
        outline-offset: 2px;
    }

    /* Slightly increase spacing for comfortable tapping */
    .nav-item {
        margin: 0.9rem 0;
    }

    /* Ensure footer links are comfortably spaced */
    .footer-links li {
        margin-bottom: 1rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media screen and (min-width: 1025px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Smooth Scroll Offset for Fixed Nav
   ============================================ */
section {
    scroll-margin-top: 80px;
}

