/*
Theme Name: Max Studio
Theme URI: https://maxshifman.com
Author: Maxwell Shifman
Description: Option B "The Studio" — a dark, podcast-first block theme for maxshifman.com. Works with the Commentary post type and commentary_topic taxonomy.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: max-studio
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) a { text-underline-offset: 3px; }
:where(.wp-site-blocks) a:focus-visible,
.wp-element-button:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }

/* ---------- Header ---------- */
.ms-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.ms-header .wp-block-site-title { font-family: var(--wp--preset--font-family--display); font-size: 20px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; margin: 0; }
.ms-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--text); }
.ms-nav { font-size: 15px; font-weight: 500; gap: 28px; }
.ms-nav a { text-decoration: none; }
.ms-nav .current-menu-item > a, .ms-nav a[aria-current="page"] { color: var(--wp--preset--color--accent); }
.ms-header .wp-block-button__link { padding: 12px 20px; font-size: 14px; }

/* ---------- Type helpers ---------- */
.ms-eyebrow { font-size: 13px !important; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wp--preset--color--accent); margin: 0; }
.ms-display { font-size: clamp(44px, 6vw, 104px) !important; line-height: 0.92 !important; letter-spacing: -0.03em; overflow-wrap: normal; word-break: normal; hyphens: manual; }
h1, h2, h3, .ms-band-quote, .ms-ep-big { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.ms-lede { font-size: 19px; color: var(--wp--preset--color--muted); max-width: 36rem; }
.ms-muted { color: var(--wp--preset--color--subtle); }
.ms-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--subtle); }

/* ---------- Sections ---------- */
.ms-section { padding-top: 80px; padding-bottom: 80px; }
.ms-section-tight { padding-top: 56px; padding-bottom: 56px; }
.ms-bordered { border-top: 1px solid var(--wp--preset--color--line); }
.ms-hero { padding-top: 40px; padding-bottom: 72px; }
.ms-hero-cols { gap: 48px; }
.ms-portrait img, .ms-portrait { border-radius: 4px; }
.ms-portrait img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; }

/* Credentials strip */
.ms-creds { border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); padding-top: 28px; padding-bottom: 28px; }
.ms-creds .ms-cred-title { font-family: var(--wp--preset--font-family--display); font-size: 20px; font-weight: 800; margin: 0; }
.ms-creds .ms-cred-sub { font-size: 14px; color: var(--wp--preset--color--subtle); margin: 4px 0 0; }

/* Yellow band */
.ms-band { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); padding-top: 72px; padding-bottom: 72px; }
.ms-band a { color: var(--wp--preset--color--ink); }
.ms-band .ms-band-quote { font-family: var(--wp--preset--font-family--display); font-size: clamp(36px, 4.4vw, 60px); line-height: 1; font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; margin: 0; }

/* Cards */
.ms-card { background: var(--wp--preset--color--surface); border-radius: 6px; padding: 28px; }
.ms-card-link { text-decoration: none; }

/* Episode tiles (Huberman-style thumbnails) */
.ms-ep { display: flex; flex-direction: column; gap: 12px; }
.ms-ep-thumb { aspect-ratio: 16 / 9; background: var(--wp--preset--color--surface-2); border-radius: 4px; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 6px; box-sizing: border-box; }
.ms-ep-thumb .ms-ep-big { font-family: var(--wp--preset--font-family--display); font-weight: 900; font-size: 30px; line-height: 0.95; text-transform: uppercase; margin: 0; color: var(--wp--preset--color--text); }
.ms-ep-thumb .ms-ep-guest { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--accent); margin: 0; }
.ms-ep-title { font-family: var(--wp--preset--font-family--display); font-size: 19px; font-weight: 700; line-height: 1.2; margin: 0; }
.ms-ep-title a { text-decoration: none; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 12px; }
.ms-chip { background: var(--wp--preset--color--chip); padding: 3px 10px; border-radius: 999px; }

/* Lists of posts */
.ms-list { list-style: none; padding: 0; margin: 0; }
.ms-list > li { border-top: 1px solid var(--wp--preset--color--line); padding-top: 18px; margin-bottom: 24px; }
.ms-meta { font-size: 13px; color: var(--wp--preset--color--subtle); gap: 6px; }
.ms-meta > * { margin: 0 !important; }
.ms-meta a { color: var(--wp--preset--color--subtle); text-decoration: none; }
.ms-list-title { font-family: var(--wp--preset--font-family--body) !important; font-size: 20px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important; line-height: 1.3 !important; margin: 6px 0 0 !important; }
.ms-list-title a { text-decoration: none; }

