@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --background-color: #000000;
    --text-color: #f5f5f7;
    --secondary-text-color: #86868b;
    --accent-color: #007aff;
    --card-background: #121212;
    --border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #4da3ff;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    height: 24px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
}

nav ul li a {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}
nav ul li a:hover {
    color: var(--text-color);
}


.hero {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-image: url('earth.jpg');
    background-size: cover;
    background-position: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Overlay for text readability on hero image */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark semi-transparent overlay */
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative; /* Ensure content is above the overlay */
    z-index: 2;
}

/* iMPL Badge */
.imple-badge {
    display: inline-block;
    margin-bottom: 25px;
}

.badge-text {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.8), rgba(88, 86, 214, 0.8));
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
    }
    to {
        box-shadow: 0 4px 25px rgba(0, 122, 255, 0.7);
    }
}

.main-title {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #fff;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--secondary-text-color);
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 500;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #2997ff;
    transform: scale(1.05);
}

.content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.section-with-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    max-width: 100%;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section-with-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 0;
    transition: background 0.5s ease;
}

.section-with-bg > * {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.content-section h2 {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 80px;
    font-weight: 700;
}

.section-intro {
    font-size: 1.25rem;
    color: var(--secondary-text-color);
    text-align: center;
    max-width: 800px;
    margin: -40px auto 60px;
}

.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Section transition effects */
.content-section, .hero {
    opacity: 0.3;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.section-visible, .hero.section-visible {
    opacity: 1;
}

.section-with-bg {
    transform: scale(1);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-with-bg.section-visible {
    transform: scale(1);
}

.section-with-bg::before {
    transition: opacity 0.8s ease;
}

.section-with-bg.section-visible::before {
    opacity: 1;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--card-background);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card i {
    color: var(--accent-color);
    font-size: 1.8rem;
}

.platform-grid, .mitre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.platform-item, .mitre-item {
    background: var(--card-background);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.platform-item:hover, .mitre-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.platform-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.platform-header h3 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.platform-header span {
    font-size: 1rem;
    color: var(--secondary-text-color);
    font-weight: 700;
}
.mitre-item h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.cloud-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}
.cloud-provider {
    border-left: 3px solid var(--accent-color);
    padding-left: 30px;
}
.cloud-provider h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cloud-provider i {
    font-size: 1.8rem;
}

.malware-list {
    list-style: none;
    max-width: 900px;
    margin: 0 auto;
}
.malware-list li {
    font-size: 1.1rem;
    background: transparent;
    padding: 25px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}
.malware-list li:hover {
    background-color: var(--card-background);
}
.malware-list li strong {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.recommendation-section .accordion {
    max-width: 900px;
    margin: 40px auto 0;
}
.accordion-item {
    background-color: var(--card-background);
    border-radius: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.accordion-header {
    background: none;
    border: none;
    width: 100%;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: left;
}
.accordion-header span {
    flex-grow: 1;
    margin: 0 15px;
}
.accordion-header i {
    font-size: 1.5rem;
    color: var(--accent-color);
}
.icon-toggle {
    transition: transform 0.3s ease;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
.accordion-content p {
    padding: 0 30px 25px;
    color: var(--secondary-text-color);
    line-height: 1.8;
}

.accordion-item.active .accordion-content {
    max-height: 200px; /* Adjust as needed */
    padding-bottom: 25px;
}
.accordion-item.active .icon-toggle {
    transform: rotate(45deg);
}

/* Navigation Buttons */
.nav-buttons {
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.nav-btn.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.15);
}

.nav-btn i {
    font-size: 1.3rem;
    color: #fff;
}

#scrollDownBtn {
    animation: bounce 2s infinite;
}

#scrollDownBtn.visible:hover {
    animation: none;
    transform: scale(1.15);
}

/* Home button - distinct red style */
#homeBtn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    border: none;
    box-shadow: 0 4px 15px rgba(238, 90, 90, 0.4);
}

#homeBtn:hover {
    background: linear-gradient(135deg, #ff5252, #e04848);
    box-shadow: 0 6px 20px rgba(238, 90, 90, 0.6);
}

/* Scroll up button - cyan accent */
#scrollUpBtn {
    background: rgba(0, 200, 200, 0.2);
    border-color: rgba(0, 200, 200, 0.5);
}

#scrollUpBtn:hover {
    background: rgba(0, 200, 200, 0.4);
}

/* Scroll down button - blue accent */
#scrollDownBtn {
    background: rgba(0, 122, 255, 0.2);
    border-color: rgba(0, 122, 255, 0.5);
}

#scrollDownBtn:hover {
    background: rgba(0, 122, 255, 0.4);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: scale(1) translateY(0);
    }
    40% {
        transform: scale(1) translateY(-8px);
    }
    60% {
        transform: scale(1) translateY(-4px);
    }
}

footer {
    text-align: center;
    padding: 60px 20px;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-snap-align: end;
    gap: 10px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #007aff, #5856d6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.footer-copyright {
    margin-top: 15px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.chart-container {
    max-width: 800px;
    height: 400px;
    margin: 60px auto;
}

.dual-chart-container {
    display: flex;
    gap: 40px;
    max-width: 1100px;
    margin: 60px auto;
    justify-content: center;
    align-items: center;
}

.dual-chart-container .chart-wrapper {
    flex: 1;
    height: 350px;
    max-width: 500px;
}

@media (max-width: 900px) {
    .dual-chart-container {
        flex-direction: column;
    }
    .dual-chart-container .chart-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

.image-container {
    text-align: center;
}

@media (max-width: 768px) {
    html {
        scroll-snap-type: y proximity;
    }
    .main-title { font-size: 3.5rem; }
    .content-section h2 { font-size: 2.5rem; }
    .platform-grid, .cloud-details, .mitre-grid { grid-template-columns: 1fr; }
    nav ul { display: none; }
    .content-section {
        min-height: auto;
        padding: 80px 20px;
    }
    .section-with-bg {
        min-height: auto;
        padding: 80px 20px;
        background-attachment: scroll;
    }
}

/* Add staggered animation delays */
.reveal[data-delay="50"] { transition-delay: 50ms; }
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="150"] { transition-delay: 150ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="250"] { transition-delay: 250ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }
.reveal[data-delay="500"] { transition-delay: 500ms; }
