/*
Theme Name: RippedCFO Theme
Theme URI: https://rippedcfo.us/
Author: RippedCFO
Author URI: https://rippedcfo.us/
Description: RippedCFO Theme is the site chrome of the RippedCFO ecosystem: a fast, standalone theme that renders the header, navigation and footer around pages imported by the RippedCFO Templates plugin. Imported starter pages render full-bleed inside the chrome; regular pages and posts get a clean consulting layout with sidebar, featured images and comments. Follows the imported demo's brand color automatically.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rippedcfotheme
Tags: custom-logo, custom-menu, featured-images, footer-widgets, threaded-comments, translation-ready, full-width-template, custom-header, custom-background, blog, e-commerce, portfolio
*/

/*--------------------------------------------------------------
# Custom properties
--------------------------------------------------------------*/
:root {
	--rcfo-accent: #4E2C7C;       /* overridden by rcfo_st_brand_color */
	--rcfo-gold: #E7BF57;
	--rcfo-dark: #0C0417;
	--rcfo-navy: #130A20;
	--rcfo-surface: #FAF9FC;
	--rcfo-text: #1e293b;
	--rcfo-muted: #64748b;
	--rcfo-border: #e2e8f0;
	--rcfo-header-h: 72px;
	--rcfo-radius: 12px;
	--rcfo-max: 1200px;
}

/*--------------------------------------------------------------
# Reset / base
--------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--rcfo-header-h) + 12px);
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--rcfo-text);
	background: #fff;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

::selection {
	background: var(--rcfo-accent);
	color: #fff;
}

:where(a, button, input, textarea, select, [tabindex]):not(.rcfo-tpl *):focus-visible {
	outline: 2px solid var(--rcfo-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

:is(h1, h2, h3, h4, h5, h6):not(.rcfo-tpl *) {
	font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
	line-height: 1.25;
	margin: 0 0 .6em;
	font-weight: 700;
}
h1:not(.rcfo-tpl *) { font-size: 2.25rem; }
h2:not(.rcfo-tpl *) { font-size: 1.75rem; }
h3:not(.rcfo-tpl *) { font-size: 1.375rem; }

a:not(.rcfo-tpl *) { color: var(--rcfo-accent); text-decoration: none; }
a:not(.rcfo-tpl *):hover, a:not(.rcfo-tpl *):focus { text-decoration: underline; }

img:not(.rcfo-tpl *) { max-width: 100%; height: auto; }

.container {
	width: 100%;
	max-width: var(--rcfo-max);
	margin-inline: auto;
	padding-inline: 20px;
}

.screen-reader-text, .skip-link {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed;
	top: 10px; left: 10px;
	width: auto; height: auto;
	clip: auto;
	z-index: 100000;
	padding: 10px 16px;
	background: var(--rcfo-accent);
	color: #fff;
	border-radius: 6px;
}

/*--------------------------------------------------------------
# Header / navigation
--------------------------------------------------------------*/
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--rcfo-navy);
	color: #fff;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--rcfo-header-h);
}

.site-branding .custom-logo-link img {
	display: block;
	max-height: 44px;
	width: auto;
}
.site-branding .site-title {
	font-family: ui-serif, Georgia, serif;
	font-size: 1.35rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.site-branding .site-title:hover { text-decoration: none; color: var(--rcfo-gold); }

.site-nav .primary-menu {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav .primary-menu a {
	display: block;
	padding: 10px 14px;
	color: rgba(255,255,255,.82);
	font-size: .95rem;
	font-weight: 500;
	border-radius: 8px;
	transition: color .15s ease, background-color .15s ease;
}
.site-nav .primary-menu a:hover {
	background: rgba(255,255,255,.06);
}
.site-nav .primary-menu a:hover,
.site-nav .primary-menu .current-menu-item > a,
.site-nav .primary-menu .current_page_item > a {
	color: var(--rcfo-gold);
	text-decoration: none;
}
.site-nav .primary-menu .rcfo-menu-btn > a {
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
	padding: 8px 18px;
	border: 1px solid var(--rcfo-gold);
	border-radius: 9999px;
	color: var(--rcfo-gold);
	font-weight: 600;
	line-height: 1.2;
}
.site-nav .primary-menu .rcfo-menu-btn > a:hover {
	background: var(--rcfo-gold);
	border-color: var(--rcfo-gold);
	color: var(--rcfo-dark);
}

.site-nav .primary-menu .sub-menu {
	position: absolute;
	min-width: 220px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: var(--rcfo-dark);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 10px;
	box-shadow: 0 18px 40px rgba(0,0,0,.35);
	display: none;
}
.site-nav .primary-menu li { position: relative; }
.site-nav .primary-menu li:hover > .sub-menu,
.site-nav .primary-menu li.focus > .sub-menu { display: block; }

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px; height: 42px;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.15);
	border-radius: 8px;
	color: #fff;
	cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media screen and (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: absolute;
		top: 100%; left: 0; right: 0;
		background: var(--rcfo-navy);
		border-bottom: 1px solid rgba(255,255,255,.08);
		display: none;
	}
	.site-header.nav-open .site-nav { display: block; }
	.site-nav .primary-menu {
		flex-direction: column;
		align-items: stretch;
		padding: 12px 20px 20px;
	}
	.site-nav .primary-menu a { padding: 12px 14px; }
	.site-nav .primary-menu .rcfo-menu-btn { text-align: center; }
	.site-nav .primary-menu .rcfo-menu-btn > a {
		display: flex;
		justify-content: center;
		margin: 8px 0 0;
		padding-block: 12px;
	}
	.site-nav .primary-menu .sub-menu {
		position: static;
		display: block;
		border: 0;
		box-shadow: none;
		padding-left: 16px;
		background: transparent;
	}
}

