/* ============================================================
   JaniK — digipalvelut
   Pohjustus: paperi, syvä merensininen, amber-huomio
   ============================================================ */

:root {
  --paper:      #F5F6F4;
  --paper-2:    #EBEEEA;
  --surface:    #FFFFFF;
  --ink:        #14202B;
  --ink-soft:   #3D4A55;
  --muted:      #6A7681;
  --line:       #D9DEDA;

  --accent:     #1C5A74;
  --accent-ink: #FFFFFF;
  --accent-soft:#DFEBF1;

  --hi:         #C2702A;
  --hi-soft:    #F7E8D8;

  --font-head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --pad: clamp(1rem, 4vw, 3rem);
  --radius: 4px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(20,32,43,.05), 0 12px 32px -16px rgba(20,32,43,.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
svg { display: block; max-width: 100%; }
h1, h2, h3 {
  font-family: var(--font-head); font-weight: 600; line-height: 1.12;
  letter-spacing: -.015em; margin: 0 0 .6em; text-wrap: pretty;
}
h1 { font-size: clamp(1.85rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { width: min(100% - (var(--pad) * 2), var(--wrap)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius);
  transition: top .15s;
}
.skip:focus { top: 1rem; color: #fff; }
:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .8rem 1.35rem;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 1px solid var(--accent); border-radius: var(--radius);
  cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: #134359; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-small { min-height: 0; padding: .55rem 1rem; font-size: .875rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }

/* Ylätunniste */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; gap: 1.25rem; padding-block: .85rem; position: relative; }
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-head); font-size: .95rem; line-height: 1.15;
}
.brand-mark { width: 1.9rem; height: 1.9rem; color: var(--accent); flex: none; }
.brand-text strong { font-weight: 700; }

.nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav .btn { color: var(--accent-ink); }
.nav .btn:hover { text-decoration: none; }

.nav-toggle {
  display: none; margin-left: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--ink); transition: transform .18s, opacity .18s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child { transform: translateY(-7px) rotate(-45deg); }

/* Sankkari */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 4rem);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line); position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(28,90,116,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28,90,116,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(19rem, .85fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.eyebrow {
  font-family: var(--font-head); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.18rem); color: var(--ink-soft); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 2rem; }

.hero-facts {
  display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem;
  margin: 0; padding-top: 1.25rem; border-top: 1px solid var(--line);
}
.hero-facts > div { min-width: 7rem; }
.hero-facts dt {
  font-family: var(--font-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem;
}
.hero-facts dd { margin: 0; font-weight: 600; font-size: .95rem; }

.hero-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow);
}
.hero-card-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.hero-card-head h2 { font-size: 1rem; margin: 0; }
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none;
}
.hero-card-sub { font-size: .9rem; color: var(--muted); margin-bottom: 1.1rem; }
.hero-card-list { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.hero-card-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .65rem 0; border-top: 1px solid var(--line); font-size: .9rem;
}
.hero-card-list strong { font-weight: 600; text-align: right; white-space: nowrap; }
.hero-card-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.hero-card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Osiot */
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-alt { background: #152029; color: #E8ECEF; }
.section-alt .section-lede { color: #B4BEC6; }
.section-alt h2 { color: #fff; }
.section-alt .eyebrow { color: #7FC4DC; }
.section-head { max-width: 44rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-lede { font-size: 1.08rem; color: var(--ink-soft); }
.subhead { font-size: 1.05rem; margin: 2.5rem 0 1rem; }

/* Palvelut */
.service-lead {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(14rem, .6fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg); margin-bottom: 1rem;
}
.service-lead h3 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
.service-lead p { color: var(--ink-soft); }
.aside-label {
  font-family: var(--font-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem;
}
.aside-list { list-style: none; margin: 0; padding: 0; }
.aside-list li { padding: .5rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.ticks { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: .45rem; }
.ticks li { position: relative; padding-left: 1.5rem; font-size: .95rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5rem;
  width: 9px; height: 9px; border-radius: 2px; background: var(--accent);
}

.service-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.service {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.35rem;
}
.service h3 { font-size: 1.05rem; }
.service p { font-size: .93rem; color: var(--ink-soft); margin-bottom: .75rem; }
.service-meta {
  font-family: var(--font-head); font-size: .82rem; font-weight: 600;
  color: var(--accent); margin: 0;
}
.service-hi { border-color: var(--hi); background: var(--hi-soft); }
.service-hi .service-meta { color: var(--hi); }

.extra-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.extra {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.35rem;
}
.extra h3 { font-size: 1.05rem; }
.extra p { font-size: .93rem; color: var(--ink-soft); margin-bottom: .5rem; }
.extra .service-meta { color: var(--accent); }

/* Hinnasto */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.price-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius-lg); padding: 1.25rem 1.4rem;
}
.price-card-hi { border-color: var(--hi); background: rgba(194,112,42,.12); }
.price-label {
  font-family: var(--font-head); font-size: .76rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #9FB2BE;
  margin: 0 0 .5rem;
}
.price-card-hi .price-label { color: #E8B077; }
.price-n {
  font-family: var(--font-head); font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 700; line-height: 1; margin: 0 0 .35rem;
  font-variant-numeric: tabular-nums; color: #fff;
}
.price-unit { font-size: .86rem; color: #B4BEC6; margin: 0; }

/* Taulukko */
.table-wrap {
  overflow-x: auto; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius-lg);
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 420px; }
th {
  text-align: left; font-family: var(--font-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: #9FB2BE;
  padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.13);
}
td { padding: .65rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); color: #E8ECEF; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.04); }
td.hinta { font-family: var(--font-head); font-weight: 600; color: #7FC4DC; white-space: nowrap; }
.chart-note { font-size: .85rem; color: #9FB2BE; margin-top: 1rem; }

/* Askeleet */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem;
}
.steps li { position: relative; padding-top: 1.1rem; border-top: 2px solid rgba(255,255,255,.16); }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; margin-bottom: .75rem;
  background: var(--hi); color: #241305;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; border-radius: 50%;
}
.steps h3 { color: #fff; font-size: 1.05rem; }
.steps p { color: #B4BEC6; font-size: .92rem; margin: 0; }

/* Yhteystiedot */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, .9fr);
  gap: clamp(1.75rem, 5vw, 3.5rem); align-items: start;
}
.contact-copy h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); max-width: 24rem; }
.contact-copy p { color: #B4BEC6; }
.contact-list { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.contact-list li {
  display: grid; grid-template-columns: 8rem 1fr; gap: 1rem;
  padding: .8rem 0; border-top: 1px solid rgba(255,255,255,.14);
}
.contact-label {
  font-family: var(--font-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: #9FB2BE;
  padding-top: .2rem;
}
.contact-list a { color: #fff; font-weight: 600; }
.contact-list span { color: #E8ECEF; }

.contact-form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow);
}
.contact-form h3 { font-size: 1.1rem; }
.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-family: var(--font-head); font-size: .8rem; font-weight: 600; margin-bottom: .35rem; }
.field em { color: var(--accent); font-style: normal; }
.field input, .field textarea {
  width: 100%; padding: .7rem .8rem; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 44px;
}
.field input:focus, .field textarea:focus {
  outline: 3px solid var(--hi-soft); border-color: var(--hi); background: #fff;
}
.field textarea { resize: vertical; min-height: 6rem; }
.form-note { margin: .75rem 0 0; font-size: .88rem; min-height: 1.4em; }
.form-note.ok { color: #1F6B3A; }
.form-note.err { color: var(--accent); }

/* Alatunniste */
.site-foot { background: #152029; color: #9FB2BE; padding-block: 2.25rem; border-top: 1px solid var(--line); }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.25rem; }
.foot-brand { font-family: var(--font-head); font-weight: 700; color: #fff; margin: 0; font-size: 1rem; }
.foot-small { font-size: .85rem; margin: 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-left: auto; }
.foot-nav a { color: #9FB2BE; text-decoration: none; font-size: .9rem; }
.foot-nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Responsiivisuus */
@media (max-width: 62rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 30rem; }
  .service-lead { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; }
  .extra-row { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 1.25rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 40rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .5rem var(--pad) 1rem; display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .8rem 0; border-top: 1px solid var(--line); font-size: 1rem; }
  .nav .btn { margin-top: .75rem; border-top: 0; }
  .price-grid { grid-template-columns: 1fr; }
  .hero-facts { gap: 1rem; }
  .hero-facts > div { min-width: 6rem; }
  .contact-list li { grid-template-columns: 1fr; gap: .15rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Yhteystiedot: sähköposti näkyvästi */
.contact-big {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 1.25rem 0 .5rem;
}
.contact-big a { color: var(--accent); text-decoration: none; }
.contact-big a:hover { text-decoration: underline; text-underline-offset: 5px; }
.contact-small { font-size: .95rem; color: #B4BEC6; max-width: 26rem; }

.contact-form-simple {
  display: flex; flex-direction: column; align-items: flex-start; gap: .5rem;
}
.contact-form-simple h3 { margin-bottom: .25rem; }
.contact-form-simple p { color: var(--ink-soft); margin-bottom: .75rem; }
.contact-form-simple .form-note { color: var(--muted); font-size: .88rem; margin: 0; }
.contact-form-simple .form-note strong { color: var(--ink); font-family: ui-monospace, Menlo, Consolas, monospace; }
.contact-form-simple .btn { margin-top: .25rem; }

/* Yritystiedot yhteystiedoissa */
.contact-meta {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
  margin: 1.5rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.14);
}
.contact-meta > div { min-width: 8rem; }
.contact-meta dt {
  font-family: var(--font-head); font-size: .72rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: #9FB2BE;
  margin-bottom: .2rem;
}
.contact-meta dd {
  margin: 0; color: #fff; font-family: var(--font-head);
  font-weight: 600; font-size: 1rem;
}
