/* Ported from reference/contact.html. Shared reset/tokens live in base.css /
   tokens.css; page-bg/site-header/nav/btn are intentionally duplicated from
   events.css (the mock-ups have them byte-identical) rather than forced into
   a shared file. Values unchanged — only url() paths were rewritten from
   /wp-content/uploads/grunge/ to this theme's own assets/. */

[hidden] { display: none !important; }

/* ============ PAGE BACKGROUND ============ */
.page-bg {
	position: fixed; inset: 0; z-index: -1;
	background:
		url("../img/events/hb-cracks.webp") center / 720px auto repeat,
		url("../img/events/hb-events-bg.webp") center / cover no-repeat,
		var(--black);
	filter: contrast(var(--bg-contrast)) brightness(var(--bg-brightness));
}
.page-bg::after {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(5,4,5,.6) 75%, rgba(5,4,5,.92) 100%);
}

/* ============ HEADER + NAV (same as home) ============ */
.site-header {
	display: flex; justify-content: center;
	padding: clamp(14px, 2.4vw, 28px) 16px clamp(40px, 5vw, 64px);
	background: linear-gradient(to bottom, rgba(5,4,5,.92) 0%, rgba(5,4,5,.55) 45%, rgba(5,4,5,0) 100%);
}
.site-header img {
	width: clamp(150px, 16vw, 240px); height: auto;
	filter: drop-shadow(0 2px 12px rgba(0,0,0,.6));
}

.nav, .nav--legal {
	position: fixed; z-index: 20;
	bottom: clamp(16px, 3vh, 30px);
	display: flex; gap: clamp(18px, 2.4vw, 36px);
	list-style: none;
}
.nav { left: clamp(16px, 2.2vw, 32px); }
.nav--legal { left: auto; right: clamp(16px, 2.2vw, 32px); }
.nav a, .nav--legal a {
	position: relative;
	font-size: clamp(14px, 1.3vw, 19px); font-weight: 500;
	text-transform: uppercase; letter-spacing: .04em;
	text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
.nav a::after, .nav--legal a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
	background: var(--ep);
	transform: scaleX(0); transform-origin: left;
	transition: transform .35s var(--ease-out);
}
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after,
.nav--legal a:hover::after, .nav--legal a:focus-visible::after, .nav--legal a[aria-current="page"]::after { transform: scaleX(1); }

