/*
Theme Name: Hypnotic
Author: Vitalijus
Description: Dark, accessible (WCAG 2.2 AA) block theme for an underground techno DJ. Includes mixes, events and a booking form.
Version: 0.1.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hypnotic
Tags: dark, one-column, block-patterns, full-site-editing, accessibility-ready
*/

/* ---------- Accessibility helpers ---------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

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

/* Focused notices get a ring too, so sighted keyboard users see where focus went. */
.notice:focus {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

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

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Anchored sections should not hit the very top edge. */
[id] {
	scroll-margin-top: 1.5rem;
}

/* ---------- Header & footer ---------- */

.site-header {
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--wp--preset--color--surface-2);
}

.site-header .wp-block-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.wp-block-site-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.wp-block-site-title a:hover {
	text-decoration: underline;
}

.site-footer {
	margin-top: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
	border-top: 1px solid var(--wp--preset--color--surface-2);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Large enough touch targets (WCAG 2.5.8). */
.wp-block-navigation a,
.wp-block-social-link a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

/* ---------- Hero ---------- */

.hero {
	padding-top: clamp(4rem, 14vh, 9rem);
	padding-bottom: clamp(3rem, 10vh, 6rem);
	background:
		radial-gradient(ellipse at 75% 15%, rgba(255, 77, 77, 0.16), transparent 55%),
		repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.02) 3px 4px),
		var(--wp--preset--color--base);
}

.kicker {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.hero .hero__title {
	font-size: clamp(3rem, 13vw, 9rem);
	line-height: 0.9;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
	margin-top: 0.5rem;
}

.hero__lead {
	font-size: var(--wp--preset--font-size--large);
	max-width: 34ch;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

/* ---------- Sections ---------- */

.section {
	padding-top: var(--wp--preset--spacing--70);
	padding-bottom: var(--wp--preset--spacing--70);
	border-top: 1px solid var(--wp--preset--color--surface-2);
}

/* ---------- Mixes ---------- */

.mix-list .wp-block-post-template {
	padding: 0;
	list-style: none;
}

.mix-list .wp-block-post {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--50);
	border-bottom: 1px solid var(--wp--preset--color--surface-2);
}

.mix-list .wp-block-post-title {
	margin-bottom: 0.25rem;
}

/* ---------- Events ---------- */

.event-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.event {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.35rem;
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--wp--preset--color--surface-2);
}

.event__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
}

.event__date,
.event__meta {
	margin: 0;
}

.event__date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.event__meta {
	color: var(--wp--preset--color--muted);
}

.event__tickets {
	justify-self: start;
	margin-top: 0.5rem;
	text-decoration: none;
}

/* Wide screens: date in its own column, title + place in the middle, tickets on the right.
   DOM order stays title → date → place, so screen readers hear the title first. */
@media (min-width: 48rem) {
	.event {
		grid-template-columns: 12rem 1fr auto;
		grid-template-areas:
			"date title tickets"
			"date meta  tickets";
		column-gap: 2rem;
		align-items: center;
	}

	.event__title { grid-area: title; }
	.event__date { grid-area: date; }
	.event__meta { grid-area: meta; }
	.event__tickets { grid-area: tickets; margin-top: 0; }
}

.event-details {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.5rem 1.5rem;
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--surface);
}

.event-details dt {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--muted);
}

.event-details dd {
	margin: 0;
}

/* ---------- Forms ---------- */

.booking-form {
	display: grid;
	gap: 1.5rem;
	max-width: 40rem;
}

.booking-form .field {
	display: grid;
	gap: 0.4rem;
}

.booking-form label {
	font-weight: 700;
}

.booking-form .req {
	font-weight: 400;
	color: var(--wp--preset--color--muted);
}

.form-hint {
	margin: 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.booking-form input,
.booking-form textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 0.75rem 0.9rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--line);
	border-radius: 0;
	color-scheme: dark;
}

.booking-form textarea {
	min-height: 10rem;
	resize: vertical;
}

.booking-form [aria-invalid="true"] {
	border-color: var(--wp--preset--color--accent);
	border-width: 3px;
}

.field__error {
	margin: 0;
	font-weight: 700;
	color: var(--wp--preset--color--accent);
}

.booking-form button {
	justify-self: start;
	min-height: 44px;
	cursor: pointer;
	border: 0;
}

.hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.notice {
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	background: var(--wp--preset--color--surface);
	border-left: 4px solid var(--wp--preset--color--accent);
}

.notice--success {
	border-left-color: var(--wp--preset--color--contrast);
}

.notice h3 {
	margin-top: 0;
	font-size: var(--wp--preset--font-size--medium);
}

.notice ul {
	margin-bottom: 0;
}
