/* Base & Typography */
:root {
    --bg-color: #0B0F19;
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --accent: #00F0FF;
    --accent-glow: rgba(0, 240, 255, 0.4);
    --card-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden; 
}

/* Background Animation */
.background-anim {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.05) 0%, rgba(11, 15, 25, 0) 50%);
    z-index: -1;
    animation: rotateBg 40s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(to bottom, rgba(11, 15, 25, 0.8) 0%, rgba(11, 15, 25, 0) 100%);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #FFFFFF, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 36px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

/* Scroll Container Setup */
.scroll-container {
    height: 100vh;
    width: 100vw;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Individual Full-Page Panels */
.panel {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 5%;
}

/* Shared Content Box inside Panels */
.content {
    text-align: center;
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 10; /* Above background animations */
}

/* Toss-Style Fade Up Animation */
.fade-up {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typographic Hierarchy */
h1 {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.3;
    word-break: keep-all;
    letter-spacing: -1.5px;
}

h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.3;
    word-break: keep-all;
    letter-spacing: -1.5px;
}

p.fade-up, .content > p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    word-break: keep-all;
    margin-bottom: 40px;
    font-weight: 400;
    line-height: 1.6;
}

span {
    color: var(--accent);
}

/* Service Animations (Replaces Emojis) */
.anim-icon {
    margin: 0 auto 30px;
}
.flexit-anim { position: relative; width: 80px; height: 80px; }
.flexit-anim .node { position: absolute; border-radius: 50%; background: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }
.flexit-anim .center { width: 28px; height: 28px; top: 26px; left: 26px; animation: pulseNode 2s infinite; }
.flexit-anim .orbit { width: 12px; height: 12px; top: 34px; left: 34px; }
.flexit-anim .orbit-1 { animation: orbit1 4s linear infinite; }
.flexit-anim .orbit-2 { animation: orbit2 4s linear infinite -1.3s; }
.flexit-anim .orbit-3 { animation: orbit3 4s linear infinite -2.6s; }

@keyframes pulseNode { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.6; } }
@keyframes orbit1 { 0% { transform: rotate(0deg) translateX(45px) rotate(0deg); } 100% { transform: rotate(360deg) translateX(45px) rotate(-360deg); } }
@keyframes orbit2 { 0% { transform: rotate(0deg) translateY(45px) rotate(0deg); } 100% { transform: rotate(360deg) translateY(45px) rotate(-360deg); } }
@keyframes orbit3 { 0% { transform: rotate(0deg) translate(-35px, -35px) rotate(0deg); } 100% { transform: rotate(360deg) translate(-35px, -35px) rotate(-360deg); } }

