/* Subpages (Reference, Technologie): groups in the same quiet rows as the values on the home page. */
.ref-hero { padding: clamp(150px, 18vw, 230px) 0 clamp(32px, 5vw, 64px); }
.ref-hero__title { font-size: clamp(2.6rem, 6vw, 5.2rem); margin: 0; }
.ref-hero__lead { margin: 1.4rem 0 0; max-width: 38em; color: var(--muted); font-size: 1.1rem; }

.ref-group { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.ref-group__head { position: sticky; top: calc(var(--chapters-top, 68px) + var(--chapters-h, 0px) + 28px); }
.ref-group__title { font-size: clamp(1.9rem, 3.2vw, 3rem); margin: 0; }
.ref-group__note { margin: .9rem 0 0; color: var(--muted); font-size: .95rem; max-width: 24em; }

.ref-group__image { display: block; width: 100%; max-width: 480px; height: auto; margin-top: clamp(20px, 3vw, 32px); border-radius: 8px; }

.ref-list { list-style: none; margin: 0; padding: 0; }
.ref-item { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 8px 40px; align-items: baseline; padding: clamp(18px, 2.2vw, 26px) 0; border-bottom: 1px solid var(--line); }
.ref-item:first-child { padding-top: 0; }
.ref-item h3 { margin: 0; font-size: clamp(1.2rem, 1.8vw, 1.55rem); line-height: 1.2; letter-spacing: -.02em; transition: color .6s var(--ease); }
.ref-item p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.55; transition: color .6s var(--ease); }
.ref-item:hover h3 { color: var(--accent-text); }
.ref-item:hover p { color: var(--text); }
.ref-item__tech { display: block; margin-top: .45em; font-family: var(--font-head); font-size: .8rem; letter-spacing: .1em; color: var(--accent-text); }

.ref-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 42%), 1fr)); column-gap: clamp(20px, 3vw, 40px); list-style: none; margin: 0; padding: 0; font-family: var(--font-head); font-size: 1.08rem; line-height: 1.25; letter-spacing: -.01em; }
.ref-places li { padding: 13px 0; border-bottom: 1px solid var(--line); }

/* The bar of chapters: floats right below the scrolled header, one row, sideways when it does not fit. */
:root { --chapters-top: 68px; --chapters-h: 50px; }
html { scroll-padding-top: calc(var(--chapters-top) + var(--chapters-h) + 18px); }
.site-header.is-scrolled { background: rgba(var(--bg-rgb), .97); }
.chapters { position: sticky; top: var(--chapters-top); z-index: 40; height: var(--chapters-h); background: rgba(var(--bg-rgb), .97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-block: 1px solid var(--line); }
.chapters .container { height: 100%; }
.chapters ul { display: flex; align-items: center; gap: clamp(16px, 1.9vw, 30px); height: 100%; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.chapters ul::-webkit-scrollbar { display: none; }
.chapters li { flex: none; }
.chapters a { position: relative; display: block; padding: 8px 0; color: var(--muted); font-family: var(--font-head); font-size: .84rem; letter-spacing: .02em; text-decoration: none; white-space: nowrap; transition: color .3s; }
.chapters a:hover, .chapters a[aria-current] { color: var(--text); }
.chapters a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.chapters a[aria-current]::after { transform: scaleX(1); }
.chapters .container::before, .chapters .container::after { content: ""; position: absolute; top: 0; bottom: 0; width: 36px; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 1; }
.chapters .container::before { left: var(--gutter); background: linear-gradient(90deg, rgb(var(--bg-rgb)), transparent); }
.chapters .container::after { right: var(--gutter); background: linear-gradient(-90deg, rgb(var(--bg-rgb)), transparent); }
.chapters.has-left .container::before, .chapters.has-right .container::after { opacity: 1; }
/* A group has its own space above the heading: after a jump the heading sits right under the bar. */
.ref-group { scroll-margin-top: calc(-1 * clamp(26px, 5vw, 66px)); }

.tech-systems { padding: clamp(56px, 8vw, 110px) 0 clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); scroll-margin-top: calc(-1 * clamp(30px, 5vw, 70px)); }
.tech-systems__head { margin-bottom: clamp(32px, 5vw, 64px); }
.tech-systems__lead { margin: clamp(18px, 2.4vw, 28px) 0 0; max-width: 40em; color: var(--muted); font-size: 1.1rem; }
.tech-systems__list { list-style: none; margin: 0; padding: 0; }
.tech-system { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); gap: 18px clamp(32px, 6vw, 96px); align-items: center; padding: clamp(24px, 3vw, 38px) 0; border-bottom: 1px solid var(--line); }
.tech-system__logo img { display: block; height: auto; width: calc(var(--logo) * .78px); max-width: 100%; }
.tech-system h3 { margin: 0 0 .45em; font-size: clamp(1.2rem, 1.8vw, 1.55rem); line-height: 1.2; letter-spacing: -.02em; }
.tech-system p { margin: 0; max-width: 46em; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.tech-systems__cta { margin: clamp(32px, 5vw, 56px) 0 0; }

.ref-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: clamp(28px, 4vw, 48px) 0 clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }

