/* Main CSS */

/* -------------------------------------
   Global Styles
------------------------------------- */
body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

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

.section {
    padding: var(--space-12) 0;
    position: relative;
    overflow: hidden;
}

/* Typography Helpers */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--accent-500);
}

.heading-xl {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.heading-lg {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-4);
}

.equal-margin-title {
    margin-top: var(--space-6);
}

.heading-md {
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--space-2);
}

.text-body {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
}

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

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-inverse);
    box-shadow: var(--glow-primary);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
    transition: 0.5s;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-600);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-4);
}

/* Glass Card */
.glass-card {
    background: var(--bg-glass-dark);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-lg);
}

/* Spacing Utilities */
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }

/* -------------------------------------
   Section: Hero
------------------------------------- */
.hero {
    padding-top: calc(var(--header-height) + var(--space-2));
    padding-bottom: var(--space-12);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Decorative Background Elements */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    transform: translate(calc(var(--mouse-x, 0) * -1px), calc(var(--mouse-y, 0) * -1px));
    transition: transform 0.1s linear;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    transform: translate(calc(var(--mouse-x, 0) * 1px), calc(var(--mouse-y, 0) * 1px));
    transition: transform 0.1s linear;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-phone-mockup {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    border-radius: 40px;
    /* Approximate iPhone border radius */
    overflow: hidden;
    max-width: 320px;
    animation: float 6s ease-in-out infinite;
    border: 8px solid #1a1a1a;
    background: #1a1a1a;
}

/* 3D Tilt Effect Container */
.hero-image-perspective {
    perspective: 1000px;
}

.hero-phone-mockup {
    transform: rotateY(calc(-10deg + var(--mouse-x, 0) * 0.1deg)) rotateX(calc(5deg - var(--mouse-y, 0) * 0.1deg));
    transition: transform 0.1s ease-out;
}

.hero-phone-mockup:hover {
    transform: rotateY(0) rotateX(0);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-8);
    flex-wrap: wrap;
}

/* -------------------------------------
   Section: Trust Indicators
------------------------------------- */
.trust-section {
    padding: var(--space-8) 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    text-align: center;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.trust-icon {
    font-size: 2rem;
    margin-bottom: var(--space-1);
}

.trust-label {
    font-weight: 600;
    color: var(--text-primary);
}

.trust-sub {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* -------------------------------------
   Section: Key Features
------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-12);
}

