/* ============================================
   로또 비서 - Landing Page Stylesheet
   디자인: 딥블루 + 골드 다크 테마
   ============================================ */

/* === CSS 변수 (Design Tokens) === */
:root {
    /* 메인 컬러 */
    --color-primary: #1e3a8a;
    --color-primary-light: #2563eb;
    --color-primary-dark: #172554;
    --color-accent: #f59e0b;
    --color-accent-light: #fbbf24;
    --color-accent-dark: #d97706;

    /* 배경 컬러 */
    --bg-dark: #0b1120;
    --bg-section: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #273549;

    /* 텍스트 컬러 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* 그라디언트 */
    --gradient-hero: linear-gradient(135deg, #0b1120 0%, #1e3a8a 50%, #172554 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b, #f97316);
    --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);

    /* 그림자 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.15);

    /* 사이즈 */
    --header-height: 70px;
    --max-width: 1200px;
    --border-radius: 16px;
    --border-radius-sm: 10px;

    /* 트랜지션 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}


/* === 리셋 & 기본 스타일 === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* === 공통 유틸리티 === */
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* 페이드인 애니메이션 클래스 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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


/* ===================================================
   1. 헤더 (Header)
   =================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background var(--transition-normal),
        box-shadow var(--transition-normal);
}

.header--scrolled {
    background: rgba(11, 17, 32, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.header__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 로고 */
.header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    z-index: 1001;
}

.header__logo-icon {
    font-size: 1.5rem;
}

.header__logo-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 네비게이션 */
.header__nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header__nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.3rem 0;
    transition: color var(--transition-fast);
}

.header__nav-link:hover {
    color: var(--text-primary);
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-normal);
}

.header__nav-link:hover::after {
    width: 100%;
}

/* CTA 네비게이션 링크 */
.header__nav-link--cta {
    color: var(--bg-dark);
    background: var(--gradient-accent);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
}

.header__nav-link--cta::after {
    display: none;
}

.header__nav-link--cta:hover {
    color: var(--bg-dark);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* 햄버거 메뉴 */
.header__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.header__hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform var(--transition-normal),
        opacity var(--transition-normal);
}

/* 햄버거 활성화 상태 */
.header__hamburger.active .header__hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__hamburger.active .header__hamburger-line:nth-child(2) {
    opacity: 0;
}

.header__hamburger.active .header__hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ===================================================
   2. 히어로 섹션 (Hero)
   =================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

/* 배경 파티클 장식 */
.hero__particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero__particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 20s infinite ease-in-out;
}

.hero__particle--1 {
    width: 300px;
    height: 300px;
    background: var(--color-accent);
    top: -100px;
    right: -50px;
    animation-delay: 0s;
}

.hero__particle--2 {
    width: 200px;
    height: 200px;
    background: var(--color-primary-light);
    bottom: 10%;
    left: -80px;
    animation-delay: -5s;
}

.hero__particle--3 {
    width: 150px;
    height: 150px;
    background: var(--color-accent-light);
    top: 40%;
    right: 20%;
    animation-delay: -10s;
}

.hero__particle--4 {
    width: 100px;
    height: 100px;
    background: var(--color-primary-light);
    top: 20%;
    left: 30%;
    animation-delay: -3s;
}

.hero__particle--5 {
    width: 250px;
    height: 250px;
    background: var(--color-accent);
    bottom: -100px;
    right: 40%;
    animation-delay: -8s;
}

.hero__particle--6 {
    width: 80px;
    height: 80px;
    background: var(--color-primary-light);
    top: 60%;
    left: 60%;
    animation-delay: -12s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(15px, 10px) scale(1.05);
    }
}

/* 히어로 컨테이너 */
.hero__container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* 히어로 콘텐츠 */
.hero__content {
    flex: 1;
}

.hero__headline {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero__highlight {
    color: var(--color-accent);
    position: relative;
}

.hero__subtext {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

/* 다운로드 버튼 */
.hero__cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: transform var(--transition-fast),
        box-shadow var(--transition-fast);
    min-width: 190px;
}

.hero__btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero__btn--ios {
    background: var(--text-primary);
    color: var(--bg-dark);
}

.hero__btn--android {
    background: var(--gradient-accent);
    color: var(--bg-dark);
}

.hero__btn-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.hero__btn-text small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.7;
    font-weight: 400;
}

.hero__btn-text strong {
    font-weight: 700;
    font-size: 1.05rem;
}

/* 앱 목업 */
.hero__mockup {
    flex-shrink: 0;
}

.hero__phone {
    width: 280px;
    height: 560px;
    background: var(--bg-card);
    border-radius: 38px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg),
        0 0 60px rgba(245, 158, 11, 0.1);
    animation: phonePulse 4s ease-in-out infinite;
}

@keyframes phonePulse {

    0%,
    100% {
        box-shadow: var(--shadow-lg), 0 0 60px rgba(245, 158, 11, 0.1);
    }

    50% {
        box-shadow: var(--shadow-lg), 0 0 80px rgba(245, 158, 11, 0.2);
    }
}

.hero__phone-notch {
    width: 120px;
    height: 24px;
    background: var(--bg-dark);
    border-radius: 0 0 18px 18px;
    margin: 0 auto 12px;
}

.hero__phone-screen {
    background: linear-gradient(180deg, var(--bg-section) 0%, var(--bg-dark) 100%);
    border-radius: 26px;
    height: calc(100% - 36px);
    padding: 30px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.hero__phone-header {
    margin-bottom: 20px;
}

.hero__phone-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
}

