/*
Theme Name:   ChatAI Guide
Theme URI:    https://chatai.guide/
Description:  Child theme of Blocksy for chatai.guide. Adds brand colors (Indigo / Violet / Amber), typography (DM Sans / Inter / JetBrains Mono), and the "not affiliated with OpenAI" footer disclaimer.
Author:       ChatAI Guide
Author URI:   https://chatai.guide/
Template:     blocksy
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  blocksy-child
*/

:root {
	--cg-primary: #4F46E5;
	--cg-secondary: #8B5CF6;
	--cg-accent: #F59E0B;

	--cg-font-heading: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--cg-font-body: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--cg-font-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	/* Map Blocksy palette tokens to brand colors so existing theme styles inherit them */
	--theme-palette-color-1: #4F46E5;
	--theme-palette-color-2: #8B5CF6;
	--theme-palette-color-3: #F59E0B;
}

body,
body.ct-loaded {
	font-family: var(--cg-font-body);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
	font-family: var(--cg-font-heading);
}

code, pre, kbd, samp,
.wp-block-code,
.wp-block-preformatted {
	font-family: var(--cg-font-code);
}

a { color: var(--cg-primary); }
a:hover,
a:focus { color: var(--cg-secondary); }

.cg-disclaimer {
	text-align: center;
	font-size: 12px;
	line-height: 1.5;
	color: #6b7280;
	padding: 14px 16px;
	background: #f9fafb;
	border-top: 1px solid #e5e7eb;
	font-family: var(--cg-font-body);
}
.cg-disclaimer strong { color: #374151; }

/* ------------------------------------------------------------------
   Header logo — replace Blocksy's text site-title with the SVG wordmark.
   Blocksy's default header layout renders the text site-title; this swaps
   it for our SVG wordmark while preserving the link, accessibility, and
   responsiveness. The PNG raster is the fallback for browsers without
   SVG-as-background support (effectively none in 2026).
   ------------------------------------------------------------------ */
.custom-logo,
.site-logo-container img {
	max-height: 44px;
	width: auto;
	height: auto;
}

.ct-header .site-title,
.ct-header [data-id="site-title"] .site-title {
	display: inline-block;
	font-size: 0;
	line-height: 1;
}
.ct-header .site-title a {
	display: inline-block;
	width: 200px;
	height: 44px;
	text-indent: -9999px;
	overflow: hidden;
	background-image: url('assets/logo-wordmark.svg');
	background-repeat: no-repeat;
	background-position: left center;
	background-size: contain;
}
@media (max-width: 480px) {
	.ct-header .site-title a { width: 160px; height: 36px; }
}

/* ------------------------------------------------------------------
   Front page
   ------------------------------------------------------------------ */
.cg-front {
	color: #1F2937;
}
.cg-front h1,
.cg-front h2,
.cg-front h3 {
	color: #111827;
	letter-spacing: -0.02em;
}

/* Hero */
.cg-hero {
	position: relative;
	padding: clamp(64px, 9vw, 128px) 24px;
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(245, 158, 11, 0.18), transparent 60%),
		radial-gradient(900px 600px at -10% 110%, rgba(139, 92, 246, 0.25), transparent 60%),
		linear-gradient(135deg, #4F46E5 0%, #6D28D9 55%, #8B5CF6 100%);
	color: #fff;
	overflow: hidden;
}
.cg-hero__inner {
	max-width: 980px;
	margin: 0 auto;
	text-align: center;
}
.cg-hero__eyebrow {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
	margin-bottom: 24px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.cg-hero__title {
	font-size: clamp(36px, 5.4vw, 64px);
	font-weight: 700;
	line-height: 1.05;
	margin: 0 0 20px;
	color: #fff;
}
.cg-hero__title span {
	background: linear-gradient(90deg, #FCD34D, #F59E0B);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.cg-hero__lead {
	font-size: clamp(16px, 1.4vw, 19px);
	line-height: 1.6;
	margin: 0 auto 32px;
	max-width: 720px;
	color: rgba(255, 255, 255, 0.86);
}
.cg-hero__actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 48px;
}
.cg-hero__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	max-width: 720px;
	margin: 0 auto;
	list-style: none;
	padding: 0;
}
.cg-hero__stats li {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	padding: 16px 12px;
	text-align: center;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.cg-hero__stats strong {
	display: block;
	font-family: var(--cg-font-heading);
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
}
.cg-hero__stats span {
	display: block;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.74);
	margin-top: 4px;
}

/* Buttons */
.cg-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 10px;
	font-family: var(--cg-font-heading);
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	text-decoration: none;
	transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	border: 1px solid transparent;
}
.cg-btn--primary {
	background: #fff;
	color: var(--cg-primary);
}
.cg-btn--primary:hover {
	background: #FEF3C7;
	color: var(--cg-primary);
	transform: translateY(-1px);
}
.cg-btn--ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}
.cg-btn--ghost:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

