/*
Theme Name: Isyysinfo
Theme URI: https://isyysinfo.fi/
Author: TJ-Design
Description: Kevyt, yhden sivun Gutenberg-teema Isyysinfo.fi-sivustolle.
Version: 1.2.2
Text Domain: isyysinfo
*/

:root {
  --isyysinfo-blue: #0869e8;
  --isyysinfo-blue-dark: #074d9f;
  --isyysinfo-sky: #eaf5ff;
  --isyysinfo-ink: #203040;
  --isyysinfo-muted: #5c6b79;
  --isyysinfo-line: #d9e5ef;
  --isyysinfo-white: #ffffff;
  --isyysinfo-radius: 22px;
  --isyysinfo-shadow: 0 18px 50px rgba(12, 61, 111, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--isyysinfo-ink);
  background: #f6f9fc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--isyysinfo-blue-dark); }
a:hover, a:focus-visible { color: var(--isyysinfo-blue); }
img { max-width: 100%; height: auto; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip: auto;
  color: var(--isyysinfo-white);
  background: var(--isyysinfo-blue-dark);
  border-radius: 8px;
}

.site-hero {
  position: relative;
  min-height: clamp(360px, 49vw, 650px);
  overflow: hidden;
  background: #c7d7e4;
}

.site-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.14), transparent 52%, rgba(13,43,70,.12));
}

.site-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: clamp(28px, 5vw, 72px);
}

.site-hero__logo {
  display: block;
  width: clamp(250px, 34vw, 470px);
  filter: drop-shadow(0 3px 12px rgba(255,255,255,.65));
}

.site-main {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 40px));
  margin: clamp(-64px, -5vw, -36px) auto 64px;
}

.entry-content {
  padding: clamp(30px, 5vw, 70px);
  background: var(--isyysinfo-white);
  border: 1px solid rgba(217,229,239,.9);
  border-radius: var(--isyysinfo-radius);
  box-shadow: var(--isyysinfo-shadow);
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

h1, h2, h3 {
  color: var(--isyysinfo-blue-dark);
  line-height: 1.16;
  letter-spacing: -.025em;
}

h1 {
  max-width: 790px;
  margin-bottom: 28px;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
}

p { margin: 0 0 1.15em; }

.isyysinfo-intro {
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  color: #31475a;
}

.isyysinfo-form-panel {
  margin: 42px 0;
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(145deg, #f0f8ff, #e4f2ff);
  border: 1px solid #c9e3f8;
  border-radius: 18px;
}

.isyysinfo-form-panel p:last-child { margin-bottom: 0; }

.wpcf7 form { margin: 0; }
.wpcf7-form p { margin: 0 0 22px; }

.wpcf7-form label {
  display: block;
  color: #173a5d;
  font-weight: 700;
  line-height: 1.35;
}

.wpcf7-form-control-wrap { display: block; margin-top: 9px; }

.wpcf7 input[type="email"],
.wpcf7 select {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  color: var(--isyysinfo-ink);
  background: var(--isyysinfo-white);
  border: 1px solid #9db8ce;
  border-radius: 10px;
  font: inherit;
}

.wpcf7 input:focus,
.wpcf7 select:focus {
  outline: 3px solid rgba(8,105,232,.18);
  border-color: var(--isyysinfo-blue);
}

.isyysinfo-date-field {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.isyysinfo-date-field legend {
  padding: 0;
  color: #173a5d;
  font-weight: 700;
  line-height: 1.35;
}

.isyysinfo-date-selects {
  display: grid;
  grid-template-columns: .8fr 1.4fr 1fr;
  gap: 12px;
  margin-top: 9px;
}

.isyysinfo-date-selects > p { display: contents; }
.isyysinfo-date-selects > p > br { display: none; }

.isyysinfo-date-part__label {
  display: block;
  margin-bottom: 6px;
  font-size: .86rem;
}

.isyysinfo-date-selects .wpcf7-form-control-wrap {
  margin-top: 0;
}

.wpcf7 input[type="submit"] {
  min-height: 54px;
  padding: 12px 28px;
  color: var(--isyysinfo-white);
  background: var(--isyysinfo-blue);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 9px 24px rgba(8,105,232,.24);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="submit"]:focus-visible { background: var(--isyysinfo-blue-dark); }

.wpcf7-not-valid-tip { margin-top: 6px; font-size: .92rem; }
.wpcf7 form .wpcf7-response-output { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; }

.isyysinfo-partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  margin: 28px 0;
}

.isyysinfo-partners img {
  width: auto;
  max-width: min(250px, 44vw);
  max-height: 82px;
  object-fit: contain;
}

.isyysinfo-contact {
  padding-top: 26px;
  color: var(--isyysinfo-muted);
  border-top: 1px solid var(--isyysinfo-line);
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .site-hero { min-height: 360px; }
  .site-hero__image { object-position: 55% center; }
  .site-hero__inner { width: calc(100% - 32px); padding-top: 24px; }
  .site-hero__logo { width: min(310px, 77vw); }
  .site-main { width: calc(100% - 24px); margin-top: -34px; margin-bottom: 32px; }
  .entry-content { padding: 28px 20px; border-radius: 16px; }
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .isyysinfo-form-panel { margin: 30px -6px; padding: 22px 16px; }
  .isyysinfo-date-selects {
    grid-template-columns: minmax(0, .75fr) minmax(0, 1.45fr) minmax(0, .9fr);
    gap: 6px;
  }
  .isyysinfo-date-selects select {
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    font-size: .8rem;
  }
  .isyysinfo-date-part__label { font-size: .78rem; }
  .wpcf7 input[type="submit"] { width: 100%; }
  .isyysinfo-partners { justify-content: center; }
}

@media (max-width: 340px) {
  body { font-size: 16px; }
  .site-main { width: calc(100% - 16px); }
  .entry-content { padding: 24px 16px; }
  .site-hero__inner { width: calc(100% - 24px); }
  .isyysinfo-date-selects { gap: 4px; }
  .isyysinfo-date-selects select {
    padding-right: 4px;
    padding-left: 4px;
    font-size: .76rem;
  }
  .isyysinfo-date-part__label { font-size: .74rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

