/* Kuka tämän tekee (/yritys/): the company page, on top of the shared public/ink.css (site/yritys.mjs).
   One mood (quiet, small subjects in a lot of space), on the paper since 2026-10-22: the photos lie on it like prints: an introduction, then photo sets and information in
   turn, never two sets in a row. Each set
   is shown together as one collection: a row of photos at the same height, in their own crops, close together, with
   the set's name small beneath. The snowstorm set is a pull-back (.is-moving, public/js/yritys.js, on big screens
   without reduced motion): pinned while you scroll, the barn opens from a small window around the barn to its whole
   frame, big in the middle, then shrinks into its place at the end of the row as the fence posts and the trees
   come up beside it. No text ever sits on a photo. No inline styles in the markup: the CSP forbids them (the
   script sets its values through CSSOM). */

:where(.yr main > *) { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 0 var(--gut); }
/* every set and every block of information is a screen of its own, its content in the middle, so only one thing
   is ever in view, whatever the screen's size */
.yr .yr-why, .yr .yr-craft, .yr .yr-eye, .yr .yr-facts, .yr .yr-on { min-height: 100svh; align-content: center; padding-top: 6rem; padding-bottom: 6rem; }
.yr .yr-winter, .yr .yr-wild, .yr .yr-dusk, .yr .yr-gold { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding: 6rem var(--gut); }
.yr-img { display: block; min-width: 0; max-width: 100%; height: auto; box-shadow: 0 0 0 1px rgba(29, 25, 26, .1), 0 1.2rem 2.4rem -1.6rem rgba(40, 25, 20, .45); }
.yr h2 { margin: 0; font-size: clamp(2.4rem, 4.2vw, 5rem); line-height: 1; font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }

/* 1. The introduction: her name, alone, bottom left */
.yr .yr-intro { display: flex; flex-direction: column; justify-content: flex-end; min-height: 62svh; padding-top: 8rem; padding-bottom: clamp(3rem, 8vh, 6rem); }
.yr h1 { margin: 0; font-size: clamp(3.4rem, 7.4vw, 9.4rem); line-height: .95; font-weight: 400; letter-spacing: -.012em; }
.yr-role { max-width: 34rem; margin: 1.4rem 0 0; color: var(--ink-2); font-size: clamp(1.05rem, 1.3vw, 1.35rem); line-height: 1.5; }

/* a set: one row, the same height, close together; its name small under the row, on the left */
.yr-row { --h: min(50svh, calc((100vw - 2 * var(--gut) - (var(--set-count, 3) - 1) * var(--set-gap)) / var(--sum))); --set-gap: clamp(.5rem, 1vw, 1rem);
  display: flex; justify-content: center; align-items: center; gap: var(--set-gap); }
.yr-row .yr-img { width: auto; height: var(--h); max-width: none; }
.yr-frame { width: fit-content; max-width: 100%; margin: 0 auto; }
.yr-frame figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; }
.yr-set-name, .yr-credit { color: var(--ink-3); font-size: .85rem; letter-spacing: .02em; }
.yr-storm .yr-row { --sum: 4.39; } /* the photos' widths over their heights, added up: 2.09 + 1.5 + 0.8 */
.yr-winter .yr-row { --sum: 4.5; }  /* 1.5 + 1.5 + 1.5 */
.yr-wild .yr-row { --sum: 3.17; } /* 0.67 + 1.25 + 1.25 */
.yr-dusk .yr-row { --sum: 3; --set-count: 2; flex-wrap: wrap; row-gap: var(--set-gap); } /* four, two by two */
.yr-dusk .yr-row { --h: min(38svh, calc((100vw - 2 * var(--gut) - var(--set-gap)) / 3)); display: grid; grid-template-columns: repeat(2, auto); } /* both rows on one screen, two wide */
.yr-gold .yr-row { --sum: 4.25; } /* 1.5 + 1.5 + 1.25 */

/* 2. The snowstorm set: shown as it is, or (moving) pinned while the view pulls back from the barn to the set */
.yr .yr-storm { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding: 6rem var(--gut); }
.yr.is-moving .yr-storm { position: relative; display: block; padding: 0; }
.yr.is-moving .yr-storm .yr-pin { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; height: 100svh; padding: 0 var(--gut); overflow: hidden; }
.yr.is-moving .yr-storm .yr-barn { position: relative; z-index: 1; will-change: transform; }
.yr.is-moving .yr-storm .yr-fence, .yr.is-moving .yr-storm .yr-trees, .yr.is-moving .yr-storm .yr-set-name { opacity: 0; }

/* why: one statement across the page. It lights up word by word as it is read (.is-lit-on, public/js/yritys.js):
   the words not yet reached wait in a dim grey, each turns white as the reading line passes it. Without the script,
   and with reduced motion, it is simply white */
.yr-why h2 { grid-column: 1 / 12; font-size: clamp(2.4rem, 5vw, 6.6rem); line-height: 1.02; letter-spacing: -.012em; text-wrap: pretty; }
.yr-lit.is-lit-on .yr-w { color: #a59c90; /* unlit, still readable on the paper (the text is 35px and up) */ transition: color .45s var(--ease); }
.yr-lit.is-lit-on .yr-w.is-lit { color: var(--ink); }

/* 3. The builder: the heading and what she works with on the right; the rest bottom left */
.yr-craft h2 { grid-column: 7 / 13; margin-bottom: 2.4rem; }
.yr-craft dl { grid-column: 7 / 13; margin: 0; border-bottom: 1px solid var(--line); }
.yr-craft dl > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: .3rem var(--gap); padding: 1rem 0; border-top: 1px solid var(--line); }
.yr-craft dt { font-weight: 500; font-size: 1.1rem; }
.yr-craft dd { margin: 0; color: var(--ink-2); line-height: 1.55; }
.yr-craft-more { grid-column: 1 / 6; grid-row: 1 / 4; align-self: end; }
.yr-stack { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem var(--gap); margin-top: 2.2rem; }
.yr-stack h3 { margin: 0 0 .5rem; color: var(--ink-3); font-size: .8rem; font-weight: 400; letter-spacing: .03em; }
.yr-stack ul { margin: 0; padding: 0; list-style: none; }
.yr-stack li { color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.yr-craft-more p { margin: 0 0 1.2rem; max-width: 28rem; line-height: 1.55; }
.yr-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.yr-links a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: .3em; }
.yr-links a:hover { color: var(--ink); text-decoration-color: var(--pink); }

