/* ==========================================================================
   SMI News — front-end styles
   Prefix: smi-n-  (per SMI-DESIGN-SYSTEM-GUIDE.md §7)
   ========================================================================== */

.smi-n-page {
	--navy-deep: #0a1628;
	--navy: #0f2340;
	--blue: #16305c;
	--coral: #ff6b5b;
	--cyan: #4fd1e8;
	--ink: #eaf1fb;
	--ink-soft: rgba(234, 241, 251, 0.7);
	--ink-faint: rgba(234, 241, 251, 0.46);
	--line: rgba(234, 241, 251, 0.12);

	font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--ink);
	background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 48%, var(--blue) 100%);
	position: relative;
	overflow-x: hidden;
}

.smi-n-page * {
	box-sizing: border-box;
}

.smi-n-page img {
	max-width: 100%;
	display: block;
}

.smi-n-container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 24px;
}

/* --------------------------------------------------------------------
   Header offset (§4.1) — bleeds behind Blocksy's transparent nav
   -------------------------------------------------------------------- */
.smi-n-hero-shell {
	position: relative;
	margin-top: -90px;
	padding-top: 90px;
	overflow: hidden;
	padding-bottom: 72px;
}

.smi-n-hero-shell--single {
	padding-bottom: 88px;
}

/* --------------------------------------------------------------------
   Hero background image (§4.2) — absolute-inset, never sticky
   -------------------------------------------------------------------- */
.smi-n-hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.smi-n-hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.smi-n-hero-scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(10, 22, 40, 0.55) 0%, rgba(10, 22, 40, 0.75) 55%, var(--navy) 100%);
}

/* --------------------------------------------------------------------
   Dotted texture overlay (§5.1)
   -------------------------------------------------------------------- */
.smi-n-texture {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(234, 241, 251, 0.085) 1px, transparent 1px);
	background-size: 26px 26px;
	opacity: 0.5;
	pointer-events: none;
	z-index: 0;
}

/* --------------------------------------------------------------------
   Ambient glow orbs (§5.2)
   -------------------------------------------------------------------- */
.smi-n-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.35;
	pointer-events: none;
	z-index: 0;
	width: 340px;
	height: 340px;
	animation: smi-n-drift 19s ease-in-out infinite;
}

.smi-n-orb--coral {
	top: -80px;
	left: -60px;
	background: var(--coral);
}

.smi-n-orb--cyan {
	bottom: -100px;
	right: -80px;
	background: var(--cyan);
	animation-delay: -6s;
}

@keyframes smi-n-drift {
	0%,
	100% {
		transform: translate(0, 0);
	}
	50% {
		transform: translate(28px, -24px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.smi-n-orb {
		animation: none;
	}
}

/* --------------------------------------------------------------------
   Hero content
   -------------------------------------------------------------------- */
.smi-n-hero-content {
	position: relative;
	z-index: 2;
	max-width: 760px;
	margin: 0 auto;
	padding: 64px 24px 0;
	text-align: center;
}

.smi-n-eyebrow {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--coral);
	margin-bottom: 18px;
}

.smi-n-h1 {
	font-size: clamp(34px, 5vw, 60px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0 0 18px;
}

.smi-n-lede {
	font-size: clamp(16px, 1.6vw, 18px);
	line-height: 1.75;
	color: var(--ink-soft);
	margin: 0;
}

.smi-n-single .smi-n-hero-content {
	padding-top: clamp(150px, 18vw, 190px);
}

.smi-n-single .smi-n-h1 {
	font-size: clamp(28px, 4.4vw, 48px);
}

/* --------------------------------------------------------------------
   Section wrapper
   -------------------------------------------------------------------- */
.smi-n-section {
	position: relative;
	padding: 8px 0 96px;
}

/* --------------------------------------------------------------------
   Card grid
   -------------------------------------------------------------------- */
.smi-n-grid {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.smi-n-card {
	position: relative;
	background: rgba(255, 255, 255, 0.045);
	border: 1px solid var(--line);
	border-radius: 18px;
	backdrop-filter: blur(14px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

/* Thin two-tone accent line — the grid's one recurring signature detail */
.smi-n-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 3;
	background: linear-gradient(90deg, var(--coral), var(--cyan));
	opacity: 0.85;
}

.smi-n-card:hover {
	transform: translateY(-6px);
	border-color: rgba(79, 209, 232, 0.35);
	background: rgba(255, 255, 255, 0.08);
	box-shadow: 0 22px 48px rgba(10, 22, 40, 0.4), 0 0 0 1px rgba(79, 209, 232, 0.06);
}

/* Alternate the accent focus per card so a grid of them doesn't feel flat */
.smi-n-card:nth-child(even) .smi-n-card-date-badge {
	border-color: rgba(79, 209, 232, 0.4);
	color: var(--cyan);
}

.smi-n-card:nth-child(even) .smi-n-card-link {
	color: var(--coral);
}

.smi-n-card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.03);
}

.smi-n-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.smi-n-card:hover .smi-n-card-media img {
	transform: scale(1.06);
}

.smi-n-card-media-fallback {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(255, 107, 91, 0.18), rgba(79, 209, 232, 0.18));
}

/* Bottom scrim so the floating date badge stays legible over any photo */
.smi-n-card-media::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 22, 40, 0.05) 0%, rgba(10, 22, 40, 0.55) 100%);
	pointer-events: none;
}

.smi-n-card-date-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(10, 22, 40, 0.55);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 107, 91, 0.4);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--coral);
}

