/* ==========================================================================
   Ydio · ydio.fi
   Värit: #02110c Dark Emerald · #1a422f Olive green · #f3ebd6 Cream Beige
   ========================================================================== */

:root {
  --bg: #02110c;
  --bg-2: #051a12;
  --surface: #0a2418;
  --olive: #1a422f;
  --olive-2: #24573e;
  --cream: #f3ebd6;
  --text: #f3ebd6;
  --text-2: rgba(243, 235, 214, 0.72);
  --text-3: rgba(243, 235, 214, 0.5);
  --line: rgba(243, 235, 214, 0.1);
  --line-2: rgba(243, 235, 214, 0.18);
  --signal: #8fd4a6;           /* vain laitteiden LEDit */
  --accent: #8cc4a2;           /* signaalit ja korostukset */
  --accent-dim: rgba(140, 196, 162, 0.16);
  --label: rgba(243, 235, 214, 0.52);
  --danger: #e9a68a;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1200px;
  --gutter: 20px;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 76px; }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--cream); color: var(--bg); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--cream); color: var(--bg);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Typografiset apuluokat ---------- */
.eyebrow,
.mono-label {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--label);
}
.eyebrow { display: block; margin-bottom: 16px; }
.mono-label { display: block; margin-bottom: 14px; font-size: 0.875rem; }


h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); letter-spacing: -0.035em; }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }

.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-2); max-width: 34em; }
.section-lead { font-size: 1.1rem; color: var(--text-2); max-width: 40em; }

