/* ==========================================================================
   THE NEXUS — Contact page
   Component styles for the Contact page's nx- widgets (Let's Talk channels +
   form, Visit Us, Partners, Follow the Journey). Loaded only on the Contact
   page (see nexus_home_assets() in nexus-homepage.php) — everything here
   reads from tokens.css custom properties, same discipline as
   nexus-homepage.css. Shared primitives (.nx-container, .nx-eyebrow, .nx-h2,
   .nx-btn, .nx-section-head) live there and are reused as-is, not redefined.
   ========================================================================== */

/* ---------- LET'S TALK: channels + form ---------- */
.nx-talk { position: relative; z-index: 2; background: var(--color-bg); padding-block: var(--space-13); }
.nx-talk__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-11); align-items: start; }
@media (min-width: 1024px) {
	/* minmax(0, 1fr), not bare 1fr — bare 1fr still respects each track's
	   content min-width, and the channel list's mono email addresses were
	   winning that fight and squeezing the form column down to ~300px
	   right at this breakpoint (email text forcing a wider left column
	   than an even 50/50 split). minmax(0, 1fr) forces the even split and
	   lets content wrap/shrink inside its column instead. */
	.nx-talk__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-9); }
}

.nx-talk__lede { font-size: var(--text-body-l); line-height: 1.6; color: var(--color-text-secondary); max-width: 48ch; margin: var(--space-5) 0 0; }

/* Two columns once the page itself splits into columns (≥1024px) — six
   cards stacked single-file runs roughly twice the height of the form
   card next to it, leaving a dead gap under a short sticky form. A 2-col
   grid here keeps the left column close to the form's height instead. */
.nx-channels { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-9); }
@media (min-width: 1024px) {
	.nx-channels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); }
}
.nx-channel {
	display: flex;
	gap: var(--space-4);
	padding: var(--space-6);
	background: var(--color-surface-2);
	border: var(--stroke-hairline) solid var(--color-border-subtle);
	border-radius: var(--radius-md);
	transition: border-color var(--duration-base) var(--ease-out-expo), transform var(--duration-base) var(--ease-out-expo);
}
.nx-channel:hover { border-color: var(--color-border-strong); transform: translateY(-2px); }
.nx-channel__icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-full);
	background: var(--color-surface-3);
	color: var(--color-gold-500);
}
.nx-channel__body { min-width: 0; }
.nx-channel__title { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-h5); color: var(--color-text-primary); margin: 0 0 var(--space-2); }
.nx-channel__desc { font-size: var(--text-body-s); line-height: 1.5; color: var(--color-text-secondary); margin: 0 0 var(--space-3); max-width: 40ch; }
.nx-channel__email { font-family: var(--font-mono); font-size: var(--text-body-s); color: var(--color-gold-500); text-decoration: none; overflow-wrap: anywhere; }
.nx-channel__email:hover { color: var(--color-gold-300); text-decoration: underline; text-underline-offset: 4px; }

.nx-talk__form-wrap {
	position: relative;
	padding: var(--space-6);
	background: var(--color-surface-2);
	border: var(--stroke-hairline) solid var(--color-border-subtle);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-2);
}
@media (min-width: 768px) { .nx-talk__form-wrap { padding: var(--space-8); } }
/* Pins the (shorter) form card in view while the channel-card column
   scrolls past it, rather than leaving it stranded above a dead gap. Real
   native document scroll (no smooth-scroll library), so plain
   position:sticky works as expected. */
@media (min-width: 1024px) {
	.nx-talk__form-wrap { position: sticky; top: var(--space-9); }
}

/* ---------- form primitives (§04.4) ---------- */
.nx-form { display: flex; flex-direction: column; gap: var(--space-5); }
.nx-form__row { display: grid; grid-template-columns: 1fr; gap: var(--space-5); }
@media (min-width: 560px) {
	.nx-form__row--2 { grid-template-columns: 1fr 1fr; }
}
.nx-form__field { display: flex; flex-direction: column; gap: var(--space-2); }
.nx-form__field label { font-family: var(--font-heading); font-weight: 500; font-size: var(--text-body-s); color: var(--color-text-secondary); }
.nx-form__optional { color: var(--color-text-muted); font-weight: 400; }

