/* DESIGN Pages Common Styles */
.design-section {
    padding: 160px 0;
    overflow: hidden;
    position: relative;
}

.design-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 102, 255, 0.015) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 102, 255, 0.01) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.design-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.design-hero {
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    background: #000;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Shake Animation Control */
@keyframes cockpitShake {
    0% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(0.5px, 0.5px) rotate(0.05deg); }
    50% { transform: translate(-0.5px, -0.5px) rotate(-0.05deg); }
    100% { transform: translate(0, 0) rotate(0); }
}

/* Only shake on Main Design Landing */
[data-mid="zzan_design"] .design-hero-content, 
[data-mid="zzan_design"] .cockpit-frame {
    animation: cockpitShake 0.15s infinite ease-in-out;
}

.racing-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background: #000;
}

#racingCanvas {
    width: 100%;
    height: 100%;
    filter: blur(0.5px);
}

/* Cinematic Overlays */
.tunnel-vignette {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 20%, rgba(0,0,0,0.95) 100%);
    pointer-events: none;
    z-index: 3;
}

.portal-flash {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    mix-blend-mode: overlay;
}

/* Cockpit Frame */
.cockpit-frame {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(10,10,15,1) 0%, rgba(10,10,15,0) 40%);
    z-index: 10;
    pointer-events: none;
}

