/**
 * App Landing Page - 手機版介紹頁
 * 複用 about-apple.css 的基礎樣式，只處理 App 頁面專屬元素
 */

/* --- App Icon --- */
.app-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

/* --- Hero App Store CTA --- */
.app-store-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.app-store-badge-hero {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge-hero:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.app-store-badge-hero img {
    height: 50px;
    width: auto;
}

.app-store-cta .cta-sub {
    font-size: 0.9rem;
    color: #8B4513;
    font-weight: 500;
}

/* --- Lightbox (點按放大) --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

/* zoomable 手機圖 cursor 提示 */
.phone-mockup.zoomable {
    cursor: zoom-in;
}

/* --- Phone Mockup --- */
.phone-mockup {
    max-width: 320px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.phone-mockup:hover {
    transform: translateY(-5px);
}

/* --- App Feature Section (左右佈局) --- */
.app-feature-section {
    position: relative;
    padding: 100px 20px;
    background-color: #F9F6F2;
    overflow: hidden;
}

.app-feature-section:nth-child(even) {
    background: linear-gradient(135deg, #F5F0EB 0%, #ebe6e0 100%);
}

.feature-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}

.feature-container.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.feature-text h2 {
    font-family: "Noto Serif TC", serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #3E2723;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.feature-text .feature-subtitle {
    font-size: 1.1rem;
    color: #d97706;
    font-weight: 700;
    margin-bottom: 20px;
}

.feature-text .feature-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #5D4037;
    margin-bottom: 24px;
}

.feature-text .feature-desc strong {
    color: #3E2723;
}

/* --- Sando Scroll Animation (觀描悟滾動切換) --- */
.sando-scroll-section {
    position: relative;
    height: 400vh;
    background-color: #F9F6F2;
    z-index: 10;
    display: block !important;
    overflow: visible;
}

.sando-sticky-stage {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    will-change: transform;
}

.sando-scroll-title {
    font-family: "Noto Serif TC", serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #3E2723;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.sando-scroll-subtitle {
    font-size: 1rem;
    color: #d97706;
    font-weight: 700;
    margin-bottom: 10px;
}

/* 觀描悟步驟指示器 */
.sando-step-indicators {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 10px;
}

.sando-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(62, 39, 35, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sando-indicator span {
    font-size: 0.9rem;
    font-weight: 800;
    color: #8B7355;
    transition: color 0.3s ease;
}

.sando-indicator.active {
    background: #3E2723;
    transform: scale(1.15);
}

.sando-indicator.active span {
    color: #fbbf24;
}

.sando-indicator-line {
    width: 30px;
    height: 2px;
    background: rgba(62, 39, 35, 0.15);
}

.sando-morph-container {
    position: relative;
    width: 320px;
    height: 640px;
    margin: 10px 0;
    flex-shrink: 0;
}

.sando-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: opacity, transform;
}

.sando-layer.active {
    opacity: 1;
    transform: scale(1);
}

.sando-layer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.18));
}

.sando-scroll-caption {
    text-align: center;
    max-width: 500px;
    height: 80px;
    padding: 0 20px;
    transition: opacity 0.3s;
}

.sando-scroll-caption h3 {
    font-family: "Noto Serif TC", serif;
    font-size: 1.8rem;
    color: #3E2723;
    margin-bottom: 6px;
    font-weight: 900;
}

.sando-scroll-caption p {
    font-size: 1rem;
    color: #5D4037;
    line-height: 1.6;
}

.sando-scroll-progress {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: rgba(62, 39, 35, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.sando-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d97706, #fbbf24);
    border-radius: 3px;
    transition: width 0.1s ease-out;
}

.sando-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.sando-scroll-hint p {
    font-size: 0.85rem;
    color: #8B7355;
    margin: 0;
}

/* --- Dojo Section (道場 — 參道試煉) --- */
.dojo-hero {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.dojo-hero h2 {
    font-family: "Noto Serif TC", serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #3E2723;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.dojo-trial-phones {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
}

.dojo-trial-phones .phone-mockup {
    max-width: 320px;
}

.dojo-trial-phones .phone-mockup:nth-child(2) {
    margin-top: 30px;
}

/* --- Sando Stages (參道階段 pill) --- */
.sando-stages {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.stage-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(62, 39, 35, 0.12);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3E2723;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.stage-chip:hover {
    background: #fbbf24;
    border-color: #d97706;
    color: #fff;
    transform: translateY(-2px);
}

.stage-chip .stage-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #3E2723;
    color: #fbbf24;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.stage-chip:hover .stage-num {
    background: #fff;
    color: #d97706;
}

/* --- Character Cards --- */
.character-pair {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 50px;
}

.character-card {
    flex: 1;
    max-width: 340px;
    background: #fff;
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    border: 1px solid rgba(62, 39, 35, 0.08);
    box-shadow: 0 4px 6px rgba(62, 39, 35, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(62, 39, 35, 0.1);
    border-color: #d97706;
}

.character-card img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 16px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
}

.character-card h3 {
    font-family: "Noto Serif TC", serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #3E2723;
    margin-bottom: 8px;
}

.character-card p {
    font-size: 0.95rem;
    color: #5D4037;
    line-height: 1.6;
}

/* --- Shrine Features Grid --- */
.shrine-features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.shrine-feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(62, 39, 35, 0.1);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3E2723;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
}

.shrine-feature-pill:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: #d97706;
    transform: translateY(-2px);
}

