/**
 * Alygio reklama — shared design-system components.
 *
 * Consumes the tokens from alygioreklama-child/assets/css/tokens.css.
 * Every selector is scoped to an `.ar-` class. Measured values and sources:
 * docs/DESIGN-SPECIFICATION.md. Radius is 0 everywhere by design.
 *
 * Breakpoints (reference): ≤1200 nav collapses · ≤1100 columns stack · ≤600 mobile.
 */

/* ---------------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------------ */

.ar-container {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--ar-container-wide);
	margin-inline: auto;
}

.ar-container--narrow {
	max-width: var(--ar-container-narrow);
}

/* Full-bleed section with the reference gutter (5vw) and vertical rhythm. */
.ar-section {
	box-sizing: border-box;
	padding: var(--ar-section-padding-y) var(--ar-gutter);
	background-color: transparent;
}

.ar-section--alt {
	background-color: var(--ar-color-bg-alt);
}

/* Task 07 fix: Elementor's frontend CSS has `.elementor hr { background-color:
   transparent }` (0,1,1), which hid the line inside Elementor content. The
   second selector (0,2,0) restores the reference line; size unchanged. */
.ar-separator,
.elementor .ar-separator {
	display: block;
	height: 2px;
	margin: 0;
	border: 0;
	background-color: var(--ar-neutral-200);
}

/* Hairline card grid: cards touch, 1px lines between and around them. */
.ar-grid {
	--ar-grid-columns: 2;
	--ar-grid-line: var(--ar-color-border);
	display: grid;
	grid-template-columns: repeat(var(--ar-grid-columns), minmax(0, 1fr));
	gap: 0;
}

.ar-grid--3 {
	--ar-grid-columns: 3;
}

.ar-grid--dark {
	--ar-grid-line: var(--ar-color-border-dark);
}

.ar-grid--hairline {
	border-left: var(--ar-border-width) solid var(--ar-grid-line);
}

.ar-grid--hairline > * {
	box-sizing: border-box;
	margin: 0 0 calc(-1 * var(--ar-border-width));
	border: var(--ar-border-width) solid var(--ar-grid-line);
	border-left: 0;
}

@media (max-width: 1100px) {
	.ar-grid--3 {
		--ar-grid-columns: 2;
	}

	.ar-grid--stack-tablet {
		--ar-grid-columns: 1;
	}
}

@media (max-width: 600px) {
	.ar-grid {
		--ar-grid-columns: 1;
	}
}

/* Lists used as grids/rows: no bullets, no browser indent. */
.ar-grid,
.ar-checklist,
.ar-stats,
.ar-carousel__track,
.ar-quotes__track,
.ar-logos__group,
.ar-pricing__box,
.ar-plan__features,
.ar-footer__list,
.ar-footer__social {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------------------------------------------------------------------------
 * Section heading (eyebrow + title + intro), heading row with a text link
 * Reference: eyebrow 21px → 28px → title 48px → 28px → intro; block 700px.
 * ------------------------------------------------------------------------ */

.ar-heading {
	max-width: var(--ar-heading-block-width);
}

.ar-heading .ar-heading__title {
	margin: 28px 0 0;
}

.ar-heading > :first-child {
	margin-top: 0;
}

.ar-heading .ar-heading__intro {
	margin: 28px 0 0;
}

.ar-heading--center {
	margin-inline: auto;
	text-align: center;
}

.ar-heading--intro-strong .ar-heading__intro {
	color: var(--ar-neutral-800);
}

/* Heading on the left, large text link bottom-right (≤1100: stacked, 32px). */
.ar-heading-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--ar-space-130);
}

.ar-heading-row > .ar-heading {
	flex: 1 1 auto;
}

.ar-heading-row > .ar-link {
	flex-shrink: 0;
}

/* Heading → grid distance (reference bbe-130: 80px at 1920). */
.ar-section__body {
	margin-top: var(--ar-space-130);
}

@media (max-width: 1100px) {

	.ar-heading-row {
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		gap: var(--ar-space-80);
	}
}

