/* Kirkniemen Teollisuuspalvelu Oy – tyylit */
:root {
  --tumma: #1c2430;
  --tumma2: #2a3442;
  --teras: #5b6675;
  --vaalea: #f3f4f6;
  --korostus: #f08a1c;
  --korostus-tumma: #c96d0c;
  --teksti: #222a33;
  --leveys: 1140px;
}

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

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--teksti);
  line-height: 1.6;
  background: #fff;
}

a { color: var(--korostus-tumma); }
img { max-width: 100%; display: block; }

.sisalto { max-width: var(--leveys); margin: 0 auto; padding: 0 24px; }

/* Ylätunniste */
header {
  background: var(--tumma);
  border-bottom: 4px solid var(--korostus);
  position: sticky; top: 0; z-index: 10;
}
header .sisalto {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 78px; flex-wrap: wrap; gap: 12px;
}
.logo { text-decoration: none; color: #fff; display: flex; align-items: center; gap: 12px; }
.logo img { height: 52px; width: auto; }
.logo-merkki {
  width: 46px; height: 46px; background: var(--korostus); color: var(--tumma);
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
  clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
}
.logo-teksti { line-height: 1.15; }
.logo-teksti strong { display: block; font-size: 18px; letter-spacing: .5px; }
.logo-teksti span { font-size: 12px; color: #b8c0cb; text-transform: uppercase; letter-spacing: 1.5px; }

nav ul { list-style: none; display: flex; gap: 6px; }
nav a {
  color: #fff; text-decoration: none; text-transform: uppercase;
  font-size: 14px; font-weight: 600; letter-spacing: 1px;
  padding: 10px 16px; display: block; border-bottom: 3px solid transparent;
}
nav a:hover, nav a.aktiivinen { border-bottom-color: var(--korostus); color: var(--korostus); }

/* Hero */
.hero {
  position: relative; height: 72vh; min-height: 420px; max-height: 680px;
  overflow: hidden; background: var(--tumma2);
}
.hero .kuva {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; animation: vaihto 18s infinite;
}
.hero .kuva:nth-child(1) { animation-delay: 0s; }
.hero .kuva:nth-child(2) { animation-delay: 6s; }
.hero .kuva:nth-child(3) { animation-delay: 12s; }
@keyframes vaihto {
  0% { opacity: 0; transform: scale(1.04); }
  6% { opacity: 1; }
  33% { opacity: 1; }
  40% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; }
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(28,36,48,.85) 0%, rgba(28,36,48,.35) 60%, rgba(28,36,48,.1) 100%);
}
.hero-teksti {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: center; color: #fff;
}
.hero-teksti h1 {
  font-size: clamp(32px, 5vw, 58px); line-height: 1.1; text-transform: uppercase;
  font-weight: 800; max-width: 680px;
}
.hero-teksti h1 span { color: var(--korostus); }
.hero-teksti p { font-size: 19px; margin: 18px 0 30px; max-width: 560px; color: #dfe4ea; }

.nappi {
  display: inline-block; background: var(--korostus); color: var(--tumma);
  text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 14px 28px; font-size: 15px; transition: background .2s;
  align-self: flex-start;
}
.nappi:hover { background: #fff; }

/* Osiot */
section { padding: 80px 0; }
.otsikko-pieni {
  color: var(--korostus-tumma); text-transform: uppercase; font-weight: 700;
  letter-spacing: 2px; font-size: 14px; margin-bottom: 8px;
}
h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; color: var(--tumma); margin-bottom: 20px; }

.meista .sisalto { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.meista p { margin-bottom: 14px; font-size: 17px; color: #444d58; }
.meista .kuvalaatikko {
  aspect-ratio: 4 / 3; background: var(--tumma2) center / cover no-repeat;
  box-shadow: 18px 18px 0 var(--korostus);
}

.palvelut { background: var(--vaalea); }
.palvelut .johdanto { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.palvelut .johdanto p { color: #555e69; }
.ruudukko { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.kortti {
  background: #fff; padding: 34px 26px; border-top: 4px solid var(--korostus);
  box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: transform .2s;
}
.kortti:hover { transform: translateY(-4px); }
.kortti svg { width: 52px; height: 52px; stroke: var(--korostus-tumma); margin-bottom: 18px; }
.kortti h3 { font-size: 19px; color: var(--tumma); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }
.kortti p { color: #555e69; font-size: 15px; }

.yhteysnauha { background: var(--korostus); padding: 44px 0; }
.yhteysnauha .sisalto { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.yhteysnauha h2 { margin: 0; color: var(--tumma); }
.yhteysnauha .nappi { background: var(--tumma); color: #fff; }
.yhteysnauha .nappi:hover { background: #fff; color: var(--tumma); }

/* Sivun otsikkopalkki (yhteystiedot) */
.sivuotsikko {
  background: var(--tumma2) center / cover no-repeat; position: relative;
  padding: 90px 0; color: #fff;
}
.sivuotsikko::after { content: ""; position: absolute; inset: 0; background: rgba(28,36,48,.78); }
.sivuotsikko .sisalto { position: relative; z-index: 2; }
.sivuotsikko h1 { font-size: clamp(30px, 4vw, 48px); text-transform: uppercase; }
.sivuotsikko p { color: #cfd5dc; }

.yhteys .sisalto { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.tieto { display: flex; gap: 16px; margin-bottom: 26px; }
.tieto svg { flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; background: var(--tumma); stroke: var(--korostus); }
.tieto h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--teras); }
.tieto p, .tieto a { font-size: 18px; color: var(--tumma); text-decoration: none; }
.tieto a:hover { color: var(--korostus-tumma); }
.kartta iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }

/* Alatunniste */
footer { background: var(--tumma); color: #b8c0cb; padding: 56px 0 0; font-size: 15px; }
footer .sisalto { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
footer h4 { color: #fff; text-transform: uppercase; letter-spacing: 1px; font-size: 15px; margin-bottom: 14px; }
footer a { color: #b8c0cb; text-decoration: none; }
footer a:hover { color: var(--korostus); }
footer .puhelin { font-size: 22px; color: var(--korostus); font-weight: 700; }
.alarivi { border-top: 1px solid #333e4c; margin-top: 44px; padding: 18px 0; font-size: 13px; text-align: center; }

/* Mobiili */
@media (max-width: 900px) {
  .ruudukko { grid-template-columns: repeat(2, 1fr); }
  .meista .sisalto, .yhteys .sisalto, footer .sisalto { grid-template-columns: 1fr; }
  .meista .kuvalaatikko { box-shadow: 10px 10px 0 var(--korostus); }
}
@media (max-width: 560px) {
  .ruudukko { grid-template-columns: 1fr; }
  header .sisalto { justify-content: center; padding: 10px 16px; }
  nav a { padding: 8px 10px; font-size: 13px; }
  section { padding: 56px 0; }
}
