/*
Theme Name: Nesta
Theme URI: https://tenfoldthemes.example/nesta
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A calm Scandinavian block theme for smart home and consumer IoT manufacturers — pebble-soft cards, connectivity pills, an ODM program showcase and 18 ready-made patterns with realistic export copy.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
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: nesta
Tags: block-theme, full-site-editing, block-patterns, block-styles, custom-colors, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, one-column, e-commerce, portfolio, blog
*/

/* ---------------------------------------------------------------------------
 * Focus visibility & motion
 * ------------------------------------------------------------------------- */

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

::selection {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

a,
.wp-block-button__link,
.wp-element-button {
	transition: var(--wp--custom--transition);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------------------------------------------------------------------------
 * Block styles: Group — Pebble card / Pebble card (hover lift)
 * Soft cards only: no borders, no hard rules — shadow and air do the work.
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-card,
.wp-block-group.is-style-card-hover {
	background: var(--wp--custom--surface, #fff);
	border-radius: var(--wp--custom--radius--l);
	box-shadow: var(--wp--preset--shadow--card);
	padding: var(--wp--preset--spacing--40);
}

.wp-block-group.is-style-card-hover {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-group.is-style-card-hover:hover {
	box-shadow: var(--wp--preset--shadow--lift);
	transform: translateY(-5px);
}

/* ---------------------------------------------------------------------------
 * Block styles: Group — Pill chip
 * The connectivity / spec chip: tiny rounded pill on a soft tint.
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-pill {
	background: var(--wp--preset--color--tint);
	border-radius: 999px;
	padding: 0.375rem 0.9375rem;
}

.wp-block-group.is-style-pill p {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.4;
}

/* ---------------------------------------------------------------------------
 * Block styles: List — Checkmarks (soft sage dots)
 * ------------------------------------------------------------------------- */

ul.is-style-checkmarks {
	list-style: none;
	padding-left: 0;
}

ul.is-style-checkmarks > li {
	padding-left: 2em;
	position: relative;
	margin-bottom: 0.625em;
}

ul.is-style-checkmarks > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.18em;
	width: 1.25em;
	height: 1.25em;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M5 12.5l4.5 4.5L19 7.5"/></svg>') center / 62% no-repeat, linear-gradient(#000 0 0);
	-webkit-mask-composite: destination-out;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M5 12.5l4.5 4.5L19 7.5"/></svg>') center / 62% no-repeat, linear-gradient(#000 0 0);
	mask-composite: exclude;
}

/* ---------------------------------------------------------------------------
 * Block styles: Image — Pebble (extra-soft corners)
 * ------------------------------------------------------------------------- */

.wp-block-image.is-style-pebble img {
	border-radius: var(--wp--custom--radius--l);
}

/* ---------------------------------------------------------------------------
 * Details / FAQ affordance — soft cards, no divider rules
 * ------------------------------------------------------------------------- */

.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2.25rem;
}

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

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3em;
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	transition: transform 0.2s ease;
}

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

.wp-block-details > :not(summary) {
	font-weight: 400;
	color: var(--wp--preset--color--contrast-2);
}

/* ---------------------------------------------------------------------------
 * Small refinements
 * ------------------------------------------------------------------------- */

.wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 1.5px;
}

.wp-block-image img {
	height: auto;
	max-width: 100%;
}
/* ---------------------------------------------------------------------------
 * Palette-slug guard: the standard palette includes a slug named "border".
 * When used as a *text* color, WordPress emits `.has-border-color`, which core
 * pairs with `:where(.has-border-color){border-style:solid}`; with the default
 * medium width that paints a stray ~3px box around the text. Zero the width
 * here — genuine borders set an explicit width (inline or via block-style
 * classes) that overrides this 0-specificity rule.
 * ------------------------------------------------------------------------- */
:where(.has-border-color) {
	border-width: 0;
}
