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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  line-height: 1.5;
  color: #222;
  background: #f4f3f1;
}

/* Yhteinen sisältöleveys */
.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  background: transparent;
}

/* Valkoinen sisältöalue */
main.wrap {
  background: #fff;
  border-radius: 12px;
}

main.legal {
  font-size: 0.9em;
}

main.legal h1 {
  font-size: 1.4em;
}

main.legal h2 {
  font-size: 1.2em;
}




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

.site-header {
  background: #f4f3f1;
  margin-bottom: 5px;
}

.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 6px 16px 8px;
}

/* Logo */
.brand {
  display: flex;
  align-items: flex-start;
  line-height: 0;
  order: 2;
}

.brand img {
  height: 120px;
  width: auto;
  display: block;
}

/* Navigaatio */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  order: 1;
}

.nav a {
  text-decoration: none;
  font-weight: 600;
  color: #333;
  background: #f2f2f2;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav a:hover {
  background: #ff6600;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.nav a.active {
  background: #ff6600;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}


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

main h1 {
  margin-top: 0;
}


/* =====================================================
   PALVELUT – KAKSIPALSTAINEN
   ===================================================== */

.two-col {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: start;
}

.card {
  border: 1px solid #ddd;
  padding: 16px;
  border-radius: 8px;
  background: #fafafa;
}

.card h2 {
  margin-top: 0;
}


/* =====================================================
   REFERENSSIT – LISTA
   ===================================================== */

.ref-year {
  margin: 24px 0 8px;
}

.ref-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ref-list li {
  margin-bottom: 12px;
}

.ref-list a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 600;
  color: #333;
  background: #f2f2f2;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ref-list a:hover {
  background: #f39a1b;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ref-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}


/* =====================================================
   REFERENSSI – YKSITTÄINEN SIVU
   ===================================================== */

.ref-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

.ref-images a {
  display: block;
  text-decoration: none;
}

.ref-images img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Takaisin-linkki */
.back-link {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
  font-weight: 600;
  color: #333;
  background: #f2f2f2;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.back-link:hover {
  background: #f39a1b;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}


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

.site-footer {
  margin-top: 5px;
  font-size: 0.9em;
  background: #f4f3f1;
}

.site-footer .wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a {
  text-decoration: none;
  font-weight: 600;
  color: #444;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.site-footer a:hover {
  background: #cfcfcf;
  color: #000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}


/* =====================================================
   MOBIILI
   ===================================================== */

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand img {
    height: 72px;
  }
}
