/*
Theme Name: Jainspace Theme v1.0
Theme URI: https://jainspace.in
Author: Antigravity AI
Description: Custom static-to-dynamic theme for Jainspace built for high-performance mobile UI.
Version: 1.0
*/

:root {
    /* Brand Colors Updated */
    --color-primary: #523249; /* Deep Purple for brand dominance */
    --color-primary-light: #704764; /* Lighter shade of purple */
    --color-accent: #401B36; /* Darker purple for hover states/accents */
    --color-secondary: #d8613c; /* Saffron is merely an accent */
    
    /* Neutral Colors */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F9F9FB; /* Cooler white */
    --color-bg-accent: #F4F1F5; /* Matches Deep Purple lightly */
    --color-text-main: #1A1A1A;
    --color-text-muted: #5A5A5A;
    --color-border: #E8E8E8;
    
    /* Layout & Utilities */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 10px 30px -10px rgba(82, 50, 73, 0.3); /* Purple glow */
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Typography */
    --font-family: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p {
    color: var(--color-text-muted);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-family);
    font-size: 1rem;
}

.btn-primary {
    background: var(--color-primary); /* Changed from saffron to dark brand color */
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--color-accent); /* Deep purple on hover */
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(82, 50, 73, 0.5);
}

.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-accent);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--color-bg-accent);
    color: var(--color-accent);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.98);
}

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

.logo {
    display: flex;
    align-items: center;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--color-text-main);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(82, 50, 73, 0.05) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content span {
    color: var(--color-accent);
}

.hero-content p {
    font-size: 1.25rem;
    margin: 1.5rem 0 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.mockup-frame {
    position: relative;
    z-index: 2;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(82, 50, 73, 0.25);
    border: 8px solid white;
    max-width: 300px;
}

.hero-app-img {
    width: 100%;
    display: block;
}

.decorative-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: linear-gradient(135deg, var(--color-bg-accent) 0%, rgba(255,255,255,0) 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 1;
    animation: blob-bounce 10s infinite alternate ease-in-out;
}

@keyframes blob-bounce {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(-50%, -50%) rotate(0deg); }
    100% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: translate(-50%, -50%) rotate(10deg); }
}

/* Features */
.features {
    padding: 6rem 2rem;
    background: var(--color-bg-alt);
    text-align: center;
}

.section-header {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: -1;
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-bg-accent);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Stavans Rebuilt - Playlist View */
.stavans-rebuilt {
    padding: 6rem 2rem;
    background: var(--color-primary); 
    color: white;
}

.stavans-rebuilt .section-header h2 {
    color: white;
}

.stavans-rebuilt .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

.stavans-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

