/*
Theme Name: Yolyc
Theme URI: https://yolyc.com
Author: Yolyc
Description: A clean, trustworthy WordPress block theme for Yolyc — the North American real estate company directory and review platform. Built on institutional calm with structured transparency, pairing Plus Jakarta Sans with Lora for a professional SaaS aesthetic.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yolyc
Tags: block-patterns, full-site-editing, wide-blocks, custom-colors, custom-fonts, editor-style
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
*/

/* ---------- Base resets & global polish ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
}

:root,
body,
.wp-site-blocks {
	overflow: visible;
}

/* ---------- Typography polish ---------- */

body {
	font-feature-settings: "kern" 1, "liga" 1;
	text-rendering: optimizeLegibility;
}

/* Headings — Lora tightening */
h1, h2, h3, h4,
.wp-block-post-title {
	letter-spacing: -0.015em;
}

h5, h6 {
	letter-spacing: 0.04em;
}

/* Paragraph readability */
p {
	max-width: 72ch;
}

/* Ensure Lora italic is available for pull quotes */
.wp-block-pullquote blockquote p {
	font-style: italic;
}

.wp-block-pullquote cite {
	font-family: var(--wp--preset--font-family--primary);
	font-style: normal;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	letter-spacing: 0.02em;
}

/* Quote cite styling */
.wp-block-quote cite {
	font-family: var(--wp--preset--font-family--primary);
	font-style: normal;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	display: block;
	margin-top: var(--wp--preset--spacing--20);
}

/* ---------- Link treatments ---------- */

a {
	transition: color 0.2s ease;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:focus-visible {
	outline: 2px solid var(--wp--preset--color--trust);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- Button treatments ---------- */

.wp-block-button .wp-block-button__link,
.wp-element-button {
	transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
	font-family: var(--wp--preset--font-family--primary);
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}

.wp-block-button .wp-block-button__link:hover,
.wp-element-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 23, 31, 0.12);
}

.wp-block-button .wp-block-button__link:active,
.wp-element-button:active {
	transform: translateY(0);
	box-shadow: none;
}

.wp-block-button .wp-block-button__link:focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--trust);
	outline-offset: 3px;
}

/* Outline button variant */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--midnight);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--midnight);
}

/* ---------- Image treatments ---------- */

.wp-block-image img,
.wp-block-cover img {
	border-radius: 8px;
}

.wp-block-image.is-style-rounded img {
	border-radius: 50%;
}

/* Subtle shadow on standalone images */
.wp-block-image:not(.is-style-rounded) img {
	box-shadow: 0 2px 16px rgba(0, 23, 31, 0.06);
}

/* Gallery images */
.wp-block-gallery .wp-block-image img {
	border-radius: 6px;
	box-shadow: none;
}

figure figcaption {
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-top: var(--wp--preset--spacing--20);
}

/* ---------- Separator refinements ---------- */

.wp-block-separator {
	border: none;
	opacity: 1;
}

.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
	max-width: 120px;
}

/* ---------- Navigation refinements ---------- */

.wp-block-navigation a {
	text-decoration: none;
	transition: color 0.2s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--frost);
}

/* ---------- Sticky header ---------- */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Pseudo-element for scrolled-state background */
.wp-site-blocks > header.wp-block-template-part {
	position: relative;
}

.wp-site-blocks > header.wp-block-template-part::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	transition: background 0.4s ease, box-shadow 0.4s ease;
}

body.is-scrolled .wp-site-blocks > header.wp-block-template-part::before {
	background: var(--wp--preset--color--midnight);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- Site title polish ---------- */

.wp-block-site-title a {
	text-decoration: none;
}

/* ---------- Post title links ---------- */

.wp-block-post-title a {
	text-decoration: none;
	transition: color 0.2s ease;
}

/* ---------- Card-like group treatments ---------- */

.wp-block-group.has-surface-background-color,
.wp-block-group.has-frost-background-color,
.wp-block-group.has-white-background-color {
	border-radius: 10px;
}

/* Subtle lift on tinted cards */
.wp-block-group.has-frost-background-color,
.wp-block-group.has-surface-background-color {
	box-shadow: 0 1px 4px rgba(0, 23, 31, 0.04);
}

/* ---------- Code block ---------- */

.wp-block-code code {
	font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
	border-radius: 6px;
	tab-size: 4;
}

/* Inline code */
:not(pre) > code {
	font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--midnight);
	padding: 0.15em 0.4em;
	border-radius: 4px;
	font-size: 0.9em;
}

/* ---------- Table refinements ---------- */

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table td,
.wp-block-table th {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	text-align: left;
}

.wp-block-table th {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--muted);
}

.wp-block-table thead {
	border-bottom: 2px solid var(--wp--preset--color--midnight);
}

/* ---------- Details / FAQ accordion ---------- */

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-block: var(--wp--preset--spacing--30);
}

.wp-block-details summary {
	font-family: var(--wp--preset--font-family--primary);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--midnight);
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--20);
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	font-size: 1.25em;
	font-weight: 400;
	color: var(--wp--preset--color--trust);
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.wp-block-details[open] summary::after {
	content: "\2212";
}

/* ---------- Cover block overlay refinement ---------- */

.wp-block-cover {
	border-radius: 0;
}

.wp-block-cover .wp-block-cover__inner-container {
	max-width: var(--wp--style--global--wide-size, 1280px);
}

/* ---------- Columns gap on mobile ---------- */

