/*
Theme Name: Reggie Gordon
Theme URI: https://reggiegordon.devhush.com/
Author: DevHush
Author URI: https://devhush.com/
Description: Block theme for Reggie Gordon, multi-instrumentalist, producer and songwriter. Built for the WordPress block editor: content lives in regular blocks, the page stack and contact form are custom blocks, and colors, type and spacing are defined once in theme.json.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reggie-gordon
Tags: block-theme, full-site-editing, one-column, custom-colors
*/

/* ---------------------------------------------------------------
   Tokens
   --------------------------------------------------------------- */
:root {
	--rg-navy: var(--wp--preset--color--navy, #183148);
	--rg-bone: var(--wp--preset--color--bone, #F1F0EA);
	--rg-sky: var(--wp--preset--color--sky, #1E99D6);
	--rg-steel: var(--wp--preset--color--steel, #296FAC);
	--rg-sans: var(--wp--preset--font-family--display, "Inter Tight", Arial, sans-serif);
	--rg-serif: var(--wp--preset--font-family--serif, "Source Serif 4", Georgia, serif);
	--rg-wrap: 1220px;
	--rg-big: 142px;
	--rg-big-lh: 130px;
	--rg-ease: cubic-bezier(.22, .8, .24, 1);
}

html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-optical-sizing: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--rg-sky); outline-offset: 3px; }

/* ---------------------------------------------------------------
   Page frame
   --------------------------------------------------------------- */
.rg-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: calc(var(--rg-wrap) + 220px);
	margin: 0 auto;
	padding: 108px 110px 0;
	box-sizing: border-box;
}
.rg-main { flex: 1 0 auto; }
.rg-top, .rg-site-footer { margin: 0; }

/* ---------------------------------------------------------------
   Page stack (reggie/navigation-stack)
   --------------------------------------------------------------- */
.rg-stack { margin: 0; padding: 0; list-style: none; }
.rg-stack li { margin: 0; padding: 0; }
.rg-stack a,
.rg-stack span,
.rg-stack__title {
	display: block;
	width: max-content;
	max-width: 100%;
	margin: 0;
	font-family: var(--rg-sans);
	font-weight: 900;
	font-size: var(--rg-big);
	line-height: var(--rg-big-lh);
	letter-spacing: 0;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--rg-steel);
	white-space: nowrap;
	transition: color .2s ease;
}
.rg-stack__name a,
.rg-stack__name span,
.rg-stack__title { color: var(--rg-bone); }
.home .rg-stack__name span { color: #fff; }
.rg-stack a:hover,
.rg-stack a:focus-visible,
.rg-stack .is-current a { color: var(--rg-sky); }
.rg-stack .rg-stack__name a:hover { color: var(--rg-bone); }

.rg-rule,
hr.rg-rule {
	display: block;
	width: 46px !important;
	max-width: 46px;
	height: 2px;
	margin: 0 0 32px 5px !important;
	border: 0 !important;
	background: var(--rg-sky);
	opacity: 1;
}
.rg-bottom-row { gap: 0; }
.rg-bottom-row .rg-spotify { margin: -12px 0 0; }

/* ---------------------------------------------------------------
   Content
   --------------------------------------------------------------- */
.rg-content { padding-top: 22px; padding-bottom: 200px; }
.page-rg-music .rg-content { padding-bottom: 34px; }
.page-rg-contact .rg-content { padding-bottom: 20px; }

/* Bio: photo + text (core/columns, style "Bio") */
.wp-block-columns.is-style-bio {
	display: grid !important;
	grid-template-columns: 514px minmax(0, 1fr);
	column-gap: 46px;
	row-gap: 0;
	margin: 0;
	padding-left: 5px;
}
.wp-block-columns.is-style-bio > .wp-block-column { flex: none !important; min-width: 0; margin: 0; }
.wp-block-columns.is-style-bio p {
	max-width: 621px;
	margin: -12px 0 0;
	font-family: var(--rg-serif);
	font-weight: 400;
	font-size: 20px;
	line-height: 30px;
	letter-spacing: .025em;
	color: var(--rg-bone);
}

/* Gallery, style "Slider" */
.rg-slider { position: relative; width: 514px; max-width: 100%; }
.wp-block-gallery.is-style-slider {
	position: relative;
	display: block !important;
	width: 514px;
	max-width: 100%;
	height: 349px;
	margin: 0 !important;
	gap: 0 !important;
	overflow: hidden;
	background: #000;
}
.wp-block-gallery.is-style-slider figure.wp-block-image {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	opacity: 0;
	transition: opacity .45s ease;
}
.wp-block-gallery.is-style-slider figure.wp-block-image:first-child,
.wp-block-gallery.is-style-slider figure.wp-block-image.is-active { opacity: 1; }
.rg-slider .wp-block-gallery.is-style-slider figure.wp-block-image:not(.is-active) { opacity: 0; }
.wp-block-gallery.is-style-slider figure.wp-block-image img { width: 100% !important; height: 100% !important; object-fit: cover; }
.rg-slider__arrows { display: flex; justify-content: flex-end; gap: 6px; margin-top: 11px; }
.rg-slider__arrows button { width: 12px; height: 14px; padding: 0; border: 0; background: none; cursor: pointer; }
.rg-slider__arrows svg { display: block; }
.rg-slider__prev svg { fill: #CBC5BD; }
.rg-slider__next svg { fill: #9E9992; }
.rg-slider__arrows button:hover svg { fill: #fff; }

/* Music: section label (paragraph, style "Section label") */
p.is-style-eyebrow {
	margin: 20px 0 14px 5px;
	font-family: var(--rg-serif);
	font-weight: 600;
	font-size: 21px;
	line-height: 1;
	color: var(--rg-steel);
}

/* Music: list, style "Credits" */
ul.is-style-credits {
	margin: 0 0 0 5px;
	padding: 0;
	list-style: none;
	border-top: 2px solid var(--rg-sky);
	font-family: var(--rg-sans);
	font-size: 16px;
	line-height: 20px;
}
ul.is-style-credits li {
	margin: 0;
	padding: 6px 0 5px;
	border-bottom: 1px dotted var(--rg-sky);
	color: var(--rg-sky);
	font-weight: 400;
}
ul.is-style-credits li:first-child { padding-top: 7px; }
ul.is-style-credits strong { color: var(--rg-bone); font-weight: 600; }

/* Social icons (core/social-links) in the theme color */
.rg-social,
.rg-spotify { margin: 0; padding: 0; gap: 0; }
.rg-social .wp-social-link,
.rg-spotify .wp-social-link { color: var(--rg-sky) !important; background: none !important; }
.rg-social .wp-social-link a,
.rg-spotify .wp-social-link a { padding: 0 !important; }
.wp-block-social-links.rg-social { font-size: 28px !important; }
.wp-block-social-links.rg-spotify { font-size: 34px !important; }
.rg-social .wp-social-link svg,
.rg-spotify .wp-social-link svg { width: 1em; height: 1em; }
.rg-social .wp-social-link:hover,
.rg-spotify .wp-social-link:hover { color: var(--rg-bone) !important; transform: none; }

/* ---------------------------------------------------------------
   Contact form (reggie/contact-form)
   --------------------------------------------------------------- */
.rg-form {
	position: relative;
	display: grid;
	grid-template-columns: 649px 545px;
	column-gap: 26px;
	row-gap: 39px;
	margin-top: 18px;
	padding-left: 5px;
}
.rg-form__field { position: relative; display: flex; flex-direction: column; }
.rg-form__field--full { grid-column: 1 / -1; }
.rg-form label {
	margin-bottom: 4px;
	font-family: var(--rg-sans);
	font-weight: 300;
	font-size: 16px;
	line-height: 20px;
	letter-spacing: -.01em;
	color: var(--rg-bone);
}
.rg-form input,
.rg-form textarea {
	box-sizing: border-box;
	width: 100%;
	height: 36px;
	padding: 7px 15px;
	border: 1px solid var(--rg-steel);
	border-radius: 0;
	background: transparent;
	color: var(--rg-bone);
	font-family: var(--rg-serif);
	font-size: 16px;
	line-height: 20px;
	-webkit-appearance: none;
	appearance: none;
}
.rg-form textarea { height: 345px; padding-top: 16px; resize: none; }
.rg-form input::placeholder,
.rg-form textarea::placeholder { color: var(--rg-steel); opacity: 1; }
.rg-form input:focus,
.rg-form textarea:focus { outline: none; border-color: var(--rg-sky); }
.rg-form__submit {
	position: absolute;
	right: 12px;
	bottom: 12px;
	height: 36px;
	padding: 0 22px;
	border: 1px solid var(--rg-steel);
	background: transparent;
	color: var(--rg-sky);
	font-family: var(--rg-sans);
	font-weight: 900;
	font-size: 16px;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
}
.rg-form__submit:hover,
.rg-form__submit:focus-visible { background: var(--rg-sky); border-color: var(--rg-sky); color: var(--rg-navy); }
.rg-form__notice { grid-column: 1 / -1; margin: 0; font-family: var(--rg-sans); font-size: 16px; color: var(--rg-sky); }
.rg-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.rg-footer {
	align-items: center;
	padding: 36px 0 58px;
	font-family: var(--rg-serif);
	font-size: 13px;
	line-height: 16px;
	letter-spacing: .01em;
}
.rg-footer p { margin: 0; }
.rg-footer-credit { color: var(--rg-bone); }
.rg-footer a { color: var(--rg-sky); text-decoration: underline; }
.rg-footer-meta { align-items: center; gap: 20px; }
.rg-footer-meta p { white-space: nowrap; }
.rg-copyright { color: var(--rg-sky); }
.rg-notfound { font-family: var(--rg-sans); font-size: 20px; padding: 22px 0 120px 5px; }

/* ---------------------------------------------------------------
   Motion: headings glide between pages, content eases in
   --------------------------------------------------------------- */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--rg-ease); }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .35s; }
@keyframes rg-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rg-fade { from { opacity: 0; } to { opacity: 1; } }
.rg-content { animation: rg-in .6s var(--rg-ease) .12s both; }
.rg-rule, .rg-bottom-row .rg-spotify { animation: rg-fade .5s ease .2s both; }
body.rg-leaving .rg-content { opacity: 0; transform: translateY(-8px); transition: opacity .18s ease, transform .18s ease; }
@media (prefers-reduced-motion: reduce) {
	@view-transition { navigation: none; }
	.rg-content, .rg-rule, .rg-bottom-row .rg-spotify { animation: none; }
	body.rg-leaving .rg-content { transition: none; }
}

/* ---------------------------------------------------------------
   Tablet
   --------------------------------------------------------------- */
@media (max-width: 1439px) {
	:root { --rg-big: clamp(60px, 9.86vw, 142px); --rg-big-lh: clamp(54px, 9.03vw, 130px); }
	.rg-page { padding: clamp(40px, 7.5vw, 108px) clamp(37px, 7.6vw, 110px) 0; }
	.wp-block-columns.is-style-bio { grid-template-columns: minmax(0, 514fr) minmax(0, 621fr); }
	.rg-slider,
	.wp-block-gallery.is-style-slider { width: 100%; }
	.wp-block-gallery.is-style-slider { height: auto; aspect-ratio: 514 / 349; }
	.rg-form { grid-template-columns: minmax(0, 649fr) minmax(0, 545fr); }
}
@media (max-width: 900px) {
	.wp-block-columns.is-style-bio { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
	.wp-block-columns.is-style-bio p { margin-top: 0; }
}

/* ---------------------------------------------------------------
   Phone (design frame 402px)
   --------------------------------------------------------------- */
@media (max-width: 767px) {
	:root { --rg-big: 60px; --rg-big-lh: 54px; }
	.rg-page { padding: 52px 37px 0; }
	.rg-stack a, .rg-stack span, .rg-stack__title { white-space: normal; }
	.rg-stack__name a, .rg-stack__name span { max-width: min(6em, 100%); }
	.rg-stack a, .rg-stack span { max-width: 100%; }
	.rg-content { padding-top: 22px; padding-bottom: 24px; }
	.page-rg-music .rg-content, .page-rg-contact .rg-content { padding-bottom: 24px; }
	.wp-block-columns.is-style-bio { padding-left: 0; }
	.wp-block-gallery.is-style-slider { aspect-ratio: 325 / 212; }
	.rg-slider__arrows { display: none; }
	.wp-block-columns.is-style-bio p { font-size: 10.6px; line-height: 13px; letter-spacing: 0; }
	p.is-style-eyebrow { margin: 10px 0 8px; font-size: 11px; }
	ul.is-style-credits { margin-left: 0; font-size: 7.6px; line-height: 10px; border-top-width: 1px; }
	ul.is-style-credits li { padding: 5px 0 6px; }
	.rg-rule, hr.rg-rule { width: 18px !important; max-width: 18px; margin: 0 0 13px !important; }
	.wp-block-social-links.rg-spotify { font-size: 24px !important; }
	.rg-form { grid-template-columns: 1fr; row-gap: 16px; margin-top: 22px; padding-left: 0; }
	.rg-form label { font-size: 13px; line-height: 16px; }
	.rg-form input { height: 30px; padding: 6px 12px; font-size: 11px; }
	.rg-form textarea { height: 163px; padding-top: 10px; font-size: 11px; }
	.rg-form__submit { right: 8px; bottom: 8px; height: 26px; padding: 0 14px; font-size: 11px; }
	.rg-footer { position: relative; display: block !important; padding: 70px 28px 13px 0; font-size: 8px; line-height: 11px; letter-spacing: 0; }
	.rg-footer-meta, .rg-footer.is-layout-flex, .rg-footer-meta.is-layout-flex { display: block; }
	.rg-footer-credit a { display: block; }
	.rg-social { position: absolute; right: -10px; bottom: 22px; }
	.wp-block-social-links.rg-social { font-size: 20px !important; }
}

/* Narrow phones (under 370px): scale the stack so the longest word still fits. */
@media (max-width: 369px) {
	:root { --rg-big: calc((100vw - 74px) / 4.95); --rg-big-lh: calc((100vw - 74px) / 5.5); }
}
