html, :root {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

:root {
    color-scheme: dark;
    --bg-dark: #0F172A;
    --bg-gradient-top: #1E293B;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-teal: #2DD4BF;
    --accent-teal-hover: rgba(45, 212, 191, 0.12);
    --accent-indigo: #6366F1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.15);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--bg-gradient-top) 0%, var(--bg-dark) 100%);
    z-index: -2;
    pointer-events: none;
}

/* Background Ambient Lighting (Glow Blobs) */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: rgba(45, 212, 191, 0.1);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: rgba(99, 102, 241, 0.15);
}

/* Header & Navigation */
.glass-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.nav-item > a:hover {
    background: var(--glass-bg);
    color: var(--accent-teal);
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.dropdown-menu a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

/* Right Side Tools */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    gap: 6px;
    background: var(--glass-bg);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.lang-btn {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--accent-teal-hover);
    color: var(--accent-teal);
    border: 1px solid rgba(45, 212, 191, 0.3);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    height: 24px;
    width: 24px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.page-card {
    max-width: 1100px;
    width: 100%;
    padding: 48px;
}

/* Landing Sections */
.landing-section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 32px 24px;
}

.ls-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 56px;
    padding: 48px;
    width: 100%;
    max-width: 1440px;
}

.ls-reversed {
    flex-direction: row-reverse;
}

