/* Sten Perillus: core styles */

:root {
	--sp-red: #E10600;
	--sp-red-dark: #B80500;
	--sp-pink: #FDE3E3;
	--sp-pink-soft: #FFF6F6;
	--sp-ink: #111;
	--sp-muted: #6B6B6B;
	--sp-line: #F2CFCF;
	--sp-white: #fff;
	--sp-radius: 10px;
	--sp-container: 1180px;
	--sp-pad-x: 40px;
	--sp-section-y: 72px;
	--sp-header-h: 76px;
	--sp-shadow: 0 6px 24px rgba(17, 17, 17, .06);
	--sp-font: 'Figtree', system-ui, sans-serif;
	--sp-font-display: 'Barlow Condensed', Impact, sans-serif;
}

@media (max-width: 720px) {
	:root {
		--sp-pad-x: 20px;
		--sp-section-y: 48px;
		--sp-header-h: 64px;
	}
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	background: var(--sp-pink-soft);
	color: var(--sp-ink);
	font-family: var(--sp-font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--sp-red); text-underline-offset: 3px; }
a:hover { color: var(--sp-red-dark); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sp-red); outline-offset: 2px; }
.sp-main:focus { outline: none; }

/* Utilities */
.sp-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.sp-skip-link {
	position: absolute;
	left: 12px; top: -100px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--sp-ink);
	color: var(--sp-white);
	border-radius: var(--sp-radius);
	text-decoration: none;
	font-weight: 600;
}
.sp-skip-link:focus { top: 12px; color: var(--sp-white); }

.sp-container {
	width: 100%;
	max-width: calc(var(--sp-container) + 2 * var(--sp-pad-x));
	margin-inline: auto;
	padding-inline: var(--sp-pad-x);
}
.sp-section { padding-block: var(--sp-section-y); }

/* Buttons and links */
.sp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 12px 22px;
	border: 2px solid var(--sp-red);
	border-radius: var(--sp-radius);
	background: var(--sp-red);
	color: var(--sp-white);
	font: 600 16px/1.2 var(--sp-font);
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}
.sp-btn:hover, .sp-btn:focus-visible { background: var(--sp-red-dark); border-color: var(--sp-red-dark); color: var(--sp-white); }
.sp-btn--ghost { background: transparent; color: var(--sp-red); }
.sp-btn--ghost:hover, .sp-btn--ghost:focus-visible { background: var(--sp-red); border-color: var(--sp-red); color: var(--sp-white); }
.sp-btn .sp-icon-arrow, .sp-btn .sp-icon-heart { flex: none; }

.sp-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--sp-red);
	font-weight: 600;
	text-decoration: none;
}
.sp-link-arrow:not(:has(svg))::after { content: "\2192"; }
.sp-link-arrow--back:not(:has(svg))::after { content: none; }
.sp-link-arrow--back::before { content: "\2190"; }
.sp-link-arrow:hover { color: var(--sp-red-dark); }
.sp-link-arrow .sp-icon-arrow { transition: transform .2s; }
.sp-link-arrow:hover .sp-icon-arrow { transform: translateX(3px); }

/* Headings */
.sp-heading {
	position: relative;
	margin: 0 0 28px;
	padding-bottom: 14px;
	font-size: clamp(26px, 3vw, 34px);
	font-weight: 800;
}
.sp-heading::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	width: 48px; height: 4px;
	border-radius: 2px;
	background: var(--sp-red);
}

.sp-banner-title {
	display: inline-block;
	margin: 0 0 40px;
	padding: 10px 34px 12px 26px;
	background: var(--sp-red);
	color: var(--sp-white);
	font-family: var(--sp-font-display);
	font-style: italic;
	font-weight: 800;
	font-size: clamp(32px, 5vw, 56px);
	line-height: 1;
	letter-spacing: -.01em;
	text-transform: uppercase;
	transform: rotate(-3deg);
	transform-origin: left bottom;
	clip-path: polygon(0 6%, 100% 0, 97% 100%, 1.5% 100%);
	max-width: 100%;
	overflow-wrap: anywhere;
}
.sp-banner-title > span { display: inline-block; transform: skewX(-6deg); }

