/* Metsä-Karelia Oy – staattinen tyylitiedosto (ei riippuvuuksia) */
:root {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --emerald-200: #a7f3d0;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --blue-600: #2563eb;
  --radius: .5rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); line-height: 1.6; color: var(--slate-900); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: inherit; }
address { font-style: normal; }

.container { max-width: 80rem; margin-inline: auto; padding-inline: 1rem; }
.container.narrow { max-width: 56rem; }
@media (min-width: 768px) { .container { padding-inline: 1.5rem; } }

:focus-visible { outline: 2px solid var(--emerald-400); outline-offset: 2px; border-radius: 4px; }

/* Ohituslinkki */
.skip-link { position: absolute; left: .5rem; top: -3rem; z-index: 100; background: #fff; color: var(--slate-900); padding: .5rem .75rem; border-radius: var(--radius); box-shadow: 0 2px 8px rgb(0 0 0 / .2); }
.skip-link:focus { top: .5rem; }

/* Painikkeet ja merkit */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; white-space: nowrap; border-radius: var(--radius); font-weight: 500; font-size: .95rem; padding: .7rem 1.25rem; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s; }
.btn-sm { font-size: .875rem; padding: .45rem .9rem; }
.btn-primary { background: var(--emerald-500); color: #fff; }
.btn-primary:hover { background: var(--emerald-600); }
.btn-outline { border: 1px solid rgb(255 255 255 / .3); color: #fff; }
.btn-outline:hover { background: rgb(255 255 255 / .1); }

.badge { display: inline-block; border-radius: 999px; padding: .25rem .75rem; font-size: .8rem; font-weight: 600; }
.badge-dark { background: rgb(16 185 129 / .15); color: var(--emerald-300); box-shadow: inset 0 0 0 1px rgb(52 211 153 / .3); }
.badge-light { background: rgb(16 185 129 / .1); color: var(--emerald-700); box-shadow: inset 0 0 0 1px rgb(5 150 105 / .2); text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; }

/* Ylätunniste */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(15 23 42 / .9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--slate-100); text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-icon { display: inline-flex; width: 1.5rem; height: 1.5rem; align-items: center; justify-content: center; border-radius: .375rem; background: var(--emerald-500); color: #fff; }
.nav-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; font-size: .9rem; color: var(--slate-300); }
.nav-links > a:not(.btn) { text-decoration: none; }
.nav-links > a:not(.btn):hover { color: #fff; }
@media (max-width: 640px) {
  .nav-links { gap: .9rem; font-size: .85rem; }
  .nav-links > a:not(.btn) { display: none; }
}

/* Hero */
.hero { position: relative; background: var(--slate-900); color: var(--slate-300); padding-block: 4rem 3rem; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 1fr; } .hero { padding-block: 6rem 5rem; } }
.hero-text > * + * { margin-top: 1rem; }
.hero h1 { color: #fff; font-size: clamp(1.875rem, 4vw + .5rem, 3rem); font-weight: 800; letter-spacing: -.02em; margin-top: .75rem; }
.hero-tagline { color: var(--emerald-200); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .75rem; }
.hero-image { margin: 0; position: relative; border-radius: 1rem; overflow: hidden; box-shadow: 0 25px 50px -12px rgb(0 0 0 / .5); }
.hero-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(15 23 42 / .4), transparent); }

/* Aallot */
.wave { display: block; width: 100%; height: 4rem; position: absolute; left: 0; right: 0; }
.wave-bottom { bottom: 0; transform: translateY(100%); fill: var(--slate-900); }
.wave-top { top: 0; transform: translateY(-99%); fill: var(--slate-900); }

/* Palvelut */
.services { background: #fff; padding-block: 6rem 4rem; }
.section-head { margin-bottom: 2.5rem; }
.section-head.center { text-align: center; max-width: 48rem; margin-inline: auto; }
.section-head h2 { margin-top: .5rem; font-size: clamp(1.5rem, 2vw + .75rem, 1.875rem); font-weight: 700; letter-spacing: -.02em; }
.section-head .lead { margin-top: 1rem; font-size: 1.05rem; }
.cards { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid var(--slate-200); border-radius: 1rem; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .06); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 25px -5px rgb(0 0 0 / .12); transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { padding: 1.25rem 1.5rem 1.5rem; }
.card-icon { display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border-radius: .75rem; background: rgb(16 185 129 / .1); color: var(--emerald-700); margin-bottom: .75rem; }
.card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: .5rem; }
.card p { color: var(--slate-600); }

/* Tietoa meistä */
.about { position: relative; overflow: hidden; background: var(--slate-50); padding-block: 4rem 6rem; }
.about-bg { position: absolute; inset: 0; }
.about-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .12; }
.about-content { position: relative; }
.about h2 { font-size: clamp(1.5rem, 2vw + .75rem, 1.875rem); font-weight: 700; letter-spacing: -.02em; text-align: center; margin-bottom: 2rem; }
.about p + p { margin-top: 1.25rem; }
.about p { font-size: 1.05rem; color: var(--slate-700); }
.about strong { color: var(--emerald-700); }

/* Palvelukokonaisuudet */
.details { position: relative; background: var(--slate-900); color: var(--slate-100); padding-block: 4rem; margin-bottom: 4rem; }
.details .section-head h2 { font-size: clamp(1.875rem, 2.5vw + 1rem, 2.25rem); }
.details .badge { text-transform: uppercase; letter-spacing: .04em; color: var(--emerald-200); background: rgb(16 185 129 / .2); }
.details .lead { color: var(--slate-300); }
.detail { display: grid; gap: 1rem 3rem; padding-block: 2rem; border-top: 1px solid rgb(255 255 255 / .1); max-width: 64rem; margin-inline: auto; }
@media (min-width: 768px) { .detail { grid-template-columns: 20rem minmax(0, 1fr); } }
.detail h3 { hyphens: auto; overflow-wrap: break-word; font-size: clamp(1.5rem, 1.5vw + 1rem, 1.875rem); font-weight: 700; color: var(--emerald-300); }
.detail h3::after { content: ""; display: block; width: 3rem; height: 3px; margin-top: .75rem; border-radius: 2px; background: var(--emerald-500); }
.detail-body p { color: var(--slate-300); }
.detail-body p + p { margin-top: 1rem; }

/* Yhteystiedot */
.contact { background: #fff; padding-block: 4rem; }
.contact-grid { display: grid; gap: 1.5rem; max-width: 56rem; margin-inline: auto; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card { border: 1px solid var(--slate-200); border-radius: 1rem; padding: 1.5rem; box-shadow: 0 1px 3px rgb(0 0 0 / .06); }
.contact-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: .5rem; }
.contact-card p { color: var(--slate-600); }
.contact-card p + p { margin-top: .4rem; }
.contact-card a { text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }
.contact-card a.link { color: var(--blue-600); }

/* Alatunniste */
.site-footer { border-top: 1px solid var(--slate-200); background: #fff; padding-block: 1.5rem; text-align: center; font-size: .875rem; color: var(--slate-600); }

/* Animaatiot: käytössä vain kun JS on ladattu (html.js), joten sisältö näkyy aina hakukoneille ja ilman JS:ää */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
