/* "로컬 원장(元帳)" 브랜드 — frontend/styles.css 와 동일한 디자인 시스템을 랜딩 페이지에도 적용 */
:root {
    --bg-color: #fffcf5;
    --bg-light: #f5f0e4;
    --bg-dark: #1c1a14;
    --text-main: #211f1a;
    --text-muted: #6b6558;
    --accent-color: #b23a2d;      /* 잉크 스탬프 레드 (구매 CTA) */
    --accent-hover: #8f2c22;
    --ledger: #3c6b4f;            /* 장부 그린 (로컬/오프라인 강조) */
    --border-color: #ddd0b0;
    --card-shadow: 0 10px 30px rgba(33, 31, 26, 0.08);
    --green: #3c6b4f;
    --font-display: 'Noto Serif KR', 'Pretendard', serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-accent { color: var(--accent-color); }
.text-green { color: var(--green); }
.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); }
.text-white { color: #fff; }
.w-100 { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.btn-primary {
    background: var(--accent-color);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}
.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-light);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-links {
    display: flex;
    gap: 30px;
    font-weight: 500;
}
.nav-links a:hover {
    color: var(--accent-color);
}
.nav-btn {
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.2s;
    white-space: nowrap;
}
.nav-btn:hover { background: var(--accent-hover); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.lang-switch {
    display: flex;
    gap: 2px;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 3px;
}
.lang-btn {
    border: none;
    background: transparent;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
.lang-btn:hover { color: var(--text-main); }
.lang-btn.active {
    background: var(--accent-color);
    color: white;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
}
.hero-content {
    flex: 1;
    max-width: 600px;
}
.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(60, 107, 79, 0.12);
    color: var(--ledger);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.geo-heading {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}
.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), #e2695c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}
.cta-group {
    display: flex;
    gap: 15px;
}
.hero-image-placeholder {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}
.hero-media {
    width: 480px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35);
    object-fit: cover;
    display: block;
}

/* AdSense Container */
.adsense-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}
.ad-placeholder {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    text-align: center;
    padding: 40px;
    border-radius: 8px;
}

/* GEO Section */
.geo-section {
    padding: 80px 0;
}
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    letter-spacing: -0.01em;
}
.geo-core-answer {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-hover);
    line-height: 1.6;
    margin-bottom: 50px;
    padding-left: 20px;
    border-left: 5px solid var(--accent-color);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.stat-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}
.stat-number {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1;
}
.stat-desc {
    color: var(--text-muted);
}
.stat-cite {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    color: #94a3b8;
    font-style: normal;
}

/* Features */
.features-section { padding: 100px 0; }
.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}
.feature-icon {
    width: 60px; height: 60px;
    background: rgba(60, 107, 79, 0.1);
    color: var(--ledger);
    font-size: 1.5rem;
    display: flex; justify-content: center; align-items: center;
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
}
.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.trust-badge-float {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
    float: right;
    margin: 0 0 20px 30px;
}
.feature-text h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}
.feature-text p {
    color: var(--text-muted);
}

/* Buy Section */
.buy-section { padding: 100px 0; }
.buy-heading { font-size: 2.5rem; margin-bottom: 20px; }
.buy-subtitle {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.pricing-card {
    background: white;
    color: var(--text-main);
    max-width: 450px;
    margin: 0 auto;
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    text-align: left;
}
.pricing-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 15px; }
.pricing-card .price { font-family: var(--font-mono); font-size: 3.2rem; font-weight: 700; margin-bottom: 30px; color: var(--accent-hover); }
.pricing-features li {
    margin-bottom: 15px;
    display: flex; gap: 10px; align-items: center;
}
.pricing-features { margin-bottom: 40px; }
.mobile-buy-warning { display: none; }

/* FAQ Accordion */
.faq-section { padding: 80px 0; }
.accordion {
    max-width: 800px;
    margin: 40px auto 0;
}
.accordion-item {
    border-bottom: 1px solid var(--border-color);
}
.accordion-header {
    width: 100%;
    text-align: left;
    padding: 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
}
.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
}
.accordion-header.active::after {
    content: '-';
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-muted);
}
.accordion-content p { padding: 20px 0; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
}
.modal-box {
    background: white; padding: 40px; border-radius: 16px;
    width: 100%; max-width: 500px; position: relative;
}
.close-btn {
    position: absolute; top: 20px; right: 20px; font-size: 1.5rem; cursor: pointer;
}

