/* ==========================================================================
   Base Styles & CSS Variables
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #6E3CBC;
    --color-primary-dark: #502A8F;
    --color-primary-light: #8E5DE3;
    --color-secondary: #0A0A0A;
    --color-text: #E0E0E0;
    --color-text-muted: #A0A0A0;
    --color-bg: #050510;
    --color-white: #FFFFFF;

    /* Vibrant Gradients for Glassmorphism Backgrounds */
    --gradient-bg-1: linear-gradient(135deg, #1A0D3B 0%, #050510 100%);
    --gradient-bg-2: linear-gradient(45deg, #050510 0%, #2A1351 100%);
    --gradient-accent: linear-gradient(135deg, #8E5DE3 0%, #6E3CBC 100%);

    /* Glassmorphism Styles */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-blur: blur(16px);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 1.5rem;
    /* 24px */
    --space-lg: 2rem;
    /* 32px */
    --space-xl: 3rem;
    /* 48px */
    --space-2xl: 5rem;
    /* 80px */
    --space-3xl: 8rem;
    /* 128px */

    /* Borders & Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.26, 1.55);
}

/* ==========================================================================
   Reset & Global Setup
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Main animated background gradient */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(110, 60, 188, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(142, 93, 227, 0.12), transparent 25%);
    background-attachment: fixed;
}

/* Base Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.pt-section {
    padding-top: var(--space-3xl);
}

.pb-section {
    padding-bottom: var(--space-3xl);
}

/* ==========================================================================
   Glassmorphism Utilities
   ========================================================================== */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

.glass-panel:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-5px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-bounce);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(110, 60, 188, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8E5DE3 0%, #A27BEA 100%);
    z-index: -1;
    transition: opacity var(--transition-normal);
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 60, 188, 0.6);
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-light);
    color: var(--color-white);
}

.icon-arrow {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform var(--transition-bounce);
}

.btn:hover .icon-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 16, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
    padding: var(--space-sm) 0;
}

.glass-header.scrolled {
    padding: 0.5rem 0;
    background: rgba(5, 5, 16, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Ensure logo is white on dark bg */
    transition: transform var(--transition-normal);
}

.logo:hover img {
    transform: scale(1.05);
}

.main-nav {
    display: none;
    /* Hidden on mobile by default */
}

@media (min-width: 992px) {
    .main-nav {
        display: block;
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

.nav-item {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-text);
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--color-white);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-white);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--color-white);
    left: 0;
    transition: all var(--transition-normal);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Background Animated Shapes for Glassmorphism Context */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s ease-in-out infinite alternate;
}

.shape-1 {
    width: 40vw;
    height: 40vw;
    background: var(--color-primary-dark);
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 30vw;
    height: 30vw;
    background: #4A1A9E;
    bottom: -10%;
    right: -5%;
    animation-delay: -5s;
    animation-duration: 25s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, 10%) scale(1.1);
    }

    66% {
        transform: translate(-5%, 5%) scale(0.9);
    }

    100% {
        transform: translate(0, -5%) scale(1.05);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* ==========================================================================
   Utility Classes & Layout Additions
   ========================================================================== */

.p-md {
    padding: var(--space-md);
}

.p-lg {
    padding: var(--space-lg);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.rounded-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    object-fit: cover;
    width: 100%;
}

.shadow-lg {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Scroll Revel Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--color-white);
    opacity: 0.9;
}

.divider {
    height: 4px;
    width: 60px;
    background: var(--gradient-accent);
    margin: var(--space-md) auto;
    border-radius: 2px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    /* Offset for sticky header */
}

/* Center hero content completely */
.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: rgba(26, 13, 59, 0.4);
    /* Slightly tinted glass for legibility */
}

.hero-title {
    margin-bottom: var(--space-md);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    color: var(--color-white);
    opacity: 0.85;
    margin-bottom: var(--space-lg);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-content {
    background: rgba(255, 255, 255, 0.02);
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-image-container {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.about-image-container img {
    height: 100%;
    object-position: center;
}

/* Decorative glass pan beneath image */
.about-image-container::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: 15px;
    bottom: 15px;
    background: var(--gradient-accent);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.3;
    filter: blur(20px);
}

/* ==========================================================================
   Products Section
   ========================================================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.product-card {
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    background: rgba(26, 13, 59, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-card:hover::after {
    opacity: 1;
}

.product-icon-wrapper {
    width: 160px;
    height: 160px;
    margin-bottom: var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    /* very faint disc */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-shadow: inset 0 0 20px rgba(142, 93, 227, 0.1);
    transition: transform var(--transition-bounce);
}

.product-card:hover .product-icon-wrapper {
    transform: scale(1.1) translateY(-10px);
    background: rgba(142, 93, 227, 0.15);
}

.product-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
    color: var(--color-white);
}

.product-desc {
    font-size: 1rem;
    margin-bottom: 0;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.service-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.service-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-title {
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Sustainability Section
   ========================================================================== */

.sustainability-bg {
    margin: 0 var(--space-md);
    background: linear-gradient(135deg, rgba(110, 60, 188, 0.1) 0%, rgba(26, 13, 59, 0.4) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

/* ==========================================================================
   Contact Section & Form UI
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 576px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-white);
}

.required {
    color: #FF5A5F;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(142, 93, 227, 0.2);
}

/* Custom Checkbox */
.checkbox-group {
    margin-top: var(--space-xs);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem !important;
    color: var(--color-text-muted) !important;
    user-select: none;
    position: relative;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    top: 2px;
    height: 18px;
    min-width: 18px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.checkbox-label:hover input~.checkmark {
    background-color: rgba(255, 255, 255, 0.15);
}

.checkbox-label input:checked~.checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-label input:checked~.checkmark:after {
    display: block;
}

.checkbox-label .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.submit-btn {
    align-self: flex-start;
    margin-top: var(--space-sm);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.glass-footer {
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: var(--space-3xl) 0 var(--space-md);
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

@media (min-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-title {
    font-size: 1.15rem;
    margin-bottom: var(--space-lg);
    color: var(--color-white);
}

.footer-desc {
    max-width: 300px;
    margin-bottom: var(--space-lg);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-bounce);
}

.social-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--color-text);
    transition: fill var(--transition-fast);
}

.social-icon:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

.social-icon:hover svg {
    fill: var(--color-white);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: 0;
}

.footer-links a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.hover-link:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}