/* ---------------------------------------------------------------------------
 * Split: media column + content column, 610 / 80 / 610 at 1300px.
 * The media box is at least 600px tall (320px when stacked) and the image
 * covers it. ≤1100px: stacked with a bbe-130 gap.
 * ------------------------------------------------------------------------ */

.ar-split {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: var(--ar-space-130);
}

.ar-split--top {
	align-items: flex-start;
}

.ar-split__media {
	position: relative;
	flex: 0 1 50%;
	min-width: 0;
	min-height: 600px;
	overflow: hidden;
	background-color: var(--ar-neutral-200);
}

.ar-split .ar-split__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: var(--ar-radius);
}

.ar-split__content {
	display: flex;
	flex: 0 1 50%;
	min-width: 0;
	flex-direction: column;
	justify-content: center;
}

@media (max-width: 1100px) {

	.ar-split {
		flex-direction: column;
		align-items: stretch;
	}

	.ar-split__media,
	.ar-split__content {
		flex-basis: auto;
	}

	.ar-split__media {
		min-height: 320px;
	}
}

/* ---------------------------------------------------------------------------
 * Round carousel arrow (40px, primary-500; the only round control besides
 * the social icons). Hello styles every <button>, hence doubled classes.
 * ------------------------------------------------------------------------ */

.ar-arrow.ar-arrow {
	display: inline-flex;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 8px;
	border: 0;
	border-radius: 100%;
	background-color: var(--ar-primary-500);
	color: var(--ar-neutral-000);
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.3s, background-color var(--ar-transition-fast);
}

.ar-arrow.ar-arrow:hover,
.ar-arrow.ar-arrow:focus {
	background-color: var(--ar-primary-600);
	color: var(--ar-neutral-000);
}

.ar-arrow.ar-arrow:disabled {
	cursor: default;
}

.ar-arrow.ar-arrow:disabled:hover {
	background-color: var(--ar-primary-500);
}

.ar-arrow .ar-icon {
	display: block;
	width: 24px;
	height: 24px;
}

/* Without JavaScript the tracks are plain native scrollers. */
html:not(.ar-js) .ar-arrow {
	display: none;
}

/* ---------------------------------------------------------------------------
 * Placeholders (bundled SVGs) and generic icons
 * ------------------------------------------------------------------------ */

.ar-icon {
	display: block;
	flex-shrink: 0;
}

.ar-is-placeholder {
	background-color: var(--ar-neutral-300);
}

/* ---------------------------------------------------------------------------
 * Typography roles
 * ------------------------------------------------------------------------ */

.ar-display-2,
.ar-title-1,
.ar-title-2,
.ar-title-3,
.ar-title-4,
.ar-title-5,
.ar-title-6 {
	margin: 0;
	color: var(--ar-color-heading);
	font-family: var(--ar-font-family);
	font-weight: 600;
}

.ar-display-2 {
	font-size: var(--ar-font-size-display-2);
	line-height: 1.15;
	letter-spacing: var(--ar-letter-spacing-tight);
}

.ar-title-1 {
	font-size: var(--ar-font-size-title-1);
	line-height: 1.15;
	letter-spacing: var(--ar-letter-spacing-tight);
}

.ar-title-2 {
	font-size: var(--ar-font-size-title-2);
	line-height: 1.2;
	letter-spacing: var(--ar-letter-spacing-tight);
}

.ar-title-3 {
	font-size: var(--ar-font-size-title-3);
	line-height: 1.25;
}

.ar-title-4 {
	font-size: var(--ar-font-size-title-4);
	line-height: 1.3;
}

.ar-title-5 {
	font-size: var(--ar-font-size-title-5);
	line-height: 1.25;
}

.ar-title-6 {
	font-size: var(--ar-font-size-title-6);
	line-height: 1.3;
}

/* Section eyebrow ("Services", "Why work with us"…): visual style only. */
.ar-eyebrow {
	margin: 0;
	color: var(--ar-color-eyebrow);
	font-size: var(--ar-font-size-title-6);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: var(--ar-letter-spacing-tight);
}

.ar-text {
	margin: 0;
	color: var(--ar-color-text);
	font-size: var(--ar-font-size-body);
	line-height: var(--ar-line-height-body);
}

