/* 
   ==========================================================================
   EKIPITA - Frontend Design Aesthetic
   ========================================================================== 
*/

:root {
    /* Color Palette: Bright, crisp white base with warm coral & purple accents 
       mimicking the App's UI gradients */
    --bg-base: #fafafa;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-strong: rgba(255, 255, 255, 0.85);
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    
    --accent-coral: #ff7657; /* Derived from ArrivalView */
    --accent-purple: #8b5cf6; /* Derived from features */
    --accent-orange: #f97316;
    
    --border-glass: rgba(255, 255, 255, 0.8);
    --border-subtle: rgba(0, 0, 0, 0.06);
    
    /* Shadows - Layered for depth */
    --shadow-glass: 
        0 8px 32px rgba(0, 0, 0, 0.04),
        0 2px 8px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    --shadow-pop: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.02);
    
    /* Typography */
    --font-display: 'Plus Jakarta Sans', 'Zen Kaku Gothic New', sans-serif;
    --font-body: 'Inter', 'Zen Kaku Gothic New', sans-serif;
    
    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
}

/* =========================================
   RESET & BASE CONFIG
   ========================================= */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: 9999;
    pointer-events: none;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-display {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

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

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px; /* Wider container for maximalist feel */
    margin: 0 auto;
    padding: 0 8vw; /* Increased padding for more breathing room on the sides */
}

.text-center { text-align: center; }
.relative { position: relative; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }
.mb-huge { margin-bottom: 5rem; }

/* =========================================
   AMBIENT BACKGROUND FX (MESH GRADIENT)
   ========================================= */

.ambient-mesh {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #f8fafc;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--accent-coral) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-2 {
    bottom: -20%; right: -10%;
    width: 70vw; height: 70vw;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    animation-duration: 25s;
}

.blob-3 {
    top: 40%; left: 30%;
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
    animation-delay: -15s;
    animation-duration: 18s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, -2%) scale(0.95); }
}

/* =========================================
   GLASSMORPHISM UTILS
   ========================================= */

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
}

/* =========================================
   NAVBAR
   ========================================= */

.navbar {
    position: fixed;
    top: 1.5rem;
    left: 8vw; /* Match new container padding */
    right: 8vw; /* Match new container padding */
    z-index: 1000;
    border-radius: 100px;
    padding: 0.75rem 1.5rem;
    transition: transform 0.4s var(--ease-out-expo), opacity 0.4s ease;
}

.navbar.hidden {
    transform: translateY(-150%);
    opacity: 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-mark {
    width: 24px; height: 24px;
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-purple));
    border-radius: 6px;
    display: inline-block;
}

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

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.nav-link:hover { color: var(--text-primary); }

