/* =====================================================
   Inner pages: blog, single, archive, case study,
   course landing, 404
   ===================================================== */

.n-archive { padding-block: clamp(16px, 3vw, 40px) clamp(64px, 9vw, 110px); }

/* ---------- Article (single post) ---------- */
.n-article__hero { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px)); max-width: 900px; }

.n-article__title {
	font-size: clamp(2rem, 4.6vw, 3.4rem);
	line-height: 1.45;
	margin-block: 18px 14px;
}

.n-article__lead {
	font-size: 1.15rem;
	color: var(--ink-2);
	max-width: 60ch;
}

.n-article__media {
	margin-block: clamp(32px, 5vw, 56px);
	border-radius: var(--r-xl);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}

/* Prose / reading experience */
.n-prose {
	max-width: 780px;
	padding-block: clamp(24px, 4vw, 48px);
	font-size: 1.075rem;
	line-height: 2.15;
}

.n-prose > * + * { margin-top: 1.35em; }

.n-prose h2 {
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	line-height: 1.5;
	margin-top: 1.8em;
	position: relative;
	padding-inline-start: 18px;
}

.n-prose h2::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: .28em;
	width: 6px;
	height: 1em;
	border-radius: 99px;
	background: var(--grad-main);
}

.n-prose h3 { font-size: 1.3rem; margin-top: 1.6em; }

.n-prose a:not(.n-btn) {
	color: var(--indigo-deep);
	text-decoration: underline;
	text-decoration-color: rgba(79, 70, 229, .35);
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
	transition: text-decoration-color .25s ease;
}

.n-prose a:not(.n-btn):hover { text-decoration-color: var(--coral); }

.n-prose blockquote {
	background: var(--surface);
	border-inline-start: 4px solid;
	border-image: linear-gradient(var(--violet), var(--coral)) 1;
	padding: 22px 30px;
	border-radius: 0 var(--r-md) var(--r-md) 0;
	color: var(--ink-2);
	font-weight: 500;
}

.n-prose img { border-radius: var(--r-md); box-shadow: var(--shadow-sm); }

.n-prose ul:not([class]), .n-prose ol:not([class]) {
	padding-inline-start: 26px;
	display: grid;
	gap: 10px;
}

.n-prose ul:not([class]) li::marker { color: var(--indigo); }
.n-prose ol:not([class]) li::marker { font-family: var(--font-lt); color: var(--coral); font-weight: 600; }

.n-prose code {
	font-family: ui-monospace, monospace;
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
	background: rgba(79, 70, 229, .08);
	color: var(--indigo-deep);
	border-radius: 6px;
	padding: 2px 8px;
	font-size: .92em;
}

.n-prose pre {
	background: #191524;
	color: #EDEAF7;
	border-radius: var(--r-md);
	padding: 22px 26px;
	overflow-x: auto;
	direction: ltr;
	text-align: left;
	font-size: .92rem;
	line-height: 1.8;
}

.n-prose pre code { background: none; color: inherit; padding: 0; }

.n-prose table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.n-prose th { background: var(--paper-2); }
.n-prose th, .n-prose td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; }

.wp-caption-text, figcaption { color: var(--ink-3); font-size: .85rem; margin-top: 10px; text-align: center; }

.n-article__tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }

/* Author card + post nav */
.n-author { margin-top: clamp(40px, 6vw, 72px); display: grid; gap: 26px; }

.n-author__card {
	background:
		radial-gradient(300px 160px at 90% -20%, rgba(255, 196, 155, .25), transparent 70%),
		var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 28px 32px;
	max-width: 560px;
	box-shadow: var(--shadow-sm);
}

.n-author__card strong { font-size: 1.1rem; }
.n-author__card p { color: var(--ink-2); margin-top: 6px; }

.n-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.n-postnav__item a {
	display: grid;
	gap: 6px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 20px 24px;
	height: 100%;
	transition: all .35s var(--ease-out);
}
.n-postnav__item a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(79, 70, 229, .3); }
.n-postnav__item small { font-family: var(--font-lt); letter-spacing: .16em; color: var(--ink-3); font-size: .72rem; }
.n-postnav__item b { line-height: 1.7; }
.n-postnav__item--next a { text-align: end; }

