/* Kymppimedia – etusivun prototyyppi v2
   Värit johdettu nykyisestä logosta: harmaa teksti ja limenvihreä viiva.
   Muotokieli: "puhekuplan kulma" – yksi terävämpi kulma vasemmassa alakulmassa
   viittaa ajatukseen "Kerro, mitä tarvitset". */

:root {
  --paper: #f1f4ec;
  --surface: #ffffff;
  --ink: #22272a;
  --grey: #5b6064;
  --logo-grey: #adacad;
  --line: #d9ded2;
  --lime: #77d20c;
  --lime-deep: #3b7400;
  --lime-soft: #e6f4d0;
  --forest: #1f3a2e;
  --forest-text: #d6e4d4;

  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Hanken Grotesk", "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);

  /* Puhekuplan muoto: iso pyöristys, vasen alakulma lähes terävä */
  --bubble: 28px 28px 28px 6px;
  --bubble-sm: 18px 18px 18px 4px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 20px; }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: var(--lime-deep); }

:focus-visible {
  outline: 3px solid var(--lime-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- Kuvat ---------- */

/* Kaikki valokuvat ovat kansiossa kuvat/ ja vaihdettavissa samannimisillä tiedostoilla. */
.photo {
  position: relative;
  margin: 0;
  border-radius: var(--bubble);
  overflow: hidden;
  background: #d5dccd;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-note {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: .78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .88);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- Painikkeet ja linkit ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--lime-deep); border-color: var(--lime-deep); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .95rem; }

.text-link {
  display: inline-block;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--lime);
  padding-bottom: 2px;
}
.text-link:hover { border-bottom-color: var(--lime-deep); }

/* ---------- Yläpalkki ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.brand img { width: 144px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav ul a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-radius: 999px;
}
.nav ul a:hover { background: var(--lime-soft); }

.menu-toggle { display: none; }

/* Mobiilivalikko: koko leveyden paneeli headerin alla. Kokeiltu 320 px leveyteen asti. */
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font: 600 .95rem var(--font-body);
    cursor: pointer;
  }
  .menu-icon, .menu-icon::before {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: transform .2s;
  }
  .menu-icon::before { content: ""; position: absolute; top: 6px; }
  .menu-icon { transform: translateY(-3px); }
  .menu-toggle[aria-expanded="true"] .menu-icon { transform: translateY(0) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(-6px) rotate(-90deg); }

  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 12px var(--gutter) 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(34, 39, 42, .35);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s, transform .18s, visibility 0s .18s;
  }
  .nav.is-open {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity .18s, transform .18s;
  }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a {
    padding: 14px 4px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta { min-height: 52px; font-size: 1rem; }
}

@media (max-width: 360px) {
  .brand img { width: 120px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu-toggle { padding: 0 13px; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--surface);
  padding-top: clamp(20px, 5vw, 56px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.3rem, 6.2vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: .98;
  margin-bottom: clamp(14px, 2.4vw, 28px);
}
.hero-title span { display: block; color: var(--grey); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--grey);
  max-width: 34ch;
  margin: 0;
}

.hero-photo { aspect-ratio: 5 / 4; }

/* Kolme tarvelähtöistä valintaa */
.choices-title {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  letter-spacing: -0.015em;
  margin: clamp(32px, 5vw, 56px) 0 16px;
}

.choices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  gap: 0 12px;
  height: 100%;
  padding: 10px 10px 22px;
  border-radius: var(--bubble);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  border: 2px solid transparent;
  transition: border-color .15s, background-color .15s;
}
.choice:hover { border-color: var(--ink); background: var(--lime-soft); }

.choice-img {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--bubble-sm);
  margin-bottom: 18px;
}
.choice-text { padding-left: 12px; }
.choice-name {
  display: block;
  font: 700 clamp(1.4rem, 2.2vw, 1.8rem)/1.1 var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.choice-desc { display: block; color: var(--grey); font-size: .98rem; line-height: 1.4; }

.choice-go {
  align-self: center;
  margin-right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--lime);
  position: relative;
  flex: none;
  transition: transform .15s;
}
.choice-go::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: translate(-50%, -50%) rotate(45deg);
  margin-top: -2px;
}
.choice:hover .choice-go { transform: translateY(3px); }

.hero-call {
  margin: 18px 0 0;
  color: var(--grey);
  font-size: 1rem;
}
.hero-call a { color: var(--ink); font-weight: 600; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* Logon vihreä viiva – sivuston tunnistettava elementti */
.brand-rule {
  height: clamp(10px, 1.4vw, 16px);
  background: var(--lime);
  margin-top: clamp(40px, 6vw, 72px);
  margin-right: max(var(--gutter), calc((100vw - var(--wrap)) / 2));
  transform-origin: left center;
  animation: draw-rule .9s cubic-bezier(.2, .7, .2, 1) .15s both;
}
@keyframes draw-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Kotisivut ---------- */

.service-main { padding: var(--section) 0 clamp(48px, 6vw, 80px); }
.service-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.service-photo { aspect-ratio: 4 / 3.4; }
.service-lead {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.45;
}
.service-body > p:not(.service-lead) { color: var(--grey); }

.checks {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.checks li {
  position: relative;
  padding: 10px 0 10px 34px;
  border-top: 1px solid var(--line);
}
.checks li:last-child { border-bottom: 1px solid var(--line); }
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 17px;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--lime-deep);
  border-bottom: 3px solid var(--lime-deep);
  transform: rotate(-45deg);
}

