/*
Theme Name: Wake-Up Call
Theme URI: https://wakeupcall.band
Author: Wake-Up Call
Description: Block theme for WAKE-UP CALL. Dark "dead LED" style: red seven-segment dates on dirty black, self-hosted fonts, and a Shows post type with an upcoming-shows block.
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.11.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wakeupcall
*/

/* Always reserve room for the scrollbar, so short and long pages line up */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }

/* Background grain (static SVG noise, no animation) */
body {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 -.02'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
	-webkit-font-smoothing: antialiased;
}

/* Focus: always visible */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: 3px;
}

/* Skip link and screen-reader text */
.screen-reader-text { clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px; overflow: hidden; position: absolute !important; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 8px; top: 8px; z-index: 100000; padding: 16px 24px; background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }

/* Header */
.wuc-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.wuc-header .wp-block-site-title { text-transform: uppercase; }
.wuc-header .wp-block-site-title a { text-decoration: none; }
.wuc-header .wp-block-navigation-item__content { text-decoration: none; padding-block: 4px; box-shadow: inset 0 -2px 0 transparent; }
.wuc-header .wp-block-navigation-item__content:not([aria-current]):hover { box-shadow: inset 0 -2px 0 var(--wp--preset--color--muted); }
.wuc-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.wuc-header .wp-block-navigation-item__content[aria-current="page"] { box-shadow: inset 0 -2px 0 currentColor; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }

/* Footer */
.wuc-footer { border-top: 1px solid var(--wp--preset--color--line-soft); }

/* Rubik Dirt ships as a capitals-only subset (half the size), so it is always set in capitals */
.has-rubik-dirt-font-family, .wp-block-site-title { text-transform: uppercase; }

/* Hero: fills the screen below the header, so the next section starts below the fold.
   Capped on very tall screens; on short screens the content sets the height. */
:root { --wuc-header-h: 81px; }
@media (max-width: 599px) { :root { --wuc-header-h: 77px; } }
.wuc-hero {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: min(calc(100vh - var(--wuc-header-h) - var(--wp-admin--admin-bar--height, 0px)), 1000px);
	min-height: min(calc(100svh - var(--wuc-header-h) - var(--wp-admin--admin-bar--height, 0px)), 1000px);
}
.wuc-hero > .wp-block-columns { width: 100%; margin-block: 0; }

/* Hero */
.wuc-hero-title { text-transform: uppercase; }
.wuc-photo {
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--surface) radial-gradient(circle, #2a2a26 1.2px, transparent 1.6px) 0 0 / 6px 6px;
	border: 1px solid var(--wp--preset--color--line);
	display: grid;
	place-items: center;
}
.wuc-photo p { margin: 0; }
.wp-block-image.wuc-photo-img img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border: 1px solid var(--wp--preset--color--line); }

/* Section divider */
.wuc-section { border-top: 1px solid var(--wp--preset--color--line); }

/* Buttons: hover only when motion is fine */
.wp-element-button, .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
/* Hover fades: only when the visitor has not asked for less motion */
@media (prefers-reduced-motion: no-preference) {
	a,
	button,
	.wp-element-button,
	.wp-block-button__link,
	.wp-block-navigation-item__content,
	.wp-block-navigation__responsive-container-open,
	.wp-block-navigation__responsive-container-close,
	.wpcf7 input,
	.wpcf7 textarea,
	.wpcf7 select {
		transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, text-decoration-color .2s ease, opacity .2s ease;
	}
}

/* LED dates */
.wuc-led { display: block; height: 32px; width: auto; }
.wuc-led--lg { height: 56px; }
.wuc-led .on { fill: var(--wp--preset--color--accent); }
.wuc-led .off { fill: var(--wp--preset--color--dead); }
.wuc-led-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wuc-led-year { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--wp--preset--color--muted); line-height: 1; }

/* Shows list */
.wuc-shows { list-style: none; margin: 0 0 24px; padding: 0; }
.wuc-show {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 24px 0;
	border-bottom: 1px solid var(--wp--preset--color--line-soft);
}
/* More room between rows only; first row keeps its distance to the heading */
.wuc-show:first-child { padding-top: 16px; }
@media (min-width: 640px) { .wuc-show { grid-template-columns: 128px minmax(0, 1fr) auto; } }
.wuc-show__venue { font-size: var(--wp--preset--font-size--large); font-weight: 700; line-height: 1.1; margin: 0; color: var(--wp--preset--color--contrast); }
.wuc-show__venue a { color: inherit; text-decoration: none; }
.wuc-show__venue a:hover { text-decoration: underline; text-underline-offset: 4px; }
.wuc-show__city { color: var(--wp--preset--color--muted); margin: 0; }
.wuc-show__link { font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; color: var(--wp--preset--color--contrast); }
.wuc-shows-empty { color: var(--wp--preset--color--muted); margin: 0 0 24px; padding: 16px 0; border-bottom: 1px solid var(--wp--preset--color--line-soft); }

