/* ==========================================================================
   Breakeven Theme — Main Stylesheet
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
	--bg-primary: #faf8f5;
	--bg-secondary: #f5f2ed;
	--text-primary: #1a1a1a;
	--text-secondary: #333333;
	--text-muted: #6b6b6b;
	--accent: #35654d;
	--accent-hover: #2d5a3f;
	--accent-light: #4a7d63;
	--border: rgba(0, 0, 0, 0.08);
	--shadow: rgba(0, 0, 0, 0.04);

	--font-poem: 'Cormorant Garamond', Georgia, serif;
	--font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	--header-height: 4rem;
	--content-width: 680px;
	--wide-width: 1100px;
}

[data-theme="dark"] {
	--bg-primary: #121714;
	--bg-secondary: #1e2420;
	--text-primary: #e8e6e1;
	--text-secondary: #b0ada6;
	--text-muted: #7a7772;
	--accent: #4a7d63;
	--accent-hover: #5a9474;
	--accent-light: #35654d;
	--border: rgba(255, 255, 255, 0.08);
	--shadow: rgba(0, 0, 0, 0.3);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--font-ui);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text-primary);
	background-color: var(--bg-primary);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color 0.3s ease, color 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-poem);
	color: var(--text-primary);
	line-height: 1.3;
	margin-top: 0;
}

h1 { font-size: 2.5rem; font-weight: 600; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

a {
	color: var(--accent);
	text-decoration: none;
	transition: color 0.2s ease;
}

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

a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

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

p {
	margin-top: 0;
	margin-bottom: 1em;
}

/* --- Skip Link --- */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	z-index: 999;
	padding: 0.5rem 1rem;
	background: var(--accent);
	color: #fff;
	font-size: 0.875rem;
}

.skip-link:focus {
	top: 0;
}

/* --- Screen Reader Text --- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	width: auto;
	z-index: 100000;
}

/* ==========================================================================
   Site Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--bg-primary);
	border-bottom: 1px solid var(--border);
	transition: background-color 0.3s ease;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: var(--wide-width);
	margin: 0 auto;
	padding: 0 1.5rem;
	height: var(--header-height);
}

/* --- Site Branding --- */
.site-branding {
	flex-shrink: 0;
}

.site-title {
	font-family: var(--font-poem);
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin: 0;
	line-height: 1;
}

.site-title a {
	color: var(--text-primary);
}

.site-title a:hover {
	color: var(--accent);
}

/* --- Main Navigation --- */
.main-navigation {
	display: flex;
	align-items: center;
}

.main-navigation ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.25rem;
}

.main-navigation li a {
	display: block;
	padding: 0.5rem 0.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-secondary);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	border-radius: 4px;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.main-navigation li a:hover,
.main-navigation li.current-menu-item a {
	color: var(--accent);
	background-color: var(--bg-secondary);
}

/* --- Menu Toggle (mobile) --- */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
	flex-direction: column;
	gap: 5px;
}

.menu-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--text-primary);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu toggle active state */
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
	.menu-toggle {
		display: flex;
	}

	.main-navigation ul {
		display: none;
		position: absolute;
		top: var(--header-height);
		left: 0;
		right: 0;
		flex-direction: column;
		background-color: var(--bg-primary);
		border-bottom: 1px solid var(--border);
		padding: 1rem 1.5rem;
		gap: 0;
	}

	.main-navigation.toggled ul {
		display: flex;
	}

	.main-navigation li a {
		padding: 0.75rem 0;
		border-bottom: 1px solid var(--border);
	}

	.main-navigation li:last-child a {
		border-bottom: none;
	}
}

/* --- Dark Mode Toggle --- */
.dark-mode-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid var(--border);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	cursor: pointer;
	color: var(--text-muted);
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
	flex-shrink: 0;
	margin-left: 1rem;
}

.dark-mode-toggle:hover {
	color: var(--accent);
	border-color: var(--accent);
}

