/**
 * ROBOVIE-Z Landing Page Styles
 *
 * A modern, futuristic robotics startup landing page.
 *
 * TABLE OF CONTENTS:
 * 1. CSS Variables & Reset
 * 2. Navigation
 * 3. Hero Section
 * 4. Rotating Subheadline Animation
 * 5. Waitlist Form
 * 6. Stats Section
 * 7. Robot Visual
 * 8. Technology Section
 * 9. Media Cards
 * 10. CTA Section
 * 11. Footer
 * 12. Modal
 * 13. Responsive Design
 */

/* ============================================
   1. CSS VARIABLES & RESET
   ============================================ */

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

:root {
    /* Color Palette - Customize these to match your brand */
    --primary: #1a1a1a;
    --secondary: #4a4a4a;
    --accent: #000000;
    --background: #ffffff;
    --surface: #f8f9fa;
    --border: #e5e7eb;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --gradient-start: #f0f0f0;
    --gradient-end: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   2. NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 1px solid transparent;
}

.navbar.nav-scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 1rem 4rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: #ffffff;
    transition: color 0.4s ease;
}

.navbar.nav-scrolled .nav-logo {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.navbar.nav-scrolled .nav-links {
    background: var(--surface);
    border-color: var(--border);
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.4s ease;
}

.navbar.nav-scrolled .nav-links a {
    color: var(--text-secondary);
}

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

.nav-links a:hover {
    color: #ffffff;
}

.nav-cta-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-social {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav-social a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-social a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.navbar.nav-scrolled .nav-social a {
    color: var(--text-secondary);
}

.navbar.nav-scrolled .nav-social a:hover {
    color: var(--text-primary);
}

.nav-cta {
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   3. HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    padding: 8rem 4rem 4rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #ffffff;
    border: none;
    outline: none;
    box-shadow: none;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 40%, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 50%, rgba(200, 200, 200, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 600px;
}

.badge {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.headline {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* ============================================
   4. ROTATING SUBHEADLINE ANIMATION

   To adjust animation timing, modify:
   - transition duration in .rotating-subheadline
   - interval in js/script.js
   ============================================ */

.subheadline-container {
    position: relative;
    height: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.subheadline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.rotating-subheadline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(4px);
}

.rotating-subheadline.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.rotating-subheadline.exit {
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(4px);
}

/* ============================================
   5. WAITLIST FORM
   ============================================ */

.waitlist-form {
    margin-bottom: 2.5rem;
    scroll-margin-top: 120px; /* Jarak agar tidak tertutup navbar */
}

.form-container {
    display: flex;
    gap: 0.75rem;
    background: white;
    padding: 0.5rem;
    border-radius: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    max-width: 480px;
    margin: 0 auto;
}

.form-container input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    min-width: 0;
}

.form-container input::placeholder {
    color: #9ca3af;
}

.form-container button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.form-container button:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.form-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
    padding-left: 1rem;
}

/* ============================================
   6. STATS SECTION
   ============================================ */

.stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   7. ROBOT VISUAL
   ============================================ */

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.robot-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-effect {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
}

.robot-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.15));
    animation: float 6s ease-in-out infinite;
}

/* Floating animation for the robot */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.robot-specs {
    position: absolute;
    bottom: 10%;
    right: -20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.spec-tag {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ============================================
   8. TECHNOLOGY SECTION
   ============================================ */

.technology {
    padding: 6rem 4rem;
    background: var(--background);
}

.tech-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.section-badge {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.tech-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.tech-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.tech-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}

.feature-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   9. MEDIA CARDS

   These cards are designed to hold video or image content.
   See index.html comments for how to add videos/images.
   ============================================ */

.tech-media {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.media-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.media-placeholder {
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: var(--text-secondary);
}

.media-placeholder span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Styles for actual media content */
.media-video,
.media-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.media-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
}

.label-tag {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.label-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   10. CTA SECTION
   ============================================ */

.cta-section {
    padding: 6rem 4rem;
    background: var(--accent);
    text-align: center;
}

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

.cta-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.cta-form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-input {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    min-width: 280px;
    outline: none;
    font-family: inherit;
}

.cta-button {
    padding: 1rem 2rem;
    background: white;
    color: var(--accent);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   11. FOOTER
   ============================================ */

.footer {
    padding: 3rem 4rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================
   12. MODAL
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 3.5rem 2rem;
    border-radius: 32px;
    text-align: center;
    max-width: 440px;
    width: 90%;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

/* Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #10b981;
}

.check-icon::before {
    top: 10px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.check-icon .icon-line {
    height: 5px;
    background-color: #10b981;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.check-icon .icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(16, 185, 129, 0.2);
}

.check-icon .icon-fix {
    top: 8px;
    width: 5px;
    left: 28px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: white;
}

@keyframes icon-line-tip {
    0% { width: 0; left: 1px; top: 19px; }
    54% { width: 0; left: 1px; top: 19px; }
    70% { width: 50px; left: -8px; top: 37px; }
    84% { width: 17px; left: 21px; top: 48px; }
    100% { width: 25px; left: 14px; top: 46px; }
}

@keyframes icon-line-long {
    0% { width: 0; right: 46px; top: 54px; }
    65% { width: 0; right: 46px; top: 54px; }
    84% { width: 55px; right: 0px; top: 35px; }
    100% { width: 47px; right: 8px; top: 38px; }
}

.modal-content h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.modal-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.modal-close {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* ============================================
   13. RESPONSIVE DESIGN
   ============================================ */

/* Tablet and below */
@media (max-width: 1024px) {
    .navbar {
        padding: 1rem 2rem;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 7rem 2rem 3rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

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

    .subheadline-container {
        text-align: center;
    }

    .rotating-subheadline {
        text-align: center;
    }

    .form-container {
        max-width: 100%;
    }

    .stats {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .robot-image {
        max-height: 50vh;
    }

    .robot-specs {
        right: 10%;
        bottom: 5%;
    }

    .technology {
        padding: 4rem 2rem;
    }

    .tech-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .cta-section {
        padding: 4rem 2rem;
    }

    .footer {
        padding: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .headline {
        font-size: 2.5rem;
    }

    .form-container {
        flex-direction: column;
        border-radius: 20px;
        padding: 0.75rem;
    }

    .form-container input {
        padding: 1rem;
        text-align: center;
    }

    .form-container button {
        width: 100%;
        justify-content: center;
    }

    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .cta-form {
        flex-direction: column;
    }

    .cta-input {
        min-width: auto;
        width: 100%;
    }
}

/* ============================================
   14. ERROR TOAST
   ============================================ */

.error-toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #ff4b4b;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(255, 75, 75, 0.3);
    z-index: 3000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
}

.error-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.error-toast svg {
    flex-shrink: 0;
}
