/*
Theme Name: SagacityRed
Theme URI: https://example.com/sagacityred
Author: Manus
Author URI: https://manus.im
Description: A minimal, photo-centric WordPress theme built around a cinematic full-screen hero.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sagacityred
Tags: one-column, custom-background, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready, blog
*/

:root {
	--sr-accent: #b3132b;
	--sr-ink: #151515;
	--sr-paper: #f4f1ec;
	--sr-line: rgba(21, 21, 21, 0.16);
	--sr-content: 1180px;
	--sr-gutter: clamp(1.25rem, 4vw, 4.5rem);
	--sr-header-height: 6.25rem;
	--sr-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--sr-paper);
	color: var(--sr-ink);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
}

body.menu-open {
	overflow: hidden;
}

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

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--sr-accent);
}

button,
input,
textarea,
select {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

:focus-visible {
	outline: 3px solid var(--sr-accent);
	outline-offset: 4px;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	background: #fff;
	color: #111;
	font-weight: 700;
	left: 1rem;
	padding: 0.75rem 1rem;
	position: fixed;
	top: 1rem;
	transform: translateY(-200%);
	transition: transform 180ms ease;
	z-index: 100000;
}

.skip-link:focus {
	transform: translateY(0);
}

/* Header */
.site-header {
	align-items: center;
	color: #fff;
	display: flex;
	gap: 2rem;
	justify-content: space-between;
	left: 0;
	min-height: var(--sr-header-height);
	padding: 1.35rem var(--sr-gutter);
	position: absolute;
	right: 0;
	top: 0;
	transition: background-color 250ms ease, min-height 250ms ease, padding 250ms ease;
	z-index: 50;
}

.admin-bar .site-header {
	top: 32px;
}

.site-header--solid,
.site-header.is-scrolled {
	background: rgba(14, 14, 14, 0.94);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
	min-height: 4.75rem;
	padding-bottom: 0.85rem;
	padding-top: 0.85rem;
	position: fixed;
}

.site-branding {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	position: relative;
	z-index: 2;
}

.site-title {
	color: #fff;
	font-size: clamp(1rem, 2vw, 1.18rem);
	font-weight: 750;
	letter-spacing: 0.12em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}

.site-title:hover {
	color: #fff;
}

.custom-logo-link {
	display: block;
	line-height: 0;
}

.custom-logo {
	max-height: 42px;
	width: auto;
}

.primary-menu,
.primary-menu ul {
	align-items: center;
	display: flex;
	gap: clamp(1rem, 2.3vw, 2rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-menu a {
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	position: relative;
	text-decoration: none;
	text-transform: uppercase;
}

.primary-menu a::after {
	background: var(--sr-accent);
	bottom: -0.55rem;
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 220ms var(--sr-ease);
	width: 100%;
}

.primary-menu a:hover,
.primary-menu a:focus-visible {
	color: #fff;
}

.primary-menu a:hover::after,
.primary-menu a:focus-visible::after,
.primary-menu .current-menu-item > a::after {
	transform: scaleX(1);
}

.menu-toggle {
	align-items: center;
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	display: none;
	height: 44px;
	justify-content: center;
	padding: 0;
	position: relative;
	width: 44px;
	z-index: 3;
}

.menu-toggle__lines,
.menu-toggle__lines::before,
.menu-toggle__lines::after {
	background: currentColor;
	display: block;
	height: 2px;
	position: absolute;
	transition: transform 220ms ease, opacity 220ms ease;
	width: 24px;
}

.menu-toggle__lines::before,
.menu-toggle__lines::after {
	content: "";
	left: 0;
}

.menu-toggle__lines::before { transform: translateY(-7px); }
.menu-toggle__lines::after { transform: translateY(7px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::after { transform: rotate(-45deg); }

/* Full-screen hero */
.hero {
	align-items: center;
	background-color: #3c3a38;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	color: #fff;
	display: flex;
	isolation: isolate;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	padding: calc(var(--sr-header-height) + 2rem) var(--sr-gutter) 4rem;
	position: relative;
}

.hero::before {
	background:
		linear-gradient(90deg, rgba(8, 8, 8, var(--sr-overlay-strong)) 0%, rgba(8, 8, 8, var(--sr-overlay)) 46%, rgba(8, 8, 8, var(--sr-overlay-soft)) 100%),
		linear-gradient(0deg, rgba(8, 8, 8, 0.36) 0%, transparent 40%);
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.hero__content {
	max-width: 880px;
	padding-top: 3vh;
}

.hero__eyebrow {
	align-items: center;
	display: flex;
	font-size: 0.72rem;
	font-weight: 750;
	gap: 0.8rem;
	letter-spacing: 0.18em;
	margin: 0 0 1.4rem;
	text-transform: uppercase;
}

.hero__eyebrow::before {
	background: var(--sr-accent);
	content: "";
	height: 2px;
	width: 2.75rem;
}

.hero__title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(4rem, 9.6vw, 9.25rem);
	font-weight: 400;
	letter-spacing: -0.065em;
	line-height: 0.87;
	margin: 0;
	max-width: 9ch;
	text-wrap: balance;
}

.hero__text {
	font-size: clamp(1rem, 1.6vw, 1.28rem);
	font-weight: 400;
	line-height: 1.55;
	margin: 2rem 0 0;
	max-width: 35rem;
}

.hero__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin-top: 2.2rem;
}

.hero__button,
.wp-block-button__link,
input[type="submit"] {
	background: var(--sr-accent);
	border: 1px solid var(--sr-accent);
	border-radius: 0;
	color: #fff;
	display: inline-flex;
	font-size: 0.75rem;
	font-weight: 750;
	justify-content: center;
	letter-spacing: 0.14em;
	padding: 1rem 1.4rem;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms var(--sr-ease);
}

.hero__button:hover,
.hero__button:focus-visible,
.wp-block-button__link:hover,
input[type="submit"]:hover {
	background: #fff;
	border-color: #fff;
	color: #111;
	transform: translateY(-2px);
}

.hero__scroll {
	align-items: center;
	bottom: 2rem;
	display: flex;
	font-size: 0.64rem;
	font-weight: 700;
	gap: 0.75rem;
	letter-spacing: 0.16em;
	position: absolute;
	right: var(--sr-gutter);
	text-decoration: none;
	text-transform: uppercase;
	transform: rotate(90deg) translateX(-100%);
	transform-origin: bottom right;
}

.hero__scroll::after {
	background: currentColor;
	content: "";
	height: 1px;
	width: 3rem;
}

/* Content */
.site-main--inner {
	min-height: 70vh;
	padding-top: calc(var(--sr-header-height) + 3rem);
}

.home-content,
.page-section,
.archive-header,
.entry,
.comments-area,
.not-found {
	margin-left: auto;
	margin-right: auto;
	max-width: var(--sr-content);
	padding-left: var(--sr-gutter);
	padding-right: var(--sr-gutter);
}

.page-section {
	padding-bottom: clamp(4rem, 9vw, 8rem);
	padding-top: clamp(4rem, 9vw, 8rem);
}

.page-section + .page-section {
	border-top: 1px solid var(--sr-line);
}

.section-kicker,
.entry-kicker {
	color: var(--sr-accent);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	margin: 0 0 1rem;
	text-transform: uppercase;
}

.section-title,
.entry-title,
.archive-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2.65rem, 5vw, 5rem);
	font-weight: 400;
	letter-spacing: -0.045em;
	line-height: 0.98;
	margin: 0 0 2.5rem;
	text-wrap: balance;
}

.section-title {
	max-width: 12ch;
}

.entry-content {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.06rem, 1.3vw, 1.22rem);
	margin: 0 auto;
	max-width: 760px;
}

.entry-content > * {
	margin-bottom: 1.5em;
	margin-top: 1.5em;
}

.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content a { color: var(--sr-accent); }
.entry-content img,
.entry-media img { display: block; width: 100%; }

.entry-content .alignwide {
	margin-left: 50%;
	max-width: min(1100px, calc(100vw - (2 * var(--sr-gutter))));
	transform: translateX(-50%);
	width: 100vw;
}

.entry-content .alignfull {
	margin-left: 50%;
	max-width: none;
	transform: translateX(-50%);
	width: 100vw;
}

.stories-grid {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem);
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card a {
	text-decoration: none;
}

.story-card__image {
	aspect-ratio: 4 / 5;
	background: #ded9d1;
	display: block;
	overflow: hidden;
}

.story-card__image img {
	display: block;
	height: 100%;
	object-fit: cover;
	transition: transform 700ms var(--sr-ease);
	width: 100%;
}

.story-card a:hover .story-card__image img {
	transform: scale(1.035);
}

.story-card__meta,
.entry-meta {
	color: #6b6965;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.11em;
	margin: 1.15rem 0 0.65rem;
	text-transform: uppercase;
}

.story-card__title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.45rem, 2.4vw, 2rem);
	font-weight: 400;
	letter-spacing: -0.025em;
	line-height: 1.1;
	margin: 0;
}

