/* Motivation — black on white, minimal */

:root {
	--ink: #0d0d0d;
	--body: #161616;
	--ink-soft: #1c1c1c;
	--paper: #fafafa;
	--paper-deep: #ececec;
	--surface: #ffffff;
	--muted: rgba(13, 13, 13, 0.68);
	--muted-2: rgba(13, 13, 13, 0.55);
	--bg-phrase: rgba(13, 13, 13, 0.28);
	--stroke: rgba(13, 13, 13, 0.13);
	--stroke-strong: rgba(13, 13, 13, 0.22);
	--font-sans: "Instrument Sans", system-ui, sans-serif;
	--font-hand: "Caveat", cursive;
	--font-mono: "JetBrains Mono", ui-monospace, monospace;
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
	--shadow-md: 0 8px 24px -8px rgba(10, 10, 10, 0.12), 0 2px 8px -4px rgba(10, 10, 10, 0.06);
	--shadow-lg: 0 24px 48px -16px rgba(10, 10, 10, 0.14);
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	overflow-x: clip;
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	font-family: var(--font-sans);
	font-size: clamp(1rem, 0.28vw + 0.94rem, 1.0625rem);
	line-height: 1.6;
	color: var(--body);
	background-color: var(--paper);
	font-feature-settings: "kern" 1, "liga" 1;
	background-image:
		radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 255, 255, 0.9), transparent 50%),
		radial-gradient(ellipse 120% 80% at 50% -15%, rgba(0, 0, 0, 0.03), transparent 55%),
		url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.028'/%3E%3C/svg%3E");
}

main {
	display: block;
	width: 100%;
	max-width: 100vw;
	overflow-x: clip;
}

::selection {
	background: rgba(13, 13, 13, 0.18);
	color: var(--ink);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

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

a:hover {
	text-decoration: none;
}

/* Hero — at least 70vh tall; no fixed height so thesis + CA never clip */
.hero {
	position: relative;
	min-height: 70vh;
	min-height: 70dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-top: calc(clamp(2rem, 6vh, 4rem) + env(safe-area-inset-top, 0px));
	padding-bottom: calc(clamp(2rem, 5vh, 3.5rem) + env(safe-area-inset-bottom, 0px));
	padding-left: calc(clamp(1rem, 4vw, 1.5rem) + env(safe-area-inset-left, 0px));
	padding-right: calc(clamp(1rem, 4vw, 1.5rem) + env(safe-area-inset-right, 0px));
	overflow: hidden;
	box-sizing: border-box;
}

.hero-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	font-family: var(--font-hand);
	color: var(--bg-phrase);
	line-height: 1.1;
}

.hero-bg__line {
	position: absolute;
	white-space: nowrap;
}

.hero-bg__line--tl {
	top: 8%;
	left: 6%;
	font-size: clamp(1.25rem, 3.5vw, 2rem);
	transform: rotate(-4deg);
}

.hero-bg__line--tr {
	top: 10%;
	right: 8%;
	font-size: clamp(1.2rem, 3.2vw, 1.85rem);
	transform: rotate(5deg);
}

.hero-bg__line--ml {
	top: 38%;
	left: 4%;
	font-size: clamp(1.15rem, 2.8vw, 1.75rem);
	transform: rotate(-2deg);
	max-width: 40%;
	white-space: normal;
}

.hero-bg__line--mr1 {
	top: 34%;
	right: 10%;
	font-size: clamp(1.2rem, 3vw, 1.9rem);
	transform: rotate(4deg);
}

.hero-bg__line--mr2 {
	top: 48%;
	right: 8%;
	font-size: clamp(1.1rem, 2.6vw, 1.65rem);
	transform: rotate(-3deg);
}

.hero-bg__line--bl {
	bottom: 12%;
	left: 6%;
	font-size: clamp(1.1rem, 2.5vw, 1.6rem);
	transform: rotate(-3deg);
	max-width: min(14rem, 38vw);
	white-space: normal;
	text-align: left;
}

.hero-bg__line--br {
	bottom: 14%;
	right: 6%;
	font-size: clamp(1.15rem, 2.8vw, 1.75rem);
	transform: rotate(-5deg);
}

.hero-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: min(36rem, 100%);
	margin-inline: auto;
	text-align: center;
	min-width: 0;
}

/* Same face as background $motivation (Caveat) */
.hero-title {
	margin: 0 0 1.5rem;
	font-family: var(--font-hand);
	font-size: clamp(2.5rem, 8vw + 0.5rem, 4.25rem);
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.05;
	color: var(--ink);
}

.hero-thesis {
	text-align: center;
	font-size: clamp(1rem, 0.35vw + 0.92rem, 1.0625rem);
	line-height: 1.72;
	color: var(--body);
	max-width: min(34rem, 100%);
	margin-inline: auto;
}

