/*
Theme Name: Invent 2025
Theme URI: https://invent2025.org/
Author: Invent 2025
Author URI: https://invent2025.org/
Description: Company site of Invent 2025. Bilingual (BG at the root, EN under /en/) block theme; every page, part and colour is editable in the Site Editor.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 0.1.18
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: invent
Tags: full-site-editing, block-patterns, translation-ready
*/

/*
 * Bump Version above on EVERY delivery. WordPress cache-busts this file by
 * theme version; the same version twice serves old CSS against new HTML.
 *
 * Only what theme.json cannot express lives here.
 */

/* ---------- Base ---------- */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-variant-numeric: lining-nums;
}

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

a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

/* Bulgarian compounds break mid-word at display sizes. Hyphenate only on
   narrow screens; everywhere else it splits words that had room. */
h1, h2, h3,
.wp-block-post-title,
.wp-block-heading {
	overflow-wrap: break-word;
	hyphens: manual;
}

@media (max-width: 600px) {
	h1, h2, h3,
	.wp-block-post-title,
	.wp-block-heading {
		hyphens: auto;
		hyphenate-limit-chars: 10 4 4;
	}
}

p, li {
	text-wrap: pretty;
}

/* Consecutive full-width sections are separated by the root blockGap,
   which shows as a strip of page background between two bands. */
.wp-site-blocks > * + *,
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + * {
	margin-block-start: 0 !important;
}

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

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

.site-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.site-header .wp-block-site-title a,
.site-brand a {
	text-decoration: none;
	color: inherit;
}

.site-brand img {
	display: block;
	height: 30px;
	width: auto;
}

.site-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 4px;
	padding: 0.4rem 0;
	min-width: 17rem !important;
	box-shadow: 0 12px 32px -16px rgb(14 27 29 / 0.25);
}

.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 1rem;
}

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

.i25-lang .wp-block-navigation-item__content {
	font-weight: 600;
	letter-spacing: 0.04em;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 4px;
	padding: 0.2rem 0.5rem;
	font-size: 0.875rem;
}

.site-phone a {
	color: inherit;
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 781px) {
	.site-phone {
		font-size: 0.9375rem;
		order: -1;
	}
}

@media (max-width: 359px) {
	.site-phone {
		display: none;
	}
}

/* ---------- Footer (dark band) ---------- */

.site-footer a {
	color: inherit;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.site-footer a:hover {
	color: var(--wp--preset--color--accent-2);
	text-decoration-color: currentColor;
}

.site-footer .footer-legal {
	border-top: 1px solid rgb(244 246 245 / 0.16);
}

.site-footer .has-line-color {
	color: rgb(244 246 245 / 0.62) !important;
}

/* ---------- Buttons ---------- */

.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

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

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--contrast);
	box-shadow: inset 0 0 0 1px currentColor;
	border: 0;
}

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

/* ---------- Lead paragraph under an H1 ---------- */

.i25-lead {
	max-width: 38rem;
}

/* ---------- Framed screenshot (block style "Рамка на браузър") ---------- */

.wp-block-image.is-style-framed {
	position: relative;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	overflow: hidden;
	background: var(--wp--preset--color--base-2);
	padding-top: 22px;
	box-shadow: 0 30px 60px -40px rgb(14 27 29 / 0.45);
}

.wp-block-image.is-style-framed::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 22px;
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
}

.wp-block-image.is-style-framed img {
	display: block;
	width: 100%;
	height: auto;
}

.wp-block-image.is-style-framed figcaption {
	margin: 0;
	padding: 0.6rem 0.9rem;
	background: var(--wp--preset--color--base);
	border-top: 1px solid var(--wp--preset--color--line);
}

/* A phone screenshot overlapping a desktop one. */
.i25-stack {
	position: relative;
}

.i25-stack .i25-stack__phone {
	position: absolute;
	right: -1.5rem;
	bottom: -2rem;
	width: 28%;
	margin: 0;
	border-radius: 14px;
	padding-top: 0;
	border-width: 4px;
	border-color: var(--wp--preset--color--contrast);
}

.i25-stack .i25-stack__phone::before {
	display: none;
}

@media (max-width: 781px) {
	.i25-stack .i25-stack__phone {
		right: 0.5rem;
		bottom: -1.25rem;
		width: 32%;
	}
}

/* ---------- Index of doors: a ruled directory, not three cards ---------- */

