/*
Theme Name: Moonball
Description: A simple, friendly theme for the Moonball Comics family of shows. Comic-panel boxes, one color per show.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: moonball
*/

:root {
	--ink: #1b2a4e;
	--ink-soft: #4b5873;
	--paper: #fffdf6;
	--panel: #ffffff;
	--moon: #f7cc4a;
	--line: #d9dbe3;
	--accent: #27408b;
	--display: 'Lilita One', 'Trebuchet MS', sans-serif;
	--body: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
	--hand: 'Patrick Hand', 'Comic Sans MS', cursive;
	--gutter: clamp(16px, 4vw, 40px);
	--width: 1120px;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--body);
}

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

a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--moon); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.5vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.5rem); color: var(--accent); }
h3 { font-size: 1.3rem; }

.wrap { max-width: var(--width); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--panel); padding: 8px 14px; }

.moon { width: 1em; height: 1em; flex: none; }
.hand { font-family: var(--hand); font-size: 1.3rem; line-height: 1.25; }

/* The comic-panel box used for every card. */
.panel {
	background: var(--panel);
	border: 3px solid var(--ink);
	border-radius: 6px;
	box-shadow: 5px 5px 0 var(--ink);
}

.eyebrow { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .875rem; margin: 0 0 .6em; }
.lede { font-size: 1.2rem; max-width: 62ch; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.25em 0 0; }
.btn {
	display: inline-block;
	padding: 10px 22px;
	background: var(--moon);
	color: var(--ink);
	border: 3px solid var(--ink);
	border-radius: 6px;
	box-shadow: 3px 3px 0 var(--ink);
	font-weight: 800;
	text-decoration: none;
	transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { background: var(--panel); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Top of every page */
.topline { margin: 0; background: var(--ink); text-align: center; font-size: .9rem; padding: 6px var(--gutter); }
.topline a { color: #fff; display: inline-flex; align-items: center; gap: .5em; text-decoration: none; }
.topline a:hover { text-decoration: underline; }
.topline .moon { font-size: 1.3em; }

.masthead { background: var(--panel); border-bottom: 3px solid var(--ink); }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 28px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: .4em; font: 400 1.6rem/1.1 var(--display); color: var(--accent); text-decoration: none; }
.brand .moon { font-size: 1.4em; }
.masthead ul { display: flex; flex-wrap: wrap; gap: 2px 20px; list-style: none; margin: 0; padding: 0; }
.masthead nav a { color: var(--ink); text-decoration: none; }
.masthead nav a:hover, .masthead nav .current-menu-item a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 3px; }

/* Page body: everything sits in a column unless it's marked full width. */
.entry > *:not(.full) { max-width: var(--width); margin-inline: auto; padding-inline: var(--gutter); }
.entry { overflow-x: clip; }
.entry > p:not(.note), .entry > ul, .entry > ol, .entry > .wp-block-table { padding-inline-end: max(var(--gutter), calc(min(100%, var(--width)) - 760px)); }
.entry > section:not(.full) { margin-block: clamp(36px, 6vw, 64px); }
.entry > :last-child { margin-bottom: clamp(36px, 6vw, 64px); }

.page-head { background: var(--accent); color: #fff; padding-block: clamp(28px, 5vw, 48px); margin-bottom: 36px; }
.page-head h1 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.25rem); }

/* Moonball landing */
.welcome { background: var(--moon); border-bottom: 3px solid var(--ink); padding-block: clamp(36px, 7vw, 76px); }
.welcome .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.welcome .lede { margin-bottom: 0; }
.welcome__moon { display: none; }

.entry > .next { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--width) - 2 * var(--gutter)); padding: clamp(20px, 4vw, 36px); margin-top: 36px; }
.next .eyebrow { color: var(--accent); }
.next h2 { color: var(--ink); margin-bottom: .2em; }

.when { font: 400 clamp(1.4rem, 3vw, 1.75rem)/1.2 var(--display); margin: 0 0 .2em; }

