/**
 * Styles for blog, pages, archives, search, 404 and comments.
 *
 * style.css is a production Tailwind build containing only the classes the
 * original one-page site used, so these templates cannot rely on arbitrary
 * utility classes. Everything here is hand-written and namespaced `ahc-`.
 */

:root {
	--ahc-violet: #5200cc;
	--ahc-violet-dark: #4100a3;
	--ahc-pink: #ff2a9d;
	--ahc-ink: #0f172a;
	--ahc-body: #475569;
	--ahc-muted: #94a3b8;
	--ahc-line: #e2e8f0;
	--ahc-surface: #f8fafc;
	--ahc-radius: 1.5rem;
	--ahc-sans: "Figtree", "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
	--ahc-display: "Bricolage Grotesque", "Montserrat", var(--ahc-sans);
}

/* ---------------------------------------------------------------- layout */

.ahc-shell {
	max-width: 1200px;
	margin: 0 auto;
	padding: 3.5rem 1.25rem 5rem;
}

.ahc-shell--wide {
	max-width: 1440px;
}

@media (min-width: 1024px) {
	.ahc-shell--sidebar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 20rem;
		gap: 3rem;
		align-items: start;
	}
}

.ahc-main {
	min-width: 0;
}

.ahc-main--narrow {
	max-width: 48rem;
	margin: 0 auto;
}

/* ------------------------------------------------------------ page hero */

.ahc-page-hero {
	background: linear-gradient(160deg, var(--ahc-violet) 0%, #2d0072 100%);
	color: #fff;
	padding: 4rem 1.25rem 3.5rem;
}

.ahc-page-hero__inner {
	max-width: 900px;
	margin: 0 auto;
	text-align: center;
}

.ahc-page-hero__eyebrow {
	display: inline-block;
	background: var(--ahc-pink);
	color: #fff;
	font-family: var(--ahc-sans);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.35rem 0.9rem;
	border-radius: 999px;
	margin: 0 0 1rem;
}

.ahc-page-hero__title {
	font-family: var(--ahc-display);
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0;
	color: #fff;
}

.ahc-page-hero__intro {
	font-family: var(--ahc-sans);
	font-size: 1.05rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.85);
	margin: 1rem auto 0;
	max-width: 42rem;
}

.ahc-page-hero .ahc-meta {
	color: rgba(255, 255, 255, 0.75);
	justify-content: center;
}

/* ---------------------------------------------------------------- cards */

.ahc-post-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.ahc-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.ahc-shell--sidebar .ahc-post-grid {
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.ahc-shell--sidebar .ahc-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.ahc-card {
	background: #fff;
	border: 1px solid var(--ahc-line);
	border-radius: var(--ahc-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ahc-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px -18px rgba(82, 0, 204, 0.45);
}

.ahc-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--ahc-surface);
}

.ahc-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ahc-card__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	flex: 1 1 auto;
}

.ahc-card__eyebrow {
	font-family: var(--ahc-sans);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--ahc-pink);
	margin: 0;
}

.ahc-card__title {
	font-family: var(--ahc-display);
	font-size: 1.3rem;
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
}

.ahc-card__title a {
	color: var(--ahc-ink);
	text-decoration: none;
}

.ahc-card__title a:hover {
	color: var(--ahc-violet);
}

.ahc-card__excerpt {
	font-family: var(--ahc-sans);
	color: var(--ahc-body);
	line-height: 1.65;
	margin: 0;
	flex: 1 1 auto;
}

.ahc-card__more {
	font-family: var(--ahc-sans);
	font-weight: 800;
	font-size: 0.9rem;
	color: var(--ahc-violet);
	text-decoration: none;
	margin-top: 0.25rem;
}

.ahc-card__more:hover {
	color: var(--ahc-pink);
}

/* ----------------------------------------------------------------- meta */

.ahc-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--ahc-sans);
	font-size: 0.82rem;
	color: var(--ahc-muted);
	margin: 0;
}

