/*
Theme Name:        Fullscreen Minimal
Theme URI:         https://example.com/fullscreen-minimal
Author:            Your Name
Description:       A minimal, zero-bloat WordPress theme built for full screen pages. Edge-to-edge content, 100vh sections, an optional overlay header, and page templates that remove all chrome.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.6
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       fullscreen-minimal
Tags:              full-width-template, one-column, block-styles, wide-blocks, custom-menu, custom-logo, minimal
*/

/* ---------- Tokens ---------- */
:root {
	--fm-bg: #ffffff;
	--fm-fg: #111111;
	--fm-muted: #6b6b6b;
	--fm-accent: #111111;
	--fm-header-h: 64px;
	--fm-gutter: clamp(1rem, 4vw, 2.5rem);
	--fm-content: 720px;
	--fm-wide: 1200px;
	--fm-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--fm-bg);
	color: var(--fm-fg);
	font-family: var(--fm-font);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, video, iframe, svg, canvas { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, h5, h6 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

/* ---------- Accessibility ---------- */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000;
	top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--fm-fg); color: var(--fm-bg);
}

/* ---------- Header ---------- */
.site-header {
	position: relative;
	z-index: 100;
	height: var(--fm-header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 var(--fm-gutter);
}
.site-title { font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.custom-logo { max-height: calc(var(--fm-header-h) - 24px); width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.site-nav a { text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-nav .current-menu-item > a { text-decoration: underline; text-underline-offset: 4px; }

/* Overlay header: sits on top of the first full screen section */
.fm-overlay-header .site-header {
	position: absolute; top: 0; left: 0; right: 0;
	color: #fff;
}
.admin-bar.fm-overlay-header .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.fm-overlay-header .site-header { top: 46px; } }

/* ---------- Main / content ---------- */
.site-main { display: block; width: 100%; }

/* Default (non-fullscreen) content gets readable width */
.entry-content > * {
	max-width: var(--fm-content);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--fm-gutter);
	padding-right: var(--fm-gutter);
}
.entry-content > .alignwide { max-width: var(--fm-wide); }
.entry-content > .alignfull,
.entry-content > .wp-block-cover.alignfull,
.entry-content > .wp-block-group.alignfull {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}
.entry-header { padding: 3rem var(--fm-gutter) 1rem; max-width: var(--fm-content); margin: 0 auto; }
.entry-title { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }

/* ---------- Full screen templates ---------- */
.fm-fullscreen .site-main,
.fm-fullscreen .entry-content { margin: 0; padding: 0; }

/* In full screen mode every top-level block is edge to edge, no padding */
.fm-fullscreen .entry-content > * {
	max-width: none;
	width: 100%;
	margin: 0;
	padding-left: 0;
	padding-right: 0;
}
/* ...but plain text blocks keep a sensible measure */
.fm-fullscreen .entry-content > p,
.fm-fullscreen .entry-content > h1,
.fm-fullscreen .entry-content > h2,
.fm-fullscreen .entry-content > h3,
.fm-fullscreen .entry-content > ul,
.fm-fullscreen .entry-content > ol {
	max-width: var(--fm-content);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--fm-gutter);
	padding-right: var(--fm-gutter);
}

/* Each Cover / Group block at top level fills the viewport */
.fm-fullscreen .entry-content > .wp-block-cover,
.fm-fullscreen .entry-content > .fm-screen {
	min-height: 100vh;
	min-height: 100dvh;
}
/* Account for the WP admin bar when logged in */
.admin-bar.fm-fullscreen .entry-content > .wp-block-cover:first-child,
.admin-bar.fm-fullscreen .entry-content > .fm-screen:first-child {
	min-height: calc(100vh - 32px);
	min-height: calc(100dvh - 32px);
}

/* Utility class: add "fm-screen" in Advanced > Additional CSS class(es) */
.fm-screen {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	position: relative;
	overflow: hidden;
}
.fm-screen--start { justify-content: flex-start; }
.fm-screen--end { justify-content: flex-end; }

/* Utility: full-bleed media (video/iframe/image that fills the screen) */
.fm-bleed, .fm-bleed img, .fm-bleed video, .fm-bleed iframe {
	width: 100%;
	height: 100vh;
	height: 100dvh;
	object-fit: cover;
	border: 0;
}

/* Optional scroll snapping (enable via "Full Screen – Snap" template) */
.fm-snap { scroll-snap-type: y mandatory; }
.fm-snap .entry-content > * { scroll-snap-align: start; }

/* Remove default block gaps between stacked screens */
.fm-fullscreen .entry-content > * + * { margin-block-start: 0; }

/* ---------- Footer ---------- */
.site-footer {
	padding: 2rem var(--fm-gutter);
	font-size: .875rem;
	color: var(--fm-muted);
	text-align: center;
}

/* ---------- Archive / posts list (fallback) ---------- */
.fm-list { max-width: var(--fm-content); margin: 0 auto; padding: 2rem var(--fm-gutter); }
.fm-list article { padding: 1.5rem 0; border-bottom: 1px solid #eee; }
.fm-list h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.fm-list h2 a { text-decoration: none; }
.fm-meta { color: var(--fm-muted); font-size: .875rem; }
.nav-links { display: flex; justify-content: space-between; padding: 2rem 0; }

/* ---------- WP core alignment helpers ---------- */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--fm-muted); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
