/* ==========================================================================
   Typography: three roles
   1. Thin display  (the "work" in the wordmark)   .dw-thin
   2. Heavy display (the "dusk" in the wordmark)   .dw-heavy  (Duskwork gradient)
   3. Utility / navigation                          --font-ui
   ========================================================================== */

/*
 * Urbanist (SIL Open Font License), one variable file covering 100 to 900.
 * To use the studio's own fonts: drop the files in /assets/fonts, replace these
 * @font-face rules, and point the --font-* variables in global.css at the new names.
 */
@font-face {
	font-family: "Urbanist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/urbanist-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Urbanist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/urbanist-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Display headings ------------------------------------------------------- */

.dw-display {
	font-family: var(--font-display-light);
	font-weight: var(--weight-display-light);
	letter-spacing: var(--tracking-display-light);
	line-height: 0.94;
	color: var(--fg);
	overflow-wrap: break-word;
}

.dw-thin {
	font-family: var(--font-display-light);
	font-weight: var(--weight-display-light);
	letter-spacing: var(--tracking-display-light);
}

/*
 * Heavy gradient type. The gradient is painted only inside the element's box, so the
 * box gets a little room on every side: vertically for ascenders and descenders, and
 * horizontally because the tight tracking pulls the box edge inside the last letter
 * (without it the final "s" of "projects" loses its right edge). Equal negative
 * margins cancel the padding, so nothing moves.
 */
.dw-heavy {
	font-family: var(--font-display-heavy);
	font-weight: var(--weight-display-heavy);
	letter-spacing: var(--tracking-display-heavy);
	color: var(--color-pink);
	padding: 0.1em 0.12em 0.16em 0.06em;
	margin: -0.1em -0.12em -0.16em -0.06em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.dw-heavy {
		background-image: var(--dusk-text-gradient, var(--dusk-gradient));
		background-repeat: no-repeat;
		background-size: 100% 100%;
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
		color: transparent;
	}
}

@media (forced-colors: active) {
	.dw-heavy {
		background: none;
		-webkit-text-fill-color: CanvasText;
		color: CanvasText;
	}
}

/* One wrapper per line of multi-line display copy. */
.dw-line {
	display: block;
}

/* Body copy -------------------------------------------------------------- */

.dw-lede {
	font-family: var(--font-ui);
	font-weight: var(--weight-ui);
	font-size: clamp(15px, 1.25vw + 9px, 22px);
	line-height: 1.55;
	letter-spacing: 0.06em;
	color: var(--fg);
	max-width: 34em;
}

@media (min-width: 1024px) {
	.dw-lede {
		letter-spacing: 0.035em;
	}
}

/* Wordmark --------------------------------------------------------------- */

.dw-logo {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-decoration: none;
	color: var(--fg);
	line-height: 1;
}

.dw-logo__word {
	display: block;
	font-size: 34px;
	line-height: 0.95;
	white-space: nowrap;
}

.dw-logo__dusk {
	font-family: var(--font-display-heavy);
	font-weight: var(--weight-display-heavy);
	letter-spacing: -0.055em;
	/* Right padding gives the "k" room to paint (see .dw-heavy); the margin keeps
	   "work" exactly where it was. */
	padding-block: 0.08em 0.14em;
	padding-right: 0.1em;
	margin-right: -0.08em;
	color: var(--color-pink);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.dw-logo__dusk {
		background-image: linear-gradient(180deg, #7d5cd0 22%, #c05ca4 42%, #e8657a 58%, #f58a5e 72%, #fbb36a 86%);
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
		color: transparent;
	}
}

.dw-logo__work {
	font-family: var(--font-display-light);
	font-weight: 300;
	letter-spacing: -0.03em;
}

.dw-logo__studio {
	font-family: var(--font-ui);
	font-weight: 500;
	font-size: 9.5px;
	letter-spacing: 0.62em;
	margin-right: -0.62em;
	text-transform: uppercase;
	padding-right: 0.2em;
}

.dw-logo--custom img {
	max-height: 56px;
	width: auto;
}

@media (min-width: 1024px) {
	.dw-logo__word {
		font-size: clamp(36px, 3.1vw, 48px);
	}

	.dw-logo__studio {
		font-size: 11px;
	}
}
