/* Design System Variables */
:root {
    /* Colors - Refined Palette */
    --color-primary: #0A0E27;
    --color-secondary: #2563EB;
    --color-accent: #7C3AED;
    --color-text-primary: #0A0E27;
    --color-text-secondary: #64748B;
    --color-text-muted: #94A3B8;
    --color-background: #FFFFFF;
    --color-background-alt: #FAFBFC;
    --color-border: #E2E8F0;
    --color-border-light: #F1F5F9;
    
    /* Typography Scale */
    --font-serif: 'Instrument Serif', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
    --text-6xl: 4rem;
    --text-7xl: 5rem;
    
    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;
    --space-5xl: 12rem;
    
    /* Layout */
    --max-width: 1280px;
    --nav-height: 80px;
    
    /* Transitions */
    --transition-base: 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.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Base Styles */
body {
    font-family: var(--font-sans);
    color: var(--color-text-primary);
    background: var(--color-background);
    font-weight: 400;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-family: var(--font-sans);
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all var(--transition-base);
}

.navigation.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 0 var(--color-border-light);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
    position: relative;
}

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

.nav-link-cta {
    padding: 0.625rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 100px;
    font-weight: 500;
}

.nav-link-cta:hover {
    background: var(--color-secondary);
    color: white;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.menu-line {
    width: 24px;
    height: 1.5px;
    background: var(--color-text-primary);
    transition: all var(--transition-base);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-5xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 900px;
    position: relative;
}

.hero-headline {
    font-size: clamp(var(--text-4xl), 7vw, var(--text-7xl));
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
}

.headline-line {
    display: block;
}

.headline-line.accent {
    font-style: italic;
    color: var(--color-text);
}

.headline-line.accent .text-animate {
    color: var(--color-text);
    font-weight: 400;
    position: relative;
}

.headline-line.accent .text-animate:first-child,
.headline-line.accent .text-animate:last-child {
    /* Emphasize "purpose" and "precision" */
    color: var(--color-secondary);
    font-weight: 500;
}

.hero-description {
    font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
    line-height: 1.6;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin-bottom: var(--space-2xl);
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
}

/* Hero Background Effects */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float-orb 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    bottom: -10%;
    right: -5%;
    animation-delay: 7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -40px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Particle Field */
.particle-field {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-secondary);
    opacity: 0.5;
    border-radius: 50%;
    animation: particle-float 15s infinite linear;
}