/*--------------------------------------------------------------
# Page header banner
--------------------------------------------------------------*/
.page-header-banner {
	background: var(--rcfo-navy) center/cover no-repeat;
	color: #fff;
	padding: 72px 0;
}
@media screen and (max-width: 782px) {
	.page-header-banner { padding: 48px 0; }
}
.page-header-banner h1 { margin: 0; color: #fff; }
.page-header-banner .breadcrumbs {
	margin-top: 8px;
	font-size: .85rem;
	color: rgba(255,255,255,.7);
}
.page-header-banner .breadcrumbs a { color: var(--rcfo-gold); }

/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/
.site-main { flex: 1 0 auto; min-height: 40vh; }

.site-content {
	display: grid;
	grid-template-columns: minmax(0,1fr) 320px;
	gap: 48px;
	padding-block: 56px;
}
.site-content.no-sidebar { grid-template-columns: minmax(0,1fr); }
@media screen and (max-width: 900px) {
	.site-content { grid-template-columns: minmax(0,1fr); }
}

.hentry { margin-bottom: 40px; }
.entry-title { margin-bottom: 12px; }
.entry-meta {
	font-size: .85rem;
	color: var(--rcfo-muted);
	margin-bottom: 16px;
}
.entry-meta a { color: var(--rcfo-muted); }
.post-thumbnail { margin-bottom: 20px; border-radius: var(--rcfo-radius); overflow: hidden; }

.entry-content a:not(.rcfo-tpl *) { text-decoration: underline; }
.entry-content a:not(.rcfo-tpl *):hover { text-decoration: none; }
.entry-content img:not(.rcfo-tpl *) { border-radius: 8px; }

.posts-navigation, .post-navigation { margin: 32px 0; }
.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
}

.pagination .page-numbers,
.nav-links a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--rcfo-border);
	border-radius: 8px;
	background: #fff;
	color: var(--rcfo-text);
}
.pagination .page-numbers.current,
.nav-links a:hover {
	background: var(--rcfo-accent);
	border-color: var(--rcfo-accent);
	color: #fff;
	text-decoration: none;
}

/*--------------------------------------------------------------
# Sidebar / widgets
--------------------------------------------------------------*/
.widget-area .widget {
	margin-bottom: 32px;
	padding: 24px;
	background: var(--rcfo-surface);
	border: 1px solid var(--rcfo-border);
	border-radius: var(--rcfo-radius);
}
.widget-area .widget-title,
.widget-area .widgettitle {
	font-size: 1.1rem;
	margin-bottom: 14px;
}
.widget-area ul { margin: 0; padding-left: 18px; }
.widget-area li { margin-bottom: 6px; }

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
	flex-shrink: 0;
	background: var(--rcfo-dark);
	color: rgba(255,255,255,.72);
	margin-top: auto;
}
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
	padding-block: 48px;
}
.footer-widget-area .widget-title,
.footer-widget-area .widgettitle,
.footer-widget-area h1, .footer-widget-area h2,
.footer-widget-area h3, .footer-widget-area h4 {
	color: #fff;
	font-size: 1rem;
	margin-bottom: 14px;
}
.footer-widget-area a { color: var(--rcfo-gold); transition: color .15s ease; }
.footer-widget-area a:hover { color: #fff; }
.footer-widget-area ul { list-style: none; margin: 0; padding: 0; }
.footer-widget-area li { margin-bottom: 8px; }

.site-info {
	border-top: 1px solid rgba(255,255,255,.08);
	padding: 20px;
	text-align: center;
	font-size: .85rem;
}
.site-info a { color: var(--rcfo-gold); }

/*--------------------------------------------------------------
# Comments
--------------------------------------------------------------*/
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .comment-body {
	padding: 20px;
	margin-bottom: 16px;
	background: var(--rcfo-surface);
	border: 1px solid var(--rcfo-border);
	border-radius: var(--rcfo-radius);
}
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-meta { font-size: .85rem; color: var(--rcfo-muted); margin-bottom: 8px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form input[type="search"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--rcfo-border);
	border-radius: 8px;
	font: inherit;
}
.comment-form .submit,
.search-form .search-submit,
.wp-block-search__button {
	padding: 10px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--rcfo-accent);
	color: #fff;
	font: inherit;
	cursor: pointer;
}
.comment-form .submit:hover { filter: brightness(1.1); }

/*--------------------------------------------------------------
# Misc / alignment / accessibility
--------------------------------------------------------------*/
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100%; }

.wp-caption, .gallery-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--rcfo-muted); }

.sticky .entry-title::before {
	content: "\2605";
	color: var(--rcfo-gold);
	margin-right: 8px;
}
.bypostauthor { outline: none; }

.error-404 { text-align: center; padding: 80px 0; }
.error-404 h1 { font-size: 4rem; color: var(--rcfo-accent); }

.page-links { margin: 24px 0; }
.page-links a { padding: 4px 10px; border: 1px solid var(--rcfo-border); border-radius: 6px; }