.ahc-meta__sep {
	opacity: 0.6;
}

/* -------------------------------------------------------------- article */

.ahc-article__media {
	margin: 0 0 2rem;
	border-radius: var(--ahc-radius);
	overflow: hidden;
}

.ahc-article__media img {
	width: 100%;
	height: auto;
	display: block;
}

.ahc-content {
	font-family: var(--ahc-sans);
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--ahc-body);
}

.ahc-content > * + * {
	margin-top: 1.25rem;
}

.ahc-content h1,
.ahc-content h2,
.ahc-content h3,
.ahc-content h4 {
	font-family: var(--ahc-display);
	color: var(--ahc-ink);
	font-weight: 800;
	line-height: 1.25;
	margin-top: 2.5rem;
}

.ahc-content h2 { font-size: 1.9rem; }
.ahc-content h3 { font-size: 1.45rem; }
.ahc-content h4 { font-size: 1.2rem; }

.ahc-content a {
	color: var(--ahc-violet);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ahc-content a:hover {
	color: var(--ahc-pink);
}

.ahc-content img,
.ahc-content iframe,
.ahc-content video {
	max-width: 100%;
	height: auto;
	border-radius: 1rem;
}

.ahc-content ul,
.ahc-content ol {
	padding-left: 1.4rem;
}

.ahc-content li + li {
	margin-top: 0.4rem;
}

.ahc-content blockquote {
	border-left: 4px solid var(--ahc-pink);
	background: var(--ahc-surface);
	padding: 1rem 1.4rem;
	border-radius: 0 1rem 1rem 0;
	font-style: italic;
	color: var(--ahc-ink);
}

.ahc-content pre {
	background: var(--ahc-ink);
	color: #e2e8f0;
	padding: 1.15rem;
	border-radius: 1rem;
	overflow-x: auto;
	font-size: 0.9rem;
}

.ahc-content code {
	font-size: 0.92em;
}

.ahc-content table {
	width: 100%;
	border-collapse: collapse;
	display: block;
	overflow-x: auto;
}

.ahc-content th,
.ahc-content td {
	border: 1px solid var(--ahc-line);
	padding: 0.6rem 0.8rem;
	text-align: left;
}

.ahc-content th {
	background: var(--ahc-surface);
	color: var(--ahc-ink);
	font-weight: 700;
}

/* WordPress core alignment + caption classes */
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.alignleft { float: left; margin: 0.4rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.4rem 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; display: block; }
.wp-caption-text,
.wp-element-caption {
	font-size: 0.85rem;
	color: var(--ahc-muted);
	text-align: center;
	margin-top: 0.5rem;
}
.sticky .ahc-card__eyebrow::after { content: " • Featured"; }

/* ------------------------------------------------------------- tags/nav */

.ahc-tags {
	margin-top: 2rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ahc-tags a {
	font-family: var(--ahc-sans);
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--ahc-violet);
	background: rgba(82, 0, 204, 0.08);
	border-radius: 999px;
	padding: 0.35rem 0.85rem;
	text-decoration: none;
}

.ahc-tags a:hover {
	background: var(--ahc-violet);
	color: #fff;
}

.ahc-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--ahc-line);
	font-family: var(--ahc-sans);
	font-weight: 700;
}

.ahc-post-nav a {
	color: var(--ahc-violet);
	text-decoration: none;
}

.ahc-post-nav a:hover {
	color: var(--ahc-pink);
}

.ahc-post-nav__next {
	text-align: right;
}

/* ---------------------------------------------------------- pagination */

.ahc-pagination,
.pagination {
	margin-top: 3rem;
}

.ahc-pagination .nav-links,
.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.ahc-pagination .page-numbers,
.pagination .page-numbers {
	font-family: var(--ahc-sans);
	font-weight: 800;
	font-size: 0.9rem;
	min-width: 2.6rem;
	text-align: center;
	padding: 0.6rem 0.9rem;
	border-radius: 0.85rem;
	border: 1px solid var(--ahc-line);
	color: var(--ahc-ink);
	text-decoration: none;
	background: #fff;
}

