/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: hsl(222, 20%, 8%);
        color: hsl(210, 20%, 95%);
    }

    .btn-outline {
        border-color: hsl(222, 20%, 20%);
    }

    .nav-link {
        color: hsl(210, 20%, 70%);
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: hsl(210, 20%, 98%);
    color: hsl(222, 15%, 20%);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.apply-btn {
    background: linear-gradient(135deg, hsl(0, 80%, 58%), hsl(0, 92%, 75%));
    color: hsl(0, 0%, 100%);
    box-shadow: 0 4px 20px -4px hsl(0, 80%, 58% / 0.2);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px hsl(0, 80%, 58% / 0.3);
}

.btn-outline {
    background: transparent;
    color: hsl(222, 15%, 20%);
    border: 1px solid hsl(210, 20%, 90%);
}

.btn-outline:hover {
    background: hsl(0, 0%, 100%);
    border-color: hsl(0, 80%, 58%);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid hsl(210, 20%, 90%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 6rem;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 700;
    color: hsl(222, 15%, 20%);
    text-decoration: none;
}

.logo i {
    color: hsl(0, 80%, 58%);
    font-size: clamp(1.25rem, 4vw, 1.5rem);
}

/* Desktop Navigation */
.nav-desktop {
    display: none;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.5rem);
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    color: hsl(222, 15%, 50%);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.875rem, 2vw, 1rem);
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link:focus {
    color: hsl(0, 80%, 58%);
}

/* Header CTA */
.header-cta {
    display: none;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .header-cta {
        display: flex;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: hsl(222, 15%, 50%);
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
    color: hsl(0, 80%, 58%);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: hsl(0, 0%, 100%);
    border-bottom: 1px solid hsl(210, 20%, 90%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-top: 40px;
}

.mobile-nav.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
}

.mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid hsl(210, 20%, 90%);
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .header-content {
        flex-direction: row;
        align-items: center;
    }

    .mobile-nav {
        width: 100%;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-desktop {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.9rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

:focus {
    outline: 2px solid hsl(0, 80%, 58%);
    outline-offset: 2px;
}

.side-logo {
    height: 5rem;
    width: auto;
    object-fit: contain;
    display: block;
}