/* ============================================
   바짝바짝 Landing Page
   ============================================ */

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", sans-serif;
    font-weight: 400;
    color: #1A1A1A;
    line-height: 1.5;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Variables */
:root {
    --purple: #7C71F5;
    --purple-light: #B0A7FF;
    --purple-bg: #E8E6FB;
    --purple-bg-2: #EEEDFB;
    --blue-bg: #E6EEFA;
    --blue-bg-2: #EDF2FA;
    --gray-bg: #F1F2F4;
    --page-bg: #F7F8FB;
    --text: #1A1A1A;
    --text-sub: #6B6B6B;
    --border-radius: 24px;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    padding: 18px 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0; /* 정식 앱 이름이 길어도 flex 안에서 줄바꿈될 수 있게 */
}

.logo-icon {
    height: 40px;
    width: 40px;
    border-radius: 11px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text);
    /* 정식 앱 이름 전체(예: "Screen Distance Monitor & Alert",
       "护眼卫士 - 屏幕距离提醒·用眼距离监测")를 그대로 표시 — 잘리지 않고
       필요하면 2줄로 자연스럽게 줄바꿈 */
    white-space: normal;
    max-width: 320px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
    padding: 80px 0 120px;
    background: linear-gradient(180deg, #ffffff 0%, #F4F5FB 100%);
    overflow: hidden;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
}

.hero-text {
    grid-column: 1;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.hero-title .dim {
    color: var(--text);
}

.hero-title .point {
    color: var(--purple);
}

.hero-side {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 32px;
    text-align: right;
    padding-top: 12px;
}

.hero-desc {
    font-size: 18px;
    line-height: 1.7;
    color: #2a2a2a;
    font-weight: 500;
}

.store-buttons {
    display: flex;
    gap: 12px;
}

.store-btn img {
    height: 44px;
    width: auto;
}

.hero-mockup {
    grid-column: 1 / 3;
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.hero-mockup img {
    max-width: 480px;
    width: 100%;
    filter: drop-shadow(0 20px 60px rgba(124, 113, 245, 0.18));
}

/* ============================================
   Common Section Title
   ============================================ */
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--text);
}

.section-title .point {
    color: var(--purple);
    font-weight: 700;
}

.big-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--text);
    text-align: center;
}

.big-title .point {
    color: var(--purple);
}

.point {
    color: var(--purple);
}

/* ============================================
   Pain Section
   ============================================ */
.pain {
    padding: 120px 0;
    background: #ffffff;
}

.pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 64px;
}

.pain-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 36px 28px 40px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(124, 113, 245, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 320px;
}

.card-num {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-top: 4px;
}

.card-desc {
    font-size: 15px;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 8px;
}

.pain-ico {
    width: 110px;
    height: auto;
    margin-top: auto;
}

/* ============================================
   Solution Header
   ============================================ */
.solution-header {
    padding: 140px 0 100px;
    background: var(--page-bg);
}

/* ============================================
   Feature Sections
   ============================================ */
.feature {
    padding: 80px 0 100px;
    background: var(--page-bg);
}

.feature-head {
    text-align: center;
    margin-bottom: 56px;
}

