@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- THEME VARIABLES ---- */

:root {
    --btn-color: #fdfdfd;
    --btn-bg: #7c6be6;
    --primary-text-color: #7c6be6;
    --header-link-hover: #a89cf0;
    --input-hover-bd-color: #7c6be6;

    /* Hero dots filter (invert light dots to dark for light bg) */
    --hero-dots-filter: invert(1) brightness(0.35);

    /* Hero gradient overlay */
    --hero-gradient: linear-gradient(180deg, rgba(255,255,255,0.65) 30%, rgba(255,255,255,0) 65%);

    /* Hero badge */
    --hero-badge-bg: rgba(124,107,230,0.12);
    --hero-badge-color: #7c6be6;
    --hero-badge-border: rgba(124,107,230,0.12);

    /* Store buttons (hero - solid) */
    --store-btn-bg: #111827;
    --store-btn-color: #fff;
    --store-btn-border: rgba(0,0,0,0.1);
    --store-btn-hover-bg: #1f2937;
    --store-btn-hover-shadow: 0 8px 24px -4px rgba(0,0,0,0.15);
    --store-btn-apple-fill: #fff;

    /* Store buttons (CTA - inverted) */
    --store-btn-inv-bg: transparent;
    --store-btn-inv-color: #111827;
    --store-btn-inv-border: rgba(0,0,0,0.15);
    --store-btn-inv-hover-bg: rgba(0,0,0,0.04);
    --store-btn-inv-hover-border: rgba(0,0,0,0.3);
    --store-btn-inv-apple-fill: #111827;

    /* Mobile header */
    --mobile-header-bg: #ffffff;
    --mobile-header-color: #111827;
    --mobile-header-shadow: 2px 0px 3px #c0c0c0;
    --mobile-header-link-color: #111827;
}

.tw-dark {
    /* Hero gradient overlay */
    --hero-gradient: linear-gradient(180deg, rgba(24,27,33,0.9) 30%, rgba(0,0,0,0.258140756302521) 65%);

    /* Hero badge */
    --hero-badge-bg: rgba(124,107,230,0.1);
    --hero-badge-color: #a89cf0;
    --hero-badge-border: rgba(124,107,230,0.2);

    /* Store buttons (hero - solid) */
    --store-btn-bg: #fff;
    --store-btn-color: #0f0f0f;
    --store-btn-border: rgba(255,255,255,0.1);
    --store-btn-hover-bg: #f3f3f3;
    --store-btn-hover-shadow: 0 8px 24px -4px rgba(0,0,0,0.3);
    --store-btn-apple-fill: #0f0f0f;

    /* Store buttons (CTA - inverted) */
    --store-btn-inv-bg: transparent;
    --store-btn-inv-color: #fff;
    --store-btn-inv-border: rgba(255,255,255,0.15);
    --store-btn-inv-hover-bg: rgba(255,255,255,0.05);
    --store-btn-inv-hover-border: rgba(255,255,255,0.3);
    --store-btn-inv-apple-fill: #fff;

    /* Mobile header */
    --mobile-header-bg: #181b21;
    --mobile-header-color: #ffffff;
    --mobile-header-shadow: 2px 0px 3px #9f9f9f;
    --mobile-header-link-color: rgb(255, 255, 255);
}