/* ---------- Painikkeet ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cream); color: var(--bg); }
.btn-primary:hover { background: #fffaf0; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--cream); background: rgba(243, 235, 214, .04); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(2, 17, 12, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.brand-mark { width: auto; height: 28px; }
.brand-name { color: #fff; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; gap: 28px; }
.nav-link {
  position: relative;
  text-decoration: none; font-size: .95rem; color: var(--text-2);
  transition: color .2s;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent);
}
.nav-cta { min-height: 42px; padding: 0 20px; font-size: .9rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 50%;
  background: transparent; cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--cream);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 32px;
    padding: 32px var(--gutter) 40px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-link {
    display: block; padding: 18px 0; font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em;
    color: var(--text); border-bottom: 1px solid var(--line);
  }
  .nav-link.is-active::after { display: none; }
  .nav-cta { min-height: 54px; font-size: 1rem; }
  .site-header.menu-open { background: var(--bg); border-bottom-color: var(--line); }
  body.no-scroll { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  opacity: .6;
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  right: -20vw; top: -10vw;
  background:
    radial-gradient(circle closest-side at 50% 50%, rgba(26, 66, 47, .75), transparent);
  pointer-events: none;
}
.hero-inner {
  display: grid; gap: 48px; align-items: center;
  grid-template-columns: 1fr;
}
.hero-copy h1 { margin-bottom: 24px; }
.hero-copy .lead { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }

@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1.25fr 1fr; gap: 56px; }
  .hero-visual { margin: 0 0 0 auto; }
}
@media (max-width: 979px) {
  .hero { min-height: auto; }
  .hero-visual { max-width: 560px; }
}

/* ---------- Laitekirjasto (hero-kaavio ja järjestelmäkartta) ---------- */
.device-lib { position: absolute; width: 0; height: 0; overflow: hidden; }
.d-body   { fill: #2a302d; }
.d-face   { fill: #353c38; }
.d-dark   { fill: #1a1e1c; }
.d-port   { fill: #0b0e0d; }
.d-hl     { fill: rgba(255, 255, 255, .09); }
.d-edge   { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.d-screw  { fill: #7a817d; }
.d-slot   { fill: none; stroke: #2c312e; stroke-width: .9; }
.d-on     { fill: var(--signal); }
.d-off    { fill: #4a514d; }
.d-label  { fill: rgba(243, 235, 214, .16); }
.d-txt    { font-family: var(--mono); font-size: 4px; fill: #9ba29e; letter-spacing: .02em; }
.d-screen { fill: #08140f; }
.d-scr-bar  { fill: rgba(243, 235, 214, .06); }
.d-scr-txt  { font-family: var(--mono); font-size: 5px; fill: rgba(243, 235, 214, .55); }
.d-scr-line { fill: none; stroke: rgba(243, 235, 214, .4); stroke-width: 1.2; }
.d-scr-fill { fill: rgba(140, 196, 162, .45); }
.d-scr-dim  { fill: rgba(243, 235, 214, .04); stroke: rgba(243, 235, 214, .12); stroke-width: .8; }
.d-scr-trend { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; }
.d-lcd      { fill: #12301f; }
.d-lcd-txt  { font-family: var(--mono); font-size: 7.5px; fill: var(--signal); }
.d-fin      { fill: none; stroke: #1d2220; stroke-width: 1.6; }
.d-metal    { fill: url(#g-metal); }
.d-nut      { fill: url(#g-nut); }
.d-thread   { fill: none; stroke: rgba(0, 0, 0, .3); stroke-width: .8; }
.d-cap      { fill: #56645b; }
.d-rail     { fill: #59605c; }
.d-rail-slot { fill: #2e3431; }
.d-target   { fill: #59605c; }

/* Hero-kaavio: pieni kelluva kortti kuvan päällä */
.schematic { display: block; width: 100%; height: auto; overflow: visible; }
.schematic .cable-eth   { stroke: rgba(143, 212, 166, .32); stroke-width: 1.6; stroke-linejoin: round; }
.schematic .cable-io    { stroke: rgba(243, 235, 214, .3); stroke-width: 1.1; stroke-linejoin: round; }
.schematic .cable-power { stroke: #4a514d; stroke-width: 3.5; stroke-linecap: round; }
.schematic .tag text { font-family: var(--font); font-size: 9.5px; font-weight: 500; letter-spacing: .04em; fill: var(--label); }
.schematic .pulse {
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 7 200;
  stroke-dashoffset: 7;
  opacity: 0;
  filter: drop-shadow(0 0 3px rgba(140, 196, 162, .7));
  animation: signal 5s linear infinite;
}
.schematic .pulse.rev { animation-name: signal-rev; }
/* Järjestys: HMI → kytkin → PLC → taajuusmuuttaja, anturi → I/O, PLC → kytkin → HMI */
.schematic .s1 { animation-delay: 0s; }
.schematic .s2 { animation-delay: 1.2s; }
.schematic .s3 { animation-delay: 2.4s; }
.schematic .s4 { animation-delay: 4s; }
.schematic .s5 { animation-delay: 5.4s; }
.schematic .s6 { animation-delay: 6.6s; }
@keyframes signal {
  0%   { stroke-dashoffset: 7; opacity: 0; }
  1%   { opacity: 1; }
  12%  { stroke-dashoffset: -100; opacity: 1; }
  13%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes signal-rev {
  0%   { stroke-dashoffset: -100; opacity: 0; }
  1%   { opacity: 1; }
  12%  { stroke-dashoffset: 7; opacity: 1; }
  13%, 100% { stroke-dashoffset: 7; opacity: 0; }
}

/* Hero-kuva taustalla: kuten muiden osioiden taustakuvat, mutta näkyvämpi */
.hero-visual { position: relative; }
.hero .bg-photo--hero-main { left: 34%; }
.hero .bg-photo--hero-main img {
  opacity: .92;
  object-position: center 10%;
  filter: grayscale(.25) saturate(.9) brightness(.9) contrast(1.1);
}
/* Vihreä sävytys värikerroksella, jotta siniset kaapelit taittuvat sivuston väreihin */
.hero .bg-photo--hero-main::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: #1a422f; mix-blend-mode: color; opacity: .65;
}
.hero .bg-photo--hero-main::after {
  z-index: 2;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(2, 17, 12, .72) 20%, rgba(2, 17, 12, .25) 50%, rgba(2, 17, 12, .12) 100%),
    linear-gradient(180deg, rgba(2, 17, 12, .55) 0%, rgba(2, 17, 12, 0) 22%, rgba(2, 17, 12, 0) 70%, var(--bg) 100%);
}
.hero-diagram {
  position: relative; z-index: 3;
  width: 100%; max-width: 440px; margin-left: auto;
  padding: 14px 16px 10px;
  border-radius: 18px;
  background: rgba(4, 20, 14, .66);
  border: 1px solid rgba(243, 235, 214, .12);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
}
@media (max-width: 979px) {
  .hero .bg-photo--hero-main { left: 0; }
  .hero .bg-photo--hero-main img { opacity: .45; }
  .hero .bg-photo--hero-main::after {
    background: linear-gradient(180deg, rgba(2, 17, 12, .7) 0%, rgba(2, 17, 12, .55) 50%, var(--bg) 100%);
  }
  .hero-diagram { margin: 0 auto; }
}

/* ---------- Osiot ---------- */
.section { position: relative; padding: 96px 0; }
@media (min-width: 768px) { .section { padding: 136px 0; } }

.section-head { margin-bottom: 56px; max-width: 760px; }
.section-head h2 { margin-bottom: 20px; }

/* ---------- Ongelma ---------- */
.problem { border-top: 1px solid var(--line); }
.problem-list {
  display: grid; gap: 1px;
  grid-template-columns: 1fr;
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.problem-list li {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 26px 24px;
  background: var(--bg);
}
.problem-code {
  flex: none;
  font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--label);
  padding-top: 1px;
}
.problem-list p { color: var(--text-2); font-size: 1.02rem; }
@media (min-width: 640px) { .problem-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .problem-list li { padding: 32px 32px; } }

.callout {
  margin-top: 40px;
  padding: 28px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(26, 66, 47, .5), transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 820px;
}
.callout p { font-size: 1.1rem; color: var(--text-2); }
.callout strong { color: var(--text); font-weight: 600; }

/* ---------- Kartoitus ---------- */
.audit { background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(26, 66, 47, .55), transparent 70%), var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.audit-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(243, 235, 214, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.audit-layout { position: relative; display: grid; gap: 56px; align-items: start; }
@media (min-width: 1000px) { .audit-layout { grid-template-columns: 1fr 1.05fr; gap: 72px; } }

.audit-copy h2 { margin-bottom: 28px; }
.audit-copy > p:not([class]) { color: var(--text-2); font-size: 1.06rem; }
.audit-result {
  margin: 36px 0;
  padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(2, 17, 12, .5);
}
.check-list li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.check-list li:first-child { padding-top: 0; }
.check-list li:last-child { padding-bottom: 0; border-bottom: 0; }

/* Järjestelmäkartta */
.sysmap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #051710;
  padding: 28px 22px;
}
@media (min-width: 640px) { .sysmap { padding: 36px 32px; } }

.sysmap-chain {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 0;
  margin: 12px 0 28px;
}
@media (min-width: 560px) {
  .sysmap-chain { grid-template-columns: repeat(6, 1fr); }
  .sysmap-chain::before {
    content: ""; position: absolute; left: 8%; right: 8%; top: 36px;
    height: 1px; background: var(--line-2);
  }
}
.chain-node {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 8px 0 14px;
  font: 500 .85rem/1 var(--font);
  color: var(--text-3);
  background: none; border: 0;
  cursor: pointer;
  transition: color .2s;
}
.chain-icon {
  position: relative;
  display: grid; place-items: center;
  height: 56px; padding: 0 8px;
  background: #051710;
}
.chain-icon svg { width: 52px; height: 52px; opacity: .45; transition: opacity .2s, transform .2s var(--ease); }
.chain-node:hover { color: var(--text-2); }
.chain-node:hover svg { opacity: .75; }
.chain-node.is-active { color: var(--text); }
.chain-node.is-active svg { opacity: 1; }
.chain-node::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 18px; height: 2px; margin-left: -9px;
  background: var(--accent);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.chain-node.is-active::after { transform: scaleX(1); }

.sysmap-panel { padding-top: 24px; border-top: 1px solid var(--line); min-height: 210px; }
.panel-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.panel-title h3 { font-size: 1.35rem; }
.panel-sub { color: var(--text-3); font-size: .9rem; }
.panel-list { display: grid; gap: 0 24px; }
@media (min-width: 560px) { .panel-list { grid-template-columns: 1fr 1fr; } }
.panel-list li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: .96rem;
}
.panel-list.is-swapping { animation: swap .35s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(4px); } }

.sysmap-note { margin: 24px 0 0; font-size: .88rem; color: var(--text-3); }

/* ---------- Palvelut ---------- */
.service-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 30px 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 66, 47, .28), rgba(26, 66, 47, .06));
  transition: border-color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}
.service-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.service-card h3 { margin-bottom: 4px; font-size: 1.35rem; }
.service-card p:not([class]) { color: var(--text-2); font-size: .98rem; }
.service-sub { font-size: .88rem; color: var(--text-3); margin-bottom: 16px; }
.service-num {
  position: absolute; top: 28px; right: 28px;
  font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--label);
}
.service-icon {
  width: 52px; height: 52px; margin-bottom: 28px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: rgba(2, 17, 12, .5);
}
.service-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--cream); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.service-featured { border-color: rgba(140, 196, 162, .25); background: linear-gradient(160deg, rgba(26, 66, 47, .55), rgba(26, 66, 47, .35)); }
.service-featured .service-icon { border-color: rgba(140, 196, 162, .35); }
.service-featured .service-icon svg { stroke: var(--accent); }
.service-link {
  margin-top: auto; padding-top: 16px;
  font-weight: 600; font-size: .93rem; text-decoration: none; color: var(--text);
}
.service-link span { display: inline-block; transition: transform .2s var(--ease); }
.service-link:hover span { transform: translateX(4px); }

.service-cta {
  justify-content: space-between; gap: 24px;
  background: transparent;
  border-style: dashed; border-color: var(--line-2);
}
.service-cta h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 500; }
.service-cta .btn { align-self: flex-start; }
.service-cta .mono-label { margin-bottom: 0; }
.service-cta:hover { transform: none; }

/* ---------- Miksi Ydio ---------- */
.why { border-top: 1px solid var(--line); }
.why-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.why-item { padding-top: 28px; border-top: 1px solid var(--line-2); }
.why-item h3 { font-size: 1.5rem; margin-bottom: 12px; }
.why-item p { color: var(--text-2); }
.why-visual { height: 64px; margin-bottom: 28px; }
.why-visual svg { height: 100%; width: auto; overflow: visible; }
.why-visual svg * { fill: none; stroke: var(--text-3); stroke-width: 1.4; }
.why-visual .ordered rect, .why-visual rect.fill { fill: var(--accent-dim); stroke: var(--accent); }
.why-visual .scatter circle { fill: var(--text-3); stroke: none; }
.why-visual circle.fill { fill: var(--accent); stroke: none; }
.why-visual .arrow { stroke: var(--accent); }
.why-visual .base { stroke: var(--line-2); }
.why-visual .bus-line { stroke: var(--line-2); stroke-dasharray: 2 4; }
.why-visual .pulse-line { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 10 60; animation: whyPulse 2.8s linear infinite; }
@keyframes whyPulse { from { stroke-dashoffset: 60; } to { stroke-dashoffset: -10; } }

/* ---------- Minusta ---------- */
.about { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-layout { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .about-layout { grid-template-columns: 0.85fr 1fr; gap: 80px; } }

.about-photo { margin: 0; max-width: 460px; width: 100%; }
.about-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--surface);
}

.about-copy h2 { margin-bottom: 28px; }
.about-copy > p:not([class]) { color: var(--text-2); font-size: 1.05rem; }
.about-name { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.about-name strong { font-size: 1.15rem; color: var(--text); }
.about-name span { color: var(--text-3); font-size: .95rem; }
.skills { margin: 32px 0 36px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags li {
  font-size: .88rem; color: var(--text-2);
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px;
}

/* ---------- Yhteystiedot ---------- */
.contact-layout { display: grid; gap: 56px; align-items: start; }
@media (min-width: 1000px) { .contact-layout { grid-template-columns: 1fr 1.1fr; gap: 80px; } }
.contact-info h2 { margin-bottom: 20px; }
.contact-info .section-lead { margin-bottom: 40px; }

.contact-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-card > div { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.contact-card > div:last-child { border-bottom: 0; }
.contact-card dd { margin: 0; }
.contact-company { background: var(--olive); }
.contact-company strong { font-size: 1.2rem; letter-spacing: -0.02em; }
.contact-person dd { color: var(--text-3); }
.contact-person strong { color: var(--text); font-size: 1.05rem; }
.contact-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; }
.contact-row dt { font-size: .9rem; color: var(--label); }
.contact-row a { text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color .2s; word-break: break-word; }
.contact-row a:hover { border-color: var(--cream); }

.contact-form {
  align-self: start;
  padding: 28px 22px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(26, 66, 47, .45), rgba(10, 36, 24, .35));
}
@media (min-width: 640px) { .contact-form { padding: 36px; } }
.form-head { margin-bottom: 8px; }
.field-row { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field label { font-size: .88rem; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.optional { color: var(--text-3); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--text);
  padding: 13px 14px;
  background: rgba(2, 17, 12, .6);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { font-size: .8rem; color: var(--danger); min-height: 0; margin-top: 6px; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 8px; }
.btn-submit { min-width: 170px; }
.btn-submit[disabled] { opacity: .6; cursor: progress; }
.form-status { margin: 0; font-size: .92rem; color: var(--text-2); flex: 1 1 220px; }
.form-status.is-success { color: var(--text); }
.form-status.is-error { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; }
.footer-inner { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (min-width: 960px) { .footer-inner { grid-template-columns: 1.6fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px !important; color: var(--cream); }
.footer-logo strong { color: #fff; font-size: 1.25rem; letter-spacing: -0.03em; }
.footer-brand p:not(.footer-logo) { color: var(--text-3); max-width: 30em; }
.footer-contact { margin-top: 18px; line-height: 1.9; }
.footer-contact a, .footer-col a { color: var(--text-2); text-decoration: none; transition: color .2s; }
.footer-contact a:hover, .footer-col a:hover { color: var(--text); }
.footer-title { font-size: .875rem; font-weight: 500; color: var(--label); margin-bottom: 14px; }
.footer-col li { margin-bottom: 10px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 56px; padding-top: 24px;
  background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  font-size: .875rem; color: var(--text-3);
}
.footer-bottom p { margin: 0; }
.footer-domain { color: var(--text-3); text-decoration: none; }

/* ---------- Yleiset apuluokat ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link {
  display: inline-flex; gap: 8px; align-items: center;
  font-weight: 600; color: var(--text); text-decoration: none;
}
.text-link span { transition: transform .2s var(--ease); }
.text-link:hover span { transform: translateX(4px); }
.narrow { max-width: 760px; }

/* ---------- Esimerkkiraportti ---------- */
.report { border-top: 1px solid var(--line); }
.report-layout { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) { .report-layout { grid-template-columns: 1fr 1.25fr; gap: 72px; } }
.report-copy h2 { margin-bottom: 24px; }
.report-copy > p { color: var(--text-2); font-size: 1.06rem; }
.report-copy .text-link { margin-top: 32px; }

.def-list { margin-top: 28px; border-top: 1px solid var(--line); }
.def-list li { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.def-list strong { font-weight: 600; color: var(--text); }
.def-list span { color: var(--text-2); font-size: .96rem; }
.def-grid { display: grid; gap: 0 40px; margin-top: 56px; }
@media (min-width: 760px) { .def-grid { grid-template-columns: 1fr 1fr; } }

/* Paperiarkki: raportti tummalla pohjalla */
.report-sheet {
  --ink: #12211a;
  --ink-2: rgba(18, 33, 26, .62);
  --rule: rgba(18, 33, 26, .12);
  margin: 0;
  padding: 28px 22px 22px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 14px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65), 0 2px 6px rgba(0, 0, 0, .25);
  min-width: 0;
}
@media (min-width: 640px) { .report-sheet { padding: 36px 36px 28px; } }
.sheet-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.sheet-kicker { margin: 0 0 4px; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.sheet-title { margin: 0; font-size: .9rem; color: var(--ink-2); }
.sheet-head img { flex: none; align-self: flex-start; width: 22px; height: auto; }
.sheet-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px; margin: 16px 0 0; font-size: .82rem; }
.sheet-meta dt { color: var(--ink-2); }
.sheet-meta dd { margin: 0; font-weight: 500; }
@media (max-width: 520px) { .sheet-meta { grid-template-columns: 1fr 1fr; } }
.sheet-stats { display: grid; grid-template-columns: repeat(2, 1fr); margin: 22px 0; border: 1px solid var(--rule); border-radius: 8px; }
@media (min-width: 560px) { .sheet-stats { grid-template-columns: repeat(4, 1fr); } }
.sheet-stats li { padding: 14px 12px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.sheet-stats li:nth-child(2n) { border-right: 0; }
@media (min-width: 560px) {
  .sheet-stats li { border-bottom: 0; }
  .sheet-stats li:nth-child(2n) { border-right: 1px solid var(--rule); }
  .sheet-stats li:last-child { border-right: 0; }
}
.sheet-stats strong { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.sheet-stats span { display: block; margin-top: 4px; font-size: .78rem; line-height: 1.35; color: var(--ink-2); }
.sheet-table-wrap { overflow-x: auto; margin-top: 18px; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.sheet-table caption { text-align: left; font-weight: 600; font-size: .9rem; padding-bottom: 8px; }
.sheet-table th { text-align: left; font-weight: 500; color: var(--ink-2); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.sheet-table td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.sheet-table td.mono, .sheet-table td:has(.risk) { white-space: nowrap; }
.sheet-table .mono { font-family: var(--mono); font-size: .76rem; }
.sheet-table .missing { color: #9a3b22; font-weight: 500; }
@media (max-width: 560px) { .sheet-table .col-ip, .sheet-table .col-type { display: none; } }
.sheet-findings { margin-top: 18px; }
.sheet-findings li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.sheet-findings strong { display: block; font-size: .92rem; }
.sheet-findings span:not(.risk) { display: block; font-size: .84rem; color: var(--ink-2); }
.report-sheet figcaption { margin-top: 16px; font-size: .76rem; color: var(--ink-2); }
.risk { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.risk-high { background: #f0d3c8; color: #8a2f18; }
.risk-mid  { background: #efe0bd; color: #6a4a0e; }
.risk-low  { background: #d6e6da; color: #1f4d33; }
.report-pair { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1100px) { .report-pair { grid-template-columns: 1.15fr 1fr; } }

/* ---------- Näin yhteistyö etenee ---------- */
.process { margin: 0 0 40px; counter-reset: step; }
.process li { position: relative; display: flex; gap: 18px; padding-bottom: 22px; }
.process li:not(:last-child)::before {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 1px; background: var(--line-2);
}
.process-num {
  flex: none; width: 31px; height: 31px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); font-size: .85rem; font-weight: 600; color: var(--text);
}
.process h3 { font-size: 1.02rem; margin: 4px 0 4px; }
.process p { color: var(--text-2); font-size: .95rem; margin: 0; }

/* ---------- UKK ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-layout { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .faq-layout { grid-template-columns: 1fr 1.5fr; gap: 80px; } .faq-head { position: sticky; top: calc(var(--header-h) + 32px); } }
.faq-head h2 { margin-bottom: 20px; }
.faq-head .section-lead { margin-bottom: 20px; }
.faq-list { border-top: 1px solid var(--line-2); }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item summary {
  position: relative;
  list-style: none; cursor: pointer;
  padding: 22px 44px 22px 0;
  font-size: 1.08rem; font-weight: 500; letter-spacing: -0.01em;
  transition: color .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2);
  transform: rotate(45deg); transition: transform .25s var(--ease), margin-top .25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:hover { color: #fff; }
.faq-item p { margin: 0 0 24px; padding-right: 44px; color: var(--text-2); }

/* ---------- Lomakkeen tietosuojahuomautus ---------- */
.form-privacy { margin: 18px 0 0; font-size: .85rem; color: var(--text-3); }
.form-privacy a { color: var(--text-2); }

/* ---------- Alasivut ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + 40px) 0 72px;
  border-bottom: 1px solid var(--line);
}
.page-hero::after {
  content: ""; position: absolute; z-index: -1; right: -10%; top: -20%;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle closest-side, rgba(26, 66, 47, .7), transparent);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); margin-bottom: 22px; }
.page-hero .lead { margin-bottom: 32px; }
.page-hero-inner { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .page-hero-inner { grid-template-columns: 1.3fr 1fr; gap: 64px; } }
.page-visual {
  padding: 32px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(5, 23, 16, .6);
}
.page-visual svg { width: 100%; height: auto; max-height: 260px; }
.page-hero-plain { padding-bottom: 48px; }
.legal-updated { font-size: .9rem; color: var(--text-3); }

.breadcrumb { margin-bottom: 36px; font-size: .9rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-3); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line-2); }
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

.detail-grid { display: grid; gap: 56px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.detail-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 24px; }
.lined-list { border-top: 1px solid var(--line-2); }
.lined-list li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 1.02rem; }
.callout-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 14px; }
.outcome { padding-top: 0; }

.steps { border-top: 1px solid var(--line); background: var(--bg-2); }
.steps-layout { display: grid; gap: 48px; align-items: start; }
@media (min-width: 960px) { .steps-layout { grid-template-columns: 1fr 1fr; gap: 80px; } }
.steps h2 { margin-bottom: 20px; }
.steps .section-lead { margin-bottom: 32px; }
.steps .process { margin: 0; }

.others { border-top: 1px solid var(--line); }
.other-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .other-grid { grid-template-columns: 1fr 1fr; } }
.other-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 22px 56px 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .2s, background .2s;
}
.other-card:hover { border-color: var(--line-2); background: rgba(26, 66, 47, .2); }
.other-card strong { font-weight: 600; }
.other-card span { color: var(--text-3); font-size: .92rem; }
.other-card .other-arrow { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-size: 1.1rem; }

.legal { padding-top: 56px; }
.legal h2 { font-size: 1.35rem; margin: 44px 0 14px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { list-style: disc; padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--text); }

/* ---------- Scroll-animaatiot ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

@media (min-width: 1000px) { .contact-form { position: sticky; top: calc(var(--header-h) + 24px); } }

/* ---------- Alasivujen tiivistys, esimerkit ja hyödyt ---------- */
.subpage .section { padding: 72px 0; }
@media (min-width: 768px) { .subpage .section { padding: 104px 0; } }
.subpage .detail + .section { border-top: 1px solid var(--line); }

.example-box {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(26, 66, 47, .22);
}
.example-box .mono-label { margin-bottom: 10px; }
.example-box p:last-child { color: var(--text-2); }

.benefit-grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .benefit-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.benefit { padding-top: 24px; border-top: 1px solid var(--line-2); }
.benefit-num { display: block; margin-bottom: 18px; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--label); }
.benefit h3 { font-size: 1.3rem; margin-bottom: 10px; }
.benefit p { color: var(--text-2); }
.benefits { border-top: 1px solid var(--line); }

/* ---------- Taustakuvat tummalla sävyfiltterillä ---------- */
.problem, .why, .contact, .audit { isolation: isolate; overflow: hidden; }
.bg-photo {
  position: absolute; inset: 0; z-index: -2;
  pointer-events: none;
}
.bg-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(.5) saturate(.8) brightness(.72) contrast(1.05);
}
/* Sävytys: emerald-pohjainen tummennus, jotta teksti pysyy luettavana */
.bg-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(2, 17, 12, .55) 22%, rgba(2, 17, 12, .55) 78%, var(--bg) 100%),
    linear-gradient(rgba(10, 36, 24, .55), rgba(10, 36, 24, .55));
  mix-blend-mode: normal;
}
.bg-photo--full img { opacity: .45; }
.audit .bg-photo::after {
  background:
    linear-gradient(180deg, var(--bg-2) 0%, rgba(5, 26, 18, .45) 25%, rgba(5, 26, 18, .45) 75%, var(--bg-2) 100%),
    linear-gradient(rgba(10, 36, 24, .4), rgba(10, 36, 24, .4));
}
/* Kuva toisella laidalla, häivytys tekstin puolelle */
.bg-photo--right { left: 35%; }
.bg-photo--left  { right: 45%; }
.bg-photo--right img, .bg-photo--left img { opacity: .8; }
.bg-photo--right { mask-image: linear-gradient(90deg, transparent, #000 45%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); }
.bg-photo--left  { mask-image: linear-gradient(270deg, transparent, #000 45%); -webkit-mask-image: linear-gradient(270deg, transparent, #000 45%); }
@media (max-width: 899px) {
  .bg-photo--right, .bg-photo--left { left: 0; right: 0; mask-image: none; -webkit-mask-image: none; }
  .bg-photo--right img, .bg-photo--left img { opacity: .3; }
}
/* Alasivujen hero */
.bg-photo--hero img { opacity: .5; }
.bg-photo--hero::after {
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(2, 17, 12, .75) 45%, rgba(2, 17, 12, .45) 100%),
    linear-gradient(180deg, transparent 60%, var(--bg) 100%);
}
/* Valmiiksi tummat kuvat: kevyempi filtteri */
.bg-photo--dark img { filter: grayscale(.35) saturate(.85) brightness(1.1) contrast(1.1); }
.audit .bg-photo img { opacity: .6; filter: grayscale(.5) saturate(.8) brightness(.8) contrast(1.05) blur(2px); transform: scale(1.03); }