/* --- Mode List (練習模式清單) --- */
.mode-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(62, 39, 35, 0.08);
    transition: all 0.2s;
}

.mode-item:hover {
    border-color: #d97706;
    box-shadow: 0 4px 12px rgba(62, 39, 35, 0.08);
    transform: translateX(4px);
}

.mode-item .mode-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.mode-item .mode-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #3E2723;
    margin-bottom: 4px;
}

.mode-item .mode-info p {
    font-size: 0.85rem;
    color: #5D4037;
    line-height: 1.4;
    margin: 0;
}

/* --- Highlight Banner (離線可用) --- */
.highlight-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1px solid #a5d6a7;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2e7d32;
}

.highlight-banner .banner-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* --- App Hero Section (巨幕切邊) --- */
.app-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F9F6F2;
    overflow: hidden;
    padding: 100px 0 60px 40px;
}

.app-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
}

.app-hero-text {
    flex: 1.2;
    text-align: left;
    padding-right: 20px;
    position: relative;
    z-index: 2;
}

.app-hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
}

.app-hero-visual .phone-mockup {
    max-width: none;
    width: 340px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.app-hero-visual .phone-mockup:nth-child(2) {
    margin-top: 40px;
}

.app-hero-visual .phone-mockup:hover {
    transform: translateY(-5px);
}

/* --- Ema Evolution Subtitle --- */
.evo-subtitle {
    font-size: 1rem;
    color: #d97706;
    font-weight: 700;
    margin-top: 4px;
}

/* --- Final CTA overrides for App page --- */
.app-final-cta .stamp-text {
    font-size: 4.5rem;
}

/* --- 響應式：900px 以下改為上下堆疊 --- */
@media (max-width: 900px) {
    .feature-container,
    .feature-container.reverse {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .feature-text h2 {
        font-size: 1.8rem;
    }

    .sando-stages {
        justify-content: center;
    }

    .sando-morph-container {
        width: 70vw;
        height: 140vw;
        max-width: 320px;
        max-height: 640px;
    }

    .sando-scroll-title {
        font-size: 1.8rem;
    }

    .dojo-trial-phones .phone-mockup {
        max-width: 46%;
    }

    .dojo-trial-phones {
        gap: 10px;
    }

    .dojo-hero h2 {
        font-size: 1.8rem;
    }

    .phone-mockup {
        max-width: 260px;
    }

    .app-hero-section {
        padding: 100px 20px 0;
    }

    .app-hero-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .app-hero-text {
        text-align: center;
        padding-right: 0;
    }

    .app-hero-visual {
        width: 100%;
        justify-content: center;
        gap: 12px;
    }

    .app-hero-visual .phone-mockup {
        width: 42%;
        max-width: 220px;
    }

    .app-hero-visual .phone-mockup:nth-child(2) {
        margin-top: 24px;
    }

    .character-pair {
        flex-direction: column;
        align-items: center;
    }

    .character-card {
        max-width: 100%;
    }

    .mode-list {
        width: 100%;
    }

    .app-feature-section {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    .app-icon-large {
        width: 90px;
        height: 90px;
        border-radius: 20px;
    }

    .app-store-badge-hero img {
        height: 44px;
    }

    .phone-mockup {
        max-width: 220px;
    }

    .app-hero-visual .phone-mockup {
        width: 40%;
        max-width: 180px;
    }

    .feature-text h2 {
        font-size: 1.6rem;
    }

    .sando-scroll-title {
        font-size: 1.6rem;
    }

    .character-card {
        padding: 24px 16px;
    }
}
