/* Shared section helpers + per-section styles that Elementor has no native control for. */

/* Motion pre-hide: only while html.dt-motion is set (JS on, motion allowed, failsafe pending). */
html.dt-motion .dt-hero .dt-hero-item {
	opacity: 0;
}

/* Elements driven by GSAP or tilt.js: drop Elementor's built-in 0.4s transform transition, which
   otherwise smooths every animation frame and makes motion lag ~400ms behind the spec. */
.dt-hero-item,
.dt-reveal,
.dt-pcard,
.dt-slide-left,
.dt-slide-right,
.dt-tilt {
	--e-con-transform-transition-duration: 0s;
	--e-transform-transition-duration: 0s;
}

/* Text editor: no trailing paragraph margin (Hello reset adds .9rem). */
.elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

/* Keep source copy in sentence case; display in caps as drawn. */
.dt-uppercase .elementor-heading-title {
	text-transform: uppercase;
}

/* Translucent plate: 80% obsidian over imagery (Figma rgba(9,7,12,.8)). */
.dt-glass {
	background-color: color-mix(in srgb, var(--e-global-color-obsidian) 80%, transparent);
}

/* Badges hug their text. */
.dt-badge .elementor-heading-title {
	white-space: nowrap;
}

/* Eyebrow line: Elementor's divider adds vertical padding; Figma's rule is a bare 2px bar. */
.dt-eyebrow .dt-eyebrow__line .elementor-divider {
	padding-block: 0;
}

.dt-eyebrow .dt-eyebrow__line {
	width: auto;
	flex: none;
}

/* Responsive overrides of non-responsive Elementor controls use !important: Elementor's
   per-element rules (.elementor-N .elementor-element.elementor-element-ID …) outrank theme CSS. */

/* Outline button: Figma mobile (2:2143) fills it with obsidian; Elementor's button bg isn't responsive. */
@media (max-width: 767px) {
	.dt-btn-outline .elementor-button {
		background-color: var(--e-global-color-obsidian) !important;
	}
}

/* Series One mobile eyebrow uses Electric Violet (2:2153); desktop uses Purple (2:49). */
@media (max-width: 767px) {
	.dt-series-one .dt-series-one__eyebrow .elementor-heading-title {
		color: var(--e-global-color-accent) !important;
	}
}

/* Let's Yarn: the glass panel is desktop/tablet only; on mobile it's plain content (2:2203). */
@media (max-width: 767px) {
	.dt-glass.dt-glass--desktop {
		background-color: transparent;
	}
}

/* Let's Yarn desktop row: fixed 600px panel, image fills the rest (2:114 / 2:113). */
@media (min-width: 1025px) {
	.dt-lets-yarn .e-con.dt-glass {
		flex: 0 0 600px;
	}

	.dt-lets-yarn .e-con.dt-lets-yarn__image {
		--width: auto;
		flex: 1 1 0;
		min-width: 0;
		align-self: stretch;
	}
}

/* Cap story desktop row: image fills, text column fixed at 480px (2:125). */
@media (min-width: 1025px) {
	.dt-cap-story .e-con.dt-cap-story__image {
		--width: auto;
		flex: 1 1 0;
		min-width: 0;
	}

	.dt-cap-story .e-con.dt-cap-story__text {
		flex: 0 0 480px;
	}
}

/* Mobile swaps weights (2:2211 Black 28; 2:2215 ExtraBold 22) — Elementor weight isn't responsive. */
@media (max-width: 767px) {
	.dt-cap-story .dt-cap-story__title .elementor-heading-title {
		font-weight: 900 !important;
	}

	.dt-cap-story .dt-cap-story__name .elementor-heading-title {
		font-weight: 800 !important;
	}
}

.dt-cap-story .dt-cap-story__name a {
	color: inherit;
	transition: color var(--dt-dur-micro) var(--dt-ease-ui);
}

.dt-cap-story .dt-cap-story__name a:hover {
	color: var(--e-global-color-secondary);
}

/* Divider: bare 1px rule, no Elementor padding. */
.dt-cap-story .elementor-widget-divider .elementor-divider {
	padding-block: 0;
}

/* ---------------------------------------------------------------------------
 * AGENCY OVERRIDES (pending Chrissy approval) — docs/motion-spec.md
 * ------------------------------------------------------------------------- */

/* Slide-in blocks (.dt-slide-left / .dt-slide-right): no horizontal scrollbar while they travel. */
.dt-lets-yarn,
.e-con.e-parent:has(.dt-slide-left, .dt-slide-right) {
	overflow-x: clip;
}

/* 3D tilt card (.dt-tilt): image layer scales inside the clipped rounded card, glare on top.
   ::before re-paints the container's own background image so it can scale independently;
   .e-con prefix outranks Elementor's background-overlay ::before. */
.e-con.dt-tilt,
.dt-tilt {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.e-con.dt-tilt::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: inherit;
	border: 0;
	border-radius: inherit;
	opacity: 1;
	mix-blend-mode: normal;
	transform: scale(var(--dt-tilt-scale, 1));
	transition: transform 400ms var(--dt-ease-entrance);
	pointer-events: none;
}