.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--text); }
.eyebrow__sep { margin: 0 .7em; opacity: .55; }
/* The dot in the menu means the page. Contact is only a place on the current page, so it never gets one. */
.nav ul a[href="#kontakt"]::after { display: none; }
@media (min-width: 1081px) { .nav ul a[href="#kontakt"].is-active:not(:hover) { opacity: .78; } }
/* Seven items must fit the open menu on a small phone too. */
@media (max-width: 1080px) and (max-height: 640px) { .nav { gap: 22px; } .nav ul { gap: 6px; } .nav ul a { font-size: 1.5rem; } }

.ref-next { display: grid; gap: clamp(20px, 3vw, 32px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.ref-next p { margin: 0; }
.ref-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 22px clamp(28px, 4vw, 56px); margin: 0; padding: 0; list-style: none; }
.ref-logos a { display: block; opacity: .8; transition: opacity .3s; }
.ref-logos a:hover { opacity: 1; }
.ref-logos img { display: block; height: auto; width: calc(var(--logo) * .55px); max-width: 100%; }
.ref-system__title { margin: clamp(14px, 2vw, 22px) 0 0; font-size: clamp(1.3rem, 2vw, 1.8rem); line-height: 1.2; }
.ref-item p a { color: var(--accent-text); }
.ref-item div > p + p { margin-top: .6em; }
.ref-hero--team .team-wrap { align-items: center; }

/* Projects: one structure for any amount of detail. List and detail side by side, an accordion on a phone. */
.proj-symbols { position: absolute; }
.proj-group { display: block; }
.proj-group__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: clamp(32px, 4.5vw, 64px); align-items: start; margin-bottom: clamp(24px, 3vw, 40px); }
.proj-group__head .ref-group__note { max-width: none; font-size: 1rem; }
.proj-group__head .ref-group__note + .ref-group__note { margin-top: .75em; }
.proj-group__head .ref-group__image { justify-self: end; max-width: 440px; margin-top: 0; border-radius: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(0deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(0deg, transparent, #000 12%, #000 88%, transparent); mask-composite: intersect; }
.proj-list { list-style: none; margin: 0; padding: 0; }
.proj__name { margin: 0; font: inherit; letter-spacing: normal; }
.proj__toggle { position: relative; display: grid; gap: 3px; width: 100%; padding: 14px 44px 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .3s; }
.proj__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.proj__title { font-family: var(--font-head); font-size: 1.08rem; line-height: 1.25; letter-spacing: -.01em; transition: color .3s; }
.proj__sub { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.proj__chevron { position: absolute; top: 50%; right: 16px; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .6; transition: transform .3s var(--ease); }
.proj__toggle:hover .proj__title { color: var(--accent-text); }
.proj.is-open .proj__toggle { border-bottom-color: var(--accent); }
.proj.is-open .proj__title { color: var(--accent-text); }
.proj__big { margin: 0; font-family: var(--font-head); font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.1; letter-spacing: -.02em; }
.proj__sub-big { margin: .35em 0 0; font-family: var(--font-head); font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.3; }
.proj__text { margin: .9em 0 0; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.proj__detail .proj__text + .proj__text { margin-top: .75em; }
.proj__h { display: flex; align-items: center; gap: 20px; margin: clamp(24px, 3vw, 34px) 0 16px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 400; line-height: 1.2; }
.proj__h::after { content: ""; flex: 1; height: 1px; background: rgba(var(--accent-rgb), .45); }
.proj-icon { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.proj-scope { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); row-gap: 22px; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.proj-scope li { margin-left: -1px; border-left: 1px solid var(--line); }
.proj-scope__item { display: grid; justify-items: center; align-content: start; gap: 6px; height: 100%; padding: 2px 8px; color: var(--text); text-align: center; text-decoration: none; }
.proj-scope .proj-icon { width: 34px; height: 34px; margin-bottom: 2px; }
.proj-scope strong { font-family: var(--font-head); font-size: 1.35rem; font-weight: 400; line-height: 1.1; }
.proj-scope span { font-size: .86rem; line-height: 1.3; transition: color .3s; }
a.proj-scope__item:hover span { color: var(--accent-text); }
a.proj-scope__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.proj-rows { margin: 0; border: 1px solid var(--line); border-radius: 10px; }
.proj-rows div { display: grid; grid-template-columns: 24px minmax(0, 7.5em) minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); }
.proj-rows div:first-child { border-top: 0; }
.proj-rows dt { font-family: var(--font-head); font-size: .95rem; }
.proj-rows dd { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.proj-tech { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 28px clamp(16px, 2.4vw, 32px); margin: 0; padding: 0; list-style: none; }
@media (max-width: 560px) { .proj-tech { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.proj-tech span { font-family: var(--font-head); font-size: 1.05rem; }
.proj-tech a, .proj-tech__logo { display: block; opacity: .85; transition: opacity .3s; }
.proj-tech a:hover { opacity: 1; }
.proj-tech img { display: block; height: auto; width: calc(var(--logo) * .5px); max-width: 100%; }
.js .proj__detail { display: none; }
.js .proj.is-open .proj__detail { display: block; }
.proj__detail { padding-bottom: 8px; }
.js .proj.is-open .proj__chevron { color: var(--accent); }
@media (min-width: 861px) {
	.js .proj-list { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1fr); grid-template-rows: repeat(var(--n), auto) 1fr; column-gap: clamp(32px, 4.5vw, 64px); align-items: start; }
	.js .proj { display: contents; }
	.js .proj__name { grid-column: 1; }
	.js .proj__detail { grid-column: 2; grid-row: 1 / -1; }
}
@media (max-width: 860px) {
	.js .proj.is-open .proj__chevron { transform: rotate(90deg); }
	.proj__detail { padding: 18px 0 26px; }
	.js .proj__big, .js .proj__sub-big { display: none; }
	.js .proj__text { margin-top: 0; }
	.js .proj__big + .proj__h, .js .proj__sub-big + .proj__h { margin-top: 0; }
	.proj-rows div { grid-template-columns: 24px minmax(0, 1fr); }
	.proj-rows dd { grid-column: 2; }
	.proj-group__head { grid-template-columns: minmax(0, 1fr); }
	.proj-group__head .ref-group__image { justify-self: stretch; max-width: none; margin-top: 16px; }
}

/* Link from the home page. */
.tech-more { margin: clamp(24px, 3vw, 40px) 0 0; text-align: center; }

@media (max-width: 860px) {
	.ref-group { grid-template-columns: minmax(0, 1fr); }
	.ref-group__head { position: static; }
	.ref-item { grid-template-columns: minmax(0, 1fr); }
	.ref-group__image { max-width: none; margin-top: 16px; }
	.tech-system { grid-template-columns: minmax(0, 1fr); }
}

/* Řešení and Technologie: the moving picture from the home page beside the header text. */
.ref-hero--art { padding-bottom: clamp(24px, 3vw, 48px); }
.ref-hero--art .section__head--tech { min-height: clamp(340px, 30vw, 460px); }
@media (min-width: 961px) {
	.ref-hero--art .ref-hero__title { max-width: 52%; font-size: clamp(2.6rem, 4.4vw, 4.2rem); }
	.ref-hero--art .ref-hero__lead { max-width: min(30em, 44%); }
}