/* ---------- Case study page ---------- */
.n-casepage__hero { padding-top: calc(var(--header-h) + clamp(44px, 7vw, 88px)); }

.n-casepage__title {
	font-size: clamp(2.2rem, 5.4vw, 4.2rem);
	font-weight: 900;
	line-height: 1.4;
	max-width: 18ch;
	margin-block: 16px 12px;
}

.n-casepage__sub { color: var(--ink-2); font-size: 1.1rem; max-width: 56ch; }

.n-casepage__facts {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(14px, 3vw, 36px);
	margin-top: 30px;
	border-top: 1px solid var(--line);
	padding-top: 22px;
}

.n-casepage__facts li { display: grid; gap: 2px; }
.n-casepage__facts span { color: var(--ink-3); font-size: .82rem; font-weight: 600; }
.n-casepage__facts b { font-weight: 700; }

.n-casepage__media {
	margin-block: clamp(36px, 5vw, 64px);
	border-radius: var(--r-xl);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	aspect-ratio: 16/9;
	isolation: isolate;
}

.n-casepage__media img, .n-casepage__media .n-ph { width: 100%; height: 100%; object-fit: cover; }

.n-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }

.n-results__item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: 20px 22px;
	box-shadow: var(--shadow-sm);
}

.n-results__check {
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 11px;
	background: linear-gradient(135deg, rgba(79, 70, 229, .12), rgba(139, 124, 246, .16));
	color: var(--indigo-deep);
	margin-top: 3px;
}
.n-results__check .n-icon { width: 17px; height: 17px; }

.n-casepage__results { margin-block: clamp(24px, 4vw, 48px); }
.n-casepage__results h2, .n-curriculum h2, .n-audience h2, .n-faq h2 {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	margin-bottom: 8px;
}

/* Gallery */
.n-gallery { margin-block: clamp(24px, 4vw, 56px); }

.n-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-flow: dense;
	gap: clamp(12px, 2vw, 22px);
}

.n-gallery__item:nth-child(5n+1) { grid-column: span 2; grid-row: span 2; }

.n-gallery__zoom {
	border: 0;
	padding: 0;
	background: none;
	cursor: zoom-in;
	border-radius: var(--r-md);
	overflow: hidden;
	width: 100%;
	height: 100%;
	min-height: 200px;
	box-shadow: var(--shadow-sm);
}

.n-gallery__zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.n-gallery__zoom:hover img { transform: scale(1.05); }

/* Case footer CTA */
.n-casepage__foot { margin-top: clamp(48px, 7vw, 96px); }

.n-casepage__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	background:
		radial-gradient(420px 220px at 15% 0%, rgba(139, 124, 246, .16), transparent 70%),
		var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-xl);
	padding: clamp(28px, 5vw, 52px);
}

.n-casepage__cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

.n-nextcase {
	display: block;
	margin-top: 20px;
	background: var(--ink);
	color: var(--paper);
	transition: background-color .4s ease;
}

