/*
Theme Name: HaveCreator
Theme URI: https://blog.havecreator.com
Description: blog.havecreator.com in the havecreator.com look: Geist + Instrument Serif, blue/red glass. Child of Twenty Twenty-Five.
Author: HaveCreator
Template: twentytwentyfive
Version: 1.1.1
Requires at least: 6.7
Text Domain: havecreator
*/

/* Brand tokens, same values as app/globals.css on havecreator.com */
:root {
	--hc-primary: #2c62d7;
	--hc-accent: #c2272d;
	--hc-ink: #101e3b;
	--hc-muted: #586478;
	--hc-line: #dbe2eb;
	--hc-card: #ffffff;
	--hc-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--hc-shadow: 0 12px 32px -16px color-mix(in srgb, var(--hc-primary) 32%, transparent);
}

/* Page background: the main site's two soft orbs, on a fixed layer so scrolling never repaints them. */
body { background: #fafcfe; -webkit-font-smoothing: antialiased; }
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(60rem 30rem at 0% 0%, #e5efff, transparent 70%),
		radial-gradient(60rem 30rem at 100% 100%, #ffebea, transparent 70%);
}

/* ---------- Logo (same as components/Logo.tsx) ---------- */
.hc-logo { display: inline-flex; align-items: baseline; gap: .5rem; text-decoration: none; }
.hc-logo-word {
	display: inline-flex;
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1;
	font-size: 1.25rem;
	filter: drop-shadow(0 1px 0 rgb(255 255 255 / .75));
}
.hc-have, .hc-creator { -webkit-background-clip: text; background-clip: text; color: transparent; }
.hc-have { background-image: linear-gradient(180deg, #5d8ff7 0%, #2c62d7 55%, #2251bd 100%); }
.hc-creator { background-image: linear-gradient(180deg, #e0494f 0%, #c2272d 55%, #a51e24 100%); }
.hc-logo-tag {
	font-size: .75rem;
	font-weight: 600;
	color: var(--hc-muted);
	padding: .2rem .55rem;
	border: 1px solid var(--hc-line);
	border-radius: 999px;
	background: #fff9;
}

/* ---------- Glass ---------- */
.hc-glass {
	background: linear-gradient(180deg, rgb(255 255 255 / .42), rgb(255 255 255 / 0) 38%), color-mix(in srgb, var(--hc-card) 68%, transparent);
	border: 1px solid color-mix(in srgb, #fff 72%, transparent);
	box-shadow: inset 0 1px 0 #ffffffb3, var(--hc-shadow);
}

/* ---------- Header: floating glass pill ---------- */
.hc-header-wrap { position: sticky; top: 0; z-index: 100; }
.hc-header { padding: .75rem 1rem 0; }
.admin-bar .hc-header-wrap { top: var(--wp-admin--admin-bar--height, 32px); }
.hc-header-bar {
	max-width: 1120px;
	margin: 0 auto;
	border-radius: 999px;
	padding: .55rem .6rem .55rem 1.25rem !important;
	background: color-mix(in srgb, #fff 62%, transparent);
	-webkit-backdrop-filter: blur(16px) saturate(165%);
	backdrop-filter: blur(16px) saturate(165%);
	border: 1px solid color-mix(in srgb, #fff 70%, transparent);
	box-shadow: inset 0 1px 0 #ffffffb3, 0 12px 32px -16px color-mix(in srgb, var(--hc-primary) 35%, transparent);
}
.hc-nav { display: flex; gap: .1rem; }
.hc-nav a { font-size: .9rem; font-weight: 500; color: var(--hc-ink) !important; text-decoration: none; padding: .45rem .75rem; border-radius: 999px; transition: background .2s; }
.hc-nav a:hover { background: #e5efff; color: var(--hc-primary) !important; }
.hc-cta .wp-block-button__link {
	background: linear-gradient(110deg, #d02c2a, #ac1635 50%, #d02c2a) !important;
	color: #fff !important;
	font-size: .875rem;
	font-weight: 600;
	padding: .6rem 1.1rem;
	border-radius: 999px;
	box-shadow: 0 8px 20px -10px #c2272d;
	transition: transform .3s var(--hc-ease), box-shadow .3s;
}
.hc-cta .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -10px #c2272d; }
@media (max-width: 781px) {
	.hc-nav { display: none !important; }
	.hc-header-bar { padding-left: 1rem !important; }
}

/* ---------- Home hero ---------- */
.hc-eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--hc-primary); }
.hc-serif { font-family: var(--wp--preset--font-family--instrument-serif); font-weight: 400; letter-spacing: 0; color: var(--hc-primary); }
.hc-hero h1 { text-wrap: balance; }
.hc-hero p { text-wrap: pretty; }

/* Category chips */
.hc-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.hc-chips li a {
	display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem;
	border-radius: 999px; font-size: .9rem; font-weight: 500; text-decoration: none; color: var(--hc-ink);
	background: #fffa; border: 1px solid var(--hc-line); transition: border-color .2s, color .2s, background .2s;
}
.hc-chips li a:hover { border-color: var(--hc-primary); color: var(--hc-primary); background: #fff; }
.hc-chips li.current-cat a { background: var(--hc-ink); color: #fff; border-color: var(--hc-ink); }

/* ---------- Post cards ---------- */
.hc-grid .wp-block-post { display: flex; }
.hc-card {
	width: 100%;
	border-radius: 24px;
	padding: .6rem .6rem 1.25rem !important;
	transition: transform .5s var(--hc-ease), box-shadow .5s var(--hc-ease);
	position: relative;
}
.hc-card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 #ffffffb3, 0 24px 48px -20px color-mix(in srgb, var(--hc-primary) 45%, transparent); }
.hc-card .wp-block-post-featured-image, .hc-cover { margin: 0 0 1rem; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; }
.hc-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--hc-ease); }
.hc-card:hover .wp-block-post-featured-image img { transform: scale(1.03); }
.hc-card > :not(.wp-block-post-featured-image):not(.hc-cover) { padding-inline: .75rem; }
.hc-card .wp-block-post-title a { text-decoration: none; color: var(--hc-ink); }
/* The whole card is the link */
.hc-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
.hc-card .wp-block-post-terms { position: relative; z-index: 1; }

/* Cover for posts without a featured image: brand gradient + category word */
.hc-cover { display: flex; align-items: flex-end; padding: 1.1rem 1.25rem; color: #fff; font-family: var(--wp--preset--font-family--instrument-serif); font-size: 2rem; line-height: 1; }
.hc-cover-1 { background: radial-gradient(110% 90% at 88% 8%, #c8e1fb, transparent 50%), linear-gradient(160deg, #2c62d7, #102c84); }
.hc-cover-2 { background: radial-gradient(110% 90% at 12% 0%, #ffffff8c, transparent 45%), linear-gradient(160deg, #c2272d, #86101f); }
.hc-cover-3 { background: linear-gradient(135deg, #102c84, #2c62d7 80%, #fafcfe 80% 83%, #c2272d 83%); }
.hc-cover-4 { background: linear-gradient(135deg, #86101f, #c2272d 80%, #fafcfe 80% 83%, #2c62d7 83%); }

/* Term pills */
.hc-terms a {
	display: inline-block; font-size: .75rem; font-weight: 600; text-decoration: none;
	color: var(--hc-primary); background: #e5efff; padding: .2rem .6rem; border-radius: 999px; margin-right: .25rem;
}
.hc-terms .wp-block-post-terms__separator { display: none; }

/* Pagination */
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers {
	display: inline-flex; min-width: 2.5rem; min-height: 2.5rem; align-items: center; justify-content: center;
	border-radius: 999px; text-decoration: none; padding: 0 .9rem; background: #fffa; border: 1px solid var(--hc-line);
}
.wp-block-query-pagination .page-numbers.current { background: var(--hc-ink); color: #fff; border-color: var(--hc-ink); }

/* ---------- Single post ---------- */
.hc-article-head h1 { text-wrap: balance; }
.hc-dek { text-wrap: pretty; }
.hc-feature img { border-radius: 24px; box-shadow: var(--hc-shadow); }
.hc-prose { font-size: 1.125rem; line-height: 1.75; }
.hc-prose > * + * { margin-block-start: 1.15em; }
.hc-prose h2 { font-size: 1.6rem; margin-block-start: 2.2em; letter-spacing: -0.02em; }
.hc-prose h3 { font-size: 1.25rem; margin-block-start: 1.8em; }
.hc-prose ul, .hc-prose ol { padding-left: 1.25em; }
.hc-prose li + li { margin-top: .4em; }
.hc-prose li::marker { color: var(--hc-primary); }
.hc-prose a { color: var(--hc-primary); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.hc-prose strong { color: var(--hc-ink); }
.hc-prose blockquote { border-left: 3px solid var(--hc-accent); margin-left: 0; padding-left: 1.25rem; color: var(--hc-ink); }

/* End-of-article call to action */
.hc-end-cta { border-radius: 28px; text-align: center; }
.hc-btn-blue .wp-block-button__link { background: var(--hc-primary) !important; color: #fff !important; border-radius: 999px; font-weight: 600; }
.hc-btn-red .wp-block-button__link { background: linear-gradient(110deg, #d02c2a, #ac1635 50%, #d02c2a) !important; color: #fff !important; border-radius: 999px; font-weight: 600; }
.hc-btn-blue .wp-block-button__link, .hc-btn-red .wp-block-button__link { transition: transform .3s var(--hc-ease); }
.hc-btn-blue .wp-block-button__link:hover, .hc-btn-red .wp-block-button__link:hover { transform: translateY(-2px); }

.hc-postnav a { text-decoration: none; color: var(--hc-ink); font-weight: 600; }
.hc-postnav a:hover { color: var(--hc-primary); }

/* ---------- Footer ---------- */
.hc-footer { border-top: 1px solid color-mix(in srgb, #fff 72%, transparent); }
.hc-footer a { color: color-mix(in srgb, var(--hc-ink) 80%, transparent); text-decoration: none; }
.hc-footer a:hover { color: var(--hc-primary); }
.hc-footer-links, .hc-footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; }
.hc-footer-legal a { color: var(--hc-muted); }

/* ---------- Motion ---------- */
/* Reading progress on articles: a thin brand bar driven by page scroll, no JS. */
.hc-progress { display: none; }
@supports (animation-timeline: scroll()) {
	.single .hc-progress {
		display: block; position: fixed; inset: 0 0 auto; height: 3px; z-index: 200;
		background: linear-gradient(90deg, #2c62d7, #c8e1fb 50%, #c2272d);
		transform-origin: 0 50%; animation: hc-grow linear both; animation-timeline: scroll(root);
	}
	.admin-bar.single .hc-progress { top: var(--wp-admin--admin-bar--height, 32px); }
	@keyframes hc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* Cards rise into place as they scroll in; hero lines settle on load. */
@media (prefers-reduced-motion: no-preference) {
	.hc-hero > * { animation: hc-in .9s var(--hc-ease) both; }
	.hc-hero > :nth-child(2) { animation-delay: .08s; }
	.hc-hero > :nth-child(3) { animation-delay: .16s; }
	.hc-hero > :nth-child(4) { animation-delay: .24s; }
	.hc-article-head > * { animation: hc-in .9s var(--hc-ease) both; }
	.hc-article-head > :nth-child(2) { animation-delay: .06s; }
	.hc-article-head > :nth-child(3) { animation-delay: .12s; }
	.hc-feature { animation: hc-in 1s var(--hc-ease) .18s both; }
	@keyframes hc-in { from { opacity: 0; transform: translateY(14px); } }

	@supports (animation-timeline: view()) {
		.hc-grid .hc-card { animation: hc-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
		@keyframes hc-rise { from { opacity: .35; transform: translateY(28px) scale(.98); } }
	}
}

/* Each post opens with a one-line summary: show it as the lead. */
.hc-prose > p:first-child { font-size: 1.3rem; line-height: 1.55; color: var(--hc-ink); }
.hc-footer { margin-top: 5rem; border-radius: 0; border-inline: 0; border-bottom: 0; }
.hc-eyebrow a { color: inherit; text-decoration: none; }
.hc-end-cta .wp-block-button__link { font-size: 1rem; padding: .75rem 1.4rem; }
.hc-cover { flex-direction: column; justify-content: space-between; align-items: flex-start; }
.hc-cover-mark { font-family: var(--wp--preset--font-family--geist); font-weight: 800; font-size: .85rem; letter-spacing: -0.02em; opacity: .9; }
.hc-postnav { gap: 1rem; font-size: .95rem; }
.hc-hero .hc-chips { margin-top: 1.75rem !important; }
.hc-ai-note { font-size: .85rem; color: var(--hc-muted); border-top: 1px solid var(--hc-line); padding-top: 1rem; }
.hc-ai-note a { color: var(--hc-primary); }

/* Share links + related articles (shortcodes in functions.php) */
.hc-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2.5rem; font-size: .9rem; }
.hc-share span { font-weight: 600; color: var(--hc-muted); margin-right: .25rem; }
.hc-share a, .hc-share button { font: inherit; font-weight: 600; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--hc-line); background: #ffffffb3; color: var(--hc-ink); text-decoration: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.hc-share a:hover, .hc-share button:hover { border-color: var(--hc-primary); color: var(--hc-primary); }
.hc-related { box-sizing: border-box; max-width: 1120px; margin: 4rem auto 0 !important; padding-inline: 1rem; }
.hc-related h2 { font-size: 1.6rem; margin: 0 0 1.25rem; }
.hc-related-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem; }
.hc-related-grid .hc-card { padding-bottom: 1rem; }
.hc-related-grid .wp-block-post-title { font-size: 1.15rem; margin: 0; }
