/* ==========================================================================
   Duskwork Studio: tokens, base elements, shared UI pieces
   ========================================================================== */

:root {
	/* Palette */
	--color-cream: #f7efe5;
	--color-cream-soft: rgba(247, 239, 229, 0.78);
	--color-cream-faint: rgba(247, 239, 229, 0.42);
	--color-ink: #120f17;
	--color-ink-soft: rgba(18, 15, 23, 0.76);
	--color-ink-faint: rgba(18, 15, 23, 0.32);
	--color-night: #090c20;
	--color-night-2: #11132c;
	--color-violet: #7d5cd0;
	--color-magenta: #b55bb0;
	--color-pink: #e3627e;
	--color-coral: #f4875e;
	--color-peach: #fbb36a;

	/* The Duskwork gradient runs like a real dusk sky: violet on top, warm light at the bottom.
	   Night: the full range, for dark backgrounds (also the logo).
	   Day: the same brand, leaning violet/magenta/pink so it holds against a sunset sky. */
	--dusk-gradient-night: linear-gradient(180deg, #7d5cd0 20%, #b55bb0 37%, #e3627e 52%, #f4875e 64%, #fbb36a 77%);
	--dusk-gradient-day: linear-gradient(180deg, #6c4cc6 18%, #9a4db3 36%, #c64d94 52%, #e05b79 66%, #ee7a62 80%);
	--dusk-gradient: var(--dusk-gradient-night);
	--dusk-gradient-solid: linear-gradient(180deg, #7d5cd0 0%, #b55bb0 30%, #e3627e 55%, #f4875e 78%, #fbb36a 100%);
	--color-footer: #080a15;

	/* Type roles. Swap the families here (and the @font-face rules in typography.css). */
	--font-display-light: "Urbanist", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-display-heavy: "Urbanist", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-ui: "Urbanist", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--weight-display-light: 200;
	--weight-display-heavy: 900;
	--weight-ui: 450;
	--weight-ui-strong: 600;
	--tracking-display-light: -0.035em;
	--tracking-display-heavy: -0.045em;
	--tracking-ui: 0.12em;
	--tracking-ui-wide: 0.3em;

	/* Layout */
	--container: 1560px;
	--page-gutter: clamp(22px, 5.6vw, 96px);
	--section-space: clamp(88px, 13vh, 168px);
	--header-h: 76px;
	--radius-sm: 6px;
	--radius-md: 16px;
	--radius-pill: 999px;

	/* Motion */
	--ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
	--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
	--dur-fast: 0.25s;
	--dur: 0.5s;
	--dur-slow: 0.9s;

	/* Layering (see README "Animation architecture") */
	--z-env: 0;
	--z-hero-cream: 20;
	--z-hero-mask: 21;
	--z-hero-lines: 22;
	--z-content: 30;
	--z-nav: 40;
	--z-menu: 50;

	/* Current text tone. Sections switch these. */
	--fg: var(--color-cream);
	--fg-soft: var(--color-cream-soft);
	--fg-faint: var(--color-cream-faint);
	--focus: #fbb36a;

	/* Viewport height that ignores mobile toolbars */
	--vh-full: 100vh;
	--vh-small: 100vh;
}

@supports (height: 100lvh) {
	:root {
		--vh-full: 100lvh;
		--vh-small: 100svh;
	}
}

@media (min-width: 1024px) {
	:root {
		--header-h: clamp(88px, 10.4vh, 116px);
	}
}

/* Reset ------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--header-h);
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--color-night);
	color: var(--fg);
	font-family: var(--font-ui);
	font-weight: var(--weight-ui);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
	margin: 0;
}

:where(ul[class], ol[class]) {
	margin: 0;
	padding: 0;
	list-style: none;
}

img,
svg,
video,
picture {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

input,
textarea,
select {
	font: inherit;
	color: inherit;
}

::selection {
	background: rgba(227, 98, 126, 0.85);
	color: #fff;
}

/* Main region sits above the environment and the hero architecture */
.site-main {
	position: relative;
	z-index: var(--z-content);
	outline: none;
}

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

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.dw-skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 100;
	padding: 12px 20px;
	border-radius: var(--radius-pill);
	background: var(--color-cream);
	color: var(--color-ink);
	font-size: 14px;
	letter-spacing: var(--tracking-ui);
	text-decoration: none;
	transform: translateY(-160%);
	transition: transform var(--dur-fast) var(--ease-out);
}

.dw-skip-link:focus {
	transform: none;
}

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 4px;
	border-radius: 4px;
}

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

.dw-container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--page-gutter);
}

.dw-section {
	position: relative;
	padding-block: var(--section-space);
}

/* Small shared pieces ---------------------------------------------------- */

.dw-eyebrow {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 0.85em;
	font-family: var(--font-ui);
	font-weight: var(--weight-ui);
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: var(--tracking-ui-wide);
	text-transform: uppercase;
	color: var(--fg);
}

