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

/* CSS Variables */
:root {
    --primary: #1a1a1a;
    --accent: #0e1f3f;
    --accent-hover: #1a3356;
    --text: #2c2c2c;
    --text-light: #666666;
    --bg: #fafafa;
    --white: #ffffff;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.08);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #f5f5f5;
        --accent: #4a7bc8;
        --accent-hover: #5a8bd8;
        --text: #e0e0e0;
        --text-light: #a0a0a0;
        --bg: #0a0a0a;
        --white: #1a1a1a;
        --border: #2a2a2a;
        --shadow: rgba(255, 255, 255, 0.05);
    }

    .service-icon {
        background: linear-gradient(135deg, #4a7bc8, #5a8bd8) !important;
        color: #ffffff;
    }

    .about-content h2 em {
        color: #5a8bd8 !important;
    }
}

/* Body */
body {
    font-family: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 42px;
    width: auto;
    display: block;
    content: url('hearne-logo.png');
}

@media (prefers-color-scheme: dark) {
    .logo-img {
        content: url('hearne-logo-dark.png');
    }
}

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

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a.active {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1.5rem 4rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero .tagline {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Page Header */
.page-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

.submit-button {
    width: 100%;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Archivo', sans-serif;
}

.submit-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

/* Services Section */
.services {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-color: var(--accent);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #1a3356);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
}

/* Service Details Pages */
.service-details {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.service-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.service-block h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-block h2 span {
    font-size: 2rem;
}

.service-block h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--primary);
    margin: 2rem 0 1rem;
}

.service-block p {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.service-block ul {
    list-style: none;
    margin: 1.5rem 0;
}

.service-block li {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.service-block li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.25rem;
}

/* About Section */
.about {
    max-width: 1200px;
    margin: 6rem auto 4rem;
    padding: 0 1.5rem;
}

.about-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.about-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.about-content h2 em {
    font-style: normal;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.about-content p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

.about-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.about-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.about-section p {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-card {
    text-align: center;
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.value-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.value-card p {
    font-size: 1rem;
    color: var(--text-light);
}

.location {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border-radius: 4px;
}

/* Contact Section */
.contact-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.contact-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Archivo', sans-serif;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

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

.contact-info {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

.contact-info a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 1.5rem 2rem;
    margin-top: 6rem;
}

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

.footer-content p {
    opacity: 0.8;
    font-size: 0.95rem;
    color: var(--text-light);
}

@media (prefers-color-scheme: dark) {
    footer {
        background: var(--bg);
        border-top: 1px solid var(--border);
    }

    .footer-content p {
        color: var(--text-light);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1, .hero .tagline, .hero .cta-button {
    animation: fadeInUp 0.6s ease backwards;
}

.hero .tagline {
    animation-delay: 0.1s;
}

.hero .cta-button {
    animation-delay: 0.2s;
}

.service-card {
    animation: fadeInUp 0.6s ease backwards;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        max-height: 300px;
    }

    .nav-links a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
        display: block;
    }

    .nav-links a::after {
        display: none;
    }

    .hero {
        padding: 4rem 1.5rem 3rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .about-content {
        padding: 2rem 1.5rem;
    }

    .about-section {
        padding: 2rem 1.5rem;
    }

    .service-block {
        padding: 2rem 1.5rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 1rem 1.25rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
}
