/*
Theme Name: Nolleuppdrag
Theme URI: https://yfadderiet.se/
Description: Sektionstema i svart och skrikgult, inspirerat av Y-Fadderiets webb. Wireframeaktig layout med hårfina ramar, sticky gul navbar och snedställd banderoll. Ingen fot, inga kategorier.
Author: Y-Fadderiet
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nolleuppdrag
Tags: one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

@font-face {
	font-family: "yffont";
	src: url("assets/fonts/yffont.ttf") format("truetype"), local("yffont");
	font-display: swap;
}

:root {
	--yellow: #fff200;
	--black: #000;
	--ink: #111;
	--paper: #f8f8f8;
	--line: #111;
	--hairline: 1px solid var(--line);
	--wrap: 1140px;
	--font: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--display: "yffont", "Times New Roman", Times, serif;
}

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.55;
	color: var(--ink);
	background: var(--black);
	overflow-y: scroll;
}

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

a {
	color: var(--ink);
	text-decoration-color: var(--yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
	overflow-wrap: break-word;
}

/* yffont (BlackChancery) is calligraphic — it needs air, not uppercase or tight tracking. */
h1,
h2,
h3,
h4 {
	font-family: var(--display);
	font-weight: normal;
	line-height: 1.15;
	margin: 0 0 .4em;
}

h1 {
	font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
	font-size: clamp(1.5rem, 3.5vw, 2.1rem);
}

h3 {
	font-size: 1.35rem;
}

.wrap {
	width: min(100% - 2rem, var(--wrap));
	margin-inline: auto;
}

.label {
	font-family: var(--mono);
	font-size: .7rem;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.skip-link {
	position: absolute;
	left: -9999px;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
	z-index: 1000;
	background: var(--yellow);
	color: var(--black);
	padding: .5rem 1rem;
}

/* --- Banderoll --- */

/* Padding is generous so the rotated tagline does not spill onto the nav. */
.site-banner {
	background: var(--black);
	padding: 34px 0;
}

.site-banner .wrap {
	display: flex;
	align-items: center;
	gap: 32px;
	flex-wrap: wrap;
}

.site-banner .custom-logo-link img {
	max-height: 90px;
	width: auto;
}

.site-title {
	font-family: var(--display);
	font-size: clamp(2.4rem, 7vw, 4.6rem);
	margin: 0;
	line-height: 1;
}

.site-title a {
	color: var(--yellow);
	text-decoration: none;
}

.site-tagline {
	transform: rotate(-10deg);
	color: var(--yellow);
	font-family: var(--display);
	font-size: clamp(1.1rem, 2.4vw, 2rem);
	line-height: 1.15;
	white-space: pre-line;
	margin: 0;
}

/* --- Sticky gul navbar --- */

.site-nav {
	position: sticky;
	top: 0;
	z-index: 999;
	background: var(--yellow);
	border-block: 2px solid var(--black);
}

.site-nav .wrap {
	display: flex;
	align-items: stretch;
}

.nav-toggle {
	display: none;
	background: none;
	border: 0;
	font-family: var(--mono);
	font-size: .8rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--black);
	padding: 12px 4px;
	cursor: pointer;
}

.site-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
}

.site-nav li {
	position: relative;
	border-right: var(--hairline);
}

.site-nav li:first-child {
	border-left: var(--hairline);
}

.site-nav a {
	display: block;
	padding: 7px 16px;
	color: var(--black);
	text-decoration: none;
	font-family: var(--display);
	font-size: 19px;
	line-height: 1.5;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a {
	background: var(--black);
	color: var(--yellow);
}

.site-nav ul ul {
	display: none;
	position: absolute;
	left: -1px;
	top: 100%;
	min-width: 220px;
	flex-direction: column;
	background: var(--yellow);
	border: 2px solid var(--black);
	border-top: 0;
}

.site-nav ul ul li {
	border-right: 0;
	border-left: 0;
	border-bottom: var(--hairline);
}

.site-nav li:hover > ul,
.site-nav li:focus-within > ul {
	display: flex;
}

/* --- Innehåll --- */

.site-main {
	background: var(--paper);
	border-bottom: 2px solid var(--black);
	padding: 40px 0 64px;
	min-height: 70vh;
}

.page-title {
	border-bottom: 2px solid var(--line);
	padding-bottom: .15em;
	margin-bottom: 32px;
}

/* Rutnät av rutor i stället för ett blogg-flöde */
.entry-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.entry {
	border: var(--hairline);
	background: transparent;
	padding: 20px;
}

.entry-title {
	margin: 0 0 .3em;
	font-size: 1.6rem;
}

.entry-title a {
	color: var(--ink);
	text-decoration: none;
}

.entry-title a:hover {
	text-decoration: underline;
}

.entry-thumb {
	display: block;
	margin: 0 0 16px;
	border: var(--hairline);
	line-height: 0;
}

.entry-summary p {
	margin: 0 0 .8em;
}

.entry-summary p:last-child {
	margin-bottom: 0;
}

/* Enskild sida/inlägg: en ruta, full bredd */
.entry-single {
	border: var(--hairline);
	padding: 32px;
	background: transparent;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.4em;
}

.entry-content blockquote {
	margin: 1.5rem 0;
	padding: .5rem 1.25rem;
	border-left: 6px solid var(--yellow);
	background: transparent;
}

.entry-content pre {
	border: var(--hairline);
	padding: 12px;
	overflow-x: auto;
}

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

.entry-content th,
.entry-content td {
	border: var(--hairline);
	padding: .4rem .6rem;
	text-align: left;
}

.entry-content img {
	border: var(--hairline);
}

/* --- Länkknapp --- */

.more-link,
.wp-block-button__link {
	display: inline-block;
	margin-top: .6rem;
	border: var(--hairline);
	background: transparent;
	color: var(--ink);
	text-decoration: none;
	padding: 6px 14px;
	font-family: var(--mono);
	font-size: .75rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	border-radius: 0;
	box-shadow: none;
}

.more-link:hover,
.wp-block-button__link:hover {
	background: var(--yellow);
}

/* --- Sök --- */

.search-form {
	display: flex;
	max-width: 420px;
	margin-bottom: 32px;
}

.search-form input[type="search"] {
	flex: 1;
	font: inherit;
	padding: 8px 10px;
	border: var(--hairline);
	background: transparent;
	min-width: 0;
}

.search-form button {
	font-family: var(--mono);
	font-size: .75rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	border: var(--hairline);
	border-left: 0;
	background: transparent;
	padding: 8px 16px;
	cursor: pointer;
}

.search-form button:hover {
	background: var(--yellow);
}

/* --- Paginering --- */

.pagination {
	margin-top: 32px;
	font-family: var(--mono);
	font-size: .8rem;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin-right: -1px;
	border: var(--hairline);
	color: var(--ink);
	text-decoration: none;
}

.pagination .current,
.pagination .page-numbers:hover {
	background: var(--yellow);
}

/* --- Mobil --- */

@media (max-width: 782px) {
	.site-banner {
		padding: 14px 0;
	}

	.site-tagline {
		font-size: 1.1rem;
	}

	.nav-toggle {
		display: block;
	}

	.site-nav .wrap {
		flex-direction: column;
	}

	.site-nav ul {
		display: none;
		flex-direction: column;
		padding-bottom: 8px;
	}

	.site-nav.is-open ul {
		display: flex;
	}

	.site-nav li,
	.site-nav li:first-child {
		border: 0;
		border-top: var(--hairline);
	}

	.site-nav ul ul {
		position: static;
		display: flex;
		border: 0;
		padding-left: 20px;
	}

	.entry-single {
		padding: 20px;
	}
}