.dw-eyebrow a {
	text-decoration: none;
}

.dw-eyebrow__rule {
	display: inline-block;
	width: 42px;
	height: 1px;
	background: currentColor;
	opacity: 0.7;
}

.dw-eyebrow:not(.dw-eyebrow--rule) .dw-eyebrow__rule {
	display: none;
}

.dw-eyebrow__slash,
.dw-slash {
	opacity: 0.6;
	margin-inline: 0.55em;
}

.dw-eyebrow__slash {
	margin-inline: 0;
}

.dw-sep {
	display: inline-block;
	width: 14px;
	height: 1px;
	margin-inline: 0.75em;
	vertical-align: middle;
	background: currentColor;
	opacity: 0.6;
}

.dw-icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

/* Buttons ---------------------------------------------------------------- */

.dw-btn {
	--btn-bg: transparent;
	--btn-fg: var(--fg);
	--btn-border: currentColor;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 56px;
	padding: 0 30px 0 32px;
	border: 1px solid var(--btn-border);
	border-radius: var(--radius-pill);
	background: var(--btn-bg);
	color: var(--btn-fg);
	font-family: var(--font-ui);
	font-weight: var(--weight-ui);
	font-size: 15px;
	line-height: 1;
	letter-spacing: var(--tracking-ui);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background-color var(--dur-fast) var(--ease-out),
		color var(--dur-fast) var(--ease-out),
		border-color var(--dur-fast) var(--ease-out),
		transform var(--dur-fast) var(--ease-out);
}

.dw-btn__icon {
	width: 18px;
	height: 18px;
	transition: transform var(--dur-fast) var(--ease-out);
}

.dw-btn:hover .dw-btn__icon,
.dw-btn:focus-visible .dw-btn__icon {
	transform: translate(3px, -3px);
}

.dw-btn:hover .dw-icon--arrow-right,
.dw-btn:focus-visible .dw-icon--arrow-right {
	transform: translateX(4px);
}

.dw-btn--outline {
	--btn-border: var(--fg-faint);
}

.dw-btn--outline:hover {
	--btn-border: var(--fg);
	--btn-bg: rgba(247, 239, 229, 0.08);
}

.dw-btn--night {
	--btn-bg: rgba(6, 7, 16, 0.86);
	--btn-fg: var(--color-cream);
	--btn-border: rgba(247, 239, 229, 0.55);
}

.dw-btn--night:hover {
	--btn-border: var(--color-cream);
}

.dw-btn--cream {
	--btn-bg: transparent;
	--btn-fg: var(--color-cream);
	--btn-border: rgba(247, 239, 229, 0.7);
}

.dw-btn--hero {
	--btn-bg: transparent;
	--btn-fg: var(--color-cream);
	--btn-border: rgba(247, 239, 229, 0.75);
}

.dw-circle {
	display: inline-grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: 1px solid var(--fg-faint);
	border-radius: 50%;
	color: var(--fg);
	transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}

.dw-circle .dw-icon {
	width: 22px;
	height: 22px;
}

.dw-circle:hover:not(:disabled):not([aria-disabled="true"]) {
	border-color: var(--fg);
	background: rgba(247, 239, 229, 0.08);
}

.dw-circle:disabled,
.dw-circle[aria-disabled="true"] {
	opacity: 0.4;
	cursor: default;
}

.dw-textlink {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	letter-spacing: var(--tracking-ui-wide);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--fg);
}

.dw-textlink .dw-icon {
	width: 16px;
	height: 16px;
	transition: transform var(--dur-fast) var(--ease-out);
}

.dw-textlink:hover .dw-icon {
	transform: translate(3px, -3px);
}

.dw-admin-note {
	margin-top: 32px;
	padding: 16px 20px;
	border: 1px dashed var(--fg-faint);
	border-radius: var(--radius-sm);
	font-size: 15px;
}

/* Project image placeholder (no featured image yet) */
.dw-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	min-height: 160px;
	background:
		radial-gradient(120% 90% at 70% 110%, rgba(244, 135, 94, 0.55), rgba(244, 135, 94, 0) 60%),
		linear-gradient(180deg, #1c1838 0%, #3a2a55 55%, #6b3d5d 100%);
}

.dw-placeholder__mark {
	font-size: clamp(64px, 10vw, 140px);
	line-height: 1;
	text-transform: lowercase;
}

/* Solid cream primary button on desktop (homepage finale and inner page CTAs). */
@media (min-width: 1024px) {
	.dw-btn--cream {
		--btn-bg: var(--color-cream);
		--btn-fg: var(--color-ink);
		--btn-border: var(--color-cream);
	}

	.dw-btn--cream:hover {
		--btn-bg: #fff;
	}
}
