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

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.5;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Layout Utils --- */
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.text-center { text-align: center; }

/* --- Popup Styles --- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    width: 90%;
    max-width: 450px;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: popupScale 0.3s ease-out;
}

@keyframes popupScale {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.popup-header i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.popup-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
}

.popup-body {
    text-align: center;
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.popup-body p { margin-bottom: 0.5rem; }

.popup-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-close {
    background-color: #2563eb;
    color: white;
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-weight: 700;
}

.btn-close:hover { background-color: #1d4ed8; }

.btn-hide {
    color: #9ca3af;
    font-size: 0.875rem;
    text-decoration: underline;
}

.btn-hide:hover { color: #6b7280; }

/* --- Navbar --- */
.navbar {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: -0.025em;
}

.nav-logo span { color: #3b82f6; }

.nav-links {
    display: none;
    gap: 2rem;
    font-weight: 500;
}

@media (min-width: 768px) {
    .nav-links { display: flex; }
}

.nav-links a:hover { color: #2563eb; }

.btn-primary-sm {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
}

.btn-primary-sm:hover { background-color: #1d4ed8; }

/* --- Hero --- */
.hero {
    background-color: white;
    padding: 4rem 0 8rem;
    overflow: hidden;
}

.hero-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-flex { flex-direction: row; }
    .hero-text { width: 50%; text-align: left; }
    .hero-image { width: 50%; }
}

.badge {
    display: inline-block;
    background-color: #eff6ff;
    color: #2563eb;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #111827;
}

@media (min-width: 768px) {
    .hero h1 { font-size: 3rem; }
}

.text-blue { color: #2563eb; }

.hero p {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-btns { justify-content: flex-start; }
}

.btn-main {
    background-color: #2563eb;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
}

.btn-main:hover { background-color: #1d4ed8; }
.btn-outline:hover { background-color: #f9fafb; }

.engine-box {
    width: 100%;
    height: 22rem;
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 2px solid #bfdbfe;
    margin-top: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background-color: #000;
}

@media (min-width: 768px) {
    .engine-box { margin-top: 0; }
}

.engine-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.5s ease;
}

.banana-analysis:hover .engine-img {
    transform: scale(1.05);
}

/* Scan Line Animation */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, transparent, #3b82f6, transparent);
    box-shadow: 0 0 15px #3b82f6;
    z-index: 10;
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}

/* Analysis Nodes */
.analysis-nodes .node {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 10px #3b82f6;
    z-index: 15;
}

.node.n1 { top: 30%; left: 40%; animation: blink 1.5s infinite; }
.node.n2 { top: 60%; left: 55%; animation: blink 1.5s infinite 0.5s; }
.node.n3 { top: 45%; left: 70%; animation: blink 1.5s infinite 1s; }

@keyframes blink {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

.engine-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent, rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 20;
}

.pulse-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #60a5fa;
    animation: pulse 2s infinite;
}

.data-stream {
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #93c5fd;
    text-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* --- Stats --- */
.stats {
    background-color: #0f172a;
    color: white;
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-num {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* --- Services --- */
.services {
    padding: 6rem 0;
    background-color: #f9fafb;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-desc {
    color: #6b7280;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #f3f4f6;
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

.icon-blue { background-color: #eff6ff; color: #2563eb; }
.icon-indigo { background-color: #eef2ff; color: #4f46e5; }
.icon-cyan { background-color: #ecfeff; color: #0891b2; }

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card p {
    color: #4b5563;
    font-size: 0.875rem;
}

/* --- Footer --- */
.footer {
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 3rem 0;
}

.footer-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .footer-flex { flex-direction: row; text-align: left; }
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1rem;
}

.footer-info {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
    color: #9ca3af;
}

.footer-socials a:hover { color: #2563eb; }

.copyright {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2.5rem;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
