/* Reset & Common Styles */
:root {
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-900: #312e81;
    
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;
    
    --white: #ffffff;
    --black: #000000;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--slate-50);
    color: var(--slate-900);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background-color: var(--primary-500);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

main {
    flex-grow: 1;
}

/* =========================================
   Hero Section (Video Background)
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: var(--slate-900);
}

/* 배경만 담당 */
.hero-bg-video-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #1e3a5f, #3b82f6, #4338ca, #7c3aed);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

/* 비디오 - 오른쪽 절반 중앙 */
.hero-bg-video-container video {
    position: absolute;
    left: 75%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46%;
    max-width: 700px;
    height: auto;
    border-radius: 12px;
    z-index: 1;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-bg-video-container::before,
.hero-bg-video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' d='M0,160L48,170.7C96,181,192,203,288,192C384,181,480,139,576,128C672,117,768,139,864,165.3C960,192,1056,224,1152,213.3C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E");
    background-size: 1440px 320px;
    background-repeat: repeat-x;
    opacity: 0.06;
    animation: waveFlow 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.hero-bg-video-container::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,117.3C960,107,1056,149,1152,165.3C1248,181,1344,171,1392,165.3L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'/%3E%3C/svg%3E");
    animation: waveFlow 35s linear infinite reverse;
    opacity: 0.04;
}

@keyframes waveFlow {
    0% { background-position: 0 50%; }
    100% { background-position: 1440px 50%; }
}

.hero-bg-video {
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-bg-video.active {
    opacity: 1;
}

@media (max-width: 640px) {
    .hero-bg-video-container video {
        max-width: 100%;
        border-radius: 0;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Login Button Container */
.login-container {
    position: absolute;
    top: 1.5rem; /* 6 * 0.25rem */
    right: 1.5rem;
    z-index: 50;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--white);
    padding: 0.625rem 1.5rem; /* py-2.5 px-6 */
    border-radius: 9999px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content (Center) */
.hero-content-wrapper {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

/* explain-detail 스타일 - 왼쪽 절반 중앙 */
.explain-detail {
    position: absolute;
    left: 25%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46%;
    max-width: 700px;
    color: var(--white);
    pointer-events: auto;
    padding: 2.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    backdrop-filter: blur(8px);
}

.explain-detail h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    text-align: center;
}

.explain-detail p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.explain-img {
    display: inline-block;
    max-height: 1.8em;
    vertical-align: middle;
    border-radius: 4px;
    margin: 0 0.25rem;
}

/* hero-text-group - 비디오 하단 20% 지점부터 */
.hero-text-group {
    position: absolute;
    top: 62%;
    left: 75%;
    transform: translate(-50%, 0);
    text-align: center;
    pointer-events: auto;
    z-index: 25;
}

.hero-text-group p {
    margin: 0 !important;
    padding: 0 !important;
}

/* CTA 버튼 - 비디오와 정렬 */
.btn-cta {
    position: absolute;
    bottom: 10vh;
    left: 75%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background-color: var(--primary-600);
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 40px -10px rgba(99, 102, 241, 0.5);
    pointer-events: auto;
    z-index: 30;
}

.hero-line {
    color: var(--white);
    font-weight: 700;
    line-height: 1.05;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin: 0 !important;
    padding: 0 !important;
}

@media (min-width: 901px) {
    .hero-line {
        line-height: 1.6;
    }
}

.hero-line-1 {
    font-size: 2.5rem;
    font-weight: 900;
}

.hero-line-2 {
    font-size: 1.5rem;
}

.hero-line-3 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

.hero-line-small {
    font-size: 0.5625rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 모바일/좁은 화면 대응 - 비디오 → 타이프라이터 → 설명 → 버튼 (세로 배치) */
@media (max-width: 900px) {
    .hero-bg-video-container video {
        left: 50%;
        top: 12vh;
        transform: translateX(-50%);
        width: 85vw;
        max-width: 450px;
    }

    .explain-detail {
        top: 60vh;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 92vw;
        max-width: 500px;
        padding: 1rem 1.25rem;
        background: rgba(0, 0, 0, 0.7);
    }

    .explain-detail h2 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .explain-detail p {
        font-size: 0.8rem;
        line-height: 1.5;
        margin-bottom: 0.3rem;
    }

    .hero-text-group {
        top: 42vh;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .btn-cta {
        bottom: 4vh;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    .btn-cta:hover {
        transform: translateX(-50%) translateY(-4px);
    }
}

@media (max-width: 640px) {
    .hero-bg-video-container video {
        top: 8vh;
        width: 95vw;
    }

    .explain-detail {
        top: 56vh;
        bottom: auto;
        padding: 0.75rem 1rem;
    }

    .explain-detail h2 {
        font-size: 0.85rem;
    }

    .explain-detail p {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
    }

    .hero-text-group {
        top: 38vh;
        bottom: auto;
    }

    .btn-cta {
        bottom: 2vh;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Typewriter Animation */
.typewriter-container {
    position: relative;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

.typewriter-container-inline {
    position: relative;
    display: inline;
}

.typewriter-placeholder {
    visibility: hidden;
    display: inline;
}

.typewriter-text {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    animation: blink-caret 0.75s step-end infinite;
}

.typewriter-text.done {
    border-right: none;
    animation: none;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: rgba(255, 255, 255, 0.8); }
}

.btn-cta:hover {
    background-color: var(--primary-500);
    box-shadow: 0 0 60px -15px rgba(99, 102, 241, 0.7);
    transform: translateX(-50%) translateY(-4px);
}

.btn-cta i {
    transition: transform 0.3s ease;
}

.btn-cta:hover i {
    transform: translateX(4px);
}

/* =========================================
   Pricing Section
   ========================================= */
.pricing-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background-color: var(--white);
}

@media (min-width: 768px) {
    .pricing-section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

.container {
    max-width: 72rem; /* 6xl */
    margin: 0 auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

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

@media (min-width: 768px) {
    .pricing-header {
        margin-bottom: 3rem;
    }
}

.pricing-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .pricing-header h2 {
        font-size: 1.875rem;
    }
}

.pricing-header p {
    font-size: 0.875rem;
    color: var(--slate-500);
}

@media (min-width: 768px) {
    .pricing-header p {
        font-size: 1rem;
    }
}

/* Grid Layout */
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .pricing-grid {
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .pricing-grid {
        gap: 3rem;
    }
}

/* Pricing Card Base */
.pricing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    border-radius: 1rem;
    transition: border-color 0.3s;
}

@media (min-width: 768px) {
    .pricing-card {
        padding: 2rem;
        border-radius: 1.5rem;
    }
}

/* Free Card */
.card-free {
    background-color: var(--slate-50);
    border: 1px solid var(--slate-200);
}

.card-free:hover {
    border-color: var(--slate-300);
}

/* Paid Card */
.card-paid {
    position: relative;
    background-color: var(--slate-900);
    color: var(--white);
    border: 1px solid var(--slate-800);
    box-shadow: 0 20px 25px -5px rgba(49, 46, 129, 0.2), 0 8px 10px -6px rgba(49, 46, 129, 0.2);
}

.badge-best {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-500);
    color: var(--white);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-bottom-left-radius: 0.75rem;
    border-top-right-radius: 1rem;
}

@media (min-width: 768px) {
    .badge-best {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
        border-top-right-radius: 1.5rem;
    }
}

/* Card Content */
.card-title-group {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .card-title-group {
        margin-bottom: 1.5rem;
    }
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    word-break: keep-all;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 1.25rem;
    }
}

.card-desc {
    font-size: 0.75rem;
    word-break: keep-all;
    margin-bottom: 0.35rem;
}

@media (min-width: 768px) {
    .card-desc {
        font-size: 0.875rem;
    }
}

.card-free .card-title { color: var(--slate-900); }
.card-free .card-desc { color: var(--slate-500); }
.card-paid .card-title { color: var(--white); }
.card-paid .card-desc { color: var(--slate-400); }

/* Price */
.price-group {
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .price-group {
        margin-bottom: 2rem;
        display: flex;
        align-items: baseline;
        gap: 0.25rem;
    }
}

.price-val {
    font-size: 1.5rem;
    font-weight: 700;
}

.price-unit {
    font-size: 1.125rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .price-val { font-size: 2.25rem; }
    .price-unit { font-size: 1.25rem; }
}

.card-free .price-val, .card-free .price-unit { color: var(--slate-900); }
.card-paid .price-val, .card-paid .price-unit { color: var(--white); }

.price-period {
    font-size: 0.75rem;
    color: var(--slate-400);
}

@media (min-width: 768px) {
    .price-period { font-size: 0.875rem; }
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .feature-list {
        margin-bottom: 2rem;
        gap: 1rem;
    }
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .feature-item {
        gap: 0.75rem;
    }
}

.feature-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

@media (min-width: 768px) {
    .feature-icon {
        width: 1.25rem;
        height: 1.25rem;
    }
}

.feature-text {
    font-size: 0.75rem;
    line-height: 1.25;
}

@media (min-width: 768px) {
    .feature-text {
        font-size: 1rem;
    }
}

/* Specific Feature Colors */
.card-free .text-active { color: var(--slate-700); }
.card-free .text-inactive { color: var(--slate-400); }
.card-free .icon-check { color: #22c55e; } /* green-500 */
.card-free .icon-x { color: var(--slate-400); }

.card-paid .text-active { color: var(--slate-200); }
.card-paid .icon-check { color: var(--primary-400); }

/* Buttons in Card */
.btn-card {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    margin-top: auto;
}

@media (min-width: 768px) {
    .btn-card {
        padding: 1rem;
        font-size: 1rem;
    }
}

.card-free .btn-card {
    background-color: var(--white);
    border: 1px solid var(--slate-300);
    color: var(--slate-700);
}

.card-free .btn-card:hover {
    background-color: var(--slate-100);
}

.card-paid .btn-card {
    background-color: var(--primary-600);
    color: var(--white);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.card-paid .btn-card:hover {
    background-color: var(--primary-500);
}

/* Payment Buttons (Card + KakaoPay) */
.payment-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

@media (min-width: 768px) {
    .payment-buttons {
        gap: 0.75rem;
    }
}

.btn-payment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .btn-payment {
        padding: 1rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }
}

.btn-card-pay {
    background-color: #2563eb;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-card-pay:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-kakao-pay {
    background-color: #fee500;
    color: #3c1e1e;
    position: relative;
}

.btn-kakao-pay:hover:not(:disabled) {
    background-color: #fdd800;
    transform: translateY(-1px);
}

.btn-kakao-pay:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-kakao-pay .coming-soon {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ef4444;
    color: white;
    font-size: 0.5rem;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .btn-kakao-pay .coming-soon {
        font-size: 0.6rem;
        padding: 2px 6px;
    }
}

.payment-warning {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 0.5rem;
    color: #fca5a5;
    font-size: 0.7rem;
    text-align: center;
}

@media (min-width: 768px) {
    .payment-warning {
        font-size: 0.75rem;
        padding: 0.625rem;
    }
}


/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--slate-950);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid var(--slate-900);
    color: var(--slate-400);
    font-size: 0.6875rem; /* 11px */
}

@media (min-width: 768px) {
    .footer {
        font-size: 0.75rem; /* text-xs */
    }
}

.footer-container {
    max-width: 80rem; /* 7xl */
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 56rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.brand-logo span {
    font-weight: 700;
    font-size: 0.875rem;
}

.brand-info {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.75rem;
    row-gap: 0.25rem;
    line-height: 1.25;
}

.separator {
    color: var(--slate-800);
}

.copyright {
    color: var(--slate-600);
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--slate-400);
}

.footer-links a {
    color: var(--slate-400);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--white);
    transition: color 0.2s;
}

.link-separator {
    width: 1px;
    height: 0.75rem;
    background-color: var(--slate-800);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}
