/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: hsl(222.2, 84%, 4.9%);
    background-color: hsl(0, 0%, 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header and Navigation */
.header {
    border-bottom: 1px solid hsl(214.3, 31.8%, 91.4%);
    background-color: hsl(0, 0%, 100%);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(222.2, 84%, 4.9%);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: hsl(215.4, 16.3%, 46.9%);
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: hsl(222.2, 84%, 4.9%);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: hsl(222.2, 84%, 4.9%);
}

/* Main content */
.main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Hero section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, hsl(222.2, 84%, 4.9%), hsl(215.4, 16.3%, 46.9%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: hsl(215.4, 16.3%, 46.9%);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features section */
.features {
    padding: 4rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border: 1px solid hsl(214.3, 31.8%, 91.4%);
    border-radius: 0.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsl(214.3, 31.8%, 91.4%);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(222.2, 84%, 4.9%);
}

.feature-card p {
    color: hsl(215.4, 16.3%, 46.9%);
    line-height: 1.6;
}

/* CTA section */
.cta {
    padding: 4rem 0;
    text-align: center;
    background-color: hsl(210, 40%, 98%);
    border-radius: 0.75rem;
    margin: 2rem 0;
}

.cta-content {
    max-width: 500px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(222.2, 84%, 4.9%);
}

.cta p {
    color: hsl(215.4, 16.3%, 46.9%);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* Content pages */
.content-page {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid hsl(214.3, 31.8%, 91.4%);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: hsl(222.2, 84%, 4.9%);
}

.page-subtitle {
    color: hsl(215.4, 16.3%, 46.9%);
    font-size: 1rem;
}

.content {
    line-height: 1.8;
}

.content-section {
    margin-bottom: 2.5rem;
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(222.2, 84%, 4.9%);
}

.content-section p {
    margin-bottom: 1rem;
    color: hsl(215.4, 16.3%, 46.9%);
}

.content-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    color: hsl(215.4, 16.3%, 46.9%);
}

.contact-info {
    background-color: hsl(210, 40%, 98%);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid hsl(222.2, 84%, 4.9%);
}

/* Contact page specific styles */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(222.2, 84%, 4.9%);
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.contact-label {
    font-weight: 500;
    color: hsl(222.2, 84%, 4.9%);
}

.contact-value {
    color: hsl(221.2, 83.2%, 53.3%);
    text-decoration: none;
}

.contact-value:hover {
    text-decoration: underline;
}

/* Form styles */
.contact-form {
    background-color: hsl(0, 0%, 100%);
    border: 1px solid hsl(214.3, 31.8%, 91.4%);
    border-radius: 0.75rem;
    padding: 2rem;
}

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

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: hsl(222.2, 84%, 4.9%);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid hsl(214.3, 31.8%, 91.4%);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: hsl(0, 0%, 100%);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: hsl(221.2, 83.2%, 53.3%);
    box-shadow: 0 0 0 3px hsl(221.2, 83.2%, 53.3%, 0.1);
}

.form-input.error,
.form-textarea.error {
    border-color: hsl(0, 84.2%, 60.2%);
}

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

.error-message {
    display: block;
    color: hsl(0, 84.2%, 60.2%);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    text-align: center;
    padding: 2rem;
    background-color: hsl(142.1, 76.2%, 36.3%, 0.1);
    border: 1px solid hsl(142.1, 76.2%, 36.3%, 0.3);
    border-radius: 0.75rem;
}

.success-icon {
    font-size: 3rem;
    color: hsl(142.1, 76.2%, 36.3%);
    margin-bottom: 1rem;
}

.form-success h3 {
    color: hsl(142.1, 76.2%, 36.3%);
    margin-bottom: 0.5rem;
}

.form-success p {
    color: hsl(215.4, 16.3%, 46.9%);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.btn-primary {
    background-color: hsl(222.2, 84%, 4.9%);
    color: hsl(210, 40%, 98%);
}

.btn-primary:hover {
    background-color: hsl(222.2, 84%, 4.9%, 0.9);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: hsl(222.2, 84%, 4.9%);
    border: 1px solid hsl(214.3, 31.8%, 91.4%);
}

.btn-secondary:hover {
    background-color: hsl(210, 40%, 98%);
}

.btn-submit {
    width: 100%;
}

/* Footer */
.footer {
    border-top: 1px solid hsl(214.3, 31.8%, 91.4%);
    background-color: hsl(210, 40%, 98%);
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    color: hsl(215.4, 16.3%, 46.9%);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: hsl(215.4, 16.3%, 46.9%);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: hsl(222.2, 84%, 4.9%);
}

/* Responsive design */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.5rem;
        font-size: 0.875rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .cta h2 {
        font-size: 1.5rem;
    }
    
    .content-section h2 {
        font-size: 1.25rem;
    }
}

/* Link styles */
a {
    color: hsl(221.2, 83.2%, 53.3%);
}

a:hover {
    color: hsl(221.2, 83.2%, 53.3%, 0.8);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus visible for better accessibility */
.btn:focus-visible,
.nav-link:focus-visible,
.form-input:focus-visible,
.form-textarea:focus-visible {
    outline: 2px solid hsl(221.2, 83.2%, 53.3%);
    outline-offset: 2px;
}
