/* ============================================================
   Tiina Raitis · Työnohjaus · Timil Asiantuntijapalvelut Oy
   Design: "Tila hengittää" (1b), tumma precision + vihreä aksentti
   ============================================================ */

:root {
  --bg: #08090a;
  --bg-alt: #0b0c0d;
  --card: #0e0f10;
  --field: #0a0b0c;
  --accent: hsl(151, 59%, 59%);
  --accent-soft: hsla(151, 59%, 59%, .08);
  --accent-border: hsla(151, 59%, 59%, .35);
  --on-accent: #07130d;
  --text: #f9f9f9;
  --text-warm: #b7b3aa;
  --text-warm2: #a9a49b;
  --text-light: #cecece;
  --text-2nd: #9c9c9d;
  --text-dim: #6a6b6c;
  --border: rgba(255, 255, 255, .06);
  --border-7: rgba(255, 255, 255, .07);
  --border-9: rgba(255, 255, 255, .09);
  --panel-grad: linear-gradient(160deg, #0e1512, #0b0c0d);
  --mono: 'GeistMono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

html, body { background: var(--bg); margin: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "calt" 1, "kern" 1, "liga" 1, "ss03" 1;
  color: var(--text);
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity .18s; }
a:hover { opacity: .6; }
::selection { background: hsla(151, 59%, 59%, .25); }
img { max-width: 100%; display: block; }
.icon { flex: none; }

/* ---------- Navigaatio ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 64px); height: 70px;
  background: rgba(8, 9, 10, .72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand:hover { opacity: 1; }
.logo-tile {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--on-accent); font-weight: 700; font-size: 16px;
}
.nav-brand-name { font-weight: 600; font-size: 16px; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) { font-size: 14px; color: var(--text-2nd); padding: 8px 14px; }
.nav-links .btn { margin-left: 10px; }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--text);
  padding: 8px; cursor: pointer;
}

/* ---------- Painikkeet ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 86px; padding: 10px 22px;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity .18s;
}
.btn:hover { opacity: .82; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.link-arrow {
  color: var(--text); font-size: 16px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.link-arrow .icon { color: var(--accent); }

/* ---------- Osioiden perusrakenne ---------- */

.section { padding: clamp(64px, 8vw, 96px) clamp(20px, 5vw, 64px); }
.section-alt { background: var(--bg-alt); border-top: 1px solid rgba(255, 255, 255, .05); }
.wrap { max-width: 1180px; margin: 0 auto; }
.wrap-narrow { max-width: 1080px; margin: 0 auto; }

.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: .3px;
  color: var(--accent); margin-bottom: 12px;
}
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 38px); font-weight: 600;
  letter-spacing: -.5px; color: var(--text); margin: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 7vw, 96px) clamp(20px, 5vw, 64px) clamp(64px, 8vw, 104px);
}
.hero-glow { position: absolute; width: 560px; height: 560px; border-radius: 50%; pointer-events: none; }
.hero-glow-warm { top: -12%; left: -6%; background: radial-gradient(circle, rgba(215, 201, 175, .09) 0%, transparent 68%); }
.hero-glow-green { bottom: -24%; right: 4%; background: radial-gradient(circle, hsla(151, 59%, 59%, .08) 0%, transparent 68%); }
.hero-grid {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 500px; gap: 56px; align-items: center;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: hsla(151, 59%, 59%, .10); border: 1px solid hsla(151, 59%, 59%, .25);
  border-radius: 86px; padding: 7px 16px;
  font-size: 13px; font-weight: 500; color: var(--accent); margin-bottom: 28px;
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulseDot 2.6s infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.hero h1 {
  font-size: clamp(38px, 5.4vw, 58px); font-weight: 600;
  line-height: 1.08; letter-spacing: -1px; color: var(--text); margin: 0 0 26px;
}
.hero-lead {
  font-size: clamp(17px, 2vw, 19px); line-height: 1.65;
  color: var(--text-warm); max-width: 480px; margin: 0 0 38px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-card {
  position: relative; height: 460px; border-radius: 24px;
  background: var(--panel-grad); border: 1px solid var(--border-7);
  overflow: hidden; box-shadow: hsla(151, 59%, 59%, .12) 0 0 60px -20px;
}
.hero-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-card-caption {
  position: absolute; left: 24px; bottom: 22px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .4px; color: #8a9790;
}

/* ---------- Määritelmäkaista ---------- */

.definition { padding: clamp(56px, 7vw, 80px) clamp(20px, 5vw, 64px); }
.definition .wrap { max-width: 860px; text-align: center; }
.definition p {
  font-size: clamp(22px, 3vw, 28px); line-height: 1.55; font-weight: 500;
  color: #f0efe9; letter-spacing: -.2px; margin: 0;
}
.definition .hl { color: var(--accent); }

/* ---------- Kortit (palvelut, artikkelit) ---------- */

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px; transition: border-color .2s;
}
.card:hover { border-color: var(--accent-border); }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: hsla(151, 59%, 59%, .12); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.card h3 { font-size: 20px; font-weight: 600; color: var(--text); margin: 0 0 10px; }
.card p { font-size: 15px; line-height: 1.65; color: var(--text-warm2); margin: 0; }

/* ---------- Kenelle ---------- */

.who-top {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center; margin-bottom: 64px;
}
.who-top h2 {
  font-size: clamp(28px, 3.6vw, 34px); font-weight: 600; line-height: 1.2;
  letter-spacing: -.4px; color: var(--text); margin: 0 0 18px;
}
.who-top .eyebrow { margin-bottom: 14px; }
.who-top p { font-size: 16px; line-height: 1.7; color: var(--text-warm2); margin: 0 0 16px; }
.who-top p:last-child { margin-bottom: 0; }

.info-stack { display: flex; flex-direction: column; gap: 14px; }
.info-box {
  display: flex; gap: 16px; padding: 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
}
.info-box .icon { color: var(--accent); margin-top: 1px; }
.info-box h4 { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.info-box p { font-size: 14px; line-height: 1.55; color: var(--text-warm2); margin: 0; }

.who-all { border-top: 1px solid var(--border-7); padding-top: 56px; }
.who-all-head { text-align: center; margin-bottom: 36px; }
.who-all-head h3 {
  font-size: clamp(24px, 3vw, 28px); font-weight: 600;
  letter-spacing: -.3px; color: var(--text); margin: 0 0 12px;
}
.who-all-head p { font-size: 16px; line-height: 1.65; color: var(--text-warm2); max-width: 620px; margin: 0 auto; }
.env-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.env-tile {
  text-align: center; padding: 28px 20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; transition: border-color .2s; color: var(--accent);
}
.env-tile:hover { border-color: var(--accent-border); }
.env-tile div { font-size: 15px; font-weight: 600; color: var(--text); margin-top: 14px; }

/* ---------- Lainauskaista ---------- */

.quote-band {
  padding: clamp(72px, 9vw, 104px) clamp(20px, 5vw, 64px);
  background: linear-gradient(180deg, #0b0c0d, #0d1210);
}
.quote-band .wrap { max-width: 900px; text-align: center; }
.quote-band .icon { color: var(--accent); opacity: .5; }
.quote-band h2 {
  font-size: clamp(26px, 3.6vw, 34px); font-weight: 600; line-height: 1.3;
  letter-spacing: -.3px; color: #f0efe9; margin: 22px 0 20px;
}
.quote-band p { font-size: 17px; line-height: 1.7; color: var(--text-warm2); max-width: 640px; margin: 0 auto; }

/* ---------- Minusta ---------- */

.about-grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 380px; gap: 60px; align-items: center;
}
.about-grid .eyebrow { margin-bottom: 14px; }
.about-grid h2 {
  font-size: clamp(28px, 3.6vw, 34px); font-weight: 600;
  letter-spacing: -.4px; color: var(--text); margin: 0 0 6px;
}
.about-sub { font-size: 16px; color: var(--text-warm2); margin-bottom: 22px; }
.about-bio { font-size: 16px; line-height: 1.75; color: var(--text-light); margin: 0 0 22px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px; color: var(--text-light);
  background: var(--accent-soft); border: 1px solid hsla(151, 59%, 59%, .2);
  border-radius: 86px; padding: 6px 14px;
}
.about-photo {
  width: 380px; height: 440px; border-radius: 24px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08); justify-self: end;
}
/* Rajaus painottuu ylös, jotta kasvot pysyvät kehyksessä myös pystykuvalla
   (lähdekuva on kapeampi kuin 380x440-paikka, joten korkeutta rajautuu pois). */
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 8%; }
.photo-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: var(--panel-grad); color: var(--text-dim);
}
.photo-placeholder .logo-tile { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; opacity: .85; }
.photo-placeholder span { font-family: var(--mono); font-size: 11px; letter-spacing: .4px; }

