/* =========================================
   MASTERY LAB - PREMIUM DESIGN SYSTEM
   ========================================= */

:root {
    /* --- Colors --- */
    --color-primary: #D6001C;
    /* Signature Red */
    --color-primary-dark: #A50014;
    --color-bg: #050505;
    /* Deep Black */
    --color-bg-alt: #0F0F0F;
    /* Slightly Lighter Black */
    --color-text-main: #FFFFFF;
    --color-text-muted: #B0B0B0;
    --color-border: rgba(255, 255, 255, 0.1);

    /* --- Typography --- */
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --text-hero: clamp(3rem, 8vw, 6rem);
    --text-h1: clamp(2.5rem, 5vw, 4rem);
    --text-h2: clamp(2rem, 4vw, 3rem);
    --text-h3: 1.5rem;
    --text-body: 1rem;
    --text-small: 0.875rem;

    /* --- Spacing --- */
    --spacing-xs: 0.5rem;
    /* 8px */
    --spacing-sm: 1rem;
    /* 16px */
    --spacing-md: 2rem;
    /* 32px */
    --spacing-lg: 4rem;
    /* 64px */
    --spacing-xl: 8rem;
    /* 128px */

    --container-width: 1400px;
    --border-radius: 12px;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

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

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

.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
}

/* =========================================
   LAYOUT UTILITIES
   ========================================= */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

    :root {
        --spacing-xl: 4rem;
        --spacing-lg: 3rem;
    }
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(214, 0, 28, 0.4);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(214, 0, 28, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}


/* Artistic Hero Button */
.btn-hero-artistic {
    position: relative;
    /* Electric Red Gradient */
    background: linear-gradient(135deg, #FF0033 0%, #D6001C 100%);
    color: #fff;
    /* Smaller size */
    font-size: 1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 100, 100, 0.4);
    overflow: hidden;
    z-index: 1;
    /* Electric Glow */
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.6),
        0 0 30px rgba(255, 0, 51, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-hero-artistic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            /* Brighter shine */
            transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-hero-artistic:hover {
    transform: scale(1.05) translateY(-2px);
    /* Intensified Electric Glow */
    box-shadow: 0 0 25px rgba(255, 0, 51, 0.8),
        0 0 50px rgba(255, 0, 51, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-hero-artistic:hover::before {
    left: 100%;
}


/* Cards */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--color-primary);
}

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

.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
    /* Offset for navbar */
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.4);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--color-bg) 90%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
    padding: 0 var(--spacing-sm);
}

.hero-subtitle {
    font-family: var(--font-body);
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: var(--spacing-sm);
    display: block;
    animation: fadeInDown 1s ease;
}

.hero-title {
    font-size: var(--text-hero);
    margin-bottom: var(--spacing-md);
    line-height: 1;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-lg) auto;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    animation: fadeInUp 1s ease 0.6s backwards;
}

.hero-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

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

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

.hero-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

@media (max-width: 768px) {
    .hero-cards {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   LAB SECTIONS
   ========================================= */

.lab-section {
    position: relative;
    padding: var(--spacing-xl) 0;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.lab-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.lab-info h2 {
    font-size: var(--text-h1);
    margin-bottom: var(--spacing-sm);
}

.lab-info p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.lab-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lab-image img {
    width: 100%;
    transition: transform 0.6s ease;
}

.lab-section:hover .lab-image img {
    transform: scale(1.05);
}

.lab-section.alt .lab-content {
    direction: rtl;
    /* Flip order visually */
}

.lab-section.alt .lab-info {
    direction: ltr;
    /* Reset text direction */
}

@media (max-width: 968px) {
    .lab-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .lab-section.alt .lab-content {
        direction: ltr;
    }
}

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

footer {
    padding: var(--spacing-lg) 0;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    display: inline-block;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.copy {
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glitch-effect {
    position: relative;
}

.glitch-effect::before,
.glitch-effect::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   AUTH & FORMS
   ========================================= */

.nav-auth {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-left: 2rem;
}

.auth-link {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-link:hover {
    opacity: 1;
    color: var(--color-primary);
}

.btn-auth-highlight {
    background: linear-gradient(135deg, var(--color-primary) 0%, #B00017 100%);
    color: white !important;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(214, 0, 28, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-auth-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 0, 28, 0.5);
}

/* Authentication Pages */
.auth-page {
    min-height: 100vh;
    padding-top: 120px;
    background: radial-gradient(circle at top right, #1a0003 0%, #050505 60%);
}

.auth-benefits {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.auth-benefits h1 {
    font-size: var(--text-h1);
    margin-bottom: var(--spacing-md);
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.benefit-card {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.auth-form-container {
    max-width: 600px;
    margin: 0 auto 4rem auto;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(214, 0, 28, 0.2);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

/* Contact Section */
#contact {
    background: radial-gradient(circle at center, #1a0003 0%, #050505 100%);
    position: relative;
    border-top: 1px solid var(--color-border);
}

.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 2rem;
    }
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: white;
    text-decoration: underline;
}

/* Futuristic Text Effect */
.text-futuristic {
    font-family: var(--font-heading);
    font-size: var(--text-h1);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.text-futuristic::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: var(--color-primary);
    overflow: hidden;
    white-space: nowrap;
    animation: fillText 3s linear infinite alternate;
    border-right: 2px solid var(--color-primary);
    filter: drop-shadow(0 0 5px var(--color-primary));
}

@keyframes fillText {
    0% {
        width: 0;
        opacity: 0.5;
    }

    50% {
        width: 50%;
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 1;
    }
}

/* =========================================
   BENEFITS GRID (Redesign)
   ========================================= */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.benefit-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 3rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.benefit-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.benefit-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

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

/* Large Background Number */
.benefit-index {
    position: absolute;
    top: -1rem;
    right: 1rem;
    font-size: 8rem;
    font-family: var(--font-heading);
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    z-index: 0;
    transition: all 0.4s ease;
    user-select: none;
}

.benefit-card:hover .benefit-index {
    color: rgba(214, 0, 28, 0.1);
    transform: scale(1.1);
}

.benefit-content {
    position: relative;
    z-index: 1;
}

.benefit-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.benefit-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px var(--color-primary));
}

.benefit-desc {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 90%;
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .benefit-card {
        padding: 2rem;
    }

    .benefit-index {
        font-size: 6rem;
    }
}
/* =========================================
   MODAL STYLES
   ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
