@charset "utf-8";

/* Samcons – tyylit. Pohjana alkuperäisen sc-2016-teeman värit, kirjasimet ja mitat. */

:root {
  --blue: #30a1e8;        /* brändisininen */
  --blue-deep: #1e7fc0;   /* sininen tausta, jolla valkoinen teksti on luettava */
  --dark: #2d3438;
  --slate: #526067;
  --gray: #dfdfdf;
  --mid: #676769;
  --footer: #1f1f20;
  --text: #353535;
  --text-soft: #5f5f5f;
  --font-head: "Lato", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.wrapper { width: 94%; max-width: 1280px; margin: 0 auto; padding: 0 1%; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap;
}

/* ---------- Yläpalkki ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  box-shadow: 0 1px 5px 3px rgba(0, 0, 0, .18);
}
.site-header .bar { display: flex; align-items: stretch; min-height: 64px; }

.brand {
  display: flex; align-items: center; justify-content: center;
  min-width: 150px; width: 10%; padding: 10px 20px;
  background: linear-gradient(to right, var(--dark) 0%, var(--slate) 100%);
}
.brand img { width: 44px; }

.menu { display: flex; margin: 0 0 0 10px; }
.menu li { padding: 18px 12px; }
.menu a {
  font-family: var(--font-head); font-size: 18px; font-weight: 300;
  letter-spacing: .07em; color: var(--blue);
  border-bottom: 3px solid #fff; padding-bottom: 2px;
  transition: all 350ms ease-in-out;
}
.menu a:hover, .menu a:focus-visible { color: #5d5d5d; border-bottom-color: #5d5d5d; }

.menu-toggle {
  display: none; margin-left: auto; align-self: center;
  background: none; border: 0; padding: 12px 16px; cursor: pointer;
  font-family: var(--font-head); font-size: 18px; font-weight: 300;
  letter-spacing: .07em; color: var(--blue);
}

/* ---------- Painikkeet ---------- */

.link-btn, .btn-submit {
  display: inline-block; font-family: var(--font-head);
  font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em;
  padding: 20px 76px 20px 24px; margin: 30px 0;
  border-radius: 3px; cursor: pointer;
  box-shadow: 0 2px 2px 2px rgba(0, 0, 0, .2);
  background-repeat: no-repeat;
  background-size: 20px auto;
  background-position: calc(100% - 24px) 50%, 0 0;
  transition: all 350ms ease-in-out;
}
.link-btn:hover, .btn-submit:hover { box-shadow: 0 2px 2px 2px rgba(0, 0, 0, 0); background-position: calc(100% - 16px) 50%, 0 0; }

.gradient-d, .btn-submit {
  color: #fff; border: 2px solid #4b4b4b;
  background-color: #3c4347;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 2l9 8-9 8' fill='none' stroke='%23fff' stroke-width='3'/%3E%3C/svg%3E"),
    linear-gradient(#4d5559, #2d3438);
  background-size: 20px auto, auto;
}
.btn-submit {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M1 4h18v12H1z M1 4l9 7 9-7' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E"),
    linear-gradient(#4d5559, #2d3438);
}

/* ---------- Etusivun yläosa ---------- */

.hero {
  /* Säädä taustakuvan ulkoasua näillä arvoilla */
  --hero-img-opacity: .45;                 /* kuvan näkyvyys: 0 = ei lainkaan, 1 = täysi */
  --hero-img-gray: 1;                      /* 1 = mustavalkoinen pohja, 0 = alkuperäiset värit */
  --hero-tint: rgba(48, 161, 232, .38);    /* sininen sävy (brändisininen) */

  position: relative; isolation: isolate; overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, #ffffff 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #e6eef4 0%, #f4f8fb 55%, #ffffff 100%);
  min-height: 600px;
  padding: 8% 0 6%;
}

/* Taustakuva: lisää tiedosto images/hero-bg.jpg (tai .jpeg / .webp / .png).
   Jos tiedostoa ei ole, yläosa näyttää pelkältä rauhalliselta liukuvärilliseltä taustalta. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    url("../images/hero-bg.jpg"),
    url("../images/hero-bg.jpeg"),
    url("../images/hero-bg.webp"),
    url("../images/hero-bg.png");
  background-size: cover; background-position: center top; background-repeat: no-repeat;
  filter: grayscale(var(--hero-img-gray)) contrast(.92) brightness(1.08);
  opacity: var(--hero-img-opacity);
  /* Häivytys: kuva on selkeimmillään ylhäällä ja sulautuu valkoiseen alareunassa */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.7) 45%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.7) 45%, transparent 100%);
}

/* Sininen sävy: kerrotaan kuvan ja taustan päälle, jolloin harmaa kuva muuttuu sinertäväksi */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--hero-tint);
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 60%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.55) 60%, transparent 100%);
}

.hero img { width: min(18%, 220px); min-width: 120px; padding-bottom: 40px; }
.hero h1 {
  font-size: 28px; font-weight: 900; text-transform: uppercase;
  line-height: 1.6; letter-spacing: .05em; color: var(--dark);
  text-shadow: 0 0 10px rgba(255,255,255,.75);
}
.hero .link-btn { margin-top: 40px; }

/* ---------- Sisältöosiot ---------- */

.block { padding: 80px 0; }
.block .wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 4%; align-items: center; }
.block h2 { font-size: 44px; font-weight: 400; padding-bottom: 16px; }
.block p { padding-top: 16px; font-size: 16px; line-height: 1.7; max-width: 62ch; }

