/*
Theme Name: Unhurried
Theme URI: https://switchcasestudio.com/projects/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.1.1
Copyright: (c) 2026 Moses 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: a translucent accent tint that reads on light and dark sections
   alike. (1.0.1 painted selected text contrast-on-base, which vanished on Ink
   sections and dark footers: the text looked unselectable.) */
::selection { background: rgba(212, 75, 25, .4); background: color-mix(in srgb, var(--wp--preset--color--accent) 40%, transparent); }

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

img { height: auto; }

/* ─── Sticky footer: a short page keeps the footer at the window's bottom ─ */
.wp-site-blocks {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
}
.wp-site-blocks > main { flex: 1 0 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; }
/* Centered capsule (Header, centered title pattern): the outer children share
   the spare width so the title sits in the exact middle */
.unhurried-capsule.is-centered > :first-child,
.unhurried-capsule.is-centered > :last-child { flex: 1 1 0; min-width: 0; }
.unhurried-capsule.is-centered > .wp-block-navigation { padding-left: clamp(.5rem, 1.5vw, 1.25rem); }
.unhurried-capsule.is-centered > .wp-block-group:nth-child(2) { flex: 0 0 auto; }
@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;
}

/* Hairline buttons on Ink surfaces: the hover fills Bone, not Ink-on-Ink
   (the block style's own hover would make the pill vanish into the section) */
.is-style-section-ink .wp-block-button.is-style-hairline .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--base);
}

/* ─── 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 "Color" 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(.is-style-color, .is-style-colour) img { filter: none; } /* is-style-colour: images saved before 1.1.1 */

/* 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); }
}
@media (max-width: 600px) {
	/* !important: the price column's inline flex-basis (20%) is too narrow for "From $180" on a phone */
	.unhurried-row > .wp-block-column:last-child { flex-basis: 6rem !important; }
	.unhurried-row > .wp-block-column:last-child p { white-space: nowrap; }
	.unhurried-row > .wp-block-column:first-child { flex-basis: 56px !important; }
	.unhurried-row > .wp-block-column:first-child img { width: 56px; }
}

/* 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; }
.is-style-glass > .wp-block-details:first-child { border-top: 0; padding-top: 0; }

/* Navigation links: underline on hover and keyboard focus; vertical menus get taller touch targets */
.wp-block-navigation a:hover,
.wp-block-navigation a:focus-visible { text-decoration: underline; text-underline-offset: 5px; }
.wp-block-navigation.is-vertical .wp-block-navigation-item__content { padding-block: .35rem; }

/* 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; }

/* ─── Hours rows, names strip ────────────────────────────────────────────── */
.unhurried-hours { border-top: 1px solid var(--wp--preset--color--hairline); }
/* !important: the first row's inline padding-top from the block must go so the card edge is tight */
.unhurried-hours:first-child { border-top: 0; padding-top: 0 !important; }
.unhurried-hours > p { margin: 0; }
.unhurried-names > p { opacity: .72; margin: 0; transition: opacity .3s var(--wp--custom--motion--ease); }
/* Dim: a secondary line that keeps the section's own text color (works on Ink and in every variation) */
.unhurried-dim { opacity: .75; }
@media (hover: hover) { .unhurried-names > p:hover { opacity: 1; } }

/* ─── Story rows, gift card, map placeholder ─────────────────────────────── */
/* Flipped story rows put the text first in the markup; on a phone the image goes back on top */
@media (max-width: 781px) {
	.unhurried-story.is-flipped { flex-direction: column-reverse; }
}
/* Gift card: an Ink card at credit-card proportions, resting at a slight tilt */
.unhurried-giftcard {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	aspect-ratio: 1.586 / 1;
	border-radius: var(--wp--custom--radius--card);
	box-shadow: var(--wp--preset--shadow--float);
	transform: rotate(-2deg);
}
.unhurried-giftcard .wp-block-site-title a { text-decoration: none; }
/* Map placeholder: Stone, a dot grid, an accent pin in the middle, the note card bottom left */
.unhurried-map {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--wp--custom--radius--card);
	background-color: var(--wp--preset--color--base-2);
	background-image: radial-gradient(var(--wp--preset--color--hairline) 1.5px, transparent 1.6px);
	background-size: 28px 28px;
	overflow: hidden;
}
.unhurried-map::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 8px rgba(212, 75, 25, .22);
	box-shadow: 0 0 0 8px color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent);
}
.unhurried-map > .unhurried-note {
	position: absolute;
	left: clamp(1rem, 3vw, 2rem);
	bottom: clamp(1rem, 3vw, 2rem);
	background: rgba(22, 20, 15, .86); /* over light Stone the usual .6 glass left the eyebrow under 4.5:1 */
}

/* 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 (class "unhurried-reveal" or the Reveal block style) ─ */
@media (prefers-reduced-motion: no-preference) {
	.has-unhurried-reveal :is(.unhurried-reveal, .is-style-reveal):not(.is-revealed) {
		opacity: .4;
		transform: translateY(16px);
	}
	.has-unhurried-reveal :is(.unhurried-reveal, .is-style-reveal) {
		transition: opacity var(--wp--custom--motion--duration) var(--wp--custom--motion--ease),
			transform var(--wp--custom--motion--duration) var(--wp--custom--motion--ease);
	}
}