/* Header */
.sp-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--sp-white);
	box-shadow: 0 1px 0 rgba(17, 17, 17, .06);
}
.admin-bar .sp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sp-header { top: 0; position: relative; } }
.sp-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: var(--sp-header-h);
}
.sp-header__panel {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.sp-logo {
	display: inline-flex;
	align-items: baseline;
	flex: none;
	color: var(--sp-ink);
	font-family: var(--sp-font-display);
	font-size: 30px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	letter-spacing: -.01em;
}
.sp-logo:hover { color: var(--sp-ink); }
.sp-logo__first { font-weight: 500; }
.sp-logo__second { font-weight: 800; margin-left: .2em; }
.sp-logo .custom-logo { max-height: 48px; width: auto; }

.sp-nav { flex: 1; display: flex; justify-content: center; }
.sp-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sp-nav__list a {
	position: relative;
	display: block;
	padding: 8px 0;
	color: var(--sp-ink);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}
.sp-nav__list a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	background: var(--sp-red);
	transform: scaleX(0);
	transition: transform .2s;
}
.sp-nav__list a:hover { color: var(--sp-red); }
.sp-nav__list .current-menu-item > a,
.sp-nav__list .current_page_item > a,
.sp-nav__list .current_page_parent > a,
.sp-nav__list .current-menu-ancestor > a { color: var(--sp-red); font-weight: 600; }
.sp-nav__list .current-menu-item > a::after,
.sp-nav__list .current_page_item > a::after,
.sp-nav__list .current_page_parent > a::after,
.sp-nav__list .current-menu-ancestor > a::after { transform: scaleX(1); }

.sp-header__cta { min-height: 40px; padding: 8px 16px; font-size: 14px; white-space: nowrap; }

.sp-header .sp-nav-toggle {
	display: none;
	margin-left: auto;
	width: 44px; height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--sp-radius);
	background: transparent;
	color: var(--sp-ink);
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.sp-nav-toggle__bar,
.sp-nav-toggle__bar::before,
.sp-nav-toggle__bar::after {
	display: block;
	width: 24px; height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .2s, opacity .2s;
}
.sp-nav-toggle__bar { position: relative; }
.sp-nav-toggle__bar::before,
.sp-nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.sp-nav-toggle__bar::before { top: -7px; }
.sp-nav-toggle__bar::after { top: 7px; }
.sp-nav-toggle[aria-expanded="true"] .sp-nav-toggle__bar { background: transparent; }
.sp-nav-toggle[aria-expanded="true"] .sp-nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.sp-nav-toggle[aria-expanded="true"] .sp-nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
	.sp-header__inner { gap: 16px; }
	.sp-header .sp-nav-toggle { display: inline-flex; }
	.sp-header__panel {
		display: none;
		position: absolute;
		left: 0; right: 0; top: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 12px var(--sp-pad-x) 24px;
		background: var(--sp-white);
		box-shadow: 0 12px 24px rgba(17, 17, 17, .08);
	}
	.sp-nav-open .sp-header__panel { display: flex; }
	.sp-nav { justify-content: flex-start; }
	.sp-nav__list { flex-direction: column; gap: 0; width: 100%; }
	.sp-nav__list a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--sp-line); }
	.sp-nav__list a::after { display: none; }
	.sp-header__cta { align-self: flex-start; }
}
@media (max-width: 720px) {
	.sp-logo { font-size: 26px; }
}

/* Hero */

/* Content */
.sp-content { max-width: 760px; font-size: 18px; }
.sp-content > * + * { margin-top: 1em; }
.sp-content h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 1.6em; }
.sp-content h3 { font-size: clamp(20px, 2.2vw, 24px); margin-top: 1.4em; }
.sp-content img { border-radius: var(--sp-radius); }
.sp-content ul, .sp-content ol { padding-left: 1.3em; }
.sp-content blockquote {
	margin: 1.5em 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--sp-red);
	font-size: 1.1em;
	font-weight: 600;
}
.sp-content .alignwide { max-width: none; }
.sp-content figure { margin: 1.5em 0; }
.sp-content figcaption { color: var(--sp-muted); font-size: 14px; margin-top: 6px; }
.sp-page-links { margin-top: 24px; font-weight: 600; }

