/* ==========================================================================
   Uit het atelier "Het atelier leeft"
   ========================================================================== */

.as-insta { padding-block: var(--section); background: var(--linnen); overflow: hidden; }
.as-insta__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 2rem 3rem; margin-bottom: clamp(36px, 4vw, 64px); }
.as-insta__head .as-h2 { margin-bottom: .3em; }
.as-insta__intro { max-width: 40ch; margin: 0; }

.as-insta__profile { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.2rem; }
@property --as-a { syntax: "<angle>"; inherits: false; initial-value: 210deg; }
.as-insta__avatar {
	display: block;
	width: 66px;
	height: 66px;
	padding: 3px;
	border-radius: 50%;
	background: conic-gradient(from var(--as-a), var(--mint), var(--roze), var(--zand), var(--mint));
	animation: as-ring-spin 8s linear infinite;
}
@keyframes as-ring-spin { to { --as-a: 570deg; } }
.as-insta__avatar-in {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--taupe);
	color: var(--wit);
	box-shadow: 0 0 0 2px var(--linnen);
}
.as-insta__avatar .as-mono { width: 62%; height: auto; }
.as-insta__who { min-width: 0; }
.as-insta__handle { display: block; font: 700 clamp(1.9rem, 2.4vw, 2.4rem)/1 var(--f-h2); letter-spacing: .02em; color: var(--kop); text-decoration: none; }
.as-insta__handle:hover { color: var(--roze-diep); }
.as-insta__meta { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: .3rem 0 0; font-size: .95rem; color: var(--taupe-diep); }
.as-insta__fresh { display: inline-flex; align-items: center; gap: .4rem; }
.as-insta__fresh::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--roze); animation: as-glow 2.4s var(--ease) infinite; }

/* Twee stromen */
.as-streams { display: grid; gap: clamp(12px, 1.4vw, 20px); }
.as-stream { overflow: hidden; }
.as-stream__track {
	display: flex;
	gap: clamp(12px, 1.4vw, 20px);
	width: max-content;
	animation: as-stream calc(var(--n) * 7s) linear infinite;
}
.as-stream--right .as-stream__track { animation-direction: reverse; }
.as-stream:hover .as-stream__track, .as-stream:focus-within .as-stream__track, .as-insta.is-paused .as-stream__track { animation-play-state: paused; }
@keyframes as-stream { from { transform: translateX(0); } to { transform: translateX(calc(-50% - clamp(12px, 1.4vw, 20px) / 2)); } }

.as-tile { flex: none; }
.as-stream--left .as-tile { width: clamp(220px, 21vw, 320px); aspect-ratio: 1; }
.as-stream--right .as-tile { width: clamp(180px, 16vw, 250px); aspect-ratio: 4 / 5; }
.as-tile__btn {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 4px;
	overflow: hidden;
	background: var(--kiezel);
	cursor: zoom-in;
	transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.as-tile__btn img, .as-tile__btn video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.as-tile__btn video { opacity: 0; transition: opacity .4s; }
.as-tile__btn.is-playing video { opacity: 1; }
.as-tile__btn:hover, .as-tile__btn:focus-visible { transform: scale(1.04); box-shadow: 0 24px 40px -24px rgba(59, 52, 45, .7); z-index: 2; }
.as-tile__caption {
	position: absolute;
	inset: auto 0 0;
	padding: 2.6rem 1rem 1rem;
	background: linear-gradient(0deg, rgba(40, 34, 28, .85), rgba(40, 34, 28, 0));
	color: var(--wit);
	font-size: .92rem;
	line-height: 1.4;
	text-align: left;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .4s, transform .4s var(--ease);
}
.as-tile__btn:hover .as-tile__caption, .as-tile__btn:focus-visible .as-tile__caption { opacity: 1; transform: none; }
.as-tile__play {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
}
.as-tile__play::after { content: ""; position: absolute; left: 11px; top: 9px; width: 10px; height: 12px; background: var(--kop); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.as-tile__btn.is-playing .as-tile__play { opacity: 0; }

/* Venster */
.as-igbox {
	width: min(1100px, calc(100vw - 32px));
	max-height: calc(100svh - 32px);
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: var(--wit);
	color: var(--tekst);
	box-shadow: 0 40px 120px -30px rgba(40, 34, 28, .6);
	overflow: hidden;
}
.as-igbox::backdrop { background: rgba(59, 52, 45, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.as-igbox[open] { animation: as-qv-in .5s var(--ease); }
.as-igbox__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); max-height: calc(100svh - 32px); }
.as-igbox__media { position: relative; min-height: 360px; background: var(--kop); display: grid; place-items: center; touch-action: pan-y; }
.as-igbox__media img, .as-igbox__media video { width: 100%; height: 100%; max-height: calc(100svh - 32px); object-fit: contain; }
.as-igbox__info { display: flex; flex-direction: column; gap: 1rem; padding: clamp(28px, 4vw, 48px); padding-top: 72px; overflow-y: auto; }
.as-igbox__when { margin: 0; font: 400 1.1rem/1 var(--f-h1); letter-spacing: .08em; color: var(--taupe-diep); }
.as-igbox__when:empty { display: none; }
.as-igbox__caption { margin: 0; white-space: pre-line; font-size: 1.05rem; }
.as-igbox__caption:empty { display: none; }
.as-igbox__info .as-btn { align-self: flex-start; }
.as-igbox .as-igbox__nav { display: grid; top: 16px; bottom: auto; transform: none; }
.as-igbox .as-qv__nav--prev { left: 16px; }
.as-igbox .as-qv__nav--next { left: 68px; right: auto; }

@media (max-width: 799px) {
	.as-igbox { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; border-radius: 0; }
	.as-igbox__inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; height: 100%; max-height: 100svh; overflow-y: auto; }
	.as-igbox__media { min-height: 0; aspect-ratio: 1; }
	.as-igbox__info { padding-top: 24px; }
	.as-igbox .as-igbox__nav { bottom: auto; top: calc(100vw - 60px); }
}

@media (prefers-reduced-motion: reduce) {
	.as-stream { overflow-x: auto; scrollbar-width: none; }
	.as-stream__track { animation: none; padding-inline: var(--gutter); }
	.as-stream__track [aria-hidden="true"] { display: none; }
	.as-insta__avatar { animation: none; }
}
