/*
Theme Name: Continental
Theme URI: https://continentaljournal.com
Author: Continental Journal
Author URI: https://continentaljournal.com
Description: A fast, dependency-free block theme built for editorial news publishing. Classic newspaper typography, no page builder, no external assets.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
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: continental
Tags: news, blog, editorial, block-theme, full-site-editing, one-column, two-columns, wide-blocks, custom-colors, custom-menu, featured-images, translation-ready
*/

/* -------------------------------------------------------------------------
   1. Base
   ---------------------------------------------------------------------- */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

:where(img) {
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   2. Masthead
   ---------------------------------------------------------------------- */

.cj-topbar {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.cj-masthead .wp-block-site-title {
	line-height: 1;
}

.cj-masthead .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 800;
	letter-spacing: -0.025em;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.cj-masthead .wp-block-site-title a:hover {
	color: var(--wp--preset--color--primary);
}

.cj-masthead .wp-block-site-tagline {
	margin-block-start: 0.5rem;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast-2);
}

/* Navigation */

.cj-nav {
	font-family: var(--wp--preset--font-family--sans);
}

.cj-nav .wp-block-navigation-item__content {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	padding-block: 0.4rem;
	border-block-end: 2px solid transparent;
	transition: border-color 0.18s ease, color 0.18s ease;
}

.cj-nav .wp-block-navigation-item__content:hover,
.cj-nav .current-menu-item .wp-block-navigation-item__content {
	border-block-end-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

/* -------------------------------------------------------------------------
   3. Editorial furniture
   ---------------------------------------------------------------------- */

/* Category eyebrow above headlines */
.cj-eyebrow {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-block-end: 0.6rem;
}

.cj-eyebrow a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.cj-eyebrow a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Section headings with a rule */
.cj-section-head {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding-block-end: 0.6rem;
	border-block-end: 3px solid var(--wp--preset--color--contrast);
	font-size: 0.9375rem !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-family: var(--wp--preset--font-family--sans) !important;
}

/* Byline / timestamp row */
.cj-meta {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--contrast-2);
}

.cj-meta a {
	color: inherit;
	text-decoration: none;
}

.cj-meta a:hover {
	color: var(--wp--preset--color--primary);
}

/* -------------------------------------------------------------------------
   4. Cards & thumbnails
   ---------------------------------------------------------------------- */

.cj-thumb {
	overflow: hidden;
	margin-block-end: 0.9rem !important;
	background-color: var(--wp--preset--color--base-2);
}

.cj-thumb img {
	transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
	width: 100%;
}

.cj-card:hover .cj-thumb img {
	transform: scale(1.035);
}

.cj-card .wp-block-post-title {
	font-weight: 700;
	line-height: 1.22;
	letter-spacing: -0.012em;
	margin-block: 0 0.5rem;
}

.cj-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	background-image: linear-gradient(var(--wp--preset--color--primary), var(--wp--preset--color--primary));
	background-size: 0% 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.28s ease, color 0.2s ease;
}

.cj-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
	background-size: 100% 1px;
}

.cj-card .wp-block-post-excerpt {
	color: var(--wp--preset--color--contrast-2);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.cj-card .wp-block-post-excerpt__more-text {
	display: none;
}

/* -------------------------------------------------------------------------
   5. Lead story
   ---------------------------------------------------------------------- */

.cj-lead .wp-block-post-title {
	font-size: clamp(2rem, 1.15rem + 3.4vw, 3.5rem);
	line-height: 1.04;
	letter-spacing: -0.028em;
	font-weight: 800;
	margin-block: 0 0.75rem;
}

.cj-lead .wp-block-post-excerpt {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--wp--preset--color--contrast-2);
}

/* -------------------------------------------------------------------------
   6. Opinion strip (inverted)
   ---------------------------------------------------------------------- */

.cj-opinion .cj-section-head {
	border-block-end-color: rgba(255, 255, 255, 0.35);
	color: var(--wp--preset--color--base);
}

.cj-opinion .wp-block-post-title a,
.cj-opinion .wp-block-post-excerpt,
.cj-opinion .cj-meta {
	color: rgba(255, 255, 255, 0.92);
}

.cj-opinion .wp-block-post-title a:hover {
	color: #fff;
	background-image: linear-gradient(#fff, #fff);
}

.cj-opinion .cj-eyebrow a {
	color: #f0a3a3;
}

/* -------------------------------------------------------------------------
   7. Single article
   ---------------------------------------------------------------------- */

.cj-article-title {
	font-size: clamp(2rem, 1.3rem + 2.7vw, 3.125rem);
	line-height: 1.08;
	letter-spacing: -0.026em;
	font-weight: 800;
	margin-block: 0 0.85rem;
}

.cj-standfirst {
	font-size: 1.1875rem;
	line-height: 1.6;
	color: var(--wp--preset--color--contrast-2);
	font-weight: 400;
}

.cj-article-body p {
	font-size: 1.125rem;
	line-height: 1.78;
}

.cj-article-body h2 {
	font-size: 1.5rem;
	line-height: 1.3;
	margin-block-start: 2.2em;
	margin-block-end: 0.7em;
	letter-spacing: -0.012em;
}

.cj-article-body h3 {
	font-size: 1.25rem;
	margin-block-start: 1.8em;
	margin-block-end: 0.6em;
}

.cj-article-body a {
	color: var(--wp--preset--color--primary);
	text-underline-offset: 3px;
}

/* Opening paragraph gets a touch more presence */
.cj-article-body > p:first-of-type {
	font-size: 1.25rem;
	line-height: 1.65;
	color: var(--wp--preset--color--contrast);
}

figcaption,
.wp-element-caption {
	font-size: 0.8125rem !important;
	line-height: 1.5;
	color: var(--wp--preset--color--contrast-2) !important;
	padding-block-start: 0.6rem;
	border-block-start: 1px solid var(--wp--preset--color--border);
	margin-block-start: 0.6rem !important;
}

/* -------------------------------------------------------------------------
   8. Footer
   ---------------------------------------------------------------------- */

.cj-footer a {
	text-decoration: none;
	color: inherit;
}

.cj-footer a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cj-footer .wp-block-navigation {
	gap: 0.4rem 1.25rem;
}

.cj-footer-head {
	font-size: 0.6875rem !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	margin-block-end: 0.9rem !important;
	font-family: var(--wp--preset--font-family--sans) !important;
}

/* -------------------------------------------------------------------------
   9. Pagination
   ---------------------------------------------------------------------- */

.wp-block-query-pagination {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.wp-block-query-pagination a {
	text-decoration: none;
}

.wp-block-query-pagination a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wp-block-query-pagination-numbers .current {
	color: var(--wp--preset--color--accent);
}

/* -------------------------------------------------------------------------
   10. Responsive
   ---------------------------------------------------------------------- */

@media (max-width: 781px) {
	.cj-masthead .wp-block-site-title a {
		font-size: clamp(1.75rem, 7vw, 2.5rem);
	}

	.cj-nav {
		overflow-x: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* -------------------------------------------------------------------------
   11. Print
   ---------------------------------------------------------------------- */

@media print {
	.cj-topbar,
	.cj-nav,
	.cj-footer,
	.wp-block-query-pagination {
		display: none !important;
	}

	.cj-article-body p {
		font-size: 11pt;
		line-height: 1.5;
	}
}
