/* =========================================================
   Cutuka — Work Cases (cabeçalho, filtros, linha do tempo,
   lightbox e rodapé)
   ========================================================= */

/* ============================ PAGE HEAD ======================== */

.pagehead {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: clamp(24px, 5vw, 72px);
	align-items: start;
	padding: clamp(34px, 5.4vw, 72px) 0 clamp(34px, 4.4vw, 56px);
}

.pagehead__title {
	font-family: var(--font-curatorial);
	font-style: italic;
	font-weight: 500;
	text-transform: none;
	font-size: 80px;
	line-height: 0.92;
	letter-spacing: 0;
	color: var(--fg);
}

.pagehead__desc {
	font-family: var(--font-body);
	font-size: clamp(13px, 1vw, 15px);
	line-height: 1.55;
	color: var(--fg-muted);
	max-width: 54ch;
	text-wrap: pretty;
	padding-top: 8px;
}

/* ============================ CONTROLS ========================= */

.controls {
	display: flex;
	flex-direction: column;
	gap: clamp(18px, 2.4vw, 30px);
	padding: clamp(10px, 1.6vw, 22px) 0 clamp(30px, 4vw, 50px);
}

.controls__row { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px); }

.controls__label {
	flex: none;
	width: 64px;
	font-family: var(--font-display);
	font-size: var(--fs-eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--fg-muted);
}

.years {
	--year-accent: var(--c-wine);
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-family: var(--font-display);
	letter-spacing: 0.02em;
}

.years__item {
	font-family: var(--font-display);
	font-size: 13px;
	line-height: 1;
	letter-spacing: 0.02em;
	white-space: nowrap;
	padding: 10px 16px;
	border: 1px solid var(--pr-rule);
	border-radius: var(--r-pill);
	color: var(--fg);
	transition: color var(--dur-fast) var(--ease-dry),
		background var(--dur-fast) var(--ease-dry),
		border-color var(--dur-fast) var(--ease-dry);
}

.years__item:hover { background: rgba(31, 26, 24, 0.05); border-color: var(--fg-muted); }

.years__item.is-active {
	background: var(--year-accent);
	color: var(--ink-on-dark);
	border-color: var(--year-accent);
	font-weight: 500;
}

.years__item--soon { font-style: italic; }
.years__item--soon.is-active { color: var(--ink-on-dark); }
.years__sep { display: none; }

/* O invólucro do botão "limpar" não deve virar um item da grade. */
[data-cutuka-clear] { display: contents; }

.filters__clear {
	flex: none;
	margin-left: 12px;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-display);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hot);
	padding: 6px 12px;
	border: 1px solid var(--hot);
	border-radius: var(--r-pill);
	transition: background var(--dur-fast) var(--ease-dry), color var(--dur-fast) var(--ease-dry);
}

.filters__clear span { font-size: 14px; line-height: 0; }
.filters__clear:hover { background: var(--hot); color: var(--ink-on-dark); }

/* ============================ FILTERS ========================== */

.filters { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px); }
.filters__set { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; flex: 1; }

.filters__count {
	margin-left: auto;
	flex: none;
	white-space: nowrap;
	font-family: var(--font-display);
	font-size: var(--fs-eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--fg-muted);
}

/* —— pílulas (padrão) —— */
.chip {
	font-family: var(--font-display);
	font-size: 13px;
	line-height: 1;
	letter-spacing: 0.02em;
	white-space: nowrap;
	padding: 10px 16px;
	border: 1px solid var(--pr-rule);
	border-radius: var(--r-pill);
	color: var(--fg);
	transition: background var(--dur-fast) var(--ease-dry),
		color var(--dur-fast) var(--ease-dry),
		border-color var(--dur-fast) var(--ease-dry);
}

.chip:hover { background: rgba(31, 26, 24, 0.05); border-color: var(--fg-muted); }
.chip.is-active { background: var(--accent); color: var(--ink-on-dark); border-color: var(--accent); }