/* Left Side - Player */
.stavan-player {
    flex: 2;
    background: black;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.current-track-info {
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.now-playing-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
}

.current-track-info h3 {
    color: var(--color-text-main);
    margin: 0;
    font-size: 1.25rem;
}

/* Right Side - Playlist */
.stavan-playlist {
    flex: 1;
    min-width: 350px;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.playlist-header h4 {
    color: var(--color-primary);
    font-size: 1.125rem;
    margin: 0;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 0.5rem;
}

/* Customize scrollbar for playlist */
.playlist-items::-webkit-scrollbar {
    width: 6px;
}
.playlist-items::-webkit-scrollbar-track {
    background: var(--color-bg-accent);
    border-radius: 4px;
}
.playlist-items::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: 4px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.playlist-item:hover {
    background: var(--color-bg-accent);
}

.playlist-item.active {
    background: var(--color-bg-alt);
    border-color: var(--color-border);
}

.playlist-item img {
    width: 60px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
}

.item-info {
    flex: 1;
    overflow: hidden;
}

.item-info h5 {
    color: var(--color-text-main);
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-info span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Active Graphic */
.playing-indicator {
    display: none;
    gap: 2px;
    align-items: flex-end;
    height: 12px;
}

.playlist-item.active .playing-indicator {
    display: flex;
}

.playing-indicator .bar {
    width: 3px;
    background: var(--color-secondary);
    animation: equalize 1s infinite alternate ease-in-out;
}

.playing-indicator .bar:nth-child(1) { height: 100%; animation-delay: 0s; }
.playing-indicator .bar:nth-child(2) { height: 60%; animation-delay: 0.2s; }
.playing-indicator .bar:nth-child(3) { height: 80%; animation-delay: 0.4s; }

@keyframes equalize {
    0% { height: 30%; }
    100% { height: 100%; }
}

.playlist-footer {
    margin-top: 1.5rem;
}

.view-all {
    width: 100%;
}

/* Footer */
.footer {
    background: var(--color-bg);
    padding: 5rem 2rem 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.footer-brand p {
    max-width: 300px;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.social-links a:hover {
    background: var(--color-accent);
    color: white;
}

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

.footer-links a {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

/* Animations */
.fade-in { opacity: 0; transition: opacity 0.8s ease; }
.fade-in.appear { opacity: 1; }
.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in-up.appear { opacity: 1; transform: translateY(0); }
.fade-in-right { opacity: 0; transform: translateX(-30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in-right.appear { opacity: 1; transform: translateX(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 2rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        text-align: center;
        gap: 1.5rem;
        border-top: 1px solid var(--color-border);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-cta {
        display: none;
    }

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

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 8rem;
        gap: 2rem;
    }
    
    .hero-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    .hero-actions {
        justify-content: center;
    }

    .stavans-container {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    
    .hero {
        padding: 6rem 1rem 2rem;
    }

    .features, .stavans-rebuilt {
        padding: 4rem 1.5rem;
    }

    .stavans-container {
        padding: 1rem;
    }

    .stavan-playlist {
        min-width: 100%;
    }

    .mockup-frame {
        max-width: 250px;
    }

    .logo img[alt="JainSpace Text"] {
        display: none; /* Hide text logo on very small screens to fit */
    }
}

/* Added CSS to fix alignment */
.stavans-rebuilt .section-header { text-align: center; }

/* Internal Page Layout & Typography Fixes */
.page-header {
    background: var(--color-bg-alt);
    padding: 6rem 2rem 3rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
    font-size: 2.5rem; /* Reduced from massive clamp for readability */
    margin-bottom: 0.5rem;
}

.page-content {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
    line-height: 1.8;
}

.content-block {
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1100px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.contact-detail {
    margin-bottom: 2rem;
}

.contact-detail h4 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-family: inherit;
    font-size: 1rem;
    background: var(--color-bg-alt);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .page-header {
        padding: 5rem 1.5rem 2.5rem;
    }
    .page-header h1 {
        font-size: 2rem;
    }
}

/* Contact Form 7 Premium Styling */
/* Jetpack & Grunion Contact Form Premium Styling */
/* --- JETPACK FORM SUPER-PRIORITY STYLING --- */
/* This block forces the Jetpack shortcode [contact-form] to match our theme */

.contact-form-wrapper .grunion-contact-form,
.contact-form-wrapper .contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.contact-form-wrapper .grunion-field-label,
.contact-form-wrapper label {
    display: block !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
    text-align: left !important;
}

/* Specific Targeting for Jetpack Input Fields */
.contact-form-wrapper .grunion-field input[type="text"],
.contact-form-wrapper .grunion-field input[type="email"],
.contact-form-wrapper .grunion-field textarea,
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper textarea {
    width: 100% !important;
    padding: 1rem 1.25rem !important;
    border-radius: 12px !important;
    border: 1px solid var(--color-border) !important;
    background: var(--color-bg-alt) !important;
    font-family: var(--font-family) !important;
    font-size: 1rem !important;
    color: var(--color-text-main) !important;
    transition: var(--transition) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    outline: none !important;
}

.contact-form-wrapper .grunion-field input:focus,
.contact-form-wrapper .grunion-field textarea:focus {
    border-color: var(--color-primary) !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(82, 50, 73, 0.08) !important;
}

/* Fixed Submit Button for Jetpack */
.contact-form-wrapper .contact-submit button[type="submit"],
.contact-form-wrapper .contact-submit input[type="submit"],
.contact-form-wrapper input[type="submit"].pushbutton-wide,
.contact-form-wrapper button.pushbutton-wide {
    background: var(--color-primary) !important;
    color: white !important;
    padding: 1.25rem 2.5rem !important;
    border-radius: var(--radius-full) !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: var(--transition) !important;
    margin-top: 1rem !important;
    display: block !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.contact-form-wrapper .contact-submit button[type="submit"]:hover,
.contact-form-wrapper .contact-submit input[type="submit"]:hover,
.contact-form-wrapper input[type="submit"].pushbutton-wide:hover {
    background: var(--color-accent) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 30px -10px rgba(82, 50, 73, 0.4) !important;
}

/* Success Message Fix */
.contact-form-submission {
    background: #f0f9f1 !important;
    border: 1px solid #46b450 !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    color: #46b450 !important;
    font-weight: 600 !important;
}

@media (max-width: 600px) {
    .contact-form-wrapper {
        padding: 1.5rem !important;
    }
}
