/*
Theme Name: Liveit V2
Theme URI: https://liveit.se/
Author: Liveit
Description: Boilerplate blog theme for the Liveit blog subsite. Layout-focused; detailed styling comes later.
Requires at least: 6.0
Tested up to: 6.9
Version: 1.0.0
Text Domain: liveit-v2
Tags: blog, custom-menu, custom-logo, featured-images, right-sidebar, threaded-comments, translation-ready
*/

/**
 * Liveit V2 — layout shell (draft). Colors are variables; polish later.
 */

:root {
	--color-bg: #ffffff;
	--color-text: #000;
	--color-black: #000;
	--color-white: #ffffff;
	--color-gray-100: #f4f4f4;
	--color-gray-200: #e9eaea;
	--color-gray-300: #b3b3b3;
	--color-gray-400: #999;
	--color-gray-500: gray;
	--color-gray-600: #666;
	--color-gray-700: #333;
	--color-primary: #e91627;
	--color-secondary: #98262b;
	--color-muted: #666666;
	--color-border: #e0e0e0;
	--color-footer-bg: #000000;
	--color-footer-text: #ffffff;
	--color-footer-muted: #aaaaaa;
	--color-banner-rolling-bg: #f5f5f5;
	--color-banner-usp-bg: #eeeeee;
	--color-separator: #ffffff;
	--container-max: 1360px;
	--container-pad: 40px;
	--sidebar-width: 320px;
	--gap-main-sidebar: 40px;
	--header-main-height: clamp(50px, calc(50px + 45 * ((100vw - 768px) / 256)), 95px);
	--logo-height: clamp(40px, calc(40px + (60 * ((100vw - 768px) / 256))), 64px);
	--footer-bottom-height: 82px;
}

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

html {
	scroll-behavior: smooth;
}

/* normalize button */
button {
	font-size: 1em;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: "F37Ginger-Regular", system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

/* Paragraph-only light variant */
p {
	font-family: "F37Ginger-Light", "F37Ginger-Regular", system-ui, sans-serif;
}

h1,
h2,
h3,
h4 {
	font-family: "F37Ginger-Bold", "F37Ginger-Regular", system-ui, sans-serif;
	font-weight: 400;
}

a {
	color: inherit;
}

a:hover {
	text-decoration: none;
}

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

img.teh {
	width: 50%;
}

/* ——— Skip link ——— */
.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999999;
	padding: 0.5rem 1rem;
	background: var(--color-footer-bg);
	color: var(--color-footer-text);
	text-decoration: none;
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

/* applies to all licons */
[class^=licon-] {
	font-size: 1.4em;
	line-height: 1;
}

.screen-reader-text {
	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;
}

/* ——— Top banners ——— */
.site-banner {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 0.875rem;
}

.site-banner--rolling {
	min-height: 30px;
	background: var(--color-white);
	color: var(--color-primary);
	justify-content: flex-start;
	text-align: left;
	padding: 0;
	overflow: hidden;
}

.rolling-marquee {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
}

.rolling-marquee__track {
	display: flex;
	width: max-content;
	animation: liveit-v2-marquee 100s linear infinite;
	will-change: transform;
}

.rolling-marquee__track > span {
	display: inline-flex;
	align-items: center;
	padding: 0 1rem;
	white-space: nowrap;
}

.rolling-marquee__track > span a {
	color: inherit;
	text-decoration: none;
}

.rolling-marquee__track > span a:hover,
.rolling-marquee__track > span a:focus {
	text-decoration: none;
}

.rolling-marquee:focus {
	outline: none;
}

@keyframes liveit-v2-marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.rolling-marquee__track {
		animation: none;
	}
}

.site-banner--usp {
	min-height: 30px;
	background: var(--color-black);
	color: var(--color-gray-100);
}

.site-banner--usp span {
	display: inline-flex;
	align-items: center;
	padding: 5px 17px;
	position: relative;
}

