/* ===========================================================
   VARYScode — main.css
   Global tokens, reset, typography, layout primitives, utilities.
   Page-specific styles live in /pages/ and components in /components/.
   =========================================================== */

/* ---- Tokens ------------------------------------------------ */
:root {
	/* Color */
	--vc-bg:        #0A0A0F;
	--vc-bg-alt:    #11111A;
	--vc-bg-soft:   #1A1A24;
	--vc-fg:        #F5F5F7;
	--vc-fg-soft:   #C8C8D0;
	--vc-muted:     #8A8A95;
	--vc-line:      rgba(255,255,255,.08);
	--vc-line-strong: rgba(255,255,255,.16);
	--vc-accent:    #7C5CFF;
	--vc-accent-2:  #22D3EE;
	--vc-accent-soft: rgba(124,92,255,.16);

	/* Type */
	--vc-font-display: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--vc-font-body:    'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Sizing scale */
	--vc-text-xs:   .75rem;
	--vc-text-sm:   .875rem;
	--vc-text-base: 1rem;
	--vc-text-md:   1.125rem;
	--vc-text-lg:   1.375rem;
	--vc-text-xl:   1.75rem;
	--vc-text-2xl:  2.25rem;
	--vc-text-3xl:  3rem;
	--vc-text-4xl:  4rem;
	--vc-text-5xl:  5.5rem;

	/* Spacing scale (4px grid) */
	--vc-s-1:  4px;
	--vc-s-2:  8px;
	--vc-s-3:  12px;
	--vc-s-4:  16px;
	--vc-s-5:  20px;
	--vc-s-6:  24px;
	--vc-s-8:  32px;
	--vc-s-10: 40px;
	--vc-s-12: 48px;
	--vc-s-16: 64px;
	--vc-s-20: 80px;
	--vc-s-24: 96px;
	--vc-s-32: 128px;
	--vc-s-40: 160px;

	/* Layout */
	--vc-container: 1280px;
	--vc-container-narrow: 760px;
	--vc-radius-sm: 8px;
	--vc-radius:    14px;
	--vc-radius-lg: 24px;

	/* Motion */
	--vc-ease:      cubic-bezier(.2,.8,.2,1);
	--vc-ease-out:  cubic-bezier(.16,1,.3,1);
	--vc-ease-in:   cubic-bezier(.7,0,.84,0);
	--vc-dur-fast:  .18s;
	--vc-dur:       .3s;
	--vc-dur-slow:  .6s;

	/* Z-index */
	--vc-z-cursor:  100;
	--vc-z-cookie:  90;
	--vc-z-mobile-nav: 85;
	--vc-z-header:  80;
	--vc-z-modal:   70;
}