/* Post card: grid */
.sp-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--sp-white);
	border-radius: var(--sp-radius);
	box-shadow: var(--sp-shadow);
}
.sp-card__media { display: block; aspect-ratio: 800 / 520; overflow: hidden; background: var(--sp-pink); }
.sp-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.sp-card:hover .sp-card__img { transform: scale(1.03); }
.sp-card__body { flex: 1; display: flex; flex-direction: column; padding: 16px 20px 22px; }
.sp-card__date { color: var(--sp-muted); font-size: 13px; }
.sp-card__title { margin: 6px 0 10px; font-size: 20px; line-height: 1.25; font-weight: 700; }
.sp-card__title a { color: var(--sp-ink); text-decoration: none; }
.sp-card__title a:hover { color: var(--sp-red); }
.sp-card__excerpt { color: #444; font-size: 15px; line-height: 1.55; }
.sp-card__more { margin-top: auto; font-size: 15px; }

/* Post card: row */
.sp-post-list { display: grid; gap: 22px; }
.sp-post-row {
	display: grid;
	grid-template-columns: minmax(0, 39fr) minmax(0, 61fr);
	gap: 32px;
	align-items: center;
	padding: 0 24px 0 0;
	background: var(--sp-white);
	border-radius: var(--sp-radius);
	box-shadow: var(--sp-shadow);
	overflow: hidden;
}
.sp-post-row__media { display: block; height: 100%; min-height: 240px; overflow: hidden; background: var(--sp-pink); }
.sp-post-row__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.sp-post-row:hover .sp-post-row__img { transform: scale(1.03); }
.sp-post-row__body { min-width: 0; padding-block: 24px; }
.sp-post-row__date { color: var(--sp-muted); font-size: 14px; }
.sp-post-row__title { margin: 8px 0 12px; font-size: clamp(22px, 2.4vw, 27px); font-weight: 700; line-height: 1.2; }
.sp-post-row__title a { color: var(--sp-ink); text-decoration: none; }
.sp-post-row__title a:hover { color: var(--sp-red); }
.sp-post-row__excerpt { color: #333; font-size: 16px; }
@media (max-width: 720px) {
	.sp-post-row { grid-template-columns: 1fr; gap: 0; padding: 0; }
	.sp-post-row__media { min-height: 0; aspect-ratio: 800 / 520; }
	.sp-post-row__body { padding: 18px 20px 22px; }
}

/* Pagination */
.sp-pagination { margin-top: 40px; }
.sp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px; height: 42px;
	padding: 0 14px;
	border: 1px solid var(--sp-line);
	border-radius: var(--sp-radius);
	background: var(--sp-white);
	color: var(--sp-ink);
	font-weight: 600;
	text-decoration: none;
}
.sp-pagination .page-numbers.current,
.sp-pagination a.page-numbers:hover { background: var(--sp-red); border-color: var(--sp-red); color: var(--sp-white); }
.sp-pagination .page-numbers.dots { border: 0; background: none; }

/* Single */
.sp-single__inner { max-width: calc(860px + 2 * var(--sp-pad-x)); }
.sp-single__back { margin-bottom: 24px; }
.sp-single__date { color: var(--sp-muted); font-size: 15px; }
.sp-single__reading { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--sp-red); font-size: 15px; font-weight: 600; }
.sp-single__reading-icon { flex: 0 0 auto; }
.sp-single__title { margin: 6px 0 24px; font-size: clamp(30px, 4.4vw, 46px); }
.sp-single__media { margin: 0 0 32px; }
.sp-single__img { width: 100%; border-radius: var(--sp-radius); }
.sp-single .sp-content { max-width: none; }
.sp-single__footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--sp-line); }