/* —— lista —— */
.filters--list .filters__set { gap: 0; }

.filters--list .chip {
	border: none;
	border-radius: 0;
	background: none;
	padding: 4px 14px;
	color: var(--fg-muted);
	position: relative;
}

.filters--list .chip:hover { background: none; color: var(--fg); }

.filters--list .chip + .chip::before {
	content: "·";
	position: absolute;
	left: -2px;
	color: var(--fg-dim);
}

.filters--list .chip.is-active { color: var(--accent); font-weight: 700; }

/* —— sublinhado —— */
.filters--underline .filters__set { gap: 0; }

.filters--underline .chip {
	border: none;
	border-radius: 0;
	background: none;
	padding: 6px 2px;
	margin-right: 20px;
	color: var(--fg-muted);
	border-bottom: 1.5px solid transparent;
}

.filters--underline .chip:hover { background: none; color: var(--fg); }
.filters--underline .chip.is-active { color: var(--fg); border-bottom-color: var(--accent); }

/* ============================ TIMELINE ========================= */

.timeline { padding-top: clamp(20px, 3vw, 36px); }
.yeargroup { margin-bottom: clamp(36px, 5vw, 72px); }
.yeargroup__head { display: flex; align-items: baseline; gap: 18px; }

.yeargroup__num {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(34px, 4.6vw, 64px);
	line-height: 0.9;
	letter-spacing: -0.03em;
	color: var(--c-wine);
}

.yeargroup__tag {
	font-family: var(--font-display);
	white-space: nowrap;
	font-size: var(--fs-eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--fg-muted);
}

.yeargroup--soon .yeargroup__num { color: var(--fg-dim); }

.rows { margin-top: clamp(8px, 1.4vw, 18px); }

.row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(220px, 1.05fr) minmax(190px, 0.82fr) minmax(300px, 1.3fr);
	align-items: start;
	padding: clamp(20px, 2.4vw, 30px) 0;
	border-top: 1px solid var(--pr-rule);
	transition: background var(--dur-fast) var(--ease-dry);
	cursor: pointer;
	color: inherit;
}

.rows .row:last-child { border-bottom: 1px solid var(--pr-rule); }
.row > * { position: relative; z-index: 1; }

.row::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	background-image: url("../img/anim/f00.png");
	opacity: 0;
	transition: opacity 260ms var(--ease-dry);
}

.row:hover::before,
.row:focus-visible::before {
	opacity: 0.3;
	animation: rowanim 2s step-end infinite alternate;
}

.row:hover,
.row:focus-visible { outline: none; }

@keyframes rowanim {
	0.00% { background-image: url("../img/anim/f00.png"); }
	5.88% { background-image: url("../img/anim/f01.png"); }
	11.76% { background-image: url("../img/anim/f02.png"); }
	17.65% { background-image: url("../img/anim/f03.png"); }
	23.53% { background-image: url("../img/anim/f04.png"); }
	29.41% { background-image: url("../img/anim/f05.png"); }
	35.29% { background-image: url("../img/anim/f06.png"); }
	41.18% { background-image: url("../img/anim/f07.png"); }
	47.06% { background-image: url("../img/anim/f08.png"); }
	52.94% { background-image: url("../img/anim/f09.png"); }
	58.82% { background-image: url("../img/anim/f10.png"); }
	64.71% { background-image: url("../img/anim/f11.png"); }
	70.59% { background-image: url("../img/anim/f12.png"); }
	76.47% { background-image: url("../img/anim/f13.png"); }
	82.35% { background-image: url("../img/anim/f14.png"); }
	88.24% { background-image: url("../img/anim/f15.png"); }
	94.12% { background-image: url("../img/anim/f16.png"); }
	100.00% { background-image: url("../img/anim/f17.png"); }
}

.row__title { padding-right: 24px; }

.row__name {
	font-family: var(--font-curatorial);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(25px, 2.9vw, 42px);
	line-height: 1.02;
	letter-spacing: 0;
	color: var(--fg);
	text-wrap: balance;
}

