/*
Theme Name: MWSGuy
Theme URI: https://mwsguy.net/
Author: MWSGuy
Author URI: https://mwsguy.net/
Description: A fast, accessible, SEO-first magazine block theme for MWSGuy — entertainment, guides, news and digital resources. Built-in meta tags, Open Graph, JSON-LD schema, breadcrumbs and sitemap tuning with no extra plugins.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mwsguy
Tags: blog, news, entertainment, full-site-editing, block-patterns, custom-colors, accessibility-ready, one-column, three-columns
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; max-width: 100%; }
:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: #E0E7FF; }
.wp-block-post-content a:not(.wp-element-button) { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Header ---------- */
.mws-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--wp--preset--color--border); }
.admin-bar .mws-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .mws-header { top: 0; position: relative; } }
.mws-brand { gap: .6rem !important; }
.mws-brand svg { display: block; flex: none; }
.mws-brand .wp-block-site-title { margin: 0; }
.mws-header .wp-block-navigation a { padding: .35rem .15rem; position: relative; color: var(--wp--preset--color--ink); }
.mws-header .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }
.mws-header .wp-block-navigation .current-menu-item > a::after,
.mws-header .wp-block-navigation a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--wp--preset--color--accent); border-radius: 2px; }
.mws-header .wp-block-search__button { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); border-radius: 999px; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1rem; font-size: 1.15rem; }

