/*
Theme Name: Perillat Designs
Theme URI: https://perillatdesigns.com
Author: Aaron Perillat
Author URI: https://perillatdesigns.com
Description: A warm, gallery-first block theme for Perillat Designs — custom furniture handmade in Ashland, Oregon. Built for the Site Editor with theme.json v3, style variations, section styles, and a library of patterns for project pages, the about story, process, and commissions.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: perillat
Tags: block-patterns, block-styles, full-site-editing, style-variations, portfolio, one-column, wide-blocks, editor-style, custom-colors, custom-logo, custom-menu, featured-images, translation-ready
*/

/* Most styling lives in theme.json. Only small enhancements below. */

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.is-style-lift img { transition: none !important; }
}

/* Gentle zoom on project cards */
.is-style-lift { overflow: hidden; }
.is-style-lift img {
	transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.is-style-lift:hover img,
.is-style-lift:focus-within img {
	transform: scale(1.035);
}

/* Sticky, dark see-through header (inner pages). Fixed colors so a white
   logo and white menu text stay visible in every style variation. */
.perillat-header {
	color: #f7f3ed;
	background: rgba(30, 25, 21, 0.78);
	border-bottom: 1px solid rgba(247, 243, 237, 0.08);
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
}
body.admin-bar .perillat-header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .perillat-header { top: 46px; }
}

/* Small eyebrow labels (Julius Sans One, widely tracked) */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--heading) !important;
	text-transform: uppercase;
	letter-spacing: 0.24em;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 400;
}

/* Hairline separator */
.wp-block-separator.is-style-hairline {
	border: 0;
	border-top: 1px solid currentColor;
	opacity: 0.2;
	width: 100%;
}

/* Spec list on project pages */
.perillat-specs p { margin: 0; }
.perillat-specs > .wp-block-group {
	border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
	padding-block: 0.85rem;
}

/* Accessible focus ring */
:where(a, button, input, textarea, select):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* Headings that are links (project cards) stay clean */
.wp-block-heading a { text-decoration: none; }
.wp-block-heading a:hover { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }

/* Tabular step numbers */
.perillat-step-num { font-variant-numeric: tabular-nums; }

/* ---------- Home page header over the hero photo ---------- */
.perillat-header-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	color: #f7f3ed;
	background: transparent;
	transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
body.admin-bar .perillat-header-overlay { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .perillat-header-overlay { top: 46px; }
}
.perillat-header-overlay .wp-block-site-title {
	opacity: 0;
	transition: opacity 0.35s ease;
}
/* Once you scroll past the photo: dark, see-through, frosted bar.
   Text and logo stay white so a white logo never disappears. */
.perillat-header-overlay.is-scrolled {
	background: rgba(30, 25, 21, 0.72);
	box-shadow: 0 1px 0 rgba(247, 243, 237, 0.08);
	backdrop-filter: saturate(140%) blur(12px);
	-webkit-backdrop-filter: saturate(140%) blur(12px);
}
.perillat-header-overlay.is-scrolled .wp-block-site-title { opacity: 1; }
/* In the Site Editor keep it in place over the hero so it can be edited. */
.editor-styles-wrapper .perillat-header-overlay { position: absolute; }
.editor-styles-wrapper .perillat-header-overlay .wp-block-site-title { opacity: 1; }

/* Instagram icon follows the text color instead of brand pink */
.perillat-header .wp-block-social-links.is-style-logos-only .wp-social-link,
.perillat-header-overlay .wp-block-social-links.is-style-logos-only .wp-social-link {
	color: currentColor;
}

/* Hero scroll cue */
.perillat-scroll-cue a {
	text-decoration: none;
	display: inline-block;
	animation: perillat-bob 2.4s ease-in-out infinite;
}
@keyframes perillat-bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
	.perillat-scroll-cue a { animation: none; }
}

/* Footer sits flush against the last section */
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }

/* Header on small screens: name on the left, menu + Instagram on the right */
.perillat-header .wp-block-site-title,
.perillat-header-overlay .wp-block-site-title { white-space: nowrap; }
@media (max-width: 781px) {
	.perillat-header-overlay .wp-block-group > .wp-block-group:first-child,
	.perillat-header-overlay .wp-block-social-links {
		flex-basis: auto !important;
		width: auto !important;
	}
	.perillat-header-overlay .wp-block-navigation { margin-left: auto; }
	.perillat-header .wp-block-site-title,
	.perillat-header-overlay .wp-block-site-title { letter-spacing: 0.14em; }
}

/* ---------- Contact form ---------- */
.perillat-contact-form { width: 100%; }
.perillat-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem 1.5rem;
}
.perillat-field { margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.perillat-field.is-full { grid-column: 1 / -1; }
@media (max-width: 600px) {
	.perillat-form-grid { grid-template-columns: 1fr; }
}
.perillat-field label {
	font-family: var(--wp--preset--font-family--heading);
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--contrast-2);
}
.perillat-field input,
.perillat-field select,
.perillat-field textarea {
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 18%, transparent);
	border-radius: 2px;
	padding: 0.8rem 0.9rem;
	width: 100%;
	box-sizing: border-box;
}
.perillat-field textarea { resize: vertical; min-height: 9rem; }
.perillat-field input:focus,
.perillat-field select:focus,
.perillat-field textarea:focus {
	border-color: var(--wp--preset--color--accent);
	outline: 2px solid color-mix(in srgb, var(--wp--preset--color--accent) 35%, transparent);
	outline-offset: 0;
}
.perillat-form-actions { margin-top: 1.5rem; justify-content: center; display: flex; }
.perillat-form-actions button { cursor: pointer; }
.perillat-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.perillat-form-note {
	padding: 0.9rem 1.1rem;
	border-radius: 2px;
	margin: 0 0 1.5rem;
	text-align: center;
	border: 1px solid;
}
.perillat-form-note.is-success {
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--contrast);
	background: color-mix(in srgb, var(--wp--preset--color--accent-3) 12%, transparent);
}
.perillat-form-note.is-error {
	border-color: #a33a2a;
	color: var(--wp--preset--color--contrast);
	background: color-mix(in srgb, #a33a2a 10%, transparent);
}
