/*
Theme Name: Portfellide valss
Theme URI: https://portfellidevalss.ee
Author: MTÜ Riigiteaduste Selts
Description: Lauamängu „Portfellide valss“ veebipoe teema. Kujundus põhineb Inger Karjuse mängukujundusel.
Version: 0.4.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portfellide-valss
*/

/* ---------------------------------------------------------------
   Värvid, fondid ja põhitüpograafia on theme.json-is.
   Siin on ainult komponendid, mida plokiseaded ei kata:
   kaardi nurgaklambrid, rombimuster, kaardilehvik, punane joon jm.
   --------------------------------------------------------------- */
:root {
	--pv-paper: var(--wp--preset--color--paper);
	--pv-surface: var(--wp--preset--color--surface);
	--pv-ink: var(--wp--preset--color--ink);
	--pv-black: var(--wp--preset--color--black);
	--pv-muted: var(--wp--preset--color--muted);
	--pv-rule: var(--wp--preset--color--rule);
	--pv-burnt: var(--wp--preset--color--burnt);
	--pv-accent: var(--wp--preset--color--accent-ink);
	--pv-honey: var(--wp--preset--color--honey);
	--pv-lilac: var(--wp--preset--color--lilac);
	--pv-redline: var(--wp--preset--color--redline);
	--pv-display: var(--wp--preset--font-family--display);
	--pv-body: var(--wp--preset--font-family--body);
	--pv-sec: clamp(56px, 9vw, 104px);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--pv-honey); outline-offset: 3px; }

.wp-site-blocks > * { margin-block-start: 0; }
.pv-main > *,
.pv-main > * + * { margin-block-start: 0; }

.c-green { --c: var(--wp--preset--color--green); }
.c-blue { --c: var(--wp--preset--color--blue); }
.c-burnt { --c: var(--wp--preset--color--burnt); }
.c-honey { --c: var(--wp--preset--color--honey); }
.c-lilac { --c: var(--wp--preset--color--lilac); }

/* Kaardi nurgaklamber: „SÜNDMUSTEKAART ———┐“ */
.pv-tag {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.95rem;
	line-height: 1.2;
}
.pv-tag::after {
	content: "";
	flex: 1;
	min-width: 40px;
	height: 14px;
	margin-top: 0.55em;
	border-top: 3px solid currentColor;
	border-right: 3px solid currentColor;
}
.pv-muted { color: var(--pv-muted); }

.pv-sec { padding-block: var(--pv-sec); }
.pv-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }
.pv-head > * { margin: 0; max-width: 64ch; }
.pv-head > p:not(.pv-tag) { color: var(--pv-muted); font-size: 1.12rem; }
.pv-head > .pv-tag { max-width: none; }
.has-background .pv-head > p:not(.pv-tag) { color: inherit; opacity: 0.88; }