/* Gradient label ("Experience that drives change"), square corners. */
.ar-tag {
	display: inline-block;
	margin: 0;
	padding: 0.2em 0.4em;
	background: var(--ar-gradient-eyebrow);
	color: var(--ar-primary-300);
	font-size: var(--ar-font-size-md);
	font-weight: 400;
	line-height: 1.3;
}

.ar-tag--lg {
	padding: 0.3em 0.6em;
	font-size: var(--ar-font-size-2xl);
}

/* Light label on white cards (Services 2 reference, Task 05): primary-100 →
   transparent gradient, primary-600 text, same size and padding. */
.ar-tag--light {
	background: var(--ar-gradient-tag-light);
	color: var(--ar-tag-light-text);
}

.ar-mark {
	padding: 0;
	background-color: var(--ar-primary-100);
	color: var(--ar-primary-700);
}

/*
 * Accent words in the hero H1 (reference: gradient text, measured Task 03).
 * The gradient is 200% wide and its position shifts 0 → 100% → 0 over 5s,
 * so the words glow from white to primary-400 and back. Only where text
 * clipping is supported; static under reduced motion; plain text in forced
 * colours (the gradient would be removed there and the text would vanish).
 */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {

	.ar-text-accent {
		background-image: var(--ar-gradient-text-accent);
		background-repeat: repeat;
		background-position: 0 0;
		background-size: 200% 100%;
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
	}
}

@media (prefers-reduced-motion: no-preference) {

	.ar-text-accent {
		animation: ar-text-accent-shift 5s ease infinite;
	}
}

@media (forced-colors: active) {

	.ar-text-accent {
		background: none;
		-webkit-text-fill-color: currentcolor;
	}
}

@keyframes ar-text-accent-shift {
	0%,
	100% {
		background-position: 0 0;
	}

	50% {
		background-position: 100% 0;
	}
}

/* ---------------------------------------------------------------------------
 * Buttons and links
 * ------------------------------------------------------------------------ */

.ar-btn {
	display: inline-flex;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 18px 26px;
	border: 0;
	border-radius: var(--ar-radius);
	font-family: var(--ar-font-family);
	font-size: var(--ar-font-size-body);
	font-weight: 500;
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: color var(--ar-transition-fast), background-color var(--ar-transition-fast), border-color var(--ar-transition-fast);
}

/* Hello Elementor underlines `.page-content a` (0,1,1); doubled classes win. */
.ar-btn.ar-btn,
.ar-btn.ar-btn:hover,
.ar-link.ar-link,
.ar-link.ar-link:hover {
	text-decoration: none;
}

.ar-btn--primary,
.ar-btn--primary:visited {
	background-color: var(--ar-btn-primary-bg);
	color: var(--ar-btn-primary-text);
}

.ar-btn--primary:hover,
.ar-btn--primary:focus-visible {
	background-color: var(--ar-btn-primary-bg-hover);
	color: var(--ar-btn-primary-text-hover);
}

/* 15px compact variant (header CTA, card CTA): 42.5px tall. */
.ar-btn--sm {
	padding: 13px 20px;
	font-size: var(--ar-font-size-sm);
}

.ar-btn--outline,
.ar-btn--outline:visited {
	padding: 11px 18px;
	border: 2px solid var(--ar-btn-outline-border);
	background-color: transparent;
	color: var(--ar-btn-outline-text);
	font-size: var(--ar-font-size-sm);
}

.ar-btn--outline:hover,
.ar-btn--outline:focus-visible {
	background-color: var(--ar-btn-outline-bg-hover);
	color: var(--ar-btn-outline-text-hover);
}

.ar-btn--block {
	width: 100%;
}

/* 14px card button ("View details" on the Services 2 reference, Task 05):
   padding 10px 16px → 35.4px tall. */
.ar-btn--xs {
	padding: 10px 16px;
	font-size: var(--ar-font-size-xs);
}

/* A button whose destination does not exist yet (Task 05): same look, plain
   text, no pointer and no hover change. */
.ar-btn.is-inactive {
	cursor: default;
}

