/* HEFT — Library of Things
   Palette: lipstick-rose drench, marigold for action and availability.
   Type: Anton (sign-painter display) / Schibsted Grotesk (body) / Spline Sans Mono (catalogue codes). */

* {
	box-sizing: border-box;
}

:root {
	color-scheme: light;

	--rose: oklch(0.55 0.16 353);
	--rose-deep: oklch(0.38 0.13 353);
	--rose-ghost: oklch(0.96 0.015 353);
	--gold: oklch(0.86 0.145 88);
	--gold-deep: oklch(0.78 0.15 84);
	--bg: oklch(1 0 0);
	--ink: oklch(0.2 0.025 353);
	--muted: oklch(0.44 0.025 353);
	--line: oklch(0.89 0.02 353);
	--paper-on-rose: oklch(0.97 0.012 353);

	--font-display: 'Anton', 'Arial Narrow', sans-serif;
	--font-body: 'Schibsted Grotesk', system-ui, sans-serif;
	--font-mono: 'Spline Sans Mono', monospace;

	--pad-x: clamp(1.25rem, 5vw, 4rem);
	--measure: 72rem;

	--z-sticky: 10;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.55;
}

h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.015em;
	line-height: 1;
	margin: 0;
	text-wrap: balance;
}

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

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

::selection {
	background: var(--gold);
	color: var(--ink);
}

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

.site-head :focus-visible,
.hero :focus-visible,
.how :focus-visible,
.visit :focus-visible {
	outline-color: var(--gold);
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: calc(var(--z-sticky) + 1);
	background: var(--ink);
	color: var(--bg);
	padding: 0.6rem 1rem;
	border-radius: 6px;
	text-decoration: none;
	transition: top 0.15s ease;
}

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

/* ---------- Header ---------- */

.site-head {
	position: sticky;
	top: 0;
	z-index: var(--z-sticky);
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.5rem);
	padding: 0.85rem var(--pad-x);
	background: var(--rose);
	color: #fff;
}

.site-head--scrolled {
	box-shadow: 0 1px 0 oklch(0.3 0.1 353), 0 8px 24px oklch(0.3 0.12 353 / 0.25);
}

.brand {
	font-family: var(--font-display);
	font-size: 1.7rem;
	letter-spacing: 0.03em;
	color: #fff;
	text-decoration: none;
	line-height: 1;
}

.brand-mark {
	color: var(--gold);
	margin-left: 0.15em;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(0.75rem, 2vw, 1.75rem);
}

.site-nav a {
	color: #fff;
	font-weight: 500;
	text-decoration: none;
	padding: 0.25rem 0;
	border-bottom: 3px solid transparent;
}

.site-nav a:hover {
	border-bottom-color: var(--gold);
}

.site-head-cta {
	margin-left: auto;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.8rem 1.4rem;
	border-radius: 8px;
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn-gold:hover {
	background: var(--gold-deep);
}

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

.btn-rose:hover {
	background: var(--rose-deep);
}

.btn-ghost {
	border: 2px solid #fff;
	color: #fff;
}

.btn-ghost:hover {
	background: oklch(1 0 0 / 0.14);
}

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

.hero {
	background: var(--rose);
	color: #fff;
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
	padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad-x) clamp(4rem, 9vw, 7rem);
}

.hero h1 {
	font-size: clamp(3rem, 7.5vw, 5.5rem);
	line-height: 0.97;
}

.hero-lead {
	margin-top: 1.5rem;
	font-size: clamp(1.1rem, 1.6vw, 1.3rem);
	max-width: 48ch;
	color: var(--paper-on-rose);
}

.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-top: 2.25rem;
}

.hero-note {
	margin-top: 1.25rem;
	font-size: 0.95rem;
	color: var(--paper-on-rose);
}

.hero-photo {
	margin: 0;
	position: relative;
	transform: rotate(1.5deg);
	background: var(--rose-deep);
	border: 3px solid var(--gold);
	border-radius: 10px;
	overflow: hidden;
}

