/* ============================================================================
   Demand Wolf — base.css
   Reset → typography → shared components (tag, buttons, nav, mobile menu,
   footer) → interior-page primitives.
   Design language: zero border radius, hard borders, ease cubic-bezier(.2,.7,.2,1).
   ============================================================================ */

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

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

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	tab-size: 4;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

body {
	min-height: 100vh;
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.6;
	color: var(--text-body);
	background: var(--surface-page);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

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

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

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

ul,
ol {
	padding: 0;
	list-style: none;
}

dd {
	margin: 0;
}

/* Accessibility */

:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
}

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

.dw-skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--ink);
	color: var(--cream);
	padding: var(--space-3) var(--space-4);
	z-index: 1000;
	text-decoration: none;
}

.dw-skip-link:focus {
	top: 0;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	color: var(--text-strong);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

p {
	max-width: 72ch;
}

a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	transition: color var(--dur-fast) var(--ease);
}

a:hover {
	color: var(--signal);
}

strong,
b {
	font-weight: 600;
	color: var(--text-strong);
}

small {
	font-size: var(--fs-small);
}

/* Serif-italic emphasis inside display headlines. */
.dw-em {
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 500;
	color: var(--signal);
}

.dw-em--muted {
	color: var(--muted);
}

.dw-em--inherit {
	color: inherit;
}

/* Strikethrough drawn across a headline word (hero "describe"). */
.dw-strike {
	position: relative;
	display: inline-block;
}

.dw-strike::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: calc(54% - 2.5px);
	height: 5px;
	background: var(--signal);
	transform-origin: left;
}

.dw-anim .dw-strike::after {
	transform: scaleX(0);
	transition: transform 650ms var(--ease) 900ms;
}

.dw-anim [data-reveal].is-inview .dw-strike::after {
	transform: scaleX(1);
}

/* Mono "spec sheet" annotation. */
.dw-mono {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.7;
}

/* Mono tag with the 18px leading dash. */
.dw-tag {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--signal);
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: none;
}

.dw-tag::before {
	content: "";
	width: 18px;
	height: 1px;
	background: currentColor;
	flex-shrink: 0;
}

.dw-tag--ember {
	color: var(--ember);
}

.dw-tag--cream {
	color: var(--cream);
}

/* ---- Layout primitives ----------------------------------------------------
   .dw-wrap is the homepage content column; .dw-container is kept for the
   interior pages (contact, privacy, terms, 404). */

.dw-wrap {
	max-width: var(--wrap-max);
	margin-inline: auto;
	width: 100%;
}

.dw-wrap--narrow {
	max-width: var(--wrap-narrow);
}

.dw-container {
	max-width: var(--wrap-narrow);
	margin-inline: auto;
	padding-inline: var(--section-pad-x);
	width: 100%;
}

/* Homepage section shell. */
.dw-s {
	padding: var(--section-pad) var(--section-pad-x);
	position: relative;
	background: var(--cream);
	color: var(--ink);
	scroll-margin-top: 64px;
}

.dw-s--dark {
	background: var(--ink);
	color: var(--cream);
}

.dw-s--dark h2,
.dw-s--dark h3 {
	color: var(--cream);
}

/* Scroll-linked section transition mark (3px line at the section top). */
.dw-mark {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--signal);
	overflow: hidden;
	z-index: 2;
}

.dw-mark--dark {
	background: var(--ink-soft);
}

.dw-anim .dw-mark {
	background: var(--line);
}

.dw-anim .dw-mark--dark {
	background: var(--ink-soft);
}

.dw-mark > span {
	display: block;
	height: 100%;
	background: var(--signal);
	transform-origin: left;
}

.dw-anim .dw-mark > span {
	transform: scaleX(0);
	will-change: transform;
}

/* Shared section h2. */
.dw-h2 {
	font-size: var(--fs-h2);
	line-height: 0.95;
	letter-spacing: -0.035em;
	margin: 24px 0 0;
}

.dw-body {
	font-size: 17px;
	line-height: 1.6;
}

@media (max-width: 840px) {
	.dw-h2 {
		line-height: 1.05;
		letter-spacing: -0.025em;
	}
}

/* ---- Scroll-reveal system --------------------------------------------------
   Without html.dw-anim (no JS, or prefers-reduced-motion) everything is
   visible statically. With it, [data-reveal] elements start hidden and slide
   in when main.js marks them .is-inview.
   Per-element knobs (inline style): --dw-d delay, --dw-y/--dw-x offset,
   --dw-dur duration. */

