/* Landing Page Styles */

/* Override reader.css body padding on landing page */
body:has(.landing-hero) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* ==========================================================================
   Section Layout System
   ========================================================================== */

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 48px;
}

.section-subtitle-emphasis {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
}

.section-subtitle-emphasis em {
    color: var(--accent-color);
    font-style: normal;
    font-weight: 600;
}

/* Alternating section backgrounds - subtle gradients */
.section-alt {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(var(--accent-rgb), 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(var(--accent-rgb), 0.04) 0%, transparent 50%),
        var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.landing-hero {
    position: relative;
    padding: 120px 20px 100px;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden; /* Clip the 140% width hero-glow */
}

/* Animated gradient glow behind content */
.hero-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

[data-mode="light"] .hero-glow {
    background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.08) 0%, transparent 60%);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.landing-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.hero-cta .btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
    box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.4);
}

.hero-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
}

.lang-badge {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.lang-badge img {
    flex-shrink: 0;
}

.lang-badge.soon {
    opacity: 0.6;
    font-style: italic;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* Hero Photo Cluster */
.hero-visual {
    position: relative;
    height: 480px;
}

.photo-cluster {
    position: relative;
    width: 100%;
    height: 100%;
}

.cluster-photo {
    position: absolute;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.cluster-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Position each photo in the cluster - wide spread (#37) */
.cluster-photo.cp-1 {
    width: 180px;
    height: 250px;
    top: 60px;
    left: 5px;
    transform: rotate(-4deg);
    z-index: 5;
}

.cluster-photo.cp-2 {
    width: 190px;
    height: 260px;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    z-index: 4;
}

.cluster-photo.cp-3 {
    width: 180px;
    height: 250px;
    top: 60px;
    right: 30px;
    transform: rotate(4deg);
    z-index: 3;
}

/* Additional photos when added */
.cluster-photo.cp-4 {
    width: 140px;
    height: 180px;
    bottom: 0;
    left: 20px;
    transform: rotate(-3deg);
    z-index: 2;
}

.cluster-photo.cp-5 {
    width: 150px;
    height: 190px;
    top: 10px;
    right: 10px;
    transform: rotate(3deg);
    z-index: 3;
}

[data-mode="light"] .cluster-photo {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-mode="light"] .cluster-photo:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   How It Works + Demo - Two Column Layout
   ========================================================================== */

.how-it-works-demo {
    padding: 120px 20px;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(var(--accent-rgb), 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
        var(--bg-secondary);
}

.how-it-works-demo .section-container {
    max-width: 1200px;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.column-right {
    position: sticky;
    top: 100px;
    padding-top: 70px;
    overflow: visible; /* Allow popup to overflow */
}

.demo-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.journey-timeline {
    max-width: 100%;
}

.journey-step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.journey-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
}

.journey-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.journey-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.journey-detail {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 500;
}

.journey-connector {
    width: 2px;
    height: 32px;
    background: linear-gradient(180deg, var(--accent-color) 0%, transparent 100%);
    margin: 8px 0 8px 27px;
    opacity: 0.4;
}

/* ==========================================================================
   Demo Reader Component
   ========================================================================== */

.demo-lang-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.demo-lang-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.demo-lang-tab:hover {
    color: var(--text-secondary);
    background: rgba(var(--accent-rgb), 0.05);
}

.demo-lang-tab.active {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
}

.demo-lang-content {
    display: none;
}

.demo-lang-content.active {
    display: block;
}

.demo-reader {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(var(--accent-rgb), 0.05);
}

.demo-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-primary);
    gap: 12px;
    flex-wrap: wrap;
}

.demo-controls-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-controls-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-title {
    font-weight: 600;
    font-size: 1rem;
}

/* demo-badge now uses hsk-badge styles from reader.css */

.demo-content {
    padding: 24px;
}

/* Override reader.css styles for landing page demo */
.demo-content.story-container {
    max-width: none;
    margin: 0;
    padding: 24px !important; /* Override JS-added inline padding */
}

.demo-content .paragraph {
    font-size: 1.3rem;
    line-height: 2.2;
    margin-bottom: 20px;
}

.demo-content .paragraph:last-child {
    margin-bottom: 0;
}

.demo-hint {
    padding: 12px 20px;
    background: var(--bg-primary);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.demo-hint i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* ==========================================================================
   Telegram Feature Section - Split Layout
   ========================================================================== */

.section-telegram {
    padding: 100px 20px;
    background:
        radial-gradient(ellipse at 70% 30%, rgba(0, 136, 204, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 80%, rgba(var(--accent-rgb), 0.06) 0%, transparent 50%),
        var(--bg-secondary) !important;
}

.feature-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0088cc;
    margin-bottom: 16px;
}

.feature-split-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.feature-split-content > p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.feature-checklist li i {
    color: #4ade80;
    font-size: 1rem;
}

/* Telegram Mockup */
.telegram-mockup {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.telegram-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #0088cc;
    color: white;
}

.telegram-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.telegram-info {
    display: flex;
    flex-direction: column;
}

.telegram-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.telegram-status {
    font-size: 0.75rem;
    opacity: 0.8;
}

.telegram-messages {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
}

.telegram-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    position: relative;
}

.telegram-msg p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.telegram-msg.bot {
    background: var(--bg-secondary);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.telegram-msg.user {
    background: #0088cc;
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.telegram-time {
    font-size: 0.65rem;
    opacity: 0.6;
    display: block;
    text-align: right;
    margin-top: 4px;
}

/* ==========================================================================
   Difference Section - Why Different
   ========================================================================== */

.section-difference {
    padding: 120px 20px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
}

.difference-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 48px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.difference-list li {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    padding: 16px 28px;
    background: var(--card-bg);
    border-radius: 100px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.difference-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.15);
}

.difference-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */

.section-pricing {
    padding: 100px 20px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(var(--accent-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        var(--bg-secondary) !important;
}

.pricing-comparison {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 700px;
    margin: 0 auto 24px;
}

.pricing-tier {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-tier:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.pricing-tier.featured {
    border-color: var(--accent-color);
    position: relative;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(var(--accent-rgb), 0.2);
}

.pricing-tier.featured:hover {
    box-shadow:
        0 12px 40px rgba(var(--accent-rgb), 0.15),
        0 0 0 1px rgba(var(--accent-rgb), 0.3);
}

.tier-header {
    margin-bottom: 20px;
}

.tier-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pricing-tier.featured .tier-badge {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-color);
}

.tier-header h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.tier-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.tier-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.tier-annual {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.tier-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tier-features li i {
    color: #4ade80;
    font-size: 0.85rem;
}

.tier-features li strong {
    color: var(--text-primary);
}

.pricing-tier .btn {
    width: 100%;
}

.pricing-details-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-size: 0.9rem;
    text-decoration: none;
}

.pricing-details-link:hover {
    text-decoration: underline;
}

/* Center the pricing link */
.section-pricing .pricing-details-link {
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   Final CTA Section
   ========================================================================== */

.section-final-cta {
    padding: 120px 20px;
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(var(--accent-rgb), 0.12) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid var(--border-color);
}

.section-final-cta h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-final-cta p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.section-final-cta .btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 900px) {
    /* Mobile: side-by-side with photo strip on right */
    .hero-grid {
        grid-template-columns: 1fr 100px;
        gap: 24px;
        align-items: flex-start;
    }

    .hero-text {
        text-align: left;
        order: 1;
    }

    .hero-visual {
        order: 2;
        height: auto;
        max-width: none;
        margin: 0;
        position: relative;
        padding-top: 35px; /* Align with title, below eyebrow */
    }

    .hero-cta {
        align-items: flex-start;
    }

    .hero-cta .btn-lg {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .hero-languages {
        justify-content: flex-start;
    }

    /* Two-column layout stacks on mobile */
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .column-right {
        position: relative;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .demo-reader {
        width: 100%;
    }

    /* Keep scroll indicator visible on mobile */

    .column-left .section-title,
    .column-left .section-subtitle {
        text-align: center !important;
    }

    .journey-timeline {
        max-width: 500px;
        margin: 0 auto;
    }

    .demo-lang-tabs {
        justify-content: center;
    }

    .hero-description {
        margin-left: 0;
        margin-right: 0;
    }

    /* Photo strip: vertical stack on right with overlap */
    .photo-cluster {
        display: flex;
        flex-direction: column;
        gap: 0;
        height: auto;
        padding-top: 10px;
    }

    .cluster-photo {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        height: auto;
        aspect-ratio: 3/4;
        border: 3px solid rgba(255, 255, 255, 0.9);
    }

    .cluster-photo.cp-1,
    .cluster-photo.cp-2,
    .cluster-photo.cp-3 {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 3/4;
        z-index: 1;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .cluster-photo.cp-1 {
        transform: rotate(-3deg) translateX(5px);
        z-index: 3;
    }

    .cluster-photo.cp-2 {
        transform: rotate(2deg) translateX(-3px);
        margin-top: -15px;
        z-index: 2;
    }

    .cluster-photo.cp-3 {
        transform: rotate(-2deg) translateX(4px);
        margin-top: -15px;
        z-index: 1;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 80px 20px 80px;
    }

    .scroll-indicator {
        bottom: 15px;
    }

    .landing-hero h1 {
        font-size: 2.2rem;
    }

    .hero-tagline {
        font-size: 1.15rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Phone: narrower photo strip */
    .hero-grid {
        grid-template-columns: 1fr 80px;
        gap: 16px;
    }

    .cluster-photo {
        border-width: 2px;
    }

    .cluster-photo.cp-1 {
        transform: rotate(-2deg) translateX(3px);
    }

    .cluster-photo.cp-2 {
        transform: rotate(1deg) translateX(-2px);
        margin-top: -12px;
    }

    .cluster-photo.cp-3 {
        transform: rotate(-1deg) translateX(2px);
        margin-top: -12px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    /* Journey Timeline - Stack on mobile */
    .journey-step {
        gap: 16px;
    }

    .journey-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .journey-connector {
        margin-left: 23px;
    }

    /* Demo */
    .demo-lang-tabs {
        gap: 6px;
    }

    .demo-lang-tab {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .demo-controls {
        padding: 10px 12px;
        gap: 8px;
    }

    .demo-controls-right {
        gap: 4px;
    }

    .demo-controls-right .toggle-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .demo-content .paragraph {
        font-size: 1.1rem;
        line-height: 2;
    }

    /* Telegram split - stack on mobile */
    .feature-split {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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


    .section-subtitle-emphasis {
        font-size: 1.05rem;
    }

    /* Pricing */
    .pricing-comparison {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pricing-tier {
        padding: 20px;
    }

    .tier-price {
        font-size: 1.8rem;
    }

    /* Final CTA */
    .section-final-cta {
        padding: 60px 20px;
    }

    .section-final-cta h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 500px) {
    .landing-hero h1 {
        font-size: 1.8rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-languages {
        gap: 8px;
    }

    .lang-badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .journey-content h3 {
        font-size: 1.1rem;
    }

    .journey-content p {
        font-size: 0.9rem;
    }
}