.feature-card {
    background: linear-gradient(145deg, #ffffff, #ffffff);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(59, 130, 246, 0.3);
    background: linear-gradient(145deg, #ffffff, #f0f9ff);
}

.feature-image {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    background: var(--bg-primary);
    aspect-ratio: 16/9;
    /* Or adjust based on screenshots provided provided screenshots are mostly portrait, maybe cover fit */
    object-fit: cover;
    object-position: top;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* -------------------------------------
   Section: Problem & Solution
------------------------------------- */
.problem-solution {
    background: var(--bg-primary);
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    margin-top: var(--space-12);
}

.problem-box,
.solution-box {
    padding: var(--space-8);
    border-radius: var(--radius-lg);
}

.problem-box {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.solution-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.list-item {
    display: flex;
    align-items: start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.list-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* -------------------------------------
   Section: Reviews (Social Proof)
------------------------------------- */
.reviews-scroller {
    display: flex;
    overflow-x: auto;
    gap: var(--space-6);
    padding: var(--space-4);
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
}

.reviews-scroller::-webkit-scrollbar {
    display: none;
}

.review-card {
    flex: 0 0 350px;
    scroll-snap-align: center;
    background: white;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.review-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.review-stars {
    color: #F59E0B;
    /* Amber 500 */
}

/* -------------------------------------
   Section: CTA
------------------------------------- */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, hsl(210, 85%, 98%), hsl(200, 90%, 96%));
}

.qr-code-wrapper {
    margin: var(--space-8) auto;
    background: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: inline-block;
    max-width: 200px;
}

/* -------------------------------------
   Footer
------------------------------------- */
.footer {
    padding: var(--space-6) 0 var(--space-24);
    background: white;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    margin-top: var(--space-4);
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--primary-600);
}

/* -------------------------------------
   Animations
------------------------------------- */
@keyframes float {
    0% {
        transform: translateY(0px) rotateY(-10deg) rotateX(5deg);
    }

    50% {
        transform: translateY(-15px) rotateY(-10deg) rotateX(5deg);
    }

    100% {
        transform: translateY(0px) rotateY(-10deg) rotateX(5deg);
    }
}

/* Text Rotator */
.text-rotator {
    display: inline-block;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.text-rotator.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

/* Typing cursor */
.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: currentColor;
    margin-left: 6px;
    vertical-align: bottom;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.fade-in-up {
    /* HOTFIX: 애니메이션 로딩 실패 시에도 콘텐츠가 보이도록 수정 */
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: none;
}

.stagger-delay-1 {
    transition-delay: 0.1s;
}

.stagger-delay-2 {
    transition-delay: 0.2s;
}

.stagger-delay-3 {
    transition-delay: 0.3s;
}

/* -------------------------------------
   Media Queries
------------------------------------- */
@media (max-width: 1024px) {
    :root {
        --container-padding: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content {
        margin: 0 auto;
        margin-bottom: var(--space-12);
    }

    .hero-phone-mockup {
        transform: rotateY(0) rotateX(0);
        animation: none;
        margin: 0 auto;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .feature-card,
    .problem-box,
    .solution-box {
        text-align: left;
    }

    .list-item {
        justify-content: flex-start;
        text-align: left;
    }

    body section.section,
    body section.hero,
    body section.trust-section,
    body section.cta-section {
        padding-top: var(--space-16) !important;
        padding-bottom: var(--space-16) !important;
    }

    .section .badge {
        margin-top: var(--space-2) !important;
        margin-bottom: var(--space-4) !important;
    }
    .equal-margin-title {
        margin-top: var(--space-2) !important;
    }

    .heading-xl {
        font-size: var(--text-3xl);
    }

    .text-gradient.text-rotator {
        background: linear-gradient(135deg, hsl(210, 85%, 45%), hsl(200, 90%, 40%));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .sticky-app-info .text-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-desc {
        display: none !important;
    }
}

@media (max-width: 350px) {
    :root {
        --container-padding: var(--space-4);
    }

    .heading-xl {
        font-size: var(--text-2xl);
    }

    .hero-actions {
        padding: 0 var(--space-2);
    }

    .brand-title {
        font-size: var(--text-sm);
        font-weight: 700;
    }
}

/* -------------------------------------
   FAQ Section
------------------------------------- */
.faq-container {
    max-width: 800px;
    margin: var(--space-8) auto 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: var(--space-4) 0;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--primary-600);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-question {
    color: var(--primary-600);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer p {
    padding-bottom: var(--space-4);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* -------------------------------------
   Sticky Download Bar
------------------------------------- */
.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    padding: var(--space-4);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.sticky-bar.visible {
    transform: translateY(0);
}

.sticky-bar-content {

    max-width: var(--container-width);

    margin: 0 auto;

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 0 var(--container-padding);

    gap: var(--space-2);

}



.sticky-app-info {

    display: flex;

    align-items: center;

    gap: var(--space-3);

    min-width: 0;

}



.sticky-app-info .text-content {

    min-width: 0;

}



.sticky-app-info h4 {

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    font-size: var(--text-base);

}



.sticky-icon {

    width: 40px;

    height: 40px;

    background: var(--bg-primary);

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.5rem;

}



.btn-sm {

    padding: 0.5rem 1rem;

    font-size: 0.9rem;

}



/* -------------------------------------

   Scroll to Top Button

------------------------------------- */

.scroll-to-top {

    position: fixed;

    bottom: 130px;

    right: 20px;

    background: var(--primary-gradient);

    color: white;

    width: 50px;

    height: 50px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 24px;

    text-decoration: none;

    box-shadow: var(--shadow-lg);

    z-index: 101;

    opacity: 0;

    visibility: hidden;

    transform: translateY(20px);

    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;

}



.scroll-to-top.visible {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

}



.scroll-to-top:hover {

    transform: translateY(-3px);

    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);

}
