/*
 * Heartfriends Inn — memorial edition.
 * Rebuilt from the 2013–2017 "Womanish" WordPress theme (SMThemes, CC 3.0):
 * same textures, colours, fonts and layout, without WordPress/jQuery.
 */

@font-face {
	font-family: "Century Schoolbook";
	src: url("../fonts/century-schoolbook.woff") format("woff");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Century Schoolbook";
	src: url("../fonts/century-schoolbook-italic.woff") format("woff");
	font-weight: normal;
	font-style: italic;
	font-display: swap;
}
/* The hand-lettered face the original site used for page text */
@font-face {
	font-family: "Eurofurence";
	src: url("../fonts/eurofurence.woff") format("woff");
	font-display: swap;
}

:root {
	--text: #1f1f1f;
	--heading: #3a3a3a;
	--muted: #7a776f;
	--link: #d43334;
	--link-hover: #ff7905;
	--menu-hover: #ffbb2b;
	--red-dark: #900b0c;
	--rule: #9c9c9c;
	--panel: #fff;
	--cream: #f3eee2;
	--serif: "Century Schoolbook", "TeX Gyre Schola", "Century Schoolbook L", Georgia, serif;
	--display: Cambria, "Century Schoolbook", Georgia, serif;
	--hand: "Eurofurence", "Century Schoolbook", Georgia, serif;
	--page: 1000px;
	--sidebar: 272px;
}

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

html {
	background: #f1ece0 url("../img/theme/back.webp") fixed;
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	color: var(--text);
	font: 15px/1.6 var(--serif);
	border-top: 6px solid #d3c39a;
	background: url("../img/theme/back-header.webp") no-repeat center top;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.site-footer { margin-top: auto; }
body > .container { margin-bottom: 40px; }

a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 2px; }

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

h1, h2, h3, h4 {
	color: var(--heading);
	font-family: var(--display);
	font-weight: bold;
	font-style: italic;
	line-height: 1.25;
}
h1 { font-size: 26px; margin: 0.6em 0 0.5em; }
h2 { font-size: 21px; margin: 1.4em 0 0.5em; }
h3 { font-size: 19px; margin: 0 0 0.5em; }

.container { width: min(var(--page), 100% - 32px); margin-inline: auto; }

.skip-link {
	position: absolute; left: -9999px; top: 8px;
	background: var(--panel); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------ HEADER */
.site-top {
	min-height: 123px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px 0 16px;
}
.dedication {
	margin: 0;
	font-family: var(--serif);
	font-style: italic;
	color: #6b6455;
	font-size: 17px;
	letter-spacing: 0.02em;
}
.dedication a { color: inherit; }
.dedication a:hover { color: var(--link); }
.dedication strong { font-weight: normal; color: var(--red-dark); }

/* Main menu — the red stitched-leather bar */
.mainmenu {
	position: relative;
	z-index: 20;
	min-height: 46px;
	background: var(--red-dark) url("../img/theme/back-menu.webp") no-repeat center top / 100% 100%;
	border-radius: 4px;
}
.mainmenu > ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0 10px; list-style: none; }
.mainmenu li { position: relative; }
.mainmenu a {
	display: block;
	padding: 12px 20px;
	color: #fff;
	font-size: 16px;
	text-shadow: 1px 1px 1px #000;
}
.mainmenu a:hover, .mainmenu a:focus-visible,
.mainmenu a[aria-current="page"] {
	color: var(--menu-hover);
	font-style: italic;
	text-decoration: none;
}
.mainmenu .sub-menu {
	position: absolute;
	left: 0;
	top: 100%;
	min-width: 200px;
	margin: 4px 0 0;
	padding: 8px 0;
	list-style: none;
	background: var(--red-dark);
	border-radius: 5px;
	box-shadow: 0 1px 2px #2a251f;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.mainmenu li:hover > .sub-menu,
.mainmenu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mainmenu .sub-menu a { padding: 4px 24px; font-size: 14px; white-space: nowrap; text-shadow: none; }

.menu-toggle { display: none; }

/* Slider */
.slider {
	position: relative;
	margin: 12px auto 0;
	padding: 5px 10px;
	background: url("../img/theme/back-slider.webp") center / 100% 100% no-repeat;
}
.slides { position: relative; aspect-ratio: 980 / 320; overflow: hidden; }
.slides img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1s ease;
}
.slides img.is-active { opacity: 1; }
.slider-btn {
	position: absolute; top: 50%; z-index: 2;
	width: 36px; height: 34px; margin-top: -17px;
	border: 0; padding: 0; cursor: pointer;
	background: no-repeat center;
}
.slider-btn.prev { left: 10px; background-image: url("../img/theme/slide-left.png"); }
.slider-btn.next { right: 10px; background-image: url("../img/theme/slide-right.png"); }
.slider-pager { display: flex; justify-content: center; gap: 8px; padding: 10px 0 0; }
.slider-pager button {
	width: 10px; height: 10px; padding: 0; border: 0; cursor: pointer;
	background: url("../img/theme/slider-page.png") center no-repeat;
}
.slider-pager button[aria-current="true"] { background-image: url("../img/theme/slider-page-active.png"); }
.no-js .slider-btn, .no-js .slider-pager { display: none; }

