/*
Theme Name: Cultiva La Mirada
Theme URI: https://cultivalamirada.com
Author: Telex
Description: A coming-soon landing page theme for Cultiva La Mirada. Centered, minimal, warm — built to capture subscribers before the official launch.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cultiva-la-mirada
Tags: one-column, custom-colors, custom-fonts, block-styles, full-site-editing, coming-soon
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
*/

/* ---------- Root & scroll behavior ---------- */

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--wp--custom--scroll-padding-top, 80px);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

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

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

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--background);
}

/* ---------- Landing-page section behavior ---------- */

.wp-site-blocks .alignfull[id] {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wp-site-blocks .alignfull[id="signup"] {
	min-height: auto;
	padding-top: var(--wp--preset--spacing--80);
	padding-bottom: var(--wp--preset--spacing--80);
}

.wp-site-blocks .alignfull[id]:target {
	box-shadow: inset 4px 0 0 var(--wp--preset--color--primary);
	transition: box-shadow 200ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
	.wp-site-blocks .alignfull[id]:target {
		box-shadow: none;
		transition: none;
	}
}

/* ---------- Body-level background gradient ---------- */

body {
	background: linear-gradient(
		180deg,
		var(--wp--preset--color--background) 0%,
		var(--wp--preset--color--background) 50%,
		var(--wp--preset--color--cream) 100%
	);
	min-height: 100vh;
}

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

/* Subtitle / accent font treatment */
.has-accent-font-family {
	font-style: normal;
	line-height: 1.4;
}

/* Body text readability */
.has-body-font-family {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Heading letter-spacing refinement for display size */
h1,
.has-display-font-size {
	letter-spacing: -0.02em;
}

/* Subtitle muted tone — applied via inline styles or class */
.subtitle-text {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--accent);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.4;
}

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

a {
	text-decoration-color: rgba(0, 154, 216, 0.4);
	text-underline-offset: 3px;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
	text-decoration-color: var(--wp--preset--color--primary);
}

/* Privacy checkbox label links */
.checkbox-label a {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-decoration-color: rgba(0, 154, 216, 0.4);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease;
}

.checkbox-label a:hover {
	text-decoration-color: var(--wp--preset--color--primary);
}

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

.wp-block-button__link {
	transition: background-color 0.3s ease, transform 0.1s ease;
}

.wp-block-button__link:active {
	transform: translateY(1px);
}

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

/* ---------- Form card ---------- */

.form-card {
	background: var(--wp--preset--color--background);
	padding: var(--wp--preset--spacing--50);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(44, 107, 132, 0.08);
	width: 100%;
	max-width: 440px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

/* ---------- Subscription form ---------- */

.subscription-form {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	text-align: left;
}

.subscription-form .input-group {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--10);
}

.subscription-form .input-group label {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--text);
	font-weight: 600;
}

.subscription-form input[type="text"],
.subscription-form input[type="email"] {
	width: 100%;
	padding: 1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--border-light);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--text);
	box-sizing: border-box;
	background: var(--wp--preset--color--background);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.subscription-form input[type="text"]:focus,
.subscription-form input[type="email"]:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(0, 154, 216, 0.1);
}

.subscription-form input::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 0.6;
}

/* Checkbox group */
.subscription-form .checkbox-group {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--10);
}

.subscription-form input[type="checkbox"] {
	margin-top: 0.15rem;
	width: 18px;
	height: 18px;
	min-width: 18px;
	accent-color: var(--wp--preset--color--primary);
	cursor: pointer;
}

.subscription-form .checkbox-label {
	font-family: var(--wp--preset--font-family--body);
	font-size: 13px;
	color: var(--wp--preset--color--text);
	line-height: 1.5;
	cursor: pointer;
}

/* Submit button */
.subscription-form .submit-btn {
	background-color: var(--wp--preset--color--action);
	color: var(--wp--preset--color--background);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 1.125rem;
	padding: var(--wp--preset--spacing--30);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	width: 100%;
	margin-top: var(--wp--preset--spacing--10);
	transition: background-color 0.3s ease, transform 0.1s ease;
	letter-spacing: 0.02em;
	line-height: 1.2;
}

