/*
Theme Name: Peekaloaf
Description: Storefront theme for Peekaloaf cat carriers. Child theme of Twenty Twenty-Five.
Template: twentytwentyfive
Version: 0.3.1
Text Domain: peekaloaf
*/

/* ---------- cards ---------- */
.pk-card {
	border-radius: 28px;
	overflow: hidden;
	height: 100%;
	transition: transform .18s ease, box-shadow .18s ease;
}
a.pk-card-link { text-decoration: none; }
.pk-card:has(a):hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 30px rgba(58, 42, 32, .12);
}
.pk-card h3 a { text-decoration: none; color: inherit; }
.pk-card h3 a::after { content: " →"; }

.pk-soft { border-radius: 28px; }
.pk-pill {
	display: inline-block;
	padding: .3em 1em;
	border-radius: 999px;
	font-weight: 700;
	letter-spacing: .02em;
}

/* numbered steps */
.pk-step-num {
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--fredoka);
	font-weight: 600;
	font-size: 1.2rem;
	flex: 0 0 2.6rem;
	padding: 0 !important;
	margin: 0;
	line-height: 1;
}

/* hero art */
.pk-hero-art img { width: 100%; height: auto; max-width: 520px; }

/* ---------- header ---------- */
.pk-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); background: rgba(255, 248, 238, .92); }
.pk-header .wp-block-site-title a { text-decoration: none; }
.pk-logo { display: block; flex: 0 0 auto; line-height: 0; }
.pk-logo img { display: block; height: 40px; width: auto; }
@media (max-width: 599px) { .pk-logo img { height: 32px; } }
/* keep the header on one row on small laptops; on tablets the menu takes its own centered row */
@media (max-width: 1180px) {
	.pk-logo img { height: 36px; }
	.pk-header .wp-block-navigation,
	.pk-header .wp-block-navigation__container { gap: 18px !important; }
}
@media (min-width: 600px) and (max-width: 999px) {
	.pk-header > .wp-block-group { flex-wrap: wrap !important; row-gap: 8px; }
	.pk-header .wp-block-navigation { order: 3; flex: 0 0 100%; justify-content: center; }
}
.pk-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
.pk-announce p { margin: 0; }

/* ---------- footer ---------- */
.pk-footer a { text-decoration: none; }
.pk-footer a:hover { text-decoration: underline; }

/* ---------- WooCommerce polish ---------- */
.wc-block-components-product-image img,
.wp-block-woocommerce-product-image img,
.woocommerce-product-gallery img { border-radius: 20px; }
.wc-block-components-button:not(.is-link),
.wp-block-button__link,
.wp-element-button { border-radius: 999px; }
.wc-block-mini-cart__button { padding: .4em .6em; }

/* FAQ */
.pk-faq details {
	border-bottom: 1px solid var(--wp--preset--color--accent-5);
	padding: 1rem 0;
}
.pk-faq summary { font-weight: 700; cursor: pointer; font-size: 1.1rem; }
.pk-faq details p { margin: .8rem 0 0; }

@media (max-width: 781px) {
	.pk-hero-art { order: -1; }
	.pk-hero-art img { max-width: 320px; margin: 0 auto; display: block; }
}
@media (prefers-reduced-motion: reduce) {
	.pk-card { transition: none; }
	.pk-card:has(a):hover { transform: none; }
}

/* =====================================================================
   Motion and illustration (v0.2)
   Content is only hidden for reveal effects when <html> has .pk-js,
   and everything is switched off for prefers-reduced-motion.
   ===================================================================== */

/* ---------- illustration basics ---------- */
.pk-art { display: block; width: 100%; height: auto; overflow: visible; }
.pk-art-hero { max-width: 540px; margin: 0 auto; }
.pk-art-snap { border-radius: 18px; overflow: hidden; }
.pk-art-scene { overflow: hidden; border-radius: 32px; }
.pk-art .pk-eye, .pk-art .pk-ear, .pk-art .pk-tag, .pk-art .pk-sun, .pk-icon .pk-ico-move { transform-box: fill-box; }
.pk-js .pk-art:not(.is-playing) *, .pk-js .pk-marquee:not(.is-playing) * { animation-play-state: paused !important; }

/* blinking and ear twitches, shared by every cat */
.pk-art .pk-eye { transform-origin: center; animation: pk-blink 5.2s infinite; }
.pk-art .pk-ear { transform-origin: 50% 100%; }
.pk-art .pk-ear-l { animation: pk-twitch-l 7s infinite; }
.pk-art .pk-ear-r { animation: pk-twitch-r 9s 2s infinite; }
@keyframes pk-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes pk-twitch-l { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-9deg); } 96% { transform: rotate(3deg); } }
@keyframes pk-twitch-r { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(9deg); } 95% { transform: rotate(-3deg); } }

