/*
Theme Name: ApnaPrompt Gallery
Theme URI: https://apnaprompt.com/
Author: ApnaPrompt
Description: An endless 3D exhibition hall of AI photo prompts. Each picture is a post; its category (Couple, Boys, Girls, Templates) is its gallery room.
Version: 2.0.0
Requires PHP: 7.4
Text Domain: apnaprompt
*/

:root {
	--bg: #0b0b0c; --bg-2: #131312; --panel: #171615;
	--ink: #f5f2ec; --ink-2: rgba(245, 242, 236, .72); --ink-3: rgba(245, 242, 236, .5);
	--line: rgba(245, 242, 236, .14); --gold: #e9d3ad;
	--serif: "Playfair Display", "Times New Roman", serif;
	--sans: "Jost", "Segoe UI", system-ui, sans-serif;
	--ease: cubic-bezier(.22, .8, .24, 1);
	--gutter: clamp(16px, 4vw, 52px);
	--max: 1240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 17px/1.75 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #111; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 400; }

/* ---------- header / footer ---------- */
.site-head {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: 20px;
	padding: 16px var(--gutter);
	background: rgba(11, 11, 12, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-head { top: 32px; }
.site-logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--sans); font-size: 23px; font-weight: 500; letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.site-logo-mark { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 6px 18px -6px rgba(233, 211, 173, .35); }
@media (max-width: 900px) { .site-logo { gap: 9px; font-size: 21px; } .site-logo-mark { width: 32px; height: 32px; border-radius: 9px; } }
.site-logo em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--gold); }
.site-nav { display: flex; gap: 6px; }
.site-nav a { text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); transition: color .3s, background .3s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { background: var(--ink); color: #111; }
.site-cta, .btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 11px 20px; border-radius: 999px; border: 1px solid rgba(245, 242, 236, .4);
	font: 400 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--ink);
	background: transparent; cursor: pointer; transition: background .35s, color .35s, border-color .35s;
}
.site-cta:hover, .btn:hover { background: var(--ink); color: #111; }
.site-cta-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(233, 211, 173, .18); }
.btn-solid { background: var(--ink); color: #111; border-color: var(--ink); }
.btn-solid:hover { background: var(--gold); border-color: var(--gold); }
.btn-solid.is-done { background: #9fd3a5; border-color: #9fd3a5; }
.btn-wide { width: 100%; padding: 18px 22px; font-size: 13px; margin-top: 28px; }

.site-foot { margin-top: 120px; border-top: 1px solid var(--line); padding: 56px var(--gutter) 28px; }
.site-foot-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 28px 56px; align-items: center; }
.site-foot-in > p { color: var(--ink-3); font-size: 15px; max-width: 380px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot nav a { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); }
.site-copy { max-width: var(--max); margin: 40px auto 0; font-size: 13px; color: var(--ink-3); }

/* ---------- 3D / Grid view switch ---------- */
.view-switch {
	position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; margin-left: auto;
	border: 1px solid var(--line); border-radius: 999px; background: rgba(14, 14, 15, .6);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.view-switch a {
	position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
	min-width: 52px; height: 36px; padding: 0 14px; border-radius: 999px;
	font: 400 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
	color: var(--ink-2); transition: color .3s;
}
.view-switch-thumb {
	position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px;
	background: var(--ink); transition: transform .32s var(--ease);
}
.view-switch[data-view="grid"] .view-switch-thumb { transform: translateX(100%); }
.view-switch[data-view="3d"] a[data-view="3d"], .view-switch[data-view="grid"] a[data-view="grid"] { color: #111; }

/* ---------- prompt page ---------- */
.sp, .room, .page { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 28px 0; font-size: 13px; color: var(--ink-3); }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink-3); }

.sp-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.sp-art { margin: 0; position: sticky; top: 100px; }
.sp-frame {
	padding: 18px; background: #e9e6df; border: 9px solid #141414; border-radius: 2px;
	box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .04);
	position: relative;
}
.sp-frame::before { content: ""; position: absolute; inset: -40% -30% auto; height: 70%; background: radial-gradient(closest-side, rgba(255, 240, 220, .12), transparent); pointer-events: none; z-index: -1; }
.sp-frame img { width: 100%; outline: 1px solid rgba(0, 0, 0, .18); }
.sp-walk { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); }
.sp-walk:hover { color: var(--ink); }

