/* ==========================================================================
   BrandShelf — tokens, reset, typography, primitives
   ========================================================================== */

:root {
	/* Surface */
	--ink: #0b0b0e;
	--ink-1: #101015;
	--ink-2: #16161d;
	--ink-3: #1e1e27;
	--line: #26262f;
	--line-soft: #1c1c24;

	--paper: #f6f3ee;
	--paper-2: #eae5dc;
	/* Deeper warm grey for the stats band, so it reads as a pause between the
	   dark sections rather than a bright slab. */
	--paper-muted: #e4dfd4;

	/* Text */
	--fg: #f6f3ee;
	--fg-dim: #a3a1ad;
	--fg-mute: #6f6d7a;
	--fg-on-paper: #14141a;
	--fg-on-paper-dim: #5c5a66;

	/* Accent */
	--accent: #ff4d2d;
	--accent-hot: #ff6a4f;
	--lime: #d7ff3e;
	--violet: #8b7bff;
	--sky: #63d2ff;

	/* Type */
	--font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
	--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	/* Fluid scale */
	--fs-mega: clamp(3.25rem, 9.5vw, 8.5rem);
	--fs-h1: clamp(2.5rem, 6vw, 5rem);
	--fs-h2: clamp(2rem, 4.4vw, 3.75rem);
	--fs-h3: clamp(1.5rem, 2.6vw, 2.25rem);
	--fs-h4: clamp(1.15rem, 1.6vw, 1.4rem);
	--fs-lead: clamp(1.05rem, 1.5vw, 1.3rem);
	--fs-body: 1rem;
	--fs-sm: 0.875rem;
	--fs-xs: 0.75rem;

	/* Space */
	--gutter: clamp(1.25rem, 4vw, 3.5rem);
	--section-y: clamp(4.5rem, 10vw, 9rem);
	--max: 1360px;
	--max-text: 68ch;

	/* Shape */
	--r-sm: 8px;
	--r: 14px;
	--r-lg: 22px;
	--r-xl: 34px;
	--r-pill: 999px;

	/* Motion */
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
	--dur: 0.45s;

	--shadow: 0 1px 2px rgb(0 0 0 / 0.28), 0 12px 32px -12px rgb(0 0 0 / 0.5);
	--shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 40px 80px -32px rgb(0 0 0 / 0.65);
}

/* --------------------------------------------------------- reset */

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