.hero-photo img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	filter: grayscale(1) contrast(1.08);
	mix-blend-mode: luminosity;
}

.sticker {
	position: absolute;
	left: -0.25rem;
	bottom: 1.25rem;
	transform: rotate(-4deg);
	background: var(--gold);
	color: var(--ink);
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 1.05rem;
	padding: 0.55rem 0.9rem;
	border-radius: 4px;
}

/* ---------- Ticker ---------- */

.ticker {
	background: var(--gold);
	color: var(--ink);
	overflow: hidden;
}

.ticker-track {
	display: flex;
	gap: 1.5rem;
	width: max-content;
	padding: 0.7rem 0;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 1.05rem;
	white-space: nowrap;
	animation: ticker 32s linear infinite;
}

@keyframes ticker {
	to {
		transform: translateX(-50%);
	}
}

/* ---------- Sections (shared) ---------- */

.catalogue,
.stacks,
.membership {
	max-width: var(--measure);
	margin-inline: auto;
	padding: clamp(4rem, 9vw, 6.5rem) var(--pad-x);
}

.section-head h2,
.stacks h2 {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
}

.section-head p {
	margin-top: 1rem;
	font-size: 1.1rem;
	color: var(--muted);
	max-width: 55ch;
}

/* ---------- Catalogue ---------- */

.cat-list {
	list-style: none;
	margin: 2.5rem 0 0;
	padding: 0;
	border-top: 1px solid var(--line);
}

.cat-row {
	display: grid;
	grid-template-columns: 6.5rem 1fr auto auto;
	align-items: center;
	gap: 0.35rem 1.5rem;
	padding: 1.05rem 0.5rem;
	border-bottom: 1px solid var(--line);
	transition: background 0.15s ease;
}

.cat-row:hover {
	background: var(--rose-ghost);
}

.cat-code {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
}

.cat-name {
	font-weight: 700;
	font-size: 1.15rem;
}

.cat-tag {
	color: var(--muted);
	font-size: 0.95rem;
}

.pill {
	font-size: 0.8rem;
	font-weight: 700;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	white-space: nowrap;
	justify-self: end;
}

.pill-in {
	background: var(--gold);
	color: var(--ink);
}

.pill-out {
	border: 1.5px solid var(--line);
	color: var(--muted);
}

.link-big {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 2.25rem;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 1.4rem;
	color: var(--ink);
	text-decoration: none;
	border-bottom: 3px solid var(--gold);
	padding-bottom: 0.2rem;
}

.link-big:hover {
	color: var(--rose);
}

.link-big svg {
	width: 1.1em;
	height: 1.1em;
}

/* ---------- The stacks ---------- */

.stack-list {
	list-style: none;
	margin: 2.25rem 0 0;
	padding: 0;
	border-top: 2px solid var(--ink);
}

.stack-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: clamp(1rem, 4vw, 2.5rem);
	padding: 1.1rem 0.5rem;
	border-bottom: 2px solid var(--ink);
}

.stack-name {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.015em;
	font-size: clamp(1.9rem, 5vw, 3.6rem);
	line-height: 1;
	transition: color 0.15s ease;
}

.stack-count {
	font-family: var(--font-mono);
	font-size: 0.95rem;
	color: var(--muted);
	white-space: nowrap;
}