/* Päis */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	background: var(--pv-paper);
	border-bottom: 3px solid var(--pv-ink);
}
.pv-top__bar { padding-block: 12px; gap: 12px 24px; }
.pv-brand { margin: 0; }
.pv-nav { margin-left: auto; }
.pv-nav .wp-block-navigation__container { gap: 18px; }
.pv-nav a:hover { color: var(--pv-redline); }
.pv-nav .wp-block-navigation-item__content { white-space: nowrap; }
.pv-cart .wc-block-mini-cart__button {
	background: var(--pv-ink);
	color: var(--pv-paper);
	padding: 9px 14px;
	border-radius: 0;
}
.pv-cart .wc-block-mini-cart__button:hover { background: var(--pv-burnt); color: #fff; }
.pv-cart .wc-block-mini-cart__badge { background: var(--pv-lilac); color: #fff; border-color: var(--pv-ink); }
@media (max-width: 860px) {
	.pv-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
	.pv-nav .wp-block-navigation__container { flex-wrap: nowrap; font-size: 0.95rem; }
}

/* Avalehe algus */
.pv-hero { padding-block: clamp(36px, 6vw, 72px) clamp(48px, 7vw, 88px); }
.pv-hero__cols { gap: clamp(32px, 5vw, 64px); }
.pv-hero__copy > * + * { margin-block-start: 22px; }
.pv-hero__cols > .pv-hero__copy { flex-basis: 54%; }
.pv-hero .pv-hero__title {
	font-size: clamp(3.4rem, 8.2vw, 6.8rem);
	line-height: 0.86;
	overflow-wrap: normal;
	word-break: normal;
}
.pv-hero__title mark { display: block; }
.pv-lead { font-size: 1.2rem; line-height: 1.55; max-width: 60ch; }
.pv-facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.pv-facts li {
	border: 2px solid var(--pv-ink);
	padding: 3px 10px;
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pv-buy {
	background: var(--pv-surface);
	border: 3px solid var(--pv-ink);
	padding: 22px;
	display: grid;
	gap: 16px;
	max-width: 460px;
}
.pv-buy__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.pv-buy__amount {
	font-family: var(--pv-display);
	font-weight: 800;
	font-size: 3rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.pv-buy__note { color: var(--pv-muted); font-size: 0.95rem; }
.pv-buy__form { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.pv-buy__soldout { margin: 0; font-weight: 600; }
.pv-qty { display: inline-flex; border: 2px solid var(--pv-ink); }
.pv-qty__btn {
	width: 44px;
	border: 0;
	background: none;
	color: var(--pv-ink);
	font: 700 1.4rem/1 var(--pv-display);
	cursor: pointer;
}
.pv-qty__btn:hover { background: var(--wp--preset--color--tint-honey); }
.pv-qty__input {
	width: 48px;
	border: 0;
	border-inline: 2px solid var(--pv-ink);
	text-align: center;
	font: 700 1.3rem var(--pv-display);
	color: var(--pv-ink);
	background: none;
	-moz-appearance: textfield;
	appearance: textfield;
}
.pv-qty__input::-webkit-outer-spin-button,
.pv-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pv-btn { flex: 1; min-width: 180px; cursor: pointer; }
.pv-perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 0.97rem; }
.pv-perks li { display: flex; gap: 10px; align-items: baseline; }
.pv-perks li::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	background: var(--c);
	transform: translateY(1px);
}

.pv-stage { position: relative; padding: 24px 10px 10px 24px; }
.pv-stage__board { margin: 0; }
.pv-stage__board img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	transform: rotate(-3.5deg);
	box-shadow: 0 2px 0 rgba(0, 0, 0, .25), 18px 22px 0 -2px var(--pv-ink);
}
.pv-stage .pv-stage__stamp {
	position: absolute;
	top: -6px;
	left: -4px;
	width: clamp(92px, 20%, 128px);
	margin: 0;
	z-index: 2;
}
.pv-stage__stamp img {
	transform: rotate(-14deg);
	filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25));
	animation: pv-stamp 0.55s cubic-bezier(.2, .9, .3, 1.3) 0.35s both;
}
@keyframes pv-stamp {
	from { transform: rotate(-24deg) scale(1.35); }
	to { transform: rotate(-14deg) scale(1); }
}
.pv-caption {
	margin-top: 26px;
	font-family: var(--pv-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--pv-muted);
}

/* Mandaadikaardi rombimuster */
.pv-argyle {
	height: 40px;
	background-color: var(--pv-black);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 5 35 20 20 35 5 20Z' fill='%23bd5f9a'/%3E%3C/svg%3E");
	background-size: 40px 40px;
	background-repeat: repeat-x;
}

