* {
    box-sizing: border-box;
}

:root {
    --font-body: "Source Sans 3", sans-serif;
    --font-heading: "Lora", serif;
    --text-small: 0.875rem;
    --text-base: 1rem;
    --text-large: 1.25rem;
    --text-display: clamp(2rem, 5vw, 3rem);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: #222;
    background-color: #dbeafe;
}

h1,
h2 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

h1 {
    font-size: var(--text-display);
}

header p {
    font-size: var(--text-large);
}

nav,
footer {
    font-size: var(--text-small);
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #30b96d;
    color: #222;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 2px 8px #999;
}

.home-hero {
    animation: hero-fade-in 600ms ease-out both;
}

@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero {
        animation: none;
    }
}

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    background-color: #10581b;
    padding: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color: #facc15;
}

a:focus-visible {
    outline: 3px solid #facc15;
    outline-offset: 3px;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px #999;
}

section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #ede9fe;
    border-left: 5px solid #49910e;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #10581b;
    color: white;
}

@media (prefers-color-scheme: dark) {
    body {
        color: white;
        background-color: #222;
    }

    header {
        color: #dbeafe;
        background-color: #10581b;
    }

    main {
        color: #dbeafe;
        background-color: #10581b;
    }

    section {
        color: #dbeafe;
        background-color: #222;
        border-left-color: #30b96d;
    }

/*This is for the weather on the home page (task 5))*/
#weather {
  opacity: 0;
  transition: opacity 5s;
}

#weather.show {
  opacity: 1;
}

}