@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #BB86FC;
    --primary-dark: #3700B3;
    --primary-light: #6200EE;
    --accent: #03DAC5;
    --accent-dark: #018786;

    --bg-color: #121212;
    --surface-color: #1E1E1E;
    --text-main: #ffffff;
    --text-secondary: #aaaaaa;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Skip Link - WCAG 2.4.1 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #6200EA;
    /* Dark purple for 7.8:1 contrast */
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Focus Visible - WCAG 2.4.7 */
a:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    width: auto;
    border-radius: 12px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary);
    /* Fallback */
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Compact Hero */
.hero {
    text-align: center;
    padding: 3rem 1.5rem 1rem;
    background: radial-gradient(circle at top right, rgba(187, 134, 252, 0.1), transparent 45%),
        radial-gradient(circle at bottom left, rgba(3, 218, 197, 0.1), transparent 45%);
    animation: fadeIn 0.8s ease-out forwards;
}

.hero h2 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout (Restructured for neatness) */
.features-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* slightly narrower min-width */
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.feature-card {
    background: var(--surface-color);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Top accent line */
    border-top: 4px solid transparent;
    background-clip: padding-box;
    animation: fadeIn 0.8s ease-out both;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(98, 0, 238, 0.1);
    border-color: rgba(98, 0, 238, 0.15);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin: 0 0 0.8rem 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.feature-card p {
    font-size: 1.05rem;
    color: var(--text-main);
    opacity: 0.85;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    max-width: 90%;
    font-weight: 400;
}

/* Constrained Phone Frame */
.card-phone-frame {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 220px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover .card-phone-frame {
    transform: scale(1.05) translateY(-5px);
}

.card-phone-frame img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

/* Privacy Section */
.privacy-banner {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    margin: 3rem auto 1.5rem;
    /* Reduced bottom margin */
    max-width: 850px;
    text-align: center;
    border: 1px solid rgba(187, 134, 252, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-out both;
    animation-delay: 0.4s;
}

.privacy-banner h2 {
    font-size: 1.6rem;
    /* Slightly smaller h2 */
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.privacy-banner p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}

.privacy-banner strong {
    color: var(--accent);
    font-weight: 600;
}

/* Footer Section */
.footer {
    text-align: center;
    padding: 3rem 2rem 4rem;
    /* Reduced top padding */
    background: radial-gradient(circle at top, rgba(98, 0, 238, 0.04), transparent 70%);
}

.footer h3 {
    font-size: 1.6rem;
    /* More balanced size */
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.footer p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.store-badge {
    display: inline-block;
    transition: transform 0.3s ease;
}

.store-badge img {
    height: 64px;
    /* Slightly larger */
    width: auto;
}

.btn-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    /* Ensure buttons stack if needed */
    gap: 1.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.legal-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    /* Slightly larger for readability */
    font-weight: 500;
    transition: all 0.2s ease;
    opacity: 0.8;
    padding: 12px 18px;
    /* Significantly improved hit area */
    display: inline-block;
}

.legal-link:hover {
    color: var(--primary);
    opacity: 1;
}

.btn {
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(98, 0, 238, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(98, 0, 238, 0.35);
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(98, 0, 238, 0.04);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero h2 {
        font-size: 2.4rem;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.5rem 0.8rem;
        flex-direction: row;
        /* Keep it horizontal like PC */
        justify-content: space-between;
        gap: 0.4rem;
    }

    .nav-links {
        width: auto;
        gap: 8px;
        /* Tighter gap for mobile */
        padding-top: 0;
        border-top: none;
    }

    .nav-links a {
        font-size: 0.7rem;
        /* Smaller links for mobile */
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-img {
        height: 24px;
    }

    .hero {
        padding: 4rem 1.2rem 2rem;
    }

    .hero h2 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.95rem;
        opacity: 0.9;
    }

    .feature-card {
        padding: 1.5rem 1.2rem;
    }

    .feature-card h3 {
        font-size: 1.25rem;
    }

    .feature-card p {
        font-size: 0.95rem;
    }

    .privacy-banner {
        padding: 2rem 1.2rem;
        margin: 2rem 1rem;
        border-radius: var(--radius-md);
    }

    .privacy-banner h2 {
        font-size: 1.3rem;
    }

    .privacy-banner p {
        font-size: 0.9rem;
    }

    .footer {
        padding: 4rem 1.2rem 3rem;
    }

    .footer h3 {
        font-size: 1.5rem;
    }

    .store-badge img {
        height: 54px;
        /* Slightly smaller for mobile */
    }

    .btn-group {
        gap: 0.8rem;
        margin-top: 2rem;
        padding-top: 1.2rem;
    }

    .cta-container {
        gap: 1rem;
    }

    .legal-link {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
}

/* Store Badge */
.store-badge {
    display: inline-block;
    margin-top: 1.5rem;
    transition: transform 0.3s ease;
}

.store-badge img {
    height: 60px;
    /* Standard badge height */
    width: auto;
}

.store-badge:hover {
    transform: scale(1.05);
}

.community-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.1), rgba(3, 218, 197, 0.05));
    color: var(--text-main);
    padding: 12px 24px;
    /* Slightly larger for better touch target */
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0;
    border: 1px solid rgba(187, 134, 252, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    /* Better separation for touch */
    margin-top: 2.5rem;
}

.cta-container .store-badge {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    /* Standard accessible touch target */
}

.community-badge:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.community-badge .pulse {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px var(--accent);
}

.community-badge .pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.7);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}