.hero__phone-balls {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero__ball {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    animation: ballBounce 2s ease-in-out infinite;
}

.hero__ball--1 {
    background: #f97316;
    animation-delay: 0s;
}

.hero__ball--2 {
    background: #3b82f6;
    animation-delay: 0.15s;
}

.hero__ball--3 {
    background: #ef4444;
    animation-delay: 0.3s;
}

.hero__ball--4 {
    background: #22c55e;
    animation-delay: 0.45s;
}

.hero__ball--5 {
    background: #8b5cf6;
    animation-delay: 0.6s;
}

.hero__ball--6 {
    background: #ec4899;
    animation-delay: 0.75s;
}

@keyframes ballBounce {

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

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

.hero__phone-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.hero__phone-bar {
    width: 80%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    margin-bottom: 12px;
}

.hero__phone-bar--short {
    width: 55%;
}


/* ===================================================
   3. 서비스 소개 섹션 (About)
   =================================================== */
.about {
    padding: 6rem 1.5rem;
    background: var(--bg-section);
    position: relative;
}

.about__container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.about__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.about__card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform var(--transition-normal),
        box-shadow var(--transition-normal),
        border-color var(--transition-normal);
}

.about__card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(245, 158, 11, 0.2);
}

.about__card-icon {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
}

.about__card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--color-accent);
}

.about__card-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about__disclaimer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 1.2rem 1.5rem;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-radius: var(--border-radius-sm);
    max-width: 700px;
    margin: 0 auto;
}


/* ===================================================
   4. 주요 기능 섹션 (Features)
   =================================================== */
.features {
    padding: 6rem 1.5rem;
    background: var(--bg-dark);
}

.features__container {
    max-width: var(--max-width);
    margin: 0 auto;
}

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

.features__card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    transition: transform var(--transition-normal),
        box-shadow var(--transition-normal),
        border-color var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.features__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    transform-origin: left;
}

.features__card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(245, 158, 11, 0.15);
}

.features__card:hover::before {
    transform: scaleX(1);
}

.features__card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 14px;
}

.features__card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.features__card-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}


/* ===================================================
   5. 사용 방법 섹션 (How to Use)
   =================================================== */
.howto {
    padding: 6rem 1.5rem;
    background: var(--bg-section);
}

.howto__container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.howto__steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.howto__step {
    flex: 1;
    max-width: 300px;
    text-align: center;
    padding: 2rem 1.5rem;
}

.howto__step-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-accent);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 1rem;
}

.howto__step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.howto__step-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.howto__step-connector {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin-top: 4rem;
    flex-shrink: 0;
}


/* ===================================================
   6. 다운로드 섹션 (Download CTA)
   =================================================== */
.download {
    padding: 6rem 1.5rem;
    background: var(--gradient-hero);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.download__container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.download__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.download__text {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.download__cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}


/* ===================================================
   7. 푸터 (Footer)
   =================================================== */
.footer {
    padding: 3rem 1.5rem 2rem;
    background: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer__logo {
    font-size: 1.2rem;
    font-weight: 700;
}

.footer__tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-accent);
}

.footer__bottom {
    text-align: center;
}

.footer__contact {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer__email {
    color: var(--color-accent);
}

.footer__email:hover {
    text-decoration: underline;
}

.footer__notice {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer__copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}


/* ===================================================
   반응형 디자인 (Responsive)
   =================================================== */

/* 태블릿 (768px 이하) */
@media (max-width: 768px) {

    /* 헤더 - 햄버거 메뉴 활성화 */
    .header__hamburger {
        display: flex;
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(11, 17, 32, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: calc(var(--header-height) + 2rem) 2rem 2rem;
        transition: right var(--transition-normal);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
    }

    .header__nav.active {
        right: 0;
    }

    .header__nav-list {
        flex-direction: column;
        gap: 0;
    }

    .header__nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .header__nav-link::after {
        display: none;
    }

    .header__nav-link--cta {
        text-align: center;
        margin-top: 1rem;
    }

    /* 히어로 */
    .hero__container {
        flex-direction: column;
        text-align: center;
    }

    .hero__subtext br {
        display: none;
    }

    .hero__cta {
        justify-content: center;
    }

    .hero__phone {
        width: 230px;
        height: 460px;
    }

    .hero__ball {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    /* 서비스 소개 */
    .about__grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto 3rem;
    }

    .about__card-desc br {
        display: none;
    }

    /* 주요 기능 */
    .features__grid {
        grid-template-columns: 1fr;
    }

    /* 사용 방법 */
    .howto__steps {
        flex-direction: column;
        align-items: center;
    }

    .howto__step-connector {
        width: 2px;
        height: 40px;
        margin: 0;
        background: linear-gradient(180deg, transparent, var(--color-accent), transparent);
    }

    /* 푸터 */
    .footer__top {
        flex-direction: column;
        text-align: center;
    }

    .footer__links {
        justify-content: center;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    .hero {
        padding-top: calc(var(--header-height) + 1.5rem);
    }

    .hero__headline {
        font-size: 1.9rem;
    }

    .hero__btn {
        min-width: 160px;
        padding: 0.75rem 1.2rem;
    }

    .hero__btn-text strong {
        font-size: 0.95rem;
    }

    .hero__phone {
        width: 200px;
        height: 400px;
        border-radius: 30px;
    }

    .hero__phone-notch {
        width: 100px;
        height: 22px;
    }

    .hero__ball {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }

    .features__card {
        padding: 1.8rem;
    }

    .howto__step {
        padding: 1.5rem 1rem;
    }
}

/* 오버레이 배경 (모바일 메뉴 열릴 때) */
.body--nav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}