/* ===== Latere wordmark ===== */
.latere-wordmark {
    font-family: 'Instrument Serif', serif !important;
    font-style: italic !important;
    font-weight: 400 !important;
}
.logo-text {
    font-family: 'Instrument Serif', serif !important;
    font-style: italic !important;
    font-weight: 400 !important;
}

/* ===== Chinese Typography ===== */
[lang="zh-Hans"] body,
[lang="zh-Hans"] p,
[lang="zh-Hans"] li,
[lang="zh-Hans"] dt,
[lang="zh-Hans"] dd,
[lang="zh-Hans"] span {
    font-family: 'LXGW WenKai TC', -apple-system, BlinkMacSystemFont, sans-serif;
}
[lang="zh-Hans"] h1,
[lang="zh-Hans"] h2,
[lang="zh-Hans"] h3,
[lang="zh-Hans"] h4 {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
[lang="zh-Hans"] em {
    font-style: normal;
}
[lang="zh-Hans"] .hero-title {
    font-family: 'LXGW WenKai TC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    padding-left: 0.5em;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero:not(.hero-compact) { min-height: 70vh; }
    .hero-compact { min-height: 0; }
    .hero-title { font-size: 2rem; }
    .hero-compact { padding: 16px 0 10px; }
    .hero-compact .hero-title { font-size: 1.3rem; }
    .hero-compact .hero-sub { font-size: 13px; }
    .hero-compact .wallfacer-hero-icon { width: 32px; height: 32px; margin-bottom: 6px; }
    .section { padding: 36px 0; }
    .section-container { padding: 0 20px; }
    .nav-container { padding: 0 20px; }

    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        background: color-mix(in srgb, var(--bg) 95%, transparent);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        gap: 12px;
    }
    .nav-mobile-toggle { display: flex; }

    .tour-item, .tour-item-reverse {
        grid-template-columns: 1fr;
        gap: 24px;
        direction: ltr;
    }
    .tour-item { margin-bottom: 48px; }
    .levels-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .capabilities-grid { grid-template-columns: 1fr; }
    .cap-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
    .docs-grid { grid-template-columns: 1fr; }
    .docs-layout { grid-template-columns: 1fr; }
    .docs-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px;
    }
    .docs-sidebar-toggle { display: block; }
    .docs-sidebar-toggle .docs-toggle-icon { transition: transform 0.2s; }
    .docs-sidebar.collapsed .docs-toggle-icon { transform: rotate(-90deg); }
    .docs-sidebar.collapsed .docs-nav { display: none; }
    .docs-sidebar-header { margin-bottom: 0; }
    .docs-sidebar:not(.collapsed) .docs-sidebar-header { margin-bottom: 12px; }
    .docs-main { padding: 16px 12px; overflow-x: hidden; max-width: 100%; }
    .docs-article { font-size: 13px; }
    .docs-article h1 { font-size: 1.15rem; margin-bottom: 16px; padding-bottom: 8px; }
    .docs-article h2 { font-size: 1rem; margin-top: 24px; }
    .docs-article h3 { font-size: 0.9rem; margin-top: 20px; }
    .docs-article p { font-size: 13px; line-height: 1.7; }
    .docs-article li { font-size: 13px; }
    .docs-article code { font-size: 11px; word-break: break-all; }
    .docs-article pre { font-size: 11px; padding: 10px 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: calc(100vw - 24px); }
    .docs-article pre code { word-break: normal; white-space: pre; }
    .docs-article table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 12px; max-width: calc(100vw - 24px); }
    .docs-article th, .docs-article td { padding: 4px 8px; white-space: nowrap; }
    .docs-article img { margin: 8px 0; }
    .docs-article ul, .docs-article ol { padding-left: 1.2em; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 360px; }
    .download-grid { grid-template-columns: 1fr; max-width: 280px; }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 20px;
    }
    .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .footer-extra { align-items: flex-start; }
    .footer-bottom { padding: 16px 20px; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: center; }
    .levels-grid { grid-template-columns: 1fr; }
    .cap-grid { grid-template-columns: 1fr; }
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Hero screenshot entrance */
.product-hero-img.reveal {
    transform: translateY(30px) scale(0.98);
}
.product-hero-img.revealed {
    transform: translateY(0) scale(1);
}

/* Tour screenshots slide from side */
.tour-item .tour-screenshot.reveal {
    transform: translateX(30px);
    opacity: 0;
}
.tour-item .tour-screenshot.revealed {
    transform: translateX(0);
    opacity: 1;
}
.tour-item-reverse .tour-screenshot.reveal {
    transform: translateX(-30px);
    opacity: 0;
}
.tour-item-reverse .tour-screenshot.revealed {
    transform: translateX(0);
    opacity: 1;
}

/* Tour text slides from opposite side */
.tour-item .tour-text.reveal {
    transform: translateX(-20px);
}
.tour-item .tour-text.revealed {
    transform: translateX(0);
}
.tour-item-reverse .tour-text.reveal {
    transform: translateX(20px);
}
.tour-item-reverse .tour-text.revealed {
    transform: translateX(0);
}

/* Feature cards hover lift */
.feature-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.features-grid .feature-card:hover,
.capabilities-grid .feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Level cards hover */
.level-card:hover .level-number {
    background: var(--accent);
}

/* Tour screenshot hover */
.tour-screenshot img {
    transition: transform 0.3s, box-shadow 0.3s;
}
.tour-screenshot img:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px var(--accent-glow-strong);
}

/* Download icon pulse on hover */
.download-icon-btn {
    transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.download-icon-btn:hover {
    transform: scale(1.1);
}

/* Copy button feedback */
.copy-btn:active {
    transform: scale(0.9);
}

/* Ambient glow behind hero screenshot */
.product-hero-img {
    position: relative;
}
.product-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 300px;
    background: radial-gradient(ellipse at center, var(--accent-glow-strong) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(40px);
    z-index: 0;
}
.product-hero .section-container {
    position: relative;
    z-index: 1;
}

/* Section label fade-in with underline grow */
.section-label.revealed {
    animation: label-underline 0.6s ease forwards;
}
@keyframes label-underline {
    from { letter-spacing: 0.3em; opacity: 0.5; }
    to { letter-spacing: 0.15em; opacity: 1; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
