/* Pilketerapia – tyylit. Mobile first. Ei ulkoisia fontteja tai kirjastoja. */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #1f2d2e;
  --muted: #566768;
  --brand: #2f5d62;
  --brand-dark: #244a4e;
  --accent: #e9a23b;
  --soft: #e8f0ee;
  --line: #e3ded4;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(31, 45, 46, 0.08);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--brand);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2rem, 1040px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  position: relative;
}

.brand {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.nav a:hover {
  color: var(--brand);
}

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  color: var(--brand);
  background: var(--soft);
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
}

/* Painikkeet */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--brand);
  transition: background 0.2s, transform 0.2s;
  overflow-wrap: anywhere;
}

.btn:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-small {
  padding: 0.45rem 1.1rem;
}

.btn-ghost {
  background: transparent;
  color: var(--brand) !important;
}

.btn-ghost:hover {
  background: var(--soft);
}

.btn-light {
  background: #fff;
  color: var(--brand) !important;
  border-color: #fff;
}

.btn-light:hover {
  background: var(--soft);
  border-color: var(--soft);
}

.btn-outline-light {
  background: transparent;
  color: #fff !important;
  border-color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

/* Osiot */
.section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  scroll-margin-top: var(--header-h);
}

.section-soft {
  background: var(--soft);
}

.section-brand {
  background: var(--brand);
  color: #fff;
}

.section-brand h2 {
  color: #fff;
}

.hero {
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5.5rem);
  background:
    radial-gradient(circle at 85% 20%, rgba(233, 162, 59, 0.22), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(47, 93, 98, 0.12), transparent 50%),
    var(--bg);
}

.hero .wrap {
  max-width: 760px;
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--brand);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 3px;
  background: var(--accent);
  margin-right: 0.6rem;
  vertical-align: middle;
  border-radius: 2px;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 40em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.badge {
  display: inline-block;
  margin: 1.6rem 0 0;
  padding: 0.45rem 1rem;
  background: var(--soft);
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Kortit */
.cards {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1.5rem;
}

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

.card h3 {
  color: var(--brand);
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* Minusta */
.about {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.portrait {
  display: block;
  aspect-ratio: 1;
  width: min(100%, 280px);
  object-fit: cover;
  object-position: center 25%;
  /* säädä 25 %, jos pää leikkautuu */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--soft);
}

.subhead {
  margin-top: 1.8rem;
  color: var(--brand);
}

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

.quals li {
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
}

.quals strong {
  display: block;
}

.quals span {
  color: var(--muted);
}

/* Askeleet */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: grid;
  gap: 1.2rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.4rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
}

.steps h3 {
  margin-bottom: 0.2em;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.note {
  background: var(--soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.2rem;
}

/* Yhteys */
.contact {
  max-width: 720px;
}

.contact-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.6rem 0 1rem;
}

.small {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Alapalkki */
.site-footer {
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

/* Leveämmät näytöt */
@media (min-width: 720px) {
  .about {
    grid-template-columns: 280px 1fr;
    gap: 3rem;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobiilivalikko (vain kun JS on käytössä) */
@media (max-width: 719px) {
  .js .nav-toggle {
    display: inline-block;
  }

  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
  }

  .js .nav.open {
    display: flex;
  }

  .js .nav a {
    padding: 0.8rem 0.2rem;
  }

  .js .nav .btn-small {
    text-align: center;
    margin-top: 0.4rem;
  }

  .nav:not(.open) {
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}
