/* Our Work: tabbed section (homepage + /our-work/).
 * Editorial layout: heading left with intro on the right, underline tabs,
 * three tall square-cornered cards with a numbered label and a text link.
 * Prefix abs-ow, so it never clashes with the old .work styles in main.css. */

.abs-ow { padding: clamp(56px, 9vw, 112px) 0; }

/* Head */
.abs-ow__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
	gap: 24px 48px;
	align-items: end;
}
.abs-ow__title {
	margin: 18px 0 0;
	font-size: clamp(2.25rem, 5.4vw, 4rem);
	line-height: 1.02;
	letter-spacing: -0.04em;
	text-wrap: balance;
	max-width: 15ch;
}
.abs-ow__title em { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.abs-ow__intro { margin: 0; color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.abs-ow__empty { margin-top: 32px; color: var(--text-muted); }

/* Tabs: plain text with an underline on the active one */
.abs-ow__tabs-scroll { margin-top: clamp(32px, 4vw, 48px); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-strong); }
.abs-ow__tabs-scroll::-webkit-scrollbar { display: none; }
.abs-ow__tabs { display: flex; gap: clamp(24px, 3.4vw, 44px); width: max-content; }
.abs-ow__tab {
	appearance: none; border: 0; background: none; border-radius: 0;
	position: relative;
	padding: 0 0 14px;
	color: var(--text-muted);
	font: inherit; font-size: 0.9375rem; font-weight: 500;
	cursor: pointer; white-space: nowrap;
	transition: color .2s;
}
.abs-ow__tab::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
	background: var(--text-primary);
	transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.abs-ow__tab:hover { color: var(--text-primary); }
.abs-ow__tab[aria-selected="true"] { color: var(--text-primary); }
.abs-ow__tab[aria-selected="true"]::after { transform: scaleX(1); }
.abs-ow__tab:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 4px; }
.abs-ow__count { font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; margin-left: 2px; }

.abs-ow__panel { margin-top: clamp(24px, 3vw, 36px); }
.abs-ow__panel[hidden] { display: none; }
.abs-ow__panel-intro { margin: 0 0 28px; color: var(--text-muted); max-width: 64ch; }
@media (prefers-reduced-motion: no-preference) {
	.abs-ow__panel:not([hidden]) { animation: abs-ow-rise .4s ease both; }
}
@keyframes abs-ow-rise { from { opacity: .3; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Grid: three equal columns */
.abs-ow__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) clamp(20px, 2.6vw, 36px); }

/* Card */
.abs-ow-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.abs-ow-card:hover { color: inherit; }
.abs-ow-card:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 6px; }

.abs-ow-media {
	position: relative; display: block; overflow: hidden;
	aspect-ratio: 3 / 4; max-width: 100%;
	background: #171717;
}
.abs-ow-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.abs-ow-link:hover .abs-ow-media img { transform: scale(1.035); }

