/* ==========================================================================
   App Download Landing — /app
   Scope: every rule is prefixed with .app-download-page so it cannot leak
   into other pages even when registered globally.
   ========================================================================== */

.app-download-page {
    color: #1a1f36;
    background: #ffffff;
}

/* ---------- Hero ---------- */
.app-download-page .hero {
    position: relative;
    padding: 120px 0 80px;
    background:
        radial-gradient(circle at 20% 20%, rgba(99, 154, 255, 0.18), transparent 55%),
        radial-gradient(circle at 80% 60%, rgba(255, 200, 87, 0.14), transparent 55%),
        linear-gradient(180deg, #f4f8ff 0%, #ffffff 100%);
    overflow: hidden;
}

.app-download-page .hero-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4d6cf3;
    background: rgba(77, 108, 243, 0.08);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.app-download-page .hero-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    color: #021a42;
    margin-bottom: 16px;
}

.app-download-page .hero-tagline {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    color: #4a5777;
    line-height: 1.55;
    max-width: 560px;
    margin-bottom: 32px;
}

/* ---------- iOS-style logo squircle ---------- */
.app-download-page .app-logo {
    width: 132px;
    height: 132px;
    border-radius: 22.37%;
    object-fit: cover;
    box-shadow:
        0 24px 48px rgba(20, 50, 120, 0.22),
        0 4px 12px rgba(20, 50, 120, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    background: #fff;
    display: block;
}

.app-download-page .hero-logo-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.app-download-page .hero-logo-row .brand-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #021a42;
    letter-spacing: -0.01em;
}

.app-download-page .hero-logo-row .brand-tag {
    font-size: 0.95rem;
    color: #6c7a99;
    margin-top: 4px;
}

/* ---------- Download CTA buttons ---------- */
.app-download-page .download-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.app-download-page .dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #021a42;
    color: #fff;
    padding: 14px 22px;
    border-radius: 14px;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 8px 18px rgba(2, 26, 66, 0.18);
    min-width: 200px;
}

.app-download-page .dl-btn:hover:not(.is-disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(2, 26, 66, 0.24);
    color: #fff;
}