.ahc-pagination .page-numbers:hover,
.pagination .page-numbers:hover {
	border-color: var(--ahc-violet);
	color: var(--ahc-violet);
}

.ahc-pagination .page-numbers.current,
.pagination .page-numbers.current {
	background: var(--ahc-violet);
	border-color: var(--ahc-violet);
	color: #fff;
}

/* ------------------------------------------------------------- sidebar */

.ahc-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.ahc-widget {
	background: #fff;
	border: 1px solid var(--ahc-line);
	border-radius: var(--ahc-radius);
	padding: 1.5rem;
	font-family: var(--ahc-sans);
	color: var(--ahc-body);
}

.ahc-widget__title {
	font-family: var(--ahc-display);
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--ahc-ink);
	margin: 0 0 1rem;
}

.ahc-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ahc-widget li + li {
	margin-top: 0.6rem;
	padding-top: 0.6rem;
	border-top: 1px solid var(--ahc-line);
}

.ahc-widget a {
	color: var(--ahc-body);
	text-decoration: none;
}

.ahc-widget a:hover {
	color: var(--ahc-violet);
}

/* -------------------------------------------------------------- search */

.ahc-searchbar {
	margin-bottom: 2.5rem;
}

.ahc-search {
	display: flex;
	gap: 0.5rem;
}

.ahc-search__input {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--ahc-sans);
	font-size: 0.95rem;
	padding: 0.8rem 1rem;
	border: 1px solid var(--ahc-line);
	border-radius: 0.85rem;
	background: #fff;
	color: var(--ahc-ink);
}

.ahc-search__input:focus {
	outline: none;
	border-color: var(--ahc-violet);
	box-shadow: 0 0 0 3px rgba(82, 0, 204, 0.15);
}

.ahc-search__submit {
	font-family: var(--ahc-sans);
	font-weight: 800;
	font-size: 0.9rem;
	color: #fff;
	background: var(--ahc-violet);
	border: 0;
	border-radius: 0.85rem;
	padding: 0.8rem 1.4rem;
	cursor: pointer;
}

.ahc-search__submit:hover {
	background: var(--ahc-violet-dark);
}

/* --------------------------------------------------------- empty / cta */

.ahc-empty {
	text-align: center;
	padding: 3rem 1rem;
}

.ahc-empty__title {
	font-family: var(--ahc-display);
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--ahc-ink);
	margin: 0 0 0.75rem;
}

.ahc-empty__text {
	font-family: var(--ahc-sans);
	color: var(--ahc-body);
	margin: 0 auto 2rem;
	max-width: 32rem;
}

.ahc-cta-card {
	background: var(--ahc-surface);
	border: 1px solid var(--ahc-line);
	border-radius: var(--ahc-radius);
	padding: 2rem;
	text-align: center;
}

.ahc-cta-card__title {
	font-family: var(--ahc-display);
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--ahc-ink);
	margin: 0 0 0.5rem;
}

.ahc-cta-card__text {
	font-family: var(--ahc-sans);
	color: var(--ahc-body);
	margin: 0 0 1.5rem;
}

.ahc-cta-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin: 0;
}

.ahc-btn {
	display: inline-block;
	font-family: var(--ahc-sans);
	font-weight: 800;
	font-size: 0.95rem;
	padding: 0.85rem 1.6rem;
	border-radius: 999px;
	text-decoration: none;
}

.ahc-btn--primary {
	background: var(--ahc-violet);
	color: #fff;
}

.ahc-btn--primary:hover {
	background: var(--ahc-violet-dark);
}

.ahc-btn--ghost {
	background: #fff;
	color: var(--ahc-ink);
	border: 1px solid var(--ahc-line);
}