/* Show detail */
.wuc-show-detail { display: grid; gap: 24px; margin-bottom: 32px; }
.wuc-show-detail__venue { font-size: var(--wp--preset--font-size--x-large); font-weight: 700; line-height: 1.1; margin: 0; }
.wuc-show-detail__city { color: var(--wp--preset--color--muted); margin: 0; }

/* Small uppercase labels */
.wuc-label { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }


/* Outline button (fallback next to theme.json variation) */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 2px solid var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* ===== Contact Form 7 ===== */
.wpcf7 { max-width: 720px; }
.wpcf7 form > p { margin: 0 0 24px; }
.wpcf7 label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--wp--preset--color--contrast);
}
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 1.35;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
	box-sizing: border-box;
	text-transform: none;
	letter-spacing: normal;
}
.wpcf7 textarea { min-height: 192px; resize: vertical; }
.wpcf7 ::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }
.wpcf7 input:focus-visible,
.wpcf7 select:focus-visible,
.wpcf7 textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast);
	outline-offset: 2px;
	border-color: var(--wp--preset--color--contrast);
}
.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] { accent-color: var(--wp--preset--color--accent); width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: middle; }
.wpcf7 .wpcf7-list-item { margin: 0 16px 8px 0; }
.wpcf7 .wpcf7-list-item-label { text-transform: none; letter-spacing: normal; font-weight: 500; font-size: var(--wp--preset--font-size--medium); }

/* Send button = primary button */
.wpcf7 .wpcf7-submit {
	min-height: 48px;
	padding: 0 24px;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--accent);
	border: 2px solid var(--wp--preset--color--accent);
	border-radius: 2px;
	cursor: pointer;
}
.wpcf7 .wpcf7-submit:hover { background: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--contrast); }
.wpcf7 .wpcf7-submit:disabled { opacity: .6; cursor: progress; }
.wpcf7 .wpcf7-spinner { background-color: var(--wp--preset--color--muted); vertical-align: middle; }

/* Errors: red edge (the one place red marks a problem), message text in grey white for legibility */
.wpcf7 .wpcf7-form-control.wpcf7-not-valid { border-color: var(--wp--preset--color--accent); border-width: 2px; }
.wpcf7 .wpcf7-not-valid-tip {
	display: block;
	margin-top: 8px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	color: var(--wp--preset--color--contrast);
}
.wpcf7 .wpcf7-not-valid-tip::before { content: "! "; color: var(--wp--preset--color--accent); }

/* Form-level message */
.wpcf7 form .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 16px;
	border: 2px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--surface);
}
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--wp--preset--color--muted); }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { border-color: var(--wp--preset--color--accent); }

/* Footer stays at the bottom of the screen on short pages */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}
.wp-site-blocks > main { flex: 1 0 auto; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Header: red Contact button next to the menu */
.wuc-header .wp-block-site-title { white-space: nowrap; flex-shrink: 0; }
.wuc-header-cta .wp-block-button__link { white-space: nowrap; }
@media (max-width: 599px) {
	.wuc-header .wp-block-site-title { font-size: 20px; }
	.wuc-header-actions { gap: 16px !important; }
	.wuc-header-cta .wp-block-button__link { min-height: 44px; padding-left: 12px; padding-right: 12px; font-size: 16px; }
}
@media (max-width: 359px) {
	.wuc-header .wp-block-site-title { font-size: 17px; }
	.wuc-header-actions { gap: 8px !important; }
}
.wuc-header .wuc-header-cta .wp-block-button__link[aria-current="page"] { box-shadow: none; }

/* Footer menu: right-aligned, stacked */
.wuc-footer-nav { text-align: right; font-size: var(--wp--preset--font-size--small); }
.wuc-footer-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--contrast); text-decoration: none; }

/* About us: alternating rows. Text comes first in the page, so phones read text then photo.
   On wider screens every second row shows the photo on the left. */
.wuc-about-row .wuc-photo { width: 100%; }
.wuc-about-row h3 { margin-top: 0; }
@media (min-width: 782px) {
	.wuc-about-row--flip { flex-direction: row-reverse; }
	/* Photos 20% smaller than the column, kept against the outer edge */
	.wuc-about-row .wuc-photo { width: 80%; margin-left: auto; }
	.wuc-about-row--flip .wuc-photo { margin-left: 0; margin-right: auto; }
}

/* Footer menu: underline fades in on hover */
.wuc-footer-nav .wp-block-navigation-item__content { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.wuc-footer-nav .wp-block-navigation-item__content:hover,
.wuc-footer-nav .wp-block-navigation-item__content[aria-current="page"] { text-decoration-color: currentColor; }

/* Page changes: quick cross-fade. Header stays put. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
	.wuc-header { view-transition-name: wuc-header; }
	::view-transition-group(root),
	::view-transition-old(root),
	::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }

	/* Browsers without page transitions: the content fades in */
	@supports not (view-transition-name: none) {
		.wp-site-blocks > main { animation: wuc-fade-in .2s ease both; }
	}
}
@keyframes wuc-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Motion: respect the user setting everywhere */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