/* ---------- Artikkelit ---------- */

.articles-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 36px; flex-wrap: wrap;
}
.articles-head h2 {
  font-size: clamp(26px, 3.4vw, 32px); font-weight: 600;
  letter-spacing: -.4px; color: var(--text); margin: 0;
}
.articles-all { font-size: 14px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

.article-card { display: block; padding: 28px; }
.article-card .a-tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .5px;
  color: var(--accent); margin-bottom: 14px;
}
.article-card .a-title { font-size: 19px; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 10px; }
.article-card p { font-size: 14px; line-height: 1.65; color: var(--text-warm2); margin: 0 0 18px; }
.article-card .a-foot { display: flex; align-items: center; justify-content: space-between; }
.article-card .a-time { font-size: 12px; color: var(--text-dim); }
.article-card .a-more { font-size: 13px; color: var(--accent); }
a.article-card:hover { opacity: 1; }

/* ---------- Yhteys ---------- */

.contact-panel {
  max-width: 1080px; margin: 0 auto;
  background: var(--panel-grad); border: 1px solid var(--border-7);
  border-radius: 28px; padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start;
}
.contact-panel h2 {
  font-size: clamp(28px, 3.6vw, 34px); font-weight: 600;
  letter-spacing: -.4px; color: var(--text); margin: 0 0 16px;
}
.contact-lead { font-size: 16px; line-height: 1.7; color: var(--text-warm2); margin: 0 0 36px; }
.contact-rows { display: flex; flex-direction: column; gap: 14px; }
.contact-row { display: flex; gap: 12px; align-items: center; }
.contact-row .icon { color: var(--accent); }
.contact-row span, .contact-row a { font-size: 15px; color: var(--text-light); }
.contact-row .muted { color: var(--text-warm2); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: block; font-size: 13px; color: var(--text-warm2); margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; background: var(--field); border: 1px solid var(--border-9);
  border-radius: 12px; padding: 12px 15px; font-size: 15px; color: var(--text);
  font-family: inherit; outline: none; transition: border-color .15s;
}
.form textarea { min-height: 100px; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: var(--text-dim); }
.form input:focus, .form textarea:focus { border-color: hsla(151, 59%, 59%, .5); }
.form .btn { padding: 14px; font-size: 15px; }
.form-note { font-size: 12px; line-height: 1.55; color: var(--text-dim); margin: 0; }