.hero-thesis p {
	margin: 0 0 1rem;
}

.hero-thesis strong {
	font-weight: 600;
}

.hero-thesis__close {
	margin: 0.35rem 0 0;
	font-style: italic;
	color: var(--muted);
	font-size: clamp(0.9375rem, 0.2vw + 0.9rem, 1rem);
	letter-spacing: 0.01em;
}

/* Contract — compact panel: clear but not loud */
.ca-panel {
	margin-top: 2rem;
	margin-inline: auto;
	width: 100%;
	max-width: min(22rem, 100%);
	text-align: left;
	padding: 0.75rem 0.85rem 0.85rem;
	background: var(--surface);
	border: 1px solid var(--stroke);
	border-radius: 0.75rem;
	box-shadow: var(--shadow-sm);
}

.ca-panel__head {
	margin-bottom: 0.5rem;
}

.ca-panel__label {
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.ca-panel__row {
	--ca-row-height: 2.75rem;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.45rem;
}

.ca-value {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	min-width: 0;
	height: var(--ca-row-height);
	margin: 0;
	padding: 0 0.65rem;
	font-family: var(--font-mono);
	font-size: clamp(0.75rem, 0.15vw + 0.7rem, 0.8125rem);
	font-weight: 400;
	font-style: normal;
	font-synthesis: none;
	letter-spacing: 0.02em;
	line-height: normal;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--stroke-strong);
	border-radius: 0.5rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: default;
}

.ca-value:focus {
	outline: none;
}

.ca-value:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.ca-value::selection {
	background: rgba(13, 13, 13, 0.15);
}

.ca-copy {
	display: grid;
	place-items: center;
	width: var(--ca-row-height);
	height: var(--ca-row-height);
	padding: 0;
	border: none;
	border-radius: 0.5rem;
	background: var(--ink);
	color: #fff;
	cursor: pointer;
	transition:
		background 0.2s var(--ease-out),
		transform 0.15s var(--ease-out);
}

.ca-copy:hover {
	background: var(--ink-soft);
}

.ca-copy:active {
	transform: scale(0.98);
}

.ca-copy:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.ca-copy img {
	width: 18px;
	height: 18px;
	max-width: none;
	object-fit: contain;
}

.ca-copy.is-copied {
	background: var(--ink-soft);
}

/* Section gutters + notches */
.lore-section,
.tokenomics-section,
.gallery-section,
.socials-section,
.site-footer {
	padding-left: calc(clamp(1rem, 4vw, 1.5rem) + env(safe-area-inset-left, 0px));
	padding-right: calc(clamp(1rem, 4vw, 1.5rem) + env(safe-area-inset-right, 0px));
}

/* Lore */
.lore-section {
	padding-top: clamp(3.25rem, 7vw, 4.5rem);
	padding-bottom: clamp(3.5rem, 8vw, 5rem);
	border-top: 1px solid var(--stroke);
}

.lore-section .section-head {
	margin-bottom: 2rem;
}

.lore-body {
	max-width: min(26rem, 100%);
	margin: 0 auto;
	text-align: center;
	font-size: clamp(1.02rem, 0.25vw + 0.96rem, 1.08rem);
	line-height: 1.75;
	color: var(--body);
	min-width: 0;
}

.lore-body p {
	margin: 0 0 1.35rem;
}

.lore-body p:last-child {
	margin-bottom: 0;
}

.lore-lead {
	font-size: 1.125rem;
	font-weight: 500;
	color: var(--ink);
	letter-spacing: -0.01em;
}

.lore-body strong {
	font-weight: 600;
	color: var(--ink);
}

.lore-list {
	list-style: none;
	margin: 1.75rem auto 1.75rem;
	padding: 1.15rem 1.25rem;
	border-top: 1px solid var(--stroke);
	border-bottom: 1px solid var(--stroke);
	max-width: 18rem;
}

.lore-list li {
	margin: 0.4rem 0;
	font-family: var(--font-hand);
	font-size: clamp(1.2rem, 2.8vw, 1.45rem);
	font-weight: 600;
	color: var(--ink);
	line-height: 1.35;
}

.lore-pivot {
	margin-top: 1.75rem;
	margin-bottom: 1.25rem;
	font-size: 1.05rem;
	color: var(--ink);
}

.lore-close {
	margin-bottom: 0.5rem;
	font-style: italic;
	color: var(--muted);
	font-size: clamp(0.96rem, 0.2vw + 0.9rem, 1rem);
}

.lore-close--last {
	margin-bottom: 0;
	font-style: normal;
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--ink);
}

/* Tokenomics — bento + hero stats */
.tokenomics-section {
	padding-top: clamp(3rem, 6vw, 4rem);
	padding-bottom: clamp(3.25rem, 7vw, 4.5rem);
	border-top: 1px solid var(--stroke);
}