/* Sections */
.cg-section {
	padding: clamp(56px, 7vw, 96px) 24px;
	max-width: 1200px;
	margin: 0 auto;
}
.cg-section--alt {
	background: #F9FAFB;
	max-width: none;
	margin: 0;
}
.cg-section--alt > * {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}
.cg-section__head {
	text-align: center;
	margin-bottom: 48px;
}
.cg-section__head h2 {
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 700;
	margin: 0 0 12px;
}
.cg-section__head p {
	font-size: 17px;
	color: #4B5563;
	max-width: 640px;
	margin: 0 auto;
}

/* Cards grid */
.cg-grid {
	display: grid;
	gap: 20px;
}
.cg-grid--cards {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.cg-card {
	display: flex;
	flex-direction: column;
	padding: 24px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid #E5E7EB;
	color: inherit;
	text-decoration: none;
	transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
	min-height: 180px;
}
.cg-card:hover {
	transform: translateY(-3px);
	border-color: var(--cg-primary);
	box-shadow: 0 12px 30px -12px rgba(79, 70, 229, 0.28);
	color: inherit;
}
.cg-card--featured {
	border-color: rgba(79, 70, 229, 0.35);
	background: linear-gradient(180deg, #fff 0%, #F5F3FF 100%);
}
.cg-card__title {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 600;
	color: #111827;
}
.cg-card__desc {
	margin: 0 0 16px;
	font-size: 14.5px;
	line-height: 1.55;
	color: #4B5563;
	flex: 1;
}
.cg-card__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	font-weight: 500;
	color: var(--cg-primary);
}
.cg-card__arrow {
	transition: transform 0.18s ease;
}
.cg-card:hover .cg-card__arrow {
	transform: translateX(4px);
}

/* Posts grid */
.cg-grid--posts {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.cg-post {
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #E5E7EB;
	display: flex;
	flex-direction: column;
}
.cg-post__thumb img {
	width: 100%;
	height: auto;
	display: block;
}
.cg-post__body {
	padding: 20px;
}
.cg-post__cat {
	display: inline-block;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cg-primary);
	text-decoration: none;
}
.cg-post__title {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.35;
}
.cg-post__title a {
	color: #111827;
	text-decoration: none;
}
.cg-post__title a:hover { color: var(--cg-primary); }
.cg-post__date {
	margin: 0;
	font-size: 13px;
	color: #6B7280;
}

.cg-empty {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
	padding: 32px 24px;
	background: #fff;
	border-radius: 14px;
	border: 1px dashed #E5E7EB;
	color: #4B5563;
}

/* Final CTA */
.cg-cta {
	padding: clamp(56px, 7vw, 96px) 24px;
	background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
	color: #fff;
}
.cg-cta__inner {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
}
.cg-cta h2 {
	font-size: clamp(28px, 3.4vw, 40px);
	color: #fff;
	margin: 0 0 12px;
}
.cg-cta p {
	font-size: 17px;
	color: #D1D5DB;
	margin: 0 0 28px;
}
.cg-cta .cg-btn--primary {
	background: var(--cg-accent);
	color: #111827;
}
.cg-cta .cg-btn--primary:hover {
	background: #FBBF24;
	color: #111827;
}

/* Mobile tweaks */
@media (max-width: 600px) {
	.cg-hero__stats { grid-template-columns: 1fr; }
}
