/* style.css - homepage-specific styles
   global.css (loaded first by Layout.astro) provides tokens, reset,
   html/body, texture, header/footer, focus, and utilities. */

/* Homepage uses a sticky header; tool pages use a sticky toolbar instead */
header {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* ---- Hero ---- */

.hero {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 4rem 2rem;
	isolation: isolate;
	background-image:
		linear-gradient(rgba(8, 4, 0, 0.25), rgba(8, 4, 0, 0.25)),
		linear-gradient(180deg, #9bbeff 0%, #78a7ff 55%, #5f90ef 100%);
}

.hero__title {
	font-family: var(--font-brand);
	font-size: clamp(4.5rem, 14vw, 9rem);
	font-weight: 700;
	color: var(--gold);
	letter-spacing: 0.04em;
	line-height: 1;
	margin-bottom: 0;
	/* Minecraft-style dark stroke makes gold readable against the bright sky */
	text-shadow:
		-1px -1px 0 rgba(0, 0, 0, 0.45),
		1px -1px 0 rgba(0, 0, 0, 0.45),
		-1px 1px 0 rgba(0, 0, 0, 0.45),
		1px 1px 0 rgba(0, 0, 0, 0.45),
		0 3px 10px rgba(0, 0, 0, 0.35);
}

.hero-ornament {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.8rem;
	margin: 1.75rem auto;
}

.orn-line {
	width: 72px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.22));
}

.orn-line:last-child {
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent);
}

.orn-gem {
	width: 5px;
	height: 5px;
	background: var(--gold-dim);
	transform: rotate(45deg);
	box-shadow: 0 0 6px rgba(255, 170, 0, 0.4);
}

.hero__tagline {
	font-size: clamp(0.9rem, 2.2vw, 1.1rem);
	font-weight: 300;
	color: rgba(12, 8, 0, 0.75);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 1.5rem;
}

.hero__desc {
	font-size: clamp(1rem, 2.4vw, 1.18rem);
	font-weight: 500;
	color: rgba(12, 8, 0, 0.72);
	max-width: 34rem;
	margin: 0 auto;
	line-height: 1.55;
	text-wrap: balance;
}

/* ---- Section separator ---- */

.terrain {
	--terrain-x: 0px;
	position: relative;
	z-index: 1;
	left: calc(-50vw + 50%);
	width: 100vw;
	margin: 0;
	isolation: isolate;
	overflow: hidden;
	background-color: var(--bg-page);
	background-image:
		linear-gradient(rgba(8, 4, 0, 0.25), rgba(8, 4, 0, 0.25)), var(--grass-texture, url("/images/grass.avif"));
	background-repeat: repeat, repeat-x;
	background-size:
		auto,
		var(--block-texture-size) var(--block-texture-size);
	background-position:
		0 0,
		var(--terrain-x) 0;
}

.terrain::before {
	content: "";
	position: absolute;
	top: var(--block-texture-size);
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(8, 4, 0, 0.25), rgba(8, 4, 0, 0.25)), var(--dirt-texture, url("/images/dirt.avif"));
	background-repeat: repeat;
	background-size:
		auto,
		var(--block-texture-size) var(--block-texture-size);
	background-position:
		0 0,
		var(--terrain-x) 0;
	image-rendering: pixelated;
}

.section-sep {
	height: var(--block-texture-size);
	margin: 0;
	padding: 0;
}

.terrain-content {
	position: relative;
	z-index: 2;
}

/* ---- Tool card ---- */

.tools {
	position: relative;
	z-index: 1;
	max-width: 880px;
	margin: 0 auto;
	padding: 2.5rem 2rem 1.25rem;
}

.tools__label {
	font-size: var(--sz-xs);
	font-weight: 600;
	color: var(--gold-dim);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.1rem;
	margin-bottom: 2rem;
	text-shadow:
		0 1px 2px rgba(0, 0, 0, 0.45),
		0 0 8px rgba(255, 170, 0, 0.14);
}

.tools__label::before,
.tools__label::after {
	content: "";
	flex: 1;
	max-width: 78px;
	height: 2px;
	background: linear-gradient(90deg, transparent, rgba(255, 170, 0, 0.58), rgba(204, 136, 0, 0.92));
	box-shadow: 0 0 10px rgba(255, 170, 0, 0.18);
}

.tools__label::after {
	background: linear-gradient(90deg, rgba(204, 136, 0, 0.92), rgba(255, 170, 0, 0.58), transparent);
}

.tools-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 400px));
	justify-content: center;
	align-items: stretch;
	gap: 1rem;
}

