/**
 * /events — own stylesheet, loaded only on /events (board-cut file map: never
 * style.css). Design: the client's own /events page, read from the published
 * base44 bundle 2026-09-23. Reads theme.json's design tokens
 * (--wp--preset--color--*, --wp--preset--font-family--*) the same way the rest
 * of this repo's component CSS does — those stay the single source of the
 * palette; this file only adds what theme.json cannot express.
 *
 * Mobile: single column below 48rem for the cards, steps and form; the gallery
 * stays two-up, matching her own `grid-cols-2 lg:grid-cols-4`. Note this is
 * the gallery only — the developer reference's "side by side on mobile"
 * requirement is about the TIER cards on the home page, a separate and still
 * open question (it reverses ADR-012), and nothing here decides it.
 */

.gv-events {
	background: var( --wp--preset--color--ivory );
	padding-block: clamp( 3rem, 8vw, 5rem );
}

.gv-events__wrap {
	max-width: 68rem;
	margin-inline: auto;
	padding-inline: 1.5rem;
}

/* --- Shared type ---------------------------------------------------------
   Same convention as the site-wide .gv-eyebrow (style.css) — duplicated here,
   not imported, because this stylesheet must never depend on or be depended
   on by style.css (board-cut file map: "never style.css"). */
.gv-events__eyebrow {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--eyebrow );
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.32em;
	color: var( --wp--preset--color--gold );
	margin: 0 0 0.5rem;
}

.gv-events__intro {
	text-align: center;
	max-width: 44rem;
	margin-inline: auto;
}

.gv-events__title {
	font-family: var( --wp--preset--font-family--display );
	font-size: clamp( 2.5rem, 6vw, 5rem );
	line-height: 1.05;
	color: var( --wp--preset--color--charcoal );
	margin: 0;
}

.gv-events__title em {
	font-style: italic;
}

.gv-events__lede {
	font-family: var( --wp--preset--font-family--body );
	color: var( --wp--preset--color--muted );
	margin: 1.25rem auto 0;
	max-width: 34rem;
	line-height: 1.7;
}

.gv-events__section {
	margin-top: clamp( 3.5rem, 9vw, 7rem );
	scroll-margin-top: 7rem;
}

.gv-events__head {
	text-align: center;
	margin-bottom: 2.5rem;
}

.gv-events__h2 {
	font-family: var( --wp--preset--font-family--display );
	font-size: clamp( 1.75rem, 4vw, 2.5rem );
	color: var( --wp--preset--color--charcoal );
	margin: 0;
}

.gv-events__h3 {
	font-family: var( --wp--preset--font-family--display );
	font-size: clamp( 1.5rem, 3vw, 2rem );
	color: var( --wp--preset--color--charcoal );
	text-align: center;
	margin: 0 0 2rem;
}

/* --- Gallery ----------------------------------------------------------- */

/* Hidden by default: chips that cannot filter anything are worse than absent.
   events.js adds .gv-events--js the moment it can drive them. With scripting
   off nothing is hidden and the full ungated grid is what renders (ADR-030's
   contract). Compound selector so a later same-specificity rule cannot
   silently win — this repo has shipped that bug before. */
.gv-events__filters.gv-js-only {
	display: none;
}

.gv-events--js .gv-events__filters.gv-js-only {
	display: flex;
}

.gv-events__filters {
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	margin-bottom: 2.5rem;
}

.gv-events__chip {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--eyebrow );
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var( --wp--preset--color--muted );
	background: transparent;
	border: 1px solid var( --wp--preset--color--hairline );
	border-radius: 999px;
	padding: 0.5rem 1.25rem;
	cursor: pointer;
	transition: border-color 0.3s, color 0.3s, background-color 0.3s;
}

.gv-events__chip:hover,
.gv-events__chip:focus-visible {
	border-color: var( --wp--preset--color--gold );
	color: var( --wp--preset--color--charcoal );
}

.gv-events__chip.is-active {
	background: var( --wp--preset--color--charcoal );
	border-color: var( --wp--preset--color--charcoal );
	color: var( --wp--preset--color--ivory );
}

.gv-events__grid {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 1rem;
}

.gv-events__figure {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: 0.5rem;
}

.gv-events__figure-media {
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.gv-events__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 1.2s;
}

.gv-events__figure:hover .gv-events__img {
	transform: scale( 1.05 );
}

/* The scrim is what makes white caption text legible over an unknown
   photograph — without it a pale image loses the caption entirely. */
.gv-events__figcaption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 1rem;
	color: var( --wp--preset--color--ivory );
	background: linear-gradient( to top, rgba( 0, 0, 0, 0.65 ), transparent );
}

.gv-events__figlabel {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--micro );
	text-transform: uppercase;
	letter-spacing: 0.22em;
	opacity: 0.75;
	margin: 0;
}

.gv-events__figtitle {
	font-family: var( --wp--preset--font-family--display );
	font-size: clamp( 1.0625rem, 2.5vw, 1.5rem );
	line-height: 1.2;
	margin: 0.25rem 0 0;
}