.site-banner--usp span::before {
	content: "\e905";
	font-family: "licons";
	font-weight: normal;
	speak: never;
	margin-right: 10px;
	font-size: 1.4em;
}

/* ——— Header ——— */
.site-header {
	width: 100%;
	min-height: var(--header-main-height);
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	background: var(--color-primary);
	color: var(--color-white);
}

.site-header__inner {
	width: 100%;
	padding: 0 var(--container-pad);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: var(--header-main-height);
	gap: 1rem;
}

.site-header__left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	justify-self: start;
	min-width: 0;
}

.site-header__center {
	justify-self: center;
	text-align: center;
	min-width: 0;
}

.site-header__tools {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	justify-self: end;
	min-width: 0;
}

.custom-logo-link {
	display: inline-block;
	line-height: 0;
}

.site-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.header-logo {
	height: var(--logo-height);
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1.25rem;
}

.site-title a {
	text-decoration: none;
}

/* Shared clickable controls in header (buttons + anchors). */
.header-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--color-white);
	cursor: pointer;
	text-decoration: none;
	line-height: 1;
	transition: opacity 0.4s ease;
}

.header-action:not(:disabled):hover,
.header-action:not(:disabled):focus {
	opacity: 0.6;
}

.header-action:disabled {
	cursor: default;
	opacity: 0.85;
}

/* Nav toggle */
.site-header .nav-toggle {
	width: 44px;
	height: 44px;
}

.site-header .nav-toggle .licon-menu {
	font-size: 1.25rem;
	line-height: 1;
	color: inherit;
}

/* Primary nav (desktop inline first items) */
.nav-primary-inline ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	/*gap: 0.75rem 1.25rem;*/
}

.nav-primary-inline a {
	text-decoration: none;
	display: inline-block;
	padding: 0 16px;
}

.nav-primary-inline a:hover,
.nav-primary-inline a:focus {
	text-decoration: underline;
}

/* Primary nav drawer (rest on desktop, all on mobile) */
.nav-primary-drawer {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: min(100vw, 450px);
	padding: 10px;
	background: var(--color-white);
	color: var(--color-black);
	z-index: 100000;
	transform: translateX(-100%);
	transition: transform 0.4s ease;
	overflow-y: auto;
	box-shadow: 0 0 0 1px var(--color-border);
}

.nav-drawer-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-black);
	font-size: 1.4rem;
}

.nav-primary-drawer.is-open {
	transform: translateX(0);
}

.nav-primary-drawer .menu {
	list-style: none;
	margin: 2.5rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.nav-primary-drawer a {
	color: var(--color-black);
	text-decoration: none;
	display: inline-block;
	padding: 0 16px;
	font-size: 24px;
	font-family: "F37Ginger-Bold", "F37Ginger-Regular", system-ui, sans-serif;
	font-weight: 400;
	line-height: 1.7;
}

.nav-primary-drawer a:hover,
.nav-primary-drawer a:focus {
	text-decoration: none;
}

.nav-primary-drawer .menu--primary-drawer-mobile {
	display: none;
}

.header-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.search-form-container {
	position: absolute;
	display: none;
	background-color: var(--color-primary);
	padding: 4px;
	width: 0px;
	transition: all 0.4s ease;
}

.search-form-container.is-open {
	display: unset;
	right: 0px;
	top: -3px;
	z-index: 100;
	width: 240px;
}

.header-search input[type="search"] {
	width: 190px;
	padding: 0.35rem 0.35rem 0.35rem 0.35rem;
	border: 1px solid var(--color-white);
	font: inherit;
	background: var(--color-white);
	color: var(--color-black);
}

.header-search .search-toggle {
	color: var(--color-white);
	background-color: transparent;
}

.search-form-container .search-submit {
   position: relative;
	display: none;
}

.search-form-container.is-open .search-submit {
	position: absolute;
	display: unset;
	right: 0.35rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.6rem;
	height: 1.6rem;
	padding: 0;
	border: 0;
	color: var(--color-white);
	background-color: transparent;
	cursor: pointer;
}

.header-icon {
	text-decoration: none;
}

.header-icon:hover,
.header-icon:focus {
	color: inherit;
}

/* ——— Main layout ——— */
.site-main-wrap {
	/*max-width: calc(var(--container-max) + 2 * var(--container-pad));*/
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 2rem var(--container-pad);
	padding: 2rem 4%;
}

.site-main__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
	gap: var(--gap-main-sidebar);
	align-items: start;
}

