/* Root Variables - Matching Rokki App Theme */
:root {
    --color-primary: #2ECC71;
    --color-primary-dark: #27AE60;
    --color-secondary: #34495E;
    --color-background: #F8F9FA;
    --color-surface: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-secondary: #7F8C8D;
    --color-text-light: #BDC3C7;
    --color-border: #E1E4E8;
    --color-success: #2ECC71;
    --color-error: #E74C3C;

    /* App Color Palette Gradients */
    --gradient-green: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    --gradient-blue: linear-gradient(135deg, #3498DB 0%, #2980B9 100%);
    --gradient-purple: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    --gradient-orange: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    --gradient-pink: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
    --gradient-teal: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --border-radius: 16px;
    --border-radius-large: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent layout shift from animations */
.hero-content,
.hero-image {
    will-change: transform, opacity;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

.nav-logo span {
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-primary);
}

.btn-download-nav {
    padding: 0.5rem 1.25rem;
    background: var(--color-text);
    color: white !important;
    border-radius: 20px;
    font-size: 0.875rem !important;
}

.btn-download-nav:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 4rem;
    overflow-x: clip;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--color-text);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-large .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    flex-shrink: 0;
}

.btn-icon-small {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Phone Mockup */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 8rem;
}

.phone-stack {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    min-height: 700px;
    margin: 0 auto;
    overflow: visible;
}

.phone-mockup {
    position: relative;
    transition: transform 0.3s ease-out;
}

.simulator-screenshot {
    width: 340px;
    height: auto;
    display: block;
    border-radius: 55px;
    background: #000;
}

.phone-center {
    position: relative;
    z-index: 3;
}

.phone-center .simulator-screenshot {
    filter: drop-shadow(0 25px 70px rgba(0, 0, 0, 0.35));
}

.phone-left .simulator-screenshot,
.phone-right .simulator-screenshot {
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.2));
}

.phone-left,
.phone-right {
    position: absolute;
    top: 0;
    left: 50%;
    opacity: 0;
    filter: none;
    margin-left: -170px; /* Half of phone width (340px / 2) to center */
}

.phone-left {
    z-index: 1;
    transform: translateX(0) rotate(0deg) scale(0.92);
    animation: fanOutLeft 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.phone-right {
    z-index: 2;
    transform: translateX(0) rotate(0deg) scale(0.92);
    animation: fanOutRight 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.phone-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 37px;
    background: #0D0D0D;
    border-radius: 19px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dynamic Island pill shape for iPhone 17 */
.phone-notch::before {
    content: '';
    width: 100%;
    height: 100%;
    background: #1D1D1F;
    border-radius: 19px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--color-background);
    border-radius: 47px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.screenshot-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: white;
}

.placeholder-content svg {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.placeholder-content p {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 500;
}

.screenshot-purple {
    background: var(--gradient-purple);
}

.screenshot-blue {
    background: var(--gradient-blue);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: var(--color-surface);
}

.features-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}

.features-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-large);
    transition: var(--transition);
    border: 1px solid var(--color-border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-green);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-card:nth-child(2) .feature-icon {
    background: var(--gradient-blue);
}

.feature-card:nth-child(3) .feature-icon {
    background: var(--gradient-purple);
}

.feature-card:nth-child(4) .feature-icon {
    background: var(--gradient-orange);
}

.feature-card:nth-child(5) .feature-icon {
    background: var(--gradient-pink);
}

.feature-card:nth-child(6) .feature-icon {
    background: var(--gradient-teal);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

/* Screenshots Section */
.screenshots {
    padding: 6rem 2rem;
    background: white;
}

.screenshots-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.screenshots-container .section-title {
    margin-bottom: 3rem;
}

.screenshots-carousel {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 5rem 0;
    margin: -7rem 0;
}

.screenshots-carousel::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.screenshot-small {
    width: 260px;
    height: auto;
    display: block;
    border-radius: 44px;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.12));
    transition: all 0.3s ease;
}

.screenshot-small:hover {
    transform: translateY(-12px);
    filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.18));
}

.carousel-indicators {
    display: none;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    transition: var(--transition);
    cursor: pointer;
}

.indicator.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}

