/*
Theme Name: Unhurried
Author: Switch Case Studio
Author URI: https://switchcasestudio.com
Description: Unhurried is a calm, editorial block theme for studios, clinics, spas and makers who sell care rather than speed. Warm bone and ink surfaces, floating panels that rise over the page, oversized display type with Fraunces italic accent words, and a gallery-monochrome image treatment give every page the feel of a printed lookbook. It ships with full-page patterns for a homepage, about, services and contact page, plus heroes, visit steps, service accordions, membership tiers, FAQs and a stories layout, all editable in the Site Editor.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
Copyright: (c) 2026 Moshe Atia Poston, Switch Case Studio
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unhurried
Tags: blog, portfolio, one-column, two-columns, wide-blocks, block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, style-variations, threaded-comments, translation-ready
*/

/* ─── Accent words: <em> inside display text becomes Fraunces italic ─────── */
:where(h1, h2, h3, .has-huge-font-size, .has-xx-large-font-size, .is-style-statement) em {
	font-family: var(--wp--preset--font-family--accent);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.01em;
}

::selection { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }

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

img { height: auto; }

/* ─── Header: floating capsule ───────────────────────────────────────────── */
.unhurried-header {
	position: sticky;
	top: calc(10px + var(--wp-admin--admin-bar--height, 0px));
	z-index: 100;
	pointer-events: none;
}
.unhurried-header > * { pointer-events: auto; }
@media (max-width: 600px) {
	.unhurried-header { top: 8px; }
	.admin-bar .unhurried-header { top: 8px; }
}
.unhurried-capsule {
	min-height: 60px;
	box-shadow: 0 26px 60px -38px rgba(22, 20, 15, .45);
	transition: box-shadow .3s ease;
}
.unhurried-capsule .wp-block-site-logo img { max-height: 36px; width: auto; }
.unhurried-capsule .wp-block-navigation__responsive-container.is-menu-open {
	padding: clamp(1.25rem, 5vw, 4rem);
}
.unhurried-capsule .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	letter-spacing: -0.03em;
	gap: .4em;
}
.unhurried-header .wp-block-button__link { padding: .6rem 1.3rem; white-space: nowrap; }
.unhurried-capsule > .wp-block-group { flex-shrink: 1; min-width: 0; }
.unhurried-capsule .wp-block-site-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
	.unhurried-capsule { gap: .5rem !important; }
	.unhurried-capsule > .wp-block-group { gap: .5rem !important; }
	.unhurried-header .wp-block-button__link { padding: .55rem .95rem; font-size: .8125rem; }
}

/* ─── Rise: a section pulled up over the one above it ────────────────────── */
.unhurried-rise {
	position: relative;
	z-index: 2;
	margin-top: var(--wp--custom--seam--overlap) !important;
}

/* ─── Display helpers ────────────────────────────────────────────────────── */
.unhurried-indent { padding-left: 10%; }
.unhurried-first-indent { text-indent: 10%; }
@media (max-width: 899px) {
	.unhurried-indent { padding-left: 0; }
	.unhurried-first-indent { text-indent: 0; }
}
.unhurried-numeral {
	font-family: var(--wp--preset--font-family--accent);
	font-style: italic;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wp--preset--color--contrast-2);
}
.unhurried-step { position: relative; padding-left: 1.25rem; }
.unhurried-step::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: var(--wp--preset--color--accent);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .3s var(--wp--custom--motion--ease);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.unhurried-step:hover::before { transform: scaleY(1); }
}

/* Gallery-monochrome imagery; the "Colour" image style opts back out. */
.unhurried-mono img,
.unhurried-mono .wp-block-cover__image-background,
.unhurried-mono video {
	filter: grayscale(1) contrast(1.02);
}
.unhurried-mono .is-style-colour img { filter: none; }

/* On narrow screens the side scrim becomes an even veil so text stays legible */
@media (max-width: 781px) {
	.wp-block-cover__background.has-scrim-right-gradient-background { background: rgba(22, 20, 15, .66) !important; opacity: 1 !important; }
}

/* Small floating note card */
.unhurried-note { max-width: min(100%, 26rem); margin-left: 0 !important; }

/* Staggered gallery row */
.unhurried-stagger > .wp-block-image:nth-child(even),
.unhurried-stagger > .wp-block-column:nth-child(even) { margin-top: clamp(1.5rem, 5vw, 4rem); }

@media (max-width: 600px) {
	.unhurried-stagger.is-not-stacked-on-mobile { flex-wrap: wrap !important; }
	.unhurried-stagger.is-not-stacked-on-mobile > .wp-block-column { flex-basis: calc(50% - 0.75rem) !important; }
}

/* Quote citation */
.wp-block-quote cite,
.wp-block-pullquote cite {
	display: block;
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--display);
	font-style: normal;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* Index rows (services list) */
.unhurried-row {
	border-top: 1px solid var(--wp--preset--color--hairline);
	transition: background-color .3s ease;
}
.unhurried-row:last-child { border-bottom: 1px solid var(--wp--preset--color--hairline); }
.unhurried-row .wp-block-image img { aspect-ratio: 1; object-fit: cover; }
@media (hover: hover) {
	.unhurried-row:hover { background-color: var(--wp--preset--color--base-2); }
}

/* Journal cards */
.unhurried-cards .wp-block-post-featured-image img { aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s var(--wp--custom--motion--ease); }
.unhurried-cards .wp-block-post-featured-image { overflow: hidden; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.unhurried-cards .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.04); }
}
.unhurried-cards.is-scatter .wp-block-post:nth-child(3n+2) { margin-top: clamp(2rem, 8vw, 7rem); }
@media (max-width: 781px) {
	.unhurried-cards.is-scatter .wp-block-post:nth-child(3n+2) { margin-top: 0; }
}

/* Details (accordion) */
.wp-block-details summary {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
	letter-spacing: -0.015em;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--accent);
	font-style: italic;
	transition: transform .3s var(--wp--custom--motion--ease);
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { max-width: 60ch; }

/* Giant wordmark in the footer */
.unhurried-wordmark {
	line-height: .82 !important;
	letter-spacing: -0.06em !important;
	white-space: nowrap;
	overflow: hidden;
}
.unhurried-wordmark a { text-decoration: none; }

/* Arch-topped media */
.unhurried-arch img,
.wp-block-image.is-style-arch img { border-radius: 999px 999px 16px 16px; }

/* Forms (comments, search) */
.wp-block-search__input,
.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea {
	background: var(--wp--preset--color--base-2);
	border: 1px solid transparent;
	border-radius: 12px;
	padding: .9rem 1.1rem;
	font: inherit;
	color: inherit;
}
.wp-block-search__input:focus,
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--wp--preset--color--contrast); outline: none; }
.wp-block-search__button { margin-left: .5rem; }

/* ─── Reveal on scroll (opt-in with the class "unhurried-reveal") ────────── */
@media (prefers-reduced-motion: no-preference) {
	.has-unhurried-reveal .unhurried-reveal:not(.is-revealed) {
		opacity: .4;
		transform: translateY(16px);
	}
	.has-unhurried-reveal .unhurried-reveal {
		transition: opacity var(--wp--custom--motion--duration) var(--wp--custom--motion--ease),
			transform var(--wp--custom--motion--duration) var(--wp--custom--motion--ease);
	}
}
