/*
Theme Name: Shyware
Theme URI: https://getshyware.com/
Author: Dirk Jarosch
Description: Studio block theme for Shyware – free software that doesn't watch you. Home page with projects and privacy promise, Holizy product page with pricing, styled WooCommerce shop and checkout, no tracking, English and German.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shyware
Tags: block-patterns, full-site-editing, e-commerce, one-column, wide-blocks, translation-ready
*/

/* ---------- Basics ---------- */

html {
	scroll-behavior: smooth;
	scroll-padding-top: 90px;
}

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

/* Decorative shapes may reach past the edge; clip keeps the sticky header working. */
.wp-site-blocks {
	overflow-x: clip;
}

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

:where(.wp-site-blocks) *:focus-visible {
	outline: 3px solid var(--wp--preset--color--sun);
	outline-offset: 3px;
}

.skip-link.screen-reader-text:focus {
	z-index: 100000;
}

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

.ee-header {
	position: sticky;
	top: 0;
	z-index: 50;
	/* No backdrop-filter: it would trap the fixed mini-cart drawer inside the header. */
	background-color: rgba(255, 255, 255, 0.97) !important;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.admin-bar .ee-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .ee-header {
		top: 0;
	}
}

.ee-logo img {
	display: block;
	width: auto;
	height: 46px;
}

@media (max-width: 480px) {
	.ee-logo img {
		height: 38px;
	}
}

.ee-header .wp-block-navigation__responsive-container.is-menu-open {
	padding-top: 1.5rem;
}

.ee-header .ee-header-cta .wp-block-button__link {
	padding: 0.6em 1.25em;
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 781px) {
	.ee-header .ee-header-cta {
		display: none;
	}
}

/* ---------- Eyebrow, badges ---------- */

.ee-eyebrow {
	display: inline-block;
	padding: 0.35em 0.9em;
	border-radius: 999px;
	background: var(--wp--preset--color--lilac);
	color: var(--wp--preset--color--primary-dark);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ee-badge {
	display: inline-block;
	padding: 0.15em 0.65em;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	vertical-align: 0.15em;
}

.ee-badge--free {
	background: var(--wp--preset--color--lilac);
	color: var(--wp--preset--color--primary-dark);
}

.ee-badge--pro {
	background: var(--wp--preset--color--sun);
	color: #3b2a00;
}

/* ---------- Hero ---------- */

.ee-hero h1 {
	font-size: clamp(2.2rem, 4.4vw, 3.7rem);
	overflow-wrap: normal;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.ee-hero h1 mark {
	padding: 0 0.1em;
	white-space: nowrap;
	background: linear-gradient(transparent 62%, var(--wp--preset--color--sun) 62%, var(--wp--preset--color--sun) 92%, transparent 92%);
	color: inherit;
}

.ee-hero-image {
	position: relative;
}

.ee-hero-image img {
	border-radius: 22px;
	box-shadow: var(--wp--preset--shadow--lift);
}

.ee-hero-image::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -6% -5% auto auto;
	width: 46%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--wp--preset--color--sun-wash);
}

.ee-checks {
	padding: 0;
	list-style: none;
}

.ee-checks li {
	position: relative;
	padding-left: 1.8em;
}

.ee-checks li::before {
	content: "";
	position: absolute;
	top: 0.3em;
	left: 0;
	width: 1.15em;
	height: 1.15em;
	border-radius: 50%;
	background: var(--wp--preset--color--lilac) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='%235a45e0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 75% no-repeat;
}

/* ---------- Cards ---------- */

.ee-card {
	height: 100%;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--base);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ee-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--wp--preset--shadow--soft);
}

@media (prefers-reduced-motion: reduce) {
	.ee-card,
	.ee-card:hover {
		transform: none;
		transition: none;
	}
}

.ee-card .wp-block-image img {
	width: 48px;
	height: 48px;
	padding: 10px;
	border-radius: 14px;
	background: var(--wp--preset--color--lilac-wash);
}

.ee-cards > .wp-block-column {
	display: flex;
	flex-direction: column;
}

/* ---------- Steps ---------- */

.ee-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 50%;
	background: var(--wp--preset--gradient--violet);
	color: #fff;
	font-weight: 800;
	font-size: 1.1rem;
}

/* ---------- Comparison table ---------- */

.ee-compare table {
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--base);
}

.ee-compare th,
.ee-compare td {
	padding: 0.9rem 1.1rem;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	text-align: center;
}

.ee-compare th:first-child,
.ee-compare td:first-child {
	text-align: left;
}

.ee-compare thead th {
	background: var(--wp--preset--color--lilac-wash);
	font-weight: 800;
}

.ee-compare thead th:last-child {
	background: var(--wp--preset--color--sun-wash);
}

.ee-compare tbody tr:last-child td {
	border-bottom: 0;
}

.ee-compare td:not(:first-child) {
	color: var(--wp--preset--color--primary);
	font-weight: 800;
}

@media (max-width: 600px) {
	.ee-compare th,
	.ee-compare td {
		padding: 0.7rem 0.6rem;
		font-size: 0.92rem;
	}
}

/* ---------- Pricing ---------- */

.ee-price {
	position: relative;
	height: 100%;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--card);
	background: var(--wp--preset--color--base);
}