.btn-primary {
    background: var(--text-primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary .btn-icon {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero {
    min-height: 100vh;
    padding-top: 20vh;
    padding-bottom: 10vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Asymmetric grid */
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.pulse-dot {
    width: 8px; height: 8px;
    background-color: var(--accent-purple);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.hero-title {
    font-size: clamp(3rem, 7vw, 6rem); /* Massive typography */
    margin-bottom: 1.5rem;
    perspective: 1000px;
}

.title-line {
    display: block;
    transform-origin: left bottom;
}

.highlight-wrap {
    display: inline-block;
    position: relative;
}

.highlight-text {
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 3rem;
    max-width: 600px;
}

.store-badges {
    display: flex;
    gap: 1.25rem;
}

.store-btn img {
    height: 54px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.store-btn:hover img {
    transform: scale(1.05) translateY(-2px);
}

.store-btn.shadow-hover:hover img {
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.15));
}

/* Floating Mockup */
.hero-visual {
    position: relative;
    perspective: 1200px;
}

.mockup-container {
    position: relative;
    width: 320px;
    margin: 0 auto;
    border-radius: 40px;
    background: var(--bg-glass-strong);
    padding: 10px;
    border: 1px solid var(--border-glass);
    transform: rotate3d(0.5, -0.8, 0.2, 15deg);
    transition: transform 0.1s linear; /* Responsive to script */
}

/* Base float animation */
@keyframes float {
    0% { transform: translateY(0px) rotate3d(0.5, -0.8, 0.2, 15deg); }
    50% { transform: translateY(-20px) rotate3d(0.5, -0.8, 0.2, 12deg); }
    100% { transform: translateY(0px) rotate3d(0.5, -0.8, 0.2, 15deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.glass-reflection {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 40%);
    pointer-events: none;
    z-index: 10;
}

.mockup-img {
    border-radius: 32px;
    width: 100%;
}

.shadow-xl {
    box-shadow: 0 40px 60px -15px rgba(0, 0, 0, 0.2);
}

/* Decorative glass card floating next to hero mockup */
.deco-card {
    position: absolute;
    bottom: -20px;
    left: -40px;
    padding: 1rem 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 20;
}

.deco-icon {
    font-size: 2rem;
}

.deco-text {
    display: flex;
    flex-direction: column;
}

.deco-text strong {
    font-family: var(--font-display);
    color: var(--accent-coral);
}

.deco-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* =========================================
   FEATURES (BENTO GRID REIMAGINED)
   ========================================= */

.features {
    padding: 15vh 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 5rem;
}

/* Complex asymmetric grid layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 2rem;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    box-shadow: var(--shadow-glass);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-pop);
}

.feature-content {
    padding: 3rem;
    position: relative;
    z-index: 2;
}

.feature-icon-wrapper {
    width: 60px; height: 60px;
    background: white;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.feature-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

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

.tag-group {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.5rem;
}

.tag {
    background: rgba(255,255,255,0.7);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Wide card (Arrival) */
.feature-wide {
    grid-column: span 12;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.clip-right {
    height: 100%;
    margin-right: -2rem; /* Bleed out of the card */
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.clip-right img {
    height: 120%; /* larger than container for parallax */
    width: auto;
    max-width: none;
    max-height: 600px;
    transform: rotate(5deg) translateY(20px);
    border-radius: 20px;
    box-shadow: -20px 20px 40px rgba(0,0,0,0.1);
}

/* Tall card (Presets) */
.feature-tall {
    grid-column: span 7;
    display: flex;
    flex-direction: column;
}

.clip-bottom {
    overflow: visible;
    display: flex;
    justify-content: center;
    padding: 0 3rem;
    margin-top: -2rem; 
}

.clip-bottom img {
    width: 80%;
    max-width: 300px;
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.08);
}

/* Square card (Battery) */
.feature-square {
    grid-column: span 5;
}

.ambient-glow {
    position: absolute;
    width: 150px; height: 150px;
    background: var(--accent-orange);
    filter: blur(80px);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
}

/* =========================================
   HOW TO USE (ASYMMETRIC STEPS)
   ========================================= */

.how-to-use {
    padding: 15vh 0;
}

.steps-path {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.step-card {
    padding: 3rem;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    width: 85%;
}

.step-card.right-align {
    align-self: flex-end;
}

.step-number-bg {
    position: absolute;
    top: -20px;
    right: -20px;
    font-family: var(--font-display);
    font-size: 10rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    line-height: 1;
    z-index: 1;
}

.step-card.right-align .step-number-bg {
    right: auto;
    left: -20px;
}

.step-content {
    position: relative;
    z-index: 2;
}

.step-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-purple);
}

.step-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* =========================================
   CTA SECTION
   ========================================= */

.cta-section {
    padding: 10vh 0 20vh;
}

.cta-glass {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 3rem;
    border-radius: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glass::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    animation: spin 10s linear infinite;
    z-index: 0;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 3rem;
}

.mt-lg { margin-top: 3rem; }

/* =========================================
   FOOTER
   ========================================= */

.footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 5rem 0 2rem;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(20px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-slogan {
    color: var(--text-tertiary);
    margin-top: 1rem;
    font-weight: 500;
}

.footer-links-group h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    transition: color 0.2s, transform 0.2s;
}

.footer-link:hover {
    color: var(--accent-purple);
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* =========================================
   ANIMATIONS UTILS (Reveals)
   ========================================= */

.reveal-item {
    opacity: 0;
    transform: translateY(40px) rotate(-2deg); /* Added slight rotation for character */
    transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.reveal-stagger .reveal-item { transition-delay: 0.1s; }
.reveal-stagger + .hero-title .reveal-item:nth-child(1) { transition-delay: 0.2s; }
.reveal-stagger + .hero-title .reveal-item:nth-child(2) { transition-delay: 0.3s; }
.reveal-stagger + .hero-title + .hero-subtitle { transition-delay: 0.4s; }
.reveal-stagger + .hero-title + .hero-subtitle + .store-badges { transition-delay: 0.5s; }

/* Scroll Reveals */
.reveal-scroll {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s var(--ease-out-expo);
}

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

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-wide, .feature-tall, .feature-square {
        grid-column: span 1;
    }
    
    .feature-wide {
        grid-template-columns: 1fr;
    }
    
    .clip-right {
        margin: 2rem 0 -3rem; /* Push image to bottom */
        justify-content: center;
    }
    
    .clip-right img {
        transform: rotate(0) translateY(0);
        width: 80%;
        max-width: 320px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title .title-line {
        display: inline-block;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .store-badges {
        justify-content: center;
        margin-bottom: 4rem;
    }
    
    .mockup-container {
        transform: none !important; /* Disable 3D tilt on mobile */
    }
    
    .step-card {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: 3.5rem; }
    .feature-content { padding: 2rem; }
}