.e-con.dt-tilt::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	background: radial-gradient(circle at var(--dt-glare-x, 50%) var(--dt-glare-y, 50%), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 55%);
	opacity: var(--dt-glare-opacity, 0);
	transition: opacity 400ms var(--dt-ease-entrance);
	pointer-events: none;
}

/* Image-widget variant: scale the <img> instead of the background layer. */
.dt-tilt img {
	transform: scale(var(--dt-tilt-scale, 1));
	transition: transform 400ms var(--dt-ease-entrance);
}

/* Content (e.g. STORY MARKER badge) stays above the image layer and glare, moving with the card. */
.e-con.dt-tilt > .elementor-element,
.e-con.dt-tilt > .e-con-inner {
	position: relative;
	z-index: 2;
}

/* States set by tilt.js — only on fine-pointer hover without reduced motion. */
.dt-tilt.is-tilt-hover {
	--dt-tilt-scale: 1.06;
	--dt-glare-opacity: 0.15;
}

.dt-tilt.is-tilting,
.dt-tilt.is-tilting::before,
.dt-tilt.is-tilting img {
	will-change: transform;
}

.e-con.dt-tilt.is-tilt-leaving,
.dt-tilt.is-tilt-leaving {
	transition: transform 400ms var(--dt-ease-entrance);
}

@media (prefers-reduced-motion: reduce) {
	.dt-tilt.is-tilt-hover {
		--dt-tilt-scale: 1;
		--dt-glare-opacity: 0;
	}
}

/* ===========================================================================
 * INNER PAGES
 * ======================================================================== */

/* Our Story — purpose cards (2:286): number 48 purple @90%; mobile (2:2706) title-left lime,
   number-right dimmed. */
.dt-purpose-card .dt-purpose-card__num {
	opacity: 0.9;
}

@media (max-width: 767px) {
	.dt-purpose-card .e-con.dt-purpose-card__head {
		flex-direction: row-reverse !important;
		justify-content: space-between;
		align-items: center;
	}

	.dt-purpose-card .dt-purpose-card__num {
		opacity: 1;
	}

	.dt-purpose-card .dt-purpose-card__num .elementor-heading-title {
		font-size: 24px !important;
		color: color-mix(in srgb, var(--e-global-color-text) 35%, transparent) !important;
	}

	.dt-purpose-card .dt-purpose-card__title .elementor-heading-title {
		color: var(--e-global-color-secondary) !important;
	}
}

/* Our Story — Talk Story split (2:301): 800px panel, image fills the rest at full height. */
@media (min-width: 1025px) {
	.dt-os-talk .e-con.dt-os-talk__panel {
		flex: 0 0 55.56%;
	}

	.dt-os-talk .e-con.dt-os-talk__image {
		--width: auto;
		flex: 1 1 0;
		min-width: 0;
	}
}

/* Timeline (Our Story 2:314): pill dot + rule to the next step. Mobile (2:2732): vertical rail. */
.dt-timeline .dt-timeline__head .dt-timeline__line {
	flex: 1 1 auto;
	width: auto;
}

.dt-timeline .dt-timeline__line .elementor-divider {
	padding-block: 0;
}

.dt-timeline .dt-timeline__dot .elementor-heading-title {
	font-weight: 900;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.dt-timeline .e-con.dt-timeline__step {
		position: relative;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: flex-start;
		gap: 16px !important;
	}

	.dt-timeline .e-con.dt-timeline__step > .e-con:last-child {
		--width: auto;
		flex: 1 1 0;
		min-width: 0;
	}

	.dt-timeline .e-con.dt-timeline__step:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 30px;
		bottom: -28px;
		left: 15px;
		width: 1px;
		background: var(--e-global-color-border);
	}

	.dt-timeline .e-con.dt-timeline__head {
		flex: none;
		width: auto;
	}

	.dt-timeline .dt-timeline__line {
		display: none;
	}

	.dt-timeline .dt-timeline__dot .elementor-heading-title {
		font-size: 10px !important;
	}
}

/* Our Story Talk Story on mobile (2:2726): text sits on the section background. */
@media (max-width: 767px) {
	.dt-os-talk .e-con.dt-os-talk__panel {
		background-color: transparent !important;
	}
}

/* Behind the Designs — featured card (2:1070): media fills, 540px content column. */
@media (min-width: 1025px) {
	.dt-feat-card .e-con.dt-feat-card__media {
		--width: auto;
		flex: 1 1 0;
		min-width: 0;
	}

	.dt-feat-card .e-con.dt-feat-card__content {
		flex: 0 0 540px;
	}
}

.dt-feat-card__badge .elementor-heading-title {
	white-space: nowrap;
}

/* 90% purple badge over imagery (2:1072). */
.dt-feat-card .dt-feat-card__badge .elementor-widget-container {
	background-color: color-mix(in srgb, var(--e-global-color-primary) 90%, transparent) !important;
}

.dt-feat-card .dt-feat-card__meta .elementor-heading-title {
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
}

/* Button with trailing SVG icon (14px arrow). */
.dt-btn-icon .elementor-button-icon svg {
	width: 14px;
	height: 14px;
	fill: none;
}

