/* Tänne laitoin kaikki värit ja muut toistuvat tyylit muuttujiksi,
   jotta niitä on helppo muuttaa myöhemmin yhdestä paikasta */

:root {
    --primary: #1B7F5A;
    --accent: #7C3AED;
    --bg: #F7F7F2;
    --text: #111827;
    --muted: #6B7280;
    --border: #E5E7EB;

    --radius: 18px;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
}

/* Box sizing helpottaa layoutia */
* {
    box-sizing: border-box;
}

/* Poistetaan selaimen oletusmarginaalit */
html,
body {
    margin: 0;
    padding: 0;
}

/* Sivun perusasetukset */
body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main täyttää sivun keskiosan */
main {
    flex: 1;
}

/* Linkit */
a {
    color: inherit;
    text-decoration: none;
}

/* Container keskittää sisällön */
.container {
    width: 90%;
    max-width: 70rem;
    margin: 0 auto;
}

/* HEADER */

.header {
    background: rgba(247, 247, 242, 0.95);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2% 0;
}

/* LOGO */

.brand {
    display: flex;
    align-items: center;
}

.brand-logo {
    width: 40%;
    min-width: 5rem;
    height: auto;
    mix-blend-mode: multiply;
}

/* NAV LINKS */

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    font-weight: 700;
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
}

.nav-links a:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
}

.nav-links a.active {
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent);
}

/* HERO */

.hero {
    padding: 5% 0;
    border-bottom: 4px solid rgba(124, 58, 237, 0.35);
    background: linear-gradient(180deg,
            rgba(27, 127, 90, 0.05),
            rgba(124, 58, 237, 0.05));
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4%;
    align-items: start;
}

/* HERO CARD */

.hero-card {
    background: white;
    border: 1px solid var(--border);
    border-left: 6px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 5%;
    max-width: 520px;
}

.hero-card h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 3vw, 42px);
}

/* Lead text */

.lead {
    margin: 0;
    color: var(--muted);
    font-size: 1.1rem;
}

/* Button */

.btn-main {
    display: inline-block;
    margin-top: 1rem;
    padding: 1rem 1.4rem;
    font-weight: 800;
    background: linear-gradient(90deg, #146B4B, #5B21B6);
    color: white;
    border-radius: 1rem;
}

/* Pills */

.pills {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pill {
    background: white;
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
}

/*
    Tässä mä lisäsin uuden wrapperin kuvalle ja kuvatekstille.
    Sen idea on vaan pitää ne nätisti päällekkäin:
    ensin kuva, sitten teksti sen alla.
*/
.hero-media {
    display: flex;
    flex-direction: column;
}

/*
    Tässä mä poistin sen vanhan position: relative -idean pois,
    koska sitä tarvitaan yleensä silloin kun teksti laitetaan kuvan päälle.
    Nyt kun teksti tulee kuvan alle, sitä ei enää tarvita.
*/
.hero-image {
    aspect-ratio: 4 / 3;
    background:
        linear-gradient(120deg,
            rgba(27, 127, 90, 0.15),
            rgba(124, 58, 237, 0.15)),
        url("hero.jpg") center / cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/*
    Tässä mä tein kuvatekstistä ihan normaalin tekstin,
    joka istuu kuvan alapuolella eikä kuvan päällä.
*/
.image-caption {
    margin-top: 0.7rem;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* SECTION */

.section {
    padding: 4% 0;
}

.section h2 {
    margin-bottom: 16px;
}

/* CARDS */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-left: 6px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6%;
}

/* BLOG */

.blog-list {
    display: grid;
    gap: 18px;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.blog-item h3 {
    margin: 6px 0 10px;
}

.text-box {
    background: white;
    border: 1px solid var(--border);
    border-left: 6px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}

/* FOOTER */

.footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 2%;
}

.footer p {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* MOBILE */

@media (max-width: 900px) {

    .nav {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 4% 0;
    }

    .brand {
        justify-content: center;
        width: 100%;
    }

    .brand-logo {
        width: 80%;
        max-width: 20rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.6rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .hero-card {
        max-width: none;
        width: 100%;
    }

    .footer {
        padding: 4% 0;
    }

    .footer .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0 5%;
    }
}