/*
Theme Name: Kaykonvo
Theme URI: https://kaykonvo.com
Author: Kaykonvo LLC
Description: Custom block theme for Kaykonvo | Alicia. Creator portfolio, brand work, email list and blog. Not a consultation, just a conversation.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kaykonvo
*/

/* ---------- Small touches theme.json can't do ---------- */

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }

/* No cream gaps between header, page and footer */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Sticky header (the <header> wrapper is what sticks) */
.kk-header-wrap { position: sticky; top: 0; z-index: 50; }
body.admin-bar .kk-header-wrap { top: 32px; }
@media (max-width: 782px) { body.admin-bar .kk-header-wrap { top: 0; } }
.kk-header {
	backdrop-filter: blur(8px);
	background-color: rgba(250, 243, 232, 0.92) !important;
	border-bottom: 1px solid rgba(47, 74, 79, 0.12);
}
.wp-block-separator.is-style-wide { border-color: rgba(250, 243, 232, 0.2); opacity: 1; }

/* Little red eyebrow label above headings */
.kk-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
	font-size: 0.78rem !important;
}

/* Hero photo frame: offset red block behind the photo */
.kk-photo-frame { position: relative; }
.kk-photo-frame img {
	border-radius: 24px;
	box-shadow: 14px 14px 0 0 var(--wp--preset--color--signature-red);
	aspect-ratio: 4 / 5;
	object-position: 50% 30%;
	object-fit: cover;
	width: 100%;
}

/* Stat tiles */
.kk-stat {
	border-radius: 18px;
	height: 100%;
}
.kk-stat .kk-stat-num {
	font-family: var(--wp--preset--font-family--display);
	line-height: 1;
}

/* Phone-shaped UGC sample cards */
.kk-phone {
	aspect-ratio: 9 / 16;
	border-radius: 26px;
	border: 6px solid var(--wp--preset--color--deep-teal);
	overflow: hidden;
	display: flex !important;
	flex-direction: column;
	justify-content: flex-end;
	transition: transform .2s ease;
}
.kk-phone:hover { transform: translateY(-4px); }
.kk-phone video,
.kk-phone iframe,
.kk-phone img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Cards */
.kk-card {
	border-radius: 20px;
	height: 100%;
}

/* Blog post cards */
.kk-posts .wp-block-post-featured-image img {
	border-radius: 16px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.kk-posts .wp-block-post-title a { text-decoration: none; }
.kk-posts .wp-block-post-title a:hover { color: var(--wp--preset--color--signature-red); }

/* Brand-name chips */
.kk-chips p {
	display: inline-block;
	padding: .45em 1em;
	border-radius: 999px;
	border: 1.5px solid currentColor;
	margin: 0 !important;
}

/* Readable blog posts */
.single .wp-block-post-content a { text-underline-offset: 3px; }
.single .wp-block-post-content img { border-radius: 14px; }

/* Hero social icons */
.kk-hero-social .wp-social-link { transition: transform .15s ease; }
.kk-hero-social .wp-social-link:hover { transform: translateY(-2px); }
.kk-hero-social { margin: 0 !important; }

/* Phones: small circular photo above the headline */
@media (max-width: 781px) {
	.wp-block-columns:has(.kk-photo-frame) {
		flex-direction: column-reverse;
	}
	.kk-photo-frame {
		max-width: 170px;
		margin-left: auto !important;
		margin-right: auto !important;
	}
	/* Hide the stats strip on phones */
	.kk-stats { display: none !important; }

	/* Center the whole hero text column on phones */
	.wp-block-columns:has(.kk-photo-frame) > .wp-block-column {
		text-align: center;
	}
	.wp-block-columns:has(.kk-photo-frame) .wp-block-buttons,
	.wp-block-columns:has(.kk-photo-frame) .wp-block-group.is-layout-flex {
		justify-content: center;
	}
	.kk-photo-frame img {
		aspect-ratio: 1 / 1;
		border-radius: 50%;
		object-position: 52% 35%;
		border: 4px solid var(--wp--preset--color--warm-cream);
		box-shadow: 0 0 0 4px var(--wp--preset--color--signature-red);
	}
}