/* CTA Section */
.cta {
    padding: 8rem 2rem;
    background: var(--gradient-green);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.cta .btn-primary {
    background: white;
    color: var(--color-text);
}

.cta .btn-primary svg {
    stroke: var(--color-text);
}

.cta .btn-primary:hover {
    background: var(--color-surface);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background: var(--color-text);
    color: white;
    padding: 3rem 2rem 2rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.2);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Sticky Mobile Download Button */
.mobile-download-sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 80%, rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.mobile-download-sticky.show {
    transform: translateY(0);
    pointer-events: all;
}

.btn-mobile-sticky {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow:
        0 4px 20px rgba(46, 204, 113, 0.4),
        0 0 0 1px rgba(46, 204, 113, 0.1);
    transition: var(--transition);
}

.btn-mobile-sticky:active {
    transform: scale(0.98);
    box-shadow: 0 2px 12px rgba(46, 204, 113, 0.4);
}

.btn-mobile-sticky svg {
    stroke: white;
}

/* Show sticky button only on mobile */
@media (max-width: 968px) {
    .mobile-download-sticky {
        display: block;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        padding: 7rem 1.5rem 2rem;
        text-align: center;
        min-height: 100vh;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image {
        padding-right: 0;
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .hero-cta .btn-primary {
        width: 100%;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a:not(.btn-download-nav) {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .features {
        padding: 4rem 1rem;
    }

    .screenshots {
        padding: 4rem 0;
    }

    .screenshots-container .section-title {
        padding: 0 1.5rem;
    }

    .screenshots-carousel {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0 1.5rem;
        gap: 1.5rem;
        margin: 0;
    }

    .screenshot-item {
        flex: 0 0 auto;
        width: calc(100vw - 6rem);
        max-width: 340px;
    }

    .carousel-indicators {
        display: flex;
    }

    .screenshot-small {
        filter: none;
        width: 100%;
    }

    .screenshot-small:hover {
        transform: none;
        filter: none;
    }

    .cta {
        padding: 4rem 1.5rem;
    }

    .cta .btn-primary {
        width: 100%;
        max-width: 400px;
    }

    /* Add padding to bottom of page for sticky button */
    .footer {
        padding-bottom: 6rem;
    }
}

@media (max-width: 640px) {
    .simulator-screenshot {
        width: 260px;
    }

    .phone-stack {
        max-width: 100%;
        min-height: auto;
    }

    .phone-left,
    .phone-right {
        margin-left: -130px; /* Half of 260px */
    }

    /* Adjust phone positions for smaller screens */
    @keyframes fanOutLeft {
        from {
            opacity: 0;
            transform: translateX(0) rotate(0deg) scale(0.92);
        }
        to {
            opacity: 0.75;
            transform: translateX(-40px) rotate(-10deg) scale(0.85);
        }
    }

    @keyframes fanOutRight {
        from {
            opacity: 0;
            transform: translateX(0) rotate(0deg) scale(0.92);
        }
        to {
            opacity: 0.75;
            transform: translateX(40px) rotate(10deg) scale(0.85);
        }
    }

    .hero {
        padding: 6rem 1rem 2rem;
        gap: 2rem;
    }

    .hero-title {
        font-size: 1.875rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.0625rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .feature-icon svg {
        width: 36px;
        height: 36px;
    }

    .feature-title {
        font-size: 1.25rem;
    }

    .nav-container {
        padding: 0.875rem 1rem;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-icon {
        width: 32px;
        height: 32px;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
    }

    .btn-icon-small {
        width: 24px;
        height: 24px;
    }

    .btn-download-nav {
        font-size: 0.8125rem;
        padding: 0.4rem 1rem;
    }

    .cta {
        padding: 3rem 1rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-subtitle {
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.625rem;
    }

    .simulator-screenshot {
        width: 240px;
    }

    .phone-stack {
        max-width: 100%;
        min-height: auto;
    }

    .phone-left,
    .phone-right {
        margin-left: -120px; /* Half of 240px */
    }

    /* Further adjust phone positions for very small screens */
    @keyframes fanOutLeft {
        from {
            opacity: 0;
            transform: translateX(0) rotate(0deg) scale(0.92);
        }
        to {
            opacity: 0.7;
            transform: translateX(-30px) rotate(-8deg) scale(0.82);
        }
    }

    @keyframes fanOutRight {
        from {
            opacity: 0;
            transform: translateX(0) rotate(0deg) scale(0.92);
        }
        to {
            opacity: 0.7;
            transform: translateX(30px) rotate(8deg) scale(0.82);
        }
    }

    .btn-mobile-sticky {
        font-size: 0.9375rem;
        padding: 0.875rem 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fanOutLeft {
    from {
        opacity: 0;
        transform: translateX(0) rotate(0deg) scale(0.92);
    }
    to {
        opacity: 0.85;
        transform: translateX(-60px) rotate(-12deg) scale(0.88);
    }
}

@keyframes fanOutRight {
    from {
        opacity: 0;
        transform: translateX(0) rotate(0deg) scale(0.92);
    }
    to {
        opacity: 0.85;
        transform: translateX(60px) rotate(12deg) scale(0.88);
    }
}

.hero-content,
.hero-image {
    animation: fadeInUp 0.8s ease-out;
}

.hero-image {
    animation-delay: 0.2s;
}