/* Security Animation (Scanning Shield) */
.security-anim { width: 60px; height: 70px; position: relative; }
.shield-body { width: 100%; height: 100%; border: 3px solid var(--accent); border-radius: 0 0 35px 35px; position: relative; overflow: hidden; box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.2), 0 0 20px rgba(0, 240, 255, 0.2); clip-path: polygon(0 5%, 100% 5%, 100% 100%, 0 100%); }
.shield-body::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.scanner { width: 100%; height: 2px; background: #FFF; box-shadow: 0 0 10px #FFF, 0 -15px 20px var(--accent); position: absolute; top: 0; animation: scan 2.5s ease-in-out infinite alternate; }
@keyframes scan { 0% { top: -10%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 110%; opacity: 0; } }

/* Edu Animation (Typing Brackets) */
.edu-anim { font-size: 3.5rem; font-weight: 800; color: var(--accent); display: flex; justify-content: center; align-items: center; text-shadow: 0 0 15px var(--accent-glow); font-family: 'Courier New', Courier, monospace; height: 80px; }
.edu-anim .bracket-left { animation: slideRight 2s ease-in-out infinite alternate; }
.edu-anim .bracket-right { animation: slideLeft 2s ease-in-out infinite alternate; }
.edu-anim .cursor { animation: blinkCursor 1s step-end infinite; color: #FFF; }
@keyframes slideRight { 0% { transform: translateX(10px); } 100% { transform: translateX(-8px); } }
@keyframes slideLeft { 0% { transform: translateX(-10px); } 100% { transform: translateX(8px); } }
@keyframes blinkCursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ========================================================
   SECTION BACKGROUND ANIMATIONS 
   ======================================================== */
.bg-anim {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    opacity: 1; /* High opacity internally, features have low opacity initially */
}

/* 1. FlexIT (Circuit Board) */
.bg-anim-circuit { opacity: 0.15; }
.bg-anim-circuit .line { position: absolute; background: rgba(0, 240, 255, 0.3); }
.bg-anim-circuit .line-h { width: 100%; height: 2px; }
.bg-anim-circuit .line-v { height: 100%; width: 2px; }
.bg-anim-circuit .current, .bg-anim-circuit .current-v {
    position: absolute;
    background: #FFF;
    box-shadow: 0 0 15px 3px var(--accent), 0 0 30px #00F0FF;
    border-radius: 5px;
    opacity: 0;
}
.bg-anim-circuit .current {
    top: -1px; left: -100px;
    width: 60px; height: 4px;
    animation: flowH 4s ease-in-out infinite;
}
.bg-anim-circuit .current-v {
    top: -100px; left: -1px;
    width: 4px; height: 60px;
    animation: flowV 4s ease-in-out infinite;
}
.bg-anim-circuit .bg-node {
    position: absolute;
    width: 14px; height: 14px;
    background: var(--bg-color);
    border: 3px solid var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--accent-glow);
}

@keyframes flowH {
    0% { left: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 110%; opacity: 0; }
}
@keyframes flowV {
    0% { top: -10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110%; opacity: 0; }
}

/* 2. Security (Shield Attack) */
.bg-anim-shield-bg { opacity: 0.2; display: flex; justify-content: center; align-items: center; }
.bg-shield-outline {
    width: 50vw; max-width: 600px;
    height: 70vh;
    border: 3px solid rgba(0, 240, 255, 0.2);
    border-radius: 0 0 50% 50%;
    clip-path: polygon(0 5%, 100% 5%, 100% 100%, 0 100%);
    position: relative;
    /* When active, glow up */
    transition: all 0.5s;
}
.active-panel .bg-shield-outline {
    border-color: rgba(0, 240, 255, 0.6);
    box-shadow: 0 0 100px rgba(0, 240, 255, 0.1), inset 0 0 100px rgba(0, 240, 255, 0.1);
}
.bg-shield-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 0; height: 0;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.2) 0%, transparent 70%);
}
.active-panel .bg-shield-glow {
    animation: shieldPulse 3s infinite;
}
.bg-attack {
    position: absolute;
    width: 4px; height: 60px;
    background: #FF0055;
    box-shadow: 0 0 20px #FF0055;
    border-radius: 20px;
    opacity: 0;
}
.bg-attack-1 { top: 0; left: 15vw; transform: rotate(35deg); }
.bg-attack-2 { top: 10vh; right: 15vw; transform: rotate(-45deg); }
.bg-attack-3 { bottom: 10vh; left: 20vw; transform: rotate(135deg); }

.active-panel .bg-attack-1 { animation: strike1 3s infinite 0.5s; }
.active-panel .bg-attack-2 { animation: strike2 4s infinite 1.5s; }
.active-panel .bg-attack-3 { animation: strike3 3.5s infinite 2.5s; }

@keyframes shieldPulse {
    0%, 100% { width: 50%; height: 50%; opacity: 0.5; }
    50% { width: 100%; height: 100%; opacity: 1; }
}
@keyframes strike1 {
    0% { transform: translate(-10vw, -10vh) rotate(35deg); opacity: 0; }
    20% { opacity: 1; }
    50% { transform: translate(15vw, 15vh) rotate(35deg); opacity: 1; } /* Hit */
    52% { transform: translate(15vw, 15vh) rotate(35deg) scale(3); opacity: 0; background: var(--accent); box-shadow: 0 0 30px var(--accent); } /* Explode */
    100% { opacity: 0; }
}
@keyframes strike2 {
    0% { transform: translate(10vw, -10vh) rotate(-45deg); opacity: 0; }
    20% { opacity: 1; }
    50% { transform: translate(-10vw, 10vh) rotate(-45deg); opacity: 1; }
    52% { transform: translate(-10vw, 10vh) rotate(-45deg) scale(3); opacity: 0; background: var(--accent); box-shadow: 0 0 30px var(--accent); }
    100% { opacity: 0; }
}
@keyframes strike3 {
    0% { transform: translate(-10vw, 10vh) rotate(135deg); opacity: 0; }
    20% { opacity: 1; }
    50% { transform: translate(10vw, -10vh) rotate(135deg); opacity: 1; }
    52% { transform: translate(10vw, -10vh) rotate(135deg) scale(3); opacity: 0; background: var(--accent); box-shadow: 0 0 30px var(--accent); }
    100% { opacity: 0; }
}

/* 3. Edu (Tree Growing on Both Sides) */
.bg-anim-tree-grow { opacity: 0.35; } /* 투명도를 높여 양옆에서 선명하게 보이게 설정 */
.tree {
    position: absolute;
    bottom: 0;
    width: 15vw;
    height: 100vh;
}
.tree-left { left: 5vw; }
.tree-right { right: 5vw; }