/* olive button with the deckle-edged block from home */
.btn {
	position: relative; display: inline-block;
	padding: 16px 28px;
	font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
	color: #f1efe8;
	transition: filter .4s, transform .3s var(--ease-out);
}
.btn::before {
	content: ""; position: absolute; inset: 0; z-index: 0;
	background: var(--band);
	-webkit-mask: url("../grunge/button/hb-btn-mask-clean.webp") center / 100% 100% no-repeat;
	        mask: url("../grunge/button/hb-btn-mask-clean.webp") center / 100% 100% no-repeat;
	transition: background .3s;
}
.btn span { position: relative; z-index: 1; }
a.btn:hover, a.btn:focus-visible {
	filter: drop-shadow(0 0 14px rgba(62,71,57,.75));
	transform: translateY(-2px); outline: none;
}
a.btn:hover::before, a.btn:focus-visible::before { background: var(--band-hover); }
.btn--disabled { color: #b9b8b1; cursor: not-allowed; }
.btn--disabled::before { background: var(--muted); }

/* ============ CONTACT ============ */
.contact {
	width: min(760px, 100% - 32px);
	margin: 0 auto;
	padding-bottom: 120px;
}
.contact__card {
	position: relative; isolation: isolate;
	padding: clamp(28px, 4vw, 44px) clamp(20px, 4vw, 40px) clamp(32px, 4vw, 44px);
	color: var(--ink);
}
/* translucent paper, like the current panel, with the soft deckle edge */
.contact__card::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(rgba(206,205,197,.84), rgba(206,205,197,.84)),
		url("../img/events/hb-cracks.webp") center / 600px auto repeat;
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
	filter: url(#deckle-card);
}
.contact__title {
	text-align: center;
	font-size: clamp(26px, 3vw, 34px); font-weight: 500; -webkit-text-stroke: .7px currentColor;
	text-transform: uppercase; letter-spacing: .02em; line-height: 1.1;
}
.contact__intro {
	text-align: center; margin: 10px auto 26px; max-width: 46ch;
	font-size: 14px; line-height: 1.6; color: #3d393a;
}

.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend {
	font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
}
.field .req { color: var(--band); }
.field input, .field select, .field textarea {
	width: 100%; font: inherit; font-size: 15px; color: var(--ink);
	padding: 11px 13px;
	background: rgba(244,242,236,.92);
	border: 1px solid rgba(40,37,38,.18); border-radius: 0;
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #8e8b83; text-transform: uppercase; letter-spacing: .03em; }
.field input:focus, .field select:focus, .field textarea:focus {
	outline: none; background: #f6f4ef;
	border-color: var(--band); box-shadow: 0 0 0 3px rgba(62,71,57,.28);
}
/* custom dropdown arrow */
.field select {
	appearance: none; -webkit-appearance: none; cursor: pointer;
	text-transform: uppercase; letter-spacing: .03em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23282526' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
	padding-right: 40px;
}
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: #8a2b22; }
.field__error { font-size: 12px; color: #8a2b22; text-transform: uppercase; letter-spacing: .03em; min-height: 0; }

/* consent checkbox */
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; line-height: 1.5; }
.check input {
	appearance: none; -webkit-appearance: none; flex: none;
	width: 18px; height: 18px; margin-top: 1px;
	background: rgba(244,242,236,.92); border: 1px solid rgba(40,37,38,.35);
	display: grid; place-items: center; cursor: pointer;
}
.check input::after { content: ""; width: 10px; height: 10px; background: var(--band); transform: scale(0); transition: transform .15s; }
.check input:checked::after { transform: scale(1); }
.check input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(62,71,57,.28); }

/* spam trap: hidden from people, visible to bots */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
button.btn { border: 0; background: none; cursor: pointer; font-family: inherit; }
button.btn:hover, button.btn:focus-visible {
	filter: drop-shadow(0 0 14px rgba(62,71,57,.75));
	transform: translateY(-2px); outline: none;
}
button.btn:hover::before, button.btn:focus-visible::before { background: var(--band-hover); }
button.btn[disabled] { cursor: progress; opacity: .7; transform: none; filter: none; }
.form__note { font-size: 12px; color: #5a5657; letter-spacing: .02em; }
.form__note a { color: var(--ink); text-decoration: underline; }

/* sent / failed message */
.form__status { display: none; padding: 14px 16px; font-size: 14px; line-height: 1.55; border-left: 3px solid var(--band); background: rgba(244,242,236,.7); }
.form__status.is-shown { display: block; }
.form__status--error { border-left-color: #8a2b22; }

/* ============ LOAD-IN: grunge texture-in, staggered (same as Events) ============ */
.js .reveal { opacity: 0; }
.js .reveal.is-in { opacity: 1; }

@media (max-width: 640px) {
	.form__row { grid-template-columns: 1fr; }
	.form__actions .btn { width: 100%; text-align: center; }
	nav[aria-label="Main"]::before {
		content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 19;
		/* iOS Safari reserves a strip at the very bottom for its own UI; without
		   accounting for it, that strip shows the page background (not solid
		   black) peeking out under the fade. Extending the box by the safe-area
		   inset and holding the gradient fully solid across it keeps that strip
		   covered. */
		height: calc(72px + env(safe-area-inset-bottom, 0px));
		background: linear-gradient(to top,
			rgba(5,4,5,.95) 0,
			rgba(5,4,5,.95) env(safe-area-inset-bottom, 0px),
			rgba(5,4,5,0) 100%);
		pointer-events: none;
	}
}

/* narrow phones: keep the Main and Legal navs from crowding the corners */
@media (max-width: 360px) {
	.nav, .nav--legal { gap: 14px; }
	.nav a, .nav--legal a { font-size: 13px; }
}
