/*
Theme Name: Nov IT Pro
Author: Nov IT OÜ
Author URI: https://novit.ee
Description: Corporate theme for Nov IT: IT consulting, digital transformation, product development. Dark, lightweight, block-editor friendly.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: novit-pro
*/

/* ---------- Tokens ---------- */
:root {
	--bg: #0a0f1a;
	--bg-2: #0e1524;
	--surface: #121a2b;
	--surface-2: #172036;
	--line: #222d45;
	--line-2: #2c3a58;
	--text: #e7ebf3;
	--text-2: #aab3c5;
	--muted: #7d879b;
	--accent: #4f8cff;
	--accent-2: #7aa8ff;
	--accent-soft: rgba(79, 140, 255, .12);
	--ok: #34c58b;
	--warn: #f0b44c;
	--radius: 14px;
	--radius-sm: 9px;
	--container: 1200px;
	--font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
	--shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 17px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color .15s; }
a:hover { color: #fff; }
h1, h2, h3, h4 { color: #fff; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.9rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nv-skip:focus { position: fixed !important; top: 10px; left: 10px; width: auto; height: auto; clip: auto; z-index: 999; background: #fff; color: #000; padding: 8px 14px; border-radius: 6px; }

.nv-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.nv-muted { color: var(--muted); }
.nv-lead, .nv-content p.nv-lead { font-size: 1.2rem; color: var(--text-2); max-width: 760px; }

/* ---------- Buttons ---------- */
.nv-btn, .wp-block-button__link {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .85em 1.5em; border-radius: 10px;
	font: 600 1rem/1.2 var(--font); letter-spacing: .005em;
	border: 1px solid transparent; cursor: pointer;
	transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.nv-btn--primary, .wp-block-button__link { background: var(--accent); color: #fff; }
.nv-btn--primary:hover, .wp-block-button__link:hover { background: #3b78ec; color: #fff; transform: translateY(-1px); }
.nv-btn--sm { padding: .6em 1.1em; font-size: .92rem; }
.is-style-outline .wp-block-button__link, .nv-btn--ghost {
	background: transparent; color: var(--text); border-color: var(--line-2);
}
.is-style-outline .wp-block-button__link:hover, .nv-btn--ghost:hover { border-color: var(--accent); color: #fff; background: var(--accent-soft); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 0; }
.wp-block-button { margin: 0; }

/* ---------- Header ---------- */
.nv-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(10, 15, 26, .72);
	backdrop-filter: saturate(160%) blur(14px);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s, background .2s;
}
.nv-header.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 15, 26, .9); }
.nv-header__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.nv-logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; line-height: 1; }
.nv-logo__globe { width: 36px; height: 36px; flex: none; overflow: visible; filter: drop-shadow(0 0 8px rgba(94,225,255,.35)); transition: transform .6s ease, filter .3s; }
.nv-logo:hover .nv-logo__globe { transform: rotate(-20deg); filter: drop-shadow(0 0 12px rgba(94,225,255,.7)); }
.nv-footer .nv-logo__globe { width: 40px; height: 40px; }
.nv-logo:hover { color: #fff; }
.nv-logo__word {
	font-family: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
	font-weight: 600; font-size: 2.05rem; letter-spacing: -.015em; line-height: 1;
	color: #f2f5fb; padding-bottom: 3px;
}
.nv-logo__it {
	background: linear-gradient(110deg, #7aa8ff 0%, #5ee1ff 100%);
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
	filter: drop-shadow(0 0 12px rgba(94,225,255,.35));
}
.nv-logo:hover .nv-logo__it { filter: drop-shadow(0 0 16px rgba(94,225,255,.7)); }
.nv-footer .nv-logo__word { font-size: 2.3rem; }
.nv-nav { display: flex; align-items: center; gap: 28px; }
.nv-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nv-menu > li { position: relative; }
.nv-menu a { display: block; padding: 8px 12px; color: var(--text-2); font-size: .96rem; font-weight: 500; border-radius: 8px; }
.nv-menu a:hover, .nv-menu .current-menu-item > a, .nv-menu .current-menu-ancestor > a, .nv-menu .current_page_item > a { color: #fff; }
.nv-menu .current-menu-item > a, .nv-menu .current-menu-ancestor > a { background: rgba(255, 255, 255, .04); }
.nv-menu .sub-menu, .nv-menu .children {
	list-style: none; margin: 0; padding: 8px;
	position: absolute; top: calc(100% + 6px); left: 0; min-width: 270px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s;
}
.nv-menu li:hover > .sub-menu, .nv-menu li:focus-within > .sub-menu,
.nv-menu li:hover > .children, .nv-menu li:focus-within > .children { opacity: 1; visibility: visible; transform: none; }
.nv-menu .sub-menu a, .nv-menu .children a { padding: 10px 12px; }
.nv-menu .sub-menu a:hover, .nv-menu .children a:hover { background: var(--surface-2); }
.nv-menu .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); opacity: .7; }

/* Language switcher (ET · RU · EN) */
.nv-lang { list-style: none; margin: 0; padding: 3px; display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; }
.nv-lang a { display: block; padding: 4px 9px; border-radius: 999px; color: var(--text-2); font-size: .78rem; font-weight: 600; letter-spacing: .06em; line-height: 1.4; }
.nv-lang a:hover { color: #fff; }
.nv-lang a.is-current { color: #fff; background: rgba(122, 168, 255, .18); }

.nv-burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nv-burger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: .2s; }

@media (max-width: 960px) {
	/* backdrop-filter would make the header the containing block of the fixed menu
	   (menu sized to the header and pushing the page sideways) — solid background on mobile instead */
	.nv-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10, 15, 26, .97); }
	.nv-burger { display: block; }
	.nv-nav {
		position: fixed; top: 74px; left: 0; right: 0; bottom: 0; height: calc(100dvh - 74px); background: var(--bg);
		flex-direction: column; align-items: stretch; gap: 16px; padding: 24px;
		overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s;
	}
	.nv-nav-open .nv-nav { transform: none; visibility: visible; }
	.nv-nav-open { overflow: hidden; }
	.nv-nav-open .nv-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.nv-nav-open .nv-burger span:nth-child(2) { opacity: 0; }
	.nv-nav-open .nv-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.nv-menu { flex-direction: column; }
	.nv-menu a { font-size: 1.1rem; padding: 12px 8px; }
	.nv-menu .sub-menu, .nv-menu .children { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 14px; min-width: 0; }
	.nv-menu .menu-item-has-children > a::after { display: none; }
	.nv-header__cta { justify-content: center; }
	.nv-lang { align-self: flex-start; }
	.nv-lang a { font-size: .9rem; padding: 6px 14px; }
}

/* ---------- Page head ---------- */
.nv-pagehead {
	position: relative; padding: 84px 0 56px; border-bottom: 1px solid var(--line);
	background:
		radial-gradient(800px 320px at 85% -10%, rgba(79, 140, 255, .16), transparent 70%),
		linear-gradient(var(--bg), var(--bg-2));
	overflow: hidden;
}
.nv-pagehead::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; opacity: .25; mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.nv-pagehead .nv-container { position: relative; }
.nv-pagehead h1 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 900px; }
.nv-pagehead--center { text-align: center; padding: 120px 0; }
.nv-pagehead--center .nv-lead { margin: 0 auto 1.5em; }
.nv-pagehead__back { display: inline-block; margin-bottom: 18px; color: var(--muted); font-size: .92rem; }

/* Form */
.nv-form { display: grid; gap: 16px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.nv-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .nv-form__row { grid-template-columns: 1fr; } .nv-form { padding: 22px; } }
.nv-form label { display: grid; gap: 7px; font-size: .9rem; color: var(--text-2); }
.nv-form input[type=text], .nv-form input[type=email], .nv-form input[type=tel], .nv-form select, .nv-form textarea {
	width: 100%; padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
	background: var(--bg-2); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
.nv-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.nv-form input:focus, .nv-form select:focus, .nv-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nv-form__check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-size: .88rem; }
.nv-form__check input { margin-top: 4px; accent-color: var(--accent); }
.nv-form button { justify-self: start; }
.nv-hp { position: absolute !important; left: -9999px; }
.nv-alert { padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 18px; border: 1px solid; }
.nv-alert--ok { border-color: rgba(52, 197, 139, .4); background: rgba(52, 197, 139, .08); color: #b6f0d6; }
.nv-alert--error { border-color: rgba(240, 100, 100, .4); background: rgba(240, 100, 100, .08); color: #ffc9c9; }

/* ---------- Footer ---------- */
.nv-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 64px 0 0; margin-top: 0; }
.nv-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .nv-footer__grid { grid-template-columns: 1fr; } }
.nv-footer__brand p { color: var(--muted); margin-top: 18px; max-width: 360px; font-size: .95rem; }
.nv-footer__title { font: 600 .76rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 18px; }
.nv-footer__menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .95rem; color: var(--text-2); }
.nv-footer__menu a { color: var(--text-2); }
.nv-footer__menu a:hover { color: #fff; }
.nv-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 22px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* ---------- Elementor content helpers ---------- */
.nv-content { min-height: 40vh; }
.elementor ul:not([class]), .elementor ol:not([class]) { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; color: #aab3c5; font-size: 1rem; line-height: 1.55; }
.elementor ul:not([class]) > li { position: relative; padding-left: 30px; }
.elementor ul:not([class]) > li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: rgba(79,140,255,.12); box-shadow: inset 0 0 0 1px rgba(79,140,255,.45); }
.elementor ul:not([class]) > li::after { content: ""; position: absolute; left: 6.5px; top: calc(.3em + 4.5px); width: 5px; height: 8px; border: solid #7aa8ff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.elementor ul:not([class]) > li strong { color: #e7ebf3; }
.elementor a.e-paragraph-base, .elementor .e-paragraph-base a { color: #7aa8ff; }
.elementor .e-image-base img, .elementor img.e-image-base { display: block; width: 100%; height: auto; }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 48px auto; }
.nv-posts { display: grid; gap: 20px; padding-top: 56px; padding-bottom: 56px; }
