/* --- Fonts --- */
@font-face {
	font-family: "Mokoto Glitch Mark";
	src: url("Mokoto Glitch Mark.ttf") format("truetype");
	font-weight: normal;
	font-style: normal;
}

/* --- Variables (apocalyptic: black & red) --- */
:root {
	--bg: #0d0c0c;
	--bg-elevated: #161414;
	--text: #ece8e6;
	--text-muted: #9a9490;
	--accent: #dc2626;
	--accent-neon: #ef4444;
	--accent-soft: rgba(220, 38, 38, 0.15);
	--accent-glow: rgba(220, 38, 38, 0.35);
	--glow-red: rgba(239, 68, 68, 0.9);
	--hero-red: #ef4444;
	--hero-glow-white: rgba(255, 255, 255, 0.9);
	--ember: rgba(180, 40, 30, 0.4);
	--smoke: rgba(0, 0, 0, 0.4);
	--border: #2a2624;
	--radius: 12px;
	--radius-lg: 20px;
	--font-display: "Mokoto Glitch Mark", "Syne", sans-serif;
	--font-body: "DM Sans", system-ui, sans-serif;
	--shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
}

/* --- Reset & base --- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

@media (max-width: 480px) {
	body {
		font-size: 1rem;
	}
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background-image: 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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
	pointer-events: none;
	z-index: 0;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

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

/* --- Layout --- */
.container {
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

@media (max-width: 480px) {
	.container {
		padding: 0 1rem;
	}
}

main {
	position: relative;
	z-index: 1;
}

/* --- Floating glass navbar (width of content only) --- */
.site-header {
	position: fixed;
	top: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100;
}

.glass-nav {
	width: fit-content;
	background: rgba(22, 20, 20, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(220, 38, 38, 0.25);
	border-radius: 999px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	height: 2.75rem;
	padding: 0 1.5rem;
}

.nav-links {
	display: flex;
	gap: 1.75rem;
}

.nav-links a {
	color: var(--text-muted);
	font-weight: 500;
	font-size: 0.9375rem;
}

.nav-links a:hover {
	color: var(--accent);
	text-decoration: none;
}

/* --- Hero --- */
.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 6rem 0 4rem;
	overflow: hidden;
}

.hero-content {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3rem;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.hero-content .container {
	max-width: none;
	padding: 0;
}

.hero-inner {
	flex: 1;
	min-width: 0;
	max-width: 520px;
	overflow: visible;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
}

.hero-image-wrap {
	flex-shrink: 0;
	align-self: center;
	position: relative;
	z-index: 2;
}

.hero-image {
	display: block;
	width: auto;
	max-height: 75vh;
	max-width: 320px;
	height: auto;
	object-fit: contain;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

.hero-bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 120% 80% at 50% -20%, var(--ember) 0%, transparent 50%),
		radial-gradient(ellipse 100% 60% at 50% 0%, var(--accent-glow) 0%, transparent 55%),
		linear-gradient(180deg, rgba(220, 38, 38, 0.08) 0%, transparent 30%, var(--bg) 70%),
		linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
	pointer-events: none;
}

.hero-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
	pointer-events: none;
}

/* Glitch title wrapper – full-text glitch (all letters at once), red core + white glow */
.glitch-wrap {
	position: relative;
	display: inline-block;
}

.hero-title .glitch-wrap.hero-title-line2 {
	display: block;
	margin-top: 0.08em;
}

.glitch-wrap::before,
.glitch-wrap::after {
	content: attr(data-text);
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	font-family: inherit;
	font-weight: inherit;
	font-size: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	pointer-events: none;
}

/* Glitch layers: full text (no clip-path), whole title glitches at once */
.glitch-wrap::before {
	animation: glitch-1 3.2s infinite linear alternate-reverse;
	color: var(--hero-red);
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
	transform: translate(-3px, 0);
	opacity: 0.85;
}

.glitch-wrap::after {
	animation: glitch-2 2.7s infinite linear alternate-reverse;
	color: var(--hero-red);
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
	transform: translate(3px, 0);
	opacity: 0.85;
}

@keyframes glitch-1 {
	0%, 88%, 100% { transform: translate(-3px, 0); }
	90% { transform: translate(3px, 2px); }
	92% { transform: translate(-2px, -1px); }
	94% { transform: translate(2px, 1px); }
	96% { transform: translate(-3px, 0); }
	98% { transform: translate(3px, -2px); }
}

@keyframes glitch-2 {
	0%, 88%, 100% { transform: translate(3px, 0); }
	91% { transform: translate(-3px, -2px); }
	93% { transform: translate(2px, 1px); }
	95% { transform: translate(-2px, -1px); }
	97% { transform: translate(3px, 0); }
	99% { transform: translate(-3px, 2px); }
}

.hero-label {
	font-size: 0.875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
	margin: 0 0 1rem;
}

