/* 반응형 디자인 전용 스타일시트 - 대폭 개선 버전 */

/* 대형 태블릿 크기 (1024px ~ 1199px) */
@media screen and (max-width: 1199px) {
    .hero-content {
        gap: 4rem;
    }
    
    .storyboard-container {
        width: 400px;
        height: 400px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* 태블릿 크기 (768px ~ 1023px) */
@media screen and (max-width: 1023px) {
    .nav-menu {
        gap: 2rem;
    }

    .hero-content {
        gap: 3rem;
    }
    
    .hero-text h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }

    .storyboard-container {
        width: 380px;
        height: 380px;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .platform-buttons {
        gap: 1rem;
    }
    
    .platform-btn {
        min-width: 160px;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* 모바일 크기 (768px 이하) */
@media screen and (max-width: 768px) {
    /* 네비게이션 모바일 처리 */
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-top: 1px solid var(--light-gray);
        box-shadow: var(--shadow-medium);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-item a {
        font-size: 1.1rem;
        padding: 1rem 0;
        text-align: center;
        border-bottom: 1px solid var(--light-gray);
        width: 100%;
    }

    /* 히어로 섹션 모바일 최적화 */
    .hero {
        padding: 6rem 1.5rem 4rem;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        align-items: center;
        justify-items: center;
    }
    
    .hero-text {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .hero-text h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .hero-text .subtitle {
        max-width: none;
        text-align: center;
        font-size: 1.1rem;
        margin-bottom: 2rem;
        white-space: normal;
        word-wrap: break-word;
    }

    .platform-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
        max-width: 450px;
        margin: 0 auto 2rem;
    }

    .platform-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 1.2rem 2rem;
        font-size: 1rem;
        min-width: auto;
    }

    /* 스토리보드 모바일 최적화 */
    .hero-visual {
        width: 100%;
        justify-content: center;
    }
    
    .storyboard-container {
        width: 320px;
        height: 320px;
        margin: 0 auto;
    }

    .floating-tool {
        font-size: 1.4rem;
    }

    .tool-interaction-zone {
        width: 60px;
        height: 60px;
    }

    /* 섹션 공통 모바일 스타일 */
    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .inquiry-title {
        font-size: 2rem;
    }

    /* 플랫폼 섹션 모바일 */
    .platforms-section {
        padding: 6rem 1.5rem;
    }
    
    .platform-card {
        padding: 2rem;
        margin: 0;
    }
    
    .platform-card h3 {
        font-size: 1.5rem;
    }

    /* 특징 섹션 모바일 */
    .features-section {
        padding: 6rem 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .feature-item {
        padding: 2rem;
        margin: 0 auto;
        max-width: 400px;
    }

    /* 문의 섹션 모바일 */
    .inquiry-section {
        padding: 5rem 1.5rem 3rem;
    }
    
    .inquiry-card {
        padding: 2rem;
        margin: 0;
        max-width: none;
    }

    .professor-name {
        font-size: 1.5rem;
    }
    
    .professor-title {
        font-size: 1rem;
    }
    
    .inquiry-email {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* 소형 모바일 (480px 이하) */
@media screen and (max-width: 480px) {
    /* 네비게이션 */
    .nav-container {
        padding: 0.8rem 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }

    /* 히어로 섹션 */
    .hero {
        padding: 5rem 1rem 3rem;
    }

    .hero-text h1 {
        font-size: clamp(1.8rem, 10vw, 2rem);
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-text .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }

    .platform-buttons {
        max-width: 280px;
        gap: 0.8rem;
    }
    
    .platform-btn {
        max-width: 260px;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .platform-icon {
        font-size: 1rem;
    }

    /* 스토리보드 */
    .storyboard-container {
        width: 280px;
        height: 280px;
    }

    /* 섹션들 */
    .platforms-section,
    .features-section {
        padding: 4rem 1rem;
    }

    .inquiry-section {
        padding: 4rem 1rem 2rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    .inquiry-title {
        font-size: 1.6rem;
    }

    .platform-card h3 {
        font-size: 1.3rem;
    }

    .platform-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .feature-item {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .inquiry-card {
        padding: 1.5rem;
    }

    .professor-name {
        font-size: 1.3rem;
    }

    .professor-title {
        font-size: 0.9rem;
    }

    .inquiry-email {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    /* 푸터 */
    .footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .footer p {
        font-size: 0.9rem;
    }
}

/* 초소형 모바일 (360px 이하) */
@media screen and (max-width: 360px) {
    .hero {
        padding: 4rem 0.8rem 2rem;
    }
    
    .hero-text h1 {
        font-size: 1.6rem;
    }
    
    .hero-text .subtitle {
        font-size: 0.9rem;
    }
    
    .platform-buttons {
        max-width: 240px;
    }
    
    .platform-btn {
        max-width: 220px;
        padding: 0.9rem 1rem;
        font-size: 0.85rem;
    }
    
    .storyboard-container {
        width: 240px;
        height: 240px;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .inquiry-title {
        font-size: 1.4rem;
    }
    
    .platforms-section,
    .features-section,
    .inquiry-section {
        padding: 3rem 0.8rem;
    }
}

/* 가로 모드 모바일 최적화 */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 4rem 2rem 2rem;
    }

    .hero-content {
        gap: 2rem;
    }
    
    .hero-text h1 {
        margin-bottom: 1rem;
    }
    
    .hero-text .subtitle {
        margin-bottom: 1.5rem;
    }

    .storyboard-container {
        width: 300px;
        height: 300px;
    }
}

/* 대형 화면 최적화 (1400px 이상) */
@media screen and (min-width: 1400px) {
    .hero-content {
        gap: 8rem;
    }

    .storyboard-container {
        width: 500px;
        height: 500px;
    }

    .platforms-grid {
        gap: 4rem;
    }

    .features-grid {
        gap: 4rem;
    }
}

/* 초대형 화면 최적화 (1920px 이상) */
@media screen and (min-width: 1920px) {
    .hero-text h1 {
        font-size: 6rem;
    }
    
    .hero-text .subtitle {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }
    
    .storyboard-container {
        width: 550px;
        height: 550px;
    }
}

/* 접근성: 애니메이션 비활성화 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-tool {
        animation: none;
    }

    .draw-stroke {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
    }
    
    .hero::before {
        animation: none;
    }
}

/* 고해상도 디스플레이 최적화 */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    .storyboard-container::before {
        width: 2px;
    }

    .draw-stroke {
        stroke-width: 2.5;
    }

    .panel-frame,
    .panel-frame-2,
    .panel-frame-3 {
        stroke-width: 2.5;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .platform-btn:hover,
    .feature-item:hover,
    .platform-card:hover {
        transform: none;
    }
    
    .platform-btn:active,
    .feature-item:active,
    .platform-card:active {
        transform: scale(0.98);
    }
    
    .tool-interaction-zone:hover {
        background: transparent;
    }
    
    .nav-item a:hover {
        border-bottom-color: transparent;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .nav-menu {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .nav-item a {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .nav-item a:hover {
        color: rgba(255, 255, 255, 1);
        border-bottom-color: rgba(255, 255, 255, 1);
    }
}