.ee-price--featured {
	border: 2px solid var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--lift);
}

.ee-price .ee-amount {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
}

.ee-price .wp-block-buttons,
.ee-price .wp-block-button,
.ee-price .wp-block-button__link {
	width: 100%;
}

.ee-prices > .wp-block-column {
	display: flex;
	flex-direction: column;
}

.ee-price > .wp-block-buttons {
	margin-top: auto;
}

/* ---------- FAQ ---------- */

.ee-faq .wp-block-details summary {
	font-weight: 700;
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

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

.ee-faq .wp-block-details summary::after {
	content: "+";
	position: absolute;
	top: -0.1em;
	right: 0.2rem;
	color: var(--wp--preset--color--primary);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1;
	transition: transform 0.2s ease;
}

.ee-faq .wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

.ee-faq .wp-block-details > :not(summary) {
	color: var(--wp--preset--color--muted);
}

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

.ee-footer a {
	color: inherit;
	text-decoration: none;
}

.ee-footer a:hover {
	text-decoration: underline;
}

.ee-footer .ee-footer-links {
	padding: 0;
	list-style: none;
	line-height: 2;
}

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

.woocommerce .wc-block-components-button:not(.is-link),
.wc-block-components-checkout-place-order-button,
.wp-block-woocommerce-cart .wc-block-cart__submit-button {
	border-radius: 999px !important;
	font-weight: 700;
}

.wc-block-components-sidebar-layout .wc-block-components-totals-wrapper,
.wc-block-components-order-summary {
	border-color: var(--wp--preset--color--line) !important;
}

.woocommerce-account main > .wp-block-post-title,
.woocommerce-account main > .wp-block-post-content,
.woocommerce-account .wp-block-post-content > .woocommerce {
	max-width: 1040px !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0 0 0.2rem;
	padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 0.55rem 0.9rem;
	border-radius: 12px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	background: var(--wp--preset--color--lilac);
	font-weight: 700;
}

.woocommerce table.shop_table,
.els-licenses {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 14px;
	border-collapse: separate !important;
	overflow: hidden;
}

.els-licenses th,
.els-licenses td {
	border: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--line) !important;
}

.els-sites button {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--primary);
	font: inherit;
	font-size: 0.85em;
	text-decoration: underline;
	cursor: pointer;
}

.els-licenses code {
	padding: 0.2em 0.5em;
	border-radius: 6px;
	background: var(--wp--preset--color--lilac-wash);
	font-size: 0.95em;
}

/* ---------- Studio (Shyware) ---------- */

.sw-hero-art img {
	display: block;
	width: 100%;
	max-width: 520px;
	height: auto;
	margin-inline: auto;
}

.ee-hero .sw-hero-art::before,
.sw-home-hero .ee-hero-image::before {
	content: none;
}

.sw-tile img {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--soft);
}

.ee-card .sw-tile img {
	padding: 0;
	background: none;
}

.sw-tag {
	margin: 0;
	color: var(--wp--preset--color--primary);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.sw-project > .wp-block-buttons,
.sw-project > .sw-soon {
	margin-top: auto;
}

.sw-soon {
	display: inline-block;
	padding: 0.45em 1em;
	border: 1px dashed var(--wp--preset--color--line);
	border-radius: 999px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
}

.sw-promises .ee-card {
	background: var(--wp--preset--color--base);
}

@media (min-width: 782px) and (max-width: 1100px) {
	.sw-promises {
		flex-wrap: wrap !important;
	}

	.sw-promises > .wp-block-column {
		flex-basis: calc(50% - var(--wp--preset--spacing--30)) !important;
	}
}

.sw-about {
	border-radius: 28px;
	box-shadow: var(--wp--preset--shadow--lift);
}

.sw-about .wp-block-image img {
	border-radius: 20px;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

/* ---------- Holizy product page: Holizy keeps its own teal colours ---------- */

.ee-product-logo img {
	display: block;
	width: auto;
	height: 52px;
}

.is-holizy {
	--wp--preset--color--primary: #087f6f;
	--wp--preset--color--primary-dark: #066356;
	--wp--preset--color--lilac: #dff5ee;
	--wp--preset--color--lilac-wash: #f2fbf8;
	--wp--preset--color--violet-bright: #19d3b4;
	--wp--preset--gradient--hero: linear-gradient(180deg, #f2fbf8 0%, #ffffff 100%);
	--wp--preset--gradient--violet: linear-gradient(135deg, #0a8473 0%, #05524a 100%);
	--wp--preset--shadow--lift: 0 2px 4px rgba(20, 48, 58, 0.06), 0 24px 60px rgba(8, 127, 111, 0.18);
}

.is-holizy .ee-checks li::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='%23087f6f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Program downloads */
.sw-download {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 0.75rem 0;
}
.sw-download-meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
.sw-download-hash {
	flex-basis: 100%;
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted);
	overflow-wrap: anywhere;
}
.sw-download-github,
.sw-download-obtainium {
	flex-basis: 100%;
	font-size: var(--wp--preset--font-size--small);
}
.sw-download-missing {
	color: var(--wp--preset--color--muted);
	font-style: italic;
}
.sw-projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: var(--wp--preset--spacing--30);
}
.sw-projects-grid > * {
	margin: 0 !important;
}