.tokenomics-section .section-head {
	margin-bottom: 2rem;
}

.tokenomics-bento {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	max-width: min(40rem, 100%);
	margin: 0 auto;
}

.tokenomics-hero {
	position: relative;
	padding: 1.25rem 1.35rem 1.35rem;
	background: linear-gradient(145deg, var(--surface) 0%, var(--paper) 100%);
	border: 1px solid var(--stroke);
	border-radius: 1rem;
	box-shadow: var(--shadow-sm);
	overflow: hidden;
	text-align: left;
}

.tokenomics-hero::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--ink);
	border-radius: 1px;
}

.tokenomics-hero__figure {
	margin: 0;
	display: block;
	font-family: var(--font-hand);
	font-size: clamp(2.5rem, 8vw, 3.75rem);
	font-weight: 600;
	line-height: 0.95;
	letter-spacing: 0.02em;
	color: var(--ink);
	margin-bottom: 0.35rem;
}

.tokenomics-hero__label {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--muted);
}

.tokenomics-hero__hint {
	margin: 0.65rem 0 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--body);
	max-width: 16rem;
}

.tokenomics-chips {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 0.55rem;
	list-style: none;
	margin: 0.35rem 0 0;
	padding: 1rem 0 0;
	border-top: 1px solid var(--stroke);
}

.tokenomics-chips__item {
	margin: 0;
}

.tokenomics-chip {
	display: inline-block;
	padding: 0.5rem 1rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--stroke-strong);
	border-radius: 999px;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
	transition:
		border-color 0.2s var(--ease-out),
		transform 0.2s var(--ease-out),
		box-shadow 0.2s var(--ease-out);
}

.tokenomics-chip:hover {
	border-color: var(--ink);
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}

@media (max-width: 520px) {
	.tokenomics-bento {
		grid-template-columns: 1fr;
	}

	.tokenomics-chips {
		justify-content: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tokenomics-chip:hover {
		transform: none;
	}
}

/* Gallery */
.gallery-section {
	padding-top: clamp(3.5rem, 8vw, 5rem);
	padding-bottom: clamp(4rem, 10vw, 6rem);
	border-top: 1px solid var(--stroke);
	overflow-x: clip;
}

.section-head {
	text-align: center;
	max-width: min(26rem, 100%);
	margin: 0 auto 2.75rem;
	padding-inline: 0;
	min-width: 0;
}

.section-head h2 {
	margin: 0 0 0.4rem;
	font-family: var(--font-hand);
	font-size: clamp(1.5rem, 4vw + 0.5rem, 2.25rem);
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.15;
	color: var(--ink);
}

.section-sub {
	margin: 0;
	font-size: clamp(0.9375rem, 0.2vw + 0.9rem, 1rem);
	line-height: 1.55;
	color: var(--muted);
}

/* Gallery carousel — full viewport width, multiple slides per view (--gallery-slide-px set in JS) */
.gallery-carousel {
	width: 100vw;
	max-width: 100%;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-inline: clamp(0.65rem, 4vw, 1.5rem);
	padding-left: max(clamp(0.65rem, 4vw, 1.5rem), env(safe-area-inset-left, 0px));
	padding-right: max(clamp(0.65rem, 4vw, 1.5rem), env(safe-area-inset-right, 0px));
	box-sizing: border-box;
	min-width: 0;
}

.gallery-carousel__frame {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: clamp(0.5rem, 2vw, 0.85rem);
}

.gallery-carousel__viewport {
	--gallery-slide-px: 33vw;
	overflow: hidden;
	border-radius: 14px;
	border: 1px solid var(--stroke);
	background: var(--paper-deep);
	box-shadow: var(--shadow-sm);
	min-width: 0;
	touch-action: pan-y pinch-zoom;
}

.gallery-carousel__viewport:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

.gallery-carousel__track {
	display: flex;
	width: max-content;
	min-width: 100%;
	gap: clamp(0.35rem, 1.5vw, 0.65rem);
	transition: transform 0.5s var(--ease-out);
	will-change: transform;
}

.gallery-carousel__track.is-instant {
	transition: none !important;
}

.gallery-carousel__slide {
	flex: 0 0 var(--gallery-slide-px);
	width: var(--gallery-slide-px);
	max-width: var(--gallery-slide-px);
	min-width: 0;
	margin: 0;
}

.gallery-carousel__slide img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
}

.gallery-carousel__arrow {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	flex-shrink: 0;
	padding: 0;
	border: 1px solid var(--stroke-strong);
	border-radius: 50%;
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition:
		background 0.2s var(--ease-out),
		border-color 0.2s ease,
		transform 0.15s var(--ease-out),
		opacity 0.2s ease;
}

.gallery-carousel__arrow:hover:not(:disabled) {
	background: var(--paper);
	border-color: var(--ink);
}

