/* --- Variables --- */
:root {
    --bg: #F4F7F5;
    /* Light Sage */
    --surface: #ffffff;
    --text: #1A1C1B;
    --text-muted: #5C615F;
    --accent: #10583A;
    /* Greenlock Green */
    --border: #E0E5E2;

    --font-heading: 'Instrument Serif', serif;
    --font-body: 'Manrope', sans-serif;

    --container: 1400px;
    --gap: clamp(1.5rem, 4vw, 3rem);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Typography --- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 12vw, 8rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 6vw, 4rem);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Layout --- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

section {
    padding: clamp(4rem, 10vh, 8rem) 0;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

/* CSS-only Ambient Background */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(16, 88, 58, 0.05), transparent 40%);
    z-index: -1;
    animation: ambient 20s infinite linear;
}

@keyframes ambient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-meta {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 2rem;
}

.btn {
    display: inline-flex;
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    border-radius: 100px;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

/* --- Expertise Grid --- */
.expertise-grid {
    display: grid;
    /* Mobile First: 1 column, but adapts to space */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--surface);
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    /* Slight radius */
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.3s ease, transform 0.3s var(--ease);
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.service-card .num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--border);
}

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .project-card:nth-child(even) {
        margin-top: 6rem;
        /* Offset layout */
    }
}

.project-card img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    margin-bottom: 1.5rem;
    background: #ccc;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
    color: var(--text-muted);
}

/* --- Utilities --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}