/* ---------- Hero ---------- */
.mws-hero { position: relative; overflow: hidden; color: #fff; }
.mws-hero::before, .mws-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.mws-hero::before { width: 520px; height: 520px; right: -140px; top: -180px; border: 2px solid rgba(255,255,255,.12); }
.mws-hero::after { width: 380px; height: 380px; right: 8%; bottom: -220px; background: radial-gradient(circle, rgba(255,138,115,.45), rgba(255,138,115,0) 70%); }
.mws-hero > * { position: relative; z-index: 1; }
.mws-hero h1, .mws-hero h2, .mws-hero p { color: #fff; }
.mws-hero .mws-lede { color: #E0E7FF; font-size: var(--wp--preset--font-size--large); max-width: 46rem; }
.mws-eyebrow { display: inline-block; font-size: .8rem !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--accent); }
.mws-hero .mws-eyebrow { color: var(--wp--preset--color--accent-light); }
.mws-hero .wp-block-button__link { background: #fff; color: var(--wp--preset--color--primary-dark); }
.mws-hero .wp-block-button__link:hover { background: var(--wp--preset--color--accent-light); color: var(--wp--preset--color--primary-dark); }
.mws-hero .is-style-mws-ghost .wp-block-button__link,
.is-style-mws-ghost .wp-block-button__link { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.mws-hero .is-style-mws-ghost .wp-block-button__link { color: #fff; }
.mws-hero .is-style-mws-ghost .wp-block-button__link:hover { background: rgba(255,255,255,.12); color: #fff; }
.mws-chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.mws-chips li { margin: 0; padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: .9rem; font-weight: 600; }

/* ---------- Sections ---------- */
.mws-section-head { max-width: 46rem; }
.mws-section-head p { color: var(--wp--preset--color--muted); }
.mws-surface { background: var(--wp--preset--color--surface); }

/* Category / feature cards */
.mws-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.mws-grid > * { margin: 0 !important; }
.mws-card, .is-style-mws-card { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 18px; padding: 1.5rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.mws-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(30,27,75,.45); border-color: #C7D2FE; }
.mws-card h3 { font-size: 1.2rem; margin: .75rem 0 .4rem; }
.mws-card h3 a { color: var(--wp--preset--color--ink); text-decoration: none; }
.mws-card h3 a::after { content: ""; position: absolute; inset: 0; }
.mws-card { position: relative; }
.mws-card p { color: var(--wp--preset--color--muted); font-size: .97rem; margin: 0; }
.mws-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; margin: 0 !important; }
.mws-icon.i1 { background: #EEF2FF; } .mws-icon.i2 { background: #FFF1EE; } .mws-icon.i3 { background: #ECFEFF; } .mws-icon.i4 { background: #FDF2F8; } .mws-icon.i5 { background: #F0FDF4; }
.mws-card .mws-more { display: inline-block; margin-top: .9rem; font-weight: 700; font-size: .92rem; color: var(--wp--preset--color--primary); }

/* Feature list (Why explore) */
.mws-features { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.mws-features li { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 16px; padding: 1.25rem 1.25rem 1.25rem 3.25rem; position: relative; margin: 0; color: var(--wp--preset--color--muted); }
.mws-features li::before { content: "✓"; position: absolute; left: 1.1rem; top: 1.15rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--wp--preset--color--primary); color: #fff; font-size: .8rem; font-weight: 800; display: grid; place-items: center; }
.mws-features strong { display: block; color: var(--wp--preset--color--ink); font-size: 1.05rem; margin-bottom: .2rem; }

/* ---------- Post cards (query loops) ---------- */
.mws-posts .wp-block-post-template { gap: 1.5rem; }
.mws-posts .wp-block-post { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; position: relative; }
.mws-posts .wp-block-post:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -20px rgba(30,27,75,.5); }
.mws-posts .wp-block-post > *:not(.wp-block-post-featured-image) { margin-left: 1.25rem; margin-right: 1.25rem; }
.mws-posts .wp-block-post-featured-image { margin: 0 0 1rem; }
.mws-posts .wp-block-post-featured-image img { border-radius: 0; }
.mws-posts .wp-block-post-terms { margin-top: 0; }
.mws-posts .wp-block-post-title { font-size: 1.2rem; margin: .4rem 1.25rem .5rem; line-height: 1.3; }
.mws-posts .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.mws-posts .wp-block-post-terms a { position: relative; z-index: 1; }
.mws-posts .wp-block-post-excerpt { margin-bottom: .25rem; }
.mws-posts .wp-block-post-excerpt__more-text { display: none; }
.mws-posts .wp-block-post-date { margin-top: auto; padding-bottom: 1.25rem; font-size: .85rem; }
.wp-block-query-no-results { padding: 2rem; border: 1px dashed var(--wp--preset--color--border); border-radius: 16px; text-align: center; color: var(--wp--preset--color--muted); }
.wp-block-query-pagination { margin-top: 2.5rem; gap: .5rem; font-weight: 600; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { padding: .45rem .85rem; border-radius: 10px; border: 1px solid var(--wp--preset--color--border); text-decoration: none; }
.wp-block-query-pagination .current { background: var(--wp--preset--color--primary); color: #fff; border-color: var(--wp--preset--color--primary); }

/* ---------- Single / page ---------- */
.mws-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; font-size: .88rem; color: var(--wp--preset--color--muted); }
.mws-breadcrumbs li + li::before { content: "›"; margin-right: .35rem; color: #94A3B8; }
.mws-breadcrumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.mws-breadcrumbs a:hover { color: var(--wp--preset--color--primary); text-decoration: underline; }
.mws-page-head { background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--wp--preset--color--border); }
.mws-meta { color: var(--wp--preset--color--muted); font-size: .92rem; gap: .5rem 1rem !important; }
.mws-meta > * { margin: 0 !important; }
.mws-meta .wp-block-post-author-name a { color: var(--wp--preset--color--ink); font-weight: 700; text-decoration: none; }
.mws-reading-time::before { content: "⏱ "; }
.mws-single-image img { border-radius: 20px; box-shadow: 0 24px 48px -28px rgba(30,27,75,.55); }
.entry-content > h2, .wp-block-post-content > h2 { margin-top: 2.5rem; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.wp-block-post-content > h3 { margin-top: 2rem; font-size: 1.3rem; }
.wp-block-post-content li { margin-bottom: .35rem; }
.wp-block-post-content .mws-callout { background: #EEF2FF; border-left: 4px solid var(--wp--preset--color--primary); border-radius: 0 14px 14px 0; padding: 1.1rem 1.35rem; }
.wp-block-post-content .mws-callout p { margin: 0; }
.wp-block-post-content .mws-toc { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--border); border-radius: 16px; padding: 1.25rem 1.5rem; }
.mws-toc p { margin: 0 0 .5rem; font-weight: 800; }
.mws-toc ol { margin: 0; padding-left: 1.2rem; }
.mws-toc a { text-decoration: none; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.wp-block-post-content th, .wp-block-post-content td { border: 1px solid var(--wp--preset--color--border); padding: .65rem .8rem; text-align: left; vertical-align: top; }
.wp-block-post-content thead th { background: var(--wp--preset--color--surface); }
.wp-block-table { overflow-x: auto; }
.wp-block-post-terms.mws-tags a { display: inline-block; padding: .25rem .7rem; border-radius: 999px; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.mws-author-box { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem; border: 1px solid var(--wp--preset--color--border); border-radius: 18px; background: var(--wp--preset--color--surface); }
.mws-author-box img { border-radius: 50%; flex: none; }
.mws-author-box p { margin: 0 0 .4rem; color: var(--wp--preset--color--muted); font-size: .95rem; }
.mws-author-box .mws-author-name { color: var(--wp--preset--color--ink); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.mws-author-box .mws-author-name span { display: block; font-size: 1.15rem; text-transform: none; letter-spacing: 0; }
.mws-author-box a { font-weight: 700; font-size: .92rem; }

/* FAQ */
.wp-block-details { border: 1px solid var(--wp--preset--color--border); border-radius: 14px; padding: 1rem 1.25rem; background: #fff; }
.wp-block-details + .wp-block-details { margin-top: .75rem; }
.wp-block-details summary { font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 2rem; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 0; top: -.1rem; font-size: 1.4rem; color: var(--wp--preset--color--primary); }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > p { color: var(--wp--preset--color--muted); margin-top: .75rem; }

/* CTA band */
.mws-cta { border-radius: 24px; color: #fff; }
.mws-cta h2, .mws-cta p { color: #fff; }
.mws-cta p { color: #E0E7FF; }
.mws-cta .wp-block-button__link { background: #fff; color: var(--wp--preset--color--primary-dark); }

/* Contact cards */
.mws-contact-card { text-align: left; }

/* ---------- Footer ---------- */
.mws-footer { background: var(--wp--preset--color--primary-dark); color: #C7D2FE; font-size: .95rem; }
.mws-footer h2 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; }
.mws-footer a { color: #E0E7FF; text-decoration: none; }
.mws-footer a:hover { color: #fff; text-decoration: underline; }
.mws-footer ul { list-style: none; padding: 0; margin: 0; }
.mws-footer li { margin: 0 0 .5rem; }
.mws-footer .wp-block-site-title a { color: #fff; }
.mws-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: #A5B4FC; }
.mws-footer-bottom p { margin: 0; }

/* ---------- 404 / search ---------- */
.mws-404 .mws-big { font-size: clamp(5rem, 18vw, 9rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, #4338CA, #C93A23); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0; }
.wp-block-search__input { border-radius: 999px; border: 1px solid var(--wp--preset--color--border); padding: .7rem 1.1rem; }
.wp-block-search__button { border-radius: 999px; }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.mws-hero::before { width: 300px; height: 300px; right: -160px; }
	.mws-author-box { flex-direction: column; }
	.mws-header .wp-block-search { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Collapse the main menu into the hamburger on tablets / small laptops */
@media (min-width: 600px) and (max-width: 1080px) {
	.mws-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.mws-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.mws-header .wp-block-navigation__responsive-container-open { padding: .5rem; border-radius: 10px; background: var(--wp--preset--color--surface); }
.mws-card p.mws-icon { font-size: 1.5rem; color: inherit; }

/* ---------- Hero artwork (animated posters) ---------- */
.mws-hero .mws-chips a { color: #fff; text-decoration: none; }
.mws-hero .mws-chips li:hover { background: rgba(255,255,255,.22); }
.mws-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.mws-hero-art { position: relative; height: 470px; max-width: 520px; margin: 0 auto; }
.mws-hero-art figure { margin: 0; }
.mws-hero-art svg { display: block; width: 100%; height: auto; }
.mws-orbit { position: absolute; inset: 8% 6%; border-radius: 50%; background: radial-gradient(circle at 50% 45%, rgba(167,139,250,.45), rgba(67,56,202,0) 65%); }
.mws-poster { position: absolute; border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(2,6,23,.65), 0 0 0 1px rgba(255,255,255,.12); overflow: hidden; will-change: transform; }
.mws-p1 { width: 38%; left: 0; top: 70px; --r: -9deg; animation: mwsFloat 7s ease-in-out infinite; z-index: 1; }
.mws-p2 { width: 42%; left: 29%; top: 10px; --r: 2deg; animation: mwsFloat 6s ease-in-out -2s infinite; z-index: 3; }
.mws-p3 { width: 38%; right: 0; top: 95px; --r: 10deg; animation: mwsFloat 8s ease-in-out -4s infinite; z-index: 2; }
.mws-guide-card { position: absolute; left: 4%; bottom: 0; width: 46%; z-index: 4; border-radius: 16px; box-shadow: 0 24px 48px -18px rgba(2,6,23,.6); animation: mwsFloat 9s ease-in-out -1s infinite; --r: -2deg; }
.mws-play-btn { position: absolute; left: 50%; top: 40%; width: 64px; height: 64px; margin: -32px 0 0 -32px; z-index: 5; border-radius: 50%; animation: mwsPulse 2.4s ease-out infinite; }
.mws-float-chip { position: absolute; z-index: 6; background: #fff; color: #1E1B4B; font-weight: 800; font-size: .85rem; padding: .5rem .85rem; border-radius: 999px; box-shadow: 0 14px 30px -12px rgba(2,6,23,.55); white-space: nowrap; animation: mwsFloat 6s ease-in-out infinite; --r: 0deg; }
.mws-c1 { right: 4%; top: 0; animation-delay: -1s; }
.mws-c2 { right: 0; bottom: 70px; animation-delay: -3s; }
.mws-c3 { left: -2%; top: 18px; animation-delay: -5s; }
.mws-twinkle circle { animation: mwsTwinkle 2.8s ease-in-out infinite; }
.mws-twinkle circle:nth-child(2n) { animation-delay: -1.4s; }
.mws-twinkle circle:nth-child(3n) { animation-delay: -.7s; }
.mws-petals ellipse { animation: mwsPetal 6s linear infinite; transform-box: fill-box; }
.mws-petals ellipse:nth-child(2) { animation-delay: -1.2s; } .mws-petals ellipse:nth-child(3) { animation-delay: -2.4s; }
.mws-petals ellipse:nth-child(4) { animation-delay: -3.6s; } .mws-petals ellipse:nth-child(5) { animation-delay: -4.8s; }
@keyframes mwsFloat { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-14px) rotate(var(--r)); } }
@keyframes mwsPulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 100% { box-shadow: 0 0 0 26px rgba(255,255,255,0); } }
@keyframes mwsTwinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes mwsPetal { 0% { transform: translate(0,0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(-30px,120px) rotate(200deg); opacity: 0; } }
@media (max-width: 781px) {
	.mws-hero-art { height: 360px; max-width: 380px; }
	.mws-p1 { top: 50px; } .mws-p3 { top: 70px; }
	.mws-float-chip { font-size: .75rem; }
	.mws-c3 { left: 0; top: 0; } .mws-c1 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.mws-poster, .mws-guide-card, .mws-play-btn, .mws-float-chip, .mws-twinkle circle, .mws-petals ellipse { animation: none !important; }
}

/* ---------- In-article figures ---------- */
.wp-block-post-content .wp-block-image img { border-radius: 16px; box-shadow: 0 18px 40px -26px rgba(30,27,75,.55); border: 1px solid var(--wp--preset--color--border); }
.wp-block-post-content .wp-block-image figcaption { text-align: center; color: var(--wp--preset--color--muted); font-size: .9rem; margin-top: .6rem; }
.wp-block-post-content .wp-block-image.alignwide { margin-top: 2rem; margin-bottom: 2rem; }