.row__year {
	display: inline-block;
	margin-top: 12px;
	font-family: var(--font-display);
	font-size: 11px;
	letter-spacing: 0.1em;
	color: var(--fg-muted);
}

.row__open {
	display: block;
	margin-top: 16px;
	font-family: var(--font-display);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hot);
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity var(--dur-fast) var(--ease-dry), transform var(--dur-fast) var(--ease-dry);
}

.row:hover .row__open,
.row:focus-visible .row__open { opacity: 1; transform: none; }

.row__meta {
	border-left: 1px solid var(--pr-rule);
	padding-left: clamp(20px, 2.5vw, 36px);
}

.row__artist {
	font-family: var(--font-display);
	font-size: 13px;
	font-weight: 600;
	color: var(--fg);
	letter-spacing: 0.01em;
	margin-bottom: 10px;
}

.row__line {
	font-family: var(--font-body);
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--fg-muted);
}

.row__line--year {
	margin-top: 8px;
	font-family: var(--font-display);
	letter-spacing: 0.08em;
	font-size: 11px;
}

.row__media {
	border-left: 1px solid var(--pr-rule);
	padding-left: clamp(20px, 2.5vw, 36px);
	display: flex;
	gap: 10px;
	align-items: flex-start;
	flex-wrap: wrap;
}

/* —— placa da miniatura —— */

.thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	flex: none;
	background: #f3f1ee;
	border-radius: var(--r-sm);
	overflow: hidden;
	box-shadow: inset 0 0 0 1px var(--pr-rule);
	transition: width 220ms var(--ease-dry);
}

.thumb__plate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

.thumb__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.thumb__idx {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.12em;
	color: var(--fg-dim);
}

.thumb__cap {
	position: absolute;
	bottom: 6px;
	left: 8px;
	font-family: var(--font-display);
	font-size: 9px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

.thumb__corner { position: absolute; width: 8px; height: 8px; }

.thumb__corner--tl {
	top: 7px;
	left: 7px;
	border-top: 1px solid var(--fg-dim);
	border-left: 1px solid var(--fg-dim);
}

.thumb__corner--br {
	bottom: 7px;
	right: 7px;
	border-bottom: 1px solid var(--fg-dim);
	border-right: 1px solid var(--fg-dim);
}

.thumb--duo { background: var(--c-wine); box-shadow: inset 0 0 0 1px rgba(199, 184, 240, 0.22); }
.thumb--duo .thumb__idx { color: var(--c-lavender); }
.thumb--duo .thumb__cap { color: rgba(244, 236, 226, 0.55); }
.thumb--duo .thumb__corner--tl,
.thumb--duo .thumb__corner--br { border-color: rgba(199, 184, 240, 0.55); }

/* tratamento: cresce no hover */
.row--hover-grow .thumb { width: 104px; }
.row--hover-grow:hover .thumb,
.row--hover-grow:focus-visible .thumb { width: 188px; }
/* tratamento: sempre visível */
.row--always .thumb { width: 176px; }
/* tratamento: duotone */
.row--duotone .thumb { width: 176px; }

/* —— ano reservado —— */
.soon {
	margin-top: 18px;
	border: 1px solid var(--pr-rule);
	border-radius: 0;
	padding: clamp(28px, 4vw, 52px);
}

.soon__txt {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(15px, 1.5vw, 19px);
	letter-spacing: 0.01em;
	color: var(--fg-muted);
}

/* —— estado vazio —— */
.empty { padding: clamp(40px, 8vw, 96px) 0; text-align: center; }

.empty p {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 18px;
	letter-spacing: 0.01em;
	color: var(--fg-muted);
}

.empty__reset {
	margin-top: 16px;
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hot);
	border-bottom: 1.5px solid var(--hot);
	padding-bottom: 2px;
}

/* ============================ FOOTER =========================== */

.footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: clamp(14px, 2.4vw, 34px);
	padding: clamp(30px, 4vw, 52px) 0 clamp(22px, 3vw, 34px);
	margin-top: clamp(30px, 4.4vw, 60px);
}

