/* ============================================================================
   studiomahla.fi — Jaettu tyylitiedosto
   Ladattu kaikilla asiakassivuilla (etusivu, blogit, privacy, lomakkeet).
   Sivukohtaiset tyylit pysyvät kunkin HTML-tiedoston omassa <style>-lohkossa.
   ============================================================================ */

:root {
  --green-dark: #3d5247;
  --green-mid: #4a6157;
  --green-light: #5a7268;
  --cream: #f5f0e8;
  --cream-warm: #ede7db;
  --pink: #c8997a;
  --pink-light: #d4a98a;
  --pink-pale: #e8cdb8;
  --white: #faf8f4;
  --text-dark: #2a3830;
  --text-mid: #4a5e55;
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --nav-height: 72px;
  --max-w: 1200px;
  --section-px: clamp(24px, 5vw, 48px);
  --section-py: clamp(80px, 12vw, 128px);
  --danger: #b85a3a;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { padding: 0; margin: 0; list-style: none; }
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
  color: var(--text-dark);
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--pink); }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* SKIP LINK (accessibility) */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: auto; height: auto; padding: 16px 24px;
  background: var(--pink); color: #fff;
  font-family: var(--font-sans); font-size: 14px; letter-spacing: 0.05em;
}

/* LABELS */
.label {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1.4em;
}
.label--pink { color: var(--pink); }
.label--pink-pale { color: var(--pink-pale); }
.label--mid { color: var(--text-mid); }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  min-height: 44px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--pink);
  color: var(--text-dark);
  border-radius: 2px;
  transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.btn:hover { background: #b6876a; color: var(--text-dark); }
.btn--outline {
  background: transparent; color: var(--pink-pale); border: 1px solid var(--pink-pale);
}
.btn--outline:hover {
  background: var(--pink); color: var(--text-dark); border-color: var(--pink);
}
.btn--small {
  padding: 10px 18px; font-size: 11px; letter-spacing: 0.2em; min-height: 44px;
  white-space: nowrap; flex-shrink: 0;
}
.btn--large { padding: 18px 36px; font-size: 14px; min-height: 52px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* NAVIGATION */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--green-dark); color: var(--white);
}
.nav__inner {
  max-width: var(--max-w); height: 100%;
  margin: 0 auto; padding: 0 var(--section-px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--white); min-height: 44px; }
.brand__logo { width: 30px; height: 30px; color: var(--white); flex-shrink: 0; }
.brand__logo svg { width: 100%; height: 100%; }
.brand__name {
  font-family: var(--font-sans);
  font-weight: 400; font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase; line-height: 1.4;
}
.brand__name span { display: block; }
.nav__right { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 28px); }
.nav__link {
  font-family: var(--font-sans);
  font-weight: 400; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--white);
  min-height: 44px;
  display: inline-flex; align-items: center;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav__link:hover { color: var(--pink-pale); }
.nav__link.is-current { color: var(--pink-pale); }
@media (max-width: 540px) {
  .nav__inner { padding: 0 16px; gap: 10px; }
  .brand { gap: 10px; }
  .brand__logo { width: 26px; height: 26px; }
  .brand__name span { display: none; }
  .nav__right { gap: 10px; }
  .nav__link { font-size: 10.5px; letter-spacing: 0.16em; padding: 4px 2px; }
  .btn--small { padding: 8px 14px; font-size: 10px; letter-spacing: 0.14em; }
}
@media (max-width: 400px) {
  .nav__inner { padding: 0 12px; gap: 8px; }
  .brand__name { display: none; }
  .nav__right { gap: 8px; }
  .btn--small { padding: 8px 12px; font-size: 9.5px; letter-spacing: 0.12em; }
}

/* OPENING BANNER */
.opening-banner {
  background: var(--pink-pale);
  color: var(--text-dark);
  text-align: center;
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 300; letter-spacing: 0.05em; line-height: 1.4;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  z-index: 99;
}
.opening-banner a { color: var(--text-dark); text-decoration: underline; text-underline-offset: 3px; }
.opening-banner a:hover { color: var(--green-dark); }

