/* =====================================================
   Components: header, nav, buttons, chips, cards, forms,
   footer, cursor, misc UI
   ===================================================== */

/* ---------- Header ---------- */
.n-header {
	position: fixed;
	inset-block-start: 0;
	inset-inline: 0;
	z-index: 100;
	transition: transform .45s var(--ease), background-color .35s ease, box-shadow .35s ease;
	background: transparent;
}

.n-header.is-scrolled {
	background: rgba(250, 246, 238, .78);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(25, 21, 36, .25);
}

.n-header.is-hidden { transform: translateY(-110%); }

.n-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
	height: var(--header-h);
}

.n-logo { display: inline-flex; align-items: center; gap: 12px; }

.n-logo__mark { display: inline-flex; filter: drop-shadow(0 6px 14px rgba(79, 70, 229, .28)); transition: transform .5s var(--ease-out); }
.n-logo:hover .n-logo__mark { transform: rotate(-8deg) scale(1.05); }

.n-logo__text { display: grid; line-height: 1.4; }
.n-logo__text strong { font-size: 1.02rem; font-weight: 800; }
.n-logo__text small {
	font-family: var(--font-lt);
	font-size: .58rem;
	letter-spacing: .34em;
	color: var(--ink-3);
	font-weight: 500;
}

.n-nav { margin-inline-start: auto; }
.n-nav__list { display: flex; gap: clamp(14px, 2vw, 30px); }

.n-nav__list a {
	position: relative;
	font-size: .95rem;
	font-weight: 500;
	color: var(--ink-2);
	padding: 8px 2px;
	transition: color .25s ease;
}

.n-nav__list a::after {
	content: "";
	position: absolute;
	bottom: 2px;
	inset-inline-start: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: var(--grad-main);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s var(--ease-out);
}

[dir="rtl"] .n-nav__list a::after { transform-origin: right; }

.n-nav__list a:hover,
.n-nav__list a:focus-visible { color: var(--ink); }
.n-nav__list a:hover::after { transform: scaleX(1); }

.n-header__actions { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; }
.n-nav + .n-header__actions { margin-inline-start: 0; }

/* ---------- Burger ---------- */
.n-burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 12px 10px;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
}

.n-burger span {
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: var(--ink);
	transition: transform .35s var(--ease), opacity .25s ease;
}

/* ---------- Buttons ---------- */
.n-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: .95rem;
	font-weight: 700;
	line-height: 1;
	padding: 17px 28px;
	border-radius: 999px;
	position: relative;
	isolation: isolate;
	transition: transform .35s var(--ease-out), box-shadow .35s ease, color .3s ease;
	will-change: transform;
	text-align: center;
}

.n-btn .n-icon { width: 19px; height: 19px; transition: transform .35s var(--ease-out); }

.n-btn--primary {
	background: linear-gradient(120deg, var(--indigo), var(--violet));
	color: #fff;
	box-shadow: 0 12px 30px -10px rgba(79, 70, 229, .55);
}

.n-btn--primary::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: linear-gradient(120deg, var(--violet), var(--coral));
	opacity: 0;
	transition: opacity .4s ease;
}

.n-btn--primary:hover { box-shadow: 0 18px 44px -12px rgba(139, 124, 246, .6); transform: translateY(-2px); }
.n-btn--primary:hover::after { opacity: 1; }

.n-btn--ghost {
	background: rgba(255, 255, 255, .55);
	color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line-strong);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.n-btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.n-btn--light {
	background: rgba(255, 255, 255, .92);
	color: var(--indigo-deep);
	box-shadow: 0 14px 36px -12px rgba(0, 0, 0, .45);
}

.n-btn--light:hover { transform: translateY(-2px); }
.n-btn--light:hover .n-icon { transform: translateX(6px); }
[dir="rtl"] .n-btn:hover .n-icon { transform: translateX(-6px); }
[dir="rtl"] .n-btn--light:hover .n-icon { transform: translateX(-6px); }