.stack-photo {
	width: clamp(5.5rem, 12vw, 9rem);
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
	transform: rotate(2deg);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.stack-row:nth-child(even) .stack-photo {
	transform: rotate(-2deg);
}

.stack-row:hover .stack-name {
	color: var(--rose);
}

.stack-row:hover .stack-photo {
	transform: rotate(0deg) scale(1.08);
}

/* ---------- How it works ---------- */

.how {
	background: var(--rose-deep);
	color: #fff;
	padding: clamp(4rem, 9vw, 6.5rem) var(--pad-x);
}

.how > h2,
.how > ol {
	max-width: var(--measure);
	margin-inline: auto;
}

.how h2 {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
}

.steps {
	list-style: none;
	padding: 0;
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(2rem, 5vw, 3.5rem);
}

.step-n {
	display: block;
	font-family: var(--font-display);
	font-size: clamp(3.25rem, 6vw, 5rem);
	line-height: 1;
	color: var(--gold);
}

.step h3 {
	font-size: 1.5rem;
	margin: 0.85rem 0 0.5rem;
}

.step p {
	color: var(--paper-on-rose);
	max-width: 36ch;
}

/* ---------- Membership ---------- */

.membership {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: center;
}

.membership h2 {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
}

.membership-lead {
	margin-top: 1rem;
	font-size: 1.1rem;
	color: var(--muted);
}

.tier-list {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	border-top: 1px solid var(--line);
}

.tier {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.2rem 1.5rem;
	padding: 1.1rem 0.25rem;
	border-bottom: 1px solid var(--line);
}

.tier-name {
	font-weight: 700;
	font-size: 1.2rem;
}

.tier-price {
	font-family: var(--font-display);
	font-size: 1.35rem;
	color: var(--rose);
	text-transform: uppercase;
	justify-self: end;
}

.tier-note {
	grid-column: 1 / -1;
	color: var(--muted);
	font-size: 0.98rem;
}

.membership-copy .btn {
	margin-top: 2.25rem;
}

.membership-photo {
	margin: 0;
}

.membership-photo img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 10px;
	transform: rotate(-1.5deg);
}

.membership-photo figcaption {
	margin-top: 1rem;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
}

/* ---------- Visit ---------- */

.visit {
	background: var(--rose);
	color: #fff;
	padding: clamp(4rem, 9vw, 6.5rem) var(--pad-x) 0;
	overflow: hidden;
}

.visit > h2,
.visit > .visit-grid {
	max-width: var(--measure);
	margin-inline: auto;
}

.visit h2 {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
}

.visit-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	margin-top: clamp(2rem, 5vw, 3rem);
}

.visit-block h3 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.2rem;
}

.visit-block h3 svg {
	width: 1.15em;
	height: 1.15em;
	color: var(--gold);
}

.visit-block p {
	margin-top: 0.75rem;
	color: var(--paper-on-rose);
}

.visit-block a {
	color: #fff;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.visit-giant {
	font-family: var(--font-display);
	font-size: clamp(5rem, 19vw, 15rem);
	line-height: 0.78;
	letter-spacing: 0.02em;
	text-align: center;
	color: var(--gold);
	margin-top: clamp(2.5rem, 6vw, 4rem);
	user-select: none;
}

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

.site-foot {
	background: var(--ink);
	color: oklch(0.82 0.02 353);
	padding: 1.5rem var(--pad-x);
	font-size: 0.9rem;
	text-align: center;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	.hero-copy > * {
		animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
	}

	.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
	.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
	.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }

	.hero-photo {
		animation: rise-tilt 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards;
	}
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
}

@keyframes rise-tilt {
	from {
		opacity: 0;
		transform: translateY(18px) rotate(1.5deg);
	}
	to {
		opacity: 1;
		transform: translateY(0) rotate(1.5deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ticker-track {
		animation: none;
	}
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.hero {
		grid-template-columns: 1fr;
	}

	.hero-photo {
		max-width: 26rem;
	}

	.steps {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.membership {
		grid-template-columns: 1fr;
	}

	.visit-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 760px) {
	.site-head {
		flex-wrap: wrap;
		row-gap: 0.5rem;
	}

	.site-nav {
		order: 3;
		width: 100%;
	}
}

@media (max-width: 640px) {
	.cat-row {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"code pill"
			"name name"
			"tag tag";
	}

	.cat-code { grid-area: code; }
	.cat-name { grid-area: name; }
	.cat-tag { grid-area: tag; }
	.pill { grid-area: pill; }

	.stack-row {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"name photo"
			"count photo";
	}

	.stack-name { grid-area: name; }
	.stack-count { grid-area: count; }
	.stack-photo { grid-area: photo; }
}
