/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { overflow-x: hidden; }

/* ===== Animations ===== */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse-slow { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.05); } }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes rotate-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes gradient-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.animate-fade-in { animation: fade-in 1s ease-out both; }
.animate-fade-in-up { animation: fade-in-up 1s ease-out both; }
.animate-fade-in-down { animation: fade-in-down 0.8s ease-out both; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse-slow { animation: pulse-slow 6s ease-in-out infinite; }
.animate-scale-in { animation: scale-in 0.8s ease-out both; }

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.5s; }
.stagger-children .reveal:nth-child(7) { transition-delay: 0.6s; }
.stagger-children .reveal:nth-child(8) { transition-delay: 0.7s; }
.stagger-children .reveal:nth-child(9) { transition-delay: 0.8s; }

/* ===== Navigation ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
#navbar.scrolled {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ===== Hero Gradient Background ===== */
.hero-gradient {
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0,122,255,0.12) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 30% 60%, rgba(0,199,190,0.08) 0%, transparent 50%),
                radial-gradient(ellipse 50% 40% at 70% 30%, rgba(90,200,250,0.06) 0%, transparent 50%);
}

/* ===== Hero Phone Image ===== */
.hero-phone {
    filter: drop-shadow(0 40px 80px rgba(0,122,255,0.15)) drop-shadow(0 20px 40px rgba(0,0,0,0.4));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-phone:hover {
    transform: translateY(-8px) scale(1.02);
}

/* ===== Glassmorphism Cards ===== */
.glass-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ===== Feature Image Sections ===== */
.feature-img {
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}
.feature-img:hover {
    transform: scale(1.02);
    box-shadow: 0 30px 100px rgba(0,122,255,0.15);
}
.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== Step Cards ===== */
.step-card {
    position: relative;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 28px;
    padding: 40px 32px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,122,255,0.5), rgba(0,199,190,0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.step-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-8px);
}
.step-card:hover::before {
    opacity: 1;
}

/* ===== Platform Cards ===== */
.platform-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.platform-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.platform-card:hover {
    transform: translateY(-8px);
    border-color: var(--platform-color, rgba(255,255,255,0.15));
}
.platform-card:hover::after {
    opacity: 1;
    background: radial-gradient(circle at 50% 0%, var(--platform-color, rgba(0,122,255,0.1)) 0%, transparent 70%);
}

/* ===== Template Scroll ===== */
.template-scroll {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.template-track {
    display: flex;
    gap: 20px;
    animation: scroll-left 45s linear infinite;
    width: max-content;
}
.template-track:hover { animation-play-state: paused; }
.template-card {
    width: 240px;
    height: 300px;
    border-radius: 24px;
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.template-card:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.15);
}
.template-content {
    padding: 24px;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

/* ===== Language Badges ===== */
.lang-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-badge:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,122,255,0.1);
}

/* ===== Pricing Cards ===== */
.pricing-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 28px;
    padding: 36px 28px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pricing-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.pricing-card.popular {
    border-color: rgba(0,122,255,0.4);
    background: linear-gradient(180deg, rgba(0,122,255,0.06) 0%, rgba(0,199,190,0.03) 100%);
}
.pricing-card.popular:hover {
    border-color: rgba(0,122,255,0.6);
    box-shadow: 0 20px 60px rgba(0,122,255,0.15);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.testimonial-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-4px);
}

/* ===== FAQ ===== */
.faq-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-item:hover { border-color: rgba(255,255,255,0.1); }
.faq-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    gap: 16px;
    transition: padding 0.3s ease;
}
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}
.faq-content.open {
    max-height: 300px;
    padding: 0 28px 22px;
}
.faq-toggle svg { transition: transform 0.3s ease; }
.faq-toggle svg.rotated { transform: rotate(180deg); }

/* ===== Icon Containers ===== */
.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.icon-box:hover {
    transform: scale(1.1);
}

/* ===== CTA Glow ===== */
.cta-glow {
    position: relative;
}
.cta-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, #007AFF, #00C7BE, #5AC8FA);
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: opacity 0.4s ease;
}
.cta-glow:hover::before {
    opacity: 0.6;
}

/* ===== Section Dividers ===== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.06) 70%, transparent 100%);
}

/* ===== Safari Mobile Fix ===== */
@supports (-webkit-touch-callout: none) {
    .min-h-screen { min-height: -webkit-fill-available; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-phone { max-width: 320px !important; }
}
@media (max-width: 768px) {
    .hero-phone { max-width: 280px !important; }
    .template-card { width: 200px; height: 250px; }
}
@media (max-width: 480px) {
    .hero-phone { max-width: 240px !important; }
    .template-card { width: 180px; height: 220px; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ===== Selection ===== */
::selection {
    background: rgba(0,122,255,0.3);
    color: white;
}