html {
	-webkit-text-size-adjust: 100%;
	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 {
	margin: 0;
	background: var(--ink);
	color: var(--fg);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: 1.65;
	font-feature-settings: "cv05" 1, "ss03" 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.bs-no-scroll {
	overflow: hidden;
}

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

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

p {
	margin: 0 0 1.15em;
	text-wrap: pretty;
}

p:last-child {
	margin-bottom: 0;
}

ul,
ol {
	margin: 0 0 1.15em;
	padding-left: 1.25em;
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 3rem 0;
}

figure {
	margin: 0;
}

::selection {
	background: var(--accent);
	color: #fff;
}

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

/* --------------------------------------------------------- typography */

.display {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 0.94;
}

.t-mega {
	font-size: var(--fs-mega);
}

.t-h1 {
	font-size: var(--fs-h1);
}

.t-h2 {
	font-size: var(--fs-h2);
}

.t-h3 {
	font-size: var(--fs-h3);
}

.t-h4 {
	font-size: var(--fs-h4);
	letter-spacing: -0.015em;
}

.lead {
	font-size: var(--fs-lead);
	line-height: 1.55;
	color: var(--fg-dim);
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--fg-mute);
	margin: 0 0 1.25rem;
}

.eyebrow::before {
	content: "";
	width: 1.75rem;
	height: 1px;
	background: var(--accent);
	flex: none;
}

.eyebrow--plain::before {
	display: none;
}

.t-italic {
	font-family: var(--font-display);
	font-style: italic;
}

.t-accent {
	color: var(--accent);
}

.t-lime {
	color: var(--lime);
}

.t-dim {
	color: var(--fg-dim);
}

/* --------------------------------------------------------- layout */

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

.wrap--narrow {
	max-width: 900px;
}

.wrap--wide {
	max-width: 1600px;
}

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

.section--tight {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.section--paper {
	background: var(--paper);
	color: var(--fg-on-paper);
}

.section--paper .lead,
.section--paper .t-dim {
	color: var(--fg-on-paper-dim);
}

.section--paper .eyebrow {
	color: #8a8579;
}

/* Pairs with .section--paper and only shifts the tone. */
.section--paper-muted {
	background: var(--paper-muted);
}

.section-head {
	display: grid;
	gap: 1.5rem;
	margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

@media (min-width: 900px) {
	.section-head--split {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		align-items: end;
		gap: 3rem;
	}
}

.section-head p {
	max-width: 52ch;
}

.stack > * + * {
	margin-top: var(--stack-gap, 1rem);
}

.grid {
	display: grid;
	gap: var(--grid-gap, clamp(1rem, 2vw, 1.75rem));
}

.rule {
	height: 1px;
	background: var(--line);
	border: 0;
	margin: 0;
}

.section--paper .rule {
	background: rgb(20 20 26 / 0.12);
}

/* --------------------------------------------------------- buttons */

.btn {
	--btn-bg: var(--accent);
	--btn-fg: #fff;
	--btn-bd: var(--accent);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	padding: 0.95em 1.7em;
	border: 1px solid var(--btn-bd);
	border-radius: var(--r-pill);
	background: var(--btn-bg);
	color: var(--btn-fg);
	font-size: var(--fs-sm);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.28s var(--ease), background-color 0.28s var(--ease),
		color 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
	white-space: nowrap;
}

.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px -10px rgb(255 77 45 / 0.7);
}

.btn:active {
	transform: translateY(0);
}

.btn--lg {
	padding: 1.15em 2.1em;
	font-size: var(--fs-body);
}

.btn--ghost {
	--btn-bg: transparent;
	--btn-fg: var(--fg);
	--btn-bd: var(--line);
}

.btn--ghost:hover {
	--btn-bg: rgb(246 243 238 / 0.06);
	--btn-bd: rgb(246 243 238 / 0.4);
	box-shadow: none;
}

.btn--solid {
	--btn-bg: var(--fg);
	--btn-fg: var(--ink);
	--btn-bd: var(--fg);
}

.btn--solid:hover {
	box-shadow: 0 10px 26px -12px rgb(246 243 238 / 0.5);
}

.btn--lime {
	--btn-bg: var(--lime);
	--btn-fg: #14140a;
	--btn-bd: var(--lime);
}

.btn--lime:hover {
	box-shadow: 0 10px 26px -10px rgb(215 255 62 / 0.55);
}

.section--paper .btn--ghost {
	--btn-fg: var(--fg-on-paper);
	--btn-bd: rgb(20 20 26 / 0.18);
}

.section--paper .btn--ghost:hover {
	--btn-bg: rgb(20 20 26 / 0.05);
	--btn-bd: rgb(20 20 26 / 0.45);
}

.section--paper .btn--solid {
	--btn-bg: var(--ink);
	--btn-fg: var(--paper);
	--btn-bd: var(--ink);
}

.btn[disabled],
.btn.is-disabled {
	opacity: 0.5;
	pointer-events: none;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

/* Text link with animated underline */
.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: var(--fs-sm);
	font-weight: 500;
	text-decoration: none;
	color: inherit;
	padding-bottom: 2px;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0% 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.4s var(--ease);
}

.link-arrow:hover {
	background-size: 100% 1px;
}

.link-arrow svg {
	transition: transform 0.35s var(--ease);
}

.link-arrow:hover svg {
	transform: translateX(4px);
}

/* --------------------------------------------------------- chips & badges */

.chip {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.4em 0.85em;
	border: 1px solid var(--line);
	border-radius: var(--r-pill);
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-dim);
	background: rgb(246 243 238 / 0.03);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

a.chip:hover,
.chip.is-active {
	color: var(--ink);
	background: var(--fg);
	border-color: var(--fg);
}

.section--paper .chip {
	border-color: rgb(20 20 26 / 0.14);
	color: var(--fg-on-paper-dim);
	background: rgb(20 20 26 / 0.03);
}

.section--paper a.chip:hover,
.section--paper .chip.is-active {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.3em 0.7em;
	border-radius: var(--r-pill);
	background: var(--accent);
	color: #fff;
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.4;
}

.badge--lime {
	background: var(--lime);
	color: #14140a;
}

.badge--ghost {
	background: rgb(11 11 14 / 0.7);
	color: var(--fg);
	backdrop-filter: blur(8px);
	border: 1px solid rgb(246 243 238 / 0.16);
}

/* --------------------------------------------------------- cards */

.card {
	position: relative;
	background: var(--ink-1);
	border: 1px solid var(--line-soft);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.card:hover {
	border-color: var(--line);
}

.section--paper .card {
	background: #fff;
	border-color: rgb(20 20 26 / 0.09);
}

/* --------------------------------------------------------- forms */

.field {
	display: grid;
	gap: 0.4rem;
}

.field label,
label {
	font-size: var(--fs-sm);
	font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 0.85em 1.05em;
	background: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: var(--r);
	color: var(--fg);
	transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

input::placeholder,
textarea::placeholder {
	color: var(--fg-mute);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--fg-dim);
	background: var(--ink-3);
	outline: none;
}

.section--paper input,
.section--paper select,
.section--paper textarea {
	background: #fff;
	border-color: rgb(20 20 26 / 0.14);
	color: var(--fg-on-paper);
}

/* --------------------------------------------------------- utilities */

.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--lime);
	color: #14140a;
	border-radius: var(--r-sm);
	text-decoration: none;
}

.skip-link:focus {
	top: 1rem;
}

.noise {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0.032;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll reveal */
[data-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
	transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1;
		transform: none;
	}
}

.aspect-1 {
	aspect-ratio: 1;
}

.aspect-43 {
	aspect-ratio: 4 / 3;
}

.aspect-169 {
	aspect-ratio: 16 / 9;
}

.cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