.dark-mode-toggle:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* In light mode: show moon, hide sun */
.dark-mode-toggle__icon--sun {
	display: none;
}

.dark-mode-toggle__icon--moon {
	display: block;
}

/* In dark mode: show sun, hide moon */
[data-theme="dark"] .dark-mode-toggle__icon--sun {
	display: block;
}

[data-theme="dark"] .dark-mode-toggle__icon--moon {
	display: none;
}

/* ==========================================================================
   Site Main
   ========================================================================== */
.site-main {
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 3rem 1.5rem;
	min-height: calc(100vh - var(--header-height) - 12rem);
}

.site-main--wide {
	max-width: var(--wide-width);
}

.site-main--poem {
	max-width: none;
	padding: 4rem 1.5rem;
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
	margin-bottom: 3rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.page-title {
	font-size: 2rem;
	margin-bottom: 0.25rem;
}

.page-description {
	font-size: 1.125rem;
	color: var(--text-muted);
	margin-bottom: 0;
	font-style: italic;
	font-family: var(--font-poem);
}

/* ==========================================================================
   Post Card (archive listings)
   ========================================================================== */
.posts-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.post-card {
	padding: 1.75rem 0;
	border-bottom: 1px solid var(--border);
}

.post-card:first-child {
	padding-top: 0;
}

.post-card__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.post-card__title {
	font-family: var(--font-poem);
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

.post-card__title a {
	color: var(--text-primary);
}

.post-card__title a:hover {
	color: var(--accent);
}

.post-card__date {
	font-size: 0.8125rem;
	color: var(--text-muted);
	white-space: nowrap;
	flex-shrink: 0;
}

.post-card__excerpt {
	margin-top: 0.5rem;
	color: var(--text-secondary);
	font-size: 0.9375rem;
}

.post-card__excerpt p {
	margin-bottom: 0;
}

/* ==========================================================================
   Suit Separator
   ========================================================================== */
.suit-separator {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 1.5rem 0;
	font-size: 0.875rem;
	color: var(--text-muted);
	opacity: 0.5;
}

.suit--heart,
.suit--diamond {
	color: var(--accent);
}

/* ==========================================================================
   Section Headings
   ========================================================================== */
.section-heading {
	font-family: var(--font-ui);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--text-muted);
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Poker Concept Badges
   ========================================================================== */
.poem-concepts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.poem-concept-badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 3px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.poem-concept-badge:hover {
	background-color: var(--accent);
	color: var(--bg-primary);
}

/* ==========================================================================
   Posts Navigation
   ========================================================================== */
.posts-navigation,
.post-navigation {
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
}

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

.nav-previous,
.nav-next {
	flex: 1;
}

.nav-next {
	text-align: right;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
	background-color: var(--bg-secondary);
	border-top: 1px solid var(--border);
	transition: background-color 0.3s ease;
}

.site-footer__inner {
	max-width: var(--wide-width);
	margin: 0 auto;
	padding: 0 1.5rem 2rem;
}

.site-footer__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-navigation ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 1.5rem;
}

.footer-navigation a {
	font-size: 0.8125rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 500;
}

.footer-navigation a:hover {
	color: var(--accent);
}

.site-footer__info {
	text-align: right;
}

.site-footer__copy {
	font-size: 0.8125rem;
	color: var(--text-muted);
	margin: 0;
}

.site-footer__custom {
	font-size: 0.8125rem;
	color: var(--text-muted);
	margin: 0 0 0.25rem;
}

@media (max-width: 600px) {
	.site-footer__content {
		flex-direction: column;
		text-align: center;
	}

	.site-footer__info {
		text-align: center;
	}

	.footer-navigation ul {
		justify-content: center;
	}
}

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */
.alignleft {
	float: left;
	margin-right: 1.5rem;
}

.alignright {
	float: right;
	margin-left: 1.5rem;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption-text {
	font-size: 0.8125rem;
	color: var(--text-muted);
	text-align: center;
	margin-top: 0.5rem;
}

/* Search form */
.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 400px;
}

.search-field {
	flex: 1;
	padding: 0.6rem 1rem;
	font-family: var(--font-ui);
	font-size: 0.9375rem;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: var(--bg-primary);
	color: var(--text-primary);
	transition: border-color 0.2s ease;
}

.search-field:focus {
	outline: none;
	border-color: var(--accent);
}

.search-submit {
	padding: 0.6rem 1.25rem;
	font-family: var(--font-ui);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--bg-primary);
	background-color: var(--accent);
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.search-submit:hover {
	background-color: var(--accent-hover);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
	text-align: center;
	padding: 5rem 1.5rem 4rem;
	margin-bottom: 3rem;
}

.hero__site-name {
	font-family: var(--font-ui);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--accent);
	margin-bottom: 1rem;
}