.gv-events__figcap {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--micro );
	opacity: 0.8;
	margin: 0.25rem 0 0;
}

.gv-events__empty {
	text-align: center;
	color: var( --wp--preset--color--muted );
	margin-top: 2rem;
}

/* --- Gallery paging ----------------------------------------------------
   Arrows either side of a dot per page, per her own design. Hidden by
   default and revealed by events.js only when there is more than one page —
   the same gv-js-only discipline as the chips above, for the same reason:
   without scripting every photograph is already on the page, so an arrow
   would have nothing to turn. */
.gv-events__paging.gv-js-only {
	display: none;
}

.gv-events--js .gv-events__paging.gv-js-only {
	display: flex;
}

.gv-events__paging {
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	margin-top: 2rem;
}

/* `[hidden]` must beat the `display: flex` above, which is otherwise more
   specific than the browser's own `[hidden] { display: none }`. Without this
   the controls would show on a one-page gallery — the exact thing the
   `hidden` attribute is there to prevent. */
.gv-events__paging[hidden] {
	display: none;
}

.gv-events__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 1px solid var( --wp--preset--color--hairline );
	border-radius: 50%;
	background: transparent;
	color: var( --wp--preset--color--muted );
	cursor: pointer;
	transition: border-color 0.3s, color 0.3s, opacity 0.3s;
}

.gv-events__arrow svg {
	width: 1rem;
	height: 1rem;
}

.gv-events__arrow:hover:not( :disabled ),
.gv-events__arrow:focus-visible:not( :disabled ) {
	border-color: var( --wp--preset--color--gold );
	color: var( --wp--preset--color--charcoal );
}

/* Disabled rather than removed at the ends, so the control does not jump
   position as she pages — but faded enough to read as unavailable. */
.gv-events__arrow:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.gv-events__dots {
	display: flex;
	align-items: center;
	/* No gap: the dots' own transparent padding below provides the spacing,
	   and adding gap on top would push them far apart on the page. */
	gap: 0;
}

/* The active dot widens into a bar rather than changing colour alone —
   colour-only would be the sole signal, which fails for anyone who cannot
   distinguish these two tones.

   THE PADDING IS THE TAP TARGET, and is not decoration. A dot that is 6px of
   painted area is a 6px tap target on a phone, which fails WCAG 2.5.8 (AA)
   by a wide margin — 24×24 CSS px is the floor. `box-sizing: content-box`
   plus `background-clip: content-box` keeps the PAINTED dot at 6px while the
   BUTTON is 6 + 2×10 = 26px square. Shrink the padding and you shrink the
   target, invisibly: nothing about the page looks different when this
   regresses, which is exactly why it is written down here. */
.gv-events__dot {
	box-sizing: content-box;
	width: 0.375rem;
	height: 0.375rem;
	padding: 0.625rem;
	border: 0;
	border-radius: 999px;
	background: var( --wp--preset--color--hairline );
	background-clip: content-box;
	cursor: pointer;
	transition: width 0.3s, background-color 0.3s;
}

.gv-events__dot:hover,
.gv-events__dot:focus-visible {
	background: var( --wp--preset--color--gold );
}

.gv-events__dot.is-active {
	width: 1.5rem;
	background: var( --wp--preset--color--charcoal );
}

/* --- What We Offer ----------------------------------------------------- */

.gv-events__cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.gv-events__card {
	border: 1px solid var( --wp--preset--color--hairline );
	border-radius: 0.5rem;
	padding: 1.75rem;
	background: var( --wp--preset--color--ivory );
}

.gv-events__card-num,
.gv-events__step-num {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--eyebrow );
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var( --wp--preset--color--gold );
}

.gv-events__card-title {
	font-family: var( --wp--preset--font-family--display );
	font-size: 1.25rem;
	color: var( --wp--preset--color--charcoal );
	margin: 0.75rem 0 0;
}

.gv-events__card-body,
.gv-events__step-body {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--small, 0.875rem );
	line-height: 1.7;
	color: var( --wp--preset--color--muted );
	margin: 0.5rem 0 0;
}

/* --- How It Works ------------------------------------------------------ */

.gv-events__process {
	margin-top: clamp( 2.5rem, 6vw, 4rem );
}

.gv-events__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

.gv-events__step {
	text-align: center;
}

.gv-events__step-num {
	font-family: var( --wp--preset--font-family--display );
	font-size: 2.25rem;
	letter-spacing: normal;
	text-transform: none;
	opacity: 0.55;
	display: block;
}

.gv-events__step-title {
	font-family: var( --wp--preset--font-family--display );
	font-size: 1.25rem;
	color: var( --wp--preset--color--charcoal );
	margin: 0.5rem 0 0;
}

/* --- Form -------------------------------------------------------------- */

.gv-events__panel {
	max-width: 40rem;
	margin-inline: auto;
	border: 1px solid var( --wp--preset--color--hairline );
	border-radius: 0.5rem;
	padding: clamp( 1.5rem, 5vw, 2.5rem );
	background: var( --wp--preset--color--ivory );
}

.gv-events__fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

