/* ==============================================
   Sai Mobile Apps — Modern app showcase design system
   Dark, glassmorphic, gradient-driven.
   Shared by: app-page, support-page, privacy-page,
   terms-page, delete-account-page.
   Per-app --primary-color / --secondary-color are set
   inline by each template before this file takes effect.
   ============================================== */

:root {
    --bg-0: #05070d;
    --bg-1: #0b0f1e;
    --surface: rgba(255, 255, 255, 0.055);
    --surface-strong: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);
    --text: #f5f7fb;
    --text-dim: #aab1c9;
    --text-mute: #7d879e;
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: var(--bg-0);
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--secondary-color);
    color: #fff;
}

a {
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Gradient mesh backdrop, fixed behind everything */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--bg-0);
    overflow: hidden;
}

.bg-mesh::before,
.bg-mesh::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.32;
}

.bg-mesh::before {
    top: -15%;
    left: -10%;
    background: var(--secondary-color);
}

.bg-mesh::after {
    bottom: -20%;
    right: -10%;
    background: var(--primary-color);
    opacity: 0.28;
}

.bg-grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    opacity: 0.5;
}

/* Header / nav */
header.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(6, 9, 18, 0.6);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--border);
}

nav.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.brand img {
    height: 34px;
    width: 34px;
    border-radius: 9px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s;
}

.nav-links a:hover {
    color: var(--text);
}

.back-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.back-pill:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface-strong);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    border: 1px solid transparent;
}

.btn i {
    font-size: 1.2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--secondary-color) 70%, transparent);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
    backdrop-filter: blur(10px);
}

.btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.08);
}

.btn-ghost:hover {
    border-color: var(--border-strong);
    background: var(--surface-strong);
}

/* Eyebrow tag */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--secondary-color);
    box-shadow: 0 0 10px 2px var(--secondary-color);
}

/* Hero */
.hero {
    padding: 90px 0 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
    align-items: center;
}

.hero-copy h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 1.1rem 0 1.2rem;
}

.hero-copy .accent-text {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p.lede {
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 46ch;
    margin-bottom: 2.2rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-meta {
    display: flex;
    gap: 1.8rem;
    margin-top: 2.4rem;
    flex-wrap: wrap;
}

.hero-meta .meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hero-meta .meta-item strong {
    font-size: 1.4rem;
    font-family: 'Poppins', sans-serif;
}

.hero-meta .meta-item span {
    font-size: 0.85rem;
    color: var(--text-mute);
}

/* Phone mockup */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.phone-frame {
    position: relative;
    width: 280px;
    aspect-ratio: 9 / 19.5;
    border-radius: 46px;
    padding: 14px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-strong);
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 90px -20px var(--secondary-color);
    animation: float-phone 6s ease-in-out infinite;
}

.phone-frame .screen {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background: var(--bg-1);
    position: relative;
}

.phone-frame .screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.phone-frame .notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: var(--bg-1);
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

@keyframes float-phone {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-16px);
    }
}

/* Landscape cover art (marketing banners) doesn't fit a phone silhouette
   without cropping out text/logos — render it as a plain framed card instead. */
.phone-frame.is-landscape {
    width: min(100%, 460px);
    aspect-ratio: auto;
    padding: 0;
    border-radius: var(--radius-lg);
}

.phone-frame.is-landscape .notch {
    display: none;
}

.phone-frame.is-landscape .screen {
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 10;
}

.phone-frame.is-landscape .screen img {
    object-fit: contain;
    background: var(--bg-1);
}

@media (prefers-reduced-motion: reduce) {
    .phone-frame {
        animation: none;
    }
}

/* Sections */
.section {
    padding: 90px 0;
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.2rem;
}

.section-head .eyebrow {
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.section-sub {
    color: var(--text-dim);
    font-size: 1.05rem;
}

/* Stats */
.stats-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 3rem 0;
}

.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 1.4rem 2rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    min-width: 150px;
}

