/* Home page styles — scoped to body.mc-home so other pages using main.css are unaffected.
   Palette taken from H&E staining: hematoxylin indigo, eosin pink, slide glass. */

.mc-home {
	--hema: #2a2870;
	--hema-deep: #15143a;
	--eosin: #c93d7e;
	--eosin-pale: #f4d9e6;
	--glass: #f6f6fa;
	--glass-edge: #d9d8e6;
	--frost: #e6e4ee;
	--ink: #1d1b33;
	--muted: #5d5a78;

	--serif: "Source Serif 4", Georgia, serif;
	--sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

	margin: 0;
	background: var(--glass);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.mc-home a { color: inherit; }
.mc-home a:focus-visible {
	outline: 3px solid var(--eosin);
	outline-offset: 3px;
}

/* ---------- Top bar ---------- */
.mc-bar {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
	padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
	background: var(--hema-deep);
	color: #fff;
}
.mc-wordmark {
	font-family: var(--serif);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	text-decoration: none;
}
.mc-home .mc-wordmark:hover { color: #fff; text-decoration: none; }
.mc-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	font-size: 0.95rem;
}
.mc-nav a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	padding: 0.2rem 0;
	border-bottom: 2px solid transparent;
}
.mc-home .mc-nav a:hover {
	color: #fff;
	text-decoration: none;
	border-bottom-color: var(--eosin);
}

/* ---------- Hero ---------- */
.mc-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.5rem, 4vw, 4rem);
	padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 5vw, 4rem) 0;
	background: var(--hema-deep);
	color: #fff;
	overflow: hidden;
}
.mc-hero-text { padding-bottom: clamp(2.5rem, 6vw, 5.5rem); }
.mc-hero h1 {
	font-family: var(--serif);
	font-optical-sizing: auto;
	font-weight: 400;
	font-size: clamp(2.75rem, 7vw, 5.75rem);
	line-height: 0.98;
	letter-spacing: -0.025em;
	margin: 0 0 1.5rem;
	max-width: 9ch;
}
.mc-hero p {
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.78);
	max-width: 44ch;
	margin: 0;
}
/* The cell sits on a black field, so it blends into the hero and is cropped by the bottom edge,
   as if seen through the eyepiece. */
.mc-hero-image {
	margin: 0;
	align-self: end;
}
.mc-hero-image img {
	display: block;
	width: 100%;
	height: auto;
	mix-blend-mode: lighten;
	-webkit-mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 62%, transparent 100%);
	        mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 62%, transparent 100%);
}

/* ---------- Sections ---------- */
.mc-main {
	max-width: 1120px;
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 2.5rem) 2rem;
}
.mc-section + .mc-section { margin-top: clamp(3rem, 7vw, 5rem); }
.mc-section h2 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
	letter-spacing: -0.01em;
	color: var(--hema);
	margin: 0 0 1.5rem;
}
.mc-slides, .mc-tray {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ---------- Glass slides (course sites) ----------
   Each link is drawn as a 3:1 microscope slide: frosted label end on the left,
   clear glass with the specimen on the right. */
.mc-slides { display: grid; gap: 1.25rem; max-width: 920px; }

.mc-slide {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
	aspect-ratio: 3 / 1;
	background: linear-gradient(180deg, #ffffff 0%, #f1f1f7 100%);
	border: 1px solid var(--glass-edge);
	border-radius: 3px;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.9),
		0 1px 2px rgba(29, 27, 51, 0.06),
		0 8px 24px -12px rgba(29, 27, 51, 0.18);
	text-decoration: none;
	overflow: hidden;
	transition: transform 160ms ease, box-shadow 160ms ease;
}
.mc-home .mc-slide:hover {
	text-decoration: none;
	color: inherit;
	transform: translateY(-2px);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.9),
		0 2px 4px rgba(29, 27, 51, 0.08),
		0 16px 32px -14px rgba(42, 40, 112, 0.35);
}

.mc-slide-label {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.6rem;
	padding: clamp(1rem, 2.5vw, 1.75rem);
	/* frosted glass: fine grain over a pale grey */
	background:
		repeating-linear-gradient(45deg, rgba(255,255,255,0.35) 0 1px, transparent 1px 3px),
		var(--frost);
	border-right: 1px solid var(--glass-edge);
}
.mc-slide-title {
	font-family: var(--serif);
	font-weight: 600;
	font-size: clamp(1.25rem, 2.2vw, 1.75rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--hema);
}
.mc-slide-desc {
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--muted);
	max-width: 34ch;
}
.mc-home .mc-slide:hover .mc-slide-title { color: var(--eosin); }

/* the coverslip */
.mc-slide-specimen {
	padding: clamp(0.6rem, 1.5vw, 1rem) clamp(1.5rem, 5vw, 4rem);
	display: flex;
}
.mc-slide-specimen img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 1px;
	box-shadow: 0 0 0 1px rgba(29, 27, 51, 0.06);
}

/* ---------- Tray (collections and cases) ---------- */
.mc-tray {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 2rem);
}
.mc-tile {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	text-decoration: none;
	height: 100%;
}
.mc-home .mc-tile:hover { text-decoration: none; color: inherit; }
.mc-tile-specimen {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 3px;
	margin-bottom: 0.65rem;
	background: var(--frost);
}
.mc-tile-specimen img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}
.mc-home .mc-tile:hover .mc-tile-specimen img { transform: scale(1.04); }
.mc-tile-title {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 1.25rem;
	color: var(--hema);
	border-bottom: 2px solid transparent;
	align-self: flex-start;
}
.mc-home .mc-tile:hover .mc-tile-title { border-bottom-color: var(--eosin); }
.mc-tile-desc {
	font-size: 0.95rem;
	color: var(--muted);
}

/* ---------- Footer ---------- */
.mc-footer {
	max-width: 1120px;
	margin: 3rem auto 0;
	padding: 0 clamp(1.25rem, 5vw, 2.5rem) 2.5rem;
	font-size: 0.9rem;
	color: var(--muted);
}
.mc-footer p { margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--glass-edge); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
	.mc-hero { grid-template-columns: 1fr; }
	.mc-hero-text { padding-bottom: 0; }
	.mc-hero-image { max-width: 520px; justify-self: center; }

	.mc-slide {
		grid-template-columns: 1fr;
		aspect-ratio: auto;
	}
	.mc-slide-label { border-right: 0; border-bottom: 1px solid var(--glass-edge); }
	.mc-slide-specimen { aspect-ratio: 2 / 1; padding: 0.75rem 1.5rem; }

	.mc-tray { grid-template-columns: 1fr; }
	.mc-tile-specimen { aspect-ratio: 2 / 1; }
}

@media (prefers-reduced-motion: reduce) {
	.mc-slide, .mc-tile-specimen img { transition: none; }
	.mc-home .mc-slide:hover { transform: none; }
	.mc-home .mc-tile:hover .mc-tile-specimen img { transform: none; }
}