/* Hero title: red/neon core + white glow, full-text glitch; sized to fit column with image */
.hero-title {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(1.75rem, 4.5vw, 2.5rem);
	line-height: 1.08;
	letter-spacing: 0.12em;
	margin: 0 0 1.25rem;
	text-transform: uppercase;
	color: var(--hero-red);
	text-shadow:
		0 0 8px rgba(255, 255, 255, 0.8),
		0 0 16px rgba(255, 255, 255, 0.4),
		0 0 28px rgba(255, 250, 250, 0.25);
}

.hero-title .glitch-wrap {
	color: var(--hero-red);
}

.hero-tagline {
	font-size: 1.125rem;
	color: var(--text-muted);
	max-width: 32ch;
	margin: 0 0 2rem;
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* --- Buttons --- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	font-family: var(--font-body);
	font-size: 0.9375rem;
	font-weight: 600;
	border-radius: var(--radius);
	transition: background 0.2s, color 0.2s, box-shadow 0.2s;
	cursor: pointer;
	border: none;
	text-decoration: none;
}

.btn-primary {
	background: var(--accent);
	color: #fff;
}

.btn-primary:hover {
	text-decoration: none;
	background: #b91c1c;
	box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-ghost {
	background: transparent;
	color: var(--text);
	border: 1px solid var(--border);
}

.btn-ghost:hover {
	text-decoration: none;
	background: var(--bg-elevated);
	border-color: var(--accent);
}

/* Hero CA row */
.hero-ca {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
	max-width: 28rem;
	margin-bottom: 1.5rem;
	flex-wrap: nowrap;
}

.hero-ca-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 2.75rem;
	padding: 0 1rem;
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: var(--text);
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.hero-ca-input:focus {
	outline: none;
	border-color: var(--accent);
}

.btn-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	flex-shrink: 0;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.btn-copy:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
}

.btn-copy img {
	filter: brightness(0) invert(1);
}

/* Toast */
.toast {
	position: fixed;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	padding: 0.75rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #fff;
	background: var(--accent);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.toast.is-visible {
	opacity: 1;
	visibility: visible;
}

/* --- Sections --- */
.section {
	padding: 4.5rem 0;
}

.section.scroll-reveal {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.scroll-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.section-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	letter-spacing: -0.02em;
	margin: 0 0 1.75rem;
	color: var(--text);
	text-align: center;
}

.section-title .glitch-wrap {
	color: var(--text);
}

/* No glitch or glow on section titles – keep them readable */
.section-title .glitch-wrap::before,
.section-title .glitch-wrap::after {
	display: none;
}

.section-subtitle {
	font-size: 0.9375rem;
	color: var(--text-muted);
	margin: 0 0 2rem;
}

/* --- Lore --- */
.lore {
	background: var(--bg-elevated);
	border-top: 1px solid var(--border);
}

.lore-container {
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.lore-content {
	margin-bottom: 2rem;
}

.lore-block {
	margin-top: 2.5rem;
	text-align: center;
}

.lore-block .twitter-tweet,
.lore-block iframe {
	margin: 0 auto !important;
	max-width: 320px;
}

.lore-video {
	margin-top: 2.5rem;
}

.lore-image-block {
	margin-top: 2.5rem;
}

.lore-image {
	display: block;
	width: 100%;
	max-width: 480px;
	height: auto;
	margin: 0 auto;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

.prose {
	font-size: 1.0625rem;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.prose p {
	margin: 0 0 1.25rem;
}

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

.prose strong {
	font-weight: 600;
	color: var(--text);
}

.lore-highlight {
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--accent);
}

.lore-quote {
	margin: 2rem 0 0;
	padding: 1.5rem 1.75rem;
	background: var(--accent-soft);
	border-left: 4px solid var(--accent);
	border-radius: 0 var(--radius) var(--radius) 0;
}

.lore-quote p,
.lore-quote cite {
	margin: 0 0 0.5rem;
	font-style: normal;
}

.lore-quote cite {
	display: block;
	font-style: italic;
	color: var(--text);
	opacity: 0.95;
}

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

.lore-video {
	margin-top: 3rem;
}

.lore-video-title {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 0.75rem;
	text-align: center;
}

.lore-video-player {
	display: block;
	width: 100%;
	max-width: 560px;
	height: auto;
	margin: 0 auto;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	background: #000;
}

.lore-tweets {
	margin-top: 3rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

.lore-tweets .twitter-tweet,
.lore-tweets iframe {
	margin: 0 !important;
	min-width: 0;
}

.lore-tweet-wrap {
	min-width: 0;
	max-width: 100%;
}

.lore-tweet-wrap iframe {
	max-width: 100% !important;
}

@media (max-width: 768px) {
	.lore-tweets {
		grid-template-columns: 1fr;
		gap: 2rem;
		margin-top: 2rem;
	}
}

/* --- Tokenomics --- */
.tokenomics-list {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	display: grid;
	gap: 0.125rem;
}

.tokenomics-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--border);
}

.tokenomics-term {
	font-weight: 500;
	color: var(--text-muted);
}

.tokenomics-value {
	font-weight: 600;
	text-align: right;
}

.tokenomics-cta {
	font-weight: 600;
	color: var(--accent);
	margin: 0;
}

/* --- Links --- */
.links {
	background: var(--bg-elevated);
	border-top: 1px solid var(--border);
}

.links-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
}

.link-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	padding: 1.5rem 1.25rem;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	color: var(--text);
	font-weight: 600;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.link-card:hover {
	text-decoration: none;
	border-color: var(--accent);
	background: var(--accent-soft);
	box-shadow: 0 0 24px rgba(220, 38, 38, 0.2);
}

.link-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid var(--border);
}

