/*
Theme Name: Zróbmy Event — Edyta Andała-Kiermacka
Theme URI: https://zrobmyevent.pl
Author: Pracownia Wydarzeń Edyta Andała-Kiermacka
Author URI: https://zrobmyevent.pl
Description: Premium block theme (Full Site Editing) dla organizatorki eventów — wesela, urodziny, baby shower, wieczory panieńskie i kawalerskie. Motyw botaniczny: szmaragd, szampan i len. Self-hostowane fonty Fraunces + Inter (zgodność z RODO). Zaprojektowany dla WordPress 7.0.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
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: zrobmyevent
Tags: full-site-editing, block-patterns, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, blog, portfolio
*/

/* =========================================================
   Większość wyglądu pochodzi z theme.json.
   Tutaj tylko to, czego theme.json nie wyraża:
   przejścia, sticky header, hover-zoom, style ozdobne.
   ========================================================= */

:root {
	--eak-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--eak-dur: 0.5s;
}

html {
	scroll-behavior: smooth;
}

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

::selection {
	background: var(--wp--preset--color--szampan);
	color: var(--wp--preset--color--las);
}

/* Subtelne ligatury i światło dla Fraunces w nagłówkach */
h1, h2, h3,
.wp-block-post-title,
.wp-block-site-title {
	font-feature-settings: "liga" 1, "dlig" 1;
}

/* ---------- Linki: animowane podkreślenie ---------- */
.wp-block-post-content a,
.entry-content a {
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
	transition: color var(--eak-dur) var(--eak-ease);
}

/* ---------- Przyciski: płynne przejście ---------- */
.wp-element-button,
.wp-block-button__link {
	transition: background-color var(--eak-dur) var(--eak-ease),
		color var(--eak-dur) var(--eak-ease),
		transform var(--eak-dur) var(--eak-ease);
	will-change: transform;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
}

/* Wariant przycisku: Kontur (outline) */
.wp-block-button.is-style-kontur .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--szmaragd);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--szmaragd);
}
.wp-block-button.is-style-kontur .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--szmaragd);
	color: var(--wp--preset--color--len);
}
/* Kontur na ciemnym tle */
.has-las-background-color .wp-block-button.is-style-kontur .wp-block-button__link,
.has-szmaragd-background-color .wp-block-button.is-style-kontur .wp-block-button__link {
	color: var(--wp--preset--color--len);
	box-shadow: inset 0 0 0 1px rgba(201, 184, 134, 0.6);
}
.has-las-background-color .wp-block-button.is-style-kontur .wp-block-button__link:hover,
.has-szmaragd-background-color .wp-block-button.is-style-kontur .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--szampan);
	color: var(--wp--preset--color--las);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--szampan);
}

/* ---------- Nawigacja: podkreślenie od środka ---------- */
.wp-block-navigation .wp-block-navigation-item__content {
	position: relative;
	padding-bottom: 0.3em;
}
.wp-block-navigation .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform var(--eak-dur) var(--eak-ease);
	opacity: 0.8;
}
.wp-block-navigation .wp-block-navigation-item__content:hover::after,
.wp-block-navigation .current-menu-item .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/* ---------- Sticky header z rozmyciem ---------- */
.eak-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: saturate(120%) blur(10px);
	-webkit-backdrop-filter: saturate(120%) blur(10px);
	background-color: rgba(244, 241, 234, 0.82);
	border-bottom: 1px solid rgba(110, 116, 104, 0.16);
	transition: background-color var(--eak-dur) var(--eak-ease),
		border-color var(--eak-dur) var(--eak-ease);
}
/* Wariant nagłówka na ciemnej sekcji hero (dodawany klasą) */
.eak-header.eak-header--ciemny {
	background-color: rgba(20, 39, 31, 0.75);
	border-bottom-color: rgba(201, 184, 134, 0.2);
}

/* ---------- Hover-zoom dla zdjęć w okładkach i obrazach ---------- */
.eak-zoom {
	overflow: hidden;
}
.eak-zoom .wp-block-cover__image-background,
.eak-zoom img {
	transition: transform 0.9s var(--eak-ease);
	will-change: transform;
}
.eak-zoom:hover .wp-block-cover__image-background,
.eak-zoom:hover img {
	transform: scale(1.06);
}

/* ---------- Styl obrazu: Łuk (arched) ---------- */
.wp-block-image.is-style-luk img,
.wp-block-cover.is-style-luk {
	border-radius: 50vw 50vw 6px 6px / 22vw 22vw 6px 6px;
	overflow: hidden;
}
.wp-block-cover.is-style-luk {
	border-radius: 50vw 50vw 6px 6px / 18vw 18vw 6px 6px;
}

/* ---------- Styl grupy: Karta (subtelne uniesienie) ---------- */
.wp-block-group.is-style-karta {
	transition: transform var(--eak-dur) var(--eak-ease),
		box-shadow var(--eak-dur) var(--eak-ease);
}
.wp-block-group.is-style-karta:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 60px -28px rgba(20, 39, 31, 0.45);
}

/* ---------- Cienki złoty divider ozdobny ---------- */
.wp-block-separator.is-style-zlota-kreska {
	border: none;
	height: 1px;
	max-width: 64px;
	opacity: 1;
	background: var(--wp--preset--color--szampan);
}
.wp-block-separator.is-style-zlota-kreska.alignwide,
.wp-block-separator.is-style-zlota-kreska.alignfull {
	max-width: 100%;
}

/* ---------- Inicjał ozdobny (numer kroku / monogram) ---------- */
.eak-numer {
	font-family: var(--wp--preset--font-family--naglowek);
	font-size: clamp(2.5rem, 5vw, 4rem);
	line-height: 1;
	color: var(--wp--preset--color--szampan);
	font-weight: 300;
}

