/* KoneJumissa.fi — perustyylit ja komponentit. Brändivärit :root-muuttujissa. */

:root {
  --brand: #123a6b;
  --brand-strong: #0c2a52;
  --brand-soft: #e8eff9;
  --accent: #d97706;
  --accent-strong: #b45309;
  --btn-bg: #b45309;
  --btn-bg-hover: #92400e;
  --btn-text: #ffffff;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --surface: #ffffff;
  --text: #101828;
  --text-muted: #4a5568;
  --border: #dbe3ef;
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 70rem;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 10px 28px rgb(16 24 40 / 0.07);
  --shadow-lg: 0 2px 4px rgb(16 24 40 / 0.06), 0 18px 44px rgb(16 24 40 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #7fb0f5;
    --brand-strong: #a8c9ff;
    --brand-soft: #14243d;
    --accent: #f0a742;
    --accent-strong: #f7bd6b;
    --btn-bg: #f0a742;
    --btn-bg-hover: #f7bd6b;
    --btn-text: #1a1206;
    --bg: #0b1220;
    --bg-soft: #101a2d;
    --surface: #131f36;
    --text: #eef2f9;
    --text-muted: #aab5c8;
    --border: #24324c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 28px rgb(0 0 0 / 0.35);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.45), 0 18px 44px rgb(0 0 0 / 0.45);
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 3.9vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.25rem); }

p { margin: 0 0 1em; }

a { color: var(--brand); text-underline-offset: 0.2em; }
a:hover { color: var(--brand-strong); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; color: #fff; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand img { width: 2.125rem; height: 2.125rem; }
.brand span span { color: var(--brand); }

.nav { margin-left: auto; }

.nav ul {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9688rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-cta {
  display: none;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button--secondary {
  background: transparent;
  border-color: var(--brand);
  color: var(--brand);
}

.button--secondary:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.button--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button--ghost:hover { background: var(--bg-soft); color: var(--text); }

.button--block { width: 100%; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(52rem 22rem at 12% -15%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    var(--bg);
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: 1.3fr 0.7fr; }
}

.hero .lead {
  max-width: 42ch;
  font-size: clamp(1.08rem, 1.7vw, 1.28rem);
  color: var(--text-muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.85rem);
  box-shadow: var(--shadow-lg);
}

.hero-card h2 { font-size: 1.15rem; margin-bottom: 0.75rem; }

.hero-card ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.hero-card li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9688rem;
  color: var(--text-muted);
}

.hero-card li svg {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.25rem;
  color: var(--brand);
}

.trust-list {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .trust-list { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

.trust-list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  font-weight: 600;
}

.trust-list svg {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  color: var(--brand);
}

/* Sections */

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head p { color: var(--text-muted); margin-bottom: 0; }

.grid-2 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 52rem) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 52rem) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.6vw, 1.75rem);
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--text-muted); }
.card p:last-child { margin-bottom: 0; }

.service-grid {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 40rem) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .service-grid { grid-template-columns: repeat(4, 1fr); }
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}

.service-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}

.service-card .icon svg { width: 1.4rem; height: 1.4rem; }

.service-card h3 { font-size: 1.0625rem; margin-bottom: 0.35rem; }

.service-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Big option cards */

.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.option-card--featured {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
}

.option-card .badge {
  align-self: flex-start;
  margin-bottom: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.option-card h3 { font-size: 1.3rem; }
.option-card p { color: var(--text-muted); }
.option-card .button-row { margin-top: auto; padding-top: 1.25rem; }

/* Steps */

.steps {
  display: grid;
  gap: 1.25rem;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.steps li {
  position: relative;
  padding: 1.5rem 1.4rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.steps h3 { font-size: 1.0625rem; }
.steps p { margin: 0; color: var(--text-muted); font-size: 0.9688rem; }

/* Price table */

.price-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.price-row dt { font-weight: 700; margin: 0; }
.price-row dd { margin: 0; color: var(--text-muted); font-size: 0.9375rem; text-align: right; }

.price-note {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* FAQ */

.faq { display: grid; gap: 0.65rem; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 1.1rem;
}

.faq summary {
  cursor: pointer;
  padding: 0.85rem 0;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

.faq details[open] summary::after { content: "–"; }

.faq details p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9688rem;
}

/* Contact */

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 56rem) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.contact-list .label {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-list .value { font-size: 1.0625rem; font-weight: 600; }
.contact-list .value a { text-decoration: none; }

/* Form */

.form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.field { display: grid; gap: 0.35rem; }

.field label { font-weight: 700; font-size: 0.9375rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.field textarea { min-height: 8rem; resize: vertical; }

.field .hint { font-size: 0.875rem; color: var(--text-muted); }

.form-note {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.form-status {
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-status:empty { display: none; }

/* Prose (legal pages) */

.prose { max-width: 46rem; margin-inline: auto; }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }

/* Breadcrumbs */

.breadcrumbs {
  padding-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--border);
}

.breadcrumbs a { color: var(--text-muted); }

/* Page hero */

.page-hero {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(40rem 18rem at 10% -20%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%),
    var(--bg);
}

.page-hero .lead {
  max-width: 48ch;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
}

/* CTA band */

.cta-band {
  background: var(--brand);
  color: #fff;
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}

.cta-band h2 { color: #fff; }
.cta-band p { color: color-mix(in srgb, #fff 82%, transparent); max-width: 48ch; }
.cta-band .button { background: #fff; color: var(--brand); }
.cta-band .button:hover { background: #f2f6fc; color: var(--brand-strong); }
.cta-band .button--secondary { background: transparent; border-color: color-mix(in srgb, #fff 60%, transparent); color: #fff; }
.cta-band .button--secondary:hover { background: color-mix(in srgb, #fff 12%, transparent); color: #fff; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-block: 2.5rem 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 52rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-grid h2 {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9375rem;
}

.footer-grid a { color: var(--text-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 404 */

.error-page { display: grid; place-items: center; min-height: 100svh; }
.error-main { padding-block: 4rem; }

/* Animaatiot ovat puhtaasti lisä: lepotilassa sisältö on aina näkyvissä. */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.js .reveal.is-visible { animation: rise 0.5s ease both; }

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

/* Mobiili */

@media (max-width: 56rem) {
  .nav-toggle { display: block; }

  .nav {
    position: absolute;
    inset: 100% 0 auto;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav.is-open { display: block; }

  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(1rem, 4vw, 2rem) 1rem;
  }

  .nav a {
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
  }

  .site-header { position: relative; }
}

/* Mobiilin kiinnitetty yhteydenottopalkki */

.mobile-bar {
  display: none;
}

@media (max-width: 40rem) {
  .mobile-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    display: flex;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
  }

  .mobile-bar .button { flex: 1; min-height: 2.9rem; padding: 0.6rem 0.9rem; font-size: 0.9375rem; }

  body { padding-bottom: 4.6rem; }
}