.app-download-page .dl-btn.is-highlight {
    background: linear-gradient(135deg, #4d6cf3 0%, #021a42 100%);
}

.app-download-page .dl-btn.is-disabled,
.app-download-page button.dl-btn[disabled] {
    background: #cdd3e0;
    color: #6c7a99;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.85;
    border: 0;
}

.app-download-page button.dl-btn { font: inherit; }

.app-download-page .dl-btn .dl-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.app-download-page .dl-btn .dl-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.app-download-page .dl-btn .dl-meta .dl-sub {
    font-size: 0.72rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-download-page .dl-btn .dl-meta .dl-main {
    font-size: 1rem;
    font-weight: 700;
}

/* ---------- QR block (desktop only by default) ---------- */
.app-download-page .qr-block {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(2, 26, 66, 0.08);
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.85rem;
    color: #4a5777;
}

.app-download-page .qr-block .qr-img {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    background: #f1f3f8;
    object-fit: cover;
}

.app-download-page .qr-block.is-hidden {
    display: none;
}

/* ---------- Hero mockups (right column) ---------- */
.app-download-page .mockup-stack {
    position: relative;
    height: 540px;
    perspective: 1200px;
}

.app-download-page .mockup-frame {
    position: absolute;
    width: 240px;
    height: 500px;
    border-radius: 38px;
    background: transparent;
    box-shadow:
        0 30px 60px rgba(20, 50, 120, 0.22),
        0 6px 14px rgba(20, 50, 120, 0.10);
    outline: 1px solid rgba(20, 50, 120, 0.08);
    outline-offset: -1px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c7a99;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 0;
}

.app-download-page .mockup-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Show a soft fill only when the frame has no screenshot inside (placeholder). */
.app-download-page .mockup-frame:not(:has(img)) {
    background: linear-gradient(180deg, #f0f4fc, #d9e1f2);
    padding: 16px;
}

.app-download-page .mockup-frame.m1 { left: 0;     top: 40px; transform: rotate(-6deg); z-index: 1; }
.app-download-page .mockup-frame.m2 { left: 140px; top: 0;    transform: rotate(0deg);  z-index: 3; }
.app-download-page .mockup-frame.m3 { left: 280px; top: 40px; transform: rotate(6deg);  z-index: 2; }

/* ---------- Generic section ---------- */
.app-download-page .section {
    padding: 72px 0;
}

.app-download-page .section-heading {
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    font-weight: 800;
    color: #021a42;
    text-align: center;
    margin-bottom: 12px;
}

.app-download-page .section-sub {
    text-align: center;
    color: #6c7a99;
    max-width: 640px;
    margin: 0 auto 44px;
}

/* ---------- Features (2 cards) ---------- */
.app-download-page .feature-card {
    height: 100%;
    background: #ffffff;
    border: 1px solid #eef1f7;
    border-radius: 20px;
    padding: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-download-page .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(20, 50, 120, 0.10);
}

.app-download-page .feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(135deg, #4d6cf3 0%, #021a42 100%);
    margin-bottom: 18px;
}

.app-download-page .feature-card.alt .feature-icon {
    background: linear-gradient(135deg, #ffb347 0%, #ff8a3d 100%);
}

.app-download-page .feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #021a42;
    margin-bottom: 8px;
}

.app-download-page .feature-desc {
    color: #4a5777;
    line-height: 1.6;
    margin-bottom: 16px;
}

.app-download-page .feature-cta {
    color: #4d6cf3;
    font-weight: 600;
    text-decoration: none;
}

.app-download-page .feature-cta:hover { text-decoration: underline; }

/* ---------- Screenshots row ---------- */
.app-download-page .screenshot-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    align-items: end;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.app-download-page .screenshot-row .screenshot-frame:nth-child(2) {
    transform: translateY(-24px);
}

.app-download-page .screenshot-frame {
    border-radius: 36px;
    background: transparent;
    overflow: hidden;
    aspect-ratio: 9 / 19.5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c7a99;
    font-weight: 600;
    text-align: center;
    padding: 0;
    box-shadow:
        0 24px 48px rgba(20, 50, 120, 0.15),
        0 6px 14px rgba(20, 50, 120, 0.08);
    outline: 1px solid rgba(20, 50, 120, 0.08);
    outline-offset: -1px;
}

.app-download-page .screenshot-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder fill only when no screenshot is loaded. */
.app-download-page .screenshot-frame:not(:has(img)) {
    background: linear-gradient(180deg, #f0f4fc, #d9e1f2);
    padding: 16px;
}

/* ---------- Why FlipEarth ---------- */
.app-download-page .why-card {
    text-align: center;
    padding: 18px;
}

.app-download-page .why-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4d6cf3;
    background: rgba(77, 108, 243, 0.10);
    margin-bottom: 14px;
    font-size: 1.3rem;
}

.app-download-page .why-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #021a42;
    margin-bottom: 6px;
}

.app-download-page .why-desc {
    font-size: 0.95rem;
    color: #6c7a99;
    line-height: 1.55;
}

/* ---------- FAQ ---------- */
.app-download-page .faq-section {
    background: #f7f9fd;
}

.app-download-page .faq-list {
    max-width: 760px;
    margin: 0 auto;
}

.app-download-page .faq-item {
    background: #ffffff;
    border: 1px solid #e7ecf6;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
}

.app-download-page .faq-q {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    padding: 18px 22px;
    font-weight: 600;
    color: #021a42;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.app-download-page .faq-q[aria-expanded="true"] .faq-chevron {
    transform: rotate(180deg);
}

.app-download-page .faq-chevron {
    transition: transform 0.2s ease;
    color: #6c7a99;
}

.app-download-page .faq-a {
    padding: 0 22px 20px;
    color: #4a5777;
    line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .app-download-page .hero { padding: 100px 0 60px; text-align: center; }
    .app-download-page .hero-tagline { margin-left: auto; margin-right: auto; }
    .app-download-page .download-row { justify-content: center; }
    .app-download-page .hero-logo-row { justify-content: center; }
    .app-download-page .mockup-stack { height: 480px; margin-top: 40px; transform: scale(0.8); transform-origin: top center; }
    .app-download-page .qr-block.is-hidden-mobile { display: none; }
}

@media (max-width: 767.98px) {
    .app-download-page .screenshot-row { grid-template-columns: 1fr; gap: 24px; max-width: 320px; margin: 0 auto; }
    .app-download-page .dl-btn { min-width: 0; flex: 1 1 100%; justify-content: center; }
}
