@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Updated Professional Palette - Kidofy (Apple-like refined) */
    --primary-color: #FF5E5E;
    /* Warmer, more vibrant Red/Salmon */
    --secondary-color: #38C9C0;
    /* Teal/Turquoise */
    --accent-yellow: #FFD93D;
    /* Sharper, vibrant Yellow */
    --accent-purple: #5A4FCF;
    /* Rich polished Purple */
    --dark-text: #1D1D1F;
    /* Apple dark gray */
    --light-text: #F5F5F7;
    /* Apple light gray */
    --bg-gradient-start: #FBFBFD;
    --bg-gradient-end: #F5F5F7;

    /* Apple-like refined shadows (softer, deep) */
    --clay-shadow:
        10px 10px 30px rgba(0, 0, 0, 0.05),
        -10px -10px 30px rgba(255, 255, 255, 0.9);
    --clay-shadow-hover:
        15px 20px 40px rgba(0, 0, 0, 0.08),
        -15px -20px 40px rgba(255, 255, 255, 1);
    --clay-inset:
        inset 4px 4px 10px rgba(0, 0, 0, 0.03),
        inset -4px -4px 10px rgba(255, 255, 255, 0.9);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--dark-text);
    overflow-x: hidden;
    line-height: 1.5;
    min-height: 100vh;
    font-size: 17px;
    /* Apple baseline */
}

/* 3D Components */
.clay-card {
    background: var(--bg-gradient-start);
    border-radius: 30px;
    box-shadow: var(--clay-shadow);
    border: var(--glass-border);
    transition: all 0.4s ease;
    padding: 40px;
}

.clay-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--clay-shadow-hover);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    box-shadow:
        0 10px 20px rgba(255, 107, 107, 0.3),
        inset 0 -5px 0 rgba(0, 0, 0, 0.1);
    /* Inner bottom lip */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:active {
    transform: translateY(4px);
    box-shadow:
        0 4px 10px rgba(255, 107, 107, 0.3),
        inset 0 2px 0 rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    background: var(--accent-purple);
    border: none;
    border-radius: 50px;
    box-shadow:
        0 10px 20px rgba(108, 92, 231, 0.3),
        inset 0 -5px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:active {
    transform: translateY(4px);
}

.title-3d {
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 100px;
    /* More rounded premium feel */
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    /* Stronger shadow */
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), top 0.4s ease, opacity 0.3s ease;
}

.navbar.nav-hidden {
    transform: translate(-50%, -150%);
    opacity: 0;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--dark-text);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

.logo-img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--dark-text);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 700;
    font-size: 1.05rem;
    transition: color 0.3s;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 160px 5% 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    max-width: 650px;
    padding-right: 50px;
    z-index: 2;
    animation: slideUp 0.8s ease-out;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--dark-text);
}

.hero p {
    font-size: 1.35rem;
    color: #636e72;
    margin-bottom: 40px;
    font-weight: 600;
}

.store-buttons {
    display: flex;
    gap: 20px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: #2D3436;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s;
    box-shadow: var(--clay-shadow);
}

