/* Neborak global styles — reset, reveal animation, header states, mobile nav. */

* { box-sizing: border-box; }
body { margin: 0; }
::selection { background: #ef5249; color: #fff; }

a { color: inherit; }
img, video { max-width: 100%; display: block; }

/* Shared buttons (designer card/CTA actions), available site-wide. */
.neb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	border-radius: 9px;
	font: 700 14px var( --wp--preset--font-family--body );
	cursor: pointer;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.neb-btn--primary { background: #ef5249; color: #fff; }
.neb-btn--primary:hover { transform: translateY( -2px ); box-shadow: 0 10px 24px rgba( 239, 82, 73, 0.32 ); }
.neb-btn--ghost { background: transparent; color: #0e1f27; border-color: #d7e0e0; }
.neb-btn--ghost:hover { border-color: #0e1f27; }

/* Scroll-reveal: visible by default so a stalled/blocked script never hides content. */
.neb-rev { opacity: 1; }
@keyframes neb-in {
	from { opacity: 0; transform: translateY( 26px ); }
	to { opacity: 1; transform: none; }
}
.neb-ready .neb-rev.in {
	animation: neb-in 0.8s cubic-bezier( 0.2, 0.7, 0.2, 1 ) forwards;
}
@media ( prefers-reduced-motion: reduce ) {
	.neb-rev, .neb-ready .neb-rev.in { animation: none !important; opacity: 1 !important; }
}

/* Marquee strip (used by news ticker / impact strip blocks). */
@keyframes neb-marquee {
	from { transform: translateX( 0 ); }
	to { transform: translateX( -50% ); }
}
@media ( prefers-reduced-motion: reduce ) {
	.neb-marquee-track { animation: none !important; }
}

/* Gentle float (decorative elements, per designer). */
@keyframes neb-float {
	0% { transform: translateY( 0 ); }
	50% { transform: translateY( -10px ); }
	100% { transform: translateY( 0 ); }
}

/* Fixed header must clear the WP admin bar when logged in, otherwise the menu
   hides behind it (32px desktop / 46px on narrow screens). */
.admin-bar .neb-site-header { top: 32px; }
@media screen and ( max-width: 782px ) {
	.admin-bar .neb-site-header { top: 46px; }
}

/* RAS infographic shared animations. */
@keyframes neb-pulse {
	0%, 100% { transform: scale( 1 ); box-shadow: 0 0 0 0 rgba( 239, 82, 73, 0.45 ); }
	50% { transform: scale( 1.25 ); box-shadow: 0 0 0 6px rgba( 239, 82, 73, 0 ); }
}
@keyframes neb-flow {
	from { background-position: 0 0; }
	to { background-position: 200% 0; }
}
.neb-flowline {
	height: 2px;
	border-radius: 2px;
	background: linear-gradient( 90deg, #0e1f27 0%, #0e1f27 35%, #ef5249 50%, #0e1f27 65%, #0e1f27 100% );
	background-size: 200% 100%;
	animation: neb-flow 3.2s linear infinite;
}
.neb-node { animation: neb-pulse 2.4s ease-in-out infinite; }
@media ( prefers-reduced-motion: reduce ) {
	.neb-flowline { animation: none !important; background: #0e1f27 !important; }
	.neb-node { animation: none !important; }
}

/* Site header — transparent over hero, solid once scrolled. */
.neb-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	background: rgba( 4, 24, 31, 0 );
	backdrop-filter: blur( 14px );
	border-bottom: 1px solid rgba( 255, 255, 255, 0 );
	transition: background 0.4s ease, border-color 0.4s ease;
}
.neb-site-header.is-scrolled {
	background: rgba( 4, 24, 31, 0.92 );
	border-bottom-color: rgba( 255, 255, 255, 0.1 );
}
/* Home = cinematic transparent header over the dark hero. Inner pages have a
   light hero, so the header is solid dark from the top to keep the white logo /
   menu readable (no white-on-light invisibility). */
body:not( .home ):not( .front-page ) .neb-site-header {
	background: rgba( 4, 24, 31, 0.96 );
	border-bottom-color: rgba( 255, 255, 255, 0.1 );
}
.neb-header-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: clamp( 14px, 2.2vw, 18px ) clamp( 20px, 5vw, 56px );
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.neb-desknav { display: none; gap: 30px; font-size: 14px; font-weight: 500; list-style: none; margin: 0; padding: 0; }
.neb-desknav li, .neb-drawer nav li, .neb-site-footer nav li { list-style: none; margin: 0; padding: 0; }
.neb-desknav > li { position: relative; }
.neb-desknav a { text-decoration: none; transition: color 0.2s; color: #fff; white-space: nowrap; }
.neb-desknav a:hover, .neb-desknav .current-menu-item > a { color: #ef5249; }

/* Desktop dropdown submenus (menu items moved into a child show here). */
.neb-desknav .menu-item-has-children > a::after {
	content: "▾";
	font-size: 10px;
	margin-left: 6px;
	opacity: 0.7;
}
.neb-desknav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	margin: 0;
	padding: 8px;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 2px;
	background: rgba( 4, 24, 31, 0.97 );
	backdrop-filter: blur( 14px );
	border: 1px solid rgba( 255, 255, 255, 0.1 );
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba( 0, 0, 0, 0.35 );
	opacity: 0;
	visibility: hidden;
	transform: translateY( 6px );
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 60;
}
/* Transparent bridge so the dropdown stays open while the cursor crosses the gap. */
.neb-desknav .sub-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.neb-desknav li:hover > .sub-menu,
.neb-desknav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY( 10px ); }
.neb-desknav .sub-menu li { width: 100%; }
.neb-desknav .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.neb-desknav .sub-menu a:hover { background: rgba( 255, 255, 255, 0.08 ); color: #ef5249; }

/* Mobile drawer: nested children indented under their parent. */
.neb-drawer .sub-menu {
	list-style: none;
	margin: 12px 0 0;
	padding: 0 0 0 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	border-left: 1px solid rgba( 255, 255, 255, 0.16 );
	font-size: 17px;
}
/* Header CTA — brand coral (Styleguide primary). */
.neb-headcta {
	display: none;
	background: #ef5249;
	color: #fff;
	border: none;
	padding: 11px 18px;
	border-radius: 9px;
	font: 700 13px var( --wp--preset--font-family--body );
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 6px 16px rgba( 239, 82, 73, 0.24 );
}
.neb-headcta:hover { transform: translateY( -2px ); box-shadow: 0 10px 22px rgba( 239, 82, 73, 0.34 ); }

/* Logo (custom logo image or text fallback). */
.neb-logo { display: inline-flex; align-items: center; text-decoration: none; }
.neb-logo__text { color: #fff; font-family: var( --wp--preset--font-family--heading ); font-size: 22px; font-weight: 700; }
.neb-site-header .custom-logo-link { display: inline-flex; align-items: center; }
.neb-site-header .custom-logo,
.neb-logo img { height: 28px; width: auto; display: block; }
.neb-burger {
	display: flex;
	background: transparent;
	border: none;
	cursor: pointer;
	width: 34px;
	height: 34px;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	padding: 0;
}
.neb-burger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }

.neb-drawer {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 60;
	background: #04181f;
	color: #fff;
	padding: 24px;
	flex-direction: column;
}
.neb-drawer.is-open { display: flex; }
.neb-drawer nav { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; font-size: 22px; }
.neb-drawer a { text-decoration: none; color: #fff; }
body.neb-menu-open { overflow: hidden; }

@media ( min-width: 880px ) {
	.neb-desknav { display: flex; }
	.neb-headcta { display: inline-flex; }
	.neb-burger { display: none; }
}

/* Lang toggle (shared header component). */
.neb-lang-toggle {
	display: flex;
	border: 1px solid rgba( 255, 255, 255, 0.3 );
	border-radius: 8px;
	overflow: hidden;
	font-family: var( --wp--preset--font-family--mono );
	font-weight: 500;
	font-size: 11px;
}
.neb-lang-toggle a {
	border: none;
	cursor: pointer;
	padding: 7px 11px;
	text-decoration: none;
	color: rgba( 255, 255, 255, 0.6 );
	transition: all 0.2s;
}
.neb-lang-toggle a:hover { color: #fff; }
.neb-lang-toggle a.is-current { background: #ef5249; color: #fff; }

/* Lead modal — native popup (no plugin), ТЗ §6. */
.neb-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.neb-modal.is-open { display: flex; }
.neb-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 4, 24, 31, 0.7 );
}
.neb-modal__panel {
	position: relative;
	background: #fff;
	color: #0e1f27;
	border-radius: 18px;
	padding: 32px 24px;
	max-width: 440px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
}
.neb-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #5e6f76;
	width: 44px;
	height: 44px;
}
.neb-modal__panel h2 {
	font-family: var( --wp--preset--font-family--heading );
	font-size: 22px;
	margin: 0 0 20px;
}

/* Shared lead-form field states: default / focus / error / success. */
[data-neb-lead-form] { display: grid; gap: 14px; }
[data-neb-lead-form] label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
[data-neb-lead-form] input,
[data-neb-lead-form] textarea,
[data-neb-lead-form] select {
	font: inherit;
	padding: 12px 14px;
	border: 1px solid #dce5e6;
	border-radius: 10px;
	background: #fff;
	color: #0e1f27;
}
[data-neb-lead-form] input:focus,
[data-neb-lead-form] textarea:focus,
[data-neb-lead-form] select:focus {
	outline: none;
	border-color: #14647a;
	box-shadow: 0 0 0 3px rgba( 20, 100, 122, 0.18 );
}
[data-neb-lead-form] input:invalid:not(:placeholder-shown) {
	border-color: #ef5249;
}
[data-neb-lead-form] button[type="submit"] {
	margin-top: 4px;
	background: #ef5249;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 14px 20px;
	font-weight: 700;
	cursor: pointer;
	min-height: 44px;
}
[data-neb-lead-form] button[type="submit"]:disabled { opacity: 0.6; cursor: default; }
.neb-form-status { margin: 0; font-size: 13px; }
.neb-form-status.is-success { color: #1a7f4b; }
.neb-form-status.is-error { color: #c0392b; }

/* Generic inner-page hero + body (templates/page.html). */
.neb-page-hero { padding: 140px 20px 50px; background: #eef6f7; }
.neb-page-hero__inner { max-width: 760px; margin: 0 auto; }
.neb-page-hero__title { font-family: var( --wp--preset--font-family--heading ); font-size: clamp( 30px, 4vw, 46px ); letter-spacing: -.015em; line-height: 1.1; margin: 0; }
.neb-page-hero__lead { font-size: 17px; color: #5e6f76; margin: 14px 0 0; max-width: 56ch; }
@media ( min-width: 768px ) { .neb-page-hero { padding: 160px 40px 64px; } }

.neb-page-body { padding: 48px 20px 80px; }
.neb-page-body .entry-section + .entry-section { margin-top: 36px; }
.neb-page-body h2 { font-family: var( --wp--preset--font-family--heading ); font-size: clamp( 24px, 3vw, 32px ); letter-spacing: -.01em; line-height: 1.18; }
.neb-page-body p { font-size: 16px; line-height: 1.6; color: #2c3a3f; }
.neb-page-body ul, .neb-page-body ol { padding-left: 22px; line-height: 1.6; }
.neb-page-body li { margin-bottom: 6px; }
@media ( min-width: 768px ) { .neb-page-body { padding: 64px 40px 96px; } }

/* Article body typography (single post) — faithful to designer PAGE 11.
   Scoped to DIRECT children so full-bleed blocks in content (article-header,
   related, CTA) are NOT restyled; body text is centred at a readable 760px. */
.neb-article-body { padding: 0 0 clamp( 40px, 7vw, 64px ); }
.neb-article-body > p,
.neb-article-body > h2,
.neb-article-body > h3,
.neb-article-body > ul,
.neb-article-body > ol,
.neb-article-body > blockquote,
.neb-article-body > figure {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp( 20px, 5vw, 24px );
	padding-right: clamp( 20px, 5vw, 24px );
}
.neb-article-body > p { font-size: 18px; line-height: 1.75; color: #22343c; margin-top: 0; margin-bottom: 24px; }
.neb-article-body > h2 { font-family: var( --wp--preset--font-family--heading ); font-size: 28px; font-weight: 600; margin: 40px auto 16px; letter-spacing: -0.01em; }
.neb-article-body > h3 { font-family: var( --wp--preset--font-family--heading ); font-size: 22px; font-weight: 600; margin: 32px auto 12px; }
.neb-article-body > ul, .neb-article-body > ol { font-size: 18px; line-height: 1.75; color: #22343c; margin: 0 auto 24px; }
.neb-article-body > ul li, .neb-article-body > ol li { margin-bottom: 8px; }
.neb-article-body > figure img { border-radius: 14px; }
.neb-article-body > blockquote {
	margin-top: 32px;
	margin-bottom: 32px;
	padding: 24px 28px;
	border-left: 3px solid #ef5249;
	background: #f7fafa;
	border-radius: 0 12px 12px 0;
}
.neb-article-body > blockquote p {
	font-family: var( --wp--preset--font-family--heading );
	font-size: 22px;
	font-style: italic;
	line-height: 1.45;
	color: #0e1f27;
	margin: 0;
}

/* ============ FOOTER — 4-column, faithful structure ============ */
.neb-site-footer { background: #04181f; color: #fff; }
.neb-footer__inner { max-width: 1280px; margin: 0 auto; padding: clamp( 48px, 7vw, 72px ) clamp( 20px, 5vw, 56px ) 28px; }
.neb-footer__grid { display: grid; gap: 32px; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
.neb-footer__logo { font-family: var( --wp--preset--font-family--heading ); font-size: 20px; color: #fff; display: inline-block; }
.neb-site-footer .custom-logo { height: 28px; width: auto; }
.neb-footer__desc { color: rgba( 255, 255, 255, 0.6 ); max-width: 34ch; font-size: 14px; line-height: 1.6; margin: 14px 0 0; }
.neb-footer__social { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; }
.neb-footer__social a { color: rgba( 255, 255, 255, 0.72 ); text-decoration: none; transition: color 0.2s; }
.neb-footer__title { font-family: var( --wp--preset--font-family--mono ); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba( 255, 255, 255, 0.5 ); margin: 0 0 16px; font-weight: 600; }
.neb-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.neb-footer__menu li { margin: 0; }
.neb-footer__menu a,
.neb-footer__contact { color: rgba( 255, 255, 255, 0.78 ); text-decoration: none; font-size: 14px; line-height: 1.5; transition: color 0.2s; }
.neb-site-footer a:hover { color: #fff; }
.neb-footer__contacts { display: flex; flex-direction: column; gap: 10px; }
.neb-footer__route { color: #ff7a73; font-weight: 600; }
.neb-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid rgba( 255, 255, 255, 0.12 ); margin-top: 44px; padding-top: 18px; font-size: 13px; color: rgba( 255, 255, 255, 0.55 ); }
.neb-footer__legal a { color: inherit; text-decoration: none; margin-left: 20px; }
.neb-footer__legal a:first-child { margin-left: 0; }

@media ( max-width: 1023px ) {
	.neb-footer__grid { grid-template-columns: 1fr 1fr; }
	.neb-footer__brand { grid-column: 1 / -1; }
}
@media ( max-width: 600px ) {
	.neb-footer__grid { grid-template-columns: 1fr; }
	.neb-footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
	.neb-footer__legal a { margin-left: 0; margin-right: 18px; }
}
