/*
Theme Name: Remington
Description: A dark, cabinet-of-curiosities gallery theme for remingtonartgallery.com. Requires the Remington Gallery plugin.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: remington
*/

:root {
	--ink: #13100e;
	--ink-2: #1b1714;
	--ink-3: #26201b;
	--paper: #efe6d6;
	--paper-dim: #b3a790;
	--gold: #c9a35b;
	--gold-dim: rgba(201, 163, 91, 0.28);
	--oxblood: #a3392e;
	--line: rgba(239, 230, 214, 0.12);

	--display: "IM Fell English", "Iowan Old Style", Georgia, serif;
	--caps: "IM Fell English SC", "Iowan Old Style", Georgia, serif;
	--body: "EB Garamond", "Iowan Old Style", Georgia, serif;

	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--ink);
	/* faint vignette + paper grain so the black isn't flat */
	background-image:
		radial-gradient(ellipse at 50% -10%, rgba(201, 163, 91, 0.08), transparent 60%),
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	color: var(--paper);
	font-family: var(--body);
	font-size: clamp(18px, 1.1vw + 12px, 20px);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--paper); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .4em; letter-spacing: .005em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--paper-dim); }
.eyebrow {
	font-family: var(--caps); font-size: .85rem; letter-spacing: .18em; text-transform: lowercase;
	color: var(--gold); margin: 0 0 .6em;
}
.eyebrow a { color: inherit; text-decoration: none; }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 14px; }

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

.btn {
	display: inline-block; padding: .7em 1.5em; border: 1px solid var(--gold);
	background: var(--gold); color: var(--ink); font-family: var(--caps); font-size: 1rem; letter-spacing: .12em;
	text-transform: lowercase; text-decoration: none; border-radius: var(--radius); transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--gold); }
.btn--ghost { background: transparent; color: var(--gold); }
.btn--ghost:hover { background: var(--gold); color: var(--ink); }

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

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(19, 16, 14, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }

.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--paper); line-height: 1; }
.brand__name { font-family: var(--display); font-size: 1.75rem; }
.brand__sub { font-family: var(--caps); font-size: .75rem; letter-spacing: .32em; color: var(--gold); text-transform: lowercase; margin-top: 4px; }
.brand:hover { color: var(--paper); }