/* Screenshots: shown whole on a light panel */
.abs-ow-media.is-result { background: #f5f5f5; }
.abs-ow-media.is-result img { object-fit: contain; padding: 18px; }

/* Empty media (no image yet) */
.abs-ow-media.is-empty {
	background:
		radial-gradient(120% 80% at 20% 10%, rgba(255,255,255,.12), transparent 60%),
		#171717;
}
.abs-ow-media.is-empty.is-result { background: #f5f5f5; }

/* Result with no screenshot: the number fills the space */
.abs-ow-figure {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
	padding: clamp(20px, 2.4vw, 28px);
	color: var(--text-primary);
}
.abs-ow-figure__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }
.abs-ow-figure__value { font-size: clamp(3rem, 6vw, 4.75rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.abs-ow-figure__from { font-size: 0.9375rem; color: var(--text-muted); }

/* Play button: outlined circle, bottom left */
.abs-ow-play {
	position: absolute; left: 18px; bottom: 18px; z-index: 1;
	width: 40px; height: 40px; border-radius: 50%;
	border: 1.5px solid #fff; color: #fff;
	display: grid; place-items: center;
	background: rgba(0,0,0,.12);
	transition: background-color .2s, color .2s;
}
.abs-ow-play svg { width: 13px; height: 13px; margin-left: 2px; }
.abs-ow-link:hover .abs-ow-play { background: #fff; color: #000; }
.abs-ow-views {
	position: absolute; right: 16px; bottom: 22px; z-index: 1;
	color: #fff; font-size: 0.8125rem; font-weight: 500;
	text-shadow: 0 1px 8px rgba(0,0,0,.5); font-variant-numeric: tabular-nums;
}

/* Text under the image */
.abs-ow-kicker {
	margin-top: 18px;
	font-size: 0.75rem; font-weight: 500;
	text-transform: uppercase; letter-spacing: 0.12em;
	color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.abs-ow-title {
	margin-top: 8px;
	font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 500;
	line-height: 1.2; letter-spacing: -0.02em;
	text-wrap: balance;
}
.abs-ow-numbers {
	margin-top: 10px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
	font-size: 0.9375rem; color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.abs-ow-delta { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; background: var(--text-primary); color: #fff; font-variant-numeric: tabular-nums; }
.abs-ow-sub { margin-top: 6px; font-size: 0.875rem; color: var(--text-muted); }
.abs-ow-cta {
	align-self: flex-start;
	margin-top: 14px;
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 0.9375rem; color: var(--text-primary);
	padding-bottom: 3px;
	border-bottom: 1px solid currentColor;
}
.abs-ow-cta svg { width: 14px; height: 14px; transition: transform .2s; }
.abs-ow-link:hover .abs-ow-cta svg { transform: translate(2px, -2px); }

/* Foot row */
.abs-ow__foot {
	margin-top: clamp(36px, 4vw, 56px); padding-top: 22px;
	border-top: 1px solid var(--border-strong);
	display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.abs-ow__foot p { margin: 0; font-size: 0.9375rem; color: var(--text-muted); }
.abs-ow-textlink { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9375rem; color: var(--text-primary); text-decoration: none; }
.abs-ow-textlink svg { width: 15px; height: 15px; transition: transform .2s; }
.abs-ow-textlink:hover { color: var(--text-primary); }
.abs-ow-textlink:hover svg { transform: translate(2px, -2px); }
.abs-ow-textlink:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }

/* Video pop-up */
.abs-ow-modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.abs-ow-modal::backdrop { background: rgba(0,0,0,.88); }
.abs-ow-modal__box { position: relative; width: min(960px, 92vw); margin: 6vh auto 0; }
.abs-ow-modal.is-reel .abs-ow-modal__box { width: min(400px, 92vw); margin-top: 3vh; }
.abs-ow-modal__frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.abs-ow-modal.is-reel .abs-ow-modal__frame { aspect-ratio: 9 / 16; max-height: 88vh; margin: 0 auto; }
.abs-ow-modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.abs-ow-modal__close {
	position: absolute; top: -48px; right: 0;
	width: 40px; height: 40px; border-radius: 50%; border: 0;
	background: #fff; color: #000; font-size: 24px; line-height: 1; cursor: pointer;
}
.abs-ow-modal__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.abs-ow--home { padding-top: clamp(40px, 6vw, 80px); }

/* Tablet: two columns, intro under the heading */
@media (max-width: 900px) {
	.abs-ow__head { grid-template-columns: 1fr; align-items: start; }
	.abs-ow__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phone: one column, wider image ratio like the reference */
@media (max-width: 600px) {
	.abs-ow__grid { grid-template-columns: 1fr; gap: 36px; }
	.abs-ow-media { aspect-ratio: 3 / 2; }
	.abs-ow-card--reel .abs-ow-media { aspect-ratio: 4 / 5; }
	.abs-ow__tab { font-size: 1rem; }
}