/* ---------- hero ---------- */
.pk-hero { overflow: hidden; }
.pk-hero-title .pk-w { display: inline-block; white-space: nowrap; }
.pk-js .pk-hero-title .pk-w,
.pk-js .pk-hero-in { animation: pk-up .8s cubic-bezier(.2, .8, .2, 1) both; }
.pk-js .pk-hero-in-1 { animation-delay: .05s; }
.pk-js .pk-hero-title .pk-w:nth-child(1) { animation-delay: .15s; }
.pk-js .pk-hero-title .pk-w:nth-child(2) { animation-delay: .32s; }
.pk-js .pk-hero-title .pk-w:nth-child(3) { animation-delay: .49s; }
.pk-js .pk-hero-in-2 { animation-delay: .7s; }
.pk-js .pk-hero-in-3 { animation-delay: .85s; }
@keyframes pk-up { from { opacity: 0; transform: translateY(.7em) rotate(-1.5deg); } to { opacity: 1; transform: none; } }

.pk-js .pk-art-hero .pk-cat-rise { animation: pk-rise 1.1s cubic-bezier(.2, 1.3, .4, 1) .5s both; }
.pk-art-hero .pk-cat-bob { animation: pk-cat-bob 4.5s ease-in-out 1.8s infinite; }
.pk-js .pk-art-hero .pk-paws { animation: pk-paws .45s ease-out 1.25s both; }
.pk-art-hero .pk-tag { transform-origin: 50% 0; animation: pk-swing 3.6s ease-in-out infinite; }
.pk-art-hero .pk-blob { transform-box: fill-box; transform-origin: center; animation: pk-breathe 7s ease-in-out infinite; }
.pk-art .pk-float { animation: pk-float 6s ease-in-out infinite; }
.pk-art .pk-float-2 { animation-duration: 7.5s; animation-delay: -2s; }
.pk-art .pk-float-3 { animation-duration: 5s; animation-delay: -1s; }
@keyframes pk-rise { from { transform: translateY(120px); } to { transform: translateY(0); } }
@keyframes pk-cat-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pk-paws { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pk-swing { 0%, 100% { transform: rotate(14deg); } 50% { transform: rotate(2deg); } }
@keyframes pk-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes pk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- marquee ---------- */
.pk-marquee {
	background: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--base);
	overflow: hidden;
	padding: .9rem 0;
	font-family: var(--wp--preset--font-family--fredoka);
	font-weight: 500;
	font-size: 1.25rem;
	margin: 0 !important;
}
.pk-marquee-track { display: flex; width: max-content; animation: pk-marquee 34s linear infinite; }
.pk-marquee:hover .pk-marquee-track { animation-play-state: paused; }
.pk-marquee-set { display: flex; align-items: center; flex: none; }
.pk-marquee-item { padding: 0 1.1rem; white-space: nowrap; }
.pk-marquee-dot { color: var(--wp--preset--color--accent-1); font-size: .9em; }
@keyframes pk-marquee { to { transform: translateX(-50%); } }

/* ---------- scroll reveals ---------- */
.pk-js .pk-reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
	transition-delay: var(--pk-d, 0s);
}
.pk-js .pk-reveal.pk-reveal-zoom { transform: scale(.93); }
.pk-js .pk-reveal.is-in { opacity: 1; transform: none; }