.n-linkline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--indigo-deep);
	position: relative;
	padding-bottom: 4px;
}

.n-linkline::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	bottom: 0;
	height: 2px;
	width: 100%;
	background: currentColor;
	transform: scaleX(.35);
	transform-origin: right;
	opacity: .35;
	transition: transform .4s var(--ease-out), opacity .3s ease;
}

.n-linkline:hover::after { transform: scaleX(1); opacity: 1; }
.n-linkline .n-icon { width: 18px; height: 18px; }
.n-linkline--sm { font-size: .9rem; }

/* ---------- Chips ---------- */
.n-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: .82rem;
	font-weight: 600;
	line-height: 1;
	padding: 9px 15px;
	border-radius: 999px;
}

.n-chip .n-icon { width: 15px; height: 15px; }
.n-chip--soft { background: rgba(79, 70, 229, .08); color: var(--indigo-deep); border: 1px solid rgba(79, 70, 229, .13); }
.n-chip--coral { background: rgba(255, 109, 77, .1); color: #D9431F; border: 1px solid rgba(255, 109, 77, .22); }
.n-chip--glass { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ---------- Mobile menu ---------- */
.n-mobile { position: fixed; inset: 0; z-index: 200; }

.n-mobile__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(25, 21, 36, .4);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity .4s ease;
}

.n-mobile.is-open .n-mobile__backdrop { opacity: 1; }

.n-mobile__panel {
	position: absolute;
	inset-block: 0;
	inset-inline-end: 0;
	width: min(86vw, 400px);
	background: var(--paper);
	box-shadow: -20px 0 80px rgba(25, 21, 36, .25);
	border-start-start-radius: var(--r-xl);
	border-end-start-radius: var(--r-xl);
	padding: 24px clamp(20px, 5vw, 36px) 32px;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .5s var(--ease-out);
	overflow-y: auto;
}

[dir="rtl"] .n-mobile__panel { transform: translateX(-100%); }
.n-mobile.is-open .n-mobile__panel { transform: translateX(0); }

.n-mobile__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.n-mobile__title { font-family: var(--font-lt); letter-spacing: .2em; color: var(--ink-3); font-size: .8rem; }
.n-mobile__close {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	cursor: pointer;
}
.n-mobile__close .n-icon { width: 20px; height: 20px; }

.n-mobile__list { display: grid; gap: 4px; }
.n-mobile__list a {
	display: block;
	font-size: clamp(1.4rem, 6vw, 1.7rem);
	font-weight: 800;
	padding: 12px 4px;
	border-bottom: 1px solid var(--line);
	transition: color .25s ease, padding-inline-start .3s var(--ease);
}
.n-mobile__list a:hover { color: var(--indigo); padding-inline-start: 10px; }

.n-mobile__socials { margin-top: auto; padding-top: 28px; display: flex; gap: 12px; }

/* ---------- Footer ---------- */
.n-footer {
	position: relative;
	margin-top: clamp(64px, 10vw, 120px);
	background:
		radial-gradient(900px 400px at 85% 0%, rgba(139, 124, 246, .09), transparent 60%),
		radial-gradient(700px 380px at 10% 100%, rgba(255, 109, 77, .07), transparent 60%),
		var(--paper-2);
	border-top: 1px solid var(--line);
	overflow: clip;
}

.n-footer__glow {
	position: absolute;
	inset-block-start: -1px;
	inset-inline: 10%;
	height: 1px;
	background: linear-gradient(to left, transparent, var(--indigo), var(--coral), transparent);
	opacity: .6;
}

.n-footer__inner { position: relative; padding-block: clamp(48px, 7vw, 88px) 28px; }

.n-footer__top {
	display: grid;
	grid-template-columns: 1.3fr .8fr 1fr;
	gap: clamp(28px, 5vw, 72px);
	padding-bottom: 48px;
	border-bottom: 1px solid var(--line);
}

.n-footer__mark {
	display: inline-grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: var(--grad-main);
	color: #fff;
	margin-bottom: 18px;
	box-shadow: 0 10px 26px -8px rgba(79, 70, 229, .5);
}
.n-footer__mark .n-icon { width: 22px; height: 22px; animation: n-spin-slow 14s linear infinite; }
@keyframes n-spin-slow { to { transform: rotate(360deg); } }

.n-footer__name { font-size: 1.3rem; font-weight: 800; }
.n-footer__tagline { color: var(--ink-2); margin-top: 6px; max-width: 30ch; }

.n-footer__col-title {
	font-family: var(--font-lt);
	font-size: .75rem;
	letter-spacing: .18em;
	color: var(--ink-3);
	margin-bottom: 18px;
	font-weight: 600;
}

.n-footer__links { display: grid; gap: 10px; }
.n-footer__links a { color: var(--ink-2); transition: color .25s ease, gap .25s ease; }
.n-footer__links a:hover { color: var(--indigo-deep); }

.n-footer__mail {
	display: inline-block;
	font-family: var(--font-lt);
	direction: ltr;
	unicode-bidi: isolate;
	color: var(--ink);
	font-weight: 600;
	margin-bottom: 18px;
	transition: color .25s ease;
}
.n-footer__mail:hover { color: var(--indigo); }

.n-socials { display: flex; gap: 10px; flex-wrap: wrap; }

.n-socials__item {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--ink-2);
	transition: all .35s var(--ease-out);
}
.n-socials__item .n-icon { width: 20px; height: 20px; }
.n-socials__item:hover {
	background: var(--grad-main);
	color: #fff;
	border-color: transparent;
	transform: translateY(-4px) rotate(-6deg);
	box-shadow: 0 12px 26px -8px rgba(79, 70, 229, .5);
}