/* Commentary grid cards */
.ms-grid { list-style: none; padding: 0; margin: 0; }
.ms-grid > li { background: var(--wp--preset--color--surface); border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.ms-grid .wp-block-post-title { font-size: 24px !important; line-height: 1.15 !important; text-transform: none !important; letter-spacing: -0.01em; margin: 0; }
.ms-grid .wp-block-post-title a { text-decoration: none; }
.ms-grid .wp-block-post-excerpt { color: var(--wp--preset--color--muted); margin: 0; }
.ms-grid .wp-block-post-excerpt__more-text { display: none; }

/* Post terms as chips */
.ms-terms { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.ms-terms a { background: var(--wp--preset--color--chip); padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--wp--preset--color--text); }
.ms-terms .wp-block-post-terms__separator { display: none; }

/* Topic tiles */
.ms-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ms-topic { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 6px; background: var(--wp--preset--color--surface); text-decoration: none; color: var(--wp--preset--color--text); }
.ms-topic strong { font-family: var(--wp--preset--font-family--display); font-size: 20px; font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.ms-topic span { font-size: 14px; color: var(--wp--preset--color--subtle); }
.ms-topic.is-current, .ms-topic:hover { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.ms-topic.is-current span, .ms-topic:hover span { color: var(--wp--preset--color--ink); }

/* Press rows */
.ms-press > li { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 0; border-top: 1px solid var(--wp--preset--color--line); }
.ms-press .wp-block-post-featured-image img { border-radius: 4px; aspect-ratio: 16 / 9; object-fit: cover; }
.ms-press .wp-block-post-title { font-size: 28px !important; line-height: 1.1 !important; text-transform: none !important; margin: 6px 0 0; }
.ms-press .wp-block-post-title a { text-decoration: none; }
@media (max-width: 720px) { .ms-press > li { grid-template-columns: 1fr; } }

/* Article */
.ms-article .wp-block-post-title { font-size: clamp(40px, 5vw, 64px) !important; line-height: 1 !important; text-transform: none !important; }
.ms-article .wp-block-post-content { font-size: 18px; line-height: 1.7; color: #D2D4DE; }
.ms-article .wp-block-post-content h2, .ms-article .wp-block-post-content h3 { color: var(--wp--preset--color--text); margin-top: 1.6em; }
.ms-article .wp-block-post-content blockquote { border-left: 4px solid var(--wp--preset--color--accent); padding-left: 24px; margin-left: 0; font-family: var(--wp--preset--font-family--display); font-size: 24px; line-height: 1.25; font-weight: 800; color: var(--wp--preset--color--text); }
.ms-article .wp-block-post-content img { border-radius: 4px; }
.ms-byline { border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); padding-top: 16px; padding-bottom: 16px; }

/* Pagination */
.wp-block-query-pagination { gap: 12px; font-weight: 600; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { padding: 8px 14px; border: 1px solid var(--wp--preset--color--line-strong); border-radius: 999px; text-decoration: none; }
.wp-block-query-pagination .current { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--accent); }

/* Footer */
.ms-footer { border-top: 1px solid var(--wp--preset--color--line); font-size: 14px; color: var(--wp--preset--color--subtle); padding-top: 28px; padding-bottom: 40px; }
.ms-footer a { color: var(--wp--preset--color--subtle); text-decoration: none; }
.ms-footer a:hover { color: var(--wp--preset--color--accent); }
.ms-footer p { margin: 0; }

/* Forms (contact shortcode, search, comments) */
.wp-site-blocks input[type="text"], .wp-site-blocks input[type="email"], .wp-site-blocks input[type="search"], .wp-site-blocks input[type="tel"], .wp-site-blocks textarea, .wp-site-blocks select {
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--text); border: 1px solid var(--wp--preset--color--line-strong); border-radius: 8px; padding: 12px 14px; font: inherit; max-width: 100%;
}
.wp-site-blocks input[type="submit"], .wp-site-blocks button[type="submit"] {
	background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); border: 0; border-radius: 999px; padding: 14px 26px; font-weight: 700; font: inherit; font-weight: 700; cursor: pointer;
}
.wp-site-blocks label { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--muted); }
.ms-form { background: var(--wp--preset--color--surface); border-radius: 6px; padding: 32px; margin-top: 24px; }
.ms-form p { margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.ms-form input[type="text"], .ms-form input[type="email"], .ms-form textarea { width: 100%; box-sizing: border-box; }
.ms-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ms-form-note { padding: 12px 16px; border-radius: 8px; background: var(--wp--preset--color--chip); font-size: 14px; }
.ms-form-note.is-success { background: #1F3D2B; }
.ms-form-note.is-error { background: #4A1F24; }

/* Mobile */
@media (max-width: 781px) {
	.ms-section { padding-top: 56px; padding-bottom: 56px; }
	.ms-hero-cols { flex-direction: column-reverse; }
}

/* Press cards (homepage) */
.ms-press-cards { list-style: none; padding: 0; margin: 0; }
.ms-press-cards > li { display: flex; flex-direction: column; gap: 10px; }
.ms-press-cards .wp-block-post-featured-image img { border-radius: 4px; aspect-ratio: 16 / 9; object-fit: cover; }
.ms-ep { border-top: 1px solid var(--wp--preset--color--line); padding-top: 16px; }

/* Big numerals on cards */
.ms-card .ms-ep-big { font-family: var(--wp--preset--font-family--display); font-weight: 900; }