@keyframes particle-float {
    from {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    to {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Hero Decoration */
.hero-decoration {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.floating-shape {
    animation: float-shape 10s infinite ease-in-out;
}

@keyframes float-shape {
    0%, 100% {
        transform: rotate(0deg) translateY(0);
    }
    25% {
        transform: rotate(90deg) translateY(-20px);
    }
    50% {
        transform: rotate(180deg) translateY(0);
    }
    75% {
        transform: rotate(270deg) translateY(20px);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
}

.scroll-text {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
    opacity: 0.7;
}

.scroll-arrow {
    animation: bounce-arrow 2s infinite;
}

@keyframes bounce-arrow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* Text Animation Effects */
.text-animate {
    display: inline-block;
    opacity: 0;
    animation: text-reveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.headline-line:nth-child(1) .text-animate:nth-child(1) { animation-delay: 0.2s; }
.headline-line:nth-child(1) .text-animate:nth-child(2) { animation-delay: 0.3s; }
.headline-line:nth-child(2) .text-animate:nth-child(1) { animation-delay: 0.4s; }
.headline-line:nth-child(2) .text-animate:nth-child(2) { animation-delay: 0.5s; }
.headline-line:nth-child(3) .text-animate:nth-child(1) { animation-delay: 0.6s; }
.headline-line:nth-child(3) .text-animate:nth-child(2) { animation-delay: 0.7s; }
.headline-line:nth-child(3) .text-animate:nth-child(3) { animation-delay: 0.8s; }

@keyframes text-reveal {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.gradient-text {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
    /* Fallback for browsers that don't support text gradients */
    @supports not ((-webkit-background-clip: text) or (background-clip: text)) {
        background: none;
        color: var(--color-secondary);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: 100px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.button-primary {
    background: var(--color-primary);
    color: white;
}

.button-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
}

.button-icon {
    transition: transform var(--transition-base);
}

.button:hover .button-icon {
    transform: translateX(4px);
}

/* Philosophy Section */
.philosophy {
    padding: var(--space-5xl) 0;
    background: var(--color-background-alt);
}

.section-intro {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
}

.philosophy-card {
    padding: var(--space-2xl);
    background: white;
    border-radius: 8px;
    transition: all var(--transition-base);
}

.philosophy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.philosophy-number {
    font-family: var(--font-serif);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    letter-spacing: 0.1em;
}

.philosophy-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-sm);
}

.philosophy-text {
    color: var(--color-text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

/* Portfolio Section */
.portfolio {
    padding: var(--space-5xl) 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
}

.portfolio-item {
    position: relative;
    background: var(--color-background-alt);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-slow);
    cursor: pointer;
    border: 1px solid var(--color-border-light);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.portfolio-item.is-coming-soon:hover {
    transform: translateY(-4px);
}

.portfolio-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.portfolio-image.is-coming-soon {
    background: linear-gradient(135deg, rgba(10,14,39,0.04) 0%, rgba(37,99,235,0.06) 100%);
}

.portfolio-hero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Coming Soon visual */
.coming-soon-visual {
    position: absolute;
    inset: 0;
}

.cs-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--color-border-light);
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    backdrop-filter: blur(6px);
}

.cs-shape {
    position: absolute;
    filter: blur(30px);
    opacity: 0.6;
}

.cs-shape-1 {
    width: 280px;
    height: 280px;
    background: radial-gradient(closest-side, rgba(124,58,237,0.35), transparent 70%);
    top: -40px;
    left: -40px;
}

.cs-shape-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(closest-side, rgba(37,99,235,0.28), transparent 70%);
    bottom: -60px;
    right: -30px;
}

.cs-shape-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(closest-side, rgba(14,165,233,0.25), transparent 70%);
    top: 30%;
    left: 55%;
    transform: translate(-50%, -50%);
}

.portfolio-content {
    padding: var(--space-xl);
}

.portfolio-category {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.portfolio-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-xs);
}

.portfolio-tagline {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    font-weight: 300;
    margin-bottom: var(--space-md);
}

.portfolio-description {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.portfolio-links {
    display: flex;
    gap: var(--space-sm);
}

.portfolio-link {
    font-size: var(--text-sm);
    color: var(--color-secondary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-base);
}

.portfolio-link:hover {
    gap: 8px;
}

/* About Section */
.about {
    padding: var(--space-5xl) 0;
    background: var(--color-background-alt);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    margin-bottom: var(--space-xl);
}

.about-description {
    font-size: var(--text-lg);
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
    padding-top: var(--space-3xl);
    border-top: 1px solid var(--color-border-light);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat-value {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    color: var(--color-text-primary);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Contact Section */
.contact {
    padding: var(--space-5xl) 0;
    background: linear-gradient(180deg, var(--color-background) 0%, var(--color-background-alt) 100%);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    margin-bottom: var(--space-lg);
}

.contact-description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
    font-weight: 300;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-lg);
    color: var(--color-secondary);
    font-weight: 500;
    transition: all var(--transition-base);
}

.contact-link:hover {
    gap: var(--space-sm);
    color: var(--color-accent);
}

/* Footer */
.footer {
    padding: var(--space-4xl) 0 var(--space-2xl);
    background: var(--color-primary);
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: var(--space-4xl);
    margin-bottom: var(--space-3xl);
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xs);
}

.footer-tagline {
    font-size: var(--text-sm);
    opacity: 0.7;
    font-weight: 300;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
}

.footer-title {
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-links a {
    font-size: var(--text-sm);
    opacity: 0.8;
    transition: opacity var(--transition-base);
    font-weight: 300;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.copyright {
    font-size: var(--text-sm);
    opacity: 0.6;
    margin-bottom: var(--space-xs);
    font-weight: 300;
}

.footer-note {
    font-size: var(--text-xs);
    opacity: 0.4;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hero Mobile Adjustments */
    .gradient-orb {
        filter: blur(60px);
    }
    
    .orb-1 {
        width: 300px;
        height: 300px;
    }
    
    .orb-2 {
        width: 250px;
        height: 250px;
    }
    
    .orb-3 {
        width: 200px;
        height: 200px;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .particle-field {
        opacity: 0.3;
    }
    
    .scroll-indicator {
        bottom: var(--space-lg);
    }
    
    .text-animate {
        animation-duration: 0.6s;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background: white;
        width: 100%;
        padding: var(--space-2xl);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transition: left var(--transition-base);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-headline {
        font-size: clamp(var(--text-3xl), 10vw, var(--text-5xl));
    }
    
    .philosophy-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}