/* Single post: previous / next navigation */
.sp-post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sp-post-nav__link {
	display: flex; align-items: center; gap: 14px; min-width: 0;
	padding: 14px; border-radius: var(--sp-radius);
	background: var(--sp-white); box-shadow: var(--sp-shadow);
	color: var(--sp-ink); text-decoration: none;
	transition: transform .2s, box-shadow .2s;
}
.sp-post-nav__link:hover, .sp-post-nav__link:focus-visible { transform: translateY(-2px); }
.sp-post-nav__link--next { flex-direction: row-reverse; text-align: right; }
.sp-post-nav__media { flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; border-radius: calc(var(--sp-radius) - 2px); }
.sp-post-nav__img { width: 100%; height: 100%; object-fit: cover; }
.sp-post-nav__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-post-nav__label { color: var(--sp-red); font-size: 14px; font-weight: 600; }
.sp-post-nav__link--prev .sp-post-nav__label::before { content: "← "; }
.sp-post-nav__link--next .sp-post-nav__label::after { content: " →"; }
.sp-post-nav__title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }

@media (max-width: 720px) {
	.sp-post-nav { grid-template-columns: minmax(0, 1fr); }
	.sp-post-nav__spacer { display: none; }
	.sp-post-nav__media { flex-basis: 60px; width: 60px; height: 60px; }
}

/* 404 */
.sp-404__inner { text-align: center; }
.sp-404__code { margin-bottom: 24px; }
.sp-404__title { font-size: clamp(28px, 4vw, 40px); }
.sp-404__text { max-width: 520px; margin: 0 auto 28px; color: var(--sp-muted); }
.sp-404__search { max-width: 480px; margin: 40px auto 0; }

/* Search */
.sp-search { display: flex; gap: 8px; }
.sp-search__input {
	flex: 1;
	min-width: 0;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--sp-line);
	border-radius: var(--sp-radius);
	background: var(--sp-white);
	font: inherit;
	color: var(--sp-ink);
}
.sp-search__input:focus { border-color: var(--sp-red); outline: none; box-shadow: 0 0 0 3px var(--sp-pink); }
.sp-empty { max-width: 520px; }

/* Social */
.sp-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sp-social__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px; height: 36px;
	text-decoration: none;
	transition: background-color .2s, transform .2s;
}
.sp-social__icon { width: 20px; height: 20px; }
.sp-social--round .sp-social__link { border-radius: 50%; background: var(--sp-ink); color: var(--sp-white); }
.sp-social--round .sp-social__link:hover { background: var(--sp-red); color: var(--sp-white); }
.sp-social--square .sp-social__link { width: 44px; height: 44px; border-radius: 8px; background: var(--sp-red); color: var(--sp-white); }
.sp-social--square .sp-social__icon { width: 22px; height: 22px; }
.sp-social--square .sp-social__link:hover { background: var(--sp-red-dark); color: var(--sp-white); transform: translateY(-2px); }

/* Footer */
.sp-footer { background: var(--sp-white); padding-block: 36px; }
.sp-footer__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 32px;
}
.sp-footer__brand { padding-right: 32px; border-right: 1px solid var(--sp-line); }
.sp-footer__tagline { margin: 4px 0 0; color: var(--sp-red); font-size: 18px; font-weight: 500; }
.sp-footer__nav { padding-right: 32px; border-right: 1px solid var(--sp-line); align-self: stretch; display: flex; align-items: center; }
.sp-footer__menu { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0; padding: 0; list-style: none; }
.sp-footer__menu a { color: var(--sp-ink); font-size: 15px; text-decoration: none; }
.sp-footer__menu a:hover, .sp-footer__menu .current-menu-item > a { color: var(--sp-red); }
.sp-footer__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; grid-column: 3; }
.sp-footer__copy { margin: 0; color: var(--sp-muted); font-size: 13px; }

@media (max-width: 960px) {
	.sp-footer__inner { grid-template-columns: 1fr; gap: 24px; }
	.sp-footer__brand, .sp-footer__nav { padding-right: 0; border-right: 0; }
	.sp-footer__nav { padding-block: 20px; border-block: 1px solid var(--sp-line); }
	.sp-footer__meta { grid-column: auto; align-items: flex-start; }
}