.block.blue { background: var(--blue-deep); color: #fff; }
.block.white { background: #fff; color: var(--text); }
.block.white p { color: var(--text-soft); }
.block.gray { background: var(--gray); color: var(--text); }

.icon { display: block; margin: 0 auto; width: 80%; max-width: 560px; height: auto; }

.service-list { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 20px; }
.service-list li {
  flex: 1 1 200px; padding: 26px 12px; text-align: center;
  border-top: 4px solid #fff; border-bottom: 4px solid #fff;
  font-family: var(--font-head); font-size: 18px; font-weight: 900;
}
.block.white .service-list li { border-color: var(--blue); color: var(--dark); }

/* Yritysten omistus */
.centered-block { background: var(--blue-deep); color: #fff; text-align: center; padding: 80px 0; }
.centered-block h2 { font-size: 44px; font-weight: 400; padding-bottom: 16px; }
.centered-block p { font-size: 20px; line-height: 1.6; margin: 0 auto; max-width: 62ch; padding-top: 16px; }

/* Yhteystiedot */
.custom-info { background: var(--mid); color: #fff; padding: 72px 0 90px; }
.custom-info h2 { text-align: center; font-size: 44px; font-weight: 400; padding-bottom: 20px; }
.person { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 6%; align-items: center; max-width: 900px; margin: 0 auto; }
.person .photo {
  width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  background: #8a8a8c; margin: 40px 0;
  color: transparent; font-size: 0; /* piilottaa alt-tekstin, jos kuva puuttuu */
}
.person .role { display: block; font-family: var(--font-head); font-size: 24px; font-weight: 300; opacity: .75; padding: 6px 0; }
.person h3 { font-size: 30px; font-weight: 300; padding-bottom: 24px; }
.person p { font-size: 18px; line-height: 1.7; }
.person a:hover { text-decoration: underline; }
.social { margin-top: 20px; display: flex; gap: 10px; }
.social a {
  width: 32px; height: 32px; border-radius: 3px; background: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 900; font-size: 14px; color: #fff;
  transition: background 350ms ease-in-out;
}
.social a:hover { background: #fff; color: var(--mid); }

/* Lomake */
.custom-form { background: #e1e1e1; padding: 72px 0; }
.contact { width: 40%; min-width: 320px; margin: 0 auto; }
.contact h2 { font-size: 34px; font-weight: 300; color: var(--mid); }
.field { margin: 0; }
.field input, .field textarea {
  display: block; width: 100%; margin: 10px 0; padding: 20px; border: 0;
  font-family: var(--font-head); font-size: 16px; font-weight: 300; color: var(--mid);
  box-shadow: inset 0 3px 2px 0 #616161; background: #fff; border-radius: 0;
  transition: all 350ms ease-in-out;
}
.field input:hover, .field input:focus, .field textarea:hover, .field textarea:focus {
  box-shadow: inset 0 0 1px 0 #cfcfcf; color: var(--blue-deep);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:user-invalid, .field textarea:user-invalid { background: #f0dddd; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 14px; color: var(--mid); padding-top: 4px; }
.form-msg { display: none; font-family: var(--font-head); font-size: 18px; font-weight: 500; text-align: center; padding: 60px 0; color: var(--mid); }
.form-msg.show { display: block; }
.form-msg.error { color: #a33; }

/* Asiakaslogot */
.custom-logos { text-align: center; padding: 40px 0; }
.custom-logos .wrapper { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 28px; }
.custom-logos img { height: 44px; width: auto; max-width: 160px; object-fit: contain; }

/* Alatunniste */
.site-footer { background: var(--footer); text-align: center; padding: 72px 0 40px; }
.site-footer img { width: 10%; min-width: 90px; margin-bottom: 20px; }
.site-footer p, .site-footer a { font-size: 16px; color: #8a8a8a; }
.site-footer a:hover { color: #fff; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px;
  border-radius: 2px; background: var(--dark); border: 0; cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity .3s;
}
.to-top.visible { opacity: 1; visibility: visible; }
.to-top:hover { opacity: .6; }
.to-top::before {
  content: ""; position: absolute; left: 50%; top: 55%;
  width: 14px; height: 14px; border-left: 3px solid #fff; border-top: 3px solid #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- Mukautuminen ---------- */

@media (max-width: 1024px) {
  .brand { width: auto; min-width: 0; padding: 8px 16px; }
  .site-header .bar { flex-wrap: wrap; }
  .menu-toggle { display: block; }
  .site-header nav { order: 3; width: 100%; }
  .menu {
    display: none; flex-direction: column; width: 100%; margin: 0;
    border-top: 1px solid #e3e3e3; padding: 8px 0;
  }
  .menu.open { display: flex; }
  .menu li { padding: 10px 16px; }
  .hero img { width: 40%; }
  .hero h1 { font-size: 22px; }
  .person p { font-size: 17px; }
}

@media (max-width: 769px) {
  .block, .centered-block { padding: 56px 0; }
  .block .wrapper { grid-template-columns: 1fr; gap: 32px; }
  .block.reverse .icon { order: 2; }
  .block h2, .centered-block h2, .custom-info h2 { font-size: 32px; }
  .hero { min-height: 0; padding: 18% 0 14%; }
  .hero h1 { font-size: 20px; padding: 0 4%; }
  .centered-block p { font-size: 18px; }
  .person { grid-template-columns: 1fr; text-align: center; }
  .person .photo { max-width: 240px; margin: 20px auto; }
  .social { justify-content: center; }
  .contact { width: 100%; min-width: 0; }
  .contact h2 { font-size: 28px; }
}

@media (max-width: 481px) {
  .hero h1 { font-size: 18px; }
  .link-btn { font-size: 16px; padding: 14px 64px 14px 18px; }
  .custom-logos img { height: 34px; }
  .site-footer img { width: 20%; }
  .site-footer p, .site-footer a { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .to-top, .custom-form { display: none; }
  * { background: transparent !important; color: #000 !important; box-shadow: none !important; }
}