.i25-doors {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.i25-door {
	border-top: 1px solid var(--wp--preset--color--line);
	display: grid !important;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 12rem;
	gap: 0.5rem var(--wp--preset--spacing--40);
	align-items: baseline;
	padding-block: var(--wp--preset--spacing--30);
	transition: background-color 0.2s ease;
}

.i25-door > * {
	margin: 0 !important;
}

.i25-door .wp-block-heading a {
	color: inherit;
	text-decoration: none;
}

.i25-door .wp-block-heading a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.i25-door {
	position: relative;
}

.i25-door:hover .wp-block-heading a,
.i25-door:focus-within .wp-block-heading a {
	color: var(--wp--preset--color--accent);
}

.i25-door .i25-door__go {
	font-weight: 600;
	white-space: nowrap;
	color: var(--wp--preset--color--accent);
}

@media (max-width: 781px) {
	.i25-door {
		grid-template-columns: 1fr;
	}
}

/* ---------- Ruled list (block style "Списък с линии") ---------- */

.wp-block-list.is-style-ruled {
	list-style: none;
	padding-left: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.wp-block-list.is-style-ruled > li {
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 0.85rem 0;
	margin: 0;
}

/* Group with a rule above (block style "Линия отгоре"). */
.wp-block-group.is-style-ruled {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--30);
}

/* ---------- Principles: numbered by CSS, not by hand-typed labels ---------- */

.i25-principles {
	counter-reset: principle;
}

.i25-principle {
	counter-increment: principle;
	border-top: 2px solid var(--wp--preset--color--contrast);
	padding-top: var(--wp--preset--spacing--20);
}

.i25-principle .wp-block-heading::before {
	content: counter(principle) ".";
	display: inline-block;
	min-width: 1.6em;
	color: var(--wp--preset--color--accent);
	font-variant-numeric: tabular-nums;
}

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

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

.i25-step {
	counter-increment: step;
	position: relative;
	padding-top: 2.75rem;
}

.i25-step::before {
	content: counter(step);
	position: absolute;
	top: 0;
	left: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--contrast);
	display: grid;
	place-items: center;
	font-weight: 600;
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
	background: var(--wp--preset--color--base);
}

.i25-step::after {
	content: "";
	position: absolute;
	top: 1rem;
	left: 2.5rem;
	right: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.i25-step:last-child::after {
	display: none;
}

@media (max-width: 781px) {
	.i25-step::after {
		display: none;
	}
}

/* ---------- Price rows ---------- */

.i25-prices table {
	border-collapse: collapse;
	width: 100%;
}

.i25-prices th,
.i25-prices td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.85rem 0.75rem 0.85rem 0;
	text-align: left;
	vertical-align: top;
}

.i25-prices thead th {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
	font-weight: 500;
	border-bottom-color: var(--wp--preset--color--contrast);
}

.i25-prices td:nth-child(2) {
	white-space: nowrap;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.i25-figure {
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

/* ---------- Quote ---------- */

.wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	color: var(--wp--preset--color--contrast-2);
}

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

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

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

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 0;
	font-weight: 400;
	color: var(--wp--preset--color--accent);
	transition: transform 0.2s ease;
}

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

.wp-block-details > :not(summary) {
	margin-top: 0.75rem;
}

/* ---------- Contact form ---------- */

.i25-form fieldset {
	border: 0;
	padding: 0;
	margin: 0;
}

.i25-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 0 var(--wp--preset--spacing--30);
}

.i25-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0 0 1.25rem;
}

.i25-field label {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}

.i25-field input[type="text"],
.i25-field select,
.i25-field textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 3rem;
	padding: 0.7rem 0.85rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: #fff;
	border: 1px solid #8C9896;
	border-radius: 4px;
}

.i25-field textarea {
	resize: vertical;
}

.i25-field input:focus,
.i25-field select:focus,
.i25-field textarea:focus {
	border-color: var(--wp--preset--color--accent);
}

.i25-field__help {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast-2);
}

.i25-field--check {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.65rem;
}

.i25-field--check input {
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.15rem;
	accent-color: var(--wp--preset--color--accent);
	flex: none;
}

.i25-field--check label {
	font-weight: 400;
}

.i25-form__notice {
	padding: 0.9rem 1rem;
	border-radius: 4px;
	border-left: 3px solid;
}

.i25-form__notice.is-success {
	background: var(--wp--preset--color--accent-2);
	border-color: var(--wp--preset--color--accent);
}

.i25-form__notice.is-error {
	background: #F8E3E0;
	border-color: #A33A2B;
}

.i25-hp {
	position: absolute !important;
	left: -9999px !important;
}

/* ---------- Misc ---------- */

input,
select,
textarea {
	box-sizing: border-box;
}

.i25-muted-link a {
	color: inherit;
}

.i25-tag {
	display: inline-block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--accent);
}

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

.site-footer .wp-block-list {
	list-style: none;
	padding-left: 0;
	margin-top: 0.75rem;
}

.site-footer .wp-block-list li {
	margin: 0 0 0.5rem;
}

.site-footer .footer-legal a + a {
	margin-left: 1.25rem;
}

.site-footer .site-brand img {
	height: 34px;
}

/* Headings that are links: ink, underline only on hover. */
.wp-block-heading a {
	color: inherit;
	text-decoration: none;
}

.wp-block-heading a:hover,
.wp-block-heading a:focus-visible {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

/* Team cards: portrait and monogram at the same small size, so a missing
   photo does not make one person look less real than the other. */
.i25-avatar {
	width: 9rem;
	max-width: 100%;
	aspect-ratio: 1;
	margin-bottom: var(--wp--preset--spacing--30);
}

.i25-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
}

div.i25-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
}

div.i25-avatar p {
	margin: 0;
}

/* Two-column fact tables (company data): the label column keeps its words
   whole instead of breaking letter by letter beside a long value. */
.i25-prices td:first-child {
	min-width: 7rem;
}

.i25-facts td:nth-child(2) {
	white-space: normal;
	font-weight: 400;
}
