/*
Theme Name: Talchemiss
Theme URI: https://example.com/talchemiss-theme
Author: Talchemiss
Author URI: https://example.com
Description: A calm, modern block theme built for a one-teacher online language school. Ships with a booking-first homepage, pricing and FAQ patterns, and styling that matches the Talchemiss booking plugin. WooCommerce ready.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
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: talchemiss-theme
Tags: education, blog, one-column, block-patterns, full-site-editing, block-styles, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks
*/

/* Almost everything is declared in theme.json. What lives here is the handful
   of things the block styles engine cannot express: focus behaviour, sticky
   header chrome, and WooCommerce's own class names. */

:root {
	--tal-header-height: 4.75rem;
}

html {
	scroll-behavior: smooth;
}

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

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Skip link + focus ------------------------------------------------------ */

.skip-link:focus {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	z-index: 100000;
}

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

/* Header ----------------------------------------------------------------- */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 40;
	backdrop-filter: saturate(140%) blur(10px);
	background: color-mix(in srgb, var(--wp--preset--color--canvas) 88%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.35rem;
	border-bottom: 1.5px solid transparent;
}

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__content:hover {
	border-bottom-color: var(--wp--preset--color--accent);
}

/* Utility classes used by the bundled patterns ---------------------------- */

.tal-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
}

.tal-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--accent);
}

.tal-lede {
	font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
	color: var(--wp--preset--color--muted);
}

.tal-rule {
	height: 1px;
	background: var(--wp--preset--color--line);
	border: 0;
}

.tal-step {
	counter-increment: tal-step;
	position: relative;
}

.tal-steps {
	counter-reset: tal-step;
}

.tal-step .wp-block-heading::before {
	content: counter(tal-step);
	display: inline-grid;
	place-items: center;
	width: 1.9rem;
	height: 1.9rem;
	margin-right: 0.65rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9rem;
	font-weight: 700;
	vertical-align: 0.1em;
}

.tal-faq .wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	padding-right: 1.75rem;
	position: relative;
}

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

.tal-faq .wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 0;
	font-size: 1.25rem;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}

.tal-faq .wp-block-details[open] summary::after {
	content: "–";
}

/* WooCommerce ------------------------------------------------------------- */

.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
	border-radius: 12px;
	border: 1px solid var(--wp--preset--color--line);
	border-left: 4px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--surface);
	padding: 1rem 1.25rem;
}

.woocommerce-notices-wrapper .woocommerce-error {
	border-left-color: #b3312a;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	padding: 1rem;
}

.woocommerce .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.woocommerce .woocommerce-MyAccount-navigation li a {
	display: inline-block;
	padding: 0.45rem 0.95rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	text-decoration: none;
	font-size: 0.92rem;
}

.woocommerce .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: #fff;
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	background: var(--wp--preset--color--accent);
	color: #fff;
	border-radius: 999px;
	padding: 0.8rem 1.6rem;
	font-weight: 600;
	line-height: 1.2;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background: #24483e;
	color: #fff;
}

.woocommerce table.shop_table,
.woocommerce-checkout .woocommerce-checkout-review-order-table {
	border-radius: 14px;
	border-color: var(--wp--preset--color--line);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.wc-block-components-text-input input {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	padding: 0.7rem 0.9rem;
	background: var(--wp--preset--color--surface);
}

/* Print ------------------------------------------------------------------- */

@media print {
	.wp-site-blocks > header.wp-block-template-part,
	.wp-site-blocks > footer.wp-block-template-part {
		display: none;
	}
}