.site-nav { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.site-nav a {
	font-family: var(--caps); font-size: 1.05rem; letter-spacing: .14em; text-transform: lowercase;
	color: var(--paper); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--gold); border-bottom-color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	display: block; width: 24px; height: 1.5px; background: var(--paper); position: relative; transition: transform .2s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
		background: var(--ink); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px;
		transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
	}
	.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
	.site-nav a { font-size: 1.35rem; padding: 12px 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Frames: thin gilt border with a dark mat ---------- */

.frame {
	position: relative; display: block; width: 100%; padding: 10px; margin: 0;
	background: var(--ink-2); border: 1px solid var(--gold-dim);
	box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 18px 40px -20px rgba(0,0,0,.8);
}
.frame img { width: 100%; }
.frame--ornate { padding: clamp(12px, 2vw, 22px); border: 1px solid var(--gold); outline: 1px solid var(--gold-dim); outline-offset: 5px; }
.frame__empty { aspect-ratio: 4 / 5; display: grid; place-items: center; color: var(--paper-dim); font-style: italic; }

.sold-dot {
	position: absolute; top: 18px; right: 18px; width: 14px; height: 14px; border-radius: 50%;
	background: #c8261b; box-shadow: 0 0 0 2px rgba(0,0,0,.4);
}
.sold-dot--inline { position: static; display: inline-block; vertical-align: middle; margin-right: 6px; box-shadow: none; }

.placard { display: block; margin-top: 16px; font-size: .95rem; color: var(--paper-dim); text-align: center; }
.placard em { color: var(--paper); }

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

.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.hero__title { font-size: clamp(3.2rem, 8vw, 6.5rem); margin-bottom: .2em; }
.hero__intro { font-size: 1.2em; color: var(--paper-dim); max-width: 32ch; margin: 0 0 1.6em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero__art { text-decoration: none; max-width: 560px; justify-self: end; width: 100%; }
.hero__art img { max-height: 70vh; object-fit: contain; }

@media (max-width: 820px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__art { justify-self: stretch; }
	.hero__art img { max-height: 60vh; margin: 0 auto; width: auto; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.section--tight { padding-top: 24px; border-top: 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section__title { font-size: clamp(2rem, 4vw, 3rem); }
.section__title--small { font-size: 1.8rem; margin-top: 72px; color: var(--paper-dim); }
.section__more { font-family: var(--caps); letter-spacing: .12em; text-transform: lowercase; text-decoration: none; white-space: nowrap; }

/* ornamental rule under section titles */
.section__title::after, .page-head__title::after {
	content: "✦"; display: block; margin-top: .35em; font-size: .9rem; color: var(--gold); letter-spacing: 0;
}
.section__head .section__title::after { display: none; }

.page-head { padding: clamp(40px, 6vw, 80px) 0 24px; }
.page-head__title { font-size: clamp(2.8rem, 7vw, 5rem); }
.page-head__lede { font-size: 1.15em; color: var(--paper-dim); max-width: 50ch; }

.empty { font-style: italic; color: var(--paper-dim); font-size: 1.2em; padding: 40px 0; }

/* ---------- Artwork grid: masonry so paintings keep their shape ---------- */

.art-grid { columns: 3 280px; column-gap: clamp(20px, 3vw, 40px); }
.art-card { break-inside: avoid; margin-bottom: clamp(28px, 4vw, 48px); }
.art-card__link { display: block; text-decoration: none; color: var(--paper); }
.art-card__link .frame { transition: border-color .25s, transform .25s; }
.art-card__link:hover .frame { border-color: var(--gold); transform: translateY(-3px); }
.art-card__title { font-size: 1.35rem; margin: 14px 0 2px; font-style: italic; }
.art-card__meta { margin: 0; font-size: .95rem; color: var(--paper-dim); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.filters a {
	padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
	color: var(--paper-dim); font-family: var(--caps); letter-spacing: .1em; text-transform: lowercase;
}
.filters a:hover { color: var(--paper); border-color: var(--gold-dim); }
.filters a[aria-current] { color: var(--ink); background: var(--gold); border-color: var(--gold); }

.pager { margin-top: 24px; text-align: center; font-family: var(--caps); letter-spacing: .1em; }
.pager .page-numbers { padding: 4px 10px; text-decoration: none; }
.pager .current { color: var(--paper); }

/* ---------- Shows ---------- */

.show-list { display: grid; gap: 16px; }
.show-list--compact { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.show-card {
	display: grid; grid-template-columns: 88px 1fr; gap: clamp(16px, 3vw, 32px);
	padding: clamp(20px, 3vw, 32px); background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
	scroll-margin-top: 96px;
}
.show-card:target { border-color: var(--gold); }
.show-card__date { text-align: center; border: 1px solid var(--gold-dim); padding: 10px 4px; align-self: start; line-height: 1; }
.show-card__month { display: block; font-family: var(--caps); letter-spacing: .16em; text-transform: lowercase; color: var(--gold); font-size: .95rem; }
.show-card__day { display: block; font-family: var(--display); font-size: 2.6rem; margin: 6px 0 4px; }
.show-card__dow { display: block; font-size: .85rem; color: var(--paper-dim); }
.show-card__title { font-size: 1.6rem; margin-bottom: .25em; }
.show-card p { margin: 0 0 .35em; }
.show-card__when { color: var(--paper); }
.show-card__when .sep { color: var(--gold); padding: 0 .2em; }
.show-card__where .muted { display: block; font-size: .95rem; }
.show-card__booth { color: var(--paper-dim); }
.show-card__booth strong { color: var(--gold); font-weight: 500; }
.show-card__notes { margin-top: .6em; color: var(--paper-dim); font-style: italic; }
.show-card__notes p { margin: 0 0 .5em; }
.show-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1em !important; }
.show-card__actions .btn { padding: .45em 1.1em; font-size: .9rem; }

.show-list--compact .show-card { grid-template-columns: 72px 1fr; }
.show-list--compact .show-card__day { font-size: 2.1rem; }
.show-list--compact .show-card__title { font-size: 1.35rem; }

.show-list--past .show-card { background: transparent; border-left-color: var(--line); padding: 16px 20px; opacity: .75; }
.show-list--past .show-card__day { font-size: 1.8rem; }
.show-list--past .show-card__title { font-size: 1.25rem; }

@media (max-width: 480px) {
	.show-card, .show-list--compact .show-card { grid-template-columns: 64px 1fr; }
	.show-card__day { font-size: 2rem; }
}

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about:not(:has(.about__photo)) { grid-template-columns: 1fr; max-width: 760px; }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }
.prose--page { margin: 0 auto 0 0; }

@media (max-width: 760px) {
	.about { grid-template-columns: 1fr; }
	.about__photo { max-width: 320px; }
}

/* ---------- Single artwork ---------- */

.piece { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-top: clamp(32px, 5vw, 64px); padding-bottom: 48px; align-items: start; }
.piece__zoom { cursor: zoom-in; font: inherit; color: inherit; }
.piece__zoom img { max-height: 80vh; object-fit: contain; margin: 0 auto; }
.piece__info { position: sticky; top: 104px; }
.piece__title { font-size: clamp(2.4rem, 5vw, 3.6rem); font-style: italic; }

.piece__details { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin: 24px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.piece__details dt { font-family: var(--caps); letter-spacing: .12em; text-transform: lowercase; color: var(--paper-dim); }
.piece__details dd { margin: 0; }

.piece__sale { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 28px; }
.piece__price, .piece__status { width: 100%; margin: 0 0 4px; font-family: var(--display); font-size: 1.8rem; }
.piece__status { color: var(--paper-dim); }
.piece__story { color: var(--paper-dim); }
.piece__see { font-style: italic; color: var(--paper-dim); border-left: 2px solid var(--gold); padding-left: 16px; }

.piece-nav { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 64px; border-top: 1px solid var(--line); font-family: var(--caps); letter-spacing: .08em; text-transform: lowercase; }
.piece-nav > * { flex: 1; }
.piece-nav > :nth-child(2) { text-align: center; flex: 0 0 auto; }
.piece-nav > :last-child { text-align: right; }
.piece-nav a { text-decoration: none; }

@media (max-width: 860px) {
	.piece { grid-template-columns: 1fr; }
	.piece__info { position: static; }
	.piece-nav > :first-child, .piece-nav > :last-child { font-size: .85rem; }
}

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

.site-footer { border-top: 1px solid var(--gold-dim); background: var(--ink-2); margin-top: 0; }
.site-footer__inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; padding-top: clamp(48px, 6vw, 80px); padding-bottom: 48px; align-items: end; }
.site-footer__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 20ch; }
.link-row { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.link-row a { font-family: var(--caps); font-size: 1.1rem; letter-spacing: .12em; text-transform: lowercase; }

.footer-next { display: block; padding: 24px; border: 1px solid var(--gold-dim); text-decoration: none; color: var(--paper); }
.footer-next:hover { border-color: var(--gold); color: var(--paper); }
.footer-next strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin-bottom: 4px; }
.footer-next span:last-child { color: var(--paper-dim); }

.site-footer__base { padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--paper-dim); }

@media (max-width: 760px) {
	.site-footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Lightbox ---------- */

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8, 6, 5, .96); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; }
.lightbox__close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: var(--paper); font-size: 2.4rem; line-height: 1; cursor: pointer; padding: 8px; }
.lightbox-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* WordPress core classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .9rem; color: var(--paper-dim); }
