@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
    /* Nintendo Red Style */
    --brand-red: #e60012;
    --bg-color: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-blue: #0071e3;
    --accent-yellow: #ffcc00;
    --card-bg: #ffffff;
    --border-color: #e5e5e5;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Slightly crisper shadow */
    --shadow-hover: 0 12px 24px rgba(230, 0, 18, 0.15);
    /* Red tinted hover shadow */
    --font-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-pill: 100px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-primary);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    /* Bolder headings like Nintendo */
    letter-spacing: -0.02em;
}

.display-1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.05;
}

.display-3 {
    font-size: 3.5rem;
    font-weight: 800;
}

.text-gradient {
    color: var(--brand-red);
    /* Solid red for impact instead of gradient */
    /* background: linear-gradient(120deg, var(--brand-red), #ff4d4d); */
    /* -webkit-background-clip: text; */
    /* background-clip: text; */
    /* -webkit-text-fill-color: transparent; */
}

/* Navbar */
.navbar {
    transition: background 0.3s ease, box-shadow 0.3s ease;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.8rem 0;
}

.navbar-brand {
    transition: color 0.3s ease;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo-img {
    height: 32px;
    /* Adjust based on actual logo aspect ratio */
    width: auto;
}

.nav-link {
    color: #4a4a4a !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0.8rem;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-red) !important;
}

.navbar.scrolled .nav-link {
    color: #ffffff !important;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--brand-red) !important;
}

/* Buttons - Key Red Color */
.btn-premium {
    background: var(--brand-red);
    color: white;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    /* Slightly more squared off like Nintendo buttons */
    border: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-premium:hover {
    transform: translateY(-2px);
    background: #c2000f;
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.3);
    color: white;
}

.btn-secondary-custom {
    background: #f0f0f0;
    color: var(--text-primary);
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    transition: all 0.2s;
}

.btn-secondary-custom:hover {
    background: #e0e0e0;
    color: var(--text-primary);
}

/* Hero Section */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 70% 30%, #fff0f0 0%, #ffffff 60%);
    /* Subtle red tint bg */
}

.hero-img {
    width: 100%;
    max-width: 700px;
    /* transform: rotate(-5deg); Remove rotation for cleaner look or keep minimal */
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
    transition: transform 0.5s ease;
}

.hero-img:hover {
    transform: scale(1.02);
}

/* Bento Grid / Cards */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.bento-item {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    position: relative;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(230, 0, 18, 0.2);
}

.bento-full {
    grid-column: span 12;
}

.bento-half {
    grid-column: span 6;
}

.bento-third {
    grid-column: span 4;
}

@media (max-width: 991px) {

    .bento-half,
    .bento-third {
        grid-column: span 12;
    }
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--brand-red);
    /* Uniform red icons */
    color: white;
}

.bg-red-soft {
    background: var(--brand-red);
    color: white;
}

.bg-blue-soft {
    background: var(--brand-red);
    color: white;
}

/* Unifying to brand color or keep varied */
.bg-yellow-soft {
    background: var(--brand-red);
    color: white;
}

/* Product Page */
.product-card {
    border: none;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-soft);
}

.product-thumb {
    background: #f9f9f9;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
}

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-pill {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    background: #f5f5f7;
    color: var(--text-secondary);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.category-pill.active,
.category-pill:hover {
    background: white;
    color: var(--brand-red);
    border-color: var(--brand-red);
}

/* Lightbox */
/* Lightbox - Flexbox Centering Fix */
.lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1050;
    display: none;
    /* JS toggles this locally, but we override behavior in .show */
    opacity: 0;
    transition: opacity 0.3s;

    /* SCROLL FIX: Allow the backdrop itself to scroll */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    padding: 20px 0;
    /* Vertical buffer */
}

.lightbox-backdrop.show {
    opacity: 1;
    display: flex !important;
    /* Force flex */
    /* REMOVED align-items/justify-content to let margin:auto handle overflow correctly */
}

.lightbox-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    position: relative;
    /* Changed from absolute */
    top: auto;
    left: auto;
    transform: none;
    /* Remove translation */
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
    border-top: 5px solid var(--brand-red);

    /* SCROLL FIX: Remove inner limits, use margin: auto for smart centering */
    max-height: none;
    overflow-y: visible;
    margin: auto;
    /* Centers in Flex parent, safe for overflow */
    display: block;
    /* Reset flex column if not needed inside */
}

.btn-close-custom {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #f5f5f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-custom:hover {
    background: #e5e5e5;
}

/* Timeline UI */
.timeline-track {
    position: relative;
    padding: 40px 0;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-node {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 5px solid var(--brand-red);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 1);
    /* White ring separation */
}

.timeline-row {
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 60px;
}

.timeline-content {
    width: 40%;
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    position: relative;
    border: 1px solid #f0f0f0;
}

.timeline-row:nth-child(odd) .timeline-content {
    margin-left: auto;
    text-align: left;
}

.timeline-row:nth-child(even) .timeline-content {
    margin-right: auto;
    text-align: right;
}

@media (max-width: 768px) {
    .timeline-track::before {
        left: 20px;
    }

    .timeline-node {
        left: 20px;
    }

    .timeline-row {
        justify-content: flex-start;
        padding-left: 60px;
    }

    .timeline-content {
        width: 100%;
        text-align: left !important;
    }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    border-top: 5px solid var(--brand-red);
    /* Nintendo footer style */
    background: #f9f9f9;
}

/* Navbar Toggler */
.navbar-toggler {
    border: none !important;
    padding: 0.5rem;
    transition: all 0.2s;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

/* Default (Top) - Nintendo Red Icon */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(230, 0, 18, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Scrolled (Dark) - White Icon */
.navbar.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Video Hero Styles */
.hero-video-section {
    position: relative;
    height: 90vh;
    /* Adjust height as needed */
    min-height: 600px;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #050505;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, #ffffff 100%);
    /* White fade at bottom to match white content below? No, usually fades to bg color */
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(255, 255, 255, 1) 100%);
    /* Fade to white for white theme continuity */
    z-index: 1;
}

/* Dark Mode Nav Override for Hero Pages */
.hero-nav-override .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.hero-nav-override .nav-link:hover,
.hero-nav-override .nav-link.active {
    color: #ffffff !important;
}

/* Navbar brand needs to be white too if needed, but logo is image */

/* Hover Effects Utility */

/* Target Breaker Zoom Effect */
.group-hover-scale img {
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    transform: scale(1.0);
    backface-visibility: hidden;
    /* Smoother rendering */
}

.group-hover-scale:hover img {
    transform: scale(1.1);
}

/* Quick Access Lift Effect */
.transition-hover-up {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.group-hover-lift:hover .transition-hover-up {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.group-hover-lift i {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group-hover-lift:hover i {
    transform: scale(1.2);
}