/**
 * DONCOM site-wide CSS.
 *
 * Design tokens (colors, type, spacing) are Elementor global variables; these
 * custom properties mirror them for the few rules that live outside Elementor.
 */

:root {
	--dc-bg-page: #001327;
	--dc-surface: #000c1a;
	--dc-gold: #dfaf49;
	--dc-gold-hover: #cd8f00;
	--dc-text: #f1f2f3;
	--dc-header-h: 79px;
}

@media (max-width: 767px) {
	:root {
		--dc-header-h: 64px;
	}
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--dc-header-h);
}

body {
	background-color: var(--dc-bg-page);
	color: var(--dc-text);
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
}

/* Keyboard focus: gold ring matching the Figma focus states. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--dc-gold);
	outline-offset: 2px;
}

::selection {
	background: var(--dc-gold);
	color: var(--dc-surface);
}

/* Header: sticky Theme Builder location. */
.elementor-location-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar .elementor-location-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .elementor-location-header {
		top: 0;
	}
}

.elementor-location-header > .elementor-element {
	transition: box-shadow 0.25s ease;
}

.elementor-location-header.is-scrolled > .elementor-element {
	box-shadow: 0 8px 24px rgba(0, 12, 26, 0.4);
}

/* Navigation menu (Elementor Pro nav-menu widget). */
.elementor-nav-menu--main .elementor-nav-menu {
	justify-content: center;
	gap: 24px;
}

.elementor-nav-menu--main .elementor-item {
	padding: 8px 4px !important;
	font-family: var(--font-primary), sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	color: var(--text-primary);
	transition: color 0.2s ease;
}

.elementor-nav-menu--main .elementor-item:hover,
.elementor-nav-menu--main .elementor-item:focus-visible,
.elementor-nav-menu--main .elementor-item.elementor-item-active {
	color: var(--gold);
}

.elementor-menu-toggle {
	background: transparent;
	color: var(--text-primary);
	font-size: 24px;
}

.elementor-location-header .elementor-menu-toggle svg {
	fill: currentColor;
}

.elementor-menu-toggle:hover,
.elementor-menu-toggle.elementor-active {
	color: var(--gold);
}

.elementor-nav-menu--dropdown {
	background-color: var(--surface-strong);
	border-top: 1px solid var(--border-subtle);
}

/* Mobile/tablet dropdown: full-bleed panel directly below the header bar. */
.elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
	/* Elementor's stretch script writes inline top/left/width; these override it. */
	position: absolute;
	top: calc(100% + 16px) !important;
	right: calc(-1 * var(--space-section-x));
	left: auto !important;
	width: 100vw !important;
	z-index: 1;
	box-shadow: 0 16px 32px rgba(0, 12, 26, 0.5);
}

@media (max-width: 767px) {
	.elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
		top: calc(100% + 12px) !important;
	}
}

.elementor-nav-menu--dropdown .elementor-item {
	padding: 16px var(--space-section-x) !important;
	font-family: var(--font-primary), sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
	border-bottom: 1px solid var(--border-subtle);
}

.elementor-nav-menu--dropdown .elementor-item:hover,
.elementor-nav-menu--dropdown .elementor-item.elementor-item-active {
	background-color: var(--surface-subtle);
	color: var(--gold);
}

/* Carousels: native horizontal scroll with snap; scrollbar hidden, arrows drive it. */
.dc-carousel {
	scrollbar-width: none;
}

.dc-carousel::-webkit-scrollbar {
	display: none;
}

.dc-carousel > * {
	scroll-snap-align: start;
}

.dc-carousel-prev[disabled],
.dc-carousel-next[disabled] {
	opacity: 0.35;
	cursor: default;
}

/* Native V4 tabs: highlight the selected tab (Figma "active step" state). */
.e-tabs-menu .e-tab-base[aria-selected="true"] {
	background-color: var(--surface-subtle);
	border-color: var(--border-default);
}

/* Native V4 accordion: open item uses the page background, per the Figma FAQ. */
.dc-faq-item[open] {
	background-color: var(--bg-page);
}

