/* ===========================
   TS TUNNEL DOWNLOAD PAGE
   =========================== */
.app-download-page {
    background: var(--bg-primary);
}

.app-download-page .navbar {
    border-bottom-color: transparent;
}

.app-download-page .navbar.scrolled {
    border-bottom-color: var(--border-color);
}

.download-hero {
    position: relative;
    min-height: min(820px, 100vh);
    display: flex;
    align-items: center;
    padding: 132px 0 88px;
    overflow: hidden;
    isolation: isolate;
}

.download-hero .hero-bg {
    z-index: -1;
}

.download-hero .hero-grid {
    opacity: 0.9;
    mask-image: radial-gradient(ellipse at 55% 47%, black 20%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse at 55% 47%, black 20%, transparent 72%);
}

.download-hero .hero-glow {
    opacity: 0.2;
}

.download-hero .glow-1 {
    left: -220px;
    top: -140px;
}

.download-hero .glow-2 {
    right: -210px;
    bottom: -270px;
}

.download-hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    align-items: center;
    gap: clamp(48px, 8vw, 112px);
}

.download-hero-copy {
    max-width: 640px;
}

.download-hero-copy h1 {
    font-size: clamp(2.75rem, 5.2vw, 4.5rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.045em;
    margin-bottom: 22px;
}

.download-hero-description {
    max-width: 540px;
    color: var(--text-secondary);
    font-size: 1.12rem;
    line-height: 1.75;
    margin-bottom: 34px;
}

.download-hero .hero-buttons {
    margin-bottom: 30px;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.download-meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.download-meta i {
    color: var(--accent-light);
}

.app-hero-visual {
    min-height: 550px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 30px 8px 0;
}

.app-visual-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.2), rgba(0, 122, 153, 0.06) 42%, transparent 70%);
    filter: blur(16px);
    transform: translateY(10px);
}

.phone-frame {
    width: clamp(230px, 25vw, 290px);
    position: relative;
    z-index: 1;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 36px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.025));
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.55), 0 0 40px rgba(0, 229, 255, 0.12);
    transform: rotate(4deg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.phone-frame::after {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 29px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.phone-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 29px;
}

.app-hero-visual:hover .phone-frame {
    transform: rotate(1deg) translateY(-8px);
    box-shadow: 0 44px 80px rgba(0, 0, 0, 0.6), 0 0 55px rgba(0, 229, 255, 0.16);
}

.app-status-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
    padding: 12px 14px;
    background: rgba(16, 16, 20, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
}

.app-status-card strong,
.app-status-card small {
    display: block;
}

.app-status-card strong {
    font-size: 0.78rem;
    line-height: 1.3;
}

.app-status-card small {
    max-width: 145px;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.66rem;
    line-height: 1.35;
}

.status-card-top {
    left: 0;
    top: 20%;
    animation: appFloat 5s ease-in-out infinite;
}

.status-card-bottom {
    right: -6px;
    bottom: 17%;
    animation: appFloat 5s ease-in-out 1.25s infinite;
}

.status-card-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 9px;
    color: var(--accent-light);
    background: rgba(0, 229, 255, 0.1);
}

.connection-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1);
}

@keyframes appFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

.app-intro {
    padding: 104px 0;
    border-top: 1px solid var(--border-color);
}

.app-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.app-feature-card {
    min-height: 230px;
    padding: 34px 32px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.app-feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32), 0 0 26px rgba(0, 229, 255, 0.05);
}

.app-feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.12rem;
}

.app-feature-card p {
    color: var(--text-secondary);
    font-size: 0.91rem;
    line-height: 1.7;
}

.screenshots-section {
    padding: 104px 0 120px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.section-heading-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 56px;
}

.section-heading-row .section-badge {
    margin-bottom: 16px;
}

.section-heading-row h2 {
    font-size: clamp(2rem, 3.7vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.section-heading-row > p {
    max-width: 365px;
    padding-bottom: 4px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    align-items: end;
    max-width: 1010px;
    margin: 0 auto;
}

.screenshot-card {
    margin: 0;
    padding: 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}

.screenshot-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 229, 255, 0.32);
}

.screenshot-card-featured {
    transform: translateY(-24px);
    border-color: rgba(0, 229, 255, 0.25);
}

.screenshot-card-featured:hover {
    transform: translateY(-34px);
}

.screenshot-image {
    overflow: hidden;
    border-radius: 10px;
    background: #020304;
}

.screenshot-image img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.screenshot-card:hover .screenshot-image img {
    transform: scale(1.025);
}

.screenshot-card figcaption {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 17px 9px 9px;
}

.screenshot-card figcaption > span {
    color: var(--accent-light);
    font-family: var(--font-mono);
    font-size: 0.73rem;
    font-weight: 700;
}

.screenshot-card figcaption strong,
.screenshot-card figcaption small {
    display: block;
}

.screenshot-card figcaption strong {
    font-size: 0.86rem;
    line-height: 1.35;
}

.screenshot-card figcaption small {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.demo-section {
    padding: 120px 0;
}

.demo-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(330px, 0.85fr);
    align-items: center;
    gap: clamp(44px, 8vw, 110px);
}

.demo-copy h2 {
    margin: 0 0 20px;
    font-size: clamp(2.2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.13;
    letter-spacing: -0.03em;
}

.demo-copy > p {
    max-width: 450px;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.75;
}

.demo-steps {
    display: grid;
    gap: 20px;
    margin-top: 36px;
    counter-reset: steps;
}

.demo-steps li {
    display: flex;
    gap: 15px;
    align-items: center;
}

.demo-steps li > span {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    flex: 0 0 auto;
    border-radius: 9px;
    color: var(--accent-light);
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.14);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
}

.demo-steps strong,
.demo-steps small {
    display: block;
}