.subscription-form .submit-btn:hover {
	background-color: var(--wp--preset--color--action-hover);
}

.subscription-form .submit-btn:active {
	transform: translateY(1px);
}

/* Form success/error messages */
.cultiva-form-message {
	padding: var(--wp--preset--spacing--30);
	border-radius: 8px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
	margin-top: var(--wp--preset--spacing--20);
}

.cultiva-form-message.success {
	background-color: rgba(0, 217, 160, 0.1);
	color: var(--wp--preset--color--action-hover);
	border: 1px solid rgba(0, 217, 160, 0.3);
}

.cultiva-form-message.error {
	background-color: rgba(255, 134, 0, 0.1);
	color: var(--wp--preset--color--secondary);
	border: 1px solid rgba(255, 134, 0, 0.3);
}

/* ---------- Header site logo ---------- */

.header-site-logo {
	margin: 0 !important;
	flex-shrink: 0;
}

.header-site-logo img {
	height: 32px;
	width: auto;
	max-width: 70px;
	object-fit: contain;
	display: block;
}

@media (max-width: 600px) {
	.header-site-logo img {
		height: 26px;
		max-width: 56px;
	}
}

/* ---------- Hero logo image ---------- */

.hero-logo {
	display: block;
	width: 220px;
	height: 220px;
	object-fit: contain;
	margin-left: auto;
	margin-right: auto;
}

.hero-logo img {
	width: 220px;
	height: 220px;
	object-fit: contain;
}

@media (max-width: 782px) {
	.hero-logo,
	.hero-logo.wp-block-image,
	figure.hero-logo {
		display: none !important;
	}
}

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

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

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

/* ---------- Separator / divider ---------- */

hr.wp-block-separator {
	border-color: var(--wp--preset--color--border-light);
	opacity: 1;
}

hr.wp-block-separator.has-primary-color {
	border-color: var(--wp--preset--color--primary);
}

/* ---------- Decorative accent border ---------- */

.accent-border-top {
	border-top: 3px solid var(--wp--preset--color--secondary);
}

.accent-border-bottom {
	border-bottom: 3px solid var(--wp--preset--color--tertiary);
}

/* ---------- Mobile header layout ---------- */

@media (max-width: 600px) {
	.site-header {
		padding-left: var(--wp--preset--spacing--20) !important;
		padding-right: var(--wp--preset--spacing--20) !important;
		padding-top: var(--wp--preset--spacing--20) !important;
		padding-bottom: var(--wp--preset--spacing--20) !important;
	}
}

@media (max-width: 782px) {
	.wp-site-blocks > .wp-block-group > .wp-block-group.alignfull {
		padding-top: var(--wp--preset--spacing--60) !important;
		padding-bottom: var(--wp--preset--spacing--50) !important;
	}

	.form-card {
		max-width: 100%;
	}
}

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

/* ---------- Footer ---------- */

.wp-block-template-part.site-footer {
	border-top: 1px solid var(--wp--preset--color--border-light);
}

/* ---------- Responsive form card ---------- */

@media (max-width: 480px) {
	.form-card {
		padding: var(--wp--preset--spacing--40);
		border-radius: 12px;
	}
}

/* ---------- Selection highlight ---------- */

::selection {
	background: rgba(0, 154, 216, 0.15);
	color: var(--wp--preset--color--text);
}

/* ---------- Focus visible for accessibility ---------- */

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ---------- Loop layout utilities ---------- */
/* These classes are wired to the wp:query blocks emitted by content/pages and
   templates. Do not rename. Tune colours and spacing to theme.json tokens. */

/* 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-light, currentColor);
	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--primary);
	opacity: 0.15;
}
.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--primary);
	border-radius: 50%;
	background: var(--wp--preset--color--background);
}

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