:root {
    --bg: #0A0A0A;
    --bg-card: #141414;
    --bg-hover: #1A1A1A;
    --text: #F5F5F5;
    --text-secondary: #888;
    --text-tertiary: #5C5C5C;
    --border: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.1);
    --accent: #A78BFA;
    --accent-2: #F472B6;
    --accent-rgb: 167, 139, 250;
    --radius: 16px;
    --max-w: 1080px;
    --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Hiragino Sans', 'Noto Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
    transition: opacity 0.2s;
}
html.i18n-pending body { opacity: 0; }
html[lang="ko"] body { word-break: keep-all; }

a { color: inherit; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,10,10,0.8);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: var(--nav-h);
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text);
    font-weight: 700; font-size: 1.05rem;
}
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
    text-decoration: none; color: var(--text-secondary);
    font-size: 0.9rem; font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.lang-switcher {
    display: flex; gap: 2px;
    background: var(--bg-card); padding: 4px; border-radius: 8px;
}
.lang-btn {
    background: none; border: none; padding: 4px 10px; border-radius: 6px;
    cursor: pointer; font-weight: 500; font-size: 0.8rem;
    color: var(--text-tertiary); transition: all 0.2s; font-family: inherit;
}
.lang-btn.active { background: var(--bg-hover); color: var(--text); }
.lang-btn:hover:not(.active) { color: var(--text-secondary); }
.mobile-menu-btn {
    display: none; background: none; border: none; cursor: pointer;
    color: var(--text);
    min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
}
.mobile-menu-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.mobile-menu {
    display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; z-index: 99;
    transform: translateY(-10px); opacity: 0;
    transition: transform 0.3s, opacity 0.3s; pointer-events: none;
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a {
    display: block; padding: 14px 0; text-decoration: none;
    color: var(--text); font-weight: 500; font-size: 1rem;
    border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

/* Hero */
.hero { position: relative; padding: 160px 0 80px; text-align: center; overflow: hidden; }
.hero::before {
    content: ''; position: absolute; top: -120px; left: 50%;
    width: 640px; height: 640px; transform: translateX(-50%);
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.14) 0%, rgba(var(--accent-rgb), 0) 65%);
    pointer-events: none; z-index: -1;
}
.hero-sub {
    font-size: 0.9rem; font-weight: 500;
    color: var(--accent); margin-bottom: 20px;
    letter-spacing: 0.05em;
}
.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 3.5rem);
    font-weight: 700; line-height: 1.2;
    margin-bottom: 20px; letter-spacing: -0.02em;
}
.grad {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 1.1rem; color: var(--text-secondary);
    max-width: 520px; margin: 0 auto 40px;
}
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-inner { position: relative; }
.hero-icons { position: absolute; inset: -40px 0 0; pointer-events: none; }
.hi {
    position: absolute; width: 64px; height: 64px; border-radius: 15px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5); opacity: 0.9;
    animation: float 6s ease-in-out infinite;
}
.hi-1 { left: 4%;  top: 20px;  animation-delay: 0s; }
.hi-2 { left: 12%; top: 190px; width: 52px; height: 52px; border-radius: 12px; animation-delay: -2s; }
.hi-3 { left: 2%;  top: 330px; width: 56px; height: 56px; animation-delay: -4s; }
.hi-4 { right: 4%;  top: 40px;  width: 56px; height: 56px; animation-delay: -1s; }
.hi-5 { right: 13%; top: 200px; animation-delay: -3s; }
.hi-6 { right: 3%;  top: 340px; width: 52px; height: 52px; border-radius: 12px; animation-delay: -5s; }
@keyframes float {
    0%, 100% { translate: 0 0; rotate: -4deg; }
    50% { translate: 0 -12px; rotate: 4deg; }
}

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    height: 48px; padding: 0 22px; border-radius: 12px;
    font-weight: 600; font-size: 0.95rem; text-decoration: none;
    transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: 0.85; }
.btn-ghost { background: var(--bg-card); color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--bg-hover); }

/* Sections */
section { padding: 80px 0; }
.section-border { border-top: 1px solid var(--border); }
.section-label {
    text-align: center; font-size: 0.85rem; font-weight: 600;
    color: var(--text-tertiary); text-transform: uppercase;
    letter-spacing: 0.08em; margin-bottom: 12px;
}
.section-title {
    text-align: center; font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700; margin-bottom: 48px; letter-spacing: -0.01em;
}

/* Apps */
.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.app-card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 32px; text-decoration: none; color: inherit;
    border: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
    display: flex; flex-direction: column;
}
a.app-card:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.app-card-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.app-icon {
    width: 56px; height: 56px; border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3); flex-shrink: 0;
}
.app-name { font-size: 1.15rem; font-weight: 700; }
.app-category { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 2px; }
.app-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.55; }
.app-meta { margin-top: auto; padding-top: 16px; font-size: 0.8rem; color: var(--text-tertiary); }

/* CTA */
.cta { text-align: center; }
.cta-title { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; margin-bottom: 12px; }
.cta-desc { color: var(--text-secondary); margin-bottom: 32px; }

/* Footer */
footer { padding: 48px 0 32px; border-top: 1px solid var(--border); }
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.footer-logo img { width: 28px; height: 28px; border-radius: 7px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.85rem; transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
    width: 100%; text-align: center; padding-top: 32px; margin-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary); font-size: 0.8rem;
}

/* Sub pages (support / privacy / terms) */
.page { padding: 140px 0 80px; }
.page .container { max-width: 760px; }
.page-title { font-size: clamp(1.8rem, 4.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.page-updated { color: var(--text-tertiary); font-size: 0.85rem; margin-bottom: 48px; }
.page-h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.prose h2 { font-size: 1.15rem; font-weight: 600; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--text-secondary); font-size: 0.95rem; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin-top: 8px; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--accent); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose strong { color: var(--text); font-weight: 600; }

/* Legal body is authored per language; show only the active one */
[data-lang-block] { display: none; }
html[lang="ko"] [data-lang-block="ko"],
html[lang="en"] [data-lang-block="en"],
html[lang="ja"] [data-lang-block="ja"] { display: block; }

.contact-card {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; margin-bottom: 48px;
}
.contact-card .label { font-size: 0.85rem; color: var(--text-tertiary); margin-bottom: 4px; }
.contact-card .value { font-size: 1.1rem; font-weight: 600; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    padding: 18px 22px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--text-tertiary); font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 10px; }

/* Animations */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-sub { animation: fadeIn 0.6s ease both; }
.hero-title { animation: fadeIn 0.6s ease 0.1s both; }
.hero-desc { animation: fadeIn 0.6s ease 0.2s both; }
.hero-badges { animation: fadeIn 0.6s ease 0.3s both; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in { opacity: 1; transform: none; transition: none; }
    .hero-sub, .hero-title, .hero-desc, .hero-badges, .hi { animation: none; }
}

/* Responsive */
@media (max-width: 960px) {
    .hero-icons { position: static; display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; }
    .hi { position: static; width: 40px !important; height: 40px !important; border-radius: 10px !important; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-right { gap: 8px; }
    .mobile-menu-btn { display: flex; }
    .mobile-menu { display: block; }
    .container, .nav-inner { padding: 0 16px; }
    .mobile-menu { padding: 8px 16px 20px; }
    .apps-grid { grid-template-columns: 1fr; }
    .hero { padding: 120px 0 60px; }
    section { padding: 60px 0; }
    .app-card { padding: 24px; }
    .page { padding: 110px 0 60px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 340px) {
    .nav-logo span { display: none; }
}
