/* CSS Design System for Okiru Electronics */

:root {
    --primary-color: #7C3AED; /* Electric Purple */
    --secondary-color: #000000; /* Pure Black */
    --accent-color: #A78BFA; /* Soft Purple */
    --accent-hover: #6D28D9;
    --text-main: #0F172A; /* Near Black */
    --text-muted: #4B5563; /* Gray */
    --white: #FFFFFF;
    --bg-dark: #0A0A0A; /* Deep Black */
    --bg-light: #F9FAFB;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    color: var(--white);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Reusable Components */

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: rgba(255, 143, 0, 0.1);
    transform: translateY(-3px);
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1rem 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
    border-radius: 4px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a {
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--white);
}

/* Sections */
section {
    padding: 100px 0;
}

/* Background Variations */
.bg-dark {
    background-color: var(--bg-dark) !important;
    color: var(--white) !important;
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark p, .bg-dark li, .bg-dark span {
    color: var(--white) !important;
}

.bg-dark .text-muted {
    color: #94A3B8 !important;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url('https://images.unsplash.com/photo-1591799264318-7e6ef8ddb7ea?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    text-align: center;
    color: var(--white);
}

.hero p {
    color: #E2E8F0; /* Brighter subtext */
    font-size: 1.25rem;
    max-width: 800px;
    margin: 1.5rem auto 2.5rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    padding: 80px 0 30px;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

footer h4 {
    color: var(--white) !important;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

footer p, footer li, footer a, footer span {
    color: #E2E8F0 !important;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--white) !important;
}

.copyright {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #94A3B8 !important;
    font-size: 0.9rem;
}

/* Reveal Animations */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-hidden.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsiveness */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: var(--transition);
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    .nav-links.active {
        right: 0;
    }
    .mobile-menu-btn {
        display: block;
        z-index: 1002;
    }
    .hero-btns {
        flex-direction: column;
    }
    section {
        padding: 60px 0;
    }
    
    /* Disable reveal hiding on mobile platforms to prevent invisible elements */
    .reveal-hidden {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Form Status & Loading States */
.form-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: none;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.form-status.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

.btn-loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Product Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85); /* slightly increased opacity to ensure background doesn't distract */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh; /* prevent from overflowing screen */
    overflow-y: auto; /* enable scrolling internally if it hits max bounds */
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    color: var(--text-muted);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
}

#modalImg {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

#modalTitle {
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#modalDesc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

#modalContactBtn {
    width: 100%;
}
