@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-main: 'Outfit', sans-serif;

    /* Premium Color Palette */
    --color-primary: #0f172a;
    /* Deep Slate Blue */
    --color-primary-light: #334155;
    /* Lighter Slate */
    --color-accent: #f59e0b;
    /* Amber Gold */
    --color-accent-hover: #d97706;
    /* Darker Amber */
    --color-bg: #f8fafc;
    /* Clean White-ish */
    --color-surface: #ffffff;
    /* Pure White */
    --color-text: #1e293b;
    /* Dark Text */
    --color-text-light: #64748b;
    /* Muted Text */
    --color-border: #e2e8f0;
    /* Subtle Border */

    /* Glassmorphism & Shadows */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.3);

    /* Spacing & Radius */
    --radius-md: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

section {
    padding: 6rem 1rem;
    position: relative;
    overflow: hidden;
}

/* Utility Classes */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--glass-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styles */
.logo-link {
    display: flex;
    /* Ensure link wraps image and text as a block */
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    /* Prevent blue link color */
}

.mobile-toggle {
    display: none;
    /* Fixed: Remove white dot (toggle) on desktop */
}

.logo img {
    height: 50px;
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    /* Default absolute white */
    letter-spacing: -0.5px;
    transition: color 0.3s;
    line-height: 1.2;
}

.logo-accent {
    color: var(--color-accent);
}

/* Scroll Effects */
.header.scrolled .logo img {
    height: 45px;
}

.header.scrolled .logo-text {
    color: var(--color-primary);
}

.nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav a {
    font-weight: 500;
    color: white;
    /* Default absolute white for Dark Hero */
    font-size: 1rem;
    position: relative;
    transition: all 0.3s;
}

/* When scrolled, nav links turn dark */
.header.scrolled .nav a:not(.btn) {
    color: var(--color-text);
}

.nav a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav a:not(.btn):hover::after {
    width: 100%;
}

.nav a:not(.btn):hover {
    color: var(--color-accent);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: white;
    padding-top: 100px;
    position: relative;
}

/* Background Animated Gradient Mesh */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent 70%);
    filter: blur(80px);
    animation: float 10s infinite alternate ease-in-out;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1), transparent 60%);
    filter: blur(80px);
    animation: float 15s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(30px, -30px);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3.8rem;
    /* Adjusted for better balance */
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -1.5px;
    max-width: 900px;
}

.hero-highlight {
    color: transparent;
    background: linear-gradient(to right, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 4rem;
    /* More space before buttons */
    max-width: 650px;
    font-weight: 300;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Services Grid */
.services {
    background-color: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--color-surface);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--color-accent), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    width: 70px;
    height: 70px;
    background: #fffbeb;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.service-card:hover .card-icon {
    transform: rotate(5deg) scale(1.1);
    background: var(--color-accent);
    color: white;
}

.card-title {
    font-size: 1.35rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.card-description {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* About Section */
.about {
    background: var(--color-surface);
}

.about-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-light);
}

.about-features {
    display: grid;
    gap: 1.5rem;
}

.feature-item {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--color-border);
}

.feature-item h3 {
    font-size: 2.5rem;
    color: var(--color-accent);
    font-weight: 800;
    line-height: 1;
}

.feature-item p {
    margin: 0;
    font-weight: 600;
    color: var(--color-primary);
}

/* Contact (Action Card) */
.contact-box {
    background: linear-gradient(135deg, var(--color-primary), #1e293b);
    padding: 4rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.contact-content-inner {
    position: relative;
    z-index: 2;
}

.contact-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.contact-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.contact-note {
    color: #94a3b8;
    margin-top: 1.5rem;
}

.email-link {
    font-size: 2rem;
    color: var(--color-accent);
    font-weight: 800;
    display: inline-block;
    margin: 1rem 0;
    position: relative;
    transition: all 0.3s;
    overflow-wrap: break-word;
    /* Better than break-all */
    word-break: normal;
}

.email-link:hover {
    color: #fbbf24;
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: white;
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    /* Fixed: Better Layout */
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-primary-light);
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 300px;
}

.footer h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 700;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    font-size: 1.1rem;
    color: #94a3b8;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-contact p {
    color: #94a3b8;
    margin-bottom: 0.8rem;
}

.footer-contact a {
    color: white;
    opacity: 0.8;
    transition: 0.3s;
}

.footer-contact a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    color: #64748b;
    font-size: 0.9rem;
}


/* Error Page Styles */
.error-page {
    text-align: center;
    padding: 10rem 1rem 6rem;
}

.error-content-wrapper {
    max-width: 800px;
    /* Increased from 600px to allow single-line title */
    margin: 0 auto;
}

.error-title-main {
    font-size: 3.2rem;
    /* Balanced size */
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    /* Force one line */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.error-code-small {
    background: linear-gradient(135deg, var(--color-accent), #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-visual {
    position: relative;
    display: block;
    margin-bottom: 2rem;
}

.error-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 150px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent 70%);
    filter: blur(40px);
    z-index: 1;
    pointer-events: none !important;
    /* Critical: Ensure glow doesn't block clicks */
}

.error-text {
    color: #94a3b8;
    margin-bottom: 4rem;
    /* Increased spacing to button */
    font-size: 1.15rem;
    line-height: 1.6;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }

    .hero {
        padding-top: 80px;
        text-align: center;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .feature-item {
        padding: 1.5rem;
    }

    .contact-box {
        padding: 2.5rem 1.5rem;
    }

    .contact-box h3 {
        font-size: 1.5rem;
    }

    .email-link {
        font-size: 1.1rem;
        /* Smaller for better fit on narrow screens */
        padding: 0 0.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .header {
        padding: 1rem 0;
    }

    /* Mobile UX Fixes */
    .logo-text {
        display: none;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1.5rem;
    }

    .mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }

    .mobile-toggle span {
        width: 100%;
        height: 3px;
        background: white;
        border-radius: 10px;
        transition: 0.3s;
    }

    .header.scrolled .mobile-toggle span {
        background: var(--color-primary);
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--color-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s ease;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        color: white !important;
        font-size: 1.25rem;
    }

    /* Toggle Animation */
    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}