/* Tiiviimpi lista palvelukorttien sisällä */
.checks-compact { margin-bottom: 1em; align-self: stretch; }
.checks-compact li { padding: 7px 0 7px 30px; font-size: 1rem; }
.checks-compact li::before { top: 13px; }

/* ---------- Webhotellit ja painotuotteet ---------- */

.service-pair-wrap { padding-bottom: var(--section); }
.service-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
}
.service {
  background: var(--surface);
  border-radius: var(--bubble);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.service-card-photo { aspect-ratio: 16 / 9; border-radius: var(--bubble-sm); }
.service-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 16px 16px;
}
/* Linkit samalle linjalle, vaikka korttien tekstit ovat eripituisia */
.service-card-body .text-link { margin-top: auto; }
.service h2 { font-size: clamp(1.7rem, 2.6vw, 2.1rem); margin-bottom: 10px; }
.service p { color: var(--grey); }

/* ---------- Yhteistyö ---------- */

.together {
  background: var(--forest);
  color: #fff;
  padding: var(--section) 0;
}
.together-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.together-intro > p { font-size: 1.15rem; color: var(--forest-text); }
.together-photo { aspect-ratio: 4 / 3; margin-top: 32px; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 36px 76px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -6px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 26px 26px 26px 6px;
  background: rgba(255, 255, 255, .1);
  color: var(--lime);
  font: 700 1.35rem var(--font-display);
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 56px;
  bottom: 6px;
  width: 2px;
  background: rgba(255, 255, 255, .16);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::before { background: var(--lime); color: var(--ink); }
.steps h3 { font-size: 1.5rem; margin-bottom: 6px; }
.steps p { color: var(--forest-text); margin: 0; }

/* ---------- Minusta ---------- */

.about { padding: var(--section) 0; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(40px, 6vw, 88px);
  align-items: start;
}
.about-lead {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
/* Esittely puhekuplana: viesti suoraan yrittäjältä */
.about-text {
  background: var(--surface);
  border-radius: var(--bubble);
  padding: clamp(24px, 3.5vw, 40px);
}
.about-text p:not(.about-sign) { color: var(--grey); }
.about-text p:first-child { margin-top: 0; }
.about-sign {
  display: inline-block;
  margin: 8px 0 0;
  padding-bottom: 4px;
  font: 700 1.15rem/1.2 var(--font-display);
  border-bottom: 3px solid var(--lime);
}

/* ---------- Yhteys ---------- */

.contact {
  background: var(--lime);
  padding: clamp(56px, 9vw, 112px) 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px clamp(40px, 6vw, 88px);
  align-items: center;
}
.contact-title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 20px;
}
.contact-lead { font-size: 1.2rem; max-width: 36ch; margin: 0; }

.contact-cards { display: grid; gap: 12px; }
.contact-card {
  display: block;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--bubble-sm);
  padding: 18px 22px;
  border: 2px solid transparent;
}
.contact-card:hover { border-color: var(--ink); }
.contact-kind { display: block; font-size: .9rem; color: var(--grey); }
.contact-value {
  display: block;
  font: 700 clamp(1.25rem, 2.6vw, 1.6rem) var(--font-display);
  overflow-wrap: anywhere;
}
/* WhatsApp ja Signal samaan numeroon: pienemmät kortit rinnakkain puhelimen ja sähköpostin alla */
.contact-apps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.contact-app { padding: 14px 22px; }
.contact-app .contact-value { font-size: clamp(1.1rem, 2vw, 1.3rem); }
.contact-address { margin: 8px 0 0 4px; }

/* ---------- Alatunniste ---------- */

.site-footer { padding: 32px 0 40px; background: var(--surface); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-logo { width: 120px; }
.site-footer p { margin: 0; color: var(--grey); font-size: .95rem; }

/* ---------- Tabletti ---------- */

@media (max-width: 900px) {
  .service-main-grid,
  .together-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; }
  .hero-photo { aspect-ratio: 4 / 3.4; }
  .service-photo { aspect-ratio: 16 / 10; }
}

/* ---------- Puhelin ---------- */

@media (max-width: 640px) {
  body { font-size: 1rem; }

  /* Tiivis aloitus: otsikko, lyhyt teksti, kuva ja valinnat mahtuvat lähelle toisiaan */
  .hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .hero-photo { aspect-ratio: 12 / 5; border-radius: var(--bubble-sm); }

  .choices-title { margin-top: 26px; margin-bottom: 12px; }
  .choices { grid-template-columns: 1fr; gap: 10px; }
  .choice {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    padding: 8px;
    border-radius: var(--bubble-sm);
  }
  .choice-img {
    grid-column: auto;
    width: 76px;
    height: 76px;
    aspect-ratio: 1;
    margin: 0;
    border-radius: 12px 12px 12px 4px;
  }
  .choice-text { padding-left: 4px; }
  .choice-name { font-size: 1.3rem; margin-bottom: 2px; }
  .choice-desc { font-size: .92rem; }
  .choice-go { width: 38px; height: 38px; margin-right: 4px; }

  .service-pair { grid-template-columns: 1fr; }
  .steps li { padding-left: 64px; }
  .steps li::before { width: 44px; height: 44px; font-size: 1.15rem; }
  .steps li:not(:last-child)::after { left: 21px; top: 48px; }
  .service-body .btn { width: 100%; }
}

@media (max-width: 360px) {
  .choice { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .choice-img { width: 64px; height: 64px; }
  .choice-name { font-size: 1.18rem; }
}

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