/* 4. The other sets (winter, wildlife, silhouettes, gold): one row across the page each */

/* 5. The photographer's eye: the heading left, the text right */
.yr-eye h2 { grid-column: 1 / 6; }
.yr-eye-t { grid-column: 7 / 12; }
.yr-eye-t p { margin: 0 0 1rem; color: var(--ink-2); line-height: 1.6; }
.yr-eye-t p:nth-child(2) { color: var(--ink); }

/* 6. How we work: five screens, one rule each. Each is pinned to the top of the screen and the next slides up over
   it like a card laid on a stack; the one being covered dims (--dim, public/js/yritys.js). The heading stays in the
   corner the whole way, and each card has its number big and half off the edge, as on the front page's questions */
.yr .yr-how { display: block; padding: 0; }
.yr-how h2 { position: sticky; top: 0; z-index: 2; height: 0; overflow: visible; color: var(--ink-2); font-family: inherit; font-size: .95rem; font-weight: 400; letter-spacing: 0; transform: translateY(6rem); pointer-events: none; }
.yr-how ol { margin: 0; padding: 0; list-style: none; }
.yr-step { position: sticky; top: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-content: center; height: 100svh; padding: 0 var(--gut); overflow: hidden; background: var(--bg) url("/img/washi.webp") 0 0 / 1600px auto repeat; border-top: 1px solid var(--line-2); box-shadow: 0 -1.2rem 2.4rem -2rem rgba(40, 25, 20, .35); }
.yr-step:nth-child(even) { background: var(--bg) url("/img/washi.webp") 0 0 / 1600px auto repeat; }
.yr-step::after { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--bg); opacity: var(--dim, 0); pointer-events: none; }
.yr-step b { grid-column: 1 / 8; font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 8rem); font-weight: 400; line-height: .98; letter-spacing: -.012em; text-wrap: balance; }
.yr-step > span:not(.yr-step-n) { grid-column: 8 / 12; align-self: end; margin-bottom: .6em; color: var(--ink-2); font-size: clamp(1.05rem, 1.3vw, 1.35rem); line-height: 1.55; }
.yr-step-n { position: absolute; right: -.04em; bottom: -.2em; color: #e0e0da; font-family: var(--serif); font-size: clamp(14rem, 34vw, 44rem); font-weight: 400; line-height: 1; letter-spacing: -.045em; pointer-events: none; user-select: none; }
.yr-step:nth-child(even) .yr-step-n { color: #dadad3; }
.yr-step b, .yr-step > span:not(.yr-step-n) { position: relative; }

/* 7. The details: a quiet heading and four columns across the page */
.yr-facts h2 { grid-column: 1 / 13; margin-bottom: 2rem; font-size: clamp(1.8rem, 2.4vw, 2.8rem); letter-spacing: 0; }
.yr-facts dl { grid-column: 1 / 13; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.8rem var(--gap); margin: 0; }
.yr-facts dt { color: var(--ink-2); font-size: .85rem; margin-bottom: .3rem; }
.yr-facts dd { margin: 0; overflow-wrap: anywhere; }
.yr-facts a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: .25em; }
.yr-facts a:hover { text-decoration-color: var(--pink); }

/* 8. The way on: bottom right */
.yr-on > * { grid-column: 7 / 13; }
.yr-on p { margin: 1.2rem 0 2rem; color: var(--ink-2); }
.yr-on .ink-btn { justify-self: start; }

@media (max-width: 900px) {
  :where(.yr main > *) { display: block; }
  .yr .yr-intro { min-height: 88svh; }
  .yr-frame { width: 100%; }
  .yr-dusk .yr-row { display: flex; }
  .yr-row { flex-direction: column; gap: .6rem; }
  .yr-row .yr-img { width: 100%; height: auto; }
  .yr-craft h2 { margin-bottom: 2rem; }
  .yr-craft dl > div { grid-template-columns: 1fr; }
  .yr-craft-more { margin-top: 2.5rem; }
  .yr-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yr-eye h2 { margin-bottom: 1.6rem; }
  .yr .yr-why, .yr .yr-craft, .yr .yr-eye, .yr .yr-facts, .yr .yr-on, .yr .yr-winter, .yr .yr-wild, .yr .yr-dusk, .yr .yr-gold, .yr .yr-storm { min-height: 0; padding-top: 6rem; padding-bottom: 0; }
  .yr .yr-on { padding-bottom: 5rem; }
  .yr .yr-how { margin-top: 6rem; }
  .yr-step { display: flex; flex-direction: column; justify-content: center; gap: 1.6rem; }
  .yr-step b { font-size: clamp(2.3rem, 10vw, 3.4rem); }
  .yr-step > span:not(.yr-step-n) { margin: 0; }
  .yr-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yr-on .ink-btn { display: inline-block; }
}
@media (max-width: 480px) {
  .yr-facts .is-wide { grid-column: 1 / -1; }
}
