/*
Theme Name:   Astra Child — Phyllis Charles
Theme URI:    https://phyllischarles.com
Description:  Painting gallery templates for phyllischarles.com.
Author:       Phyllis Charles Studio
Template:     astra
Version:      1.0.7
License:      GNU General Public License v2 or later
Text Domain:  astra-child-pc
*/

/* --------------------------------------------------------------------------
   The paintings are the colour. Everything around them is a gallery wall:
   warm off-white, hairline rules, and metadata set like a placard beside
   the work. The single accent is a deep teal pulled from her own palette.
   -------------------------------------------------------------------------- */

:root {
	--pc-paper:  #fbfaf7;
	--pc-ink:    #22262b;
	--pc-muted:  #6e7378;
	--pc-rule:   #e2dfd8;
	--pc-accent: #2f6e6b;
}

/* --- shared -------------------------------------------------------------- */

.pc-wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 clamp(1rem, 4vw, 3rem);
}

.pc-page-head {
	padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem;
	text-align: center;
}

.pc-page-title {
	margin: 0;
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--pc-ink);
}

.pc-page-note {
	margin: 0.6rem 0 0;
	color: var(--pc-muted);
	font-size: 0.95rem;
}

/* --- subject navigation -------------------------------------------------- */

.pc-nav {
	border-top: 1px solid var(--pc-rule);
	border-bottom: 1px solid var(--pc-rule);
	padding: 1.1rem 0;
	margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.pc-nav-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: baseline;
	gap: 0.4rem 1.4rem;
}

.pc-nav-row + .pc-nav-row {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px dotted var(--pc-rule);
}

.pc-nav a {
	color: var(--pc-ink);
	text-decoration: none;
	font-size: 0.95rem;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
	transition: border-color 0.18s ease, color 0.18s ease;
}

.pc-nav a:hover,
.pc-nav a:focus-visible {
	color: var(--pc-accent);
	border-bottom-color: var(--pc-accent);
}

.pc-nav a.is-current {
	border-bottom-color: var(--pc-ink);
}

.pc-nav-group {
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pc-muted);
	margin-right: 0.2rem;
}

.pc-nav-sub a {
	font-size: 0.88rem;
	color: var(--pc-muted);
}

/* --- the gallery grid ---------------------------------------------------- */

/* CSS columns rather than a fixed grid: paintings keep their own proportions
   instead of being cropped to a uniform square. */
.pc-grid {
	columns: 3;
	column-gap: clamp(1rem, 2.5vw, 2.25rem);
	padding-bottom: 3rem;
}

@media (max-width: 900px) {
	.pc-grid { columns: 2; }
}

@media (max-width: 560px) {
	.pc-grid { columns: 1; }
}

.pc-card {
	break-inside: avoid;
	margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
	display: block;
	text-decoration: none;
}

.pc-card-frame {
	display: block;
	overflow: hidden;
	background: var(--pc-paper);
	line-height: 0;
}

.pc-card img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.4s ease;
}

.pc-card:hover img,
.pc-card:focus-visible img {
	transform: scale(1.02);
}

.pc-card-label {
	padding-top: 0.85rem;
	text-align: center;
}

.pc-card-title {
	display: block;
	color: var(--pc-ink);
	font-size: 1.15rem;
	line-height: 1.35;
}

.pc-card-meta {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.84rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pc-muted);
}

.pc-card:focus-visible {
	outline: 2px solid var(--pc-accent);
	outline-offset: 6px;
}

/* --- single painting ----------------------------------------------------- */

.pc-single {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
	gap: clamp(1.75rem, 5vw, 4rem);
	align-items: start;
	padding: clamp(1.5rem, 4vw, 3rem) 0 4rem;
}

@media (max-width: 820px) {
	.pc-single { grid-template-columns: 1fr; }
}

.pc-single-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* The placard. This is the one deliberate flourish: metadata set the way a
   gallery sets a wall label, rather than as a product spec table. */
.pc-placard {
	border-top: 2px solid var(--pc-ink);
	padding-top: 1.25rem;
	position: sticky;
	top: 2rem;
}

@media (max-width: 820px) {
	.pc-placard { position: static; }
}

.pc-placard-title {
	margin: 0 0 0.9rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 400;
	line-height: 1.2;
	color: var(--pc-ink);
}

.pc-placard-line {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pc-muted);
	margin-bottom: 0.4rem;
}

.pc-placard-price {
	margin: 1.1rem 0 0;
	padding-top: 1.1rem;
	border-top: 1px solid var(--pc-rule);
	font-size: 1.15rem;
	color: var(--pc-ink);
}

.pc-sold {
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--pc-muted);
}

.pc-inquire {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--pc-rule);
}

.pc-inquire-heading {
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pc-muted);
	margin: 0 0 0.9rem;
}

.pc-inquire input[type="text"],
.pc-inquire input[type="email"],
.pc-inquire textarea {
	width: 100%;
	border: 1px solid var(--pc-rule);
	border-radius: 0;
	padding: 0.65rem 0.75rem;
	font-size: 0.95rem;
	background: #fff;
}

.pc-inquire input:focus,
.pc-inquire textarea:focus {
	outline: 2px solid var(--pc-accent);
	outline-offset: -2px;
	border-color: var(--pc-accent);
}