.ahc-btn--ghost:hover {
	border-color: var(--ahc-violet);
	color: var(--ahc-violet);
}

/* -------------------------------------------------- hiring popup (home) */

.ahc-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.ahc-popup[hidden] {
	display: none;
}

/*
 * Defence in depth: until `is-open` is set the overlay must never intercept
 * clicks. If the open sequence is ever interrupted, the page stays usable
 * instead of sitting behind an invisible full-screen layer.
 */
.ahc-popup:not(.is-open) {
	pointer-events: none;
}

.ahc-popup.is-open {
	pointer-events: auto;
}

.ahc-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ahc-popup.is-open .ahc-popup__backdrop {
	opacity: 1;
}

.ahc-popup__panel {
	position: relative;
	width: 100%;
	max-width: 30rem;
	background: #fff;
	border-radius: var(--ahc-radius);
	padding: 2.25rem 1.75rem 1.75rem;
	box-shadow: 0 30px 70px -20px rgba(15, 23, 42, 0.55);
	text-align: center;
	transform: translateY(14px) scale(0.98);
	opacity: 0;
	transition: transform 0.32s ease, opacity 0.32s ease;
	max-height: calc(100vh - 2.5rem);
	overflow-y: auto;
}

.ahc-popup.is-open .ahc-popup__panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.ahc-popup__close {
	position: absolute;
	top: 0.6rem;
	right: 0.85rem;
	background: transparent;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--ahc-muted);
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	border-radius: 0.5rem;
}

.ahc-popup__close:hover {
	color: var(--ahc-ink);
	background: var(--ahc-surface);
}

.ahc-popup__eyebrow {
	display: inline-block;
	background: var(--ahc-pink);
	color: #fff;
	font-family: var(--ahc-sans);
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	margin: 0 0 0.85rem;
}

.ahc-popup__title {
	font-family: var(--ahc-display);
	font-size: 1.65rem;
	font-weight: 900;
	line-height: 1.15;
	color: var(--ahc-ink);
	margin: 0 0 0.6rem;
}

.ahc-popup__text {
	font-family: var(--ahc-sans);
	color: var(--ahc-body);
	line-height: 1.65;
	margin: 0 0 1rem;
}

.ahc-popup__list {
	list-style: none;
	margin: 0 0 1.4rem;
	padding: 0;
	text-align: left;
	font-family: var(--ahc-sans);
	font-size: 0.92rem;
	color: var(--ahc-ink);
	font-weight: 600;
}

.ahc-popup__list li {
	position: relative;
	padding-left: 1.6rem;
}

.ahc-popup__list li + li {
	margin-top: 0.5rem;
}

.ahc-popup__list li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--ahc-violet);
	font-weight: 900;
}

.ahc-popup__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	justify-content: center;
}

.ahc-popup__mail {
	margin: 1rem 0 0;
	font-family: var(--ahc-sans);
	font-size: 0.85rem;
}

.ahc-popup__mail a {
	color: var(--ahc-violet);
	font-weight: 700;
	text-decoration: none;
}

.ahc-popup__mail a:hover {
	color: var(--ahc-pink);
}

@media (prefers-reduced-motion: reduce) {
	.ahc-popup__backdrop,
	.ahc-popup__panel {
		transition: none;
	}
}

/* ------------------------------------------------------------ comments */

.ahc-comments {
	margin-top: 3.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--ahc-line);
	font-family: var(--ahc-sans);
}

.ahc-comments__title {
	font-family: var(--ahc-display);
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--ahc-ink);
	margin: 0 0 1.5rem;
}

.ahc-comments__list,
.ahc-comments__list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ahc-comments__list .children {
	margin-left: 1.5rem;
	padding-left: 1.5rem;
	border-left: 2px solid var(--ahc-line);
}

.ahc-comments__list li {
	margin-bottom: 1.5rem;
}

