/* ==========================================================================
   VARIABLES & GLOBAL
   ========================================================================== */
:root {
    --primary-color: #FF6584; /* Pink from logo */
    --primary-dark: #e8506d;
    --secondary-color: #1E2A4F; /* Navy from logo */
    --secondary-light: #2c3e72;
    --bg-light: #FAFBFF;
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-modal: 0 20px 50px rgba(0,0,0,0.3);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.nav-logo {
    height: 80px;
}

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

.nav-links li a {
    font-weight: 600;
    color: var(--secondary-color);
    transition: var(--transition);
}

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

.btn-nav {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 30px;
}
.btn-nav:hover { background: var(--primary-dark); }

.hamburger { display: none; }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff5f8 0%, #FAFBFF 100%);
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text { flex: 1; }
.hero-text h1 {
    font-size: 3.2rem;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons { display: flex; gap: 15px; }

.btn-primary, .btn-secondary, .btn-order, .btn-demo {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}
.btn-primary { background: var(--primary-color); color: var(--white); box-shadow: 0 5px 15px rgba(255,101,132,0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255,101,132,0.4); }
.btn-secondary { background: var(--white); color: var(--secondary-color); border: 2px solid var(--secondary-light); }
.btn-secondary:hover { background: var(--secondary-light); color: var(--white); }

/* Decorative Phone & Switcher */
.hero-image { flex: 1; display: flex; justify-content: center; align-items: center; }

.hero-theme-switcher {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-right: 30px;
    z-index: 10;
}

.ts-btn {
    background: var(--white);
    border: 2px solid var(--secondary-light);
    color: var(--secondary-color);
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.ts-btn:hover, .ts-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateX(-10px);
}
.floating-phone {
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.phone-frame {
    width: 250px; height: 500px;
    background: var(--white);
    border-radius: 40px;
    border: 10px solid var(--secondary-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.hero-iframe {
    width: 375px;
    height: 783px;
    border: none;
    background: white;
    transform: scale(0.6133);
    transform-origin: top left;
}

/* ==========================================================================
   CARA KERJA (STEPS)
   ========================================================================== */
.how-it-works { padding: 80px 0; background: var(--white); text-align: center; }
.section-title { font-size: 2.2rem; color: var(--secondary-color); margin-bottom: 10px; }
.section-subtitle { color: var(--text-muted); margin-bottom: 40px; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.step-card {
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.step-number {
    width: 50px; height: 50px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 1.5rem; font-weight: bold;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
    margin: 0 auto 20px auto;
}
.step-card h3 { color: var(--secondary-color); margin-bottom: 15px; }

/* ==========================================================================
   KATALOG & FILTER
   ========================================================================== */
.catalog { padding: 80px 0; text-align: center; }

.filter-group {
    display: flex; justify-content: center; gap: 15px; margin-bottom: 40px;
}
.filter-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--secondary-light);
    color: var(--secondary-color);
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif; font-weight: 600;
    transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--secondary-color);
    color: var(--white);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: left;
}

.template-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.template-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

/* Thumbnails */
.t-thumbnail {
    height: 180px;
    display: flex; justify-content: center; align-items: center;
}
.thumb-icon { font-size: 4rem; filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2)); }
.bg-blush { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.bg-midnight { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); }
.bg-starlight { background: linear-gradient(135deg, #141e30, #243b55); }
.bg-velvet { background: linear-gradient(135deg, #4a0000, #7a0000); }
.bg-memory { background: linear-gradient(135deg, #a8e063, #56ab2f); }
.bg-pinata { background: linear-gradient(135deg, #ff9f1c, #ffbf69); }
.bg-graduation { background: linear-gradient(135deg, #0b192c, #d4af37); }
.bg-yearbook { background: linear-gradient(135deg, #3e2723, #5d4037); }

.t-content { padding: 25px; display: flex; flex-direction: column; flex: 1; }
.badge {
    display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 0.8rem; font-weight: bold; margin-bottom: 10px; width: fit-content;
}
.badge-pink { background: #ffe0e6; color: var(--primary-color); }
.badge-blue { background: #e0f2fe; color: #0284c7; }
.badge-purple { background: #f3e8ff; color: #9333ea; }
.badge-gold { background: #fef08a; color: #854d0e; }

.t-content h3 { font-size: 1.3rem; color: var(--secondary-color); margin-bottom: 10px; }
.t-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; flex: 1; }

.t-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; margin-top: -5px; }
.price-normal { text-decoration: line-through; color: #999; font-size: 0.9rem; }
.price-promo { color: var(--primary-color); font-size: 1.4rem; font-weight: 700; }

.t-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-demo { background: var(--secondary-color); color: var(--white); text-align: center; width: 100%; padding: 10px; }
.btn-demo:hover { background: var(--secondary-light); }
.btn-order { background: var(--white); color: var(--primary-color); border: 2px solid var(--primary-color); text-align: center; width: 100%; padding: 10px; }
.btn-order:hover { background: var(--primary-color); color: var(--white); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer { background: var(--secondary-color); color: var(--white); padding: 40px 0 20px 0; }
.footer-container { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-logo { height: 40px; filter: brightness(0) invert(1); margin-bottom: 15px; }
.footer-brand p { max-width: 400px; color: #a0aec0; margin-bottom: 20px; }
.footer-links { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; width: 100%; color: #718096; font-size: 0.9rem; }

/* ==========================================================================
   MODAL PHONE MOCKUP (THE WOW FACTOR)
   ========================================================================== */
.demo-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.9);
    z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: var(--transition);
    backdrop-filter: blur(5px);
}
.demo-modal.active { opacity: 1; pointer-events: auto; }

.modal-close {
    position: absolute; top: 20px; right: 30px;
    background: rgba(255,255,255,0.2); color: white;
    border: none; padding: 10px 20px; border-radius: 30px; font-size: 1rem;
    cursor: pointer; transition: background 0.2s;
    font-family: 'Poppins', sans-serif;
}
.modal-close:hover { background: var(--primary-color); }

.phone-mockup-wrapper {
    position: relative;
    width: 375px; height: 750px; /* iPhone dimensions */
    transform: translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.demo-modal.active .phone-mockup-wrapper { transform: translateY(0); }

.phone-hardware {
    width: 100%; height: 100%;
    background: #111;
    border-radius: 45px;
    border: 12px solid #333;
    box-shadow: var(--shadow-modal);
    position: relative;
    overflow: hidden;
}
.phone-notch {
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 150px; height: 30px;
    background: #333;
    border-radius: 0 0 15px 15px;
    z-index: 10;
}
.phone-iframe {
    width: 100%; height: 100%;
    border: none;
    background: white;
}
.demo-hint {
    color: white; margin-top: 20px; font-weight: 300; opacity: 0.8;
}

/* ==========================================================================
   FLOATING WHATSAPP
   ========================================================================== */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    height: 60px;
    padding: 0 25px;
    background-color: #25D366;
    color: white;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease;
}
.floating-wa:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container { flex-direction: column; text-align: center; padding-top: 40px; }
    .hero-text p { margin: 0 auto 30px auto; }
    .hero-buttons { justify-content: center; }
    .hero-image { flex-direction: column-reverse; gap: 20px; margin-top: 20px; }
    .hero-theme-switcher { margin-right: 0; flex-direction: row; justify-content: center; flex-wrap: wrap; }
    .ts-btn:hover, .ts-btn.active { transform: translateY(-5px); }
    .template-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-text h1 { font-size: 2.5rem; }
    .template-grid { grid-template-columns: 1fr; }
    
    /* Fullscreen Demo Modal on Mobile */
    .demo-modal { background: #000; padding: 0; }
    .phone-mockup-wrapper { 
        width: 100vw; 
        height: 100vh; 
        transform: none !important; 
        margin-top: 0; 
    }
    .phone-hardware { 
        border: none; 
        border-radius: 0; 
        box-shadow: none; 
    }
    .phone-notch, .demo-hint { display: none; }
    
    /* Close button visibility over fullscreen iframe */
    .modal-close {
        top: 15px; 
        right: 15px;
        background: rgba(0,0,0,0.6);
        border: 1px solid rgba(255,255,255,0.3);
        z-index: 99999;
        font-size: 0.9rem;
    }
}

/* Hide floating WA when modal is open to avoid clutter on mobile */
.demo-modal.active + .floating-wa {
    display: none;
}