.n-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 26px;
	color: var(--ink-3);
	font-size: .88rem;
}

.n-footer__made { display: inline-flex; align-items: center; gap: 8px; }
.n-footer__made .n-icon { width: 15px; height: 15px; color: var(--coral); }

.n-totop {
	position: fixed;
	inset-block-end: 26px;
	inset-inline-end: 26px;
	z-index: 90;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 0;
	background: var(--surface);
	color: var(--ink);
	box-shadow: var(--shadow-md);
	cursor: pointer;
	display: grid;
	place-items: center;
	opacity: 0;
	transform: translateY(16px) scale(.9);
	pointer-events: none;
	transition: all .4s var(--ease-out);
}

.n-totop.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.n-totop:hover { background: var(--ink); color: var(--paper); }
.n-totop .n-icon { width: 20px; height: 20px; }

/* ---------- Custom cursor ---------- */
.n-cursor {
	position: fixed;
	inset-block-start: 0;
	inset-inline-start: 0;
	z-index: 9999;
	width: 38px;
	height: 38px;
	border: 1.5px solid rgba(79, 70, 229, .55);
	border-radius: 50%;
	pointer-events: none;
	display: grid;
	place-items: center;
	opacity: 0;
	transition: width .3s var(--ease-out), height .3s var(--ease-out), background-color .3s ease, border-color .3s ease, opacity .3s ease;
	will-change: transform;
}

body.n-cursor-on .n-cursor { opacity: 1; }

.n-cursor__label {
	font-size: .72rem;
	font-weight: 700;
	color: #fff;
	opacity: 0;
	transition: opacity .25s ease;
	white-space: nowrap;
}

