/* Import Font (using Google Fonts Noto Sans KR for Korean support) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;700&family=Inter:wght@300;400;600&display=swap');

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--color-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Texture Overlay */
.texture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--color-text-muted) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

/* ============================
   Navbar
   ============================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: transparent;
    backdrop-filter: blur(0px);
    z-index: 1000;
    transition: all var(--transition-medium);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled,
.navbar.solid {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 70px;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    color: var(--color-primary);
}

.logo-accent {
    color: var(--color-accent);
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-main);
    position: relative;
    opacity: 0.8;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================
   Hero Section
   ============================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero-small {
    height: 60vh;
    min-height: 400px;
}

/* --- CSS Box Art for Product Catalog --- */
.box-art-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 800px;
    overflow: hidden;
}

.css-box {
    position: relative;
    width: 60px;
    height: 60px;
    background: #d4a373;
    /* Cardboard color */
    transform: rotateX(-20deg) rotateY(35deg);
    transform-style: preserve-3d;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* --- Custom Cursor 3D Effect --- */
#cursor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    /* Doubled size */
    height: 80px;
    /* Doubled size */
    pointer-events: none;
    z-index: 20000;
    /* Extremely high z-index */
    display: block;
    /* Force show */
    opacity: 0;
    /* Hidden initially until JS moves it, prevents top-left flicker */
    transition: opacity 0.3s ease;
}

/* Click Animation Class */
.cursor-clicking .cube {
    animation: click-blink 0.2s ease-in-out infinite alternate !important;
}

@keyframes click-blink {
    0% {
        transform: scale(0.8) rotateX(0deg) rotateY(0deg);
        opacity: 1;
    }

    100% {
        transform: scale(1.1) rotateX(10deg) rotateY(10deg);
        opacity: 0.5;
        filter: hue-rotate(90deg);
    }
}

/* Only hide on very small touch screens if needed, but keeping it simple for now */
@media (max-width: 768px) {
    #cursor-container {
        display: none;
    }
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spin-cube 3s infinite linear;
    transition: transform 0.1s;
}

.cube-face {
    position: absolute;
    width: 80px;
    /* Doubled size */
    height: 80px;
    /* Doubled size */
    background: rgba(105, 240, 174, 0.15);
    /* Slightly more transparent for larger size */
    border: 2px solid rgba(0, 188, 212, 0.5);
    /* Thicker border */
    box-shadow: 0 0 20px rgba(105, 240, 174, 0.3);
    /* Larger glow */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cube Faces Placement - TranslateZ must be half of width (40px) */
.cube-face:nth-child(1) {
    transform: rotateY(0deg) translateZ(40px);
}

.cube-face:nth-child(2) {
    transform: rotateY(90deg) translateZ(40px);
}

.cube-face:nth-child(3) {
    transform: rotateY(180deg) translateZ(40px);
}

.cube-face:nth-child(4) {
    transform: rotateY(-90deg) translateZ(40px);
}

.cube-face:nth-child(5) {
    transform: rotateX(90deg) translateZ(40px);
}

.cube-face:nth-child(6) {
    transform: rotateX(-90deg) translateZ(40px);
}

@keyframes spin-cube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.css-box::before {
    /* Top Face */
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    height: 30px;
    background: #e6b88a;
    transform-origin: bottom;
    transform: rotateX(90deg);
}

.css-box::after {
    /* Side Face */
    content: '';
    position: absolute;
    top: 0;
    right: -30px;
    width: 30px;
    height: 100%;
    background: #bc8a5f;
    transform-origin: left;
    transform: rotateY(90deg);
}

/* Variant: Tray (Open Top, Low) */
.css-box.tray {
    height: 30px;
    margin-top: 15px;
}

.css-box.tray::before {
    background: #cba37e;
    /* Darker inside */
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1);
    transform: rotateX(90deg) translateZ(-30px);
    /* Push down to be inside bottom */
    top: 0;
}

/* Variant: Fruit (Vibrant) */
.css-box.fruit {
    background: #ffb7b2;
}

.css-box.fruit::before {
    background: #ffdac1;
}

.css-box.fruit::after {
    background: #ff9aa2;
}

/* Variant: Pre-Print (Graphic) */
.css-box.preprint {
    background: linear-gradient(45deg, #a8edea, #fed6e3);
}

.css-box.preprint::before {
    background: #e0f7fa;
}

.css-box.preprint::after {
    background: #80deea;
}

/* Variant: Handle Box */
.css-box.handle::before {
    clip-path: polygon(0% 0%, 30% 0%, 30% 40%, 70% 40%, 70% 0%, 100% 0%, 100% 100%, 0% 100%);
    background: #e6b88a;
}

.handle-strap {
    position: absolute;
    top: -45px;
    left: 20px;
    width: 20px;
    height: 30px;
    border: 3px solid #d4a373;
    border-radius: 5px 5px 0 0;
    transform: rotateY(0deg) translateZ(15px);
    /* Center in 3D space roughly */
}

/* Variant: A-1 (Standard) - Closed */
.css-box.a1 {
    background: #d4a373;
}

.css-box.a1::before {
    background: #e6b88a;
    /* Taping effect */
    background-image: linear-gradient(to right, transparent 45%, rgba(255, 255, 255, 0.4) 45%, rgba(255, 255, 255, 0.4) 55%, transparent 55%);
}

/* Variant: One-Touch (Arrow/Fast) */
.css-box.onetouch::before {
    content: '⚡';
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #f59e0b;
}

/* Variant: Honeycomb (Hexagon) */
.css-honeycomb {
    width: 60px;
    height: 60px;
    background: #fcd34d;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transform: rotateX(20deg);
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.css-honeycomb::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: #fff;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Variant: Sleeve (Slide out) */
.css-box.sleeve {
    background: #475569;
}

.css-box.sleeve::after {
    background: #334155;
}

.css-box.sleeve .inner-slide {
    position: absolute;
    top: 2px;
    left: 10px;
    width: 58px;
    height: 56px;
    background: #d4a373;
    transform: translateZ(5px);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Variant: Large */
.css-box.large {
    width: 80px;
    height: 80px;
    transform: rotateX(-20deg) rotateY(35deg) translateY(-10px);
}

.css-box.large::before {
    top: -40px;
    height: 40px;
}

.css-box.large::after {
    right: -40px;
    width: 40px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    z-index: -2;
}

/* Abstract Orbs */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
}

.hero::before {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: rgba(46, 125, 50, 0.1);
}

.hero::after {
    bottom: -10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(0, 229, 255, 0.08);
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--color-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 24px;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-title .highlight {
    background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ============================
   Sections
   ============================ */
section {
    padding: 100px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    height: 240px;
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.card-content {
    padding: 32px;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--color-text-main);
}

.card-desc {
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background-color: #111;
    color: #fff;
    padding: 80px 0 30px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.copyright {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}