.dw-anim [data-reveal] {
	opacity: 0;
	transform: translate3d(var(--dw-x, 0), var(--dw-y, 28px), 0);
	transition:
		opacity var(--dw-dur, var(--dur-reveal)) var(--ease) var(--dw-d, 0ms),
		transform var(--dw-dur, var(--dur-reveal)) var(--ease) var(--dw-d, 0ms);
	will-change: opacity, transform;
}

.dw-anim [data-reveal].is-inview {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

/* ---- Buttons ----------------------------------------------------------------
   Square, no radius, Space Grotesk 600. Primary = solid fill; secondary =
   1.5px outline. Hovers invert or deepen per the handoff recommendation. */

.dw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-3);
	padding: 17px 22px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: -0.005em;
	line-height: 1.1;
	border-radius: 0;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color var(--dur-base) var(--ease),
		color var(--dur-base) var(--ease),
		border-color var(--dur-base) var(--ease);
}

/* Large CTAs: full-width rows, label left / arrow right. */
.dw-btn--row {
	width: 100%;
	justify-content: space-between;
	padding: 20px 24px;
	font-size: 16px;
}

.dw-btn--lg {
	padding: 22px 26px;
}

.dw-btn--signal {
	background: var(--signal);
	color: var(--cream);
}

.dw-btn--signal:hover {
	background: var(--signal-deep);
	color: var(--cream);
}

.dw-btn--ink {
	background: var(--ink);
	color: var(--cream);
}

.dw-btn--ink:hover {
	background: var(--ink-soft);
	color: var(--bone);
}

.dw-btn--cream {
	background: var(--cream);
	color: var(--ink);
	padding: 14px 20px;
	font-size: 14px;
}

.dw-btn--cream:hover {
	background: var(--bone);
	color: var(--ink);
}

.dw-btn--outline {
	background: transparent;
	color: var(--ink);
	border: 1.5px solid var(--ink);
	padding: 17px 22px;
}

.dw-btn--outline.dw-btn--row {
	padding: 18px 22px;
}

.dw-btn--outline:hover {
	background: var(--ink);
	color: var(--cream);
}

.dw-btn--outline-cream {
	background: transparent;
	color: var(--cream);
	border: 1.5px solid var(--cream);
	padding: 20px 24px;
}

.dw-btn--outline-cream:hover {
	background: var(--cream);
	color: var(--signal);
}

/* Legacy aliases used by interior templates. */
.dw-btn--primary {
	background: var(--signal);
	color: var(--cream);
}

.dw-btn--primary:hover {
	background: var(--signal-deep);
	color: var(--cream);
}

.dw-btn--secondary {
	background: transparent;
	color: var(--ink);
	border: 1.5px solid var(--ink);
}

.dw-btn--secondary:hover {
	background: var(--ink);
	color: var(--cream);
}

/* ---- Brand ----------------------------------------------------------------- */

.dw-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
}

.dw-brand svg {
	flex-shrink: 0;
}

.dw-brand__wordmark {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -0.005em;
}

/* ---- Sticky nav -------------------------------------------------------------- */

.dw-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding: 18px 40px;
	background: var(--nav-bg);
	color: var(--ink);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}

/* Slide down from -100% on mount (700ms) when animation is on. */
.dw-anim .dw-nav {
	transform: translateY(-100%);
	transition: transform 700ms var(--ease);
	will-change: transform;
}

.dw-anim .dw-nav.is-mounted {
	transform: translateY(0);
}

.dw-nav__links {
	display: flex;
	align-items: center;
	gap: 32px;
}

.dw-nav__link {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--ink-mid);
	text-decoration: none;
}

.dw-nav__link:hover {
	color: var(--signal);
}

.dw-nav__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.dw-nav__cta {
	padding: 11px 18px;
	font-size: 13px;
}

.dw-burger {
	display: none;
	width: 44px;
	height: 44px;
	border: 1.5px solid var(--ink);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	border-radius: 0;
}

.dw-burger span {
	width: 18px;
	height: 1.5px;
	background: var(--ink);
	display: block;
}

@media (max-width: 840px) {
	.dw-nav {
		padding: 14px 20px;
	}
	.dw-nav__links {
		display: none;
	}
	.dw-burger {
		display: inline-flex;
	}
}

@media (max-width: 430px) {
	/* The in-menu CTA takes over on narrow phones. */
	.dw-nav__cta {
		display: none;
	}
}