.cockpit-frame::before {
    content: '';
    position: absolute;
    bottom: -10%; left: 50%;
    transform: translateX(-50%);
    width: 120%; height: 50%;
    background: radial-gradient(ellipse at bottom, rgba(0, 102, 255, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
}

/* Animated HUD Elements */
.hud-display {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    opacity: 0.5;
    z-index: 11;
}

.hud-item {
    font-family: var(--font-en);
    font-size: 10px;
    color: var(--point-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hud-item span {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-top: 5px;
}

/* Portal Warp Animation */
@keyframes portalWarp {
    0% { transform: scale(1); filter: brightness(1) blur(0); opacity: 0; }
    80% { transform: scale(1.5); filter: brightness(2) blur(10px); opacity: 1; }
    90% { transform: scale(2); filter: brightness(5) blur(20px); opacity: 1; }
    100% { transform: scale(3); filter: brightness(10) blur(40px); opacity: 0; }
}

.portal-effect {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; height: 100px;
    border: 2px solid var(--point-color);
    border-radius: 50%;
    box-shadow: 0 0 50px var(--point-color);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
}

/* Hero Content */
.design-hero-content {
    position: relative;
    z-index: 15;
}

.design-hero .category-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--point-color);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.design-hero h1 {
    font-size: clamp(56px, 10vw, 110px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 40px;
}

.design-hero h1 span {
    display: block;
    background: linear-gradient(90deg, #fff 0%, var(--point-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.design-hero p {
    font-size: 22px;
    opacity: 0.7;
    max-width: 650px;
    line-height: 1.5;
    font-weight: 400;
}

/* Brand Design Sub Hero */
.sub-hero-brand { 
    background: #000; 
    height: 100vh; 
    min-height: 700px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center;
    position: relative;
}
.sub-hero-brand::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 30%;
    background: linear-gradient(to top, #fff 0%, transparent 100%);
    z-index: 1;
}
.sub-hero-brand .design-container { position: relative; z-index: 2; width: 100%; }
.sub-hero-brand .category { color: var(--point-color); font-weight: 700; font-size: 14px; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 40px; display: block; }
.sub-hero-brand h1 { font-size: clamp(60px, 10vw, 120px); font-weight: 900; line-height: 0.95; letter-spacing: -0.05em; margin-bottom: 40px; color: #fff; }
.sub-hero-brand h1 span { background: linear-gradient(90deg, #fff 0%, var(--point-color) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sub-hero-brand p { max-width: 800px; margin: 0 auto; font-size: 22px; font-weight: 300; opacity: 0.7; line-height: 1.6; color: #fff; word-break: keep-all; }

/* Case Common Header */
.case-header { margin-bottom: 80px; max-width: 900px; }
.case-header .case-tag { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 24px; padding: 6px 16px; border-radius: 4px; }
.case-header h2 { font-size: clamp(40px, 6vw, 72px); font-weight: 900; line-height: 1.1; margin-bottom: 32px; letter-spacing: -0.03em; }
.case-header p { font-size: 20px; line-height: 1.7; opacity: 0.8; word-break: keep-all; }

/* Bento Grid Common Styles */
.case-image-grid { 
    display: grid; 
    grid-template-columns: repeat(12, 1fr); 
    grid-auto-rows: minmax(100px, auto); 
    gap: 24px; 
    margin-top: 80px; 
}

.case-img-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #f8f9fa;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.case-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-img-item .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: rgba(0,0,0,0.2);
    padding: 30px;
    text-align: center;
}

.case-img-item .img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 30px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.case-img-item:hover img {
    transform: scale(1.1);
}

.case-img-item:hover .img-caption {
    opacity: 1;
    transform: translateY(0);
}

.case-img-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 40px 80px rgba(0,0,0,0.1);
}

/* 1. TalesRunner (Bento Style) */
.brand-case-talesrunner { background: #fff; padding: 180px 0; color: #111; }
.brand-case-talesrunner .case-tag { background: rgba(255, 107, 107, 0.08); color: #FF6B6B; }

/* TalesRunner Wide Layout */
.brand-logo-wrap { margin-bottom: 30px; }
.project-logo { height: 60px; width: auto; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1)); }

.case-image-grid.wide-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.case-image-grid.wide-layout .case-img-item.wide-hero {
    grid-column: span 2;
    aspect-ratio: 21/8; /* 시원한 와이드 비율 */
}

.case-image-grid.wide-layout .case-img-item:not(.wide-hero) {
    grid-column: span 1;
    aspect-ratio: 16/9;
}

/* Case View More CTA Section */
.case-view-more {
    margin-top: 80px;
    grid-column: span 12;
}

.view-project-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 80px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 32px;
    text-decoration: none !important;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.view-project-link::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0%; height: 100%;
    background: var(--point-color);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

.view-project-link .link-text {
    position: relative;
    z-index: 2;
}

.view-project-link .link-text span {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--point-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 12px;
    transition: all 0.4s ease;
}

.view-project-link .link-text h4 {
    font-size: 32px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.02em;
    transition: all 0.4s ease;
}

.view-project-link .link-arrow {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.view-project-link .link-arrow svg {
    width: 32px;
    height: 32px;
    stroke: #111;
    transition: all 0.4s ease;
}

/* Hover Effects */
.view-project-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.1);
    border-color: transparent;
}

.view-project-link:hover::before {
    width: 100%;
}

.view-project-link:hover .link-text span,
.view-project-link:hover .link-text h4 {
    color: #fff;
}

.view-project-link:hover .link-arrow {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    transform: rotate(-45deg);
}

.view-project-link:hover .link-arrow svg {
    stroke: #fff;
}

/* Project Specific Colors */
.brand-case-talesrunner .view-project-link:hover::before { background: #FF6B6B; }
.brand-case-ksr .view-project-link { background: #111; border-color: rgba(255,255,255,0.1); }
.brand-case-ksr .view-project-link .link-text h4 { color: #fff; }
.brand-case-ksr .view-project-link .link-arrow { border-color: rgba(255,255,255,0.2); }
.brand-case-ksr .view-project-link .link-arrow svg { stroke: #fff; }
.brand-case-ksr .view-project-link:hover::before { background: #0066FF; }

.brand-case-supermonster .view-project-link { background: #fff; }
.brand-case-supermonster .view-project-link:hover::before { background: #8B5E3C; }

@media (max-width: 768px) {
    .view-project-link { padding: 40px; border-radius: 24px; }
    .view-project-link .link-text h4 { font-size: 24px; }
    .view-project-link .link-arrow { width: 50px; height: 50px; }
    .view-project-link .link-arrow svg { width: 20px; height: 20px; }
}

/* 2. KSR (Dynamic Grid Style) */
.brand-case-ksr { background: #050505; color: #fff; padding: 180px 0; position: relative; overflow: hidden; }
.brand-case-ksr::before { content: 'MOTORSPORTS'; position: absolute; top: 10%; right: -2%; font-size: 14vw; font-weight: 950; color: rgba(255,255,255,0.02); pointer-events: none; z-index: 1; letter-spacing: -0.05em; }
.brand-case-ksr .case-tag { background: rgba(0, 102, 255, 0.1); color: #0066FF; border: 1px solid rgba(0, 102, 255, 0.2); }
.brand-case-ksr h2 { background: linear-gradient(135deg, #fff 40%, #0066FF 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand-case-ksr .case-img-item { background: #111; border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; }
.brand-case-ksr .case-img-item .img-placeholder { color: rgba(255,255,255,0.2); }

.brand-case-ksr .case-img-item:nth-child(1) { grid-column: span 12; aspect-ratio: 21/9; }
.brand-case-ksr .case-img-item:nth-child(2) { grid-column: span 4; aspect-ratio: 1/1; }
.brand-case-ksr .case-img-item:nth-child(3) { grid-column: span 4; aspect-ratio: 1/1; }
.brand-case-ksr .case-img-item:nth-child(4) { grid-column: span 4; aspect-ratio: 1/1; }
.brand-case-ksr .case-img-item:nth-child(5) { grid-column: span 12; aspect-ratio: 21/7; margin-top: 10px; }

/* 3. SuperMonster (Warm Bento Style) */
.brand-case-supermonster { background: #FDFBF7; padding: 180px 0; color: #2D241E; position: relative; }
.brand-case-supermonster::after { content: ''; position: absolute; inset: 0; background: url('https://www.transparenttextures.com/patterns/paper-fibers.png'); opacity: 0.3; pointer-events: none; }
.brand-case-supermonster .case-tag { background: #F4EFE9; color: #8B5E3C; font-family: var(--font-en); font-style: italic; font-weight: 500; font-size: 16px; border-radius: 100px; padding: 6px 20px; }
.brand-case-supermonster .case-img-item { background: #fff; box-shadow: 0 10px 30px rgba(45,36,30,0.05); border-radius: 12px; }
.brand-case-supermonster .case-img-item .img-placeholder { color: #8B5E3C; opacity: 0.4; }

.brand-case-supermonster .case-img-item:nth-child(1) { grid-column: span 6; grid-row: span 2; aspect-ratio: 1/1; }
.brand-case-supermonster .case-img-item:nth-child(2) { grid-column: span 6; aspect-ratio: 16/7; }
.brand-case-supermonster .case-img-item:nth-child(3) { grid-column: span 3; aspect-ratio: 1/1; }
.brand-case-supermonster .case-img-item:nth-child(4) { grid-column: span 3; aspect-ratio: 1/1; }
.brand-case-supermonster .case-img-item:nth-child(5) { grid-column: span 4; aspect-ratio: 1/1; }
.brand-case-supermonster .case-img-item:nth-child(6) { grid-column: span 8; aspect-ratio: 21/9; }

/* Philosophy, Overview etc */
.design-philosophy { background: #fff; padding: 160px 0; position: relative; }
.philosophy-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 100px; align-items: center; }

.philosophy-visual {
    position: relative;
}

/* Floating Symbols Base */
.floating-symbols {
    position: absolute;
    inset: -50px;
    z-index: 0;
    pointer-events: none;
}

.symbol {
    position: absolute;
    filter: blur(2px);
    animation: float 15s infinite ease-in-out;
}

.symbol-1 { top: 10%; left: -10%; animation-duration: 20s; }
.symbol-2 { bottom: 15%; right: -5%; animation-delay: -5s; animation-duration: 18s; }
.symbol-3 { top: 40%; right: 20%; animation-delay: -10s; animation-duration: 22s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -50px) rotate(10deg); }
    66% { transform: translate(-20px, 30px) rotate(-10deg); }
}

/* Philosophy Text & Card Styles */
.philosophy-text h2 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin-bottom: 48px;
    color: #050505;
}

.philosophy-text p {
    font-size: 20px;
    line-height: 1.85;
    color: #444;
    margin-bottom: 32px;
    word-break: keep-all;
}

.philosophy-card {
    position: relative;
    z-index: 1;
    background: var(--white);
    padding: 70px 60px;
    border-radius: 40px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.04), 0 10px 30px rgba(0,102,255,0.03);
    border: 1px solid rgba(0,0,0,0.03);
    overflow: hidden;
}

.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 150px; height: 150px;
    background: radial-gradient(circle at top right, rgba(0,102,255,0.05) 0%, transparent 70%);
}

.philosophy-card strong {
    display: block;
    font-size: 36px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--electric-blue);
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.philosophy-card p {
    font-size: 18px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 40px;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    background: var(--electric-blue);
    color: var(--white);
    padding: 18px 40px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 15px 30px rgba(0, 102, 255, 0.15);
}

.btn-contact:hover {
    background: #0052cc;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.25);
}
.overview-grid { display: flex; flex-direction: column; gap: 120px; margin-top: 60px; }
.overview-item { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

/* Brand Experience Image Fade */
.fade-image-box {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 40px;
    overflow: hidden;
}

.fade-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: crossFade 8s infinite ease-in-out;
}

.fade-img:nth-child(1) { animation-delay: 0s; }
.fade-img:nth-child(2) { animation-delay: 4s; }

@keyframes crossFade {
    0%, 10% { opacity: 0; }
    20%, 40% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* 6-Image Multi Fade Animation */
.multi-fade .fade-img {
    animation: multiCrossFade 24s infinite ease-in-out;
}

.multi-fade .fade-img:nth-child(1) { animation-delay: 0s; }
.multi-fade .fade-img:nth-child(2) { animation-delay: 4s; }
.multi-fade .fade-img:nth-child(3) { animation-delay: 8s; }
.multi-fade .fade-img:nth-child(4) { animation-delay: 12s; }
.multi-fade .fade-img:nth-child(5) { animation-delay: 16s; }
.multi-fade .fade-img:nth-child(6) { animation-delay: 20s; }

@keyframes multiCrossFade {
    0%, 3.33% { opacity: 0; }
    6.66%, 16.66% { opacity: 1; }
    20%, 100% { opacity: 0; }
}

/* Overview Text Styles */
.overview-txt .category {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    color: var(--electric-blue);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding: 6px 0;
    border-bottom: 2px solid rgba(0,102,255,0.2);
}

.overview-txt h3 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 900;
    margin-bottom: 32px;
    color: #050505;
    letter-spacing: -0.03em;
}

.overview-txt p {
    font-size: 19px;
    line-height: 1.85;
    color: #555;
    margin-bottom: 48px;
    word-break: keep-all;
}

.btn-design-more {
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    font-weight: 800;
    color: #050505;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 8px;
}

.btn-design-more::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--electric-blue);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-design-more:hover {
    color: var(--electric-blue);
}

.btn-design-more:hover::after {
    width: 100%;
}

.overview-visual {
    width: 100%;
    aspect-ratio: 16/11;
    background: #f0f2f5;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.02);
}

.overview-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(225deg, rgba(255,255,255,0.5) 0%, transparent 50%);
    pointer-events: none;
}

@media (max-width: 1024px) {
    .philosophy-grid, .overview-item { grid-template-columns: 1fr; gap: 40px; }
    
    /* Responsive Grid Adjustment */
    .case-image-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 16px !important; 
    }
    .case-img-item { 
        grid-column: span 2 !important; 
        grid-row: auto !important;
        aspect-ratio: 16/10 !important; 
        border-radius: 16px !important;
    }
    /* Mobile Small Items */
    .brand-case-talesrunner .case-img-item:nth-child(2),
    .brand-case-talesrunner .case-img-item:nth-child(3),
    .brand-case-ksr .case-img-item:nth-child(2),
    .brand-case-ksr .case-img-item:nth-child(3),
    .brand-case-ksr .case-img-item:nth-child(4),
    .brand-case-supermonster .case-img-item:nth-child(3),
    .brand-case-supermonster .case-img-item:nth-child(4),
    .brand-case-supermonster .case-img-item:nth-child(5) {
        grid-column: span 1 !important;
        aspect-ratio: 1/1 !important;
    }
}

@media (max-width: 768px) {
    .sub-hero-brand h1 { font-size: 48px; }
    .sub-hero-brand p { font-size: 18px; }
    .case-header h2 { font-size: 32px; }
    .case-header p { font-size: 17px; }
    .case-image-grid { gap: 15px !important; }
    .case-img-item { border-radius: 16px !important; }
}