.demo-steps strong {
    font-size: 0.9rem;
}

.demo-steps small {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.video-card {
    width: min(100%, 380px);
    justify-self: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.4), 0 0 35px rgba(0, 229, 255, 0.06);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.4s ease;
}

.video-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 30px 64px rgba(0, 0, 0, 0.46), 0 0 46px rgba(0, 229, 255, 0.1);
}

.video-wrap {
    position: relative;
    background: #020304;
    line-height: 0;
}

.video-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.video-badge {
    z-index: 2;
    position: absolute;
    top: 15px;
    left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 100px;
    background: rgba(9, 9, 11, 0.68);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
}

.video-badge i {
    color: var(--accent-light);
}

.video-wrap video {
    display: block;
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    background: #020304;
}

.video-player-caption {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px 18px;
}

.video-player-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.11);
    color: var(--accent-light);
    font-size: 0.72rem;
}

.video-player-caption strong,
.video-player-caption small {
    display: block;
}

.video-player-caption strong {
    font-size: 0.84rem;
    line-height: 1.35;
}

.video-player-caption small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.download-cta {
    padding: 0 0 120px;
}

.download-cta-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: 42px 46px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: var(--radius);
    background: linear-gradient(110deg, rgba(0, 229, 255, 0.11), rgba(0, 122, 153, 0.055) 45%, rgba(255, 255, 255, 0.03));
    box-shadow: var(--glass-shadow);
}

.download-cta-card::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    right: -130px;
    top: -180px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.1);
    filter: blur(36px);
    pointer-events: none;
}

.cta-android-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 18px;
    color: var(--accent-light);
    background: rgba(0, 229, 255, 0.1);
    font-size: 2rem;
}

.download-cta-content,
.download-cta-action {
    position: relative;
    z-index: 1;
}

.download-cta-content .section-badge {
    margin-bottom: 12px;
}

.download-cta-content h2 {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.download-cta-content p {
    margin-top: 9px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.download-cta-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.download-cta-action small {
    max-width: 245px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
    text-align: center;
}

.download-cta-action small i {
    margin-right: 4px;
    color: var(--accent-light);
}

.app-footer {
    padding-top: 42px;
}

.app-footer-top {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-bottom: 32px;
}

.app-footer-top > p {
    color: var(--text-muted);
    font-size: 0.87rem;
}

.app-footer-links {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.app-footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--transition);
}

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

.back-to-top {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition);
}

.back-to-top:hover {
    color: var(--accent-light);
    border-color: var(--accent);
    transform: translateY(-2px);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.app-feature-grid [data-reveal]:nth-child(2),
.screenshots-grid [data-reveal]:nth-child(2) {
    transition-delay: 0.1s;
}

.app-feature-grid [data-reveal]:nth-child(3),
.screenshots-grid [data-reveal]:nth-child(3) {
    transition-delay: 0.2s;
}

@media (max-width: 1024px) {
    .download-hero {
        min-height: auto;
    }

    .download-hero-content {
        grid-template-columns: 1fr 0.82fr;
        gap: 40px;
    }

    .app-hero-visual {
        min-height: 480px;
        padding-right: 10px;
    }

    .app-status-card {
        min-width: 160px;
        padding: 10px;
    }

    .status-card-top {
        left: -10px;
    }

    .status-card-bottom {
        right: -18px;
    }

    .section-heading-row {
        align-items: start;
    }

    .download-cta-card {
        grid-template-columns: auto 1fr;
    }

    .download-cta-action {
        grid-column: 2;
        align-items: start;
    }

    .download-cta-action small {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .download-hero {
        padding: 108px 0 74px;
    }

    .download-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
    }

    .download-hero-copy {
        margin: 0 auto;
    }

    .download-hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .download-hero .hero-buttons,
    .download-meta {
        justify-content: center;
    }

    .app-hero-visual {
        min-height: 480px;
        padding-right: 0;
    }

    .app-feature-grid,
    .screenshots-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .screenshot-card-featured,
    .screenshot-card-featured:hover {
        transform: none;
    }

    .section-heading-row,
    .demo-layout {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        display: block;
        text-align: center;
    }

    .section-heading-row > p {
        margin: 18px auto 0;
    }

    .demo-copy {
        text-align: center;
    }

    .demo-copy > p {
        margin-left: auto;
        margin-right: auto;
    }

    .demo-steps {
        max-width: 430px;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }

    .video-card {
        width: min(100%, 360px);
    }

    .download-cta-card {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 38px 28px;
        text-align: center;
    }

    .download-cta-action {
        grid-column: auto;
        align-items: center;
    }

    .download-cta-action small {
        text-align: center;
    }

    .app-footer-top {
        flex-direction: column;
        text-align: center;
    }

    .app-footer-links {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .download-hero-copy h1 {
        font-size: 2.35rem;
    }

    .download-meta {
        flex-direction: column;
        gap: 8px;
    }

    .app-hero-visual {
        min-height: 430px;
        transform: scale(0.92);
        margin: -20px 0;
    }

    .phone-frame {
        width: 235px;
    }

    .app-status-card {
        min-width: 150px;
    }

    .status-card-top {
        left: -3px;
        top: 18%;
    }

    .status-card-bottom {
        right: -4px;
        bottom: 15%;
    }

    .app-intro,
    .screenshots-section,
    .demo-section {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .download-cta {
        padding-bottom: 80px;
    }

    .app-feature-card {
        min-height: auto;
        padding: 28px;
        text-align: center;
    }

    .app-feature-card .feature-icon {
        margin-left: auto;
        margin-right: auto;
    }

    .app-footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-status-card {
        animation: none;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .phone-frame,
    .screenshot-image img,
    .app-feature-card,
    .screenshot-card {
        transition: none;
    }
}