.ahc-comments__list .comment-body {
	background: #fff;
	border: 1px solid var(--ahc-line);
	border-radius: 1.25rem;
	padding: 1.25rem;
	color: var(--ahc-body);
	line-height: 1.7;
}

.ahc-comments__list .comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 800;
	color: var(--ahc-ink);
}

.ahc-comments__list .comment-author img {
	border-radius: 999px;
}

.ahc-comments__list .comment-metadata {
	font-size: 0.8rem;
	color: var(--ahc-muted);
	margin: 0.25rem 0 0.75rem;
}

.ahc-comments__list .comment-metadata a,
.ahc-comments__list .reply a {
	color: var(--ahc-violet);
	text-decoration: none;
	font-weight: 700;
}

.ahc-comment-form input[type="text"],
.ahc-comment-form input[type="email"],
.ahc-comment-form input[type="url"],
.ahc-comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	font-family: var(--ahc-sans);
	font-size: 0.95rem;
	padding: 0.8rem 1rem;
	border: 1px solid var(--ahc-line);
	border-radius: 0.85rem;
	background: #fff;
	color: var(--ahc-ink);
}

.comment-form textarea:focus,
.comment-form input:focus {
	outline: none;
	border-color: var(--ahc-violet);
	box-shadow: 0 0 0 3px rgba(82, 0, 204, 0.15);
}

.comment-form .submit {
	font-family: var(--ahc-sans);
	font-weight: 800;
	color: #fff;
	background: var(--ahc-violet);
	border: 0;
	border-radius: 999px;
	padding: 0.85rem 1.8rem;
	cursor: pointer;
}

.comment-form .submit:hover {
	background: var(--ahc-violet-dark);
}

/* ------------------------------------------------------- footer credit */

/*
 * Centred on the page rather than between its siblings: the copyright and the
 * back-to-top button have different widths, so plain flex centring would sit
 * the credit off-centre. Absolute positioning pins it to the true midpoint.
 * On narrow screens the row stacks and it centres naturally in flow.
 */
.ahc-footer-credit {
	text-align: center;
	color: #475569;
}

@media (min-width: 640px) {
	.ahc-footer-credit {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		white-space: nowrap;
	}
}

/*
 * Between 640px and 1023px the credit is wide enough to collide with the
 * copyright if absolutely centred, so it drops to its own full-width line.
 * That needs flex-wrap on the row -- without it, flex-basis:100% just stretches
 * the item in place and it never moves down.
 */
@media (min-width: 640px) and (max-width: 1023px) {
	.ahc-footer-bottom {
		flex-wrap: wrap;
	}

	.ahc-footer-credit {
		position: static;
		transform: none;
		white-space: normal;
		flex-basis: 100%;
		order: 3;
	}
}

/* --------------------------------------------------------------- misc */

.ahc-nav-link {
	color: #334155;
	font-family: var(--ahc-sans);
	font-weight: 700;
	font-size: 0.875rem;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ahc-nav-link:hover {
	color: var(--ahc-violet);
}

.ahc-page-links {
	margin-top: 2rem;
	font-family: var(--ahc-sans);
	font-weight: 700;
}

.ahc-page-links a {
	color: var(--ahc-violet);
	margin: 0 0.3rem;
}

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

.screen-reader-text:focus {
	background: #fff;
	clip: auto;
	clip-path: none;
	color: var(--ahc-violet);
	display: block;
	font-size: 0.9rem;
	font-weight: 800;
	height: auto;
	left: 1rem;
	line-height: normal;
	padding: 0.9rem 1.2rem;
	text-decoration: none;
	top: 1rem;
	width: auto;
	z-index: 100000;
	border-radius: 0.75rem;
	box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

/* Admin bar offset for the sticky header. */
body.admin-bar .ahc-page-hero {
	scroll-margin-top: 46px;
}

@media (min-width: 783px) {
	body.admin-bar .ahc-page-hero {
		scroll-margin-top: 32px;
	}
}
