@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root {
	--paper: #f5f0e8;
	--ink: #252120;
	--coral: #f26b58;
	--lemon: #e9df73;
	--line: rgba(37, 33, 32, 0.2);
	--display: 'Fraunces', Georgia, serif;
	--mono: 'DM Mono', monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	color: var(--ink);
	background: var(--paper);
	font-family: var(--mono);
}

a { color: inherit; text-decoration: none; }

.site-header {
	align-items: center;
	border-bottom: 1px solid var(--line);
	display: flex;
	justify-content: space-between;
	padding: 24px 5vw;
}

.wordmark, .header-link { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; }
.wordmark { font-size: 1rem; }
.wordmark span { color: var(--coral); }
nav { display: flex; gap: 28px; font-size: 0.7rem; }
nav a:hover, .header-link:hover, footer a:hover { color: var(--coral); }
.header-link span { color: var(--coral); font-size: 1.15rem; margin-left: 8px; }

.intro { padding: 9vh 5vw 11vh; }
.eyebrow, .section-heading p { color: #706864; font-size: 0.68rem; letter-spacing: 0.1em; margin: 0; text-transform: uppercase; }
.intro-grid { align-items: end; display: flex; gap: 8vw; justify-content: space-between; margin-top: 48px; }
h1, h2 { font-family: var(--display); font-weight: 600; margin: 0; }
h1 { font-size: clamp(4.2rem, 10vw, 10rem); letter-spacing: -0.06em; line-height: 0.85; max-width: 900px; }
h1 em { color: var(--coral); font-style: italic; }
.intro-copy { border-left: 1px solid var(--ink); max-width: 250px; padding-left: 22px; }
.intro-copy p { font-size: 0.75rem; line-height: 1.7; margin: 0 0 30px; }
.circle-link { align-items: center; border: 1px solid var(--ink); border-radius: 50%; display: flex; font-size: 1.2rem; height: 54px; justify-content: center; transition: background 180ms, color 180ms; width: 54px; }
.circle-link:hover { background: var(--ink); color: var(--paper); }

.gallery-section { background: var(--ink); color: var(--paper); padding: 70px 5vw 110px; }
.section-heading { align-items: baseline; border-bottom: 1px solid rgba(245, 240, 232, 0.35); display: flex; justify-content: space-between; margin-bottom: 28px; padding-bottom: 18px; }
h2 { font-size: clamp(2.4rem, 5vw, 5.2rem); letter-spacing: -0.05em; }
.section-heading p { color: #c6beb4; }
.saved-label { color: #e6dbcf; display: inline-flex; gap: 6px; margin-left: 14px; }
.saved-label strong { color: var(--coral); font-weight: 500; }
.shape-menu {
	display: grid;
	gap: 10px;
	grid-auto-flow: column;
	grid-auto-columns: minmax(100px, 120px);
	margin: 0 0 26px;
	overflow-x: auto;
	padding: 4px 2px 10px;
	scrollbar-width: thin;
}
.shape-menu-btn {
	align-items: center;
	appearance: none;
	background: rgba(245, 240, 232, 0.06);
	border: 1px solid rgba(245, 240, 232, 0.2);
	border-radius: 18px;
	color: var(--paper);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font-family: var(--mono);
	font-size: 0.62rem;
	gap: 9px;
	letter-spacing: 0.07em;
	padding: 10px 9px 12px;
	text-transform: uppercase;
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.shape-menu-btn:hover {
	background: rgba(245, 240, 232, 0.14);
	border-color: rgba(245, 240, 232, 0.55);
	transform: translateY(-2px);
}
.shape-menu-btn.is-active {
	background: rgba(242, 107, 88, 0.24);
	border-color: var(--coral);
	box-shadow: 0 0 0 1px rgba(242, 107, 88, 0.35);
}
.shape-thumb {
	aspect-ratio: 1;
	background: rgba(245, 240, 232, 0.1);
	border-radius: 12px;
	display: block;
	overflow: hidden;
	width: 100%;
}
.shape-thumb img {
	display: block;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transform: scale(0.92);
	width: 100%;
}
.shape-thumb-saved {
	align-items: center;
	color: var(--coral);
	display: flex;
	font-size: 1rem;
	justify-content: center;
	letter-spacing: 0;
}
.gallery-viewport { overflow: hidden; width: 100%; }
.gallery-loop { display: flex; flex-shrink: 0; width: max-content; will-change: transform; }
.gallery-loop.is-paused { cursor: pause; }
.gallery { align-items: flex-start; display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 38px 18px; }
.nail-card { flex: 0 0 280px; }
.image-wrap { aspect-ratio: 4 / 5; background: #d5cdc2; overflow: hidden; }
.card-tall .image-wrap { aspect-ratio: 4 / 5.8; }
.image-wrap { cursor: zoom-in; }
.image-wrap img { display: block; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.2,.75,.25,1); width: 100%; }
.image-wrap.is-enlarged img { transform: scale(1.16); }
.image-wrap.is-spinning img { animation: spin-and-zoom 800ms cubic-bezier(.2,.75,.25,1) forwards; }
.nail-card:hover img { transform: scale(1.045); }
.card-meta { align-items: center; display: flex; font-size: 0.63rem; justify-content: space-between; letter-spacing: 0.04em; padding-top: 13px; text-transform: uppercase; }
.card-meta span:last-child { color: #aaa198; }
.card-description { color: #aaa198; font-size: 0.66rem; line-height: 1.5; margin: 10px 0 0; max-width: 260px; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card-action-btn {
	appearance: none;
	background: rgba(245, 240, 232, 0.04);
	border: 1px solid rgba(245, 240, 232, 0.28);
	border-radius: 999px;
	color: var(--paper);
	cursor: pointer;
	font-family: var(--mono);
	font-size: 0.58rem;
	letter-spacing: 0.07em;
	padding: 7px 12px;
	text-transform: uppercase;
	transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.card-action-btn:hover { background: rgba(245, 240, 232, 0.17); border-color: rgba(245, 240, 232, 0.62); }
.card-action-btn.is-saved { background: rgba(242, 107, 88, 0.22); border-color: rgba(242, 107, 88, 0.82); color: #ffe2dc; }
.empty-saved-card {
	align-items: center;
	background: rgba(245, 240, 232, 0.05);
	border: 1px dashed rgba(245, 240, 232, 0.35);
	border-radius: 24px;
	display: flex;
	flex: 0 0 min(520px, 90vw);
	min-height: 320px;
	padding: 26px;
}
.empty-saved-content { max-width: 320px; }
.empty-saved-title {
	color: var(--paper);
	font-family: var(--display);
	font-size: clamp(1.6rem, 2vw, 2.2rem);
	letter-spacing: -0.03em;
	line-height: 1.05;
	margin: 0;
}
.empty-saved-copy {
	color: #c6beb4;
	font-size: 0.72rem;
	letter-spacing: 0.03em;
	line-height: 1.6;
	margin: 10px 0 0;
}

footer { display: flex; font-size: 0.68rem; justify-content: space-between; padding: 25px 5vw; }
footer p { margin: 0; }
footer p span { color: #706864; }

.modal-open { overflow: hidden; }
.image-modal { align-items: center; background: rgba(20, 17, 16, 0.9); display: flex; inset: 0; justify-content: center; padding: 7vh 7vw; position: fixed; z-index: 10; }
.modal-frame { height: min(82vh, 720px); max-width: min(560px, 84vw); position: relative; width: 100%; }
.modal-image { display: block; height: 100%; object-fit: contain; width: 100%; }
.modal-image.modal-spinning { animation: modal-spin-and-zoom 800ms cubic-bezier(.2,.75,.25,1) forwards; }
.modal-close { background: transparent; border: 0; color: var(--paper); cursor: pointer; font-family: var(--display); font-size: 3rem; line-height: 1; padding: 4px 12px; position: absolute; right: 4vw; top: 3vh; }
.modal-close:hover { color: var(--coral); }
.modal-arrow { background: transparent; border: 1px solid rgba(245, 240, 232, 0.45); border-radius: 50%; color: var(--paper); cursor: pointer; font-size: 1.4rem; height: 52px; position: absolute; top: 50%; transform: translateY(-50%); width: 52px; z-index: 1; }
.modal-arrow:hover { background: var(--paper); color: var(--ink); }
.modal-prev { left: 4vw; }
.modal-next { right: 4vw; }
.modal-details { background: rgba(20, 17, 16, 0.88); bottom: 0; left: 0; padding: 18px 20px; position: absolute; right: 0; }
.modal-category, .modal-count { color: var(--coral); font-size: 0.65rem; letter-spacing: 0.1em; margin: 0 0 8px; text-transform: uppercase; }
.modal-title { color: var(--paper); font-size: 2rem; }
.modal-description { color: #c6beb4; font-size: 0.72rem; line-height: 1.5; margin: 8px 0 0; max-width: 440px; }
.modal-count { color: #aaa198; margin-top: 14px; }
.modal-actions { display: flex; gap: 10px; margin-top: 12px; }
.modal-action-btn {
	appearance: none;
	background: rgba(245, 240, 232, 0.08);
	border: 1px solid rgba(245, 240, 232, 0.35);
	border-radius: 999px;
	color: var(--paper);
	cursor: pointer;
	font-family: var(--mono);
	font-size: 0.62rem;
	letter-spacing: 0.08em;
	padding: 8px 14px;
	text-transform: uppercase;
	transition: background 180ms ease, border-color 180ms ease;
}
.modal-action-btn:hover { background: rgba(245, 240, 232, 0.2); border-color: rgba(245, 240, 232, 0.75); }
.modal-action-btn.is-saved { background: rgba(242, 107, 88, 0.26); border-color: var(--coral); }

.action-feedback {
	background: rgba(20, 17, 16, 0.9);
	border: 1px solid rgba(245, 240, 232, 0.28);
	border-radius: 999px;
	bottom: 18px;
	color: var(--paper);
	font-size: 0.62rem;
	left: 50%;
	letter-spacing: 0.08em;
	margin: 0;
	padding: 8px 14px;
	pointer-events: none;
	position: fixed;
	text-transform: uppercase;
	transform: translateX(-50%);
	z-index: 15;
}

@keyframes spin-and-zoom {
	from { transform: scale(1) rotate(0deg); }
	to { transform: scale(1.16) rotate(360deg); }
}

@keyframes modal-spin-and-zoom {
	from { transform: scale(0.82) rotate(0deg); }
	to { transform: scale(1) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.gallery-loop { transform: translate3d(0, 0, 0) !important; }
	.image-wrap.is-spinning img { animation: none; }
	.modal-image.modal-spinning { animation: none; }
}

@media (max-width: 760px) {
	.site-header { padding: 20px 6vw; }
	nav { display: none; }
	.intro { padding: 70px 6vw 80px; }
	.intro-grid { align-items: start; flex-direction: column; gap: 45px; margin-top: 35px; }
	h1 { font-size: clamp(4rem, 18vw, 7rem); }
	.intro-copy { align-self: flex-end; }
	.gallery-section { padding: 52px 6vw 75px; }
	.shape-menu {
		grid-auto-columns: minmax(92px, 110px);
		margin-bottom: 20px;
	}
	.shape-menu-btn { font-size: 0.55rem; }
	.gallery { gap: 30px 12px; }
	.nail-card { flex-basis: 220px; }
	.card-tall .image-wrap, .image-wrap { aspect-ratio: 4 / 5.4; }
	.card-meta { align-items: flex-start; flex-direction: column; gap: 5px; font-size: 0.56rem; }
	.card-description { font-size: 0.58rem; }
	.card-actions { gap: 7px; }
	.card-action-btn { font-size: 0.53rem; padding: 6px 10px; }
	.empty-saved-card { min-height: 240px; padding: 20px; }
	.empty-saved-copy { font-size: 0.64rem; }
	.image-modal { padding: 8vh 15vw 20vh; }
	.modal-frame { max-width: 100%; }
	.modal-arrow { height: 42px; width: 42px; }
	.modal-title { font-size: 1.65rem; }
	.modal-actions { flex-wrap: wrap; }
	.action-feedback { bottom: 12px; font-size: 0.55rem; max-width: 84vw; text-align: center; }
	footer { align-items: flex-start; flex-direction: column; gap: 20px; padding: 24px 6vw; }
}