.tree-trunk {
    position: absolute;
    bottom: -10vh; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 60vh;
    background: linear-gradient(0deg, var(--accent), transparent);
    transform-origin: bottom;
    opacity: 0;
}
.tree-branch {
    position: absolute;
    bottom: 25vh; left: 50%;
    width: 3px; height: 25vh;
    background: linear-gradient(0deg, var(--accent), transparent);
    transform-origin: bottom;
    opacity: 0;
}
.branch-left { transform: translateX(-50%) rotate(-45deg); }
.branch-right { bottom: 15vh; transform: translateX(-50%) rotate(45deg); }

.tree-leaf {
    position: absolute;
    opacity: 0;
}
.leaf-shape {
    width: 30px; height: 30px;
    background: var(--accent);
    border-radius: 0 50% 50% 50%;
    box-shadow: 0 0 20px var(--accent-glow);
}
.leaf-1 { bottom: 45vh; left: 0; transform: rotate(-60deg); }
.leaf-2 { bottom: 35vh; right: 0; transform: rotate(60deg); }
.leaf-3 { bottom: 50vh; left: 50%; transform: translateX(-50%) rotate(45deg); }

.sparkle {
    position: absolute;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #FFF;
    box-shadow: 0 0 10px #FFF, 0 0 15px var(--accent);
    opacity: 0;
}
.sp-1 { bottom: 20vh; left: 10vw; }
.sp-2 { bottom: 40vh; right: 10vw; }
.sp-3 { bottom: 50vh; left: 15vw; }
.sp-4 { bottom: 30vh; right: 15vw; }

/* Trigger Animations on active-panel */
.active-panel .tree-trunk { animation: growTrunk 6s ease-in-out infinite; }
.active-panel .branch-left { animation: growBranchL 6s ease-in-out infinite 1s; }
.active-panel .branch-right { animation: growBranchR 6s ease-in-out infinite 1.5s; }
.active-panel .leaf-1 .leaf-shape { animation: bloom 6s ease-in-out infinite 2s; }
.active-panel .leaf-2 .leaf-shape { animation: bloom 6s ease-in-out infinite 2.5s; }
.active-panel .leaf-3 .leaf-shape { animation: bloom 6s ease-in-out infinite 3s; }
.active-panel .sp-1 { animation: floatUp 4s infinite 0.5s; }
.active-panel .sp-2 { animation: floatUp 4.5s infinite 1.2s; }
.active-panel .sp-3 { animation: floatUp 5s infinite 2.1s; }
.active-panel .sp-4 { animation: floatUp 4.2s infinite 0.8s; }

@keyframes growTrunk {
    0% { transform: translateX(-50%) scaleY(0); opacity: 0; }
    20% { opacity: 1; }
    40%, 80% { transform: translateX(-50%) scaleY(1); opacity: 1; }
    100% { opacity: 0; }
}
@keyframes growBranchL {
    0% { transform: translateX(-50%) scaleY(0) rotate(-40deg); opacity: 0; }
    20% { opacity: 1; }
    40%, 80% { transform: translateX(-50%) scaleY(1) rotate(-40deg); opacity: 1; }
    100% { opacity: 0; }
}
@keyframes growBranchR {
    0% { transform: translateX(-50%) scaleY(0) rotate(40deg); opacity: 0; }
    20% { opacity: 1; }
    40%, 80% { transform: translateX(-50%) scaleY(1) rotate(40deg); opacity: 1; }
    100% { opacity: 0; }
}
@keyframes bloom {
    0% { transform: scale(0); opacity: 0; }
    20% { opacity: 1; }
    40%, 80% { transform: scale(1); opacity: 1; }
    100% { opacity: 0; }
}
@keyframes floatUp {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    20% { opacity: 1; transform: translateY(-30px) scale(1); }
    80% { opacity: 1; transform: translateY(-70px) scale(1); }
    100% { transform: translateY(-100px) scale(0); opacity: 0; }
}

/* Detailed Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
    margin-bottom: 45px;
    text-align: left;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 30px 24px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 15px;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
    word-break: keep-all;
}

/* Primary Button */
.btn {
    display: inline-block;
    padding: 22px 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-5px);
}

/* Scroll Bouncing Indicator on Hero */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    animation: bounce 2s infinite;
}

.scroll-indicator .arrow {
    margin-top: 15px;
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* Footer Section */
.footer-panel {
    min-height: 100vh;
}

footer {
    padding-top: 50px;
}

.footer-logo {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #FFFFFF, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-desc {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

footer .copyright {
    font-size: 1rem;
    color: rgba(148, 163, 184, 0.5);
    margin-bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    p.fade-up, .content > p { font-size: 1.1rem; }
    
    .panel {
        height: auto;
        min-height: 100vh;
        padding-top: 80px;
        padding-bottom: 80px;
        justify-content: flex-start;
    }
}
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    .btn { padding: 18px 40px; font-size: 1.1rem; }
    nav { display: none; }
}
