/*
 * SatNews Events — front-end stylesheet.
 *
 * Layered with theme.json:
 *   1. theme.json defines the token system (colors, spacing, typography).
 *   2. This stylesheet implements block styles, layout primitives, and
 *      component patterns that lean on those tokens.
 *   3. The Site Editor (Global Styles) overrides tokens site-wide per event.
 *   4. Block-level controls in the inserter override per-instance.
 *
 * If you change visual rhythm globally, edit theme.json first; only edit
 * this file for things that can't be expressed as a token.
 */

/* ============================================================
 * Base rhythm
 * ============================================================ */

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

a { text-underline-offset: 0.18em; }

main.wp-block-group { min-height: 60vh; }

/* ============================================================
 * Header polish
 * ============================================================ */

.wp-site-blocks > header.wp-block-group .wp-block-site-title a { text-decoration: none; }
.wp-site-blocks > header.wp-block-group .wp-block-navigation { gap: 1.25rem; }

/* ============================================================
 * Block style: Card (group / columns / column)
 * Apply broadly to wrap any content in a clean card surface.
 * ============================================================ */

.is-style-satnews-card,
.wp-block-group.is-style-satnews-card,
.wp-block-column.is-style-satnews-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--30);
	box-shadow: 0 1px 2px rgba(15, 20, 25, 0.05), 0 4px 16px rgba(15, 20, 25, 0.05);
	transition: box-shadow 160ms ease, transform 160ms ease;
}
.is-style-satnews-card:hover {
	box-shadow: 0 2px 4px rgba(15, 20, 25, 0.06), 0 12px 28px rgba(15, 20, 25, 0.08);
}

.is-style-satnews-bordered {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	padding: var(--wp--preset--spacing--30);
}

.is-style-satnews-highlight {
	background: linear-gradient(180deg, var(--wp--preset--color--base) 0%, var(--wp--preset--color--base-2) 100%);
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 8px;
	padding: var(--wp--preset--spacing--30);
}

/* ============================================================
 * Block style: pill / track badge (core/post-terms)
 * ============================================================ */

.wp-block-post-terms.is-style-satnews-pill a,
.wp-block-post-terms.is-style-satnews-pill {
	display: inline-flex;
	align-items: center;
	background: var(--wp--preset--color--base-2);
	color: var(--wp--preset--color--contrast-2);
	border-radius: 999px;
	padding: 0.3em 0.85em;
	font-size: 0.78rem;
	font-weight: 600;
	text-decoration: none;
	letter-spacing: 0.02em;
}
.wp-block-post-terms.is-style-satnews-pill a:hover { background: var(--wp--preset--color--border); }

.wp-block-post-terms.is-style-satnews-track a {
	display: inline-flex;
	align-items: center;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border-radius: 4px;
	padding: 0.3em 0.7em;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
}

/* ============================================================
 * Block style: meta line / eyebrow (core/paragraph)
 * ============================================================ */

.wp-block-paragraph.is-style-satnews-meta-line,
p.is-style-satnews-meta-line {
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
	letter-spacing: 0.01em;
	margin: 0;
}

.wp-block-paragraph.is-style-satnews-eyebrow,
p.is-style-satnews-eyebrow {
	color: var(--wp--preset--color--muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0 0 0.4em 0;
}

/* ============================================================
 * Block style: section heading (core/heading)
 * ============================================================ */

.wp-block-heading.is-style-satnews-section-heading {
	position: relative;
	padding-bottom: 0.4em;
	border-bottom: 1px solid var(--wp--preset--color--border);
	margin-bottom: var(--wp--preset--spacing--30);
}

/* ============================================================
 * Archive grids — speakers / sponsors stub templates
 * ============================================================ */

.wp-site-blocks .wp-block-query .wp-block-post-template {
	padding: 0;
	margin: 0;
	list-style: none;
}

/* Speaker archive cards (until Phase 6 ships the real block) */
.post-type-archive-speaker .wp-block-post-template li > .wp-block-group,
.post-type-archive-sponsor .wp-block-post-template li > .wp-block-group {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--20);
	transition: box-shadow 160ms ease, transform 160ms ease;
}
.post-type-archive-speaker .wp-block-post-template li > .wp-block-group:hover,
.post-type-archive-sponsor .wp-block-post-template li > .wp-block-group:hover {
	box-shadow: 0 2px 4px rgba(15,20,25,0.05), 0 10px 24px rgba(15,20,25,0.07);
	transform: translateY(-1px);
}
.post-type-archive-speaker .wp-block-post-template .wp-block-post-featured-image,
.post-type-archive-speaker .wp-block-post-template .wp-block-post-featured-image img {
	border-radius: 8px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
.post-type-archive-sponsor .wp-block-post-template .wp-block-post-featured-image img {
	object-fit: contain;
	background: var(--wp--preset--color--base-2);
	padding: 0.5rem;
}
.post-type-archive-speaker .wp-block-post-template .wp-block-post-title,
.post-type-archive-sponsor .wp-block-post-template .wp-block-post-title {
	margin: var(--wp--preset--spacing--20) 0 0.25em;
	font-size: 1rem;
	font-weight: 650;
}
.post-type-archive-speaker .wp-block-post-template .wp-block-post-title a,
.post-type-archive-sponsor .wp-block-post-template .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

/* ============================================================
 * Session archive stub — until the real agenda block lands in Phase 5
 * ============================================================ */

.post-type-archive-session .wp-block-post-template li > .wp-block-group,
.tax-schedule-group .wp-block-post-template li > .wp-block-group {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 8px;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	margin-bottom: var(--wp--preset--spacing--20);
}
.post-type-archive-session .wp-block-post-template .wp-block-post-title,
.tax-schedule-group .wp-block-post-template .wp-block-post-title {
	margin: 0 0 0.25em;
	font-size: 1.1rem;
}
.post-type-archive-session .wp-block-post-template .wp-block-post-title a,
.tax-schedule-group .wp-block-post-template .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

/* ============================================================
 * Placeholder paragraphs marking "TODO Phase N"
 * ============================================================ */

.satnews-todo {
	border-left: 3px dashed var(--wp--preset--color--muted);
	padding-left: 1em;
	font-style: italic;
}

/* ============================================================
 * Single-session layout (stub)
 * ============================================================ */

.single-session .wp-block-post-title { margin-top: 0.2em; }

/* ============================================================
 * Single-speaker: socials + pronunciation
 * Auto-hide blocks that resolve to empty strings — bindings still emit
 * the wrapper paragraph, so we hide on :empty.
 * ============================================================ */

.satnews-speaker-socials p:empty,
.satnews-speaker-socials .wp-block-paragraph:has(> :only-child:empty) { display: none; }
.satnews-speaker-socials { gap: 0.5rem 1rem; margin-top: 0.5rem; }
.satnews-speaker-socials p { margin: 0; word-break: break-all; }
.satnews-speaker-socials p::before { content: "↗ "; color: var(--wp--preset--color--muted); margin-right: 0.15em; }
.satnews-speaker-socials:has(p:not(:empty)):empty { display: none; }

/* Pronunciation block: hide whole wrapper if the value is empty. */
.satnews-speaker-pronunciation:has(.is-style-satnews-meta-line:empty) { display: none; }
.satnews-speaker-pronunciation .is-style-satnews-meta-line { font-style: italic; }

/* ============================================================
 * Mobile
 * ============================================================ */

@media (max-width: 782px) {
	.wp-site-blocks > header.wp-block-group .wp-block-navigation { gap: 0.5rem; }
	.is-style-satnews-card,
	.wp-block-group.is-style-satnews-card { padding: var(--wp--preset--spacing--20); }
}