.plate { display: flex; align-items: center; justify-content: center; background: #fff; border: 3px solid var(--ink); border-radius: 6px; padding: 16px; min-height: 130px; text-decoration: none; }
.plate img { display: block; max-height: 170px; width: auto; }
.wordmark { font: 400 1.7rem/1.1 var(--display); color: var(--accent); text-align: center; }

.family h2 { margin-bottom: .2em; }
.shows { list-style: none; margin: 24px 0 0; padding: 0; display: grid;  grid-template-columns: repeat(auto-fill, minmax(min(235px, 100%), 1fr)); gap: 24px; }
.show { transition: transform .1s, box-shadow .1s; }
.show:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.show a { display: flex; flex-direction: column; height: 100%; padding: 14px; color: var(--ink); text-decoration: none; }
.show__mark { display: flex; align-items: center; justify-content: center; height: 96px; margin-bottom: 12px; border-bottom: 2px dashed var(--line); padding-bottom: 12px; }
.show__mark img { max-height: 80px; width: auto; }
.show__name { font: 400 1.2rem/1.2 var(--display); color: var(--accent); }
.show__when { font-weight: 800; }
.show__when.is-soon { font-family: var(--hand); font-weight: 400; font-size: 1.2rem; color: var(--ink-soft); }
.show__where { color: var(--ink-soft); font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .show { transition: none; } .show:hover { transform: none; } }

/* Show home */
.hero { background: var(--accent); color: #fff; padding-block: clamp(32px, 6vw, 64px); border-bottom: 3px solid var(--ink); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 32px; }
.hero .wrap > :only-child { grid-column: 1 / -1; }
.hero h1 { color: #fff; }
.hero .where { margin: 0; font-size: 1.1rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 24px; }
.entry > .facts { padding-inline: var(--gutter); }
.fact { padding: 18px 20px; }
.fact h3 { color: var(--accent); }
.fact p { margin: 0; }
.fact .hand { display: block; margin-top: .4em; color: var(--accent); }

.note { text-align: center; font-size: 1.55rem; color: var(--accent); transform: rotate(-.6deg); }

.guests ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: start; gap: 28px 24px; }
.guest { overflow: hidden; }
.guest > img { display: block; width: 100%; border-bottom: 3px solid var(--ink); }
.guest__body { padding: 14px 16px 16px; }
.guest h3 { color: var(--accent); margin: 0; }
.guest__credit { margin: .15em 0 0; color: var(--ink-soft); }
.guest__body > p { margin-bottom: 0; }

.rates { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: .96rem; }
.rates caption { text-align: left; font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 4px; }
.rates th { text-align: left; font-weight: 400; padding: 5px 12px 5px 0; }
.rates td { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: top; padding-block: 5px; }
.rates tr { border-top: 2px dashed var(--line); }

.preview ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 46%), 1fr)); gap: 20px; }
.preview a.panel { display: block; height: 100%; overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .1s, box-shadow .1s; }
.preview a.panel:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.preview img { display: block; width: 100%; border-bottom: 3px solid var(--ink); }
.preview span { display: block; padding: 8px 10px; font: 400 1.05rem/1.2 var(--display); }
@media (prefers-reduced-motion: reduce) { .preview a.panel { transition: none; } .preview a.panel:hover { transform: none; } }

/* Footer */
.foot { background: var(--ink); color: #fff; padding-block: 36px; }
.foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 28px; }
.foot h2 { color: var(--moon); font-size: 1.4rem; }
.foot a { color: #fff; }
.foot__shows { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.foot__shows li { break-inside: avoid; margin-bottom: 8px; line-height: 1.3; }
.foot__shows span { display: block; font-size: .875rem; color: #c9d0e0; }
.foot__contact { text-align: right; }
.foot__contact .moon { font-size: 3.4rem; }
.foot__contact p { margin: .4em 0 0; }

@media (max-width: 760px) {
	.hero .wrap, .entry > .next { grid-template-columns: 1fr; }
	.hero .plate { max-width: 340px; min-height: 0; }
	.foot .wrap { grid-template-columns: 1fr; }
	.foot__shows { columns: 1; }
	.foot__contact { text-align: left; }
}

@media (min-width: 761px) {
	.welcome__moon { display: block; font-size: clamp(130px, 17vw, 190px); }
}

/* Editor */
.editor-styles-wrapper .full { margin-inline: 0; }
.editor-styles-wrapper { background: var(--paper); font-family: var(--body); }