.gv-events__field {
	margin: 0;
}

.gv-events__field label {
	display: block;
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--eyebrow );
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var( --wp--preset--color--muted );
	margin-bottom: 0.375rem;
}

.gv-events__req {
	color: var( --wp--preset--color--gold );
}

.gv-events__field input,
.gv-events__field select,
.gv-events__field textarea {
	width: 100%;
	font-family: var( --wp--preset--font-family--body );
	font-size: 0.9375rem;
	color: var( --wp--preset--color--charcoal );
	background: transparent;
	border: 0;
	border-bottom: 1px solid var( --wp--preset--color--hairline );
	border-radius: 0;
	padding: 0.625rem 0;
	transition: border-color 0.3s;
}

.gv-events__field textarea {
	resize: vertical;
}

/* 🔴 iOS ZOOMS THE PAGE IN when a form control under 16px takes focus, and
   does not zoom back out. On a 13-field enquiry form that means the customer
   is left on a horizontally-scrolled page from the first tap, with no
   obvious way back — it reads as the site breaking.

   16px is a threshold, not a preference: 15.9px triggers it. The 0.9375rem
   above is 15px, so every field on this form did.

   The theme carries the same rule for the rest of the site
   (`style.css`, mobile block). It cannot reach these fields — this file's
   `.gv-events__field input` is 0,2,1 against the theme's bare element
   selector — so the fix has to be repeated here rather than inherited. If
   you change the size above, change this too.

   Mobile only; the desktop type scale is deliberately untouched. */
@media ( max-width: 767px ) {
	.gv-events__field input,
	.gv-events__field select,
	.gv-events__field textarea {
		font-size: 1rem;
	}
}

.gv-events__field input:focus,
.gv-events__field select:focus,
.gv-events__field textarea:focus {
	outline: none;
	border-bottom-color: var( --wp--preset--color--gold );
}

.gv-events__field.is-invalid input,
.gv-events__field.is-invalid select,
.gv-events__field.is-invalid textarea {
	border-bottom-color: #b3261e;
}

.gv-events__help {
	display: block;
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--micro );
	color: var( --wp--preset--color--muted );
	margin-top: 0.375rem;
}

/* Not a token: the palette carries no error colour, and inventing an `error`
   preset in theme.json for one page would put a colour in the Site Editor the
   client could change to something unreadable on ivory. */
.gv-events__error {
	display: block;
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--micro );
	color: #b3261e;
	margin-top: 0.375rem;
}

.gv-events__error--form {
	font-size: 0.9375rem;
	margin: 0 0 1.5rem;
}

/* Honeypot. Kept in the layout and moved off-screen rather than
   `display:none` — some bots skip anything obviously hidden, and a screen
   reader is steered past it by aria-hidden plus tabindex="-1" on the input. */
.gv-events__hp {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset( 50% );
	white-space: nowrap;
}

.gv-events__consent {
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--micro );
	color: var( --wp--preset--color--muted );
	line-height: 1.6;
	margin: 1.5rem 0 0;
}

.gv-events__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 1.5rem;
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--eyebrow );
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var( --wp--preset--color--ivory );
	background: var( --wp--preset--color--charcoal );
	border: 1px solid var( --wp--preset--color--charcoal );
	border-radius: 999px;
	padding: 1rem 2rem;
	cursor: pointer;
	transition: background-color 0.3s, color 0.3s;
}

.gv-events__submit:hover,
.gv-events__submit:focus-visible {
	background: var( --wp--preset--color--gold );
	color: var( --wp--preset--color--charcoal );
}

/* --- Confirmation ------------------------------------------------------ */

.gv-events__panel--sent {
	text-align: center;
	border-color: var( --wp--preset--color--gold );
}

.gv-events__sent-title {
	font-family: var( --wp--preset--font-family--display );
	font-size: 1.5rem;
	color: var( --wp--preset--color--charcoal );
	margin: 0;
}

.gv-events__sent-body,
.gv-events__sent-note {
	font-family: var( --wp--preset--font-family--body );
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var( --wp--preset--color--muted );
	margin: 0.75rem auto 0;
	max-width: 28rem;
}

.gv-events__sent-note {
	font-size: var( --wp--preset--font-size--micro );
}

.gv-events__again {
	display: inline-block;
	margin-top: 1.75rem;
	font-family: var( --wp--preset--font-family--body );
	font-size: var( --wp--preset--font-size--eyebrow );
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var( --wp--preset--color--muted );
	text-decoration: none;
}

.gv-events__again:hover,
.gv-events__again:focus-visible {
	color: var( --wp--preset--color--gold );
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* --- Wider viewports --------------------------------------------------- */

@media ( min-width: 48rem ) {
	.gv-events__cards {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}

	.gv-events__steps {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}

	.gv-events__fields {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	/* A description, a venue and the remarks box all read badly at half
	   width — they take a full row. */
	.gv-events__field--wide {
		grid-column: 1 / -1;
	}
}

@media ( min-width: 64rem ) {
	.gv-events__grid {
		grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
		gap: 1.5rem;
	}
}
