/* Custom Font */
@font-face {
    font-family: 'Dymon-ShouXieTi';
    src: url('fonts/Dymon-ShouXieTi.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}


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

:root {
    /* PandanColors palette */
    --primary-color: #92c661; /* green */
    --secondary-color: #bfadff; /* purple */
    --light-green: #c7e8a7;
    --orange: #ffbb43;
    --light-orange: #eecf9d;
    --light-purple: #ede8ff;
    --light-gray: #dcded9;
    --barely-not-white: #fafaf9;

    /* Structure colors */
    --card-color: var(--light-purple);
    --scaffold-background: var(--barely-not-white);
    --dark-color: #2d3436;
}


a {
    color: var(--primary-color);
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
    background-color: var(--scaffold-background);
    position: relative;
}

/* Background with reduced saturation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/tilablebg.png');
    background-repeat: repeat;
    background-size: 400px 400px;
    filter: saturate(50%);
    z-index: -1;
}

/* Navigation Bar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* Feathered bottom edge */
.navbar::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(250, 250, 249, 0.8) 20%,
        rgba(250, 250, 249, 0.5) 50%,
        rgba(250, 250, 249, 0.2) 75%,
        transparent 100%);
    pointer-events: none;
    backdrop-filter: blur(4px);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: bold;
    font-family: 'Dymon-ShouXieTi', sans-serif;
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 0.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 40px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    z-index: 1;
}

.hero-text {
    flex: 1;
    position: relative;
    padding: 2rem;
}

/* Feathered background for text readability */
.hero-text::before {
    content: '';
    position: absolute;
    top: -1.5rem;
    left: -1.5rem;
    right: -1.5rem;
    bottom: -1.5rem;
    background: radial-gradient(ellipse at center,
        rgba(250, 250, 249, 0.95) 10%,
        rgba(250, 250, 249, 0.85) 50%,
        rgba(250, 250, 249, 0.6) 60%,
        rgba(250, 250, 249, 0.3) 80%,
        transparent 100%);
    border-radius: 30px;
    z-index: -1;
    filter: blur(10px);
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-family: 'Dymon-ShouXieTi', sans-serif;
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-3px);
}

.btn-download img {
    height: 65px;
    width: auto;
}

/* Disabled state for app store badges */
.btn-download.disabled {
    cursor: not-allowed;
    position: relative;
    transition: opacity 0.2s ease;
}

.btn-download.disabled:hover,
.btn-download.disabled:active {
    transform: none;
    opacity: 0.5;
}

/* Coming soon label */
.store-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.coming-soon {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Phone Mockup */
.phone-mockup {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Bookchoy Character wrapper */
.ipadbaby-wrapper {
    position: absolute;
    right: -80px;
    bottom: 40px;
    z-index: 2;
}

/* Bookchoy Character (ipadbaby) */
.ipadbaby {
    width: 220px;
    height: auto;
    display: block;
}

/* Shadow blob under character */
.ipadbaby-shadow {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 25px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.08) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(3px);
}

.phone-frame {
    width: 300px;
    height: 600px;
    background: linear-gradient(135deg, #1e1e1e, #3a3a3a);
    border-radius: 40px;
    padding: 8px;
    position: relative;
    box-shadow:
        0 0 0 6px #1e1e1e,
        0 0 0 7px #444,
        0 20px 40px rgba(0, 0, 0, 0.4);
    /* Slide up animation on page load */
    animation: slideUpOvershoot 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideUpOvershoot {
    0% {
        transform: translateY(100vh);
        opacity: 0;
    }
    60% {
        transform: translateY(-30px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: #000;
    border-radius: 10px;
}

/* Home button removed for cleaner look */

.phone-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent-color), var(--light-color));
}

/* Screenshot Carousel */
.screenshot-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.screenshot-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.screenshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.screenshot.active {
    opacity: 1;
}

/* Carousel Indicators */
.carousel-indicators {
    position: relative;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    /* Fade in after phone animation */
    animation: fadeIn 0.5s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--light-purple);
    border: 1px solid var(--secondary-color);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.indicator.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.3);
}

.indicator:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--scaffold-background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.features h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-family: 'Dymon-ShouXieTi', sans-serif;
}

/* Feature Rows */
.feature-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.feature-row:last-child {
    margin-bottom: 0;
}

/* Reverse layout for alternating rows */
.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(146, 198, 97, 0.1);
}

.feature-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: 'Dymon-ShouXieTi', sans-serif;
}

.feature-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-color);
}

.feature-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    /* Image always on top for mobile */
    .feature-row .feature-image {
        order: -1;
    }

    .feature-text {
        padding: 2rem;
    }

    .feature-text h3 {
        font-size: 1.5rem;
    }

    .feature-text p {
        font-size: 1rem;
    }

    .feature-image img {
        max-width: 100%;
    }
}

.feature-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-family: 'Dymon-ShouXieTi', sans-serif;
    font-size: 1.5rem;
}

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

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

.footer-links a {
    color: var(--light-green);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive Design - Medium screens */
@media (max-width: 1024px) {
    .ipadbaby-wrapper {
        right: -70px;
        bottom: 30px;
    }

    .ipadbaby {
        width: 170px;
    }

    .ipadbaby-shadow {
        width: 110px;
        height: 22px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        padding: 1.5rem;
    }

    .hero-text::before {
        top: -1rem;
        left: -1rem;
        right: -1rem;
        bottom: -1rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .phone-frame {
        width: 250px;
        height: 500px;
    }

    .ipadbaby-wrapper {
        right: -60px;
        bottom: 20px;
    }

    .ipadbaby {
        width: 120px;
    }

    .ipadbaby-shadow {
        width: 80px;
        height: 18px;
    }

    .nav-menu {
        display: none;
    }

    .download-buttons {
        justify-content: center;
    }
}