.n-cursor.is-active {
	width: 64px;
	height: 64px;
	background: rgba(79, 70, 229, .92);
	border-color: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.n-cursor.is-active .n-cursor__label { opacity: 1; }

.n-cursor.is-hidden { width: 14px; height: 14px; background: var(--indigo); border-color: transparent; }

@media (hover: none), (pointer: coarse) {
	.n-cursor { display: none; }
}

/* ---------- Forms ---------- */
.n-form {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: clamp(24px, 4vw, 40px);
	box-shadow: var(--shadow-md);
}

.n-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.n-field { display: grid; gap: 9px; margin: 0 0 18px; }

.n-field label {
	font-size: .9rem;
	font-weight: 700;
	color: var(--ink-2);
}

.n-field input,
.n-field textarea,
.n-field select {
	background: var(--paper);
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	padding: 14px 18px;
	transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
	width: 100%;
}

.n-field select { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 49%, var(--ink-3) 51%), linear-gradient(135deg, var(--ink-3) 49%, transparent 51%); background-position: calc(0% + 20px) 55%, calc(0% + 26px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }

.n-field input:focus,
.n-field textarea:focus,
.n-field select:focus {
	outline: none;
	border-color: var(--indigo);
	background: var(--surface);
	box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.n-field input.is-invalid,
.n-field textarea.is-invalid { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 109, 77, .12); }

.n-form__hp { position: absolute !important; inset-inline-start: -9999px !important; height: 0; opacity: 0; pointer-events: none; }

.n-form__foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }

.n-form__status { font-size: .92rem; font-weight: 600; color: var(--ink-2); margin: 0; }
.n-form__status.is-ok { color: #0E9F6E; }
.n-form__status.is-error { color: #D9431F; }

.n-btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Search ---------- */
.n-search { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; box-shadow: var(--shadow-sm); }
.n-search__field { flex: 1; border: 0; background: transparent; padding: 15px 22px; min-width: 0; }
.n-search__field:focus { outline: none; }
.n-search__btn { border: 0; background: var(--grad-main); color: #fff; padding: 0 20px; cursor: pointer; }
.n-search__btn .n-icon { width: 18px; height: 18px; }

/* ---------- Pagination ---------- */
.n-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 56px; }
.n-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding-inline: 12px;
	border-radius: 14px;
	background: var(--surface);
	border: 1px solid var(--line);
	font-weight: 700;
	font-family: var(--font-fa);
	transition: all .3s ease;
}
.n-pagination .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.n-pagination a.page-numbers:hover { border-color: var(--indigo); color: var(--indigo); transform: translateY(-2px); }
.n-pagination .page-numbers .n-icon { width: 18px; height: 18px; }

/* ---------- Comments ---------- */
.n-comments { margin-top: clamp(48px, 7vw, 80px); }
.n-comments__title { font-size: 1.4rem; margin-bottom: 28px; }

.n-comments__list { display: grid; gap: 18px; }
.comment-body {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	padding: 22px 26px;
}

.comment-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-meta img { border-radius: 50%; }
.comment-author { font-weight: 800; }
.comment-metadata a { color: var(--ink-3); font-size: .82rem; }

.children { list-style: none; padding-inline-start: 24px; display: grid; gap: 14px; margin-top: 14px; }

.reply a {
	display: inline-block;
	margin-top: 10px;
	font-size: .88rem;
	font-weight: 700;
	color: var(--indigo);
}

#commentform { display: grid; gap: 14px; }
#commentform p label { display: block; font-weight: 700; margin-bottom: 8px; font-size: .9rem; }
#commentform input:not([type="submit"]):not([type="checkbox"]),
#commentform textarea {
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: 14px;
	padding: 14px 18px;
}
#commentform .submit { justify-self: start; }
.comment-subscription-form { display: flex; align-items: center; gap: 8px; }

/* ---------- WP core alignment ---------- */
.alignwide { width: min(calc(100vw - 2 * clamp(16px, 3vw, 56px)), 1100px); margin-inline: auto; }
.alignfull { width: 100vw; margin-inline: calc((100vw - 100%) / -2); }

/* ---------- Responsive header ---------- */
@media (max-width: 920px) {
	.n-nav { display: none; }
	.n-burger { display: flex; }
	.n-header__cta { display: none; }
	.n-form__grid { grid-template-columns: 1fr; }
	.n-footer__top { grid-template-columns: 1fr; gap: 36px; }
	.n-footer__bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.n-eyebrow__dot { animation: none; }
	.n-footer__mark .n-icon { animation: none; }
}