/* ---------- Litera spacing util dla „eyebrow" w treści ---------- */
.eak-kicker {
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

/* ---------- Delikatne wejście sekcji (scroll reveal, czysty CSS) ---------- */
@media (prefers-reduced-motion: no-preference) {
	.eak-reveal {
		opacity: 0;
		transform: translateY(24px);
		animation: eak-reveal-in linear both;
		animation-timeline: view();
		animation-range: entry 0% cover 22%;
	}
	@keyframes eak-reveal-in {
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

/* ---------- Dostępność: respektuj redukcję ruchu ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
	.eak-zoom:hover .wp-block-cover__image-background,
	.eak-zoom:hover img { transform: none; }
}

/* ---------- Drobne: podpisy galerii, cytaty ---------- */
.wp-block-pullquote {
	border: none;
	border-top: 1px solid var(--wp--preset--color--szampan);
	border-bottom: 1px solid var(--wp--preset--color--szampan);
}

/* ---------- Kafle kategorii z ornamentem botanicznym ---------- */
.eak-tile {
	position: relative;
	overflow: hidden;
}
.eak-tile::after {
	content: "";
	position: absolute;
	top: -14px;
	right: -14px;
	width: 130px;
	height: 130px;
	background: url(assets/images/leaf-corner.svg) no-repeat top right;
	background-size: contain;
	opacity: 0.5;
	transform: rotate(0deg);
	transition: transform var(--eak-dur) var(--eak-ease), opacity var(--eak-dur) var(--eak-ease);
	pointer-events: none;
}
.eak-tile:hover::after {
	transform: scale(1.08) rotate(-4deg);
	opacity: 0.85;
}
.eak-tile .eak-tile__link {
	font-weight: 600;
	letter-spacing: 0.04em;
}

/* ---------- Formularz kontaktowy ---------- */
.eak-form {
	display: grid;
	gap: 1.1rem;
}
.eak-form .eak-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.1rem;
}
@media (max-width: 600px) {
	.eak-form .eak-form__row { grid-template-columns: 1fr; }
}
.eak-form label {
	display: block;
	font-family: var(--wp--preset--font-family--tekst);
	font-size: 0.72rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--szalwia);
	margin-bottom: 0.5em;
}
.eak-form input,
.eak-form select,
.eak-form textarea {
	width: 100%;
	font-family: var(--wp--preset--font-family--tekst);
	font-size: 1rem;
	color: var(--wp--preset--color--atrament);
	background: var(--wp--preset--color--biel);
	border: 1px solid #D8CDB6;
	border-radius: 2px;
	padding: 0.85em 1em;
	transition: border-color var(--eak-dur) var(--eak-ease), box-shadow var(--eak-dur) var(--eak-ease);
}
.eak-form input:focus,
.eak-form select:focus,
.eak-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--szmaragd);
	box-shadow: 0 0 0 3px rgba(201, 184, 134, 0.3);
}
.eak-form textarea { min-height: 150px; resize: vertical; }
.eak-form .eak-form__consent {
	display: flex;
	gap: 0.7em;
	align-items: flex-start;
	font-size: 0.82rem;
	color: var(--wp--preset--color--szalwia);
	letter-spacing: 0;
	text-transform: none;
}
.eak-form .eak-form__consent input { width: auto; margin-top: 0.2em; }
.eak-form button {
	justify-self: start;
	font-family: var(--wp--preset--font-family--tekst);
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--wp--preset--color--len);
	background: var(--wp--preset--color--szmaragd);
	border: none;
	border-radius: 2px;
	padding: 1.1em 2.4em;
	cursor: pointer;
	transition: background-color var(--eak-dur) var(--eak-ease), transform var(--eak-dur) var(--eak-ease);
}
.eak-form button:hover {
	background: var(--wp--preset--color--szampan);
	color: var(--wp--preset--color--las);
	transform: translateY(-2px);
}

/* ---------- FAQ: akordeon (blok Szczegóły) ---------- */
.wp-block-details {
	border-bottom: 1px solid rgba(110, 116, 104, 0.22);
	padding: 1.4em 0;
}
.wp-block-details summary {
	font-family: var(--wp--preset--font-family--naglowek);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--szmaragd);
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1em;
	transition: color var(--eak-dur) var(--eak-ease);
}
.wp-block-details summary:hover {
	color: var(--wp--preset--color--szampan);
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--tekst);
	font-weight: 300;
	color: var(--wp--preset--color--szampan);
	font-size: 1.4em;
	line-height: 1;
	transition: transform var(--eak-dur) var(--eak-ease);
}
.wp-block-details[open] summary::after {
	content: "–";
}
.wp-block-details > *:not(summary) {
	margin-top: 1em;
	max-width: 60ch;
}

/* ---------- Ciemny szablon „List": jasna treść ---------- */
.eak-list :is(h1, h2, h3, h4) {
	color: var(--wp--preset--color--kosc);
}
.eak-list a {
	color: var(--wp--preset--color--szampan);
}
.eak-list blockquote {
	border-left-color: var(--wp--preset--color--szampan);
}

/* ---------- Stopka: linki na ciemnym tle ---------- */
.eak-footer a {
	color: var(--wp--preset--color--len);
	text-decoration: none;
	transition: color var(--eak-dur) var(--eak-ease);
}
.eak-footer a:hover,
.eak-footer a:focus {
	color: var(--wp--preset--color--szampan);
}
.eak-footer .wp-block-heading {
	margin-bottom: 0.4em;
}

/* ---------- Focus widoczny (dostępność) ---------- */
:where(a, button, .wp-block-button__link, input, textarea, select):focus-visible {
	outline: 2px solid var(--wp--preset--color--szampan);
	outline-offset: 3px;
}