/* ------------------------------------------------------------ CONTENT */
.content {
	margin-top: 22px;
	background: var(--panel);
	display: grid;
	grid-template-columns: 1fr var(--sidebar);
	box-shadow: 0 0 0 1px #e4ded0;
}
.content.no-sidebar { grid-template-columns: 1fr; }

.main { padding: 10px 40px 40px; min-width: 0; }

/* Page text: the original set paragraphs at 20px in the hand-lettered face */
.post-body p,
.post-body li { font-family: var(--hand); font-size: 20px; line-height: 1.45; color: #444; }
.post-body > p:first-child { margin-top: 0; }
.post-body ul { padding-left: 1.3em; }
.post-body figure { margin: 0 0 1.4em; }
.post-body figure img { margin-inline: auto; }
.post-body figcaption { font: italic 14px/1.4 var(--serif); color: var(--muted); margin-top: 6px; text-align: center; }

.page-title { border-bottom: 1px solid #e5e5e5; padding-bottom: 12px; }

.photo { background: #fff; border: 1px solid #93918b; padding: 3px; }

.lede-photo { max-width: 584px; margin-inline: auto; }

.notice {
	margin: 0 0 28px;
	padding: 18px 22px;
	background: #fbf8f1 url("../img/theme/back-widget-content.webp") no-repeat right top;
	border: 1px solid #e3dccb;
	border-left: 4px solid var(--red-dark);
	font: italic 16px/1.55 var(--serif);
	color: #4a4538;
}
.notice p, .post-body .notice p { margin: 0 0 8px; font: inherit; color: inherit; }
.notice p:last-child { margin-bottom: 0; }

.room-list { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 14px; }
.room-list a {
	display: block;
	padding: 14px 18px;
	border: 1px dashed var(--rule);
	font: italic bold 20px var(--display);
	color: var(--heading);
}
.room-list a:hover { color: var(--link-hover); border-color: var(--link); text-decoration: none; }
.room-list span { display: block; font: normal 15px/1.5 var(--serif); color: var(--muted); margin-top: 4px; }

.room-meta { font: italic 15px var(--serif); color: var(--muted); }

.pager-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 14px; border-top: 1px solid #e5e5e5; font-style: italic; }

/* Buttons — the leather "read more" */
.button {
	display: inline-block;
	padding: 0 18px;
	height: 36px;
	border: 0;
	border-radius: 5px;
	color: #fff;
	font: italic 15px/36px var(--serif);
	text-shadow: 1px 1px 1px #420506;
	background: #9e0e10 url("../img/theme/back-readmore.webp") repeat-x center / auto 100%;
	cursor: pointer;
}
.button:hover, .button:focus-visible {
	color: #fff;
	text-decoration: none;
	background-image: url("../img/theme/back-readmore-hover.webp");
}

/* ------------------------------------------------------------ SIDEBAR */
.sidebar {
	border-left: 1px dashed var(--rule);
	padding: 0 0 20px;
}
.widget {
	padding: 22px 22px 30px;
	background: url("../img/theme/back-widget-content.webp") no-repeat left top;
	border-bottom: 1px dashed var(--rule);
	font-size: 14px;
	line-height: 1.55;
}
.widget:last-child { border-bottom: 0; }
.widget h3 { margin-bottom: 10px; }
.widget ul { margin: 8px 0 0; padding-left: 1.1em; }
.widget li { margin: 0 0 6px; }
.widget .button { margin-top: 10px; }
.widget-portrait { width: 140px; margin: 0 auto 12px; }

/* ------------------------------------------------------------ MEMORIAL */
.memorial-head { text-align: center; padding: 10px 0 6px; }
.memorial-head .portrait { width: min(560px, 100%); margin: 10px auto 22px; }
.memorial-head h1 { font-size: 34px; margin: 0; border: 0; }
.memorial-head .dates { font: italic 18px var(--serif); color: var(--muted); margin: 6px 0 0; }
.flourish { text-align: center; color: #c9b98f; font-size: 22px; letter-spacing: 0.6em; margin: 20px 0; }

/* Memory wall */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 10px 0 30px; }
.memory {
	margin: 0;
	padding: 18px 20px 16px;
	background: #fffdf6;
	border: 1px solid #e6dfcc;
	box-shadow: 0 1px 3px rgba(60, 45, 20, .08);
	position: relative;
}
.memory::before {
	content: "\201C";
	position: absolute; top: -6px; left: 10px;
	font: 54px/1 Georgia, serif;
	color: #e3c9c9;
}
.memory blockquote { margin: 0; }
.memory blockquote p { font-size: 19px; margin: 0 0 10px; position: relative; }
.memory { display: flex; flex-direction: column; }
.memory blockquote { flex: 1; }
.post-body .memory figcaption { font: italic 14px/1.4 var(--serif); color: var(--muted); text-align: left; margin: 0; }
.memory figcaption strong { font-style: normal; color: var(--heading); font-weight: normal; }
.wall-empty { font: italic 16px var(--serif); color: var(--muted); }

.share {
	margin-top: 10px;
	padding: 22px;
	background: #fbf8f1;
	border: 1px dashed var(--rule);
}
.share h2 { margin-top: 0; }

.memory-form { display: grid; gap: 16px; margin-top: 18px; max-width: 620px; }
.memory-form .field { display: grid; gap: 5px; }
.memory-form label { font: italic 15px var(--serif); color: var(--heading); }
.memory-form label small { font-size: 13px; color: var(--muted); }
.memory-form label span { color: var(--link); }
.memory-form input, .memory-form textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #d8d8d8;
	border-radius: 3px;
	background: #fff;
	color: var(--text);
	font: 17px/1.45 var(--serif);
}
.memory-form textarea { resize: vertical; min-height: 140px; }
.memory-form input:focus, .memory-form textarea:focus { outline: 2px solid var(--link-hover); outline-offset: 0; border-color: transparent; }
.memory-form .button { justify-self: start; }
.memory-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------ FOOTER */
.site-footer {
	background: #8f0b0c url("../img/theme/back-footer.webp") repeat;
	color: #fff;
}
.site-footer .footer-inner {
	padding: 26px 0;
	text-align: center;
	background: url("../img/theme/back-footer-txt.webp") repeat;
}
.site-footer p { margin: 0 0 6px; text-shadow: 0 2px 2px #460c0c; }
.site-footer .tagline { font: italic bold 20px var(--display); }
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover { color: var(--menu-hover); }
.site-footer small { font-size: 13px; opacity: .85; }

.to-top {
	position: fixed; right: 18px; bottom: 18px; z-index: 50;
	width: 40px; height: 40px; border-radius: 50%;
	background: rgba(0, 0, 0, .55) url("../img/theme/arrow-up.png") center / 22px no-repeat;
	opacity: 0; visibility: hidden; transition: opacity .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }

/* ------------------------------------------------------------ TABLET */
@media (max-width: 1023px) {
	body { background-size: 1300px auto; }
	.content { grid-template-columns: 1fr 240px; }
	.main { padding: 10px 26px 30px; }
	.mainmenu a { padding: 12px 14px; }
}

/* ------------------------------------------------------------ MOBILE */
@media (max-width: 720px) {
	body { font-size: 16px; background-size: 900px auto; }
	.site-top { min-height: 0; padding: 16px 0 10px; }
	.dedication { font-size: 15px; }

	.mainmenu { background-size: cover; }
	.menu-toggle {
		display: flex; align-items: center; gap: 10px;
		width: 100%; min-height: 46px; padding: 0 16px;
		background: none; border: 0; color: #fff;
		font: italic 17px var(--serif); text-shadow: 1px 1px 1px #000; cursor: pointer;
	}
	.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
		display: block; width: 20px; height: 2px; background: #fff; position: relative;
	}
	.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
	.menu-toggle .bars::before { top: -6px; }
	.menu-toggle .bars::after { top: 6px; }
	.mainmenu > ul { display: none; flex-direction: column; padding: 0 0 10px; }
	.mainmenu.is-open > ul { display: flex; }
	.no-js .mainmenu > ul { display: flex; }
	.no-js .menu-toggle { display: none; }
	.mainmenu a { padding: 10px 18px; border-top: 1px solid rgba(255, 255, 255, .15); }
	.mainmenu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; background: none; margin: 0; padding: 0 0 0 16px; min-width: 0;
	}
	.mainmenu .sub-menu a { font-size: 15px; white-space: normal; }

	.slider { padding: 0; background: none; }
	.slider-btn { display: none; }

	.content, .content.no-sidebar { grid-template-columns: 1fr; }
	.main { padding: 6px 16px 26px; }
	.sidebar { border-left: 0; border-top: 1px dashed var(--rule); }
	.post-body p, .post-body li { font-size: 19px; }
	.memorial-head h1 { font-size: 28px; }
}