.dt-btn-icon .elementor-button-content-wrapper {
	align-items: center;
}

.dt-hub-title .elementor-heading-title {
	font-size: 24px !important;
}

.dt-hero--center .dt-eyebrow {
	justify-content: center;
}

/* Single post (article detail) — placeholder layout, not designed in Figma. */
.dt-article {
	background: var(--e-global-color-obsidian);
	padding-bottom: 120px;
}

.dt-article .dt-article__hero {
	padding: 100px 80px 56px;
	background: var(--e-global-color-deepplum);
	border-bottom: 1px solid var(--e-global-color-border);
}

.dt-article .dt-article__inner,
.dt-article .dt-article__content {
	max-width: 760px;
	margin-inline: auto;
}

.dt-article .dt-article__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.dt-article .dt-article__back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
}

.dt-article .dt-article__back svg {
	width: 16px;
	height: 16px;
}

.dt-article .dt-article__back:hover {
	color: var(--e-global-color-secondary);
}

.dt-article .dt-article__eyebrow {
	margin: 8px 0 0;
	color: var(--e-global-color-accent);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: 14px;
	font-weight: 800;
	text-transform: uppercase;
}

.dt-article .dt-article__title {
	margin: 0;
	color: var(--e-global-color-warmwhite);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
	font-size: var(--e-global-typography-dt_feature_story-font-size, 36px);
	font-weight: 900;
	line-height: 1.2;
	text-transform: uppercase;
}

.dt-article .dt-article__meta {
	margin: 0;
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-size: 13px;
}

.dt-article .dt-article__media {
	max-width: 1280px;
	margin: 56px auto 0;
	padding-inline: 80px;
}

.dt-article .dt-article__media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 7;
	object-fit: cover;
	border-radius: 24px;
}

.dt-article .dt-article__content {
	padding-top: 56px;
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-size: 17px;
	line-height: 1.65;
}

.dt-article .dt-article__content > * + * {
	margin-top: 1.2em;
}

.dt-article .dt-article__content strong,
.dt-article .dt-article__content h2,
.dt-article .dt-article__content h3 {
	color: var(--e-global-color-warmwhite);
}

.dt-article .dt-article__content a {
	color: var(--e-global-color-secondary);
}

@media (max-width: 1024px) {
	.dt-article .dt-article__hero {
		padding: 80px 40px 48px;
	}

	.dt-article .dt-article__media {
		padding-inline: 40px;
	}
}

@media (max-width: 767px) {
	.dt-article {
		padding-bottom: 64px;
	}

	.dt-article .dt-article__hero {
		padding: 48px 16px 32px;
	}

	.dt-article .dt-article__media {
		margin-top: 32px;
		padding-inline: 16px;
	}

	.dt-article .dt-article__media img {
		aspect-ratio: 4 / 3;
		border-radius: 16px;
	}

	.dt-article .dt-article__content {
		padding: 32px 16px 0;
		font-size: 15px;
		line-height: 1.6;
	}
}

html.dt-motion .dt-article .dt-hero-item {
	opacity: 0;
}

/* Linked info cards (Partners & Community): card is the link; border + arrow on hover. */
.e-con.dt-link-card {
	color: inherit;
	text-decoration: none;
	transition: border-color var(--dt-dur-micro) var(--dt-ease-ui);
}

.dt-link-card .dt-link-card__arrow .elementor-icon {
	transition: transform var(--dt-dur-micro) var(--dt-ease-ui);
}

.dt-link-card .dt-link-card__arrow svg {
	width: 24px;
	height: 24px;
}

.e-con.dt-link-card:focus-visible {
	outline: 2px solid var(--e-global-color-secondary);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.e-con.dt-link-card:hover {
		border-color: var(--e-global-color-primary) !important;
	}
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.e-con.dt-link-card:hover .dt-link-card__arrow .elementor-icon {
		transform: translateX(4px);
	}
}

/* Link cards share their row equally (2-up services, 3-up ODC). */
@media (min-width: 768px) {
	.e-con.dt-link-card {
		--width: auto;
		flex: 1 1 0;
		min-width: 0;
	}
}

/* Contact — founder column (2:1243). */
.dt-ct-founder .dt-ct-founder__name .elementor-heading-title {
	font-size: 28px;
	font-weight: 900;
}

.dt-ct-founder .dt-ct-founder__role .elementor-heading-title {
	font-weight: 700;
}

.dt-ct-email a {
	color: inherit;
	overflow-wrap: anywhere;
	transition: color var(--dt-dur-micro) var(--dt-ease-ui);
}

.dt-ct-email a:hover {
	color: var(--e-global-color-secondary);
}

@media (min-width: 1025px) {
	.dt-ct-split .e-con.dt-ct-founder {
		flex: 1 1 0;
		max-width: 560px;
	}

	.dt-ct-split .dt-ct-form {
		flex: 0 0 640px;
	}
}

@media (max-width: 767px) {
	.dt-ct-founder .dt-ct-founder__name .elementor-heading-title {
		font-size: 18px !important;
	}
}