.n-nextcase:hover { background: #241E33; }

.n-nextcase__inner {
	display: flex;
	align-items: center;
	gap: 18px;
	padding-block: clamp(24px, 3.5vw, 40px);
}

.n-nextcase small { opacity: .65; font-size: .85rem; flex: 1; }
.n-nextcase b { font-size: clamp(1.2rem, 2.6vw, 1.9rem); font-weight: 800; }

.n-nextcase__arrow {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: rgba(250, 246, 238, .12);
	transition: transform .4s var(--ease-out), background-color .3s ease;
}
.n-nextcase__arrow .n-icon { width: 21px; height: 21px; transform: scaleX(-1); }
.n-nextcase:hover .n-nextcase__arrow { transform: translateX(-8px); background: rgba(250, 246, 238, .2); }

/* ---------- Course page ---------- */
.n-coursepage .n-curriculum, .n-coursepage .n-audience, .n-coursepage .n-faq {
	margin-block: clamp(24px, 4vw, 56px);
}

.n-curriculum__list { margin-top: 26px; display: grid; gap: 10px; counter-reset: lesson; }

.n-curriculum__chapter {
	font-weight: 800;
	font-size: 1.05rem;
	margin-top: 18px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.n-curriculum__chapter::before {
	content: "";
	width: 26px;
	height: 26px;
	border-radius: 9px;
	background: var(--grad-warm);
	flex: none;
}

.n-curriculum__item {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: 15px 20px;
	counter-increment: lesson;
}

.n-curriculum__item::before {
	content: counter(lesson, decimal-leading-zero);
	font-family: var(--font-lt);
	font-weight: 600;
	color: var(--indigo);
	font-size: .9rem;
}

.n-faq__list { margin-top: 26px; display: grid; gap: 12px; max-width: 820px; }

.n-faq__item {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: 0;
	overflow: hidden;
	transition: border-color .3s ease;
}

.n-faq__item[open] { border-color: rgba(79, 70, 229, .35); }

.n-faq__item summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	font-weight: 700;
}

.n-faq__item summary::-webkit-details-marker { display: none; }

.n-faq__item summary i {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(79, 70, 229, .08);
	color: var(--indigo-deep);
	flex: none;
	transition: transform .4s var(--ease-out), background .3s ease;
}
.n-faq__item summary i .n-icon { width: 16px; height: 16px; }

.n-faq__item[open] summary i { transform: rotate(135deg); background: var(--grad-main); color: #fff; }

.n-faq__answer { padding: 0 24px 22px; color: var(--ink-2); }

/* ---------- Page templates (About / Contact) ---------- */
.n-aboutpage .n-intro { padding-top: clamp(24px, 4vw, 48px); }
.n-aboutpage .n-prose + .n-intro { margin-top: clamp(24px, 4vw, 56px); }

.n-aboutcta { padding-block: clamp(48px, 7vw, 96px); }
.n-aboutcta__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	background:
		radial-gradient(420px 220px at 85% 0%, rgba(139, 124, 246, .16), transparent 70%),
		var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-xl);
	padding: clamp(28px, 5vw, 52px);
}
.n-aboutcta__inner h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* ---------- Lightbox dialog ---------- */
.n-lightbox {
	border: 0;
	padding: 0;
	background: transparent;
	max-width: 94vw;
	max-height: 94vh;
	margin: auto;
	overscroll-behavior: contain;
}

.n-lightbox::backdrop { background: rgba(25, 21, 36, .78); backdrop-filter: blur(6px); }
.n-lightbox img { max-width: 94vw; max-height: 94vh; border-radius: var(--r-md); }

/* ---------- 404 ---------- */
.n-404 { min-height: calc(100svh - var(--header-h)); display: grid; align-items: center; position: relative; overflow: clip; }

.n-404__inner { text-align: center; position: relative; z-index: 1; }

.n-404__code {
	font-family: var(--font-lt);
	font-size: clamp(6rem, 22vw, 13rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -.04em;
	display: inline-flex;
	gap: .04em;
}

.n-404__code span:nth-child(1) { animation: n-bob 5s ease-in-out infinite; }
.n-404__code span:last-child { animation: n-bob 5s ease-in-out -2.4s infinite; }

@keyframes n-bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-14px); }
}

.n-404__title { font-size: clamp(1.5rem, 3.4vw, 2.4rem); margin-block: 18px 10px; }
.n-404__sub { color: var(--ink-2); margin-bottom: 32px; }
.n-404__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
	.n-404__code span { animation: none !important; }
}

@media (max-width: 720px) {
	.n-postnav { grid-template-columns: 1fr; }
	.n-gallery__grid { grid-template-columns: 1fr 1fr; }
	.n-gallery__item:nth-child(n) { grid-column: span 1; grid-row: span 1; }
	.n-gallery__item:nth-child(5n+1) { grid-column: span 2; }
	.n-casepage__facts { gap: 14px 24px; }
}