.sp-info { padding-top: 8px; }
.sp-info h1 { margin-top: 14px; font-size: clamp(32px, 4vw, 52px); }
.sp-content { margin-top: 22px; color: var(--ink-2); }
.sp-content p + p { margin-top: 1em; }
.sp-content a { color: var(--gold); }
.sp-h { font-family: var(--sans); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin: 40px 0 14px; }
.sp-prompt { margin-top: 36px; }
.sp-prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sp-prompt-head .sp-h { margin: 0; }
.sp-prompt-text {
	white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.8;
	padding: 24px 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2);
}
.sp-steps { margin: 0; padding-left: 22px; color: var(--ink-2); }
.sp-steps li + li { margin-top: 8px; }
.sp-steps strong { color: var(--ink); font-weight: 500; }
.sp-qr { display: flex; gap: 20px; align-items: center; margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.sp-qr img { width: 120px; height: 120px; background: #fff; padding: 6px; border-radius: 4px; }
.sp-qr p { font-size: 15px; color: var(--ink-2); }

/* ---------- grids / cards: framed prints on a lit wall ---------- */
.more { margin-top: 110px; }
.more-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 56px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.more-head h2 { font-size: clamp(26px, 3vw, 36px); }
.link-arrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--gold); white-space: nowrap; }

