/* 
 * Waffle Communications Premium Design System
 * 10-Year Senior Front-end Perspective
 */

:root {
    /* Color Palette */
    --primary: #4F46E5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --secondary: #F59E0B;
    --bg-dark: #0F172A;
    --bg-darker: #020617;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Layout */
    --container-max: 1200px;
    --header-height: 80px;

    /* Animation */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    height: 70px;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.logo-text span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition-smooth);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #020617 100%);
}

#antigravity-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 300;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* --- Antigravity Elements Styling --- */
.floating-obj {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.4) 0%, rgba(139, 92, 246, 0.1) 100%);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 1;
}

/* --- Section Shared --- */
section {
    padding: 8rem 0;
}

.section-tag {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

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

.header-center .section-desc {
    margin: 0 auto;
}

/* --- About Section --- */
.about-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-bg {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(245, 158, 11, 0.1));
    filter: blur(60px);
    border-radius: 50%;
    z-index: -1;
}

.floating-img {
    width: 100%;
    max-width: 400px;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.vision-cards {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.vision-card {
    padding: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.vision-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    perspective: 1000px;
}

.card-inner {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
}

.service-card:hover .card-inner {
    transform: translateY(-15px) rotateX(5deg) rotateY(2deg);
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.service-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 2rem;
}

.card-content .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Portfolio Slider (Mockup Grid) --- */
.portfolio-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.portfolio-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.link-icon {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 24px;
    height: 24px;
    color: var(--primary);
    background: rgba(15, 23, 42, 0.5);
    padding: 5px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-item:hover .link-icon {
    opacity: 1;
    transform: scale(1) translateY(-5px);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* --- Partners Section --- */
.partners-section {
    background: linear-gradient(to bottom, var(--bg-darker), var(--bg-dark));
    padding: 6rem 0;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    height: 140px;
    border-radius: 20px;
    transition: var(--transition-smooth);
    filter: grayscale(1);
    opacity: 0.6;
}

.partner-item img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
}

.partner-item:hover {
    transform: translateY(-5px);
    filter: grayscale(0);
    opacity: 1;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.15);
}

@media (max-width: 991px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .partner-item {
        height: 100px;
        padding: 1.5rem;
    }
}

/* --- Contact Us --- */
.contact-details {
    margin-top: 2.5rem;
}

.contact-details li {
    margin-bottom: 1.5rem;
}

.contact-details strong {
    display: block;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.3rem;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--glass-shadow);
}

#contact-form {
    padding: 3rem;
    border-radius: 40px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* --- Footer --- */
.footer {
    padding: 5rem 0 2rem;
    background: var(--bg-darker);
    border-top: 1px solid var(--glass-border);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo img {
    height: 50px;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Scroll Animations --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.animate-in {
    animation: fadeInUp 1s forwards cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.animate-in:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-in:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mouse Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    color: var(--text-muted);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    margin: 0 auto 10px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--primary);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: mouseScroll 2s infinite;
}

@keyframes mouseScroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* --- Responsive Layout --- */
@media (max-width: 991px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .vision-cards {
        grid-template-columns: 1fr;
    }

    .contact-info {
        text-align: center;
    }
}

/* --- AI Quote (Minimal & Elegant) --- */
.ai-quote-container {
    margin: 3rem auto;
    padding: 1.5rem 2rem;
    max-width: 650px;
    background: transparent;
    border-left: 3px solid var(--primary);
    position: relative;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.03) 0%, transparent 100%);
    transition: var(--transition-smooth);
}

.ai-quote-container:hover {
    border-left-width: 5px;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.08) 0%, transparent 100%);
}

.ai-quote {
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    line-height: 1.6;
    color: var(--text-main);
    text-align: left;
    font-weight: 300;
    letter-spacing: -0.3px;
}

.quote-sub {
    font-size: 0.8em;
    opacity: 0.6;
    margin-right: 0.4rem;
    display: inline-block;
}

.quote-focus {
    font-weight: 600;
    color: var(--secondary);
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.ai-accent {
    display: block;
    margin-top: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    position: relative;
}

.ai-accent::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
    opacity: 0.6;
}

@media (max-width: 768px) {
    .ai-quote-container {
        padding: 1.5rem 2rem;
        margin: 3rem 1rem;
    }
    .ai-quote {
        font-size: 1.2rem;
    }
}


/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(79, 70, 229, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--primary-glow);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}