/* =========================================================
   Solven Oy – Prototyypin tyylitiedosto
   Värimaailma: syvänsininen + harmaa + lämpimänvihreä aksentti
   Muokkaus: vaihda CSS-muuttujat :root-lohkossa.
   ========================================================= */

:root {
  /* Brändivärit */
  --color-primary:        #0E2A47;  /* syvänsininen */
  --color-primary-hover:  #143763;
  --color-secondary:      #3D5A80;  /* terässininen */
  --color-accent:         #5FA058;  /* lämmin vihreä */
  --color-accent-hover:   #4d8847;

  /* Neutraalit */
  --color-bg:             #F6F8FB;
  --color-surface:        #FFFFFF;
  --color-surface-alt:    #EDF1F6;
  --color-border:         #E4E9EF;
  --color-text:           #1B2433;
  --color-text-muted:     #5B6878;

  /* Typografia ja tyyli */
  --font-family:          "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --radius:               8px;
  --radius-lg:            14px;
  --shadow-sm:            0 1px 3px rgba(14,42,71,.06);
  --shadow-md:            0 6px 20px rgba(14,42,71,.08);
  --shadow-lg:            0 18px 48px rgba(7,24,43,.16);
  --max-width:            1140px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-secondary); text-decoration: none; }
a:hover { color: var(--color-primary); text-decoration: underline; }
.skip-link {
  position: absolute;
  left: 24px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 700;
  box-shadow: var(--shadow-md);
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip-link:focus {
  transform: translateY(0);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(95,160,88,.45);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .6em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

/* Layout */
.container {
  width: 100%;
  max-width: min(var(--max-width), 100vw);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 72px 0; }
.section--alt { background: var(--color-surface-alt); }

/* ========== Header ========== */
.site-header {
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(150%) blur(10px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.site-logo img { height: 48.4px; width: auto; }

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: .96rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.nav a:hover { color: var(--color-primary); }
.nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
  display: block;
  position: absolute;
  transition: transform .2s, opacity .2s;
}
.nav-toggle::before { transform: translateY(-7px); }
.nav-toggle::after { transform: translateY(7px); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 12px 24px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--color-border); }
  .nav a.active { border-bottom-color: var(--color-accent); }
}

/* ========== Hero ========== */
.hero {
  background:
    radial-gradient(circle at 84% 18%, rgba(95,160,88,.22), transparent 30%),
    linear-gradient(135deg, #0A1F36 0%, #0E2A47 54%, #1d4171 100%);
  color: #fff;
  padding: 100px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 84%, transparent);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 780px; }
.hero p.lead {
  font-size: 1.15rem;
  max-width: 720px;
  color: #D3DCE6;
}
.hero .cta-row { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.page-hero { padding: 70px 0; }
.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 760px;
  margin-top: 42px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-highlight {
  background: rgba(10,31,54,.54);
  padding: 18px 20px;
}
.hero-highlight strong {
  display: block;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.2;
}
.hero-highlight span {
  display: block;
  color: #C6D2DF;
  font-size: .9rem;
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: .98rem;
  transition: all .2s;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.btn-dark {
  background: var(--color-primary);
  color: #fff;
}
.btn-dark:hover { background: var(--color-primary-hover); color: #fff; text-decoration: none; }

/* ========== Section headings ========== */
.section-head {
  max-width: 760px;
  margin-bottom: 40px;
}
.section-head .eyebrow {
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: 8px;
}

/* ========== Service grid (etusivu) ========== */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.card:hover,
.service-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.service-card {
  display: block;
  color: inherit;
  min-height: 100%;
}
.service-card:hover {
  color: inherit;
  text-decoration: none;
}
.service-card h3::after {
  content: "›";
  margin-left: auto;
  color: var(--color-accent);
  font-size: 1.35rem;
  line-height: 1;
}
.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.service-card h3 { font-size: 1.12rem; }
.card .icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(95,160,88,.28);
  border-radius: 10px;
  background: #F0F7F1;
  color: var(--color-accent-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 21px;
  line-height: 1;
}
.card p { color: var(--color-text-muted); margin: 0; }

/* ========== Palvelut-list (palvelut.html) ========== */
.services-list {
  display: grid;
  gap: 20px;
}
.service-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}
.service-item h3 { margin-bottom: 6px; }
.service-item p  { color: var(--color-text-muted); margin: 0; }
.service-item p + p { margin-top: 10px; }
.service-item .update-pricing {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(95,160,88,.1);
  color: var(--color-text);
}
.service-item .update-pricing strong { color: var(--color-primary); }

/* ========== Hinnasto ========== */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.price-table th, .price-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.price-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.price-table th:nth-child(2),
.price-table td:nth-child(2) {
  white-space: nowrap;
}
.price-table tr:last-child td { border-bottom: 0; }
.price-table tr:nth-child(even) td { background: #FAFBFD; }

.pricing-cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 32px;
}
.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.pricing-card.highlight {
  border-top-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.pricing-card h3 { margin-bottom: 8px; }
.pricing-card .price {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 12px 0 2px;
}
.pricing-card .unit {
  color: var(--color-text-muted);
  font-size: .9rem;
  margin-bottom: 16px;
}

/* Ehdot-lista */
.terms-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 30px;
  list-style: none;
  margin: 0;
  padding-left: 30px;
}
.terms-list li {
  position: relative;
  padding: 8px 0 8px 26px;
  border-bottom: 1px dashed var(--color-border);
  color: var(--color-text);
}
.terms-list li:last-child { border-bottom: 0; }
.terms-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--color-accent);
  font-weight: 700;
}

/* ========== Yrityksestä / Juuso ========== */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) { .about-split { grid-template-columns: 1fr; } }

