/* site/src/assets/css/page-careers.css
 * Careers: not hiring, still listening.
 *
 * The page's one idea is a receiver. Nothing is being broadcast — there is no
 * vacancy — but the set is on, and tuning across the band brings up one thing
 * the studio would want in a person, until the last station, which is dead
 * air and says so.
 *
 * It is built from six radio buttons and :has(). A radio group is already a
 * dial: the arrow keys tune it, the tab key reaches it, and there is no
 * script to fail on a slow connection. Nothing here loops on its own, so
 * there is no animation to pause when the tab goes away — every movement is
 * a transition somebody asked for.
 *
 * Where :has() is missing the dial hides itself and the six stations fall
 * back to an ordinary readable list. That is why the tuning lives inside the
 * @supports block and the plain state lives outside it.
 */

/* ── the set ─────────────────────────────────────────────────────────── */
.recv {
	position: relative;
	background: var(--ink);
	color: var(--paper);
	/* Clears the fixed nav, which is not in the flow. */
	padding: clamp(104px, 16vh, 172px) var(--gutter) clamp(56px, 9vh, 104px);
	overflow: hidden;
}

.recv__glow {
	position: absolute;
	inset: -10% -20% auto -20%;
	height: 70vh;
	pointer-events: none;
	background:
		radial-gradient(36vw 32vw at 18% 18%, rgba(0, 217, 184, .22), transparent 70%),
		radial-gradient(34vw 30vw at 82% 8%, rgba(47, 107, 255, .18), transparent 70%);
	filter: blur(26px);
}

.recv__inner {
	position: relative;
	max-width: var(--wide);
	margin: 0 auto;
	display: grid;
	gap: clamp(16px, 2.6vh, 28px);
}

.recv__kicker { color: var(--teal); }

.recv__h1 {
	font: 800 clamp(42px, 9.5vw, 132px)/.88 var(--display);
	font-stretch: 94%;
	letter-spacing: -.045em;
}
.recv__h1 em {
	font-style: normal;
	color: var(--teal);
	/* A faint ghost of itself, offset like a signal arriving twice. Static,
	   so it costs nothing and never needs pausing. */
	text-shadow: .06em .06em 0 rgba(0, 217, 184, .22);
}

.recv__stand {
	max-width: 58ch;
	font-size: clamp(16px, 1.3vw, 20px);
	color: rgba(251, 249, 244, .74);
}

/* ── the dial ────────────────────────────────────────────────────────── */
.set {
	--sig: var(--teal);
	margin-top: clamp(14px, 3vh, 30px);
}

/* Hidden unless :has() is available to make it do something. A dial that
   turns and changes nothing is worse than no dial. */
.set__dial,
.set__scan,
.set__meter { display: none; }

.set__dial {
	border: 0;
	padding: 0;
	margin: 0;
}
.set__legend {
	color: rgba(251, 249, 244, .48);
	padding: 0;
	margin-bottom: 10px;
}

.set__band {
	position: relative;
	display: flex;
	gap: 2px;
	padding: 28px 0 4px;
}

.set__wire {
	position: absolute;
	left: 0;
	right: 0;
	top: 15px;
	height: 2px;
	background: repeating-linear-gradient(90deg, rgba(251, 249, 244, .3) 0 2px, transparent 2px 7px);
}

.set__needle {
	position: absolute;
	top: 5px;
	left: var(--at, 8.333%);
	width: 3px;
	height: 23px;
	border-radius: 2px;
	transform: translateX(-50%);
	background: var(--sig);
	box-shadow: 0 0 16px var(--sig);
	transition: left .4s cubic-bezier(.2, .9, .25, 1), background .3s, box-shadow .3s;
}

.set__tick {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
}

/* Clipped rather than display:none so the radio keeps its place in the tab
   order and the arrow keys still tune the dial. */
.set__radio {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	clip-path: inset(50%);
}

.set__tick label {
	display: grid;
	place-items: center;
	gap: 5px;
	text-align: center;
	/* Comfortably past the 44px a thumb needs, even on the narrowest column. */
	min-height: 54px;
	padding: 9px 2px;
	border-radius: 10px;
	cursor: pointer;
	color: rgba(251, 249, 244, .5);
	transition: color .2s, background .2s;
}
.set__tick label:hover { color: rgba(251, 249, 244, .9); background: rgba(251, 249, 244, .05); }
.set__tick label b { font: 700 13px/1 var(--mono); letter-spacing: .04em; }
.set__tick label span { font: 500 10px/1.25 var(--mono); letter-spacing: .09em; text-transform: uppercase; }

