/* ==========================================================
   Putkiwuorio – tyylit
   Värit, fontit ja leveydet muutetaan :root-muuttujista.
   ========================================================== */

:root {
  --red: #e30f0f;
  --red-dark: #c40a0a;
  --black: #0a0a0a;
  --ink: #1a1a1a;
  --heading: #2b2b2b;
  --text: #444;
  --muted: #666;
  --line: #e6e6e6;
  --bg-soft: #f3f3f3;
  --font: 'Montserrat', Helvetica, Arial, sans-serif;
  --max: 1400px;
  --pad: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: #fff; font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--heading); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; text-wrap: balance; }
h2 { font-size: clamp(32px, 4vw, 56px); }
.pre { white-space: pre-line; }
.container { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.container--narrow { max-width: 1100px; }
.eyebrow { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.chev { font-weight: 700; }

/* Painikkeet */
.btn { display: inline-flex; align-items: center; gap: 24px; background: var(--red); color: #fff; padding: 14px 32px; font-size: clamp(17px, 1.5vw, 22px); border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--red-dark); color: #fff; }
.btn--dark { background: var(--ink); }
.btn--dark:hover { background: var(--red); }
.btn-outline { align-self: flex-start; border: 1px solid var(--ink); background: transparent; padding: 12px 20px; font: 600 15px var(--font); cursor: pointer; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* Yläpalkki */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); }
.site-header__inner { max-width: var(--max); margin: 0 auto; padding: 12px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header__logo img { height: 64px; width: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 40px; margin: 0; padding: 0; list-style: none; }
.main-nav li { position: relative; }
.main-nav > ul > li > a { display: flex; align-items: center; gap: 10px; padding: 12px 0; color: #fff; font-size: 17px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.main-nav > ul > li.has-children > a::after { content: '▼'; font-size: 11px; }
.main-nav > ul > li > a:hover, .main-nav > ul > li.is-active > a { color: var(--red); }
.main-nav__instagram a { font-size: 14px !important; color: #bbb !important; text-transform: none !important; }
.sub-menu { display: none; position: absolute; top: 100%; left: -20px; min-width: 260px; background: var(--black); margin: 0; padding: 8px 0 12px; list-style: none; }
.sub-menu a { display: block; padding: 10px 20px; color: #fff; font-size: 16px; }
.sub-menu a:hover { color: var(--red); }
.has-children:hover > .sub-menu, .has-children:focus-within > .sub-menu { display: block; }
.menu-toggle { display: none; width: 48px; height: 48px; border: 1px solid #444; background: transparent; color: #fff; font-size: 18px; cursor: pointer; }

@media (max-width: 1000px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--black); border-top: 1px solid #222; max-height: 80vh; overflow: auto; }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li > a { padding: 16px 24px; border-bottom: 1px solid #222; }
  .main-nav > ul > li.has-children > a::after { content: none; }
  .sub-menu { display: block; position: static; min-width: 0; padding: 0; }
  .sub-menu a { padding: 12px 24px 12px 44px; border-bottom: 1px solid #222; color: #ccc; }
  .main-nav__instagram a { padding: 16px 24px !important; }
}

/* Hero */
.hero { position: relative; min-height: 46vh; display: flex; align-items: flex-end; background: var(--ink); overflow: hidden; }
.hero--large { min-height: 78vh; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .42); }
.hero__inner { position: relative; z-index: 1; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--pad) 96px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 40px; }
.hero__eyebrow { color: #fff; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.hero__title { color: #fff; font-size: clamp(34px, 5vw, 80px); line-height: 1.05; max-width: 1200px; }
.page-title { padding-top: 96px; padding-bottom: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.page-title h1 { font-size: clamp(44px, 7vw, 96px); line-height: 1; padding-bottom: 32px; border-bottom: 2px solid var(--ink); width: 100%; }

/* Johdanto */
.intro { padding-top: 104px; padding-bottom: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px 80px; }
.intro h2 { font-size: clamp(36px, 5vw, 64px); }
.intro__body { display: flex; flex-direction: column; gap: 18px; font-size: 18px; text-wrap: pretty; }
.intro__body .btn { align-self: flex-start; margin-top: 8px; }
.lead { font-size: 22px; line-height: 1.5; color: var(--ink); font-weight: 500; }

/* Tilastot */
.stats { padding-bottom: 104px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stats::before { content: ''; grid-column: 1 / -1; border-top: 2px solid var(--ink); }
.stat { padding: 28px 24px 20px 0; border-bottom: 1px solid var(--line); }
.stat__value { font-size: clamp(48px, 5vw, 72px); font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Palvelukortit */
.cards { background: var(--ink); padding: 104px 0; }
.cards h2 { color: #fff; margin-bottom: 56px; }
.cards__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 40px 32px; }
.card { display: flex; flex-direction: column; gap: 20px; }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; background: #2a2a2a; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { color: #fff; font-size: 24px; }
.card p { color: #bdbdbd; flex: 1; }
.card__link { align-self: flex-start; color: #ff4a4a; font-weight: 600; border-bottom: 1px solid currentColor; }
.card__link:hover { color: #fff; }

/* Kuvabanneri */
.banner { padding-top: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.banner__half { position: relative; min-height: 440px; overflow: hidden; }
.banner__half > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner__half--dark { background: var(--ink); display: flex; align-items: center; justify-content: center; }
.banner__half--dark::after { content: ''; position: absolute; inset: 0; background: rgba(10, 10, 10, .6); }
.banner__half--red { background: var(--red); }
.banner__half--red::after { content: ''; position: absolute; inset: 0; background: rgba(235, 40, 40, .62); }
.banner__content { position: relative; z-index: 1; padding: 48px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; color: #fff; font-size: clamp(18px, 1.8vw, 28px); }
.banner__content h2 { color: #fff; font-size: clamp(36px, 4.4vw, 64px); }

/* Numeroitu lista */
.steps { padding-top: 96px; padding-bottom: 96px; }
.steps__img { aspect-ratio: 16 / 7; overflow: hidden; margin-bottom: 48px; }
.steps__img img { width: 100%; height: 100%; object-fit: cover; }
.steps h2 { font-size: clamp(34px, 4.2vw, 64px); }
.steps__intro { margin-top: 24px; font-size: 19px; }
.steps__list { list-style: none; margin: 56px 0 48px; padding: 0; display: flex; flex-direction: column; gap: 44px; }
.steps__list h3 { font-size: clamp(24px, 2.6vw, 38px); font-weight: 400; letter-spacing: .03em; margin-bottom: 12px; }
.steps__list p { font-size: 18px; }
.steps__list ul { margin: 12px 0 0; padding-left: 22px; color: #555; }

/* Projektit */
.projects__title { text-align: center; padding: 88px var(--pad) 40px; }
.projects__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.project { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.project img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project:hover img { transform: scale(1.05); }
.project__label { position: absolute; right: 0; bottom: 14px; background: var(--red); color: #fff; padding: 12px 24px; font-size: clamp(16px, 1.4vw, 22px); display: flex; gap: 18px; align-items: center; }
.placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); background: repeating-linear-gradient(135deg, #e4e4e4 0 10px, #dadada 10px 20px); }

/* Kuva, teksti + kuva, galleria, lainaus */
.image-block { padding-top: 48px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 28px; }
.image-block > img { width: 100%; max-height: 720px; object-fit: cover; cursor: zoom-in; }
.image-block__caption { max-width: 820px; font-size: 18px; font-style: italic; }
.image-text { padding-top: 72px; padding-bottom: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 48px 80px; align-items: start; }
.image-text--reverse .image-text__img { order: -1; }
.image-text__text { display: flex; flex-direction: column; gap: 18px; font-size: 18px; text-wrap: pretty; }
.image-text__text h2 { margin-bottom: 8px; }
.image-text__text .btn { align-self: flex-start; }
.image-text__img { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.image-text__img img { cursor: zoom-in; }
.image-text__img figcaption { font-size: 14px; color: var(--muted); }
.gallery { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 28px; }
.gallery h3 { font-size: clamp(20px, 2.2vw, 28px); text-transform: none; letter-spacing: 0; max-width: 860px; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.gallery__grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }
.quote { padding-top: 72px; padding-bottom: 72px; }
.quote blockquote { margin: 0; padding-top: 32px; border-top: 2px solid var(--red); font-size: clamp(24px, 3vw, 36px); line-height: 1.35; font-weight: 600; color: var(--ink); text-wrap: pretty; }
.quote__author { margin-top: 20px; color: var(--muted); }

/* Tekstiosiot */
.sections { padding-top: 72px; padding-bottom: 72px; }
.sections > h2 { margin-bottom: 40px; }
.sections__item { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px 64px; border-top: 1px solid #d4d4d4; padding: 36px 0; }
.sections__item h2 { font-size: clamp(24px, 2.6vw, 34px); }
.sections__item > div { display: flex; flex-direction: column; gap: 20px; }
.sections__contact { background: var(--bg-soft); padding: 18px 20px; font-size: 15px; color: var(--ink); }
.sections--columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px; }
.sections--columns .sections__item { display: flex; flex-direction: column; gap: 16px; border-top: 2px solid var(--ink); padding: 24px 0 0; }
.sections--columns .sections__item h2 { font-size: 28px; }

/* Henkilöt */
.people { padding-top: 72px; padding-bottom: 72px; }
.people__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; border-top: 2px solid var(--ink); padding-top: 24px; margin-bottom: 40px; }
.people__head h2 { font-size: clamp(30px, 3.6vw, 46px); }
.people__note { font-size: 14px; color: var(--muted); }
.people__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 40px 24px; }
.people--single .people__grid { grid-template-columns: 1fr; }
.people--single .person__img { max-width: 320px; }
.person { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.person__img { aspect-ratio: 4 / 5; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.person__img img { width: 100%; height: 100%; object-fit: cover; }
.person__role { font-size: 13px; color: var(--red); line-height: 1.4; }
.person__name { font-size: 20px; font-weight: 600; color: var(--ink); line-height: 1.25; margin-bottom: 4px; }
.person a { word-break: break-all; }
.person__bio { margin-top: 8px; font-size: 17px; max-width: 560px; }

/* Luettelo */
.list { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }
.list__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; border-top: 2px solid var(--ink); padding-top: 24px; }
.list__head h2 { font-size: clamp(28px, 3.4vw, 44px); }
.list__count { font-size: 14px; color: var(--muted); }
.list__text { font-size: 20px; font-weight: 600; color: var(--ink); }
.list__text a { color: var(--red); border-bottom: 1px solid currentColor; }
.list__subtitle { font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 12px; }
.list__items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 0 40px; }
.list__items li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
.list__items.is-collapsed li:nth-child(n+13) { display: none; }
.list__note { margin-top: 12px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; color: var(--ink); line-height: 1.35; }

/* Lomake */
.contact-form { background: var(--bg-soft); padding: 88px 0; }
.contact-form__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 40px 80px; }
.contact-form__inner > div:first-child { display: flex; flex-direction: column; gap: 16px; font-size: 18px; }
.contact-form form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.contact-form input, .contact-form textarea { border: 1px solid #bbb; background: #fff; padding: 12px 14px; font: 16px var(--font); }
.contact-form input { height: 48px; }
.contact-form textarea { resize: vertical; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form__foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.contact-form__foot a { border-bottom: 1px solid currentColor; }
.contact-form__thanks { background: #fff; padding: 32px; align-self: start; }
.contact-form__thanks strong { font-size: 22px; color: var(--ink); display: block; margin-bottom: 8px; }

/* Tulevaisuuden tekijä */
.future { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.future__text { background: var(--red); color: #fff; padding: clamp(72px, 9vw, 160px) clamp(24px, 7vw, 180px); display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.future__eyebrow { font-size: clamp(22px, 2.2vw, 36px); font-weight: 300; letter-spacing: .06em; text-transform: uppercase; }
.future h2 { color: #fff; font-size: clamp(38px, 4.6vw, 76px); letter-spacing: .06em; }
.future__img { position: relative; min-height: 420px; background: var(--line); }
.future__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1000px) { .future { grid-template-columns: 1fr; } }

/* Alatunniste */
.site-footer { padding: 96px 0 40px; font-size: 16px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 48px 40px; }
.site-footer__grid > div { display: flex; flex-direction: column; gap: 16px; }
.site-footer h4 { font-size: 22px; font-weight: 400; letter-spacing: .06em; color: var(--ink); }
.site-footer h4.mt { margin-top: 16px; }
.site-footer__brand { align-items: flex-start; }
.site-footer__brand > img { height: 110px; width: auto; }
.site-footer__badge { background: var(--ink); padding: 10px 14px; }
.site-footer__badge img { height: 48px; width: auto; }
.site-footer__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-footer__nav--red a { color: var(--red); }
.site-footer__nav--red a:hover { color: var(--ink); }
.site-footer a[href^="mailto"] { word-break: break-all; }
.site-footer__bottom { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Ylös-painike */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 56px; height: 56px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); color: #111; font-size: 30px; font-weight: 700; cursor: pointer; display: none; align-items: center; justify-content: center; }
.to-top.is-visible { display: flex; }
.to-top:hover { background: var(--red); color: #fff; }

/* Kuvan suurennus */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 19, .92); display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #bdbdbd; font-size: 13px; }