/* ARTICLE HERO */
.article-hero {
  background: var(--cream);
  padding: calc(clamp(56px, 8vw, 96px) + 40px) var(--section-px) clamp(48px, 7vw, 80px);
}
.article-hero__inner { max-width: 760px; margin: 0 auto; }
.article-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 13px; letter-spacing: 0.04em;
  color: var(--text-mid);
  margin-bottom: 32px; padding: 6px 0;
}
.article-back:hover { color: var(--pink); }
.article-back__arrow { display: inline-block; transition: transform .2s ease; }
.article-back:hover .article-back__arrow { transform: translateX(-3px); }
.article-hero h1 {
  font-size: clamp(32px, 5vw, 52px); line-height: 1.15;
  margin: 16px 0 24px; color: var(--text-dark);
}
.article-lead {
  font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7;
  color: var(--text-mid); max-width: 660px;
  margin: 0 0 1.2em;
}
.article-lead:last-child { margin-bottom: 0; }
.article-meta {
  font-size: 14px;
  color: var(--text-mid);
  margin: 0 0 1.5em;
  font-style: italic;
  opacity: 0.85;
}

/* ARTICLE BODY */
.article-body {
  max-width: 720px; margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) var(--section-px) clamp(56px, 8vw, 96px);
}
.article-body p { font-size: 17px; line-height: 1.9; color: var(--text-dark); }
.article-body p a {
  color: var(--pink); text-decoration: underline; text-underline-offset: 3px;
}
.article-body p a:hover { color: var(--green-dark); }
.article-body ul.article-list,
.article-body ol.article-list {
  font-size: 17px; line-height: 1.85; color: var(--text-dark);
  padding-left: 1.5em; margin: 0 0 1.8em;
  max-width: 660px;
}
.article-body ul.article-list li,
.article-body ol.article-list li {
  margin-bottom: 0.7em;
}
.article-body ul.article-list li strong,
.article-body ol.article-list li strong {
  color: var(--green-dark); font-weight: 500;
}
.article-body h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin-top: 1.6em; margin-bottom: .5em; line-height: 1.2;
}
.article-body h2:first-of-type { margin-top: 0; }
.article-body h3 {
  font-size: 22px; font-weight: 500;
  color: var(--text-dark);
  margin-top: 1.4em; margin-bottom: .35em;
}

/* REFERENCES section */
.references {
  background: var(--cream);
  border-left: 4px solid var(--pink);
  border-radius: 4px;
  padding: clamp(24px, 4vw, 36px);
  margin-top: 48px;
}
.references h2 {
  font-size: 22px;
  margin: 0 0 18px;
  color: var(--text-dark);
}
.references ol {
  margin: 0; padding-left: 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-mid);
}
.references li { margin-bottom: 14px; }
.references li:last-child { margin-bottom: 0; }
.references a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}
.references a:hover { color: var(--green-dark); }

/* ARTICLE CTA */
.article-cta {
  background: var(--cream-warm);
  padding: clamp(48px, 6vw, 72px) var(--section-px);
  text-align: center;
}
.article-cta__inner { max-width: 640px; margin: 0 auto; }
.article-cta h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  margin: 0 0 16px; color: var(--text-dark);
}
.article-cta p {
  font-size: 16px; line-height: 1.85;
  color: var(--text-mid);
  margin: 0 0 28px;
}

/* BLOG INFOGRAPHIC (SVG) */
figure.infographic {
  margin: 2em 0;
  text-align: center;
}
figure.infographic svg { width: 100%; height: auto; }
.num { font-weight: 500; }

/* FOOTER */
.footer { background: var(--green-dark); color: var(--white); padding: 64px var(--section-px) 28px; }
.footer__inner { max-width: var(--max-w); margin: 0 auto; }
.footer__cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; align-items: center;
}
@media (max-width: 768px) {
  .footer__cols { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .footer__cta { justify-self: center; }
}
.footer__brand { display: flex; align-items: center; gap: 12px; opacity: 0.7; color: var(--white); }
.footer__brand .brand__logo { width: 22px; height: 22px; }
.footer__contact {
  font-size: 14px; line-height: 1.9;
  color: rgba(250, 248, 244, 1); text-align: right;
}
.footer__contact a { color: inherit; text-decoration: none; }
.footer__contact a:hover { color: var(--pink-pale); }
@media (max-width: 768px) { .footer__contact { text-align: center; } }
.footer__bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(250, 248, 244, 0.12);
  font-size: 13px; color: rgba(250, 248, 244, 0.7);
  text-align: center; letter-spacing: 0.04em;
}
.footer__bottom a { color: inherit; text-decoration: none; }
.footer__bottom a:hover { color: var(--pink-pale); text-decoration: underline; }
.footer__bottom span { margin: 0 8px; }