.nx-form__field input,
.nx-form__field textarea,
.nx-form__select-shell select {
	width: 100%;
	height: 48px;
	padding: var(--space-3) var(--space-4);
	background: var(--color-surface-1);
	border: var(--stroke-default) solid var(--color-border-default);
	border-radius: var(--radius-sm);
	color: var(--color-text-primary);
	font-family: var(--font-body);
	font-size: var(--text-body);
	transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.nx-form__field textarea { height: auto; min-height: 120px; resize: vertical; padding-top: var(--space-3); line-height: 1.5; }
.nx-form__field input:focus-visible,
.nx-form__field textarea:focus-visible,
.nx-form__select-shell select:focus-visible {
	outline: none;
	border-color: var(--color-gold-500);
	box-shadow: var(--glow-focus);
}
.nx-form__field input::placeholder,
.nx-form__field textarea::placeholder { color: var(--color-text-placeholder); }
.nx-form__field.is-invalid input,
.nx-form__field.is-invalid textarea { border-color: var(--color-danger); }

.nx-form__select-shell { position: relative; }
.nx-form__select-shell::after {
	content: "";
	position: absolute;
	right: var(--space-4);
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: var(--stroke-default) solid var(--color-text-muted);
	border-bottom: var(--stroke-default) solid var(--color-text-muted);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}
.nx-form__select-shell select { appearance: none; -webkit-appearance: none; padding-right: var(--space-9); cursor: pointer; }

/* Honeypot — visually hidden but present in the tab/DOM order in a way
   screen readers won't announce as a real field (aria-hidden + no visible
   label association exposed), not display:none (which some bots skip). */
.nx-form__hp {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}

/* Native <input type="file"> resists the same box styling as text inputs —
   confirmed live: Chrome enforces its own minimum intrinsic size on the
   "Choose File" button + filename text regardless of an explicit width/
   height, so a shrink-to-1px hiding technique still left that native text
   visibly rendered. opacity:0 hides it regardless of its enforced size, and
   position:absolute + inset:0 stretches it to exactly cover the visible
   trigger below, so the native, always-reliable click/keyboard/file-picker
   behavior stays attached to the same area the trigger visually occupies —
   not display:none, which drops it from the tab order in some browsers. */
.nx-file-input { position: relative; }
.nx-file-input input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}
.nx-file-input__trigger {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: 100%;
	height: 48px;
	padding: 0 var(--space-4);
	background: var(--color-surface-1);
	border: var(--stroke-default) solid var(--color-border-default);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
.nx-file-input input[type="file"]:focus-visible + .nx-file-input__trigger {
	border-color: var(--color-gold-500);
	box-shadow: var(--glow-focus);
}
.nx-file-input__icon { display: inline-flex; flex-shrink: 0; color: var(--color-text-muted); }
.nx-file-input__text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--font-body);
	font-size: var(--text-body);
	color: var(--color-text-placeholder);
}
.nx-file-input__text.has-file { color: var(--color-text-primary); }
.nx-form__field--file.is-invalid .nx-file-input__trigger { border-color: var(--color-danger); }

.nx-form__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-2); }
.nx-form__error { color: var(--color-danger); font-size: var(--text-body-s); margin: 0; }
.nx-form #nx-form-submit { min-width: 200px; }
/* Below ~560px a fixed 200px button sits left-aligned with dead space
   beside it inside the full-width form column — full-width reads as the
   form's one primary action, matching the rest of the field stack. */
@media (max-width: 559px) {
	.nx-form #nx-form-submit { width: 100%; }
}
.nx-form #nx-form-submit.is-loading { position: relative; pointer-events: none; }
.nx-form #nx-form-submit.is-loading .nx-btn__label { visibility: hidden; }
.nx-form #nx-form-submit.is-loading::after {
	content: "";
	position: absolute;
	width: 18px; height: 18px;
	border-radius: 50%;
	border: 2px solid rgba(5,5,6,0.35);
	border-top-color: var(--color-void);
	animation: nx-contact-spin 0.7s linear infinite;
}
@keyframes nx-contact-spin { to { transform: rotate(360deg); } }

.nx-form__success[hidden] { display: none; }
.nx-form__success { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) 0; }
.nx-form__success svg { color: var(--color-success); }
.nx-form__success-title { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-h4); color: var(--color-text-primary); margin: 0; }
.nx-form__success-body { color: var(--color-text-secondary); line-height: 1.5; margin: 0; max-width: 42ch; }

/* ---------- VISIT US ---------- */
.nx-visit { position: relative; z-index: 2; background: var(--color-surface-1); padding-block: var(--space-13); }
.nx-visit__lede { font-size: var(--text-body-l); line-height: 1.6; color: var(--color-text-secondary); max-width: 56ch; margin: var(--space-5) 0 0; }
.nx-visit__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); margin-bottom: var(--space-9); }
@media (min-width: 768px) { .nx-visit__grid { grid-template-columns: repeat(2, 1fr); } }
.nx-visit__card {
	padding: var(--space-7);
	background: var(--color-surface-2);
	border: var(--stroke-hairline) solid var(--color-border-subtle);
	border-radius: var(--radius-lg);
	transition: transform var(--duration-base) var(--ease-out-expo), box-shadow var(--duration-base);
}
.nx-visit__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.nx-visit__status {
	display: inline-flex; align-items: center; gap: var(--space-2);
	font-family: var(--font-mono); font-size: var(--text-caption);
	text-transform: uppercase; letter-spacing: 0.06em;
	color: var(--color-text-muted); margin-bottom: var(--space-4);
}
.nx-visit__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-muted); }
.nx-visit__dot--active { background: var(--color-success); animation: nx-visit-pulse 3.2s var(--ease-in-out-soft) infinite; }
@keyframes nx-visit-pulse {
	0% { box-shadow: 0 0 0 0 rgba(76,195,138,0.45); }
	70% { box-shadow: 0 0 0 8px rgba(76,195,138,0); }
	100% { box-shadow: 0 0 0 0 rgba(76,195,138,0); }
}
.nx-visit__city { font-family: var(--font-display); font-weight: 700; font-size: var(--text-h1); text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; color: var(--color-text-primary); margin: 0 0 var(--space-3); }
.nx-visit__desc { color: var(--color-text-secondary); line-height: 1.5; margin: 0; max-width: 40ch; }
.nx-visit__note { font-family: var(--font-serif); font-style: italic; font-size: var(--text-h5); color: var(--color-text-secondary); margin: 0; }