.grid { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 80px 44px; align-items: center; }
.card { position: relative; }
/* each print hangs in its own warm spotlight */
.card::before {
	content: ""; position: absolute; z-index: -1; left: -18%; right: -18%; top: -120px; height: 96%; pointer-events: none;
	background: radial-gradient(50% 50% at 50% 46%, rgba(255, 234, 204, .27), rgba(255, 234, 204, .09) 48%, transparent 100%);
	opacity: .85; transition: opacity .7s var(--ease);
}
.card:hover::before { opacity: 1; }
/* one print: the cream mount carries on below the picture and holds its caption */
.card-link {
	display: block; text-decoration: none; color: #171615;
	padding: clamp(7px, 1.1vw, 12px) clamp(7px, 1.1vw, 12px) 0;
	background: linear-gradient(#f2efe9, #e2ded6); border: clamp(4px, .6vw, 7px) solid #121212;
	box-shadow: 0 34px 44px -26px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .05);
	transition: transform .7s var(--ease), box-shadow .7s var(--ease);
}
.card-link:hover { transform: translateY(-6px); box-shadow: 0 48px 54px -28px rgba(0, 0, 0, 1), 0 0 0 1px rgba(255, 255, 255, .07); }
.card-hang, .card-frame { display: block; }
.card-frame { box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.card-frame img { width: 100%; height: auto; }
.card-plaque { display: block; padding: 13px 4px 14px; }
.card-meta { display: block; font-size: 10px; line-height: 1.4; letter-spacing: .22em; text-transform: uppercase; color: #8b8478; font-weight: 400; }
.card-title {
	margin-top: 6px; font-size: 17px; line-height: 1.28; color: #151413;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-type {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(0, 0, 0, .1);
	font-size: 10px; line-height: 1.4; letter-spacing: .18em; text-transform: uppercase; color: #8b8478;
}
.card-kind { display: none; }
.card-get { color: #151413; font-weight: 500; white-space: nowrap; transition: letter-spacing .5s var(--ease); }
.card-link:hover .card-get { letter-spacing: .24em; }

/* scroll-in: prints fade up as they reach the viewport */
.js-reveal .grid .card { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js-reveal .grid .card.is-in { opacity: 1; transform: none; }

/* ---------- room (category) page ---------- */
.blog .site-nav, .category .site-nav { display: none; } /* the room tabs below do this job */
.room-hero {
	position: relative; isolation: isolate;
	display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 56px;
	padding: 76px 0 88px;
}
/* the lit end wall of the hall behind the hero */
.room-hero::before {
	content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
	background:
		radial-gradient(34% 80% at 74% 0%, rgba(255, 232, 198, .2), transparent 72%),
		radial-gradient(60% 90% at 20% 0%, rgba(255, 232, 198, .06), transparent 70%),
		linear-gradient(#1c1b19, var(--bg));
}
.room-hero::after {
	content: ""; position: absolute; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); height: 1px;
	background: linear-gradient(90deg, transparent, rgba(233, 211, 173, .3), transparent);
}
.room-hero-text { max-width: 620px; }
.room-hero h1 { margin-top: 16px; font-size: clamp(42px, 5.2vw, 76px); line-height: 1.02; }
.room-hero h1 em { display: block; font-size: .4em; color: var(--ink-2); margin-top: .35em; }
.room-desc { margin-top: 24px; color: var(--ink-2); font-size: 18px; }
.room-walk { margin-top: 34px; padding: 15px 26px; }
.room-walk span { transition: transform .4s var(--ease); }
.room-walk:hover span { transform: translateX(4px); }

/* newest prints on a carousel: one lit in the middle, neighbours angled away */
.hero-car { position: relative; min-width: 0; padding-top: 24px; text-align: center; overflow-x: clip; }
.hero-car::before {
	content: ""; position: absolute; z-index: -1; inset: -40px 0 10%; pointer-events: none;
	background: radial-gradient(50% 50% at 50% 40%, rgba(255, 236, 206, .22), rgba(255, 236, 206, .06) 55%, transparent 100%);
}
.hero-car-stage { display: grid; justify-items: center; align-items: center; perspective: 1400px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hero-car-item {
	grid-area: 1 / 1; display: block; width: clamp(150px, 15.5vw, 228px); padding: clamp(6px, .7vw, 10px);
	background: linear-gradient(#f2efe9, #e2ded6); border: clamp(4px, .45vw, 6px) solid #121212;
	box-shadow: 0 40px 50px -28px rgba(0, 0, 0, 1);
	transition: transform 1s var(--ease), opacity 1s var(--ease), filter 1s var(--ease);
	-webkit-user-drag: none;
}
.hero-car-item img { width: 100%; height: auto; pointer-events: none; }
.hero-car-item[data-pos="0"] { z-index: 3; transform: none; }
.hero-car-item[data-pos="1"] { z-index: 2; transform: translateX(80%) scale(.8) rotateY(-24deg); filter: brightness(.55); }
.hero-car-item[data-pos="-1"] { z-index: 2; transform: translateX(-80%) scale(.8) rotateY(24deg); filter: brightness(.55); }
.hero-car-item[data-pos="2"] { z-index: 1; transform: translateX(90%) scale(.5) rotateY(-30deg); opacity: 0; pointer-events: none; }
.hero-car-item[data-pos="-2"] { z-index: 1; transform: translateX(-90%) scale(.5) rotateY(30deg); opacity: 0; pointer-events: none; }
.hero-car-item[data-pos="off"] { z-index: 0; transform: scale(.5); opacity: 0; pointer-events: none; }
.hero-car-item[data-pos="1"]:hover, .hero-car-item[data-pos="-1"]:hover { filter: brightness(.75); }
.hero-car-title {
	margin: 26px auto 0; max-width: 320px; min-height: 2.6em; font-family: var(--serif); font-size: 17px; line-height: 1.3; color: var(--ink-2);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	transition: opacity .4s;
}
.hero-car-title.is-out { opacity: 0; }
.hero-car-dots { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.hero-car-dots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.hero-car-dots button::after { content: ""; width: 6px; height: 6px; border-radius: 999px; background: rgba(245, 242, 236, .28); transition: width .5s var(--ease), background .5s; }
.hero-car-dots button[aria-current]::after { width: 18px; background: var(--gold); }

.empty { color: var(--ink-3); padding: 40px 0; text-align: center; }
.pagination { margin-top: 96px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 46px; height: 46px; display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; transition: background .3s, color .3s; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--ink); color: #111; border-color: var(--ink); }
.pagination .dots { border: 0; }

/* ---------- filter tabs: glass bar that stays under the header ---------- */
.tabs {
	position: sticky; top: var(--head-h, 77px); z-index: 10;
	display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 44px auto 80px; padding: 4px;
	border: 1px solid var(--line); border-radius: 999px; background: rgba(14, 14, 15, .72);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .9);
	overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-size: 12px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; color: var(--ink-2); transition: color .3s, background .3s; }
.tabs a span { font-size: 11px; letter-spacing: 0; color: var(--ink-3); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { background: var(--ink); color: #111; }
.tabs a[aria-current] span { color: rgba(0, 0, 0, .5); }

/* ---------- plain pages ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 72px 0 0; }
.prose h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 28px; }
.prose h2 { font-size: 30px; margin: 48px 0 16px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; color: var(--ink-2); }
.prose a { color: var(--gold); }

.toast {
	position: fixed; left: 50%; bottom: 32px; z-index: 60; transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
	padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #111; font-size: 14px; font-weight: 400;
	transition: opacity .4s, transform .4s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
	.site-head { flex-wrap: wrap; row-gap: 10px; }
	.site-nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
	.site-nav a { white-space: nowrap; }
	.site-cta { padding: 10px 14px; }
	.sp-grid { grid-template-columns: 1fr; }
	.sp-art { position: static; max-width: 520px; margin: 0 auto; }
	.sp-prompt-head { flex-wrap: wrap; }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px 16px; }
	.card::before { top: -60px; left: 0; right: 0; }
	.card-plaque { padding: 9px 2px 10px; }
	.card-meta { font-size: 9px; letter-spacing: .18em; }
	.card-title { font-size: 14px; margin-top: 4px; }
	.card-type { margin-top: 8px; padding-top: 7px; font-size: 9px; letter-spacing: .14em; }
	.tabs { margin: 28px auto 48px; }
	.tabs a { padding: 9px 14px; }
	.room-hero { grid-template-columns: 1fr; gap: 28px; padding: 28px 0 52px; }
	.hero-car { order: -1; width: 100%; padding-top: 16px; }
	.hero-car-item { width: min(44vw, 200px); }
	.hero-car-item[data-pos="1"] { transform: translateX(70%) scale(.78) rotateY(-24deg); }
	.hero-car-item[data-pos="-1"] { transform: translateX(-70%) scale(.78) rotateY(24deg); }
	.hero-car-title { margin-top: 18px; font-size: 16px; }
	.room-hero h1 { font-size: clamp(36px, 10vw, 48px); }
	.room-desc { font-size: 16px; }
	.site-foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 782px) { .admin-bar .site-head { top: 46px; } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation: none !important; } }
