@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --blue: #006aa6;
  --blue-dark: #005483;
  --green: #7b9800;
  --green-dark: #688300;
  --white: #ffffff;
  --text: #1d2730;
  --page: #f6f8f9;
  --shadow: 0 14px 30px rgba(0, 65, 105, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.55;
}

main {
  flex: 1 0 auto;
}

.site-footer {
  margin-top: auto;
  flex-shrink: 0;
}

a { color: inherit; }

.container {
  width: min(1320px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  background: white;
  padding-top: 14px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  display: block;
  width: min(960px, 100%);
  max-height: 305px;
  object-fit: contain;
}

.brand-line {
  height: 6px;
  background: var(--blue);
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.service-card {
  position: relative;
  min-height: 520px;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
  transition: box-shadow .25s ease;
}

/* Hover: kortti pysyy paikallaan ja taustakuva kirkastuu */
.service-card:hover {
  transform: none;
  box-shadow: var(--shadow);
}

/* Uploaded customer images */
.storage {
  background-image:
    linear-gradient(rgba(0, 45, 70, .08), rgba(0, 34, 55, .44)),
    url('assets/pienvarastot.jpeg');
  background-position: center 44%;
}

.moving {
  background-image:
    linear-gradient(rgba(0, 45, 70, .08), rgba(0, 32, 55, .46)),
    url('assets/muuttopalvelut.jpeg');
  background-position: center center;
}

/* Temporary prototype background until a customer image is selected */
.estate {
  background-image:
    linear-gradient(rgba(30, 32, 32, .08), rgba(25, 25, 25, .50)),
    url('assets/kuolinpesat.jpeg');
  background-position: center center;
}

.service-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .04) 8%, rgba(0, 0, 0, .25) 48%, rgba(0, 0, 0, .72) 100%);
  opacity: 1;
  transition: opacity .28s ease;
}

.service-card:hover .service-overlay {
  opacity: .32;
}

.service-content {
  height: 100%;
  min-height: 520px;
  padding: 34px 34px 30px;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.service-icon {
  width: 96px;
  height: 96px;
  margin: 0 0 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.service-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-content h2 {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto 0 18px;
  text-transform: none;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.08;
  letter-spacing: normal;
  text-shadow: 0 2px 8px rgba(0,0,0,.30);
}

.service-content p {
  max-width: 360px;
  min-height: 102px;
  margin: 0 0 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  text-shadow: 0 2px 7px rgba(0,0,0,.30);
}


.contact-strip {
  background: white;
  border-top: 1px solid #d9e6ed;
  padding: 24px 0 26px;
}

.contact-inner {
  text-align: center;
}

.contact-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.contact-items a {
  color: var(--blue-dark);
  text-decoration: none;
  font-size: clamp(19px, 2vw, 28px);
  font-weight: 800;
}

.contact-items a:hover {
  color: var(--green);
}

.contact-items .divider {
  width: 2px;
  height: 36px;
  background: #bcd4e2;
}

.site-footer {
  color: white;
  background: var(--blue-dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr .9fr;
  gap: 32px;
  padding: 30px 0;
  align-items: center;
}

.footer-brand img {
  width: 100%;
  max-width: 290px;
  display: block;
  background: white;
  padding: 8px;
  border-radius: 6px;
}

.footer-text,
.footer-social {
  font-size: 14px;
  line-height: 1.7;
}

.footer-services {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-services strong,
.footer-social strong {
  display: block;
  margin-bottom: 4px;
  color: #dfff53;
}

.footer-services a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.footer-services a:hover {
  text-decoration: underline;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,.25);
  text-align: center;
  padding: 15px 20px;
  font-size: 14px;
  background: var(--blue-dark);
}

@media (max-width: 980px) {
  .services {
    grid-template-columns: 1fr;
  }

  .service-card,
  .service-content {
    min-height: 440px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1320px);
  }

  .site-header {
    padding-top: 6px;
  }

  .brand-line {
    height: 5px;
  }

  .services {
    padding-top: 16px;
    gap: 14px;
  }

  .service-card,
  .service-content {
    min-height: 420px;
  }

  .service-content {
    padding: 28px 20px 20px;
  }

  .service-content p {
    min-height: 0;
    font-size: 15px;
  }

  .service-icon {
    width: 76px;
    height: 76px;
  }

  .service-icon img {
    width: 100%;
    height: 100%;
  }

  .contact-items {
    flex-direction: column;
    gap: 10px;
  }

  .contact-items .divider {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand img {
    margin-inline: auto;
  }
}