/* Sissejuhatus ja soovitus */
.pv-intro { padding-block: clamp(48px, 7vw, 84px); }
.pv-intro__big {
	font-family: var(--pv-display);
	font-weight: 600;
	font-size: clamp(1.7rem, 3.6vw, 2.6rem);
	line-height: 1.12;
	max-width: 30ch;
	text-wrap: balance;
}
.pv-intro__cols { margin-top: 28px; opacity: 0.85; gap: clamp(20px, 4vw, 40px); }
.pv-rec { padding-block: clamp(52px, 8vw, 96px); }
.pv-quote { margin: 0; }
.pv-quote p {
	font-family: var(--pv-display);
	font-weight: 600;
	font-size: clamp(1.9rem, 4.2vw, 3.1rem);
	line-height: 1.05;
	max-width: 24ch;
	text-wrap: balance;
}
.pv-quote cite { display: block; margin-top: 22px; font-style: normal; font-size: 1rem; opacity: 0.9; }
.pv-quote cite strong {
	font-family: var(--pv-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 1.15rem;
	color: var(--pv-honey);
}
.pv-portrait { position: relative; max-width: 320px; margin: 12px auto; }
.pv-portrait img { filter: grayscale(1) contrast(1.05); mix-blend-mode: luminosity; display: block; }
.pv-portrait::before,
.pv-portrait::after {
	content: "";
	position: absolute;
	width: 62%;
	height: 62%;
	border: 3px solid currentColor;
	pointer-events: none;
}
.pv-portrait::before { top: -12px; left: -12px; border-right: 0; border-bottom: 0; }
.pv-portrait::after { bottom: -12px; right: -12px; border-left: 0; border-top: 0; }

/* Mis karbis on */
.pv-decks { gap: 24px; }
.pv-deck > * + * { margin-block-start: 12px; }
.pv-fan { position: relative; aspect-ratio: 1039 / 870; margin-bottom: 6px; }
.pv-fan .wp-block-image { position: absolute; width: 84%; margin: 0; transition: transform .35s ease; }
.pv-fan .wp-block-image img {
	display: block;
	border: 1px solid rgba(0, 0, 0, .18);
	box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .55);
}
.pv-fan .wp-block-image:first-child { left: 0; top: 0; transform: rotate(-4deg); }
.pv-fan .wp-block-image:nth-child(2) { right: 0; bottom: 0; transform: rotate(3deg); }
.pv-deck:hover .pv-fan .wp-block-image:first-child { transform: rotate(-7deg) translate(-6px, -4px); }
.pv-deck:hover .pv-fan .wp-block-image:nth-child(2) { transform: rotate(5deg) translate(6px, 4px); }
.pv-fan .wp-block-image.pv-fan__ak { width: 23%; right: -2%; top: -6%; left: auto; bottom: auto; z-index: 2; transform: rotate(12deg); }
.pv-fan .pv-fan__ak img { border: 0; box-shadow: none; }
.pv-deck__head { gap: 12px; }
.pv-deck__head > * { margin: 0; }
.pv-count {
	font-family: var(--pv-display);
	font-weight: 800;
	font-size: 2.6rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.pv-mandates { margin-top: clamp(36px, 5vw, 56px); border-top: 3px solid var(--pv-ink); padding-top: 28px; }
.pv-mandates > * { margin: 0; }
.pv-mandates > * + * { margin-block-start: 14px; }
.pv-mandate-row { gap: 14px; }
.pv-mandate-row figure { margin: 0; }
.pv-mandate-row figcaption {
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	color: var(--pv-ink);
	text-align: left;
	font-size: 1rem;
}
.pv-sum {
	font-family: var(--pv-display);
	font-weight: 700;
	font-size: clamp(1.3rem, 3vw, 2rem);
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.pv-specs { margin-top: clamp(36px, 5vw, 56px); border-top: 3px solid var(--pv-ink); gap: 0 !important; }
.pv-spec { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--pv-rule); }
.pv-spec > * { margin: 0; }
.pv-spec__label {
	font-family: var(--pv-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--pv-muted);
}
.pv-spec__value {
	font-family: var(--pv-display);
	font-weight: 700;
	font-size: 1.35rem;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

/* Reeglid */
.pv-rules { border-block: 3px solid var(--pv-ink); }
.pv-steps { counter-reset: pv-step; gap: 28px 24px; }
.pv-step { counter-increment: pv-step; border-top: 6px solid var(--c); padding-top: 14px; }
.pv-step > * { margin: 0; }
.pv-step > * + * { margin-top: 8px; }
.pv-step::before {
	content: counter(pv-step);
	font-family: var(--pv-display);
	font-weight: 800;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	background: var(--c);
	color: #fff;
	margin-bottom: 8px;
}
.pv-step p,
.pv-step ul { color: var(--pv-muted); font-size: 1rem; }
.pv-step ul { padding-left: 1.1em; }

.pv-redline {
	margin-top: clamp(36px, 5vw, 56px);
	position: relative;
	display: grid;
	gap: 18px;
	justify-items: center;
	text-align: center;
	padding-block: 8px;
}
.pv-redline::before { content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 4px; background: var(--pv-redline); }
.pv-redline > * { margin: 0; position: relative; }
.pv-redline__label {
	background: var(--pv-black);
	color: #fff;
	border: 3px solid var(--pv-redline);
	font-family: var(--pv-display);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 6px 16px;
	font-size: 1.15rem;
}
.pv-redline p:not(.pv-redline__label) { font-size: 1.15rem; max-width: 52ch; }
.pv-redline strong { font-family: var(--pv-display); font-size: 1.35em; color: var(--pv-redline); }

.pv-manual { margin-top: clamp(36px, 5vw, 56px); }
.pv-manual .wp-block-columns { gap: 16px; margin-top: 18px; max-width: 640px; }
.pv-manual figure { margin: 0; }
.pv-manual img { border: 1px solid var(--pv-rule); background: #fff; }

.pv-registry { border: 3px solid var(--pv-ink); }
.pv-registry__bar {
	background: var(--pv-ink);
	color: var(--pv-paper);
	padding: 12px 18px;
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.pv-registry__bar p { margin: 0; }
.pv-registry__body { padding: clamp(24px, 4vw, 40px) 18px; }
.pv-registry__body > * { margin: 0; }
.pv-registry__body > * + * { margin-top: 12px; }
.pv-registry__title {
	font-family: var(--pv-display);
	font-weight: 700;
	font-size: 1.6rem;
	text-transform: uppercase;
	line-height: 1.05;
}

/* Nime lugu */
.pv-name { padding-top: 0; }
.pv-chekharda > * { margin: 0; }
.pv-chekharda > * + * { margin-top: 10px; }
.pv-chekharda__ru {
	font-family: var(--pv-display);
	font-weight: 800;
	font-size: clamp(2.6rem, 7vw, 5rem);
	line-height: 0.92;
	color: var(--pv-accent);
	text-transform: uppercase;
	overflow-wrap: anywhere;
}
.pv-chekharda__et {
	font-family: var(--pv-display);
	font-style: italic;
	font-weight: 600;
	font-size: 1.3rem;
	color: var(--pv-muted);
}
.pv-era { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.pv-era li {
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 4px 10px;
	background: var(--wp--preset--color--tint-honey);
}

/* Võimutants */
.pv-dance { padding-block: clamp(56px, 8vw, 100px); }
.pv-dance h2 { color: #fff; }
.pv-dancers { max-width: 340px; margin-inline: auto; transform-origin: 50% 90%; animation: pv-waltz 2.4s ease-in-out infinite; }
@keyframes pv-waltz {
	0%, 100% { transform: rotate(0deg) translateX(0); }
	33% { transform: rotate(-3.5deg) translateX(-6px); }
	66% { transform: rotate(2.5deg) translateX(5px); }
}
.pv-script > * { margin: 0; }
.pv-script .pv-who {
	font-family: var(--pv-display);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--pv-honey);
	margin-top: 18px;
}
.pv-script > .pv-who:first-child { margin-top: 0; }
.pv-script .pv-verse { font-size: 1.05rem; line-height: 1.5; max-width: 44ch; margin-top: 2px; }
.pv-script .pv-more { margin-top: 22px; }
.pv-more > p { margin: 0; }
.pv-more summary {
	cursor: pointer;
	list-style: none;
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border: 2px solid currentColor;
	padding: 8px 14px;
	width: max-content;
	max-width: 100%;
}
.pv-more summary::-webkit-details-marker { display: none; }
@media (min-width: 782px) {
	.pv-dancers { position: sticky; top: 120px; }
}

/* Meie lugu */
.pv-prose > * + * { margin-block-start: 1.05em; }
.pv-prose p { font-size: 1.08rem; max-width: 64ch; }
.pv-prose .pv-pull {
	font-family: var(--pv-display);
	font-weight: 700;
	font-size: clamp(1.6rem, 3.4vw, 2.3rem);
	line-height: 1.08;
	text-transform: uppercase;
	color: var(--pv-accent);
	max-width: 22ch;
	text-wrap: balance;
	border-top: 3px solid var(--pv-ink);
	padding-top: 16px;
}
.pv-credits > * { margin: 0; }
.pv-credits > * + * { margin-top: 14px; }
.pv-credits__art { width: 200px; }
.pv-authors { list-style: none; padding: 0; }
.pv-authors li {
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 1.3rem;
	letter-spacing: 0.02em;
	line-height: 1.15;
}
.pv-credits .pv-logos { gap: 12px; margin-top: 24px; }
.pv-logos figure {
	background: #fff;
	padding: 14px 16px;
	border: 1px solid var(--pv-rule);
	margin: 0;
	flex: 1 1 200px;
	display: grid;
	place-items: center;
}
.pv-logos img { max-height: 46px; width: auto; }

/* KKK */
.pv-faq { padding-top: 0; }
.pv-faq__list { border-top: 3px solid var(--pv-ink); }
.pv-faq__list > * { margin: 0; }
.pv-faq__list details { border-bottom: 1px solid var(--pv-rule); }
.pv-faq__list summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: baseline;
	padding-block: 16px;
	font-family: var(--pv-display);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 1.25rem;
	line-height: 1.15;
}
.pv-faq__list summary::-webkit-details-marker { display: none; }
.pv-faq__list summary::after { content: "+"; font-size: 1.6rem; line-height: 0.8; }
.pv-faq__list details[open] summary::after { content: "–"; }
.pv-faq__list details > p { margin: 0 0 18px; color: var(--pv-muted); }

/* Jalus */
.pv-foot { padding-block: 48px 40px; }
.pv-foot h3 { font-size: 1.05rem; letter-spacing: 0.08em; margin-bottom: 8px; }
.pv-foot p,
.pv-foot li { font-size: 0.97rem; }
.pv-foot a { color: inherit; }
.pv-foot a:hover { color: var(--pv-honey); }
.pv-foot__links { list-style: none; padding: 0; display: grid; gap: 4px; }
.pv-foot .pv-foot__fine {
	border-top: 1px solid rgba(255, 255, 255, .15);
	padding-top: 18px;
	margin-top: 28px;
	font-size: 0.88rem;
	opacity: 0.7;
}

/* „Peagi saadaval“ leht */
.pv-soon { min-height: calc(100vh - 40px); display: flex; flex-direction: column; justify-content: center; gap: 24px; padding-block: 48px; }
.pv-soon > * { margin: 0; }

/* Tavalised lehed (tingimused jm) */
.pv-page { padding-block: clamp(40px, 6vw, 72px) var(--pv-sec); }
.pv-page .pv-page__title { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 28px; }
.pv-page h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 1.6em; }
.pv-draft { background: var(--wp--preset--color--tint-honey); border: 2px solid var(--pv-ink); padding: 12px 14px; }

/* WooCommerce: ostukorv, kassa, kinnitus */
.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	border-radius: 0 !important;
	font-family: var(--pv-display);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-cart__totals-title {
	font-family: var(--pv-display) !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 800 !important;
}
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option { border-radius: 0 !important; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
