/*
Theme Name: Na maKS
Theme URI: https://namaksimum.cz
Description: Téma pro celorepublikový sjezd mládeže KS „Na maKS“. Vizuál 2027 „Highlighted“. Úvodní stránka (plakát, info, o akci, program seminářů, fotky) a fotogalerie minulých ročníků s lightboxem.
Version: 3.0.0
Requires at least: 6.4
Requires PHP: 8.0
Author: Na maKS
Text Domain: namaks
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Fonts: Inter (SIL OFL 1.1, rsms.me/inter).
*/

/* ---------- Fonts ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-700-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-latin-ext-700-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens (vizuál 2027 „Highlighted“) ---------- */
:root {
	--nm-green: #6fff4c;
	--nm-pink: #ff45d1;
	--nm-grey: #f2f2f2;
	--nm-ink: #000;
	--nm-paper: #fff;
	--nm-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--nm-header-h: 64px;
	--nm-container: 1240px;
	--nm-gutter: clamp(16px, 4vw, 40px);
	--nm-line: 3px solid var(--nm-ink);
	--nm-grain: url("assets/images/grain-2.png");
	--nm-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nm-header-h) + 24px); scroll-behavior: smooth; }
html.nm-menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	padding-top: var(--nm-header-h);
	background: var(--nm-paper);
	color: var(--nm-ink);
	font-family: var(--nm-sans);
	font-size: 17px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--nm-green); color: #000; }
:focus-visible { outline: 3px solid var(--nm-pink); outline-offset: 3px; }
.nm-main { display: block; }
.nm-container {
	width: 100%;
	max-width: calc(var(--nm-container) + 2 * var(--nm-gutter));
	margin-inline: auto;
	padding-inline: var(--nm-gutter);
}
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	top: 8px; left: 8px; z-index: 1000;
	padding: 8px 12px; background: #fff; color: #000;
}

/* ---------- Shared pieces ---------- */
/* Highlighter stroke behind text. */
.nm-hl {
	--nm-hl: var(--nm-green);
	padding: 0 .16em;
	background: linear-gradient(177deg, transparent 12%, var(--nm-hl) 12%, var(--nm-hl) 92%, transparent 92%);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.nm-hl--pink { --nm-hl: var(--nm-pink); }

.nm-label {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.nm-tag {
	display: inline-block;
	margin: 0;
	padding: 8px 14px;
	background: var(--nm-ink);
	color: var(--nm-paper);
	font-size: clamp(14px, 1.4vw, 18px);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	transform: rotate(-4deg);
}
.nm-section-title {
	margin: 0;
	font-size: clamp(44px, 7vw, 108px);
	line-height: .98;
	font-weight: 700;
	font-style: italic;
	letter-spacing: -.035em;
}
.nm-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	background: var(--nm-ink);
	color: var(--nm-paper);
	border: var(--nm-line);
	box-shadow: 5px 5px 0 var(--nm-pink);
	font-size: 16px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.nm-btn svg { width: 18px; height: 18px; flex: none; }
.nm-btn:hover { background: var(--nm-green); color: var(--nm-ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--nm-pink); }
.nm-btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--nm-pink); }

/* Ticker band. */
.nm-marquee {
	position: relative;
	z-index: 2;
	width: 106%;
	margin-left: -3%;
	overflow: hidden;
	background: var(--nm-ink);
	color: var(--nm-green);
	border-block: var(--nm-line);
	transform: rotate(-1.4deg);
}
.nm-marquee--pink { background: var(--nm-pink); color: var(--nm-ink); transform: rotate(1deg); }
.nm-marquee__track { display: flex; width: max-content; animation: nm-marquee 38s linear infinite; }
.nm-marquee--reverse .nm-marquee__track { animation-direction: reverse; }
.nm-marquee__run { display: flex; flex: none; }
.nm-marquee__run span {
	padding: 14px 0 14px 28px;
	font-size: clamp(20px, 2.4vw, 30px);
	line-height: 1;
	font-weight: 700;
	font-style: italic;
	text-transform: uppercase;
	white-space: nowrap;
}
.nm-marquee__sep { font-style: normal !important; }
@keyframes nm-marquee { to { transform: translateX(-50%); } }