/* Document Style Pages (Privacy, Guide) */
.doc-section { padding: 100px 20px; max-width: 800px; margin: 0 auto; }
.doc-section h1 { font-family: var(--font-display); font-weight: 900; font-size: 2.5rem; margin-bottom: 20px; }
.doc-section h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; margin: 40px 0 15px; }
.doc-section p, .doc-section li { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 15px; }
.doc-section ul { list-style: disc; padding-left: 20px; margin-bottom: 20px; }

/* Footer */
.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 20px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}
.footer-left p { color: var(--text-muted); margin-top: 10px; max-width: 300px; text-wrap: balance; }
.footer-links {
    display: flex; gap: 30px; align-items: center;
}
.footer-links a { color: var(--text-muted); font-weight: 500; }
.footer-links a:hover { color: var(--accent-color); }
.footer-bottom {
    text-align: center;
    color: #94a3b8;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* 다국어 줄바꿈 최적화 */
/* 제목은 언어/길이에 관계없이 균형 잡힌 줄바꿈 (지원 브라우저 한정, 미지원 시 기본 줄바꿈으로 자연 대체) */
h1, h2, h3, .buy-heading {
    text-wrap: balance;
}
/* 긴 단어/URL이 있어도 레이아웃이 깨지지 않도록 공통 보호 */
.hero-subtitle, .geo-core-answer, .stat-desc, .feature-text p,
.accordion-content p, .footer-left p, .badge,
.doc-section p, .doc-section li {
    overflow-wrap: break-word;
}
/* 한국어는 띄어쓰기 단위(단어 중간 X)로만 줄바꿈되어야 가독성이 좋음.
   일본어는 공백이 없는 언어라 keep-all을 걸면 줄바꿈이 아예 안 되고 넘쳐버리므로 제외,
   영어는 기본 동작(단어 단위 줄바꿈)이 이미 자연스러워서 별도 처리 불필요. */
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3, :lang(ko) h4,
:lang(ko) p, :lang(ko) li, :lang(ko) span, :lang(ko) a, :lang(ko) button {
    word-break: keep-all;
}
/* 일본어는 Pretendard/Noto Serif KR에 한자·가나 글리프가 부족해 Noto Sans JP로 전환 */
:lang(ja) body, :lang(ja) { font-family: 'Noto Sans JP', 'Pretendard', sans-serif; }
:lang(ja) .geo-heading, :lang(ja) .section-title, :lang(ja) .buy-heading,
:lang(ja) .doc-section h1, :lang(ja) .doc-section h2 {
    font-family: 'Noto Sans JP', 'Pretendard', sans-serif;
    font-weight: 900;
}

/* Mobile */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding: 40px 20px; }
    .hero-image-placeholder { margin-top: 50px; justify-content: center; }
    .geo-heading { font-size: 2.5rem; }
    .cta-group { justify-content: center; flex-direction: column; }
    .stats-grid, .feature-row, .footer-content { grid-template-columns: 1fr; flex-direction: column; text-align: center; }
    .footer-links { flex-direction: column; gap: 15px; margin-top: 30px; }
    .nav-links { display: none; }
    .navbar { padding: 14px 20px; flex-wrap: wrap; justify-content: center; gap: 10px 16px; }
    .nav-brand { font-size: 1.2rem; }
    .nav-right { gap: 10px; }
    .nav-btn { padding: 8px 16px; font-size: 0.9rem; }
    .trust-badge-float {
        float: none;
        display: block;
        margin: 0 auto 20px;
    }
    .geo-core-answer { border-left: none; padding-left: 0; text-align: center; }

    /* 데스크톱 기준 여백(100px)이 모바일에선 본문 대비 과도하게 커서 검정 배경만 텅 비어
       보이는 문제 수정 — 아래 섹션(FAQ 등)과 비율이 맞도록 줄임 */
    .buy-section { padding: 60px 0; }
    .buy-heading { font-size: 1.8rem; }
    .buy-subtitle { font-size: 1rem; margin-bottom: 30px; }
    .pricing-card { padding: 30px 24px; max-width: 100%; }
    .faq-section { padding: 50px 0; }

    /* Windows 전용 프로그램인데 휴대폰에서 결제해버리는 걸 막기 위한 경고 — 데스크톱에선
       불필요해서 모바일 너비에서만 노출 */
    .mobile-buy-warning {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        text-align: left;
        background: rgba(178, 58, 45, 0.1);
        border: 1px solid rgba(178, 58, 45, 0.3);
        border-radius: 10px;
        padding: 12px 14px;
        margin-top: 20px;
        font-size: 0.85rem;
        line-height: 1.5;
        color: var(--accent-hover);
    }
    .mobile-buy-warning i { margin-top: 2px; flex-shrink: 0; }
}