/* ---- Full-screen mobile menu ------------------------------------------------- */

.dw-menu {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: var(--ink);
	color: var(--cream);
	display: flex;
	flex-direction: column;
	opacity: 0;
	pointer-events: none;
	transition: opacity 320ms var(--ease);
}

.dw-menu[hidden] {
	display: none;
}

.dw-menu.is-open {
	opacity: 1;
	pointer-events: auto;
}

.dw-menu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid var(--ink-soft);
	flex-shrink: 0;
}

.dw-menu__close {
	width: 44px;
	height: 44px;
	border: 1.5px solid rgba(236, 229, 211, 0.35);
	color: var(--cream);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0;
}

.dw-menu__nav {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0 24px;
	overflow-y: auto;
}

.dw-menu__link {
	display: flex;
	align-items: baseline;
	gap: 16px;
	padding: 15px 0;
	text-decoration: none;
	border-bottom: 1px solid var(--ink-soft);
	color: var(--cream);
}

.dw-menu__index {
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--signal);
	letter-spacing: 0.1em;
}

.dw-menu__label {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 30px;
	letter-spacing: -0.02em;
}

.dw-menu__foot {
	padding: 0 24px 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex-shrink: 0;
}

.dw-menu__contact {
	font-size: 10px;
	color: var(--dim);
}

/* Staggered entrance: links + footer slide up as the panel opens. */
.dw-menu__link,
.dw-menu__foot {
	opacity: 0;
	transform: translateY(14px);
	transition:
		opacity 420ms var(--ease),
		transform 420ms var(--ease);
}

.dw-menu.is-open .dw-menu__link,
.dw-menu.is-open .dw-menu__foot {
	opacity: 1;
	transform: translateY(0);
	transition-delay: calc(100ms + var(--dw-i, 0) * 45ms);
}

/* ---- Footer -------------------------------------------------------------- */

.dw-footer {
	background: var(--ink);
	color: var(--cream-deep);
	padding: 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-6);
	border-top: 1px solid var(--ink-soft);
}

.dw-footer .dw-brand__wordmark {
	font-size: 14px;
	color: var(--cream);
}

.dw-footer__meta {
	font-size: 11px;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) var(--space-3);
	align-items: center;
}

.dw-footer__meta a {
	color: var(--cream-deep);
	text-decoration: none;
}

.dw-footer__meta a:hover {
	color: var(--cream);
}

@media (max-width: 840px) {
	.dw-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		padding: 28px 20px;
	}
}

/* ---- Interior pages ---------------------------------------------------------
   Generic styles for /contact/, /privacy/, /terms/, 404, posts, search. */

.dw-section {
	padding-block: clamp(3rem, 6vw, 6rem);
	scroll-margin-top: 80px;
}

.dw-section--tight {
	padding-block: var(--space-12);
}

.dw-section__head {
	max-width: 60ch;
	margin-bottom: var(--space-10);
}

.dw-section__title {
	font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
	margin-bottom: var(--space-3);
}

.dw-section__intro {
	font-size: var(--fs-lead);
	color: var(--text-soft);
	text-wrap: pretty;
}

.dw-hero__inner {
	max-width: 52rem;
}

.dw-hero__eyebrow {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--signal);
	margin-bottom: var(--space-4);
}

.dw-hero__sub {
	font-size: var(--fs-lead);
	color: var(--text-soft);
	max-width: 48ch;
	margin-bottom: var(--space-8);
	text-wrap: pretty;
}

.dw-hero__actions {
	display: flex;
	gap: var(--space-3);
	flex-wrap: wrap;
}

.dw-page-title,
.dw-post-title,
.dw-hero__title {
	font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
	letter-spacing: -0.03em;
	margin-bottom: var(--space-5);
}

.dw-prose > * + * {
	margin-top: var(--space-5);
}

.dw-prose h2 {
	margin-top: var(--space-12);
}

.dw-prose h3 {
	margin-top: var(--space-8);
}

.dw-post-meta {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-soft);
}

.dw-search {
	display: flex;
	gap: var(--space-2);
}

.dw-search__input {
	border: 1.5px solid var(--ink);
	background: var(--bone);
	padding: var(--space-3) var(--space-4);
	flex: 1;
	border-radius: 0;
}

.dw-search__btn {
	background: var(--ink);
	color: var(--cream);
	padding: var(--space-3) var(--space-5);
	font-weight: 600;
	font-family: var(--font-display);
}