html {
    scroll-behavior: smooth;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* ---- HEADER / COLLAPSIBLE ---- */

header > .collapsible-header {
    display: flex;
    gap: 1rem;
    width: 100%;
    background-color: inherit;
    place-content: center;
    overflow: hidden;
    transition: width 0.3s ease;
}

.animated-collapse {
    transition: width 0.3s ease;
}

.header-links {
    display: flex;
    align-items: center;
    min-width: fit-content;
    border-radius: 10px;
    padding: 5px 10px;
    transition: background-color 0.5s, color 0.5s;
}

.header-links:hover {
    color: var(--header-link-hover);
}

/* ---- GRADIENT TEXT ---- */

.gradient-text {
    background: linear-gradient(93deg, #7c6be6 12%, #5b8def 49%, #9f79ff 93%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ---- HERO ---- */

.hero-section {
    position: relative;
    background-color: #f5f3fc;
}

.tw-dark .hero-section {
    background-color: transparent;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/images/background/dots.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
    filter: var(--hero-dots-filter, none);
}

.tw-dark .hero-section::before {
    filter: none;
}

.hero-bg-gradient {
    background: var(--hero-gradient);
    position: relative;
    z-index: 1;
}

/* ---- HERO BADGE ---- */

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--hero-badge-bg);
    color: var(--hero-badge-color);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.15rem;
    border-radius: 100px;
    border: 1px solid var(--hero-badge-border);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: #7c6be6;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* ---- STORE BUTTONS ---- */

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--store-btn-bg);
    color: var(--store-btn-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 11px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
    border: 1px solid var(--store-btn-border);
    min-width: 200px;
}

.store-btn:hover {
    background: var(--store-btn-hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--store-btn-hover-shadow);
}

.store-btn svg { flex-shrink: 0; }
.store-btn-text { text-align: left; line-height: 1.2; }
.store-btn-label { font-size: 0.6rem; font-weight: 400; opacity: 0.7; letter-spacing: 0.01em; }
.store-btn-name { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }

.store-btn .apple-fill { fill: var(--store-btn-apple-fill); }

.store-btn-inverted {
    background: var(--store-btn-inv-bg);
    color: var(--store-btn-inv-color);
    border: 1px solid var(--store-btn-inv-border);
}

.store-btn-inverted:hover {
    background: var(--store-btn-inv-hover-bg);
    border-color: var(--store-btn-inv-hover-border);
}

.store-btn-inverted .apple-fill { fill: var(--store-btn-inv-apple-fill); }

footer .store-btn-inverted {
    color: #fff;
    border-color: rgba(255,255,255,0.15);
}
footer .store-btn-inverted:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}
footer .store-btn-inverted .apple-fill { fill: #fff; }

.store-btn-sm {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    min-width: auto;
    font-size: 0.8rem;
}

.store-btn-sm .store-btn-label { font-size: 0.5rem; }
.store-btn-sm .store-btn-name { font-size: 0.8rem; }

/* ---- IPHONE MOCKUP ---- */

.iphone-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(124,107,230,0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(60px);
    z-index: 0;
}

.tw-dark .iphone-glow {
    background: rgba(124,107,230,0.06);
}

.iphone-frame {
    width: 280px;
    position: relative;
    z-index: 1;
    border-radius: 40px;
    border: 4px solid #2a2a2e;
    background: #000;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.08),
        0 4px 8px rgba(0,0,0,0.12),
        0 12px 32px rgba(0,0,0,0.2),
        0 40px 80px rgba(0,0,0,0.18);
    transform: rotate(2deg);
}

.tw-dark .iphone-frame {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.05),
        0 4px 8px rgba(0,0,0,0.08),
        0 12px 32px rgba(0,0,0,0.1);
}

.iphone-frame img,
.iphone-frame video {
    width: 100%;
    height: auto;
    display: block;
}

.iphone-frame .demo-dark { display: none; }
.tw-dark .iphone-frame .demo-light { display: none; }
.tw-dark .iphone-frame .demo-dark { display: block !important; }

.iphone-frame-sm {
    width: 260px;
    transform: none;
}

/* ---- THEME TOGGLE ---- */

#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

#theme-toggle:hover {
    background: rgba(128,128,128,0.15);
}

/* ---- FEATURE ICONS ---- */

.feature-icon {
    font-size: 2rem;
    line-height: 1;
}

/* ---- SECTION BACKGROUNDS ---- */

.section-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.07) 30%, rgba(0,0,0,0.07) 70%, transparent);
}

.tw-dark .section-divider {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent);
}

.section-alt {
    background-color: #f7f6fb;
}

.tw-dark .section-alt {
    background-color: #1e222b;
}