/* Scroll reveal (only when JS is on). */
.js .nm-reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--nm-ease), transform .7s var(--nm-ease); }
.js .nm-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.nm-marquee__track { animation: none; }
	.js .nm-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Grain "windows" (hero + page banners) ----------
   The grain is pinned to the browser window (background-attachment: fixed),
   so it sits in exactly the same place on every page, whatever the banner height. */
.nm-hero,
.nm-banner,
.nm-past,
.nm-photos__body > h1:first-child {
	background: var(--nm-grey) var(--nm-grain) center / cover no-repeat fixed;
}
@media (prefers-reduced-motion: no-preference) {
	.nm-hero,
	.nm-banner,
	.nm-past,
	.nm-photos__body > h1:first-child { background-image: url("assets/images/grain-anim.gif"), var(--nm-grain); }
}
/* Phones/tablets: iOS ignores fixed backgrounds (and Android scales them oddly),
   so the grain scrolls with each section there. */
@media (hover: none), (max-width: 767px) {
	.nm-hero,
	.nm-banner,
	.nm-past,
	.nm-photos__body > h1:first-child { background-attachment: scroll; }
}

/* In-page navigation crossfade (browsers with View Transitions). */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .28s; }
#content:focus { outline: none; }

/* ---------- Header ---------- */
.nm-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	height: var(--nm-header-h);
	background: var(--nm-paper);
	border-bottom: 3px solid transparent;
	transition: border-color .2s;
}
.nm-header.is-scrolled { border-bottom-color: var(--nm-ink); }
.admin-bar .nm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .nm-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .nm-header { position: absolute; } }