/* ---------- icons ---------- */
.pk-icon { display: block; margin-bottom: .6rem; }
.pk-icon .pk-ico-move { transform-origin: center; }
.pk-js .is-in .pk-icon { animation: pk-pop-in .6s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--pk-d, 0s) + .15s); }
.pk-card:hover .pk-ico-move { animation: pk-wiggle .7s ease-in-out; }
@keyframes pk-pop-in { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pk-wiggle { 0%, 100% { transform: none; } 25% { transform: translateY(-3px) rotate(-6deg); } 60% { transform: translateY(1px) rotate(5deg); } }

/* ---------- scene (video stand-in) ---------- */
.pk-scene { margin: 0; border-radius: 32px; box-shadow: 0 24px 50px rgba(58, 42, 32, .14); }
.pk-art-scene .pk-pan { animation: pk-pan linear infinite; }
.pk-art-scene .pk-pan-clouds { animation-duration: 70s; }
.pk-art-scene .pk-pan-far { animation-duration: 44s; }
.pk-art-scene .pk-pan-near { animation-duration: 24s; }
.pk-art-scene .pk-pan-road { animation-duration: 7s; }
.pk-art-scene .pk-bob { animation: pk-walk .55s ease-in-out infinite alternate; }
.pk-art-scene .pk-cat-look { animation: pk-look 6s ease-in-out infinite; }
.pk-art-scene .pk-sun { transform-origin: center; animation: pk-breathe 5s ease-in-out infinite; }
.pk-art-scene .pk-leaf { animation: pk-leaf 9s linear infinite; }
.pk-art-scene .pk-leaf-2 { animation-duration: 12s; animation-delay: -5s; }
@keyframes pk-pan { to { transform: translateX(-640px); } }
@keyframes pk-walk { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes pk-look { 0%, 100% { transform: translateX(-14px); } 50% { transform: translateX(14px); } }
@keyframes pk-leaf { from { transform: translate(680px, 110px) rotate(0); } to { transform: translate(-60px, 300px) rotate(-540deg); } }

/* ---------- "which traveler" cards ---------- */
.pk-snap { box-shadow: 0 8px 22px rgba(58, 42, 32, .08); transition: transform .25s cubic-bezier(.2, 1.3, .4, 1), box-shadow .25s ease; }
.pk-stagger > :nth-child(odd) .pk-snap { transform: rotate(-1.4deg); }
.pk-stagger > :nth-child(even) .pk-snap { transform: rotate(1.2deg); }
.pk-stagger > * .pk-snap:hover { transform: rotate(0) translateY(-6px) scale(1.02); box-shadow: 0 18px 36px rgba(58, 42, 32, .14); }
.pk-snap h3 { margin-top: 1rem; }
.pk-snap .pk-snap-link a { font-weight: 800; text-decoration: none; }
.pk-snap .pk-snap-link a::after { content: " →"; display: inline-block; transition: transform .2s ease; }
.pk-snap:hover .pk-snap-link a::after { transform: translateX(4px); }
.pk-art-snap .pk-pop { transform: translateY(8px); transition: transform .6s cubic-bezier(.2, 1.4, .4, 1); }
.pk-js .pk-art-snap .pk-pop { transform: translateY(52px); }
.pk-js .is-in .pk-art-snap .pk-pop { transform: translateY(8px); transition-delay: calc(var(--pk-d, 0s) + .4s); }
.pk-js .is-in .pk-snap:hover .pk-art-snap .pk-pop { transform: translateY(-8px); transition-delay: 0s; }

/* ---------- training steps ---------- */
.pk-steps .pk-step { position: relative; margin: 0 0 1.7rem; }
.pk-steps .pk-step:last-child { margin-bottom: 0; }
.pk-steps .pk-step:not(:last-child)::after {
	content: "";
	position: absolute;
	left: calc(1.3rem - 1px);
	top: 3rem;
	bottom: -1.4rem;
	border-left: 2px dashed var(--wp--preset--color--accent-3);
	opacity: .45;
}
.pk-steps .pk-step p:last-child { margin: .35rem 0 0; }

/* ---------- small interactions ---------- */
.pk-header { transition: box-shadow .25s ease; }
.pk-header.is-scrolled { box-shadow: 0 6px 20px rgba(58, 42, 32, .08); }
.wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(58, 42, 32, .16); }
.wp-block-button__link:active { transform: translateY(0); box-shadow: none; }
.pk-banner { transition: transform .3s ease; }

@media (max-width: 781px) {
	.pk-art-hero { max-width: 330px; }
	.pk-marquee { font-size: 1.05rem; }
	.pk-stagger > * .pk-snap { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pk-art *, .pk-icon *, .pk-icon, .pk-marquee-track,
	.pk-js .pk-hero-title .pk-w, .pk-js .pk-hero-in { animation: none !important; }
	.pk-js .pk-reveal { opacity: 1; transform: none; transition: none; }
	.pk-js .pk-art-snap .pk-pop { transform: translateY(8px); transition: none; }
	.pk-marquee-track { flex-wrap: wrap; width: auto; justify-content: center; }
	.pk-marquee-set[aria-hidden="true"] { display: none; }
	.wp-block-button__link:hover { transform: none; }
}

/* Animations are not running at all (see motion.js): show the final state of everything. */
.pk-static .pk-art *, .pk-static .pk-icon, .pk-static .pk-icon *,
.pk-static .pk-hero-title .pk-w, .pk-static .pk-hero-in { animation: none !important; opacity: 1 !important; }
.pk-static .pk-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.pk-static .pk-art-snap .pk-pop { transform: translateY(8px) !important; transition: none !important; }