.smi-n-card-body {
	padding: 22px 22px 26px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.smi-n-card-title {
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 10px;
}

.smi-n-card-title a {
	color: var(--ink);
	text-decoration: none;
}

.smi-n-card-title a:hover {
	color: var(--cyan);
}

.smi-n-card-excerpt {
	font-size: 14.5px;
	line-height: 1.65;
	color: var(--ink-soft);
	margin: 0 0 18px;
	flex-grow: 1;
}

.smi-n-card-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--cyan);
	text-decoration: none;
	margin-top: auto;
}

.smi-n-card-link svg {
	transition: transform 0.25s ease;
	width: 16px;
	height: 16px;
}

.smi-n-card:hover .smi-n-card-link svg {
	transform: translateX(3px);
}

/* --------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------- */
.smi-n-empty {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 60px 20px;
	color: var(--ink-soft);
}

/* --------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------- */
.smi-n-pagination {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 48px;
}

.smi-n-pagination a,
.smi-n-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 16px;
	border-radius: 100px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--line);
	color: var(--ink);
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	backdrop-filter: blur(10px);
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.smi-n-pagination a:hover {
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(79, 209, 232, 0.35);
	transform: translateY(-2px);
}

.smi-n-pagination span.current {
	background: var(--coral);
	color: var(--navy-deep);
	border-color: transparent;
}

/* --------------------------------------------------------------------
   Buttons (§5.6)
   -------------------------------------------------------------------- */
.smi-n-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: 100px;
	padding: 14px 28px;
	font-weight: 700;
	font-size: 14.5px;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
	border: none;
	cursor: pointer;
}

.smi-n-btn-ghost {
	background: rgba(255, 255, 255, 0.05);
	color: var(--ink);
	border: 1px solid var(--line);
	backdrop-filter: blur(14px);
}

.smi-n-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.09);
	transform: translateY(-2px);
	color: var(--ink);
}

/* --------------------------------------------------------------------
   Article
   -------------------------------------------------------------------- */
.smi-n-article-container {
	max-width: 780px;
}

.smi-n-article-wrap {
	position: relative;
	z-index: 2;
	font-size: 17px;
	line-height: 1.8;
	color: var(--ink-soft);
}

.smi-n-article-wrap h2 {
	color: var(--ink);
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 800;
	margin: 40px 0 16px;
}

.smi-n-article-wrap h3 {
	color: var(--ink);
	font-size: 21px;
	font-weight: 700;
	margin: 32px 0 14px;
}

.smi-n-article-wrap p {
	margin: 0 0 20px;
}

.smi-n-article-wrap a {
	color: var(--cyan);
}

.smi-n-article-wrap img {
	border-radius: 14px;
	margin: 28px 0;
}

.smi-n-article-wrap ul,
.smi-n-article-wrap ol {
	margin: 0 0 20px;
	padding-left: 22px;
}

.smi-n-article-wrap li {
	margin-bottom: 8px;
}

.smi-n-article-wrap blockquote {
	margin: 28px 0;
	padding: 20px 24px;
	border-left: 3px solid var(--coral);
	background: rgba(255, 255, 255, 0.035);
	border-radius: 0 14px 14px 0;
	font-style: italic;
	color: var(--ink);
}

/* --------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------- */
.smi-n-gallery {
	position: relative;
	z-index: 2;
	margin-top: 56px;
}

.smi-n-gallery-heading {
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 800;
	margin: 0 0 22px;
}

.smi-n-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.smi-n-gallery-thumb {
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	padding: 0;
	background: none;
	cursor: pointer;
	aspect-ratio: 1 / 1;
	transition: transform 0.3s ease, border-color 0.3s ease;
}

.smi-n-gallery-thumb:hover {
	transform: translateY(-4px);
	border-color: rgba(79, 209, 232, 0.35);
}

.smi-n-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------- */
.smi-n-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(10, 22, 40, 0.94);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
}

.smi-n-lightbox.is-open {
	display: flex;
}

.smi-n-lightbox-img {
	max-width: min(90vw, 1100px);
	max-height: 86vh;
	object-fit: contain;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.smi-n-lightbox-close {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--line);
	color: var(--ink);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.smi-n-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------
   Back nav
   -------------------------------------------------------------------- */
.smi-n-back-nav {
	position: relative;
	z-index: 2;
	margin-top: 56px;
}

/* --------------------------------------------------------------------
   Scroll reveal (§6)
   -------------------------------------------------------------------- */
.smi-n-page .reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.smi-n-page .reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.smi-n-page .reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */

/* Tablet */
@media (max-width: 980px) {
	.smi-n-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 22px;
	}

	.smi-n-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}

	.smi-n-hero-content {
		padding-top: 48px;
	}
}

/* Mobile */
@media (max-width: 640px) {
	.smi-n-container {
		padding: 0 18px;
	}

	.smi-n-hero-shell {
		margin-top: -70px;
		padding-top: 70px;
		padding-bottom: 48px;
	}

	.smi-n-hero-content {
		padding: 40px 16px 0;
	}

	.smi-n-single .smi-n-hero-content {
		padding-top: 130px;
	}

	.smi-n-h1 {
		font-size: clamp(28px, 8vw, 38px);
	}

	.smi-n-lede {
		font-size: 15.5px;
	}

	.smi-n-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.smi-n-card-body {
		padding: 20px 18px 22px;
	}

	.smi-n-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.smi-n-article-wrap {
		font-size: 16px;
	}

	.smi-n-btn {
		width: 100%;
		justify-content: center;
	}

	.smi-n-orb {
		width: 220px;
		height: 220px;
		filter: blur(60px);
	}

	.smi-n-lightbox-close {
		top: 14px;
		right: 14px;
		width: 38px;
		height: 38px;
	}
}

/* Small phones */
@media (max-width: 380px) {
	.smi-n-gallery-grid {
		grid-template-columns: 1fr 1fr;
	}

	.smi-n-card-title {
		font-size: 17px;
	}
}