/* ---- Reset ------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; tab-size: 4; scroll-behavior: smooth; }
body {
	background: var(--vc-bg);
	color: var(--vc-fg);
	font-family: var(--vc-font-body);
	font-size: var(--vc-text-base);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	min-height: 100vh;
}
img, svg, video, canvas, picture { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--vc-dur) var(--vc-ease); }
a:hover { color: var(--vc-accent); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
ul, ol { padding: 0; margin: 0; list-style: none; }
figure { margin: 0; }
input, textarea, select { font: inherit; color: inherit; }

/* ---- Typography ------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--vc-font-display);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -.02em;
	margin: 0 0 var(--vc-s-4);
	color: var(--vc-fg);
}
h1 { font-size: clamp(2.25rem, 5vw + 1rem, 5.5rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.75rem, 3vw + 1rem, 3rem); }
h3 { font-size: clamp(1.25rem, 1.2vw + 1rem, 1.75rem); }
h4 { font-size: var(--vc-text-lg); }
p  { margin: 0 0 var(--vc-s-4); color: var(--vc-fg-soft); }
strong, b { font-weight: 600; color: var(--vc-fg); }
small { font-size: var(--vc-text-sm); color: var(--vc-muted); }
em, i { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--vc-line); margin: var(--vc-s-12) 0; }

/* Selection + focus */
::selection { background: var(--vc-accent); color: #fff; }
:focus-visible {
	outline: 2px solid var(--vc-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---- Layout primitives ------------------------------------ */
.container {
	width: 100%;
	max-width: var(--vc-container);
	margin: 0 auto;
	padding: 0 var(--vc-s-6);
}
.container--narrow { max-width: var(--vc-container-narrow); }
.container--wide   { max-width: 1600px; }
@media (min-width: 768px)  { .container { padding: 0 var(--vc-s-8); } }
@media (min-width: 1024px) { .container { padding: 0 var(--vc-s-10); } }

.eyebrow {
	display: inline-block;
	font-family: var(--vc-font-display);
	font-size: var(--vc-text-xs);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--vc-muted);
	font-weight: 500;
	margin-bottom: var(--vc-s-4);
}

.section__head { margin-bottom: var(--vc-s-12); max-width: 760px; }
.section__head--centered { text-align: center; margin-left: auto; margin-right: auto; }
.section__heading { margin: 0 0 var(--vc-s-4); }
.section__heading--centered { text-align: center; }
.section__intro { color: var(--vc-fg-soft); font-size: var(--vc-text-md); }

/* Section spacing */
section { padding: clamp(64px, 8vw, 128px) 0; }

/* ---- Grid utilities --------------------------------------- */
.grid { display: grid; gap: var(--vc-s-6); }
@media (min-width: 768px)  { .grid { gap: var(--vc-s-8); } }
.grid--services      { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--cases         { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid--cases-featured{ grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid--products      { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--team          { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--insights      { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--features      { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--values        { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--archive       { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--search        { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

/* ---- Prose ------------------------------------------------ */
.prose {
	font-size: var(--vc-text-md);
	line-height: 1.75;
	color: var(--vc-fg-soft);
	max-width: 68ch;
}
.prose > * + * { margin-top: var(--vc-s-5); }
.prose h2, .prose h3, .prose h4 { color: var(--vc-fg); margin-top: var(--vc-s-10); }
.prose p { color: var(--vc-fg-soft); margin: 0; }
.prose a { color: var(--vc-accent); text-decoration: underline; text-underline-offset: 4px; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: var(--vc-s-2); }
.prose blockquote {
	border-left: 3px solid var(--vc-accent);
	padding: var(--vc-s-4) var(--vc-s-6);
	font-size: var(--vc-text-lg);
	color: var(--vc-fg);
}
.prose code {
	font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
	background: var(--vc-bg-soft);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: .9em;
}
.prose pre {
	background: var(--vc-bg-soft);
	padding: var(--vc-s-5);
	border-radius: var(--vc-radius);
	overflow-x: auto;
}
.prose img { border-radius: var(--vc-radius); }

/* ---- A11y ------------------------------------------------- */
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px);
	-webkit-clip-path: inset(50%); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute; width: 1px;
	word-wrap: normal !important;
}
.skip-link {
	position: absolute; left: -9999px; top: 0;
}
.skip-link:focus {
	left: 16px; top: 16px; z-index: 9999;
	background: #fff; color: #000;
	padding: 8px 14px; border-radius: 6px;
}

/* ---- Site main ------------------------------------------- */
.site-main { padding-top: 0; }

/* ---- Pagination ------------------------------------------ */
.pagination, .nav-links {
	display: flex; gap: var(--vc-s-2);
	justify-content: center;
	margin-top: var(--vc-s-12);
	flex-wrap: wrap;
}
.pagination .page-numbers, .nav-links .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px; padding: 0 var(--vc-s-3);
	border: 1px solid var(--vc-line);
	border-radius: 999px;
	color: var(--vc-fg-soft);
	transition: all var(--vc-dur) var(--vc-ease);
}
.pagination .page-numbers:hover { border-color: var(--vc-fg); color: var(--vc-fg); }
.pagination .page-numbers.current { background: var(--vc-accent); border-color: var(--vc-accent); color: #fff; }

/* ---- Breadcrumbs ----------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; gap: var(--vc-s-2); align-items: center; margin-bottom: var(--vc-s-6); font-size: var(--vc-text-sm); color: var(--vc-muted); }
.crumbs__item { color: var(--vc-muted); }
.crumbs__item.is-current { color: var(--vc-fg); }
.crumbs a:hover { color: var(--vc-fg); }
.crumbs__sep { opacity: .5; }

/* ---- Tag cloud ------------------------------------------- */
.tag-cloud {
	display: flex; flex-wrap: wrap; gap: var(--vc-s-2);
	list-style: none; padding: 0; margin: var(--vc-s-8) 0 0;
}
.tag-cloud li a {
	display: inline-block; padding: var(--vc-s-2) var(--vc-s-3);
	border: 1px solid var(--vc-line); border-radius: 999px;
	font-size: var(--vc-text-sm); color: var(--vc-fg-soft);
}

/* ---- Badge ----------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: var(--vc-s-1); padding: 4px 10px; border-radius: 999px; font-size: var(--vc-text-xs); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.badge--ghost { border: 1px solid var(--vc-line); color: var(--vc-fg-soft); }
.badge--accent { background: var(--vc-accent-soft); color: var(--vc-accent); }

/* ---- Reduced motion respect ------------------------------ */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	html { scroll-behavior: auto; }
}

/* ---- Light mode override (Customizer) -------------------- */
body.theme-light {
	--vc-bg: #FAFAFC; --vc-bg-alt: #F2F2F7; --vc-bg-soft: #ECECF2;
	--vc-fg: #0A0A0F; --vc-fg-soft: #2C2C36; --vc-muted: #5C5C66;
	--vc-line: rgba(0,0,0,.08); --vc-line-strong: rgba(0,0,0,.16);
}