.site-main__content {
	min-width: 0;
	margin-right: 10%;
}

.site-main__sidebar {
	min-width: 0;
}

.post-list-sidebar {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.post-list-sidebar li {
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--color-border);
}

.post-list-sidebar li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.post-list-sidebar a {
	text-decoration: none;
}

.post-list-sidebar a:hover,
.post-list-sidebar a:focus {
	text-decoration: underline;
}

.post-list-sidebar .meta {
	font-size: 0.8125rem;
	color: var(--color-muted);
	margin: 0.25rem 0 0;
}

.entry-header .entry-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 4vw, 2rem);
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--color-muted);
	margin: 0 0 1rem;
}

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

.center-content {
	text-align: center;
}

.back-to-top {
	margin-top: 2rem;
	display: inline-flex;
	gap: 0.35em;
	text-decoration: none;
}

/* ——— Footer ——— */
.site-footer {
	background: var(--color-footer-bg);
	color: var(--color-footer-text);
}

.site-footer__inner {
	max-width: calc(var(--container-max) + 2 * var(--container-pad));
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 2.5rem var(--container-pad);
	padding: 2.5rem 4%;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: start;
	padding-top: 2%;
}

.footer-menus-column {
	min-width: 0;
}

.footer-info .bread {
	width: 70%;
}

.footer-menus {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.footer-menus .nav-toggle {
	/* hide on desktop */
	display: none;
}

.footer-menus nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menus nav li {
	margin: 0.5rem 0;
}

.footer-menus nav a {
	color: var(--color-footer-text);
	text-decoration: none;
}

.footer-menus nav a:hover,
.footer-menus nav a:focus {
	text-decoration: underline;
}

.nav-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.35);
}

.footer-menus .menu-heading {
	margin: 0 0 1rem;
}

.site-footer__separator {
	height: 1px;
	background: var(--color-separator);
	width: 100%;
}

.site-footer__bottom {
	min-height: var(--footer-bottom-height);
	display: flex;
	align-items: center;
}

.site-footer__bottom-inner {
	max-width: calc(var(--container-max) + 2 * var(--container-pad));
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0.75rem var(--container-pad);
	padding: 0.75rem 4%;
	width: 100%;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1rem;
}

.footer-bottom__left,
.footer-bottom__right {
	font-size: 0.75rem;
	color: var(--color-footer-muted);
}

.footer-bottom__center {
	display: flex;
	justify-content: center;
	gap: 1rem;
}

.footer-bottom__center a {
	color: var(--color-footer-text);
	font-size: 1.25rem;
	text-decoration: none;
}

.footer-bottom__center a:hover,
.footer-bottom__center a:focus {
	opacity: 0.85;
}

/* Footer mobile: foldable blocks */
.footer-menus--mobile details {
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	padding: 0.5rem 0.75rem;
	margin-bottom: 0.5rem;
}

.footer-menus--mobile details[open] {
	padding-bottom: 0.75rem;
}

.footer-menus--mobile summary {
	cursor: pointer;
	font-size: 0.875rem;
	list-style: none;
}

.footer-menus--mobile summary::-webkit-details-marker {
	display: none;
}

/* ——— Archives & comments ——— */
.page-header {
	margin-bottom: 1.5rem;
}

.page-header .page-title {
	margin: 0;
}

.archive-description {
	margin: 0.5rem 0 0;
	color: var(--color-muted);
	font-size: 0.9375rem;
}

