@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Vazirmatin:wght@100..900&display=swap');

:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #3b82f6;
    /* Modern Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: 10px;

    /* Fonts */
    --font-primary: 'Vazirmatin', sans-serif;

    /* Spacing */
    --container-max-width: 1200px;
    --header-height: 80px;
}

/* Hero Section */
main section:first-of-type {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Ensure no overflow issues */
    overflow: hidden;
}

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

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* Utilities */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-text {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Animation Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* SOMA Hero Styling */
.soma-hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.soma-hero-title {
    font-family: 'Outfit', sans-serif;
    /* Geometric font to match Sun */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: min(34vw, 19.2rem);
    /* Increased by ~20% */
    /* Increased size */
    /* Responsive giant text */
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    gap: 0.05em;
    /* Small gap between letters */
    user-select: none;
    direction: ltr;
    /* Always LTR even in RTL mode */
}

.soma-letter {
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

/* Sun Animation Container (Canvas Host) */
#sun-canvas-container {
    width: 0.8em;
    /* Relative to font size */
    height: 0.8em;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Ensure canvas sits correctly */
}

canvas#sun-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .text-2xl {
        font-size: 1.25rem;
        /* Smaller logo */
    }

    /* Adjust Hero */
    /* Adjust Hero */
    main section:first-of-type {
        min-height: 100vh;
        /* Ensure full overlap */
        justify-content: center;
        /* Center content vertically */
        padding-top: 0;
        /* Header is gone, no need for padding */
    }

    /* Fixed size override removed to support fluid SOMA text */

    .hero-text {
        margin-top: 0 !important;
        /* Reset overlap */
    }

    .hero-text h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-text p {
        font-size: 1rem !important;
    }
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
    transform: translateY(-5px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-radius: 50%;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: #fff;
}

.service-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Media Query for Services on Mobile */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }
}

/* Product Section */
.product-row {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 4rem;
}

.product-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 2px;
    /* Space for border */
    overflow: hidden;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Shining Sine/Spine Border Effect */
.product-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0%,
            transparent 80%,
            var(--accent-color) 100%);
    animation: rotate-border 4s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 0;
}

@keyframes rotate-border {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.product-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: 4rem 2rem;
    /* Increased vertical padding */
    z-index: 1;
    display: flex;
    flex-direction: row;
    /* Side-by-side Desktop */
    align-items: center;
    gap: 2rem;
    height: 100%;
}

.product-image {
    width: 35%;
    /* Reduced size */
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.product-info h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.product-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.product-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--accent-glow);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.product-link:hover {
    background: var(--accent-color);
}

/* Media Query for Product Layout on Mobile */
@media (max-width: 768px) {
    .product-content {
        flex-direction: column;
        text-align: center;
    }

    .product-image {
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .product-info {
        width: 100%;
    }
}

/* Language Switcher */
.lang-link {
    color: var(--text-primary);
    opacity: 0.4;
    transition: opacity 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.lang-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
}

.lang-link.active {
    opacity: 1;
    color: var(--text-primary);
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
}