.gallery-carousel__arrow:active:not(:disabled) {
	transform: scale(0.96);
}

.gallery-carousel__arrow:disabled {
	opacity: 0.28;
	cursor: not-allowed;
}

.gallery-carousel__arrow:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.gallery-carousel__arrow-icon {
	font-size: 1.35rem;
	line-height: 1;
	font-weight: 400;
	margin-top: -0.08em;
	pointer-events: none;
}

.gallery-carousel__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.45rem;
	margin-top: 1.15rem;
	padding: 0;
	min-height: 1.25rem;
}

.gallery-carousel__dot {
	width: 0.45rem;
	height: 0.45rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--stroke-strong);
	cursor: pointer;
	transition:
		background 0.25s var(--ease-out),
		transform 0.25s var(--ease-out);
}

.gallery-carousel__dot:hover {
	background: var(--muted);
}

.gallery-carousel__dot[aria-current="true"] {
	background: var(--ink);
	transform: scale(1.35);
}

.gallery-carousel__dot:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

@media (max-width: 480px) {
	.gallery-carousel__frame {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		gap: 0.65rem 0.85rem;
		align-items: center;
	}

	.gallery-carousel__viewport {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.gallery-carousel__arrow--prev {
		grid-column: 1;
		grid-row: 2;
		justify-self: start;
	}

	.gallery-carousel__arrow--next {
		grid-column: 2;
		grid-row: 2;
		justify-self: end;
	}

	.gallery-carousel__dots {
		margin-top: 0.5rem;
	}
}

/* Socials */
.socials-section {
	padding-top: clamp(2.5rem, 6vw, 3.5rem);
	padding-bottom: clamp(4rem, 10vw, 6rem);
	border-top: 1px solid var(--stroke);
}

.socials-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: clamp(1rem, 4vw, 1.5rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.socials-list__item {
	margin: 0;
}

.social-anchor {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	max-width: 8.5rem;
	text-align: center;
	text-decoration: none;
	color: inherit;
}

.social-anchor:hover .social-anchor__label {
	color: var(--ink);
}

.social-anchor__label {
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	line-height: 1.25;
	transition: color 0.2s var(--ease-out);
}

.social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	border-radius: 50%;
	background: var(--ink);
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition:
		transform 0.28s var(--ease-out),
		box-shadow 0.28s var(--ease-out),
		background 0.2s ease,
		opacity 0.2s ease;
	box-shadow: 0 6px 20px -6px rgba(10, 10, 10, 0.35);
}

.social-anchor:hover .social-link {
	transform: translateY(-4px);
	box-shadow: 0 14px 32px -10px rgba(10, 10, 10, 0.4);
	background: var(--ink-soft);
}

.social-anchor:focus-visible {
	outline: none;
}

.social-anchor:focus-visible .social-link {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

.social-link img {
	max-width: none;
	flex-shrink: 0;
	object-fit: contain;
}

.site-footer {
	padding-top: 2.25rem;
	padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
	text-align: center;
	font-size: clamp(0.875rem, 0.2vw + 0.82rem, 0.9375rem);
	letter-spacing: 0.02em;
	color: var(--muted);
	border-top: 1px solid var(--stroke);
}

.site-footer p {
	margin: 0;
}

/* Toast */
.toast {
	position: fixed;
	bottom: max(1rem, calc(0.5rem + env(safe-area-inset-bottom, 0px)));
	left: 50%;
	max-width: calc(100vw - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
	z-index: 100;
	transform: translateX(-50%) translateY(120%);
	padding: 0.7rem 1.35rem;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #fff;
	background: var(--ink);
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: var(--shadow-lg);
	opacity: 0;
	pointer-events: none;
	transition:
		transform 0.45s var(--ease-out),
		opacity 0.35s ease;
}

.toast.is-visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

@media (prefers-contrast: more) {
	:root {
		--ink: #000000;
		--body: #0a0a0a;
		--muted: rgba(0, 0, 0, 0.78);
		--muted-2: rgba(0, 0, 0, 0.68);
		--bg-phrase: rgba(0, 0, 0, 0.34);
		--stroke: rgba(0, 0, 0, 0.2);
		--stroke-strong: rgba(0, 0, 0, 0.32);
	}

}

@media (max-width: 640px) {
	.section-head {
		margin-bottom: 2rem;
	}

	.lore-list {
		padding-inline: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.gallery-carousel__track {
		transition: none;
	}

	.social-link,
	.social-anchor__label,
	.ca-copy,
	.gallery-carousel__arrow,
	.gallery-carousel__dot {
		transition: none;
	}

.social-anchor:hover .social-link,
	.gallery-carousel__arrow:active {
		transform: none;
	}

	.toast,
	.toast.is-visible {
		transition: opacity 0.2s ease;
	}
}
