/*
Theme Name: Styx Taxi
Theme URI: https://styxtaxi.com
Author: Steven Goldman
Description: Custom theme for Styx Taxi, a comic series following the drivers of New York's only taxi service for the recently deceased.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: styx-taxi
*/

/* ==========================================================================
   Fonts — "Night Shift": DIN (the actual transit/road-sign family) for
   display, Iowan Old Style for reading copy. Self-hosted, subset to basic
   Latin + typographic punctuation to keep file size small.
   ========================================================================== */
@font-face {
	font-family: "DIN Condensed Bold";
	src: url("assets/fonts/din-condensed-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Iowan Old Style";
	src: url("assets/fonts/iowan-old-style-roman.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Iowan Old Style";
	src: url("assets/fonts/iowan-old-style-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Iowan Old Style";
	src: url("assets/fonts/iowan-old-style-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

/* ==========================================================================
   Custom properties — "Night Shift": wet asphalt, medallion yellow, and a
   brake-light red held in reserve for the rare accent.
   ========================================================================== */
:root {
	--st-black: #14161a;
	--st-black-soft: #1a1d24;
	--st-panel: #1e2128;
	--st-line: #2a2d35;
	--st-fog: #7d8590;
	--st-paper: #ece9e0;
	--st-paper-dim: #b7bac1;
	--st-taxi: #f2b90c;
	--st-taxi-bright: #ffd23f;
	--st-blood: #c23b3b;
	--st-max-width: 1100px;
	--st-font-display: "DIN Condensed Bold", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	--st-font-body: "Iowan Old Style", Georgia, "Times New Roman", serif;
	--st-font-ui: "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Reset-ish basics
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--st-black);
}

body {
	margin: 0;
	background: var(--st-black);
	color: var(--st-paper);
	font-family: var(--st-font-body);
	line-height: 1.6;
	font-size: 17px;
}

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

a {
	color: var(--st-taxi-bright);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

h1, h2, h3, h4 {
	font-family: var(--st-font-display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--st-paper);
	line-height: 1.15;
}

.st-container {
	max-width: var(--st-max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ==========================================================================
   Header
   ========================================================================== */
.st-header {
	background: linear-gradient(180deg, var(--st-black-soft) 0%, var(--st-black) 100%);
	border-bottom: 2px solid var(--st-taxi);
	padding: 28px 0 0;
}

.st-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.st-logo {
	font-family: var(--st-font-display);
	font-size: 2.4rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--st-taxi);
	margin: 0;
}

.st-logo a {
	color: inherit;
	text-decoration: none;
}

.st-tagline {
	font-family: var(--st-font-ui);
	text-transform: uppercase;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	color: var(--st-fog);
	margin: 0 0 18px;
}

.st-nav {
	margin-top: 18px;
	border-top: 1px solid var(--st-line);
}

.st-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	max-width: var(--st-max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.st-nav a {
	display: inline-block;
	padding: 14px 16px;
	font-family: var(--st-font-ui);
	text-transform: uppercase;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	color: var(--st-paper-dim);
}

.st-nav a:hover,
.st-nav a:focus {
	color: var(--st-taxi-bright);
	text-decoration: none;
}

.st-nav .current-menu-item > a {
	color: var(--st-taxi-bright);
}

/* ==========================================================================
   Layout
   ========================================================================== */
.st-main {
	padding: 44px 0 80px;
	min-height: 50vh;
}

/* A rare touch of amber glow behind the homepage hero — a taxi light
   through the dark, not a site-wide effect. */
.home .st-entry {
	position: relative;
}

.home .st-entry::before {
	content: "";
	position: absolute;
	top: -60px;
	left: 50%;
	width: 700px;
	max-width: 160%;
	height: 380px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgba(242, 185, 12, 0.12), transparent 70%);
	pointer-events: none;
	z-index: 0;
}

.home .st-entry__title,
.home .st-chapter-grid {
	position: relative;
	z-index: 1;
}

/* ==========================================================================
   Comic reader
   ========================================================================== */
.st-reader {
	max-width: 900px;
	margin: 0 auto;
}

.st-reader__chapter-label {
	text-align: center;
	font-family: var(--st-font-ui);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.78rem;
	color: var(--st-fog);
	margin-bottom: 6px;
}

.st-reader__chapter-label a {
	color: var(--st-taxi);
}

.st-reader__title {
	text-align: center;
	font-size: 1.6rem;
	margin: 0 0 24px;
}

.st-page-frame {
	background: var(--st-black-soft);
	border: 1px solid var(--st-line);
	padding: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.st-page-frame img {
	margin: 0 auto;
}

.st-reader__transcript {
	margin-top: 24px;
	padding: 18px 22px;
	background: var(--st-panel);
	border-left: 3px solid var(--st-taxi);
	font-size: 0.95rem;
	color: var(--st-paper-dim);
}

/* Reader navigation */
.st-nav-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 26px 0;
	font-family: var(--st-font-ui);
}

.st-nav-bar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	background: var(--st-panel);
	border: 1px solid var(--st-line);
	color: var(--st-paper);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.st-nav-bar__btn:hover,
.st-nav-bar__btn:focus {
	background: var(--st-taxi);
	color: var(--st-black);
	border-color: var(--st-taxi);
	text-decoration: none;
}

.st-nav-bar__btn[aria-disabled="true"],
.st-nav-bar__btn:disabled {
	opacity: 0.3;
	pointer-events: none;
	cursor: default;
}

/* Single-page document viewer (e.g. Everyman: Be the People) */
.st-doc-viewer {
	max-width: 700px;
	margin: 30px auto 0;
}

.st-doc-viewer img {
	margin: 0 auto;
	user-select: none;
}

.st-doc-viewer__indicator {
	font-family: var(--st-font-ui);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8rem;
	color: var(--st-fog);
	min-width: 140px;
	text-align: center;
}

.st-chapter-select {
	margin: 0 6px;
	height: 44px;
	padding: 0 12px;
	background: var(--st-panel);
	border: 1px solid var(--st-line);
	color: var(--st-paper);
	font-family: var(--st-font-ui);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ==========================================================================
   Chapter / comic archive grid
   ========================================================================== */
.st-chapter-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 28px;
	margin-top: 20px;
}

.st-chapter-card {
	background: var(--st-black-soft);
	border: 1px solid var(--st-line);
	transition: border-color 0.15s ease;
}

.st-chapter-card:hover {
	border-color: var(--st-taxi);
}

.st-chapter-card a {
	display: block;
	color: inherit;
}

.st-chapter-card a:hover,
.st-chapter-card a:focus {
	text-decoration: none;
}

.st-chapter-card__cover {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--st-line);
}

.st-chapter-card__cover img {
	filter: grayscale(0.15) contrast(1.05);
	transition: filter 0.2s ease;
}

.st-chapter-card:hover .st-chapter-card__cover img {
	filter: grayscale(0) contrast(1.05);
}

.st-chapter-card__cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 22, 26, 0) 55%, rgba(20, 22, 26, 0.55) 100%);
	pointer-events: none;
}

.st-chapter-card__body {
	padding: 16px 18px 20px;
}

.st-chapter-card__title {
	font-size: 1.05rem;
	margin: 0 0 6px;
}

.st-chapter-card__meta {
	font-family: var(--st-font-ui);
	font-size: 0.78rem;
	color: var(--st-fog);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 10px;
}

.st-chapter-card__blurb {
	font-size: 0.9rem;
	color: var(--st-paper-dim);
	margin: 0;
}

.st-page-thumb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 16px;
	margin-top: 24px;
}

.st-page-thumb-grid a {
	display: block;
	border: 1px solid var(--st-line);
}

.st-page-thumb-grid a:hover,
.st-page-thumb-grid a:focus {
	border-color: var(--st-taxi);
}

/* ==========================================================================
   Pages / entry content
   ========================================================================== */
.st-entry {
	max-width: 760px;
	margin: 0 auto;
}

.st-entry__title {
	font-size: 2rem;
	margin: 0 0 28px;
	text-align: center;
}

.st-entry__content p {
	margin: 0 0 1.2em;
}

.st-entry__content img {
	margin: 1.5em auto;
}

.st-entry__content blockquote {
	margin: 1.6em 0;
	padding: 0 0 0 20px;
	border-left: 3px solid var(--st-blood);
	font-style: italic;
	color: var(--st-paper-dim);
}

.st-entry__content h2,
.st-entry__content h3 {
	margin-top: 1.8em;
}

/* Blog post meta */
.st-post-meta {
	text-align: center;
	font-family: var(--st-font-ui);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--st-fog);
	margin: -14px 0 28px;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.st-comments {
	max-width: 760px;
	margin: 60px auto 0;
	border-top: 1px solid var(--st-line);
	padding-top: 30px;
}

.st-comments .comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.st-comments .comment-list li {
	margin-bottom: 22px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--st-line);
}

.st-comments textarea,
.st-comments input[type="text"],
.st-comments input[type="email"],
.st-comments input[type="url"] {
	width: 100%;
	background: var(--st-panel);
	border: 1px solid var(--st-line);
	color: var(--st-paper);
	padding: 10px 12px;
	font-family: var(--st-font-body);
	margin-bottom: 12px;
}

.st-comments .form-submit input {
	background: var(--st-taxi);
	color: var(--st-black);
	border: none;
	padding: 12px 22px;
	font-family: var(--st-font-ui);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.st-footer {
	border-top: 2px solid var(--st-taxi);
	padding: 30px 0 50px;
	background: var(--st-black-soft);
}

.st-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
	font-family: var(--st-font-ui);
	font-size: 0.8rem;
	color: var(--st-fog);
}

.st-footer a {
	color: var(--st-fog);
}

.st-footer a:hover {
	color: var(--st-taxi-bright);
}

.st-footer__links {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
	.st-logo {
		font-size: 1.8rem;
	}

	.st-nav ul {
		gap: 0;
	}

	.st-nav a {
		padding: 12px 10px;
		font-size: 0.75rem;
	}

	.st-entry__title {
		font-size: 1.5rem;
	}
}