.section-privacy {
    background: linear-gradient(135deg, rgba(124,107,230,0.04) 0%, rgba(91,141,239,0.04) 100%);
}

.tw-dark .section-privacy {
    background: linear-gradient(135deg, rgba(124,107,230,0.08) 0%, rgba(91,141,239,0.06) 100%);
}

/* ---- FEATURE CARDS ---- */

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 2rem 2rem 2.5rem;
    border-radius: 16px;
    min-height: 200px;
    transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
}

.feature-card:hover {
    transform: translateY(-2px);
}

:root .feature-card:hover {
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.tw-dark .feature-card:hover {
    background: #252a34;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.feature-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 12px;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    background: rgba(0,0,0,0.05);
}

.tw-dark .feature-card-icon {
    background: rgba(255,255,255,0.08);
}

/* ---- USE CASE LIST ---- */

.use-case-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
    width: 2.5rem;
    text-align: center;
}

.use-case-item {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    transition: background 0.2s;
}

:root .use-case-item {
    background: transparent;
}

.tw-dark .use-case-item {
    background: transparent;
}

:root .use-case-item:hover {
    background: rgba(0,0,0,0.05);
}

.tw-dark .use-case-item:hover {
    background: rgba(255,255,255,0.06);
}

/* ---- STEP TIMELINE ---- */

.step-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-left: 2.5rem;
}

.step-timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #7c6be6 0%, #5b8def 50%, #9f79ff 100%);
    border-radius: 2px;
}

.step-item {
    position: relative;
}

.step-item::before {
    content: "";
    position: absolute;
    left: -2.5rem;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #7c6be6;
    box-shadow: 0 0 0 4px rgba(124,107,230,0.15);
}

/* ---- CARD HOVER EFFECTS (legacy) ---- */

/* ---- LANGUAGE TAGS ---- */

.lang-tag {
    transition: all 0.15s ease;
}

.lang-tag:hover {
    transform: translateY(-1px);
}

:root .lang-tag:hover {
    border-color: #c7c7cc;
    color: #1a1a1a;
    background: #fff;
}

.tw-dark .lang-tag:hover {
    border-color: #555c68;
    color: #fff;
    background: #232833;
}

/* ---- CTA SECTION ---- */

.section-cta {
    background: #ece9f6;
}

.tw-dark .section-cta {
    background: #171a23;
}

.cta-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(124,107,230,0.12) 0%, transparent 65%);
    pointer-events: none;
    filter: blur(60px);
}

.tw-dark .cta-glow {
    background: radial-gradient(circle, rgba(124,107,230,0.15) 0%, transparent 65%);
}

/* ---- GENERAL HELPERS ---- */

.opacity-0 {
    opacity: 0 !important;
}

.opacity-100 {
    opacity: 100 !important;
}

.btn {
    padding: 10px 15px;
    width: max-content;
    border-radius: 24px;
    color: var(--btn-color);
    background-color: var(--btn-bg);
    justify-content: center;
    align-items: center;
    display: flex;
    cursor: pointer;
}

.btn:disabled {
    cursor: default;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .iphone-frame { width: 220px; border-radius: 32px; border-width: 3px; }
    .iphone-frame-sm { width: 200px; }
}

/* ---- COLLAPSIBLE HEADER (mobile) ---- */

@media not all and (min-width: 1024px) {
    header .collapsible-header {
        position: fixed;
        right: 0px;
        flex-direction: column;
        opacity: 0;
        height: 100vh;
        min-height: 100vh;
        height: 100dvh;
        width: 0vw;
        justify-content: space-between;
        padding: 5px;
        padding-top: 5%;
        padding-bottom: 5%;
        place-items: end;
        background-color: var(--mobile-header-bg);
        color: var(--mobile-header-color);
        overflow-y: auto;
        box-shadow: var(--mobile-header-shadow);
    }

    .header-links {
        color: var(--mobile-header-link-color);
    }
}
