:root {
  --bg: #11131c;
  --bg-alt: #191c29;
  --text: #e8eaed;
  --muted: #a9afb8;
  --accent: #ffc526;
  --line: #2a2e40;
  --max: 1040px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17,19,28,.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.bar {
  max-width: var(--max); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo img { height: 34px; width: auto; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
nav a {
  text-decoration: none; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent;
}
nav a:hover, nav a:focus { color: #fff; border-color: var(--accent); }

/* Hero */
.hero {
  text-align: center;
  padding: 110px 20px 100px;
  background: url("images/paikkakunta_tausta.jpg") center / cover no-repeat;
}
.hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.2; letter-spacing: .02em; }

section { padding: 70px 20px; }
section.alt { background: var(--bg-alt); }
.wrap { max-width: var(--max); margin: 0 auto; }
h2 { font-size: 1.9rem; margin: 0 0 32px; position: relative; padding-bottom: 12px; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: var(--accent); }
h3 { font-size: 1.25rem; margin: 36px 0 8px; }
h2 + h3 { margin-top: 0; }
.lead { max-width: 760px; margin: 0 0 16px; color: #d4d8de; }

/* Rules */
.penalties { max-width: 760px; margin: 0 0 16px; padding: 0; list-style: none; color: #d4d8de; }
.penalties li::before { content: "– "; }
.rule { max-width: 760px; margin: 0 0 10px; color: #d4d8de; }
.rule b { color: var(--accent); font-weight: 600; }
.rule.sub { margin-left: 24px; }
.rule.more { margin-top: -6px; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.notfound img { height: 34px; margin: 0 auto 28px; }
.notfound h1 { margin: 0 0 8px; }
.notfound p { margin: 0 0 24px; color: var(--muted); }
.btn {
  display: inline-block; margin-top: 8px; padding: 14px 34px;
  background: var(--accent); color: var(--bg); text-decoration: none;
  font-weight: 700; letter-spacing: .08em; border-radius: 4px;
  transition: filter .15s;
}
.btn:hover, .btn:focus { filter: brightness(1.15); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 34px 20px 44px; text-align: center; color: var(--muted); font-size: .92rem; }
footer ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
footer a { text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 720px) {
  .bar { flex-direction: column; align-items: flex-start; }
  .hero { padding: 80px 20px 70px; }
  section { padding: 52px 20px; }
}