.bio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.bio-card .avatar {
  width: 130px;
  height: 130px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
}
.bio-card h3 { margin-bottom: 4px; }
.bio-card .role { color: var(--color-text-muted); margin-bottom: 12px; }
.bio-card .contact-link { display: block; margin-top: 6px; font-size: .95rem; }

.competence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tag {
  background: var(--color-surface-alt);
  color: var(--color-primary);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
}

/* Ajanjana / kokemus */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 3px solid var(--color-accent);
  padding-left: 22px;
}
.timeline li {
  margin-bottom: 22px;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--color-accent);
}
.timeline .period {
  display: block;
  font-size: .85rem;
  color: var(--color-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.timeline strong { color: var(--color-primary); }

/* Referenssit-taulukko */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: .93rem;
}
.ref-table th, .ref-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.ref-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.ref-table th:nth-child(4),
.ref-table td:nth-child(4) {
  white-space: nowrap;
}
.ref-table tr:nth-child(even) td { background: #FAFBFD; }

/* ========== Yhteystiedot ========== */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) { .contact-split { grid-template-columns: 1fr; } }

.contact-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.contact-info .row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-info .row:last-child { border-bottom: 0; }
.contact-info .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(95,160,88,.28);
  background: #F0F7F1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 18px;
  line-height: 1;
}
.contact-info .label {
  font-size: .82rem;
  color: var(--color-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.contact-info .value {
  font-weight: 600;
  color: var(--color-primary);
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.form-group { margin-bottom: 16px; }
.form-honeypot {
  display: none;
}
.form-group label {
  display: block;
  font-size: .88rem;
  color: var(--color-text);
  font-weight: 600;
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--color-text);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 0;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(95,160,88,.15);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 2px 0 18px;
}
.form-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.form-check label {
  color: var(--color-text);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
}
.form-note {
  font-size: .85rem;
  margin-top: 12px;
}
.form-status {
  min-height: 1.4em;
  margin-top: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

/* ========== CTA-banneri ========== */
.cta-banner {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin: 0; }
.cta-banner p { color: #D3DCE6; margin: 8px 0 0; }

/* ========== Footer ========== */
.site-footer {
  background: #0A1F36;
  color: #B9C4D2;
  padding: 48px 0 24px;
}
.site-footer a { color: #B9C4D2; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(160px, .8fr) minmax(220px, 1fr);
  gap: 32px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  color: #fff;
  font-size: .95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid #1c3352;
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Utility */
.text-muted { color: var(--color-text-muted); }
.link-plain {
  color: inherit;
  text-decoration: none;
}
.link-plain:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.mt-0 { margin-top: 0; }
.mt-18 { margin-top: 18px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; }
.overflow-x-auto { overflow-x: auto; }
.small-text { font-size: .85rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.center { text-align: center; }

@media (max-width: 640px) {
  .container {
    max-width: 100vw;
    padding: 0 18px;
  }
  .section { padding: 52px 0; }
  .hero { padding: 56px 0 64px; }
  .page-hero { padding: 56px 0; }
  h1 { font-size: clamp(1.8rem, 7.4vw, 2.15rem); }
  h2 { font-size: clamp(1.35rem, 5.8vw, 1.7rem); }
  .hero h1,
  .hero p.lead,
  .section-head,
  .grid,
  .services-list,
  .pricing-cards,
  .terms-list,
  .cta-banner {
    max-width: calc(100vw - 36px);
  }
  .hero p.lead { font-size: 1.03rem; }
  .grid,
  .pricing-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .card,
  .service-item,
  .pricing-card {
    max-width: calc(100vw - 36px);
  }
  .service-card h3 { font-size: 1.08rem; }
  .hero-highlights {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }
  .price-table {
    display: block;
    max-width: calc(100vw - 36px);
    overflow: hidden;
  }
  .price-table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
  .price-table tbody,
  .price-table tr,
  .price-table td {
    display: block;
  }
  .price-table tr {
    padding: 14px 14px;
    border-bottom: 1px solid var(--color-border);
  }
  .price-table tr:nth-child(even) {
    background: #FAFBFD;
  }
  .price-table tr:last-child { border-bottom: 0; }
  .price-table th,
  .price-table td {
    padding: 3px 0;
    border-bottom: 0;
    white-space: normal;
  }
  .price-table tr:nth-child(even) td { background: transparent; }
  .price-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--color-text-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .price-table td:first-child {
    font-weight: 700;
  }
  .price-table td:nth-child(2) {
    color: var(--color-primary);
    font-weight: 700;
  }
  .price-table td:nth-child(3) {
    color: var(--color-text-muted);
    font-size: .9rem;
  }
  .cta-banner { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
