/* =========================================================================
   Regner - realizacje (0.1.0-alpha8): akordeon (strona główna + archiwum), case study, galeria.
   ========================================================================= */

/* ---------- Akordeon realizacji ---------- */
.rgn-acc { list-style: none; margin: 0; padding: 0; display: flex; gap: .625rem; height: 36.25rem; }
.rgn-acc__item {
	position: relative; flex: 1 1 0; min-width: 4.5rem; border-radius: 22px; overflow: hidden; background: #000; color: #fff;
	transition: flex .6s cubic-bezier(.65, 0, .35, 1);
}
.rgn-acc__item.is-open { flex: 8 1 0; }
.rgn-acc__item[hidden] { display: none; }
.rgn-acc__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rgn-acc__shade { position: absolute; inset: 0; background: rgba(29, 29, 27, .55); transition: background .6s ease; }
.rgn-acc__item.is-open .rgn-acc__shade { background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.85) 100%); }
.rgn-acc__bar {
	position: absolute; inset: 0; z-index: 2; width: 100%;
	border: 0; background: transparent; color: #fff; cursor: pointer;
	display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 1.375rem 0;
}
.rgn-acc__bar:focus-visible { outline: 3px solid #fff; outline-offset: -6px; border-radius: 22px; }
.rgn-acc__no { font: 600 1.25rem var(--rgn-font-h); color: var(--rgn-red); }
.rgn-acc__name, .rgn-acc__bar .rgn-tag { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.rgn-acc__name { font: 600 1.0625rem var(--rgn-font-h); text-transform: uppercase; max-height: 22rem; overflow: hidden; text-overflow: ellipsis; }
.rgn-acc__item.is-open .rgn-acc__bar { visibility: hidden; }
.rgn-acc__panel {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
	padding: 2rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
	opacity: 0; visibility: hidden; transform: translateY(12px);
	transition: opacity .4s ease .2s, transform .4s ease .2s, visibility 0s linear .6s;
}
.rgn-acc__item.is-open .rgn-acc__panel { opacity: 1; visibility: visible; transform: none; transition-delay: .25s, .25s, 0s; }
.rgn-acc__title { margin: .75rem 0 0; font-size: clamp(1.75rem, 3.2vw, 2.875rem); line-height: 1.05; color: #fff; }
.rgn-acc__meta { margin: .75rem 0 0; color: #E4E4E2; }
.rgn-acc__all { margin: 1.25rem 0 0; }
@media (max-width: 900px) {
	.rgn-acc { flex-direction: column; height: auto; }
	.rgn-acc__item { flex: none; min-height: 4.5rem; transition: min-height .5s ease; }
	.rgn-acc__item.is-open { flex: none; min-height: 26rem; }
	.rgn-acc__bar { flex-direction: row; padding: 0 1.25rem; gap: 1rem; justify-content: flex-start; }
	.rgn-acc__name, .rgn-acc__bar .rgn-tag { writing-mode: horizontal-tb; transform: none; }
	.rgn-acc__bar .rgn-tag { margin-left: auto; }
	.rgn-acc__name { font-size: 1rem; max-width: 60%; }
	.rgn-acc__panel { flex-direction: column; align-items: flex-start; padding: 1.25rem; }
}


/* ---------- Archiwum ---------- */
.rgn-projects__h1 { font-size: clamp(2.25rem, 4.6vw, 3.25rem); line-height: 1.05; letter-spacing: -.025em; margin: .875rem 0 0; }
.post-type-archive-realizacje .rgn-projects { padding-top: clamp(2.5rem, 6vw, 4.5rem); }

/* ---------- Pas kontaktu ---------- */
.rgn-pcta-wrap { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(4rem, 8vw, 6.5rem); }
.rgn-pcta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
	padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.5rem, 4vw, 3rem); border-radius: 24px; background: var(--rgn-red); color: #fff;
}
.rgn-pcta__t { margin: 0; font: 600 clamp(1.5rem, 2.6vw, 2rem)/1.05 var(--rgn-font-h); letter-spacing: -.02em; }
.rgn-pcta__btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.rgn-pcta__btn { background: #1D1D1B; color: #fff; }
.rgn-pcta__btn:hover { background: #000; color: #fff; }
.rgn-pcta__btn--out { background: transparent; border-color: rgba(255, 255, 255, .6); }
.rgn-pcta__btn--out:hover { background: transparent; border-color: #fff; }
.rgn-pcta .rgn-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- Case study ---------- */
.rgn-case__hero { position: relative; min-height: clamp(26rem, 44vw, 40rem); display: flex; align-items: flex-end; overflow: hidden; background: #000; color: #fff; }
.rgn-case__hero.is-noimg { min-height: 0; background: var(--rgn-bg); color: var(--rgn-ink); padding-top: 2rem; }
.rgn-case__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rgn-case__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29, 29, 27, .25) 0%, rgba(29, 29, 27, 0) 30%, rgba(29, 29, 27, .92) 88%, var(--rgn-bg) 100%); }
.rgn-case__hero.is-noimg .rgn-case__shade { display: none; }
.rgn-case__head { position: relative; width: 100%; padding-block: 3rem 3.5rem; }
.rgn-case__hero:not(.is-noimg) .rgn-kick { color: #fff; }
.rgn-case__crumbs { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .875rem; color: #E4E4E2; }
.rgn-case__hero.is-noimg .rgn-case__crumbs { color: var(--rgn-muted); }
.rgn-case__crumbs a { color: inherit; text-decoration: none; }
.rgn-case__crumbs a:hover { text-decoration: underline; }
.rgn-case__head .rgn-kick { margin-top: 1.375rem; }
.rgn-case__title { margin: .875rem 0 0; font-size: clamp(2.5rem, 5.4vw, 4.6875rem); line-height: 1.05; letter-spacing: -.02em; color: inherit; }
.rgn-case__lead { margin: 1.125rem 0 0; max-width: 40rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: #E4E4E2; }
.rgn-case__hero.is-noimg .rgn-case__lead { color: var(--rgn-muted); }
html:not(.wk-dark) .rgn-case__hero:not(.is-noimg) .rgn-case__shade { background: linear-gradient(180deg, rgba(29, 29, 27, .25) 0%, rgba(29, 29, 27, 0) 30%, rgba(29, 29, 27, .9) 100%); }

.rgn-case__spec { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 1.5rem; margin: 0; padding: 1.75rem 2rem; }
.rgn-case__spec dt { font-size: .8125rem; color: var(--rgn-muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.rgn-case__spec dd { margin: .375rem 0 0; font: 600 1.1875rem/1.25 var(--rgn-font-h); display: flex; flex-wrap: wrap; gap: .25rem .875rem; }
.rgn-case__color { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.0625rem; }
.rgn-dot { width: 1rem; height: 1rem; flex: none; border-radius: 50%; background: var(--sw, transparent); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 0 0 1px var(--rgn-line-strong); }
.rgn-dot.is-empty { background: transparent; box-shadow: inset 0 0 0 1px var(--rgn-line-strong); }

.rgn-case__body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); padding-top: clamp(3rem, 6vw, 5rem); align-items: start; }
.rgn-case__body.is-single { grid-template-columns: minmax(0, 48rem); }
.rgn-case__text { padding: 0; }
.rgn-case__text h2 { margin-top: 1.6em; }
.rgn-case__text > h2:first-child { margin-top: 0; }
.rgn-case__aside { display: grid; gap: 1.25rem; }
.rgn-case__quote { margin: 0; padding: 2rem; }
.rgn-case__q { color: var(--rgn-red); fill: currentColor; }
.rgn-case__quote blockquote { margin: 1rem 0 0; }
.rgn-case__quote blockquote p { margin: 0; font-size: 1.3125rem; line-height: 1.5; }
.rgn-case__quote figcaption { display: flex; align-items: center; gap: .875rem; margin-top: 1.5rem; }
.rgn-case__quote figcaption > span { display: flex; flex-direction: column; }
.rgn-case__quote .rgn-muted { font-size: .875rem; }
.rgn-case__logo { width: 3.25rem; height: 3.25rem; object-fit: contain; border-radius: 14px; background: var(--rgn-surface-2); padding: .25rem; }
.rgn-case__prods { padding: 1.5rem; }
.rgn-kick--sm { font-size: .8125rem; }
.rgn-case__prods ul { list-style: none; margin: .875rem 0 0; padding: 0; display: grid; gap: .75rem; }
.rgn-case__prods li { display: flex; align-items: center; gap: .75rem; }
.rgn-case__pname { flex: 1; }
.rgn-case__prods a { font-weight: 600; color: var(--rgn-ink); text-decoration-color: var(--rgn-red); text-underline-offset: 3px; white-space: nowrap; }

.rgn-case__gal { padding-top: clamp(3.5rem, 7vw, 5.5rem); }
.rgn-gal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 14.375rem; grid-auto-flow: dense; gap: 1rem; }
.rgn-gal__item.is-big { grid-column: span 2; grid-row: span 2; }
.rgn-gal__item.is-wide { grid-column: span 2; }
.rgn-gal__btn { display: block; width: 100%; height: 100%; border-radius: 16px; overflow: hidden; background: #000; cursor: zoom-in; }
.rgn-gal__btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--rgn-ease); }
.rgn-gal__btn:hover img { transform: scale(1.04); }
.rgn-gal__btn:focus-visible { outline: 3px solid var(--rgn-focus); outline-offset: 3px; }

.rgn-case__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; padding-top: clamp(3.5rem, 7vw, 5.5rem); }
.rgn-case__adj { display: flex; align-items: center; gap: 1.125rem; padding: 1.125rem; color: var(--rgn-ink); text-decoration: none; transition: border-color .2s ease; }
.rgn-case__adj:hover { border-color: var(--rgn-ink); color: var(--rgn-ink); }
.rgn-case__adj.is-next { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.rgn-case__adj img { width: 7.5rem; height: 5.25rem; object-fit: cover; border-radius: 12px; flex: none; }
.rgn-case__adj span span { display: block; font-size: .875rem; }
.rgn-case__adj strong { font: 600 1.0625rem/1.2 var(--rgn-font-h); text-transform: uppercase; }

/* ---------- Powiększenie ---------- */
.rgn-lb { position: fixed; inset: 0; z-index: 200; background: rgba(8, 8, 8, .94); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.125rem; padding: 4.5rem 2rem 2rem; }
.rgn-lb[hidden] { display: none; }
html.rgn-lb-open { overflow: hidden; }
.rgn-lb__top { position: absolute; top: 1.25rem; left: 1.5rem; right: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.rgn-lb__no { font: 700 1.25rem var(--rgn-font-h); }
.rgn-lb__btn { background: #262624; border-color: #3F3F3D; color: #fff; }
.rgn-lb__btn:hover { border-color: #fff; color: #fff; }
.rgn-lb__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.rgn-lb__stage { display: flex; align-items: center; gap: 1.25rem; width: 100%; max-width: 74rem; justify-content: center; }
.rgn-lb__arrow { width: 3.5rem; height: 3.5rem; }
.rgn-i--flip { transform: scaleX(-1); }
.rgn-lb__img { flex: 1; min-width: 0; max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: 16px; }
.rgn-lb__alt { margin: 0; font-size: .875rem; color: #9D9D9C; text-align: center; }

@media (max-width: 960px) {
	.rgn-case__spec { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 1.5rem; }
	.rgn-case__body { grid-template-columns: minmax(0, 1fr); }
	.rgn-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 10rem; }
	.rgn-case__nav { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.rgn-lb { padding-inline: .5rem; }
	.rgn-lb__arrow { position: absolute; bottom: 1.25rem; }
	.rgn-lb__arrow:first-child { left: 1.5rem; }
	.rgn-lb__arrow:last-child { right: 1.5rem; }
	.rgn-case__adj img { width: 5rem; height: 3.75rem; }
	.rgn-pcta__btns, .rgn-pcta__btn { width: 100%; }
}