/* Honeypot: piilotettu ihmisiltä, botit täyttävät */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-success { padding: 44px 8px; text-align: center; }
.form-success h3 { font-size: 20px; font-weight: 600; color: var(--text); margin: 0 0 10px; }
.form-success p { font-size: 14px; line-height: 1.6; color: var(--text-warm2); margin: 0; }
.form-error {
  background: rgba(224, 96, 96, .09); border: 1px solid rgba(224, 96, 96, .35);
  border-radius: 12px; padding: 12px 15px; font-size: 14px; color: #e8b3b3;
}

/* ---------- Footer ---------- */

.footer {
  padding: 34px clamp(20px, 5vw, 64px); border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer .logo-tile { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
.footer span { font-size: 13px; color: var(--text-dim); }
.footer .copy { font-size: 12px; }

/* ---------- Artikkelisivu ---------- */

.post { max-width: 720px; margin: 0 auto; padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 64px) clamp(64px, 8vw, 96px); }
.post-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-2nd); margin-bottom: 40px;
}
.post-back .icon { color: var(--accent); }
.post-tag { font-family: var(--mono); font-size: 12px; letter-spacing: .5px; color: var(--accent); margin-bottom: 16px; }
.post h1 {
  font-size: clamp(30px, 4.4vw, 42px); font-weight: 600;
  line-height: 1.15; letter-spacing: -.8px; color: var(--text); margin: 0 0 18px;
}
.post-meta { font-size: 13px; color: var(--text-dim); margin-bottom: 40px; }
.post-meta span + span::before { content: '·'; margin: 0 8px; }

.prose { font-size: 17px; line-height: 1.8; color: var(--text-light); }
.prose p { margin: 0 0 1.4em; }
.prose h2, .prose h3, .prose h4 { color: var(--text); font-weight: 600; letter-spacing: -.3px; margin: 1.8em 0 .6em; }
.prose h2 { font-size: 26px; }
.prose h3 { font-size: 21px; }
.prose h4 { font-size: 18px; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 24px; }
.prose li { margin-bottom: .5em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent); color: var(--text-warm);
}
.prose blockquote p { margin: 0; font-size: 18px; line-height: 1.7; }
.prose hr { border: 0; border-top: 1px solid var(--border-7); margin: 2.2em 0; }
.prose strong { color: var(--text); }

.post-cta {
  margin-top: 56px; padding: 36px;
  background: var(--panel-grad); border: 1px solid var(--border-7); border-radius: 20px;
  text-align: center;
}
.post-cta h3 { font-size: 20px; font-weight: 600; color: var(--text); margin: 0 0 8px; }
.post-cta p { font-size: 15px; line-height: 1.6; color: var(--text-warm2); margin: 0 0 22px; }

.archive-head { text-align: left; margin-bottom: 44px; }
.archive-head h1 { font-size: clamp(30px, 4vw, 38px); font-weight: 600; letter-spacing: -.5px; margin: 0; }

/* ---------- Scroll-reveal ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
.reveal-d5 { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot { animation: none; }
}
.no-motion .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- Responsiivisuus ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { height: 380px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { justify-self: start; max-width: 380px; width: 100%; }
}

@media (max-width: 840px) {
  .who-top { grid-template-columns: 1fr; gap: 36px; }
  .contact-panel { grid-template-columns: 1fr; gap: 40px; }

  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8, 9, 10, .97);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px clamp(20px, 5vw, 64px) 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .04); }
  .nav-links .btn { margin: 16px 0 0; padding: 14px; }
}