.tool-card {
	display: block;
	min-height: 185px;
	padding: 1.1rem 1.1rem 1rem;
	color: inherit;
	text-decoration: none;
}

.tool-card--planned {
	--angie-card-accent: #5b4524;
	opacity: 0.72;
	filter: saturate(0.7);
}

.tool-card__inner {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	padding-left: 0.6rem;
}

.tool-card__top {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.85rem;
	padding-left: 0.4rem;
}

.tool-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	background: var(--slot-bg);
	border-top: 2px solid var(--slot-shadow);
	border-left: 2px solid var(--slot-shadow);
	border-right: 2px solid var(--slot-hi);
	border-bottom: 2px solid var(--slot-hi);
	border-radius: 2px;
	padding: 4px;
}

.tool-card__icon img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	image-rendering: pixelated;
}

.tool-card__heading {
	display: block;
	min-width: 0;
}

.tool-card__name {
	display: block;
	font-size: var(--sz-md);
	font-weight: 600;
	color: var(--text-pri);
	line-height: 1.25;
}

.tool-card__desc {
	display: block;
	margin: 0 0 1.25rem;
	color: var(--text-label);
	font-size: var(--sz-sm);
	line-height: 1.65;
}

.tool-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	align-self: flex-start;
	margin-top: auto;
	color: var(--text-label);
	font-size: 0.78rem;
	font-weight: 500;
	transition:
		color 0.2s,
		gap 0.2s;
}

.tool-card__cta--muted {
	color: var(--gold-dim);
}

.tool-card:hover .tool-card__cta {
	color: var(--gold-dim);
	gap: 0.6rem;
}

/* ---- Platform note ---- */

.platform-note {
	max-width: 816px;
	margin: 0 auto 4rem;
	padding: 0.95rem 1.15rem 0.95rem 1.35rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.platform-note p {
	margin: 0;
	color: var(--text-label);
	font-size: var(--sz-sm);
	line-height: 1.65;
}

.platform-note strong,
.platform-note span {
	display: block;
}

.platform-note strong {
	color: var(--text-pri);
	font-weight: 600;
}

.platform-note__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.5rem 1rem;
	color: var(--gold-dim);
	text-decoration: none;
	font-weight: 600;
	font-size: var(--sz-sm);
	border: 1px solid var(--border-med);
	border-radius: 6px;
	white-space: nowrap;
	transition:
		color 0.15s,
		border-color 0.15s;
}

.platform-note__btn:hover {
	color: var(--text-pri);
	border-color: var(--border-chrome);
}

/* ---- Scroll indicator ---- */

/* Anchored to hero bottom, bounces to invite scrolling */
.hero__scroll {
	position: absolute;
	bottom: 1.75rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	color: rgba(12, 8, 0, 0.55);
	text-decoration: none;
	font-size: var(--sz-xs);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	animation:
		hero-fade 0.4s ease 0.6s both,
		scroll-bounce 2.4s ease-in-out 1s infinite;
	transition: color 0.15s;
}

.hero__scroll:hover {
	color: rgba(12, 8, 0, 0.85);
}

.hero__scroll svg {
	width: 18px;
	height: 18px;
}

@keyframes scroll-bounce {
	0%,
	100% {
		transform: translateX(-50%) translateY(0);
	}
	50% {
		transform: translateX(-50%) translateY(7px);
	}
}

.hero__scroll--scrolled {
	animation-play-state: paused;
	opacity: 0;
	transition: opacity 0.4s;
}

/* ---- Hero entrance animations ---- */

@keyframes hero-rise {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes hero-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.hero__title {
	animation: hero-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-ornament {
	animation: hero-fade 0.45s ease 0.2s both;
}
.hero__tagline {
	animation: hero-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.hero__desc {
	animation: hero-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

@media (prefers-reduced-motion: reduce) {
	.hero__scroll {
		animation: none;
	}
	.hero__scroll--scrolled {
		transition: none;
	}
	.hero__title,
	.hero-ornament,
	.hero__tagline,
	.hero__desc {
		animation: none;
	}
}

@media (max-width: 760px) {
	.tools {
		max-width: 464px;
	}

	.tools-grid {
		grid-template-columns: minmax(0, min(400px, 100%));
	}

	.platform-note {
		max-width: 400px;
		flex-direction: column;
		align-items: flex-start;
	}

	.platform-note__btn {
		align-self: stretch;
	}
}

@media (max-width: 640px) {
	.hero {
		padding: 2.5rem 1.25rem;
	}

	.tools {
		padding: 2.25rem 1.25rem 1.25rem;
	}

	.tool-card {
		padding: 1.1rem;
	}

	.platform-note {
		margin: 0 1.25rem 4rem;
	}
}