.link-icon img {
	width: 24px;
	height: 24px;
	filter: brightness(0) invert(1);
}

.link-label {
	font-size: 0.9375rem;
}

/* --- Footer --- */
.site-footer {
	padding: 2rem 0;
	border-top: 1px solid var(--border);
}

.footer-text {
	font-size: 0.875rem;
	color: var(--text-muted);
	text-align: center;
	margin: 0;
}

/* --- Responsive --- */

/* Tablet and small desktop: hero stacks, sections comfortable */
@media (max-width: 900px) {
	.hero-content {
		flex-direction: column;
		gap: 2.5rem;
		text-align: center;
	}

	.hero-inner {
		max-width: none;
	}

	.hero-tagline {
		margin-left: auto;
		margin-right: auto;
	}

	.hero-ca {
		margin-left: auto;
		margin-right: auto;
	}

	.hero-cta {
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.site-header {
		top: max(0.5rem, env(safe-area-inset-top));
	}

	.header-inner {
		height: 2.5rem;
		padding: 0 1rem;
		gap: 1.5rem;
	}

	.nav-links {
		gap: 1.25rem;
	}

	.nav-links a {
		font-size: 0.875rem;
	}

	.hero {
		padding: 7rem 0 2.5rem;
		min-height: auto;
	}

	.hero-content {
		padding: 0 1rem;
		gap: 2rem;
	}

	.hero-title {
		font-size: clamp(1.5rem, 8vw, 2rem);
		letter-spacing: 0.08em;
	}

	.hero-tagline {
		font-size: 1rem;
		max-width: none;
	}

	.hero-ca {
		max-width: none;
		width: 100%;
		min-width: 0;
	}

	.hero-ca-input {
		font-size: 0.8125rem;
		padding: 0 0.75rem;
		text-align: center;
	}

	.hero-cta {
		flex-direction: column;
		width: 100%;
	}

	.hero-cta .btn {
		width: 100%;
		min-height: 2.75rem;
	}

	.hero-image {
		max-height: 55vh;
		max-width: 100%;
	}

	.section {
		padding: 3rem 0;
	}

	.section-title {
		font-size: clamp(1.5rem, 5vw, 1.75rem);
		margin-bottom: 1.25rem;
	}

	.lore-quote {
		padding: 1.25rem 1.25rem;
	}

	.tokenomics-list li {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.tokenomics-value {
		text-align: left;
	}

	.links-grid {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.link-card {
		padding: 1.25rem 1rem;
		min-height: 44px;
	}

	.toast {
		left: 1rem;
		right: 1rem;
		bottom: max(1rem, env(safe-area-inset-bottom));
		transform: none;
		width: auto;
	}

	.site-footer {
		padding: 1.5rem 1rem;
	}

	.footer-text {
		font-size: 0.8125rem;
	}
}

/* Small phones */
@media (max-width: 480px) {

	.hero-content {
		padding: 0 0.5rem;
	}

	.hero {
		padding: 6.5rem 0 2rem;
	}

	.hero-title {
		font-size: clamp(1.35rem, 7vw, 1.75rem);
		letter-spacing: 0.06em;
	}

	.section {
		padding: 2.5rem 0;
	}

	.section-title {
		font-size: clamp(1.35rem, 4.5vw, 1.5rem);
		margin-bottom: 1rem;
	}

	.prose {
		font-size: 1rem;
	}

	.lore-quote {
		padding: 1rem 1rem;
		font-size: 0.9375rem;
	}

	.btn {
		padding: 0.65rem 1.25rem;
		font-size: 0.875rem;
	}

	.link-card {
		flex-direction: row;
		justify-content: center;
		text-align: left;
	}

	/* Stack CA and copy button so copy always visible on very small screens */
	.hero-ca {
		flex-direction: column;
		align-items: stretch;
	}

	.hero-ca-input {
		width: 100%;
	}

	.btn-copy {
		width: 100%;
		min-width: 0;
	}
}
