/*
Theme Name: GeneratePress Premium Child
Theme URI: https://generatepress.com
Description: A refined, editorial child theme for GeneratePress. Uses only the colors already in your GeneratePress palette. Adds a category-sectioned homepage (General News, Entertainment, Biographies) and a footer menu.
Author: Custom
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gpp
*/

/* ==========================================================================
   Tokens – derived only from the existing GeneratePress global colors
   ========================================================================== */
:root {
	--gpp-radius: 14px;
	--gpp-radius-sm: 8px;
	--gpp-line: color-mix(in srgb, var(--contrast, #222) 12%, transparent);
	--gpp-shadow: 0 1px 2px color-mix(in srgb, var(--contrast, #222) 8%, transparent),
	              0 8px 24px color-mix(in srgb, var(--contrast, #222) 8%, transparent);
	--gpp-shadow-lg: 0 2px 4px color-mix(in srgb, var(--contrast, #222) 10%, transparent),
	                 0 16px 40px color-mix(in srgb, var(--contrast, #222) 14%, transparent);
	--gpp-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
	--gpp-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
html { scroll-behavior: smooth; }
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	line-height: 1.7;
}
::selection { background: var(--accent); color: var(--base-3); }

h1, h2, h3, h4,
.entry-title,
.main-title,
.widget-title {
	font-family: var(--gpp-serif);
	letter-spacing: -.015em;
}
h1, h2, h3 { line-height: 1.2; }

a { transition: color .2s var(--gpp-ease), background-color .2s var(--gpp-ease), box-shadow .2s var(--gpp-ease), transform .2s var(--gpp-ease); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

img { border-radius: var(--gpp-radius-sm); }

/* Reading progress */
#gpp-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999;
	background: var(--accent);
	transform: scaleX(0); transform-origin: 0 50%;
	will-change: transform;
}

/* ==========================================================================
   Header & navigation
   ========================================================================== */
.site-header {
	background: var(--base-3);
	border-bottom: 1px solid var(--gpp-line);
}
.inside-header { padding-top: 28px; padding-bottom: 28px; }
.main-title {
	font-family: var(--gpp-serif);
	font-weight: 700;
	letter-spacing: -.03em;
}
.main-title a, .main-title a:hover { color: var(--contrast); }
.site-description { color: var(--contrast-2); font-size: .9rem; letter-spacing: .02em; }

.main-navigation {
	background: var(--base-3);
	border-bottom: 1px solid var(--gpp-line);
	box-shadow: 0 6px 18px -14px color-mix(in srgb, var(--contrast, #222) 30%, transparent);
}
.main-navigation .main-nav ul li a {
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	position: relative;
}
.main-navigation .main-nav > ul > li > a::after {
	content: "";
	position: absolute; left: 20px; right: 20px; bottom: 14px; height: 2px;
	background: var(--accent);
	transform: scaleX(0); transform-origin: 0 50%;
	transition: transform .3s var(--gpp-ease);
}
.main-navigation .main-nav > ul > li:hover > a::after,
.main-navigation .main-nav > ul > li.current-menu-item > a::after,
.main-navigation .main-nav > ul > li.current-menu-ancestor > a::after { transform: scaleX(1); }
.main-navigation .main-nav ul ul {
	border-radius: 0 0 var(--gpp-radius-sm) var(--gpp-radius-sm);
	box-shadow: var(--gpp-shadow-lg);
}

/* ==========================================================================
   Homepage sections
   ========================================================================== */
.gpp-home { padding: 8px 0 24px; }

.gpp-jump {
	display: flex; flex-wrap: wrap; gap: 10px;
	margin: 0 0 8px;
}
.gpp-jump a {
	padding: 8px 18px;
	border: 1px solid var(--gpp-line);
	border-radius: 999px;
	background: var(--base-3);
	color: var(--contrast);
	font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	text-decoration: none;
}
.gpp-jump a:hover { background: var(--accent); border-color: var(--accent); color: var(--base-3); }

.gpp-section { margin: 56px 0 0; scroll-margin-top: 24px; }

.gpp-section-head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
	padding-bottom: 14px; margin-bottom: 28px;
	border-bottom: 1px solid var(--gpp-line);
	position: relative;
}
.gpp-section-head::after {
	content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px;
	background: var(--accent); border-radius: 3px;
}
.gpp-section-head h2 {
	margin: 0; font-size: clamp(1.6rem, 2.4vw, 2.2rem); color: var(--contrast);
}
.gpp-viewall {
	font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	color: var(--accent); text-decoration: none; white-space: nowrap;
}
.gpp-viewall:hover { color: var(--contrast); }
.gpp-viewall span { display: inline-block; transition: transform .25s var(--gpp-ease); }
.gpp-viewall:hover span { transform: translateX(4px); }

.gpp-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: 36px;
	align-items: start;
}

/* Media */
.gpp-media {
	display: block; position: relative; overflow: hidden;
	border-radius: var(--gpp-radius);
	background: var(--base);
	aspect-ratio: 3 / 2;
}
.gpp-media img {
	width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0;
	transition: transform .6s var(--gpp-ease);
}
.gpp-lead:hover .gpp-media img,
.gpp-item:hover .gpp-media img { transform: scale(1.05); }
.gpp-media--empty::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(135deg, var(--base) 0%, var(--base-2) 100%);
}

/* Lead story */
.gpp-lead { background: var(--base-3); border-radius: var(--gpp-radius); }
.gpp-lead .gpp-media { box-shadow: var(--gpp-shadow); }
.gpp-lead .gpp-body { padding: 22px 4px 0; }
.gpp-kicker {
	display: inline-block; margin-bottom: 10px;
	font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	color: var(--accent);
}
.gpp-title { margin: 0 0 10px; font-size: 1.15rem; line-height: 1.3; }
.gpp-lead .gpp-title { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.gpp-title a { color: var(--contrast); text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .35s var(--gpp-ease), color .2s; }
.gpp-title a:hover { color: var(--contrast); background-size: 100% 2px; }
.gpp-excerpt { margin: 0 0 14px; color: var(--contrast-2); font-size: 1rem; }
.gpp-meta {
	display: flex; flex-wrap: wrap; gap: 6px 14px;
	font-size: .78rem; color: var(--contrast-3); letter-spacing: .03em;
}
.gpp-meta span + span::before, .gpp-meta time + span::before { content: "·"; margin-right: 14px; }
.gpp-meta { color: var(--contrast-2); }

/* Compact list */
.gpp-list { display: flex; flex-direction: column; }
.gpp-item {
	display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 18px; align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid var(--gpp-line);
}
.gpp-item:first-child { padding-top: 0; }
.gpp-item:last-child { border-bottom: 0; padding-bottom: 0; }
.gpp-item .gpp-media { border-radius: var(--gpp-radius-sm); aspect-ratio: 4 / 3; }
.gpp-item .gpp-title { margin-bottom: 8px; font-size: 1.05rem; }

.gpp-note {
	padding: 18px 22px; border: 1px dashed var(--gpp-line); border-radius: var(--gpp-radius-sm);
	color: var(--contrast-2); background: var(--base-3);
}

/* ==========================================================================
   Archive / blog cards
   ========================================================================== */
.blog .site-main > article .inside-article,
.archive .site-main > article .inside-article,
.search .site-main > article .inside-article {
	border-radius: var(--gpp-radius);
	box-shadow: var(--gpp-shadow);
	transition: transform .3s var(--gpp-ease), box-shadow .3s var(--gpp-ease);
	overflow: hidden;
}
.blog .site-main > article:hover .inside-article,
.archive .site-main > article:hover .inside-article,
.search .site-main > article:hover .inside-article {
	transform: translateY(-3px);
	box-shadow: var(--gpp-shadow-lg);
}
.blog .site-main > article, .archive .site-main > article, .search .site-main > article { margin-bottom: 28px; }
.page-header { margin-bottom: 28px; }
.page-header .page-title { font-family: var(--gpp-serif); }

.entry-title a { color: var(--contrast); text-decoration: none; }
.entry-title a:hover { color: var(--accent); }
.entry-meta, .entry-meta a { color: var(--contrast-2); font-size: .82rem; letter-spacing: .02em; }
.post-image img, .featured-image img { border-radius: var(--gpp-radius); width: 100%; }
.read-more, .more-link { font-weight: 600; }

/* ==========================================================================
   Single posts & pages
   ========================================================================== */
.single .inside-article, .page .inside-article {
	border-radius: var(--gpp-radius);
	box-shadow: var(--gpp-shadow);
}
.single .entry-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; }
.single .entry-content, .page .entry-content { font-size: 1.125rem; line-height: 1.8; }
.entry-content > p:first-of-type { font-size: 1.22rem; color: var(--contrast); }
.entry-content h2, .entry-content h3 { margin-top: 2em; }
.entry-content a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
blockquote {
	margin-left: 0; padding: 4px 0 4px 26px;
	border-left: 3px solid var(--accent);
	font-family: var(--gpp-serif); font-size: 1.25rem; font-style: italic; color: var(--contrast);
}
.entry-content img, .wp-block-image img { border-radius: var(--gpp-radius); }
.entry-meta .cat-links a, .cat-links a {
	font-weight: 600; text-decoration: none; color: var(--accent);
}
footer.entry-meta { border-top: 1px solid var(--gpp-line); padding-top: 18px; margin-top: 36px; }

.post-navigation, .paging-navigation { margin-top: 28px; }
.nav-links .page-numbers, .paging-navigation a {
	padding: 8px 14px; border-radius: var(--gpp-radius-sm);
}
.nav-links .page-numbers.current { background: var(--accent); color: var(--base-3); }

.gpp-single-image { margin: 0 0 32px; }
.gpp-single-image img {
	display: block; width: 100%; height: auto;
	border-radius: var(--gpp-radius);
	box-shadow: var(--gpp-shadow);
}
.gpp-single-image figcaption {
	margin-top: 10px; font-size: .85rem; color: var(--contrast-2); text-align: center;
}

/* ==========================================================================
   Sidebar & widgets
   ========================================================================== */
.sidebar .widget, .footer-widgets .widget {
	border-radius: var(--gpp-radius);
}
.sidebar .widget { box-shadow: var(--gpp-shadow); }
.widget-title {
	font-size: 1.05rem; padding-bottom: 12px; margin-bottom: 18px;
	border-bottom: 1px solid var(--gpp-line); position: relative;
}
.widget-title::after {
	content: ""; position: absolute; left: 0; bottom: -1px; width: 40px; height: 2px; background: var(--accent);
}
.widget ul li { padding: 6px 0; }
.widget a { text-decoration: none; }

/* ==========================================================================
   Forms & buttons
   ========================================================================== */
button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.wp-block-button__link:not(.has-background) {
	border-radius: 999px;
	padding: 12px 26px;
	font-weight: 600; letter-spacing: .03em;
	transition: background-color .2s var(--gpp-ease), transform .2s var(--gpp-ease), box-shadow .2s var(--gpp-ease);
}
button:hover, input[type="submit"]:hover, a.button:hover { transform: translateY(-1px); box-shadow: var(--gpp-shadow); }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], textarea, select {
	border: 1px solid var(--gpp-line);
	border-radius: var(--gpp-radius-sm);
	padding: 12px 16px;
	transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #1e73be) 20%, transparent);
	outline: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--contrast); color: var(--base-3); }
.site-footer a { color: var(--base-3); text-decoration: none; }
.site-footer a:hover { color: var(--contrast-3); }
.footer-widgets { background: var(--contrast); color: var(--base); border-bottom: 1px solid color-mix(in srgb, var(--base-3, #fff) 14%, transparent); }
.footer-widgets .widget-title { color: var(--base-3); border-color: color-mix(in srgb, var(--base-3, #fff) 18%, transparent); }
.footer-widgets a { color: var(--base); }
.footer-widgets a:hover { color: var(--contrast-3); }

.site-footer .site-info { background: var(--contrast); color: var(--contrast-3); text-align: center; }
.site-footer .site-info .inside-site-info {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 0; padding: 0 20px 36px; text-align: center;
}
.site-footer .site-info .footer-bar { display: none; }
.site-footer .site-info .copyright-bar {
	order: 2 !important; width: 100%; max-width: 760px;
	margin: 0 auto !important; padding-top: 22px;
	text-align: center !important;
	border-top: 1px solid color-mix(in srgb, var(--base-3, #fff) 14%, transparent);
}
.site-footer .site-info .gpp-footer-top { order: 1; width: 100%; }
.gpp-footer-top { padding: 44px 0 28px; text-align: center; }
.gpp-footer-nav { margin-top: 0; }
.gpp-footer-menu {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 34px;
}
.gpp-footer-menu li { margin: 0; }
.gpp-footer-menu a {
	font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
	color: var(--base-3); padding: 4px 0; position: relative;
}
.gpp-footer-menu a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--base-3);
	transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--gpp-ease);
}
.gpp-footer-menu a:hover { color: var(--base-3); }
.gpp-footer-menu a:hover::after { transform: scaleX(1); }
.copyright-bar { font-size: .85rem; color: var(--contrast-3); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
	.gpp-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.gpp-section { margin-top: 44px; }
}
@media (max-width: 600px) {
	.gpp-item { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
	.gpp-section-head { align-items: center; }
	.gpp-footer-menu { gap: 8px 22px; }
	.inside-header { padding-top: 20px; padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