@media (max-width: 781px) {
	.wp-block-columns {
		gap: var(--wp--preset--spacing--40);
	}
}

/* ---------- Search block ---------- */

.wp-block-search .wp-block-search__input {
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--medium);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--midnight);
	background: var(--wp--preset--color--white);
	transition: border-color 0.2s ease;
}

.wp-block-search .wp-block-search__input:focus {
	border-color: var(--wp--preset--color--trust);
	outline: none;
	box-shadow: 0 0 0 3px rgba(36, 110, 185, 0.15);
}

.wp-block-search .wp-block-search__button {
	font-family: var(--wp--preset--font-family--primary);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	background: var(--wp--preset--color--trust);
	color: var(--wp--preset--color--white);
	border: none;
	border-radius: 6px;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
	cursor: pointer;
	transition: background-color 0.25s ease;
}

.wp-block-search .wp-block-search__button:hover {
	background: var(--wp--preset--color--midnight);
}

/* ---------- Mobile hamburger overlay ---------- */

.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--40);
	align-items: flex-start;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--large);
}

/* ---------- Form inputs (general) ---------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="password"],
textarea,
select {
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--midnight);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	padding: 0.6rem 0.9rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--wp--preset--color--trust);
	outline: none;
	box-shadow: 0 0 0 3px rgba(36, 110, 185, 0.12);
}

/* ---------- Selection color ---------- */

::selection {
	background: var(--wp--preset--color--frost);
	color: var(--wp--preset--color--midnight);
}

/* ---------- Footer credit polish ---------- */

footer.wp-block-template-part a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

/* ---------- Hero grid pattern overlay (matching reference) ---------- */

.hero-grid-overlay::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(36, 110, 185, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(36, 110, 185, 0.06) 1px, transparent 1px);
	background-size: 60px 60px;
}

/* ---------- Hero search bar (matching reference aesthetic) ---------- */

.hero-search-bar {
	display: flex;
	align-items: center;
	background: var(--wp--preset--color--frost);
	border-radius: 8px;
	overflow: hidden;
	max-width: 540px;
}

.hero-search-bar input {
	flex: 1;
	border: none;
	background: transparent;
	padding: 0.75rem 1.25rem;
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--midnight);
}

.hero-search-bar input::placeholder {
	color: rgba(0, 23, 31, 0.45);
}

.hero-search-bar button {
	background: var(--wp--preset--color--trust);
	color: var(--wp--preset--color--white);
	border: none;
	padding: 0.75rem 1.5rem;
	font-family: var(--wp--preset--font-family--primary);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	cursor: pointer;
	border-radius: 0 6px 6px 0;
	transition: background-color 0.25s ease;
}

.hero-search-bar button:hover {
	background: var(--wp--preset--color--midnight);
}

/* ---------- Stat items (trust indicators, hero stats) ---------- */

.stat-number {
	font-family: var(--wp--preset--font-family--secondary);
	font-weight: 700;
	line-height: 1.1;
}

.stat-label {
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.02em;
}

/* ---------- Verified badge ---------- */

.verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	font-family: var(--wp--preset--font-family--primary);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--trust);
}

/* ---------- Rating stars ---------- */

.star-rating {
	color: var(--wp--preset--color--trust);
	letter-spacing: 0.05em;
}

/* ---------- Loop layout utilities ---------- */

/* Horizontal scrollable rail */
.wp-block-query.is-style-loop-rail .wp-block-post-template {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	padding-bottom: var(--wp--preset--spacing--20);
}
.wp-block-query.is-style-loop-rail .wp-block-post-template > * {
	flex: 0 0 320px;
	scroll-snap-align: start;
}

/* Compact list with hairline row dividers */
.wp-block-query.is-style-loop-list .wp-block-post-template > * {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-block: var(--wp--preset--spacing--30);
}
.wp-block-query.is-style-loop-list .wp-block-post-template > *:last-child {
	border-bottom: 0;
}

/* Zigzag — flip the columns inside every even entry */
.wp-block-query.is-style-loop-zigzag .wp-block-post-template > *:nth-child(even) .wp-block-columns {
	flex-direction: row-reverse;
}

/* Timeline — vertical line with node markers per entry */
.wp-block-query.is-style-loop-timeline .wp-block-post-template {
	position: relative;
	padding-inline-start: 2.5rem;
}
.wp-block-query.is-style-loop-timeline .wp-block-post-template::before {
	content: '';
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0.5rem;
	width: 2px;
	background: var(--wp--preset--color--border);
	opacity: 0.5;
}
.wp-block-query.is-style-loop-timeline .wp-block-post-template > * {
	position: relative;
}
.wp-block-query.is-style-loop-timeline .wp-block-post-template > *::before {
	content: '';
	position: absolute;
	inset-inline-start: -2.25rem;
	inset-block-start: 0.6rem;
	width: 1rem;
	height: 1rem;
	border: 2px solid var(--wp--preset--color--trust);
	border-radius: 50%;
	background: var(--wp--preset--color--white);
}

/* Magazine — first child spans 2 columns of the grid */
.wp-block-query.is-style-loop-magazine .wp-block-post-template > *:first-child {
	grid-column: span 2;
}
@media (max-width: 600px) {
	.wp-block-query.is-style-loop-magazine .wp-block-post-template > *:first-child {
		grid-column: auto;
	}
}

/* ---------- Utility: visually hidden (for accessibility) ---------- */

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}