.nm-header__bar {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-inline: var(--nm-gutter);
}
.nm-header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nm-header__brand img { width: auto; height: 40px; transition: transform .25s var(--nm-ease); }
.nm-header__brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nm-header__name { font-size: 14px; line-height: 1; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.nm-nav__menu { display: flex; align-items: center; gap: 32px; }
.nm-nav__list { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nm-nav__list a {
	display: block;
	padding: 4px 2px;
	font-size: 14px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	background: linear-gradient(var(--nm-green), var(--nm-green)) left 75% / 0 45% no-repeat;
	transition: background-size .25s var(--nm-ease);
}
.nm-nav__list a:hover,
.nm-nav__list .current-menu-item > a,
.nm-nav__list .current_page_item > a { background-size: 100% 45%; }
.nm-btn--nav { padding: 10px 16px; font-size: 14px; box-shadow: 4px 4px 0 var(--nm-pink); }
.nm-nav__toggle { display: none; }
.nm-menu-info { display: none; }

/* ---------- Hero ---------- */
.nm-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: calc(100svh - var(--nm-header-h));
	padding-bottom: 32px;
	overflow: clip;
}
.nm-hero__stage {
	position: relative;
	flex: 1;
	display: grid;
	grid-template-columns: 1fr minmax(0, 560px) 1fr;
	grid-template-areas: "kicker logo when";
	align-items: center;
	gap: 32px;
	width: 100%;
	max-width: calc(var(--nm-container) + 2 * var(--nm-gutter));
	margin-inline: auto;
	padding: 48px var(--nm-gutter);
}
.nm-hero__kicker { grid-area: kicker; justify-self: end; align-self: start; margin-top: 12%; }
.nm-hero__title { grid-area: logo; margin: 0; line-height: 0; }
.nm-hero__title img {
	display: block;
	width: 100%;
	animation: nm-pop 1s var(--nm-ease) both;
}
.nm-hero__when {
	grid-area: when;
	align-self: end;
	margin: 0 0 8%;
	font-size: clamp(26px, 2.9vw, 40px);
	line-height: 1.35;
	font-weight: 700;
	animation: nm-fade-in 1s .35s ease-out both;
}
.nm-hero__sticker {
	position: absolute;
	top: 6%;
	right: max(var(--nm-gutter), calc(50% - 600px));
	width: clamp(90px, 12vw, 170px);
	transform: rotate(14deg);
	animation: nm-sticker 1s .5s var(--nm-ease) both;
	pointer-events: none;
}
.nm-hero__when .nm-hl { white-space: nowrap; }
.nm-hero__cta { position: absolute; left: var(--nm-gutter); bottom: 40px; }

@keyframes nm-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes nm-pop { from { opacity: 0; transform: scale(.92) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes nm-sticker { from { opacity: 0; transform: scale(1.6) rotate(-10deg); } to { opacity: 1; transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) {
	.nm-hero__title img, .nm-hero__when, .nm-hero__sticker { animation: none; }
}

/* ---------- Facts ---------- */
.nm-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	border-bottom: var(--nm-line);
	margin-top: 40px;
	border-top: var(--nm-line);
}
.nm-facts__item { padding: 40px var(--nm-gutter); border-right: var(--nm-line); }
.nm-facts__item:last-child { border-right: 0; }
.nm-facts__item:nth-child(2) { background: var(--nm-green); }
.nm-facts__value { margin: 0; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }

/* ---------- About ---------- */
.nm-about { padding: clamp(80px, 11vw, 150px) 0; }
.nm-about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.nm-about__side { position: sticky; top: calc(var(--nm-header-h) + 32px); }
.nm-about__sticker { display: block; width: clamp(120px, 15vw, 210px); margin-top: 48px; transform: rotate(-10deg); }
.nm-about__text > * { margin: 0 0 1.1em; }
.nm-about__text > :last-child { margin-bottom: 0; }
.nm-about__text p { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.38; }
.nm-about__text > p:first-child { font-weight: 700; }
.nm-about__text a { text-decoration-thickness: 3px; text-decoration-color: var(--nm-pink); text-underline-offset: 4px; }
.entry-content mark { background: var(--nm-green); color: inherit; padding: 0 .12em; }

/* ---------- Program ---------- */
.nm-program { padding: clamp(80px, 11vw, 150px) 0; background: var(--nm-ink); color: var(--nm-paper); }
.nm-program__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 56px; flex-wrap: wrap; }
.nm-program__head .nm-label { color: var(--nm-green); margin: 0; }
.nm-program__list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--nm-paper); }
.nm-program__item { border-bottom: 1px solid rgba(255, 255, 255, .28); }
.nm-program__row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto 36px;
	align-items: center;
	gap: 20px;
	padding: 26px 0;
	cursor: pointer;
	list-style: none;
}
.nm-program__row::-webkit-details-marker { display: none; }
.nm-program__num { color: var(--nm-green); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nm-program__title {
	justify-self: start;
	padding: 0 .12em;
	font-size: clamp(24px, 3vw, 42px);
	line-height: 1.12;
	font-weight: 700;
	font-style: italic;
	letter-spacing: -.02em;
	background: linear-gradient(var(--nm-green), var(--nm-green)) left center / 0 100% no-repeat;
	transition: background-size .3s var(--nm-ease), color .3s;
}
.nm-program__row:hover .nm-program__title,
.nm-program__item details[open] .nm-program__title { background-size: 100% 100%; color: var(--nm-ink); }
.nm-program__item:nth-child(even) .nm-program__title { background-image: linear-gradient(var(--nm-pink), var(--nm-pink)); }
.nm-program__speaker { font-size: 16px; text-align: right; opacity: .75; }
.nm-program__toggle { display: flex; width: 32px; height: 32px; color: var(--nm-paper); transition: transform .3s var(--nm-ease), color .3s; }
.nm-program__toggle svg { width: 100%; height: 100%; }
details[open] .nm-program__toggle { transform: rotate(45deg); color: var(--nm-pink); }
.nm-program__text { max-width: 760px; padding: 0 0 36px 84px; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.nm-program__text > * { margin: 0 0 1em; }
.nm-program__text > :last-child { margin-bottom: 0; }

/* ---------- Past photos ---------- */
.nm-past { padding: clamp(80px, 11vw, 150px) 0 clamp(64px, 8vw, 110px); }
.nm-past__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.nm-past__strip {
	display: flex;
	gap: clamp(16px, 2.4vw, 32px);
	padding: 56px var(--nm-gutter) 40px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.nm-past__strip::-webkit-scrollbar { display: none; }
@media (hover: hover) and (pointer: fine) {
	.nm-past__strip { cursor: grab; scroll-snap-type: none; }
	.nm-past__strip.is-dragging { cursor: grabbing; user-select: none; }
	.nm-past__strip.is-dragging .nm-past__photo { pointer-events: none; }
}
.nm-past__photo img { -webkit-user-drag: none; }
.nm-past__photo {
	flex: 0 0 clamp(220px, 26vw, 360px);
	scroll-snap-align: center;
	padding: 10px 10px 44px;
	background: var(--nm-paper);
	box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
	transform: rotate(-2deg);
	transition: transform .3s var(--nm-ease);
}
.nm-past__photo:nth-child(even) { transform: rotate(2.2deg) translateY(18px); }
.nm-past__photo:hover { transform: rotate(0) scale(1.03); }
.nm-past__photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Footer ---------- */
.nm-footer { position: relative; background: var(--nm-ink); color: var(--nm-paper); padding-bottom: 48px; overflow: clip; }
.nm-footer .nm-marquee { margin-top: -2px; }
.nm-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
	gap: clamp(40px, 8vw, 120px);
	align-items: end;
	padding-top: 96px;
}
.nm-footer__logo img { display: block; width: 100%; }
.nm-footer__info .nm-label { color: var(--nm-green); }
.nm-footer__email {
	display: inline-block;
	font-size: clamp(22px, 3vw, 38px);
	line-height: 1.2;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--nm-green);
	text-decoration-thickness: 4px;
	text-underline-offset: 6px;
	word-break: break-all;
}
.nm-footer__email:hover { color: var(--nm-green); }
.nm-footer__social { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0; }
.nm-social {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px 10px 12px;
	border: 2px solid var(--nm-paper);
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.nm-social svg { width: 24px; height: 24px; }
.nm-social:hover { background: var(--nm-green); border-color: var(--nm-green); color: var(--nm-ink); --nm-fb-cut: var(--nm-green); }
.nm-footer .nm-btn { margin-bottom: 32px; }
.nm-footer__small { margin: 0; font-size: 14px; opacity: .6; }

/* ---------- Banner (pages, 404) ---------- */
.nm-banner {
	padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 6vw, 72px);
	border-bottom: var(--nm-line);
}
.nm-banner__title { margin: 0; font-size: clamp(40px, 7vw, 104px); line-height: 1.02; font-weight: 700; font-style: italic; letter-spacing: -.035em; }
.nm-page { padding-bottom: 120px; }
.nm-page__content { max-width: 860px; padding-top: 64px; font-size: 18px; line-height: 1.65; }
.nm-page__content h2, .nm-page__content h3 { font-style: italic; line-height: 1.15; letter-spacing: -.02em; }

/* ---------- Photo page (template "Fotogalerie") ---------- */
.nm-photos { padding-bottom: 120px; }
.nm-photos__body > * {
	max-width: calc(var(--nm-container) + 2 * var(--nm-gutter));
	margin-inline: auto;
	padding-inline: var(--nm-gutter);
}
.nm-photos__body > h1:first-child {
	max-width: none;
	margin: 0;
	padding-block: clamp(56px, 8vw, 110px) clamp(40px, 6vw, 72px);
	padding-inline: max(var(--nm-gutter), calc(50% - var(--nm-container) / 2));
	border-bottom: var(--nm-line);
	font-size: clamp(40px, 7vw, 104px);
	line-height: 1.02;
	font-weight: 700;
	font-style: italic;
	letter-spacing: -.035em;
}
.nm-photos__years {
	position: sticky;
	top: var(--nm-header-h);
	z-index: 10;
	display: flex;
	gap: 10px;
	padding: 14px max(var(--nm-gutter), calc(50% - var(--nm-container) / 2));
	background: var(--nm-paper);
	border-bottom: var(--nm-line);
	overflow-x: auto;
}
.nm-photos__years[hidden] { display: none; }
.nm-photos__body > .nm-photos__years { max-width: none; }
.nm-photos__years a {
	flex: none;
	padding: 8px 16px;
	border: 2px solid var(--nm-ink);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: background .15s;
}
.nm-photos__years a:hover { background: var(--nm-green); }
.nm-photos__body > h2 {
	width: fit-content;
	margin-top: clamp(72px, 9vw, 130px);
	margin-bottom: 32px;
	margin-left: max(var(--nm-gutter), calc(50% - var(--nm-container) / 2));
	padding: 8px 18px;
	background: var(--nm-ink);
	color: var(--nm-green);
	font-size: clamp(24px, 3vw, 40px);
	line-height: 1.1;
	font-weight: 700;
	font-style: italic;
	transform: rotate(-2deg);
}
.nm-photos__body > h2:nth-of-type(even) { color: var(--nm-pink); transform: rotate(1.5deg); }
.nm-photos__body > p { margin-bottom: 28px; font-size: 20px; }

.nm-photos figure.wp-block-image { margin: 0; overflow: hidden; }
.nm-photos .wp-block-image img { display: block; width: 100%; height: auto; cursor: pointer; transition: transform .5s var(--nm-ease), filter .3s; }
.nm-photos .wp-block-image img:hover { transform: scale(1.04); }
.nm-photos .wp-block-gallery.has-nested-images {
	--wp--style--unstable-gallery-gap: 24px;
	gap: 24px;
	margin: 0 auto 24px;
}
.nm-photos .wp-block-gallery.has-nested-images figure.wp-block-image img { height: 100%; }
.nm-photos .wp-block-columns { gap: 24px; margin-bottom: 24px; align-items: flex-start !important; }
.nm-photos .wp-block-column > * + * { margin-top: 24px; }

/* Lightbox. */
.nm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	padding: 72px 16px 24px;
	background: rgba(0, 0, 0, .94);
}
.nm-lightbox[hidden] { display: none; }
.nm-lightbox img { max-width: min(1400px, 94vw); max-height: calc(100vh - 200px); width: auto; height: auto; box-shadow: 0 0 0 8px var(--nm-paper); cursor: pointer; }
.nm-lightbox__close {
	position: absolute;
	top: 14px; right: 14px;
	display: flex;
	width: 48px; height: 48px;
	padding: 10px;
	border: 0;
	border-radius: 50%;
	background: var(--nm-green);
	color: var(--nm-ink);
	cursor: pointer;
}

