/* 
 * Perusasetukset ja muuttujat
 * --------------------------- */

:root {
    --color-accent: #c00030;
    --color-text-main: #222222;
    --color-text-muted: #333333;
    --color-bg: #ffffff;
    --color-card-bg: #ffffff;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.06);
    --radius-card: 16px;
    --container-max-width: 1120px;
    --spacing-section: 2.5rem;

    --hero-title-size: clamp(2.4rem, 4vw, 3.4rem);
    --hero-subtitle-size: calc(var(--hero-title-size) * 0.51);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Now', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
}

/* Yleiset apuluokat */

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Linkit */

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

/* Header / Hero */

.site-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
}

.hero {
    text-align: center;
}

.hero-title {
    margin: 0;
    font-family: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: var(--hero-title-size);
    color: var(--color-accent);
    letter-spacing: 0.03em;
}

.hero-subtitle {
    margin: 0.4rem 0 0.6rem 0;
    font-family: 'Now', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500; /* Now Medium */
    font-size: var(--hero-subtitle-size);
    color: var(--color-text-muted);
}

.hero-tagline {
    margin: 0.25rem auto 0;
    max-width: 34rem;
    font-family: 'Now', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400; /* lähempänä Light/Medium välistä */
    color: var(--color-text-muted);
}

/* Intro-teksti */

.intro {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

.intro p {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--color-text-main);
}

/* Korttiruudukko */

.cards-section {
    padding-top: var(--spacing-section);
    padding-bottom: var(--spacing-section);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

/* Kortti */

.card {
    background-color: var(--color-card-bg);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.card:hover,
.card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

/* Videoresponsiivisuus – pystymallinen (9:16) */

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #f5f5f5;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Kortin sisältö */

.card-content {
    padding: 1rem 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.card-title {
    margin: 0;
    font-family: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-accent);
}

.card-description {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

/* Meta-tiedot kortissa */

.card-meta {
    margin: 0.4rem 0 0;
    padding: 0.6rem 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.4rem 1rem;
    font-size: 0.85rem;
}

.card-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.card-meta dt {
    font-weight: 600;
    color: var(--color-text-muted);
}

.card-meta dd {
    margin: 0;
    color: var(--color-text-main);
}

/* Footer */

.site-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 0 1.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
}
.tree-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tree-divider-image {
    max-width: 90px;      /* pienennys – voit säätää esim. 70–120px */
    height: auto;
    margin-bottom: 0.5rem;
}

.tree-divider-line {
    width: 100%;
    max-width: 560px;
    height: 1px;
    background-color: #c00030; /* punainen linja */
    border-radius: 999px;
}

/* Responsiiviset tarkennukset */

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .card-content {
        padding: 0.9rem 0.9rem 1.1rem;
    }
}

@media (min-width: 900px) {
    .intro {
        padding-top: 1.5rem;
        padding-bottom: 0.75rem;
    }

    .intro p {
        font-size: 1.05rem;
    }
}