.ls-text {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ls-media {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Per-section carousel */
.ls-carousel {
    position: relative;
    width: 260px;
    height: 560px;
    border-radius: 44px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.4);
    border: 2px solid rgba(45, 212, 191, 0.55);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(45, 212, 191, 0.12),
        0 0 40px rgba(45, 212, 191, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ls-carousel .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ls-carousel .carousel-slide.active {
    opacity: 1;
}

/* Scroll reveal
   Strategy: scale-based entrance on the card (perpendicular to scroll → always visible),
   combined with large horizontal slide on each half (also perpendicular to scroll direction).
   Spring overshoot easing (0.34, 1.56, 0.64, 1) gives a physical "pop" feel. */

/* Card: scales up from 85% with fade — the scale is clearly visible against any scroll speed */
.reveal-section .ls-card {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.65s ease-out,
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-section.is-visible .ls-card {
    opacity: 1;
    transform: scale(1);
}

/* Normal layout (Section 3): phone on left, text on right */
.reveal-section .ls-card:not(.ls-reversed) .ls-media {
    opacity: 0;
    transform: translateX(-90px);
    transition: opacity 0.6s ease 0.18s,
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.18s;
}
.reveal-section .ls-card:not(.ls-reversed) .ls-text {
    opacity: 0;
    transform: translateX(90px);
    transition: opacity 0.6s ease 0.3s,
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

/* Reversed layout (Sections 2 & 4): text on left, phone on right */
.reveal-section .ls-card.ls-reversed .ls-text {
    opacity: 0;
    transform: translateX(-90px);
    transition: opacity 0.6s ease 0.18s,
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.18s;
}
.reveal-section .ls-card.ls-reversed .ls-media {
    opacity: 0;
    transform: translateX(90px);
    transition: opacity 0.6s ease 0.3s,
                transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

/* Final resting state */
.reveal-section.is-visible .ls-card .ls-media,
.reveal-section.is-visible .ls-card .ls-text {
    opacity: 1;
    transform: translateX(0);
}

/* Gentle float on the phone after it arrives */
@keyframes floatPhone {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}
.reveal-section.is-visible .ls-carousel {
    animation: floatPhone 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Sticky App Store CTA bar */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 12px 24px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 950;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cta.visible {
    transform: translateY(0);
}

.store-badge-sm {
    height: 36px;
    transition: opacity 0.2s;
}

.store-badge-sm:hover {
    opacity: 0.8;
}

.coming-soon-link-sm {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.coming-soon-link-sm:hover {
    color: var(--accent-teal);
}

/* Shared store/badge styles */
.store-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.store-badge {
    height: 56px;
    transition: opacity 0.2s;
}

.store-badge:hover {
    opacity: 0.8;
}

.coming-soon {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.coming-soon-link {
    text-decoration: none;
}

.coming-soon-link:hover .coming-soon {
    color: var(--accent-teal);
}

/* Hero typography (used inside Section 1 ls-text) */
.ls-text h1 {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 22px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.glass-btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.glass-btn.primary {
    background: linear-gradient(135deg, var(--accent-teal), #0D9488);
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.3);
}

.glass-btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(45, 212, 191, 0.4);
}

/* Markdown Typography Mapping */
.markdown-body {
    font-size: 17px;
    color: var(--text-secondary);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.3;
}

.markdown-body h1 {
    font-size: 36px;
    letter-spacing: -1px;
    margin-top: 0;
    margin-bottom: 24px;
}

.markdown-body h2 {
    font-size: 28px;
    letter-spacing: -0.5px;
    margin-top: 48px;
    margin-bottom: 16px;
}

.markdown-body h3 {
    font-size: 20px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.markdown-body p {
    margin-bottom: 20px;
}

.markdown-body ul, 
.markdown-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.markdown-body li {
    margin-bottom: 8px;
}

.markdown-body a {
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 500;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body strong {
    color: var(--text-primary);
    font-weight: 700;
}

.markdown-body blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: rgba(45, 212, 191, 0.08);
    border-left: 4px solid var(--accent-teal);
    border-radius: 0 20px 20px 0;
    color: var(--text-primary);
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.markdown-body blockquote p {
    margin-bottom: 0;
    line-height: 1.5;
}

.loading-text {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 64px 0;
}

/* Footer */
.glass-footer {
    padding: 32px;
    padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 32px));
    padding-bottom: 88px; /* always clear the sticky CTA bar */
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-teal);
}

.copyright {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Version Announcement System */
.version-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent-teal);
    color: var(--accent-teal) !important;
    background: var(--accent-teal-hover);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.3em;
    width: max-content;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 12px;
    letter-spacing: 0.5px;
    line-height: 1;
}

.dot-new {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-teal);
    border-radius: 50%;
    margin-bottom: 2px;
    margin-left: 6px;
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.8);
    animation: pulseNew 2s infinite;
}

@keyframes pulseNew {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.new-version-banner {
    background: var(--accent-teal-hover);
    border: 1px solid rgba(45, 212, 191, 0.2);
    padding: 12px 24px;
    border-radius: 16px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1440px;
    animation: fadeInDown 0.8s ease-out;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.new-version-banner p {
    margin: 0;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
}

.new-version-banner .banner-cta {
    background: var(--accent-teal);
    color: var(--bg-dark);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.new-version-banner .banner-cta:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive banner */
@media (max-width: 768px) {
    .new-version-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    .new-version-banner .banner-cta {
        width: 100%;
    }
}

/* Section scroll-spy sidebar */
.section-nav {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 500;
}

.section-nav-item {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    cursor: pointer;
}

.section-nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
    transition: background 0.3s ease, width 0.3s ease, height 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.section-nav-label {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.22s ease;
}

.section-nav-item.active .section-nav-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-teal);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.65);
}

.section-nav-item.active .section-nav-label {
    color: var(--accent-teal);
}

.section-nav-item:hover .section-nav-dot {
    transform: scale(1.35);
    background: var(--accent-teal);
}

.section-nav-item:hover .section-nav-label {
    color: var(--accent-teal);
}

/* Responsive */
@media (max-width: 900px) {
    .section-nav { display: none; }

    /* Landing sections: stack vertically */
    .ls-card,
    .ls-card.ls-reversed {
        flex-direction: column;
        padding: 28px 20px;
        gap: 28px;
        text-align: center;
    }

    .ls-text {
        align-items: center;
    }

    .ls-carousel {
        width: 200px;
        height: 430px;
        border-radius: 36px;
    }

    .landing-section {
        padding: 24px 16px;
    }

    .ls-text h1 {
        font-size: 36px;
    }

    .subtitle {
        font-size: 18px;
    }

    .markdown-body {
        font-size: 15px;
        text-align: left;
    }

    /* Reveal animation on mobile: no horizontal slide, just scale pop + staggered fade */
    .reveal-section .ls-card:not(.ls-reversed) .ls-media,
    .reveal-section .ls-card:not(.ls-reversed) .ls-text,
    .reveal-section .ls-card.ls-reversed .ls-text,
    .reveal-section .ls-card.ls-reversed .ls-media {
        transform: none;
    }
    /* Card scale still works on mobile — that's the main visible effect */

    /* Sticky CTA: stack vertically on very small screens */
    .sticky-cta {
        gap: 12px;
        padding: 10px 16px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    /* Footer needs room above sticky CTA */
    .glass-footer {
        padding-bottom: 72px;
    }

    .hamburger {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .main-nav.active {
        display: flex;
    }

    .has-dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown-menu {
        position: static;
        display: block;
        background: transparent;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        margin-top: 8px;
    }

    .page-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .sticky-cta {
        flex-direction: column;
        gap: 8px;
    }

    .ls-text h1 {
        font-size: 28px;
    }
}

/* Privacy Banner */
.privacy-banner {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 1000;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-teal-hover);
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90%;
    width: max-content;
}

.privacy-banner.show {
    bottom: 32px;
}

.privacy-banner p {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.privacy-btn {
    background: linear-gradient(135deg, var(--accent-teal), #0D9488);
    color: #FFFFFF;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.privacy-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.3);
}

@media (max-width: 768px) {
    .privacy-banner {
        flex-direction: column;
        text-align: center;
        width: calc(100% - 32px);
        padding: 24px;
        gap: 16px;
    }
    .privacy-btn {
        width: 100%;
    }
}