.hero__tagline {
	font-family: var(--font-poem);
	font-size: 3.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--text-primary);
	margin: 0 auto 1rem;
	max-width: 14em;
}

@media (max-width: 768px) {
	.hero {
		padding: 3rem 1.5rem 2.5rem;
	}

	.hero__tagline {
		font-size: 2.25rem;
	}
}

/* ==========================================================================
   Poem Feed (Homepage)
   ========================================================================== */
.poem-feed {
	max-width: var(--content-width);
	margin: 0 auto;
}

.poem-feed__more {
	margin-top: 2rem;
	text-align: center;
}

.poem-feed__more-link {
	font-family: var(--font-ui);
	font-size: 0.875rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--accent);
	padding: 0.6rem 1.5rem;
	border: 1px solid var(--accent);
	border-radius: 4px;
	display: inline-block;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.poem-feed__more-link:hover {
	background-color: var(--accent);
	color: var(--bg-primary);
}

/* ==========================================================================
   Poem Meta (single poem footer)
   ========================================================================== */
.poem-meta {
	text-align: center;
	margin-top: 1.5rem;
}

.poem-meta__date {
	font-size: 0.8125rem;
	color: var(--text-muted);
	display: block;
	margin-bottom: 0.75rem;
}

.poem-meta .poem-concepts {
	justify-content: center;
	margin-top: 0.5rem;
}

/* ==========================================================================
   Poem Reading View (minimal header/footer)
   ========================================================================== */
.site-header--poem .site-header__inner {
	justify-content: space-between;
}

.site-title--small {
	font-size: 1rem;
}

.site-footer--poem {
	background: none;
	border: none;
	text-align: center;
	padding: 2rem 0;
}

.site-footer--poem .site-footer__inner {
	padding-bottom: 1rem;
}

/* ==========================================================================
   Archive Header
   ========================================================================== */
.archive-header {
	margin-bottom: 3rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.archive-header__taxonomy {
	font-family: var(--font-ui);
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--accent);
	margin-bottom: 0.25rem;
}

.archive-header__title {
	font-family: var(--font-poem);
	font-size: 2.5rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
}

.archive-header__description {
	font-family: var(--font-poem);
	font-style: italic;
	font-size: 1.125rem;
	color: var(--text-muted);
	margin: 0;
}

/* ==========================================================================
   404 Page
   ========================================================================== */
.error-404 {
	text-align: center;
	padding: 4rem 0;
}

.error-404__title {
	font-family: var(--font-poem);
	font-size: 6rem;
	font-weight: 600;
	color: var(--accent);
	margin-bottom: 0;
	line-height: 1;
	opacity: 0.3;
}

.error-404__subtitle {
	font-family: var(--font-poem);
	font-size: 1.5rem;
	color: var(--text-secondary);
	margin-top: 0.5rem;
}

.error-404__message {
	color: var(--text-muted);
	max-width: 30em;
	margin: 1.5rem auto;
}

.error-404 .search-form {
	margin: 2rem auto;
}
