/* ==========================================================================
   Секция 2 - „Силата е в двойката“: сцена Ян/Ин с S-линия, двете двойки
   ========================================================================== */

.nd-pairs {
	position: relative; overflow: clip;
	padding: clamp(80px, 9vw, 140px) 0 clamp(70px, 8vw, 120px);
	background:
		radial-gradient(50% 40% at 0% 0%, rgba(233, 196, 120, .16), transparent 70%),
		radial-gradient(40% 40% at 100% 100%, rgba(110, 166, 144, .12), transparent 70%),
		var(--paper);
}

/* --- заглавие --- */
.nd-pairs__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 24px clamp(32px, 5vw, 96px); margin-bottom: clamp(32px, 4vw, 52px); }
.nd-pairs__eyebrow { gap: 12px; margin-bottom: 20px; }
.nd-pairs__eyebrow::before { display: none; }
.nd-pairs__title { margin: 0; font-size: clamp(2.4rem, 4.6vw, 4.3rem); font-weight: 280; line-height: 1.02; letter-spacing: -.035em; color: var(--ink); }
.nd-pairs__title em {
	display: block; font-style: normal; font-weight: 330;
	background: var(--gold-grad); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
	padding-bottom: .08em; animation: ndSheen 9s ease-in-out infinite alternate;
}
.nd-pairs__intro { max-width: 560px; font-size: clamp(1.05rem, 1.25vw, 1.18rem); line-height: 1.6; color: var(--ink-2); }
.nd-pairs__intro p { margin: 0 0 12px; }
.nd-pairs__intro p:last-child { margin: 0; }
.nd-pairs__intro strong { font-weight: 600; color: var(--ink); }
.nd-pairs__yang { color: var(--gold-700); font-weight: 650; }
.nd-pairs__yin { color: var(--jade-700); font-weight: 650; }