.pc-inquire input[type="submit"] {
	width: 100%;
	background: var(--pc-ink);
	color: #fff;
	border: 0;
	border-radius: 0;
	padding: 0.8rem 1rem;
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.18s ease;
}

.pc-inquire input[type="submit"]:hover {
	background: var(--pc-accent);
}

.pc-back {
	display: inline-block;
	margin-top: 2rem;
	font-size: 0.82rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pc-muted);
	text-decoration: none;
}

.pc-back:hover { color: var(--pc-accent); }

/* --- empty state --------------------------------------------------------- */

.pc-empty {
	text-align: center;
	padding: 4rem 1rem;
	color: var(--pc-muted);
}

/* --- motion preferences -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.pc-card img,
	.pc-inquire input[type="submit"],
	.pc-nav a {
		transition: none;
	}

	.pc-card:hover img { transform: none; }
}

/* --- home page slideshow ------------------------------------------------- */

/* The line she writes above the slideshow, e.g. "For Easter, I'm featuring my
   bunnies" — set like the quote lower down the page so the two read as a pair. */
.pc-carousel-intro {
	text-align: left;
	font-style: italic;
	font-size: clamp(1rem, 1.6vw, 1.15rem);
	line-height: 1.5;
	color: var(--pc-ink);
	max-width: 56ch;
	margin: 0 0 clamp(1.25rem, 3vw, 2rem);
	padding: 0;
}

/* Scroll-snap rather than a slider library: nothing to update, nothing that
   breaks on its own, and it works with a trackpad swipe or the buttons. */

.pc-carousel {
	position: relative;
	margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}

.pc-carousel-track {
	display: flex;
	gap: 1.5rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding-bottom: 0.5rem;
}

.pc-carousel-track::-webkit-scrollbar {
	display: none;
}

/* Every painting is shown whole. Uniform height with automatic width means a
   10x30 panorama gets a wide slot and a square gets a narrow one — the same
   way a gallery hangs a wall on a consistent centre line. Nothing is cropped. */

.pc-carousel-item {
	flex: 0 0 auto;
	width: auto;
	scroll-snap-align: center;
	text-decoration: none;
	display: block;
}

.pc-carousel-item img {
	height: clamp(260px, 52vh, 560px);
	width: auto;
	max-width: min(88vw, 1000px);
	object-fit: contain;
	display: block;
}

.pc-carousel-caption {
	display: block;
	padding-top: 0.75rem;
	text-align: center;
	font-size: 0.88rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pc-muted);
	text-decoration: none;
}

.pc-carousel-item,
.pc-carousel-item:hover,
.pc-carousel-item:focus {
	text-decoration: none;
}

.pc-carousel-item:hover .pc-carousel-caption,
.pc-carousel-item:focus-visible .pc-carousel-caption {
	color: var(--pc-accent);
}

.pc-carousel-nav {
	position: absolute;
	top: clamp(130px, 26vh, 280px);
	transform: translateY(-50%);
	z-index: 2;
	width: 52px;
	height: 52px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--pc-rule);
	background: rgba(255, 255, 255, 0.92);
	color: var(--pc-ink);
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.18s ease, color 0.18s ease;
}

/* SVG rather than a text chevron: centres exactly and does not shift when the
   site font changes. */
.pc-carousel-nav svg {
	width: 22px;
	height: 22px;
	display: block;
}

.pc-carousel-nav:hover {
	background: var(--pc-ink);
	color: #fff;
}

.pc-carousel-nav:focus-visible {
	outline: 2px solid var(--pc-accent);
	outline-offset: 3px;
}

.pc-carousel-prev { left: 0.5rem; }
.pc-carousel-next { right: 0.5rem; }

@media (max-width: 560px) {
	.pc-carousel-item img { height: clamp(220px, 40vh, 340px); }
	.pc-carousel-nav      { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pc-carousel-track { scroll-behavior: auto; }
	.pc-carousel-nav   { transition: none; }
}

/* --- buttons ------------------------------------------------------------- */

/* A bordered rectangle rather than a filled pill: the same letterspaced small
   caps as the placard, so a call to action reads as gallery signage rather
   than as a web widget. */

.wp-block-button__link,
.wp-block-button .wp-element-button {
	background: transparent;
	color: var(--pc-ink);
	border: 1px solid var(--pc-ink);
	border-radius: 0;
	padding: 0.85rem 2.25rem;
	font-size: 0.78rem;
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.wp-block-button__link:hover,
.wp-block-button .wp-element-button:hover,
.wp-block-button__link:focus-visible,
.wp-block-button .wp-element-button:focus-visible {
	background: var(--pc-ink);
	border-color: var(--pc-ink);
	color: #fff;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--pc-rule);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link,
	.wp-block-button .wp-element-button {
		transition: none;
	}
}

/* --- optical alignment --------------------------------------------------- */

/* Text carries half its line-height as empty space above the capitals, so a
   top-aligned Media & Text block looks misaligned even when it isn't. This
   pulls the first line up so the ink lines up with the top of the photo. */

.wp-block-media-text__content > *:first-child {
	margin-top: -0.32em;
}