.ar-btn--primary.is-inactive:hover {
	background-color: var(--ar-btn-primary-bg);
	color: var(--ar-btn-primary-text);
}

/* Underlined text link ("See all services", "Learn more"). */
.ar-link,
.ar-link:visited {
	display: inline-block;
	padding: 4px 0;
	border-bottom: var(--ar-border-width) solid var(--ar-link-underline);
	color: var(--ar-color-heading);
	font-size: var(--ar-font-size-md);
	line-height: 1.1;
	text-decoration: none;
	transition: color var(--ar-transition-fast), border-color var(--ar-transition-fast);
}

.ar-link--lg {
	padding: 0.25em 0;
	font-size: var(--ar-font-size-xl);
}

.ar-link--on-dark,
.ar-link--on-dark:visited {
	color: var(--ar-neutral-000);
}

.ar-link:hover {
	color: var(--ar-primary-700);
}

.ar-link--on-dark:hover {
	color: var(--ar-primary-300);
}

/* ---------------------------------------------------------------------------
 * Accessibility helpers
 * ------------------------------------------------------------------------ */

.ar-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Visible focus (addition; the reference has no custom focus styling).
   Hello adds a white 4px box-shadow halo to focused links/buttons; the
   documented ring (DESIGN-SPECIFICATION §10, A4) is the outline only. */
.ar-btn:focus-visible,
.ar-link:focus-visible,
.ar-section a:focus-visible,
.ar-section button:focus-visible {
	outline: 2px solid var(--ar-focus-ring-light);
	outline-offset: 3px;
	box-shadow: none;
}

.ar-on-dark .ar-btn:focus-visible,
.ar-on-dark .ar-link:focus-visible,
.ar-on-dark a:focus-visible,
.ar-on-dark button:focus-visible,
.ar-section .ar-on-dark a:focus-visible {
	outline: 2px solid var(--ar-focus-ring-dark);
	outline-offset: 3px;
	box-shadow: none;
}

/* Scrollable tracks are keyboard-focusable; Hello's [tabindex] focus rule
   has specificity (0,4,0), so this selector is deliberately (0,5,0). */
.ar-section [data-ar-slider] [tabindex][data-ar-slider-track]:focus-visible {
	outline: 2px solid var(--ar-focus-ring-light);
	outline-offset: 3px;
	box-shadow: none;
}

/* ---------------------------------------------------------------------------
 * Entrance animation (reference AOS: slideUp / slideLeft, 0.5s ease-out)
 * Hidden state only applies when JS is running (html.ar-js), motion is
 * allowed and we are not inside the Elementor editor.
 * ------------------------------------------------------------------------ */

@keyframes ar-slide-up {
	from {
		opacity: 0;
		transform: translate3d(0, 30px, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes ar-slide-left {
	from {
		opacity: 0;
		transform: translate3d(50px, 0, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: no-preference) {

	.ar-js [data-ar-animate] {
		opacity: 0;
	}

	.ar-js [data-ar-animate].is-inview {
		animation-duration: 0.5s;
		animation-timing-function: var(--ar-ease-out);
		animation-delay: var(--ar-animate-delay, 0s);
		animation-fill-mode: forwards;
	}

	.ar-js [data-ar-animate="slide-up"].is-inview {
		animation-name: ar-slide-up;
	}

	.ar-js [data-ar-animate="slide-left"].is-inview {
		animation-name: ar-slide-left;
	}
}

.elementor-editor-active [data-ar-animate] {
	opacity: 1 !important;
	animation: none !important;
}

/* Inside split layouts the reference constrains text to the 900px content
   size instead of the 700px heading block. */
.ar-split .ar-heading,
.ar-split__inner {
	max-width: var(--ar-container-narrow);
}

/* Elementor editor only: a switched-off optional section (Task 05) shows
   this slim note so it stays selectable; nothing is printed on the site. */
.ar-section-off {
	padding: 12px var(--ar-gutter);
	border: 1px dashed var(--ar-neutral-400);
	background-color: var(--ar-neutral-100);
	color: var(--ar-neutral-700);
	font-family: var(--ar-font-family);
	font-size: var(--ar-font-size-xs);
	line-height: 1.4;
}