.nm-lightbox__bar { display: flex; align-items: center; gap: 20px; }
.nm-lightbox__nav {
	display: flex;
	width: 52px; height: 52px;
	padding: 13px;
	border: 0;
	border-radius: 50%;
	background: var(--nm-paper);
	color: var(--nm-ink);
	cursor: pointer;
	transition: background .15s;
}
.nm-lightbox__nav:hover { background: var(--nm-green); }
.nm-lightbox__nav svg { width: 100%; height: 100%; }
.nm-lightbox__nav--prev svg { transform: scaleX(-1); }
.nm-lightbox__count {
	min-width: 72px;
	margin: 0;
	color: var(--nm-paper);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .08em;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
	.nm-hero__stage {
		grid-template-columns: 1fr;
		grid-template-areas: "kicker" "logo" "when";
		justify-items: center;
		text-align: center;
		gap: 24px;
	}
	.nm-hero__title { width: min(480px, 78vw); }
	.nm-hero__kicker, .nm-hero__when { justify-self: center; align-self: auto; margin: 0; }
	.nm-hero__cta { position: static; grid-row: 4; }
	.nm-about__grid { grid-template-columns: 1fr; }
	.nm-about__side { position: relative; top: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
	.nm-about__sticker { margin: 0; }
	.nm-footer__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.nm-footer__logo { width: 100%; max-width: 300px; }
	.nm-footer__info { display: flex; flex-direction: column; align-items: center; }
	.nm-footer__social { justify-content: center; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	:root { --nm-header-h: 58px; }
	body { font-size: 16px; }
	.nm-header__brand img { height: 34px; }
	.nm-nav__toggle {
		position: relative;
		z-index: 2;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px; height: 44px;
		margin-right: -8px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--nm-ink);
		cursor: pointer;
	}
	.nm-nav__icon { display: flex; width: 26px; height: 26px; }
	.nm-nav__icon--close { display: none; }
	.nm-nav__toggle[aria-expanded="true"] .nm-nav__icon--open { display: none; }
	.nm-nav__toggle[aria-expanded="true"] .nm-nav__icon--close { display: flex; }
	.nm-nav__menu {
		position: fixed;
		top: var(--nm-header-h);
		left: 0;
		width: 100%;
		height: calc(100dvh - var(--nm-header-h));
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 32px;
		margin: 0;
		padding: 24px var(--nm-gutter) 40px;
		background: var(--nm-ink);
		overflow-y: auto;
		overscroll-behavior: contain;
		z-index: 99;
	}
	.admin-bar .nm-nav__menu { top: calc(var(--nm-header-h) + 46px); height: calc(100dvh - var(--nm-header-h) - 46px); }
	.nm-nav__menu.is-open { display: flex; }
	.nm-nav__list { display: block; width: 100%; padding: 0; }
	.nm-nav__list li { border-bottom: 1px solid rgba(255, 255, 255, .2); }
	.nm-nav__list a {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 18px 0;
		color: var(--nm-paper);
		font-size: clamp(24px, 7vw, 32px);
		line-height: 1.15;
		font-style: italic;
		letter-spacing: -.01em;
		text-transform: none;
		background: none;
	}
	.nm-nav__list a:hover { background: none; }
	.nm-nav__list .current-menu-item > a,
	.nm-nav__list .current_page_item > a { color: var(--nm-green); background: none; }
	.nm-nav__list .current-menu-item > a::before,
	.nm-nav__list .current_page_item > a::before {
		content: "";
		flex: none;
		width: 10px; height: 10px;
		border-radius: 50%;
		background: var(--nm-green);
	}
	.nm-btn--nav { align-self: flex-start; }
	.nm-menu-info {
		display: block;
		margin-top: auto;
		padding-top: 28px;
		border-top: 2px solid var(--nm-paper);
		color: var(--nm-paper);
	}
	.nm-menu-info__when {
		margin: 0 0 28px;
		color: var(--nm-ink);
		font-size: clamp(24px, 7vw, 30px);
		line-height: 1.4;
		font-weight: 700;
	}
	.nm-menu-info .nm-label { color: var(--nm-green); }
	.nm-menu-info__email {
		display: inline-block;
		font-size: 19px;
		font-weight: 700;
		text-decoration: underline;
		text-decoration-color: var(--nm-green);
		text-decoration-thickness: 3px;
		text-underline-offset: 5px;
		word-break: break-all;
	}
	.nm-menu-info__social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

	.nm-hero { min-height: 0; }
	.nm-hero__stage { padding-block: 40px 32px; }
	.nm-hero__sticker { top: 18px; right: 12px; width: 72px; }

	.nm-facts { margin-top: 24px; }
	.nm-facts__item { padding: 24px var(--nm-gutter); border-right: 0; border-bottom: var(--nm-line); }
	.nm-facts__item:last-child { border-bottom: 0; }

	.nm-program__head { margin-bottom: 32px; }
	.nm-program__row { grid-template-columns: 34px minmax(0, 1fr) 28px; grid-template-areas: "num title toggle" ". speaker toggle"; gap: 6px 12px; padding: 20px 0; }
	.nm-program__num { grid-area: num; font-size: 15px; align-self: start; padding-top: 6px; }
	.nm-program__title { grid-area: title; }
	.nm-program__speaker { grid-area: speaker; text-align: left; font-size: 15px; }
	.nm-program__toggle { grid-area: toggle; width: 26px; height: 26px; }
	.nm-program__text { padding: 0 0 28px 46px; font-size: 16px; }

	.nm-past__strip { padding-top: 40px; }
	.nm-past__photo { flex-basis: 72vw; padding: 8px 8px 32px; }

	.nm-footer__grid { padding-top: 64px; }
	.nm-footer__logo { max-width: 220px; }

	.nm-photos .wp-block-gallery.has-nested-images { --wp--style--unstable-gallery-gap: 10px; gap: 10px; margin-bottom: 10px; }
	.nm-photos .wp-block-columns { gap: 10px; margin-bottom: 10px; }
	.nm-photos .wp-block-column > * + * { margin-top: 10px; }
}