/* ---------- LET'S BUILD SOMETHING TOGETHER ---------- */
.nx-partners { position: relative; z-index: 2; background: var(--color-bg); padding-block: var(--space-13); }
.nx-partners .nx-marquee { margin-bottom: var(--space-11); }
.nx-partners .nx-marquee__item { font-family: var(--font-display); font-size: var(--text-h2); text-transform: uppercase; letter-spacing: -0.01em; color: var(--color-text-muted); }
.nx-partners__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-9); align-items: start; }
@media (min-width: 1024px) { .nx-partners__grid { grid-template-columns: minmax(0, 420px) 1fr; gap: var(--space-11); } }
.nx-partners__lede { font-size: var(--text-body-l); line-height: 1.6; color: var(--color-text-secondary); max-width: 44ch; margin: var(--space-5) 0 var(--space-7); }
.nx-partners__chips-label {
	display: block;
	font-family: var(--font-mono);
	font-size: var(--text-caption);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text-muted);
	margin-bottom: var(--space-5);
}
.nx-partners__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); align-content: flex-start; }
.nx-chip {
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-xs);
	border: var(--stroke-hairline) solid var(--color-border-default);
	color: var(--color-text-secondary);
	font-size: var(--text-body-s);
	font-family: var(--font-heading);
	transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), transform var(--duration-instant) var(--ease-standard);
}
.nx-chip:hover {
	border-color: var(--color-gold-500);
	color: var(--color-gold-300);
	background: var(--color-glass);
	transform: translateY(-2px);
}

/* ---------- FOLLOW THE JOURNEY ---------- */
.nx-social { position: relative; z-index: 2; background: var(--color-surface-1); padding-block: var(--space-13); }
.nx-social__lede { font-size: var(--text-body-l); line-height: 1.6; color: var(--color-text-secondary); max-width: 52ch; margin: var(--space-5) 0 0; }

/* A dense, sharp-cornered mosaic of touching cells — deliberately not a
   card grid with gaps/shadows/radius (§04.3's card system). Individual
   1px borders on adjacent cells double up at the shared edge instead of
   using a gap; that seam is intentional, it's what makes this read as one
   continuous grid/instrument panel rather than a set of separate tiles.
   A trailing "more soon" filler cell keeps 5 real platforms filling a
   clean 3-column grid (2 full rows) instead of stranding a lone card. */
.nx-social__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	margin-top: var(--space-9);
	border-top: var(--stroke-hairline) solid var(--color-border-subtle);
	border-left: var(--stroke-hairline) solid var(--color-border-subtle);
}
@media (min-width: 640px) {
	.nx-social__grid { grid-template-columns: repeat(3, 1fr); }
}
.nx-social__card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: var(--space-3);
	min-height: 200px;
	padding: var(--space-6);
	border-right: var(--stroke-hairline) solid var(--color-border-subtle);
	border-bottom: var(--stroke-hairline) solid var(--color-border-subtle);
	text-decoration: none;
	background: var(--color-surface-1);
	transition: background-color var(--duration-base) var(--ease-standard);
}
.nx-social__card:hover {
	background: var(--color-surface-2);
	z-index: 1;
	box-shadow: inset 0 0 0 1.5px var(--color-gold-500);
}
.nx-social__icon { color: var(--color-gold-500); transition: transform var(--duration-base) var(--ease-out-expo); }
.nx-social__icon svg { width: 32px; height: 32px; display: block; }
.nx-social__card:hover .nx-social__icon { transform: scale(1.1); }
.nx-social__platform { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-h5); color: var(--color-text-primary); }
.nx-social__handle { font-family: var(--font-mono); font-size: var(--text-body-s); color: var(--color-text-muted); }
.nx-social__card--soon { justify-content: center; align-items: center; }
.nx-social__soon {
	font-family: var(--font-serif); font-style: italic;
	font-size: var(--text-body); color: var(--color-text-disabled);
	line-height: 1.4; text-align: center;
}