.comments-area {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--color-border);
}

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

.comment-list .children {
	list-style: none;
	margin: 1rem 0 0 1rem;
	padding: 0;
}

.comments-title {
	font-size: 1.125rem;
	margin: 0 0 1rem;
}

/* ——— 404 & generic ——— */
.error-404,
.no-results {
	padding: 2rem 0;
}

.page-content--archive .post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.page-content--archive .post-list li {
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--color-border);
}

/* liveit button */
.btn-cont {
	position: relative;
	z-index: 1;
	display: inline-block;
}

.btn {
	display: inline-flex;
	gap: 0.35em;
	cursor: pointer;
}

.btn-shadow {
	position: absolute;
	top: 0.25rem;
	left: 0.25rem;
	height: 100%;
	width: 100%;
	z-index: -1;
	border: 1px solid var(--color-black);
	display: inline-block;
}

.btn.red ~ .btn-shadow { border: 1px solid var(--color-primary); }
.btn.wht ~ .btn-shadow { border: 1px solid var(--color-white); }

.btn:hover {
	top: 0.25rem;
	left: 0.35rem;
	transform: translate(0.3rem, 0.3rem);
	/*animation: button-hover 0.15s 1 forwards;*/
}

a.btn {
	text-decoration: none !important;
}

@keyframes button-hover {
	100% {
    	transform: translate(0.25rem, 0.25rem);
	}
}

.btn {
	font-family: f37Ginger-Regular, sans-serif;
	background-color: var(--color-black);
	border: 1px solid var(--color-black);
	color: var(--color-white);
	transition: all ease 0.15s;
	padding: 0.7rem 1rem;
	width: 100%;
}

.btn:disabled {
	background-color: #666;
}

.btn.red {
	background-color: var(--color-primary);
	border: 1px solid var(--color-primary);
}

.btn.wht {
	background-color: var(--color-black);
	border: 1px solid var(--color-black);
}

/* ——— Mobile < 1024px ——— */
@media (max-width: 1023px) {
	.site-header__inner {
		grid-template-columns: auto 1fr auto;
		padding: 0 12px;
		gap: 0.5rem;
	}

	.site-header__center {
		display: flex;
		justify-content: center;
	}

	.nav-primary-inline {
		display: none;
	}

	.nav-primary-drawer .menu--primary-drawer-desktop {
		display: none !important;
	}

	.nav-primary-drawer .menu--primary-drawer-mobile {
		display: flex;
	}

	.nav-primary-drawer .menu--primary-drawer-mobile .menu-item--sublevel > a {
		font-size: 90%;
		font-family: "F37Ginger-Regular", system-ui, sans-serif;
	}

	body.nav-open {
		overflow: hidden;
	}

	.site-main__grid {
		grid-template-columns: 1fr;
	}

	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.footer-menus nav.footer-nav {
		width: 100%;
	}

	.footer-menus {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.footer-menus .menu-heading {
		display: flex;
		align-items: center;
		justify-content: space-between;
		cursor: pointer;
	}

	.footer-menus .nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 24px;
		height: 24px;
		color: var(--color-white);
	}

	.footer-menus .nav-toggle::before {
		content: "\e907";
		font-family: "licons";
		font-size: 1.4rem;
		line-height: 1;
	}

	.footer-menus nav.footer-nav.is-open {
		margin-bottom: 1rem;
	}

	.footer-menus nav.footer-nav.is-open > .menu-heading .nav-toggle::before {
		content: "\e90a";
	}

	.footer-menus ul.footer-menu-list {
		height: 0;
		width: 100%;
		overflow: hidden;
		transition: height 0.4s ease;
	}
}

@media screen and (max-width: 639px) {

	.site-banner--usp {
		display: none;
	}

	.site-main__content {
		margin: 0;
	}

	/* hack until I figure this out */
	.nuke-header-logo {
		max-width: 44px;
	}

	.footer-info .bread {
		width: 100%;
	}
}