/* --- табове --- */
.nd-pairs__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 22px; }
.nd-pairs__tab {
	display: inline-flex; align-items: center; gap: 12px; padding: 9px 22px 9px 10px; border: 0; border-radius: 999px; cursor: pointer;
	background: rgba(255, 253, 248, .7); color: var(--ink); text-align: left; line-height: 1.2;
	box-shadow: inset 0 0 0 1px var(--line);
	transition: background-color .35s var(--ease), box-shadow .35s var(--ease), color .35s;
}
.nd-pairs__tab b { display: block; font-size: .95rem; font-weight: 600; }
.nd-pairs__tab small { display: block; font-size: .8rem; color: var(--muted); }
.nd-pairs__tab:hover { box-shadow: inset 0 0 0 1px var(--line-2); background: #fffdf8; }
.nd-pairs__tab.is-on { background: var(--jade-800); color: #fbf6ea; box-shadow: none; }
.nd-pairs__tab.is-on small { color: var(--gold-300); }
.nd-pairs__tab:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; }
.nd-pairs__dots { position: relative; width: 36px; height: 36px; border-radius: 50%; background: #fffdf8; box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.nd-pairs__dots i { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; }
.nd-pairs__dots i:first-child { left: 5px; background: var(--gold-grad); }
.nd-pairs__dots i:last-child { right: 5px; background: var(--jade-700); }
.nd-pairs__tab.is-on .nd-pairs__dots { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(230, 203, 140, .4); }

/* --- сцената --- */
.nd-pairs__stage {
	--seam: 50%;
	position: relative; isolation: isolate; display: grid;
	border-radius: clamp(24px, 3vw, 40px); overflow: hidden;
	background: linear-gradient(90deg, #f3e4bd 50%, #163a2e 50%); /* без JS */
	box-shadow: 0 40px 80px -40px rgba(19, 35, 28, .45), 0 0 0 1px rgba(19, 35, 28, .06);
}
.nd-pairs__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.nd-pairs__seam { stroke-width: 2.5; stroke-linecap: round; }
.nd-pairs__bg::after { content: none; }

.nd-pairs__set {
	grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	padding: clamp(48px, 5vw, 76px) clamp(28px, 4vw, 64px) clamp(120px, 11vw, 150px);
}
.nd-pairs__set[hidden] { display: none; }

.nd-pole { display: grid; align-items: center; gap: clamp(20px, 2.6vw, 44px); min-width: 0; }
.nd-pole--yang { grid-template-columns: minmax(0, 1fr) auto; color: var(--ink); padding-right: clamp(24px, 3.2vw, 52px); }
.nd-pole--yin { grid-template-columns: auto minmax(0, 1fr); color: #eef3ef; padding-left: clamp(24px, 3.2vw, 52px); }
.nd-pole--yin .nd-pole__prod { order: -1; }
.nd-pole--yang .nd-pole__prod { order: 2; }

/* продуктът в „окото“ на своята половина */
.nd-pole__prod { position: relative; display: block; width: clamp(180px, 16.5vw, 250px); aspect-ratio: 1; transition: transform .8s var(--ease), translate .8s var(--ease); }
.nd-pole--yang .nd-pole__prod { translate: 0 -7%; }
.nd-pole--yin .nd-pole__prod { translate: 0 9%; }
.nd-pairs__stage[data-set="1"] .nd-pole--yang .nd-pole__prod { translate: 0 9%; }
.nd-pairs__stage[data-set="1"] .nd-pole--yin .nd-pole__prod { translate: 0 -7%; }
.nd-pole__eye { position: absolute; inset: 2%; border-radius: 50%; transition: transform .8s var(--ease), box-shadow .8s var(--ease); }
.nd-pole--yang .nd-pole__eye { background: radial-gradient(circle at 34% 30%, #3f7a63, #1b4537 58%, #0f2a21); box-shadow: 0 30px 50px -24px rgba(9, 30, 22, .7), inset 0 0 0 1px rgba(236, 208, 138, .35); }
.nd-pole--yin .nd-pole__eye { background: radial-gradient(circle at 34% 30%, #fff4d6, #ecc979 50%, #b8872f); box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .4); }
.nd-pole__prod img { position: absolute; left: 50%; bottom: 8%; width: 76%; translate: -50% 0; filter: drop-shadow(0 22px 22px rgba(10, 25, 19, .4)); transition: transform .8s var(--ease); }
.nd-pole:hover .nd-pole__prod img, .nd-pole:focus-within .nd-pole__prod img { transform: translateY(-12px) scale(1.03); }
.nd-pole:hover .nd-pole__eye, .nd-pole:focus-within .nd-pole__eye { transform: scale(1.05); }

/* текстът */
.nd-pole__txt { max-width: 330px; }
.nd-pole--yang .nd-pole__txt { justify-self: end; text-align: right; }
.nd-pole__tag { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .74rem; font-weight: 640; letter-spacing: .18em; text-transform: uppercase; }
.nd-pole--yang .nd-pole__tag { flex-direction: row-reverse; color: var(--gold-700); }
.nd-pole--yin .nd-pole__tag { color: var(--gold-300); }
.nd-pole__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; }
.nd-pole--yang .nd-pole__ic { background: var(--gold-grad) border-box; color: var(--jade-950); }
.nd-pole--yin .nd-pole__ic { background: rgba(255, 255, 255, .1); color: var(--gold-300); box-shadow: inset 0 0 0 1px rgba(230, 203, 140, .4); }
.nd-pole__name { margin: 0 0 6px; font-size: clamp(1.6rem, 2.2vw, 2.15rem); font-weight: 330; line-height: 1.08; letter-spacing: -.02em; color: var(--ink); }
.nd-pole--yin .nd-pole__name { color: #fbf6ea; }
.nd-pole__kw { margin: 0 0 14px; font-size: .98rem; font-style: oblique 9deg; }
.nd-pole--yang .nd-pole__kw { color: var(--gold-700); }
.nd-pole--yin .nd-pole__kw { color: var(--jade-300); }
.nd-pole__d { margin: 0 0 18px; font-size: .98rem; line-height: 1.55; }
.nd-pole--yang .nd-pole__d { color: var(--ink-2); }
.nd-pole--yin .nd-pole__d { color: #c9d6cf; }
.nd-pole__buy { display: flex; align-items: center; gap: 16px; margin: 0; }
.nd-pole--yang .nd-pole__buy { justify-content: flex-end; }
.nd-pole__price { font-size: 1.2rem; font-weight: 600; }
.nd-pole__go { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 560; color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.nd-pole--yang .nd-pole__go { color: var(--jade-800); }
.nd-pole--yin .nd-pole__go { color: var(--gold-300); }
.nd-pole__go .nd-i { transition: transform .4s var(--ease); }
.nd-pole__go:hover .nd-i { transform: translateX(3px); }

/* „Заедно“ - върху линията */
.nd-pairs__join {
	position: absolute; left: var(--seam); bottom: clamp(26px, 3vw, 40px); z-index: 2; translate: -50% 0; width: max-content; max-width: calc(100% - 32px);
	display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 12px; border-radius: 999px;
	background: #fffdf8; color: var(--ink); line-height: 1.22;
	box-shadow: 0 0 0 1px rgba(201, 154, 62, .5), 0 0 0 6px rgba(236, 208, 138, .2), 0 24px 50px -20px rgba(9, 25, 19, .6);
	transition: transform .6s var(--ease), box-shadow .6s, left .9s var(--ease);
}
.nd-pairs__join:hover { transform: translateY(-4px); }
.nd-pairs__join .nd-pair__yy { --s: 48px; transition: transform 1.2s var(--ease); }
.nd-pairs__join:hover .nd-pair__yy { transform: rotate(180deg); }
.nd-pairs__jt { display: grid; gap: 1px; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.nd-pairs__jt small { font-size: .66rem; font-weight: 640; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-700); }
.nd-pairs__jt b { font-size: 1.06rem; font-weight: 580; color: var(--ink); }
.nd-pairs__jt strong { color: var(--ink); font-weight: 650; }
.nd-pairs__jgo { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; padding: 12px 14px 12px 20px; border-radius: 999px; background: var(--jade-800); color: #fbf6ea; font-size: .92rem; font-weight: 560; white-space: nowrap; }
.nd-pairs__jgo .nd-i { color: var(--gold-300); transition: transform .4s var(--ease); }
.nd-pairs__join:hover .nd-pairs__jgo .nd-i { transform: translateX(3px); }

/* --- другите нужди --- */
.nd-pairs__needs { margin-top: clamp(40px, 5vw, 64px); text-align: center; }
.nd-pairs__nh { margin: 0 0 18px; font-size: clamp(1.15rem, 1.5vw, 1.4rem); font-weight: 360; color: var(--ink); }
.nd-pairs__nh em { font-style: oblique 9deg; color: var(--gold-700); }
.nd-pairs__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nd-pairs__chips a {
	display: inline-flex; align-items: center; gap: 10px; padding: 7px 18px 7px 7px; border-radius: 999px;
	background: #fffdf8; color: var(--ink); font-size: .94rem; text-decoration: none;
	box-shadow: inset 0 0 0 1px var(--line), 0 6px 16px -12px rgba(19, 35, 28, .4);
	transition: transform .4s var(--ease), box-shadow .4s, background-color .4s;
}
.nd-pairs__chips a:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 26px -14px rgba(19, 35, 28, .45); }
.nd-pairs__ci { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 1.15rem; color: var(--gold-700); background: radial-gradient(circle at 35% 30%, #fffdf6, #f3e9d2); box-shadow: inset 0 0 0 1px rgba(173, 129, 48, .3); }

/* --- поява и смяна --- */
.nd-anim .nd-pairs__stage .nd-pole__eye { transform: scale(.6); opacity: 0; }
.nd-anim .nd-pairs__stage .nd-pole__prod img { opacity: 0; translate: -50% 40px; }
.nd-anim .nd-pairs__stage .nd-pole__txt, .nd-anim .nd-pairs__stage .nd-pairs__join { opacity: 0; }
.nd-anim .nd-pairs__stage.is-in .nd-pole__eye { transform: none; opacity: 1; transition: transform 1.4s var(--ease) .5s, opacity 1s var(--ease) .5s, box-shadow .8s; }
.nd-anim .nd-pairs__stage.is-in .nd-pole__prod img { opacity: 1; translate: -50% 0; transition: opacity 1s var(--ease) .8s, translate 1.3s var(--ease) .8s, transform .8s var(--ease); }
.nd-anim .nd-pairs__stage.is-in .nd-pole__txt { opacity: 1; transition: opacity 1.1s var(--ease) 1s; }
.nd-anim .nd-pairs__stage.is-in .nd-pairs__join { opacity: 1; transition: opacity 1s var(--ease) 1.4s, transform .6s var(--ease), box-shadow .6s, left .9s var(--ease); }
.nd-anim .nd-pairs__stage.is-in .nd-pole:hover .nd-pole__eye { transform: scale(1.05); }
.nd-anim .nd-pairs__stage.is-in .nd-pole--yin .nd-pole__eye, .nd-anim .nd-pairs__stage.is-in .nd-pole--yin .nd-pole__prod img { transition-delay: .7s, .7s, 0s; }
/* смяната на двойките: старата се разделя към краищата, новата идва от линията */
.nd-pairs__set.is-out .nd-pole--yang { animation: prOutL .5s var(--ease-io) forwards; }
.nd-pairs__set.is-out .nd-pole--yin { animation: prOutR .5s var(--ease-io) forwards; }
.nd-pairs__set.is-out .nd-pairs__join { animation: prFade .4s ease forwards; }
.nd-pairs__set.is-enter .nd-pole--yang { animation: prInL .9s var(--ease) both; }
.nd-pairs__set.is-enter .nd-pole--yin { animation: prInR .9s var(--ease) both .08s; }
.nd-pairs__set.is-enter .nd-pairs__join { animation: prFade .7s ease reverse both .3s; }
@keyframes prOutL { to { opacity: 0; transform: translateX(-40px); } }
@keyframes prOutR { to { opacity: 0; transform: translateX(40px); } }
@keyframes prInL { from { opacity: 0; transform: translateX(60px); } }
@keyframes prInR { from { opacity: 0; transform: translateX(-60px); } }
@keyframes prFade { to { opacity: 0; } }

/* --- отзивчивост --- */
@media (max-width: 1240px) {
	.nd-pole__prod { width: clamp(170px, 18vw, 230px); }
	.nd-pole--yang { padding-right: 34px; }
	.nd-pole--yin { padding-left: 34px; }
}
@media (max-width: 1024px) {
	.nd-pairs__head { grid-template-columns: minmax(0, 1fr); }
	.nd-pole--yang, .nd-pole--yin { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
	.nd-pole--yang .nd-pole__txt { justify-self: center; text-align: center; }
	.nd-pole--yang .nd-pole__prod { order: -1; }
	.nd-pole--yang .nd-pole__tag { flex-direction: row; }
	.nd-pole--yang .nd-pole__buy { justify-content: center; }
	.nd-pole__buy { justify-content: center; }
	.nd-pole__prod, .nd-pairs__stage[data-set] .nd-pole__prod { translate: 0 0; }
}
@media (max-width: 760px) {
	.nd-pairs__head { text-align: center; }
	.nd-pairs__eyebrow { justify-content: center; }
	.nd-pairs__intro { margin-inline: auto; }
	.nd-pairs__title { font-size: clamp(2.2rem, 9.5vw, 3rem); }
	.nd-pairs__tab { padding: 7px 16px 7px 7px; gap: 9px; }
	.nd-pairs__tab b { font-size: .86rem; }
	.nd-pairs__tab small { font-size: .74rem; }
	.nd-pairs__dots { width: 30px; height: 30px; }
	.nd-pairs__dots i { width: 11px; height: 11px; margin-top: -5.5px; }
	/* вертикално: Ян отгоре, Ин отдолу, линията е хоризонтална */
	.nd-pairs__set { grid-template-columns: minmax(0, 1fr); row-gap: 76px; padding: 36px 20px 28px; }
	.nd-pole--yang, .nd-pole--yin { padding: 0; gap: 18px; }
	.nd-pole__prod { width: min(230px, 62vw); }
	.nd-pairs__join { position: relative; left: auto; bottom: auto; translate: none; justify-self: center; margin-top: -40px; flex-wrap: wrap; justify-content: center; border-radius: 26px; padding: 12px; gap: 10px 12px; }
	.nd-pairs__jgo { margin: 0; }
	.nd-pairs__chips a { font-size: .86rem; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.nd-pairs__set.is-out *, .nd-pairs__set.is-enter * { animation: none !important; }
}