.store-btn:hover {
    transform: translateY(-5px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.phone-mockup {
    width: 320px;
    height: 650px;
    background: #000;
    border-radius: 50px;
    border: 14px solid #1D1D1F;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15), 0 15px 30px rgba(0, 0, 0, 0.05);
    /* Apple-like deep shadow */
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.phone-mockup:hover {
    transform: scale(1.02) translateY(-10px);
}

/* Device frame simulation (No notch) */
.phone-mockup::before {
    display: none;
}

/* Floating Elements Animation */
.float-anim {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Features Grid */
.features {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 25px;
    box-shadow: var(--clay-inset);
    background: #f0f4f8;
}

/* Scan Section */
.scan-section {
    padding: 100px 0;
    margin: 100px 5%;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--accent-purple), #8A2BE2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.3);
}

.scan-content {
    padding: 40px;
    max-width: 600px;
}

.qr-box {
    background: white;
    padding: 20px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    margin: 40px;
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.qr-box:hover {
    transform: rotate(0deg) scale(1.05);
}

.qr-placeholder {
    background: white;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-text);
}

/* Forms & Inputs */
input[type='email'] {
    background: #f0f4f8;
    border: none;
    box-shadow: var(--clay-inset);
    border-radius: 12px;
    padding: 15px;
    font-size: 1rem;
    color: var(--dark-text);
    transition: all 0.3s;
    width: 100%;
}

input[type='email']:focus {
    outline: none;
    background: white;
    box-shadow:
        inset 2px 2px 5px rgba(163, 177, 198, 0.4),
        inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

/* Content Container for pages */
.content-container {
    max-width: 900px;
    margin: 0 auto 100px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    box-shadow: var(--clay-shadow);
}

.page-header {
    text-align: center;
    padding: 180px 5% 60px;
    background: linear-gradient(135deg, #fff 0%, #f0f4f8 100%);
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--dark-text);
    margin-bottom: 20px;
}

/* Advanced Story Dots Background */
.story-dots-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-gradient-start);
    overflow: hidden;
    pointer-events: none;
}

.dot-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.layer-1 {
    animation: drift 60s linear infinite;
    opacity: 0.5;
}

.layer-2 {
    background-size: 45px 45px;
    animation: drift 90s linear reverse infinite;
    opacity: 0.3;
}

/* Story Formations - Dots forming a symbolic story */
.story-formation {
    background-image: radial-gradient(var(--primary-color) 2px, transparent 2px);
    background-size: 20px 20px;
    opacity: 0;
    filter: blur(0.5px);
    transition: opacity 1s ease;
}

/* Scene 1: The 'Book' (Learning) */
.book-form {
    mask-image: linear-gradient(to right, transparent, black, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black, transparent);
    animation: scene-book 20s infinite;
}

/* Scene 2: The 'Heart' (Parents' Love) */
.heart-form {
    background-image: radial-gradient(var(--accent-purple) 2px, transparent 2px);
    animation: scene-heart 20s infinite;
    animation-delay: 5s;
}

/* Scene 3: The 'Shield' (Safe Environment) */
.shield-form {
    background-image: radial-gradient(var(--secondary-color) 2px, transparent 2px);
    animation: scene-shield 20s infinite;
    animation-delay: 10s;
}

@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-100px, -100px) scale(1.1);
    }
}

/* Storyboarding with Opacity & Positions */
@keyframes scene-book {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }

    10%,
    25% {
        opacity: 0.4;
        transform: scale(1) translateY(0);
    }

    35% {
        opacity: 0;
        transform: scale(1.2) translateY(-50px);
    }
}

@keyframes scene-heart {

    0%,
    15% {
        opacity: 0;
        transform: scale(0.5);
    }

    25%,
    40% {
        opacity: 0.6;
        transform: scale(1.1);
    }

    50% {
        opacity: 0;
        transform: scale(1.5);
    }

    100% {
        opacity: 0;
    }
}

@keyframes scene-shield {

    0%,
    40% {
        opacity: 0;
        transform: translateY(100px);
    }

    50%,
    65% {
        opacity: 0.5;
        transform: translateY(0);
    }

    75% {
        opacity: 0;
        transform: translateY(-100px);
    }

    100% {
        opacity: 0;
    }
}

.dots-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-gradient-start) 80%);
}

.shape {
    position: absolute;
    opacity: 0.15;
}

/* Footer specific */
.site-footer {
    background: transparent;
    margin-top: 100px;
}

.footer-inner {
    background: white;
    border-radius: 40px 40px 0 0;
    padding: 80px 5% 40px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 900px) {
    .navbar {
        width: 95%;
        padding: 15px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 60px;
    }

    .hero h1 {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 10px;
    }

    .store-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .store-btn {
        width: auto;
        min-width: 160px;
        padding: 8px 15px;
        font-size: 0.9rem;
        justify-content: center;
        margin-bottom: 0px;
    }

    .store-btn i {
        font-size: 1.2rem;
    }

    .clay-card {
        padding: 30px 20px;
    }

    .navbar {
        width: 95%;
        padding: 10px 20px;
        top: 10px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        border-radius: 25px;
        margin-top: 10px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        display: none;
        border: 1px solid #eee;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .promote-btn {
        width: 100%;
        margin-top: 10px;
    }

    .premium-feature-showcase {
        padding: 60px 5% !important;
    }

    .premium-feature-showcase h2 {
        font-size: 2.2rem !important;
    }

    .premium-feature-showcase div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}