/* Font Face for Alpino */
@font-face {
    font-family: 'Alpino';
    src: url('assets/fonts/Alpino-Variable.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
}

:root {
    /* Colors from AppTheme */
    --primary-purple: #7e74ad;
    --light-purple: #b3a9d4;
    --pale-purple: #f3f1f9;
    --dark-purple: #5c5285;
    --teal: #14B8A6;
    --rose: #F43F5E;
    --off-white: #FAF9F6;
    --premium-black: #353935;
    --text-grey: #666;

    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -5px rgba(126, 116, 173, 0.2);

    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

body {
    font-family: 'Alpino', 'Outfit', sans-serif;
    /* Fallback to Outfit if Alpino fails */
    background-color: var(--pale-purple);
    color: var(--premium-black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    padding: 2rem;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 10;
}

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

.logo-icon {
    height: 48px;
    width: auto;
}

.logo-text {
    height: 24px;
    width: auto;
    opacity: 0.9;
}

/* Main */
main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
    /* Space for fixed header */
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 3rem;
}

@media (min-width: 900px) {
    .hero {
        flex-direction: row;
        text-align: left;
        padding: 4rem 2rem;
        height: 80vh;
        /* Fill clearer viewport on desktop */
    }

    .hero-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-image {
        flex: 1;
        display: flex;
        justify-content: center;
    }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-purple);
    line-height: 1.1;
}

.hero h1 .highlight {
    color: var(--primary-purple);
    position: relative;
    display: inline-block;
}

.hero h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    /* background-color: rgba(181, 169, 212, 0.3); */
    z-index: -1;
    border-radius: 4px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-grey);
    max-width: 500px;
    margin-bottom: 2.5rem;
}

/* CTA Buttons */
.cta-group {
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s var(--ease-elastic);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-hover);
    background-color: var(--dark-purple);
}

/* Store Links */
.store-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 900px) {
    .store-links {
        justify-content: flex-start;
    }
}

/* Store Buttons */
.store-btn {
    display: inline-flex;
    align-items: center;
    background: white;
    border: 1px solid rgba(126, 116, 173, 0.2);
    border-radius: 14px;
    padding: 8px 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    min-width: 170px;
    position: relative;
    /* overflow: hidden; Removed to allow badge to pop out */
}

.store-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(126, 116, 173, 0.15);
    /* Purple hint on hover */
    border-color: var(--light-purple);
}

.store-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    object-fit: contain;
    flex-shrink: 0;
}

.store-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.store-btn .caption {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-grey);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.store-btn .title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-purple);
    font-family: 'Alpino', sans-serif;
}

/* Customizing Logo Colors - Matching App Theme */
/* Attempt to shift the Default Blue to Purple */
.store-btn.apple .store-icon {
    filter: hue-rotate(30deg) saturate(0.9);
}

/* Special styling for disabled button */
.store-btn.disabled {
    opacity: 0.9;
    cursor: default;
    background: #fbfaff;
}

.upcoming-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--dark-purple);
    color: white;
    font-size: 0.45rem;
    padding: 3px 6px;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(92, 82, 133, 0.2);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* App Showcase Section */
.app-showcase {
    width: 100%;
    max-width: 1400px;
    /* Use more width */
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
}

.showcase-grid-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Refined Staggered Grid */
.showcase-grid {
    display: flex;
    gap: 24px;
    margin-top: 2rem;
    padding-bottom: 2rem;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    /* Constrain max width to keep images sane */
}

.grid-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

/* Stagger offsets */
.grid-column.col-1 {
    margin-top: 40px;
}

.grid-column.col-2 {
    margin-top: 0px;
}

/* Center column higher */
.grid-column.col-3 {
    margin-top: 40px;
}

.screenshot-card {
    background: transparent;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 4px solid white;
}

.screenshot-card img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .showcase-grid {
        gap: 12px;
    }

    .grid-column {
        gap: 12px;
    }

    .grid-column.col-1 {
        margin-top: 20px;
    }

    .grid-column.col-3 {
        margin-top: 20px;
    }

    .screenshot-card {
        border-radius: 12px;
        border-width: 2px;
    }
}

/* Security Section */
.security-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .security-section {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .security-content {
        flex: 1;
        padding-right: 4rem;
    }

    .security-visual {
        flex: 1;
        display: flex;
        justify-content: center;
    }
}

.security-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-purple);
    line-height: 1.2;
}

.security-content p {
    color: var(--text-grey);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.security-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tag {
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-purple);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(126, 116, 173, 0.15);
    transition: transform 0.3s ease;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--dark-purple);
}

.security-visual lottie-player {
    filter: drop-shadow(0 20px 40px rgba(126, 116, 173, 0.15));
}

/* Features - Bento Grid */
.features-container {
    padding: 6rem 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 20px;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr 1fr;
        grid-auto-rows: minmax(200px, auto);
        grid-auto-flow: row dense;
        /* Fill gaps automatically to support zigzag */
    }

    /* First item spans 2 cols, 2 rows (Large feature) */
    .bento-item.item-large {
        grid-column: 1 / 3;
        grid-row: span 2;
    }

    /* Reverse Large item (Right side) */
    .bento-item.item-large-reverse {
        grid-column: 2 / 4;
        grid-row: span 2;
    }
}

.bento-item {
    background: white;
    border-radius: 30px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(179, 169, 212, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.bento-item.item-large {
    flex-direction: row;
    text-align: left;
    align-items: center;
    background: linear-gradient(135deg, white 0%, #fbfaff 100%);
}

.bento-item.item-large .bento-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.bento-item.item-large .text-content {
    flex: 1;
}

.feature-icon-large {
    width: 280px;
    height: auto;
    transition: transform 0.3s ease;
}

@media (max-width: 900px) {
    .bento-item.item-large {
        flex-direction: column;
        text-align: center;
    }

    .bento-item.item-large .bento-content {
        flex-direction: column;
    }
}

.bento-item h3 {
    color: var(--primary-purple);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.bento-item p {
    color: var(--text-grey);
    font-size: 1rem;
}

.feature-icon {
    height: 140px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease;
}

.bento-item:hover .feature-icon,
.bento-item:hover .feature-icon-large {
    transform: scale(1.05);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Utility Animations */
.animate-enter {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s var(--ease-elastic) forwards;
}

.animate-pop {
    opacity: 0;
    transform: scale(0.9);
    animation: popIn 0.8s var(--ease-elastic) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}