.feature-title {
    font-family: 'Inter', 'Pretendard', sans-serif;
    font-size: 44px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.feature-sub {
    margin-top: 12px;
    font-size: 18px;
    color: var(--purple);
    font-weight: 600;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.feature-grid-2 .feature-card.wide {
    grid-column: 1 / 3;
    min-height: 360px;
    flex-direction: row;
    align-items: stretch;
    padding-right: 0;
}

.feature-grid-2 .feature-card.wide .card-content {
    flex: 1;
    padding-bottom: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-grid-2 .feature-card.wide .card-mockup {
    align-self: flex-end;
    margin-top: 0;
    width: auto;
    max-width: 480px;
}

.feature-card {
    position: relative;
    border-radius: var(--border-radius);
    padding: 36px 36px 0;
    min-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feature-card.card-blue {
    background: var(--blue-bg);
}

.feature-card.card-blue:nth-child(odd) {
    background: var(--blue-bg-2);
}

.feature-card.card-gray {
    background: var(--gray-bg);
}

.feature-card.card-purple {
    background: var(--purple-bg-2);
}

.card-content {
    z-index: 1;
}

.tag {
    display: inline-block;
    align-self: flex-start;
    width: fit-content;
    background: #ffffff;
    color: var(--text);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.feature-card-title {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
    letter-spacing: -0.01em;
}

.feature-card-title.point {
    color: var(--purple);
}

.card-mockup {
    margin-top: auto;
    align-self: center;
    max-width: 500px;
    width: 100%;
}

/* ============================================
   Audience (Accordion) Section
   ============================================ */
.audience {
    padding: 100px 0 120px;
    background: var(--page-bg);
}

.audience-inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
    align-items: start;
}

.audience-title {
    text-align: left;
}

.audience-title .big-title {
    text-align: left;
    font-size: 40px;
    line-height: 1.4;
}

.audience-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 26px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.accordion-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    gap: 16px;
}

.accordion-item summary::-webkit-details-marker {
    display: none;
}

.acc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.acc-icon {
    width: 28px;
    height: 28px;
    background: #1A1A1A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    display: none;
}

.acc-icon img {
    width: 14px;
    height: 14px;
    transform: rotate(180deg);
    filter: brightness(0) invert(1);
}

.accordion-item:not([open]) .acc-icon img {
    transform: rotate(0deg);
}

.acc-body {
    margin-top: 14px;
    font-size: 14.5px;
    color: var(--text-sub);
    line-height: 1.65;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    padding: 60px 0 120px;
    background: linear-gradient(180deg, var(--page-bg) 0%, #DCDFFA 100%);
}

.cta-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 56px 64px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    box-shadow: 0 12px 40px rgba(124, 113, 245, 0.10);
}

.cta-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    letter-spacing: -0.01em;
}

.cta-desc {
    margin-top: 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.cta-text .store-buttons {
    margin-top: 28px;
}

.cta-icon img {
    width: 130px;
    height: auto;
}

/* ============================================
   Others Section
   ============================================ */
.others {
    padding: 100px 0 120px;
    background: #ffffff;
}

.others-title {
    margin-bottom: 56px;
}

.others-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.other-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

.other-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.other-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.other-desc {
    font-size: 14px;
    color: var(--text-sub);
}

.other-stores {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.other-store-btn img {
    height: 34px;
    width: auto;
}

.other-store-btn {
    transition: opacity 0.2s ease;
}

.other-store-btn:hover {
    opacity: 0.75;
}

.other-ico {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    flex-shrink: 0;
    object-fit: cover;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 36px 0;
    background: #F7F8FB;
    border-top: 1px solid #ECECEC;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

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

.footer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-sub);
}

.footer-info strong {
    color: var(--text);
    font-weight: 600;
}

.footer-info .sep {
    color: #D0D0D0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .hero-title { font-size: 48px; }
    .big-title { font-size: 36px; }
    .feature-title { font-size: 36px; }
    .feature-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .feature-grid-2 .feature-card.wide { grid-column: 1 / 3; grid-row: auto; }
    .audience-inner { grid-template-columns: 1fr; gap: 32px; }
    .audience-title .big-title { text-align: center; }
}

@media (max-width: 768px) {
    .header { padding: 14px 0; }
    .header-inner { padding: 0 20px; flex-wrap: wrap; row-gap: 10px; }
    .logo-icon { height: 32px; width: 32px; }
    .logo-text { font-size: 15px; max-width: 220px; }

    .hero { padding: 56px 0 80px; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-text, .hero-side { grid-column: 1; }
    .hero-side { align-items: flex-start; text-align: left; }
    .hero-title { font-size: 36px; white-space: normal; }
    .hero-desc { font-size: 16px; }
    .hero-mockup { margin-top: 40px; }
    .hero-mockup img { max-width: 260px; display: block;}

    .pain { padding: 80px 0; }
    .pain-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 40px; }
    .section-title { font-size: 26px; }

    .solution-header { padding: 80px 0 60px; }
    .big-title { font-size: 28px; }

    .feature { padding: 60px 0 80px; }
    .feature-title { font-size: 30px; }
    .feature-grid, .feature-grid-2 { grid-template-columns: 1fr; }
    .feature-card { padding: 28px 24px 0; min-height: 280px; }
    .feature-card-title { font-size: 19px; }
    .card-mockup { max-width: 240px; }

    /* wide 카드도 일반 카드와 동일한 세로 레이아웃(이미지 하단 중앙) */
    .feature-grid-2 .feature-card.wide {
        grid-column: auto;
        flex-direction: column;
        min-height: 280px;
        padding-right: 24px;
    }
    .feature-grid-2 .feature-card.wide .card-content {
        display: block;
        flex: none;
        padding-bottom: 0;
    }
    .feature-grid-2 .feature-card.wide .card-mockup {
        align-self: center;
        margin-top: auto;
        width: 100%;
        max-width: 240px;
        max-width:100%;
    }

    .audience { padding: 60px 0 80px; }
    .audience-title .big-title { font-size: 26px; }
    .accordion-item { padding: 18px 20px; }
    .acc-title { font-size: 16px; }

    .cta { padding: 40px 0 80px; }
    .cta-card { padding: 36px 28px; grid-template-columns: 1fr; text-align: center; }
    .cta-text .store-buttons { justify-content: center; }
    .cta-title { font-size: 24px; }
    .cta-icon { display: flex; justify-content: center; }
    .cta-icon img { width: 100px; }

    .others { padding: 60px 0 80px; }
    .other-card { padding: 18px 20px; }
    .other-name { font-size: 17px; }
    .other-ico { width: 60px; height: 60px; }
    .other-store-btn img { height: 30px; }

    .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer-info { font-size: 12px; gap: 8px; }

    .lang-dd summary { padding: 6px 12px; font-size: 12px; }
}

/* ============================================
   Language Switch (다국어 전환 · 드롭다운)
   ============================================ */
.lang-switch {
    margin-left: auto;
}

.lang-dd {
    position: relative;
}

.lang-dd summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 10px;
    border: 1px solid #E5E5EC;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    line-height: 1;
    white-space: nowrap;
    background: #ffffff;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-flag {
    font-size: 16px;
    line-height: 1;
}

.lang-dd summary .lang-label {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-dd summary::-webkit-details-marker { display: none; }

.lang-dd summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.15s ease;
}

.lang-dd[open] summary,
.lang-dd summary:hover {
    border-color: var(--purple-light);
    color: var(--purple);
}

.lang-dd[open] summary::after {
    transform: rotate(-135deg) translateY(-1px);
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    min-width: 168px;
    max-height: min(60vh, 380px);
    overflow-y: auto;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #EDEDF2;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(26, 26, 26, 0.12);
    z-index: 200;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease;
}

.lang-menu a .lang-flag {
    font-size: 17px;
}

.lang-menu a:hover {
    background: var(--purple-bg-2);
    color: var(--purple);
}

.lang-menu a.is-active {
    background: var(--purple);
    color: #ffffff;
}

/* ============================================
   Scroll Reveal (로케일별 opt-in: body.reveal-on 이 있을 때만 작동.
   한국어로 먼저 확인 → 승인되면 build.mjs 의 REVEAL_LOCALES 를 전체로 확장)
   ============================================ */
body.reveal-on [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

body.reveal-on [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 그리드·리스트 안에서는 순서대로 살짝씩 늦게 나타나도록 단계별 지연을 준다 */
body.reveal-on .hero-inner > [data-reveal]:nth-child(1) { --reveal-delay: 0s; }
body.reveal-on .hero-inner > [data-reveal]:nth-child(2) { --reveal-delay: 0.12s; }
body.reveal-on .hero-inner > [data-reveal]:nth-child(3) { --reveal-delay: 0.24s; }

body.reveal-on .pain-grid > [data-reveal]:nth-child(1),
body.reveal-on .feature-grid > [data-reveal]:nth-child(1),
body.reveal-on .others-list > [data-reveal]:nth-child(1) { --reveal-delay: 0s; }
body.reveal-on .pain-grid > [data-reveal]:nth-child(2),
body.reveal-on .feature-grid > [data-reveal]:nth-child(2),
body.reveal-on .others-list > [data-reveal]:nth-child(2) { --reveal-delay: 0.1s; }
body.reveal-on .pain-grid > [data-reveal]:nth-child(3),
body.reveal-on .feature-grid > [data-reveal]:nth-child(3),
body.reveal-on .others-list > [data-reveal]:nth-child(3) { --reveal-delay: 0.2s; }

body.reveal-on .audience-list > [data-reveal]:nth-child(1) { --reveal-delay: 0s; }
body.reveal-on .audience-list > [data-reveal]:nth-child(2) { --reveal-delay: 0.08s; }
body.reveal-on .audience-list > [data-reveal]:nth-child(3) { --reveal-delay: 0.16s; }
body.reveal-on .audience-list > [data-reveal]:nth-child(4) { --reveal-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    body.reveal-on [data-reveal] {
        transition: none;
        opacity: 1;
        transform: none;
    }
}
