/*
 * Mega menus, desktop only (tangens-components.md; design/reference/megamenu-*.html at 1440).
 * One Canvas surface with the header and a single hairline at the foot. Panel padding 40/80/56;
 * left column 300 with a hairline on its right, 64 to three cards 284 wide with 32 between.
 * The reference sets text 1px under the approved artboards (14/16 against 15/17), so its sizes
 * map to the meta and body roles. The scrim starts below the panel.
 */

.mega {
	position: absolute;
	inset-inline: 0;
	top: 100%;
}

.mega__panel {
	padding-block: calc(var(--space-4) * 1.25) var(--space-5);
	padding-inline: var(--container-pad);
	border-bottom: var(--hairline) solid var(--line);
	background: var(--canvas);
	color: var(--ink);
}

.mega__inner {
	display: grid;
	grid-template-columns: minmax(0, 300fr) minmax(0, 916fr);
	gap: calc(var(--space-4) * 2);
	align-items: start;
}

.mega ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mega__aside {
	display: flex;
	flex-direction: column;
	min-height: 23.75rem;
	padding-inline-end: calc(var(--space-4) * 1.25);
	border-right: var(--hairline) solid var(--line);
}

/* Watches: collection tabs with a 2px ink marker on the active one. */
.mega__tabs {
	gap: 0.25rem;
}

.mega__tab {
	display: block;
	padding-block: 0.875rem;
	padding-inline-start: 1.125rem;
	border-left: 2px solid transparent;
	font-size: var(--fs-body);
	line-height: normal;
}

.mega__tab.is-active {
	border-left-color: var(--ink);
	font-weight: 500;
}

/* Journal: section label and one line of text where the tabs sit. */
.mega__about {
	gap: 0.75rem;
}

.mega__label {
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
}

.mega__intro {
	color: var(--graphite);
	font-size: var(--fs-body);
	line-height: 1.5;
}

.mega__cards,
.mega__set {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-4);
}

.mega__cards:has(> .mega__set) {
	display: block;
}

.mega__set[hidden] {
	display: none;
}

/* Article card: rounded 284 × 300 image (as the reference crops it), title, Read →. */
.article-card {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
	color: var(--ink);
}

.article-card__media {
	display: block;
	aspect-ratio: 284 / 300;
	margin-block-end: 0.625rem;
	overflow: hidden;
	border-radius: var(--radius);
}

.article-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 35%;
	transition: transform var(--dur-hover) var(--ease);
}

.article-card:hover .article-card__img {
	transform: scale(var(--hover-scale));
}

.article-card__title {
	font-size: var(--fs-body);
	font-weight: 500;
	line-height: normal;
}

.article-card__more {
	color: var(--graphite);
	font-size: var(--fs-meta);
	line-height: normal;
}

/* Scrim: fixed below the panel; its top is set by the script to the panel's foot. */
.mega-scrim {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 40;
	background: var(--overlay-drawer);
}

@media (max-width: 1279px) {
	.mega,
	.mega-scrim {
		display: none !important;
	}
}