.footer__lead { display: flex; align-items: baseline; gap: 12px; }

.footer__eyebrow {
	font-family: var(--font-display);
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.01em;
	color: var(--fg-muted);
}

.footer__mail {
	font-family: var(--font-curatorial);
	font-style: italic;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.1;
	color: var(--fg);
	transition: color 200ms var(--ease-dry);
}

.footer__mail:hover { color: var(--c-purple); }
.footer__side { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); margin-left: auto; }
.footer__mark { height: 16px; width: auto; display: block; opacity: 0.9; }
.footer__links { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 20px); }

.footer__links a {
	font-family: var(--font-display);
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.01em;
	color: var(--fg-muted);
	transition: color var(--dur-fast) var(--ease-dry);
}

.footer__links a:hover {
	color: var(--fg);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1.5px;
	text-decoration-color: var(--hot);
}

.footer__place {
	font-family: var(--font-display);
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.01em;
	color: var(--fg-dim);
}

/* ============================ LIGHTBOX ========================= */

.lb {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 48px);
	background: rgba(31, 26, 24, 0.6);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 240ms var(--ease-editorial);
}

.lb.is-in { opacity: 1; }

.lb__panel {
	position: relative;
	width: 100%;
	max-width: 1080px;
	max-height: 88vh;
	overflow: auto;
	display: grid;
	grid-template-columns: 0.92fr 1.08fr;
	background: #ffffff;
	border-radius: var(--r-xl);
	border: 1px solid var(--pr-rule);
	opacity: 0;
	transition: opacity 260ms var(--ease-dry), transform 280ms var(--ease-dry);
}

.lb--fade .lb__panel { transform: none; }
.lb--scale .lb__panel { transform: scale(0.96); }
.lb--slide-up .lb__panel { transform: translateY(26px); }
.lb.is-in .lb__panel { opacity: 1; transform: none; }

.lb__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border-radius: var(--r-pill);
	border: 1px solid var(--pr-rule);
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: var(--fg);
	transition: background var(--dur-fast) var(--ease-dry);
}

.lb__close:hover { background: rgba(31, 26, 24, 0.05); }

.lb__media {
	position: sticky;
	top: 0;
	align-self: start;
	max-height: 88vh;
	overflow-y: auto;
	background: #ffffff;
	padding: clamp(20px, 3vw, 40px);
	display: flex;
	flex-direction: column;
	gap: 14px;
	justify-content: flex-start;
	border-right: 1px solid var(--pr-rule);
	border-radius: var(--r-xl) 0 0 var(--r-xl);
	scrollbar-width: thin;
}

.lb__photo { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: #f3f1ee; }
.lb__img { position: relative; aspect-ratio: 16/9; width: 100%; }

.lb__plate {
	position: absolute;
	inset: 0;
	border-radius: var(--r-md);
	background: #f3f1ee;
	box-shadow: inset 0 0 0 1px var(--pr-rule);
	display: flex;
	align-items: center;
	justify-content: center;
}

.lb__idx {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 16px;
	letter-spacing: 0.12em;
	color: var(--fg-dim);
}

.lb__capimg {
	position: absolute;
	bottom: 10px;
	left: 12px;
	font-family: var(--font-display);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--fg-dim);
}

.lb__info { padding: clamp(28px, 3.4vw, 52px); display: flex; flex-direction: column; }

.lb__eyebrow {
	font-family: var(--font-display);
	font-size: var(--fs-eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--hot);
}

.lb__title {
	font-family: var(--font-curatorial);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(32px, 4.4vw, 58px);
	line-height: 1.0;
	letter-spacing: 0;
	color: var(--fg);
	margin-top: 14px;
	text-wrap: balance;
}

.lb__credits {
	margin-top: clamp(22px, 3vw, 34px);
	padding-top: 22px;
	border-top: 1px solid var(--pr-rule);
	display: grid;
	gap: 14px;
}