/* Journey timelines: a gold connector line runs through the step dots. */
.dc-timeline-step::before {
	content: "";
	position: absolute;
	top: 17px;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, rgba(223, 175, 73, 0.15), var(--gold) 20%, var(--gold) 80%, rgba(223, 175, 73, 0.15));
}

.dc-timeline-step:first-child::before {
	left: 50%;
	background: linear-gradient(90deg, var(--gold), var(--gold));
}

.dc-timeline-step:last-child::before {
	right: 50%;
	background: linear-gradient(90deg, var(--gold), var(--gold));
}

@media (max-width: 767px) {
	.dc-timeline-step::before,
	.dc-timeline-step:first-child::before,
	.dc-timeline-step:last-child::before {
		top: 36px;
		bottom: -24px;
		left: 17px;
		right: auto;
		width: 2px;
		height: auto;
		background: var(--gold);
	}

	.dc-timeline-step:last-child::before {
		display: none;
	}
}

/* Capital-use donut chart (CSS conic gradient, values from the design). */
.dc-donut {
	position: relative;
	aspect-ratio: 1;
	min-height: 180px;
	border-radius: 50%;
	background: conic-gradient(#dfaf49 0 35%, #8a6c2e 35% 60%, #2e3642 60% 80%, #083768 80% 95%, #2e3642 95% 100%);
}

.dc-donut::before {
	content: "";
	position: absolute;
	inset: 22%;
	border-radius: 50%;
	background-color: var(--surface);
}

.dc-donut > * {
	position: relative;
}

/* AI agent availability pill: red "Busy" by default, green when available. */
.dc-agent-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: currentColor;
}

.dc-agent-status.is-available {
	background-color: #22c55e;
	color: #e6f9ed;
}

/* Marketplace filters and listing states. */
.dc-filter-chip[aria-pressed="true"] {
	background-color: var(--text-primary);
	color: var(--text-inverse);
}

.dc-filter-select {
	appearance: none;
	height: 40px;
	padding: 8px 36px 8px 14px;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-sm);
	background: var(--surface-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath stroke='%23FFFFFF' stroke-width='1.2' d='m1 1 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center;
	font-family: var(--font-primary), sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
	cursor: pointer;
}

.dc-listing-status:empty {
	display: none;
}

.dc-listing-card.is-sold .dc-listing-enquire {
	opacity: 0.3;
	pointer-events: none;
}

/* The arrow SVG has a hard-coded white fill; make it follow the button's text colour on hover. */
.dc-listing-enquire svg path {
	fill: currentColor;
}

/* Form placeholders and select chevron. */
.e-form-input-base::placeholder,
.e-form-textarea-base::placeholder {
	color: var(--text-tertiary);
	opacity: 1;
}

select.dc-input {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath stroke='%23ABC6E3' stroke-width='1.2' d='m1 1 4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 32px;
}

/* Outline (stroke-drawn) icons from the design system must not pick up the SVG widget's fill. */
.e-svg-base svg[fill="none"],
.e-svg-base svg path[stroke]:not([fill]) {
	fill: none;
}

/* FAQ accordion (V4 e-accordion): plus icon that turns into a close cross when open. */
.dc-faq-item > summary {
	list-style: none;
}

.dc-faq-item > summary::-webkit-details-marker {
	display: none;
}

.dc-faq-icon::before {
	content: "+";
	display: block;
	font-family: var(--font-primary), sans-serif;
	font-size: 30px;
	font-weight: 300;
	line-height: 1;
	color: var(--text-primary);
	transition: transform 0.25s ease;
}

.dc-faq-item[open] .dc-faq-icon::before {
	transform: rotate(45deg);
}

/* Logo carousel: two identical tracks scroll together for a seamless CSS-only loop. */
.dc-marquee {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 160px, #000 calc(100% - 160px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 160px, #000 calc(100% - 160px), transparent);
}

.dc-marquee__track {
	animation: dc-marquee 40s linear infinite;
}

.dc-marquee:hover .dc-marquee__track {
	animation-play-state: paused;
}

@keyframes dc-marquee {
	to {
		transform: translateX(calc(-100% - 72px));
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 767px) {
	.dc-filter-select {
		flex: 1 1 0;
		min-width: 0;
	}
}

/* Optional text slots in components collapse when left empty. */
.dc-optional:empty {
	display: none;
}
