/* PrimalCode Website - Modern One-Page Design */

/* 1. Google Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Open+Sans:wght@400;600;700&display=swap');

/* 2. CSS Variables */
:root {
    /* Color Palette - Monochrome Theme */
    --primary-color: #000000; /* Pure Black */
    --secondary-color: #9B9B9B; /* Medium Gray */
    --accent-color: #505050;   /* Dark Gray for accents */
    --text-dark: #1a1a1a;     /* Near Black */
    --text-light: #FFFFFF;     /* White */
    --background-light: #FFFFFF;
    --background-gray: #f5f5f5; /* Light gray for sections */
    --gradient-start: #606060;  /* Medium-Dark Gray */
    --gradient-end: #303030;    /* Dark Gray */
    
    /* Typography */
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --nav-height: 140px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(10, 35, 66, 0.08);
    --shadow-md: 0 4px 12px rgba(10, 35, 66, 0.12);
    --shadow-lg: 0 8px 24px rgba(10, 35, 66, 0.16);
    --shadow-xl: 0 12px 48px rgba(10, 35, 66, 0.24);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 3. Basic Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    background-color: var(--background-light);
}

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

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

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* 4. Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--primary-color);
    margin-bottom: 0.75em;
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
    margin-bottom: 1.2rem;
    color: var(--text-dark);
    opacity: 0.9;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 5. Layout & Container */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
    position: relative;
}

section:nth-of-type(even) {
    background-color: var(--background-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* 6. Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    height: 140px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    transition: all var(--transition-normal);
    padding: 10px 0;
}

.navbar.scrolled {
    height: 100px;
    box-shadow: var(--shadow-lg);
    padding: 5px 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    transition: transform var(--transition-normal);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo img {
    max-height: 120px;
    transition: max-height var(--transition-normal);
    width: auto;
}

.navbar.scrolled .nav-logo img {
    max-height: 85px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-links a {
    font-family: var(--font-headings);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color var(--transition-fast);
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
    text-decoration: none;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.menu-toggle.active .hamburger:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* 7. Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #000000 0%, #2a2a2a 100%);
    padding-top: var(--nav-height);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(150, 150, 150, 0.02) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(20px) rotate(-1deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 20px;
}

.hero-title {
    color: var(--text-light);
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 0.5em;
    font-weight: 800;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    opacity: 0.95;
    color: var(--text-light);
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 8. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    border-radius: 50px;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #404040 0%, #1a1a1a 100%);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #505050;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    background: linear-gradient(135deg, #505050 0%, #2a2a2a 100%);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-light);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-submit {
    width: 100%;
    max-width: 250px;
    margin: 20px auto 0;
    display: block;
}

/* 9. About/Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.value-item {
    background: var(--background-light);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #808080 0%, #404040 100%);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    transform-origin: left;
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.value-item:hover::before {
    transform: scaleX(1);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #808080 0%, #404040 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-light);
    border: 2px solid #e0e0e0;
}

.value-item h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

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

.service-card {
    background: var(--background-light);
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, rgba(150, 150, 150, 0.1) 0%, rgba(100, 100, 100, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #404040;
    transition: all var(--transition-normal);
    border: 2px solid #f0f0f0;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, #606060 0%, #303030 100%);
    color: var(--text-light);
    transform: scale(1.1);
    border-color: #808080;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--accent-color);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.service-link:hover {
    gap: 12px;
    text-decoration: none;
}

/* 11. Approach Section */
.approach-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.approach-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.approach-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--background-light);
    border-radius: 8px;
    transition: all var(--transition-normal);
}

.approach-feature:hover {
    transform: translateX(10px);
    background: linear-gradient(135deg, rgba(44, 165, 141, 0.05) 0%, rgba(30, 122, 97, 0.05) 100%);
}

.approach-feature i {
    color: var(--accent-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* 12. Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.testimonial-card {
    background: var(--background-light);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: all var(--transition-normal);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-quote {
    color: var(--accent-color);
    font-size: 3rem;
    line-height: 1;
    opacity: 0.2;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 30px;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid var(--background-gray);
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.author-info p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0;
}

/* 13. Contact Form */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background: var(--background-light);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form .form-row,
.contact-form .form-group.full-width {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid var(--background-gray);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--background-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #606060;
    box-shadow: 0 0 0 4px rgba(100, 100, 100, 0.1);
}

.form-group i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    opacity: 0.5;
    transition: all var(--transition-normal);
}

.form-group textarea ~ i {
    top: 25px;
    transform: translateY(0);
}

.form-group input:focus ~ i,
.form-group select:focus ~ i,
.form-group textarea:focus ~ i {
    opacity: 1;
}

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

.contact-info {
    text-align: center;
    margin-top: 40px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(150, 150, 150, 0.1) 0%, rgba(100, 100, 100, 0.1) 100%);
    border-radius: 50px;
    transition: all var(--transition-normal);
    border: 1px solid #e0e0e0;
}

.contact-method:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #606060 0%, #303030 100%);
    color: var(--text-light);
    text-decoration: none;
    border-color: #505050;
}

/* 14. Footer */
.footer {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #FFFFFF;
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #606060, transparent);
}

.footer p {
    margin-bottom: 0.5rem;
    color: #FFFFFF;
    opacity: 1;
}

.footer a {
    color: #CCCCCC;
    transition: all var(--transition-normal);
}

.footer a:hover {
    color: #FFFFFF;
    text-decoration: none;
}

/* 15. Responsive Design */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .navbar {
        height: 90px;
        padding: 5px 0;
    }
    
    .navbar.scrolled {
        height: 75px;
    }
    
    .nav-logo img {
        max-height: 70px;
    }
    
    .navbar.scrolled .nav-logo img {
        max-height: 60px;
    }
    
    .nav-links {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background: var(--background-light);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 50px 20px;
        gap: 25px;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 250px;
    }
    
    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .approach-features {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .services-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .value-item {
        padding: 30px 20px;
    }
}

/* 16. Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* 17. Scroll Indicator */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 18. Loading Animation */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

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