/* =========================
   PERUSASETUKSET
========================= */

:root {
  --primary: #1e293b;
  --accent: #2563eb;
  --light-bg: #f8fafc;
  --white: #ffffff;
  --text: #334155;
  --max-width: 1100px;
}

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

body {
  font-family: "Segoe UI", Roboto, sans-serif;
  background-color: var(--light-bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   HEADER
========================= */

header {
  background: var(--primary);
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* =========================
   NAVIGAATIO
========================= */

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--white);
  font-weight: 500;
  transition: 0.3s ease;
}

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

/* =========================
   PÄÄSISÄLTÖ
========================= */

main {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 1rem;
}

/* Osio- ja artikkelilaatikot */

section,
article {
  background: var(--white);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

section:hover,
article:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

h2 {
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: 1.5rem;
}

/* =========================
   FOOTER
========================= */

footer {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  nav ul {
    gap: 1rem;
  }

  section,
  article {
    padding: 1.5rem;
  }
}