.lb__credits > div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: baseline; }

.lb__credits dt {
	font-family: var(--font-display);
	font-size: var(--fs-eyebrow);
	letter-spacing: var(--ls-eyebrow);
	text-transform: uppercase;
	color: var(--fg-muted);
}

.lb__credits dd { font-family: var(--font-body); font-size: 15px; line-height: 1.45; color: var(--fg); }

.lb__desc { padding-top: clamp(20px, 2.8vw, 32px); }

/* Parágrafos vindos do editor do WordPress usam a mesma medida do original. */
.lb__para,
.lb__body p {
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.62;
	color: var(--fg);
	margin-bottom: 12px;
	max-width: 62ch;
}

.lb__para:last-of-type,
.lb__body p:last-child { margin-bottom: 0; }

.lb__body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hot); }

.lb__body ul,
.lb__body ol { margin: 0 0 12px 20px; font-family: var(--font-body); font-size: 14px; line-height: 1.62; }

.lb__body h2,
.lb__body h3 {
	font-family: var(--font-curatorial);
	font-style: italic;
	font-weight: 400;
	font-size: 22px;
	line-height: 1.2;
	margin: 18px 0 10px;
}

.lb__body img { height: auto; border-radius: var(--r-md); margin: 12px 0; }

/* padrão de atuação repetido */
.lb__standard { margin: clamp(18px, 2.4vw, 26px) 0; }

.lb__std-head {
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	color: var(--fg);
	margin-bottom: 14px;
}

.lb__std-list { list-style: none; display: grid; gap: 10px; }

.lb__std-list li {
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.5;
	color: var(--fg);
	padding-left: 20px;
	position: relative;
}

.lb__std-list li::before { content: "→"; position: absolute; left: 0; color: var(--hot); }

/* atividades específicas do case */
.lb__extras { margin-top: clamp(16px, 2vw, 22px); }
.lb__extras-list { list-style: none; display: grid; gap: 10px; }

.lb__extras-list li {
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.5;
	color: var(--fg);
	padding-left: 20px;
	position: relative;
}

.lb__extras-list li::before { content: "→"; position: absolute; left: 0; color: var(--hot); }

/* ============================ RESPONSIVE ======================= */

@media (max-width: 880px) {
	.pagehead { grid-template-columns: 1fr; gap: 18px; align-items: start; }
	.pagehead__title { font-size: clamp(44px, 13vw, 80px); }

	.controls__label { width: 48px; }
	.years { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
	.years::-webkit-scrollbar { display: none; }

	.filters { gap: 12px; }
	.filters__set { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
	.filters__set::-webkit-scrollbar { display: none; }
	.filters__count { display: none; }

	.row { grid-template-columns: 1fr; gap: 14px; }
	.row__media { order: -1; border-left: none; padding-left: 0; gap: 8px; }
	.row__media .thumb { width: auto !important; flex: 1 1 140px; }
	.row--hover-grow:hover .thumb { width: auto !important; }
	.row__title { padding-right: 0; }
	.row__meta { border-left: none; padding-left: 0; }
	.row__open { opacity: 1; transform: none; margin-top: 12px; }

	.lb__panel { grid-template-columns: 1fr; max-height: 92vh; }
	.lb__media {
		position: static;
		max-height: none;
		overflow: visible;
		border-right: none;
		border-bottom: 1px solid var(--pr-rule);
		border-radius: var(--r-xl) var(--r-xl) 0 0;
	}

	.footer { gap: 14px 20px; }
	.footer__side { margin-left: 0; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Ícone opcional por atividade (Dashicons do WordPress) */
.lb__std-list li.has-icon::before,
.lb__extras-list li.has-icon::before { content: none; }

.lb__std-list li.has-icon,
.lb__extras-list li.has-icon { padding-left: 26px; }

.lb__std-list li .dashicons,
.lb__extras-list li .dashicons {
	position: absolute;
	left: 0;
	top: 0.05em;
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 1;
	color: var(--hot);
}
