:root {
  --bg: #fffdf6;
  --bg-alt: #f3f6ff;
  --ink: #1b2240;
  --muted: #5f6680;
  --line: #e2e5f0;
  --yellow: #ffcb05;
  --yellow-dark: #e6b400;
  --blue: #2a5bd7;
  --red: #e3350d;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(27, 34, 64, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.prewrap { white-space: pre-wrap; }

/* Yläpalkki */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,253,246,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.logo-ball { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--ink);
  background: linear-gradient(var(--red) 0 44%, var(--ink) 44% 56%, #fff 56%); }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--blue); }

/* Painikkeet */
.btn { display: inline-block; background: var(--yellow); color: var(--ink) !important; font-weight: 700; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; border: 2px solid var(--ink); cursor: pointer; font-size: 1rem;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .1s, box-shadow .1s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: transparent; }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.btn-block { width: 100%; }

/* Hero */
.hero { padding: 64px 0 72px; background: radial-gradient(circle at 85% 30%, #fff1b8 0, transparent 45%), var(--bg); }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--red); font-size: .85rem; margin: 0 0 8px; }
.hl { background: linear-gradient(transparent 60%, var(--yellow) 60%); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; font-weight: 600; font-size: .95rem; }
.hero-cards { position: relative; height: 340px; }
.card-mock { position: absolute; width: 190px; height: 265px; border-radius: 12px; border: 8px solid var(--yellow);
  box-shadow: var(--shadow); display: flex; align-items: flex-end; justify-content: center; padding: 14px; }
.card-mock span { background: #fff; border-radius: 6px; padding: 2px 10px; font-weight: 800; font-size: .8rem; }
.card-mock.c1 { left: 6%; top: 30px; transform: rotate(-12deg); background: linear-gradient(135deg, #ffd1dc, #c9e7ff, #fff3b0, #d6ffd1); }
.card-mock.c2 { left: 30%; top: 0; transform: rotate(3deg); background: linear-gradient(160deg, #ff9a5a, #e3350d); z-index: 2; }
.card-mock.c3 { left: 52%; top: 50px; transform: rotate(14deg); background: linear-gradient(160deg, #7fb0ff, #2a5bd7); }

/* Osiot */
.section { padding: 72px 0; scroll-margin-top: 48px; }
.section-alt { background: var(--bg-alt); }
.grid { display: grid; gap: 18px; margin-top: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.tile p { margin: 0; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.steps p { margin: 0; color: var(--muted); }
.step-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow);
  border: 2px solid var(--ink); font-weight: 800; margin-bottom: 12px; }
.tips { background: #fff; border-left: 5px solid var(--yellow); border-radius: var(--radius); padding: 20px 24px; }
.tips ul { margin: 0; padding-left: 20px; }

/* Lomake */
.form { display: grid; gap: 16px; margin-top: 20px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(42,91,215,.15); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: auto; margin-top: 5px; }
.hp { position: absolute; left: -9999px; }
.dropzone { position: relative; border: 2px dashed #b8c0dc; border-radius: var(--radius); padding: 32px 16px; text-align: center; background: #fff; transition: .15s; }
.dropzone.over { border-color: var(--blue); background: #eef3ff; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone p { margin: 4px 0; }
.link { color: var(--blue); text-decoration: underline; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.previews:empty { display: none; }
.previews figure { margin: 0; }
.previews img, .noimg { width: 100%; aspect-ratio: 5/7; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.noimg { display: grid; place-items: center; background: var(--bg-alt); font-size: 1.8rem; }
.previews figcaption { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ilmoitukset */
.flashes { padding-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: 10px; margin: 0; }
.flash-error { background: #ffe8e3; color: #8a1f06; }
.flash-ok { background: #e3f8e6; color: #135c22; }

/* UKK */
details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 10px 0 0; color: var(--muted); }

.big-check { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink);
  display: grid; place-items: center; font-size: 2rem; font-weight: 800; }

.footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer p { margin: 4px 0; }

/* Ylläpito */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .9rem; }
.chip.active { background: var(--ink); color: #fff; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--bg-alt); font-size: .85rem; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: #fffbe6; }
.thumb { width: 44px; height: 60px; object-fit: cover; border-radius: 4px; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.s0 { background: #fff1b8; } .s1 { background: #dbe6ff; } .s2 { background: #ffe0c7; } .s3 { background: #d4f5da; } .s4 { background: #eee; color: #777; }
.detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.dl dt { font-weight: 600; color: var(--muted); }
.dl dd { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }

@media (max-width: 860px) {
  .hero-inner, .detail { grid-template-columns: 1fr; }
  .hero-cards { height: 280px; max-width: 360px; }
  .card-mock { width: 140px; height: 196px; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .steps, .form .row { grid-template-columns: 1fr; }
  nav a:not(.btn) { display: none; }
  .table { display: block; overflow-x: auto; }
}
