:root {
  --green: #2e8b57;
  --green-dark: #1f5d3c;
  --green-light: #eef8f0;
  --blue: #3f7fbf;
  --blue-dark: #2a5380;
  --blue-light: #eef5fb;
  --text: #172022;
  --text-muted: #5f6b6f;
  --border: #e5ebee;
  --bg: #f7faf9;
  --white: #ffffff;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 14px 40px rgba(23, 32, 34, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.brand-logo {
  width: clamp(140px, 15vw, 190px);
  height: auto;
  display: block;
  object-fit: contain;
}
.hero-logo {
  width: min(360px, 80%);
  height: auto;
  display: block;
  object-fit: contain;
}
.founder-photo {
  position: relative;
  height: 340px;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf6ee, #dfeaf5);
}
.founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}
section { padding: 4.5rem 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 20px rgba(46, 139, 87, 0.18);
}
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--green); color: var(--green-dark); }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a.active, .nav-links a:hover { color: var(--green-dark); }
.nav-toggle { display: none; }

.hero { background: linear-gradient(180deg, #f8fcf9 0%, #ffffff 100%); border-bottom: 1px solid var(--border); padding: 5rem 0 4rem; }
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 580px;
}
.hero-btns { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.page-hero {
  background: linear-gradient(180deg, #f8fcf9 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0 3rem;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 3.3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
}
.page-hero p { color: var(--text-muted); font-size: 1.02rem; line-height: 1.75; max-width: 650px; }

.section-title { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.7rem; }
.section-copy { color: var(--text-muted); line-height: 1.75; max-width: 700px; }

.feature-list { display: grid; gap: 1rem; }
.feature-item { display: flex; gap: 1rem; align-items: flex-start; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--green-light); color: var(--green-dark);
  font-size: 1.1rem;
}
.feature-item h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.feature-item p { margin: 0; color: var(--text-muted); line-height: 1.7; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.tag-gray { background: #f1f4f6; color: #596166; }
.tag-green { background: var(--green-light); color: var(--green-dark); }
.tag-blue { background: var(--blue-light); color: var(--blue-dark); }

.tender-notice {
  margin: 1.5rem 0 1.15rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg);
  border: 1px solid var(--blue-light); background: var(--blue-light);
}
.tender-notice-heading { margin: 0 0 0.3rem; font-weight: 700; color: var(--blue-dark); }
.tender-notice p { margin: 0; color: var(--blue-dark); line-height: 1.65; font-size: 0.92rem; max-width: 72ch; }
.tender-notice .tender-notice-heading + p { margin: 0; }
.tender-tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.65rem; }
.tender-tag-row .tag { margin-bottom: 0; }
.tender-list { display: grid; gap: 1.15rem; margin-top: 1.5rem; }
.tender-item {
  padding: clamp(1.2rem, 3vw, 1.75rem); border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--white); box-shadow: 0 8px 24px rgba(23, 32, 34, 0.045);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.tender-item:hover { border-color: #b8dcc0; box-shadow: 0 12px 30px rgba(23, 32, 34, 0.075); }
.tender-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.tender-heading-copy { min-width: 0; }
.tender-heading-copy .tag { margin-bottom: 0.65rem; }
.tender-item h3 { margin: 0 0 0.5rem; font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.3; }
.tender-item > p { margin: 0.55rem 0 0; color: var(--text-muted); line-height: 1.7; max-width: 72ch; }
.tender-facts { list-style: none; padding: 0; margin: 1.15rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0.65rem; }
.tender-facts li { display: grid; align-content: start; gap: 0.2rem; padding: 0.75rem 0.85rem; border-radius: 12px; background: var(--bg); }
.tender-fact-label { color: var(--text-muted); font-size: 0.78rem; }
.tender-facts li strong { color: var(--text); font-size: 0.92rem; font-weight: 600; }
.tender-deadline { flex: 0 0 auto; padding: 0.55rem 0.8rem; border: 1px solid #b8dcc0; border-radius: 999px; background: var(--green-light); color: var(--green-dark); font-size: 0.82rem; font-weight: 700; }
.tender-requirement { margin: 1rem 0 0 !important; padding-top: 0.85rem; border-top: 1px solid var(--border); color: var(--text) !important; font-size: 0.9rem; font-weight: 600; }
.tender-empty { padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); text-align: center; }
.tender-empty p { margin: 0 0 1rem; color: var(--text-muted); }

.filter-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.25rem 0 0; }
.filter-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  border-radius: 999px; padding: 0.65rem 0.95rem; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.filter-btn.active { background: var(--green-light); color: var(--green-dark); border-color: var(--green); }

@media (max-width: 640px) {
  .tender-heading { display: grid; }
  .tender-deadline { justify-self: start; }
}

.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-check { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1rem; }
.form-check input[type="checkbox"] { width: auto; margin-top: 0.2rem; }
.form-check label { margin-bottom: 0; font-weight: 500; }
.form-note { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 1rem; }
label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }
input, textarea, select {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 0.9rem; font: inherit; color: var(--text);
  background: #fff;
}
textarea { min-height: 120px; resize: vertical; }

.form-status { font-size: 0.85rem; margin: 0.7rem 0 0; min-height: 1em; }
.form-status.success { color: var(--green-dark); font-weight: 600; }
.form-status.error { color: #A32D2D; }

.cta-banner {
  margin-top: 2.5rem; padding: 2rem 2.2rem; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--green-light), #f3fbf6);
  border: 1px solid #b8dcc0;
  display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap;
}
.cta-banner h2 { margin: 0 0 0.4rem; font-size: 1.35rem; }
.cta-banner p { margin: 0; color: var(--text-muted); }

.footer {
  padding: 2rem 0 2.5rem; background: #0f1717; color: rgba(255,255,255,0.8);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer a { color: rgba(255,255,255,0.8); }
.footer a:hover { color: white; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .hero .hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .navbar .container { padding: 0.55rem 0; }
  .brand-logo { width: 84px; }
  .nav-links {
    position: absolute; top: calc(100% + 0.5rem); left: 1rem; right: 1rem;
    display: none; flex-direction: column; align-items: flex-start;
    background: #fff; padding: 1rem; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: transparent; padding: 0.4rem; font-size: 1.35rem; color: var(--text); cursor: pointer; }
  .nav-toggle:hover, .nav-toggle:focus-visible { background: var(--green-light); }
  .cta-banner { padding: 1.4rem; }
}

@media (max-width: 640px) {
  section { padding: 3rem 0; }
  .page-hero { padding: 2.6rem 0 2rem; }
  .page-hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .page-hero p { font-size: 1rem; line-height: 1.65; }
  .section-title { line-height: 1.3; }
  .compare-table { display: block; width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; table-layout: fixed; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
  .compare-table thead, .compare-table tbody { display: table; width: 560px; min-width: 560px; table-layout: fixed; }
  .compare-table th, .compare-table td { min-width: 0; }
  .quote-block { padding: 1rem; }
  .step { gap: 0.85rem; }
  .cta-banner { align-items: flex-start; }
  .cta-banner .btn { width: 100%; }
  .footer .container { align-items: flex-start; flex-direction: column; }
  .ask-box { right: 12px; bottom: 12px; }
  .ask-box-btn span { display: inline; }
  .ask-box-btn { min-height: 46px; padding: 0.7rem 0.95rem; border-radius: 999px; font-size: 0.88rem; }
  .ask-box-btn svg { width: 18px; height: 18px; }
  .ask-box-panel { right: 12px; left: 12px; width: auto; bottom: 72px; max-height: calc(100dvh - 96px); overflow-y: auto; }
  .ask-box-panel textarea, .ask-box-panel input { font-size: 16px; }
  input, textarea, select { font-size: 16px; }
}

.ask-box { position: fixed; right: 20px; bottom: 20px; z-index: 200; }
.ask-box-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--green); color: #fff; border: none; border-radius: 999px;
  padding: 0.85rem 1.3rem; font: inherit; font-size: 0.95rem; font-weight: 600;
  box-shadow: 0 10px 24px rgba(46,139,87,0.3); cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.ask-box-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.ask-box-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.ask-box-panel {
  position: fixed; right: 20px; bottom: 90px; width: 340px; max-width: calc(100vw - 40px);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 1.4rem;
  display: none; z-index: 200;
}
.ask-box-panel.open { display: block; }
.ask-box-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.ask-box-panel h3 { font-size: 16px; font-weight: 700; margin: 0 0 0.3rem; }
.ask-box-sub { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.ask-box-close {
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 22px; line-height: 1; padding: 0; flex-shrink: 0;
}
.ask-box-close:hover { color: var(--text); }
.ask-box-panel textarea, .ask-box-panel input {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  padding: 0.7rem 0.8rem; font: inherit; font-size: 14px; color: var(--text);
  margin-top: 0.6rem; background: #fff;
}
.ask-box-panel textarea { min-height: 80px; resize: vertical; }
.ask-box-panel button[type="submit"] { margin-top: 0.9rem; width: 100%; }

@media (max-width: 480px) {
  .container { width: min(100% - 1.5rem, 1120px); }
  .tender-item { padding: 1rem; }
  .tender-facts { grid-template-columns: 1fr; }
}

/* Mobiili: estä kilpailutuskorttien vaakavieritys */
.tender-list { grid-template-columns: minmax(0, 1fr); }
.tender-item, .tender-item * { min-width: 0; overflow-wrap: anywhere; }