.set__radio:checked + label { color: var(--sig); background: rgba(251, 249, 244, .07); }
.set__radio:focus-visible + label { outline: 3px solid var(--paper); outline-offset: 2px; }

/* ── the screen ──────────────────────────────────────────────────────── */
.set__screen {
	position: relative;
	margin-top: clamp(14px, 2.4vh, 24px);
	border: 1px solid rgba(251, 249, 244, .16);
	border-radius: 20px;
	background: #07070c;
	padding: clamp(24px, 3.6vw, 48px);
	overflow: hidden;
}

/* The tuned station's colour floods the whole screen, so moving the dial
   changes the temperature of the page rather than swapping a swatch. */
.set__screen::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(75% 90% at 14% 4%, var(--sig), transparent 68%);
	opacity: .2;
	transition: background .4s, opacity .4s;
}

.set__scan {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(0deg, rgba(251, 249, 244, .05) 0 1px, transparent 1px 4px);
	-webkit-mask-image: radial-gradient(130% 110% at 50% 50%, transparent 24%, #000 100%);
	mask-image: radial-gradient(130% 110% at 50% 50%, transparent 24%, #000 100%);
}

.set__meter {
	position: absolute;
	top: clamp(18px, 2.4vw, 28px);
	right: clamp(18px, 2.4vw, 28px);
	display: flex;
	align-items: flex-end;
	gap: 4px;
	height: 24px;
	z-index: 2;
}
.set__meter i {
	width: 5px;
	border-radius: 2px;
	background: var(--sig);
	opacity: .85;
	transition: height .35s, opacity .35s, background .3s;
}
.set__meter i:nth-child(1) { height: 24%; }
.set__meter i:nth-child(2) { height: 44%; }
.set__meter i:nth-child(3) { height: 62%; }
.set__meter i:nth-child(4) { height: 82%; }
.set__meter i:nth-child(5) { height: 100%; }

.station {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 10px;
	align-content: start;
	max-width: 44ch;
}
.station__no {
	font: 700 clamp(30px, 4vw, 54px)/1 var(--mono);
	letter-spacing: -.02em;
	color: var(--sig);
	transition: color .3s;
}
.station__h {
	font: 800 clamp(32px, 5.6vw, 76px)/.95 var(--display);
	letter-spacing: -.04em;
}
.station p { color: rgba(251, 249, 244, .76); font-size: clamp(16px, 1.2vw, 19px); }
.station__kick {
	margin-top: 4px;
	color: var(--sig) !important;
	font: 500 clamp(13px, 1vw, 15px)/1.5 var(--mono);
	letter-spacing: .01em;
}

/* Fallback layout: with no :has() the six stations are just a list, spaced. */
.set__screen > .station + .station {
	margin-top: clamp(26px, 4vh, 46px);
	padding-top: clamp(26px, 4vh, 46px);
	border-top: 1px solid rgba(251, 249, 244, .12);
}

/* ── tuning, where the browser can do it ─────────────────────────────── */
@supports selector(:has(*)) {
	.set__dial, .set__scan, .set__meter { display: block; }
	.set__band { display: flex; }
	.set__meter { display: flex; }

	/* All six stations share one grid cell, so the screen is always as tall as
	   the longest of them and nothing shifts when the dial moves. */
	.set__screen { display: grid; min-height: clamp(320px, 48vh, 420px); }
	.set__screen > .station { grid-area: 1 / 1; margin-top: 0; padding-top: 0; border-top: 0; }

	.station {
		opacity: 0;
		visibility: hidden;
		filter: blur(14px);
		transform: translateY(12px);
		/* Visibility flips only after the fade, so an untuned station's links
		   never sit invisible in the tab order. */
		transition: opacity .3s, filter .45s, transform .45s, visibility 0s .3s;
	}

	.set:has(#ch-1:checked) .station--1,
	.set:has(#ch-2:checked) .station--2,
	.set:has(#ch-3:checked) .station--3,
	.set:has(#ch-4:checked) .station--4,
	.set:has(#ch-5:checked) .station--5,
	.set:has(#ch-6:checked) .station--6 {
		opacity: 1;
		visibility: visible;
		filter: none;
		transform: none;
		transition: opacity .38s .05s, filter .5s .05s, transform .5s .05s, visibility 0s;
	}

	/* One rule per station: its ink, and where the needle rests. */
	.set:has(#ch-1:checked) { --sig: var(--teal);   --at: 8.333%; }
	.set:has(#ch-2:checked) { --sig: var(--amber);  --at: 25%; }
	.set:has(#ch-3:checked) { --sig: var(--pink);   --at: 41.667%; }
	.set:has(#ch-4:checked) { --sig: var(--blue);   --at: 58.333%; }
	.set:has(#ch-5:checked) { --sig: var(--yellow); --at: 75%; }
	/* Dead air gets no colour, because there is no signal to colour. */
	.set:has(#ch-6:checked) { --sig: #8d8d9c;       --at: 91.667%; }

	/* And the meter tells the truth about it. */
	.set:has(#ch-6:checked) .set__meter i { height: 22%; opacity: .16; }
	.set:has(#ch-6:checked) .set__screen::before { opacity: .09; }
}

/* ── straight answers ────────────────────────────────────────────────── */
.isnot {
	background: var(--paper);
	color: var(--ink);
	padding: clamp(56px, 9vh, 112px) var(--gutter);
}
.isnot__inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 12px; }
.isnot__inner .label { color: var(--pink); }
.isnot__inner h2 {
	font: 800 clamp(32px, 5vw, 76px)/.95 var(--display);
	letter-spacing: -.04em;
}

.isnot__list {
	list-style: none;
	margin-top: clamp(14px, 2.4vh, 26px);
	display: grid;
	gap: 0;
	border-top: 2px solid var(--ink);
	max-width: 74ch;
}
.isnot__list li {
	padding: 18px 0;
	border-bottom: 1px solid var(--line);
	color: var(--ink-soft);
	font-size: clamp(16px, 1.15vw, 18px);
}
.isnot__list b {
	display: block;
	font: 700 clamp(18px, 1.7vw, 24px)/1.2 var(--display);
	letter-spacing: -.025em;
	color: var(--ink);
	margin-bottom: 5px;
}

/* ── say hello ───────────────────────────────────────────────────────── */
.hello {
	background: var(--ink);
	color: var(--paper);
	padding: clamp(60px, 10vh, 130px) var(--gutter);
}
.hello__inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 14px; }
.hello__inner .label { color: var(--amber); }
.hello__inner h2 {
	font: 800 clamp(34px, 6vw, 92px)/.92 var(--display);
	letter-spacing: -.045em;
}
.hello__lede {
	max-width: 54ch;
	font-size: clamp(16px, 1.25vw, 20px);
	color: rgba(251, 249, 244, .74);
}

.hello__acts {
	margin-top: clamp(10px, 2vh, 20px);
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.hello__btn {
	display: inline-flex;
	align-items: center;
	min-height: 52px;
	padding: 0 24px;
	border-radius: 999px;
	border: 1.5px solid rgba(251, 249, 244, .4);
	font: 500 13px/1.2 var(--mono);
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: transform .2s, background .2s, border-color .2s, color .2s;
	/* A long address must wrap rather than push the page sideways. */
	overflow-wrap: anywhere;
}
.hello__btn:hover { transform: translateY(-2px); border-color: var(--paper); background: rgba(251, 249, 244, .08); }
.hello__btn--go {
	background: var(--teal);
	border-color: var(--teal);
	color: var(--ink);
}
.hello__btn--go:hover { background: #5cf0dc; border-color: #5cf0dc; }

.hello__note {
	margin-top: 6px;
	max-width: 54ch;
	font-size: 15px;
	color: rgba(251, 249, 244, .55);
}

.hello__onward {
	list-style: none;
	margin-top: clamp(26px, 4vh, 48px);
	padding-top: 20px;
	border-top: 1px solid rgba(251, 249, 244, .14);
	display: flex;
	flex-wrap: wrap;
	gap: 6px clamp(18px, 3vw, 42px);
}
.hello__onward a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font: 500 14px/1 var(--mono);
	letter-spacing: .04em;
	color: rgba(251, 249, 244, .72);
	text-underline-offset: 5px;
}
.hello__onward a:hover { color: var(--teal); }

/* ── narrow screens ──────────────────────────────────────────────────── */
@media (max-width: 560px) {
	/* Six columns still fit a thumb at 360px, but the names need the room, so
	   they wrap instead of squeezing. */
	.set__tick label { padding: 9px 0; gap: 4px; }
	.set__tick label span { font-size: 9px; letter-spacing: .05em; }
	.set__screen { padding: 22px 18px 26px; }
	.hello__btn { width: 100%; justify-content: center; text-align: center; }
}

/* ── motion ──────────────────────────────────────────────────────────── */
/* site.css flattens transitions site wide when motion is reduced, which is
   the right call here: with no transitions the dial still tunes, it just
   arrives instantly instead of swimming into focus. The blur is dropped too,
   because a blur that never resolves would be a wall. */
@media (prefers-reduced-motion: reduce) {
	.station { filter: none; transform: none; }
}