.stat-pill strong {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-pill span {
    color: var(--text-mute);
    font-size: 0.9rem;
}

/* Bento feature grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.4rem;
}

.bento-card {
    padding: 2rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(14px);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    background: var(--surface-strong);
}

.icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--secondary-color) 30%, transparent), color-mix(in srgb, var(--primary-color) 30%, transparent));
    border: 1px solid var(--border-strong);
    margin-bottom: 1.2rem;
}

.icon-badge i {
    font-size: 1.3rem;
    color: var(--text);
}

.bento-card h3 {
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Screenshot carousel */
.screenshot-carousel {
    display: flex;
    gap: 1.4rem;
    overflow-x: auto;
    padding: 1rem 0.2rem 2rem;
    scroll-snap-type: x mandatory;
}

.screenshot-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshot-carousel::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

.screenshot-carousel::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.shot-frame {
    flex: 0 0 240px;
    scroll-snap-align: start;
    border-radius: 26px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.shot-frame img {
    width: 100%;
    border-radius: 18px;
    display: block;
}

/* CTA panel */
.cta-panel {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 4.5rem 2rem;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, color-mix(in srgb, var(--secondary-color) 85%, black), color-mix(in srgb, var(--primary-color) 85%, black));
    border: 1px solid var(--border-strong);
}

.cta-panel h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    margin-bottom: 0.8rem;
}

.cta-panel p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.2rem;
    font-size: 1.05rem;
}

.cta-panel .btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.cta-panel .btn-primary {
    background: #fff;
    color: #10131c;
    box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.4);
}

/* Footer */
footer.site-footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.92rem;
    transition: color 0.25s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    color: var(--text-mute);
    font-size: 0.88rem;
}

/* Scroll reveal — hidden state is only applied once JS arms it, so
   content stays visible by default if JS fails to load or run. */
.reveal.reveal-armed {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-armed.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal.reveal-armed {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==============================================
   Legal / content pages (support, privacy, terms,
   delete-account) — same shell, readable long-form
   ============================================== */

.legal-hero {
    padding: 70px 0 30px;
    text-align: center;
}

.legal-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 2.7rem);
    margin: 1rem 0 0.6rem;
    letter-spacing: -0.01em;
}

.legal-hero p {
    color: var(--text-dim);
    font-size: 1.05rem;
}

.legal-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    backdrop-filter: blur(16px);
    margin-bottom: 60px;
}

.last-updated {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-mute);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 2.2rem;
}

.legal-shell h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    margin-top: 2.4rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--secondary-color);
    color: var(--text);
}

.legal-shell h2:first-child {
    margin-top: 0;
}

.legal-shell h3 {
    margin-top: 1.6rem;
    margin-bottom: 0.7rem;
    color: var(--text);
    font-size: 1.05rem;
}

.legal-shell p {
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.legal-shell ul {
    margin: 0 0 1rem 1.4rem;
    color: var(--text-dim);
}

.legal-shell li {
    margin-bottom: 0.5rem;
}

.contact-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    backdrop-filter: blur(14px);
}

.contact-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

.contact-section p {
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

/* FAQ accordion (native details/summary) */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.1rem 1.4rem;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--text);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
    color: var(--text-mute);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-item .faq-answer {
    color: var(--text-dim);
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
}

.section-block {
    padding: 60px 0;
}

.section-block+.section-block {
    padding-top: 0;
}

/* Mobile */
@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-copy p.lede {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-meta {
        justify-content: center;
    }

    .download-buttons {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .legal-shell {
        padding: 1.8rem;
    }

    .nav-links {
        gap: 1.1rem;
    }
}

@media (max-width: 520px) {
    .nav-links {
        display: none;
    }

    .section {
        padding: 60px 0;
    }

    .phone-frame {
        width: 220px;
    }

    .back-pill {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.5rem 0.85rem;
    }

    .nav-inner {
        flex-wrap: nowrap;
    }
}