.story-card a:hover .story-card__title {
	color: var(--sr-accent);
}

.post-list .entry {
	border-bottom: 1px solid var(--sr-line);
	padding-bottom: clamp(3rem, 6vw, 5rem);
	padding-top: clamp(3rem, 6vw, 5rem);
}

.post-list .entry:first-child { padding-top: 0; }
.post-list .entry-title { font-size: clamp(2.25rem, 5vw, 4.5rem); margin-bottom: 1rem; }
.post-list .entry-title a { text-decoration: none; }
.entry-media { margin-bottom: 2.5rem; }
.entry-summary { max-width: 720px; }
.read-more { color: var(--sr-accent); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }

.comments-area {
	border-top: 1px solid var(--sr-line);
	margin-top: 5rem;
	padding-bottom: 5rem;
	padding-top: 4rem;
}

.comment-list {
	list-style: none;
	margin: 0 0 3rem;
	padding: 0;
}

.comment-list .comment {
	border-top: 1px solid var(--sr-line);
	padding: 1.5rem 0;
}

.navigation.pagination,
.post-navigation {
	margin: 4rem auto;
	max-width: var(--sr-content);
	padding: 0 var(--sr-gutter);
}

.nav-links {
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.page-numbers {
	border: 1px solid var(--sr-line);
	padding: 0.65rem 0.9rem;
	text-decoration: none;
}

.page-numbers.current {
	background: var(--sr-ink);
	color: #fff;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	background: #fff;
	border: 1px solid var(--sr-line);
	border-radius: 0;
	color: var(--sr-ink);
	padding: 0.85rem;
	width: 100%;
}

/* Footer */
.site-footer {
	align-items: flex-end;
	background: #111;
	color: rgba(255, 255, 255, 0.72);
	display: flex;
	gap: 2rem;
	justify-content: space-between;
	min-height: 11rem;
	padding: 3rem var(--sr-gutter);
}

.site-footer__brand {
	color: #fff;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.8rem, 4vw, 3.5rem);
	letter-spacing: -0.04em;
	line-height: 1;
}

.site-footer__meta {
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	margin: 0;
	text-transform: uppercase;
}

/* Responsive */
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

@media (max-width: 760px) {
	:root { --sr-header-height: 5.25rem; }
	.menu-toggle { display: inline-flex; }
	.js .primary-navigation {
		align-items: center;
		background: rgba(14, 14, 14, 0.985);
		display: flex;
		inset: 0;
		justify-content: center;
		opacity: 0;
		pointer-events: none;
		position: fixed;
		transform: translateY(-1rem);
		transition: opacity 220ms ease, transform 220ms var(--sr-ease);
		visibility: hidden;
	}
	.js .primary-navigation.is-open {
		opacity: 1;
		pointer-events: auto;
		transform: translateY(0);
		visibility: visible;
	}
	.primary-menu,
	.primary-menu ul {
		align-items: flex-start;
		flex-direction: column;
		gap: 1.25rem;
	}
	.primary-menu a { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 400; letter-spacing: -0.02em; text-transform: none; }
	.hero { align-items: flex-end; padding-bottom: 6rem; }
	.hero::before { background: linear-gradient(0deg, rgba(8, 8, 8, 0.82) 0%, rgba(8, 8, 8, 0.28) 75%, rgba(8, 8, 8, 0.4) 100%); }
	.hero__content { padding-top: 0; }
	.hero__title { font-size: clamp(3.8rem, 20vw, 6.2rem); }
	.hero__scroll { display: none; }
	.stories-grid { grid-template-columns: 1fr; }
	.story-card__image { aspect-ratio: 4 / 3; }
	.site-footer { align-items: flex-start; flex-direction: column; }
}

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