/* ── House of Atlas — Service Selector ───────────────────────────────── */

.hss *,
.hss *::before,
.hss *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Dark mode (default) */
.hss {
	--bg:   #0d0d0d;
	--surf: #151515;
	--w:    #f0ede8;
	/* Solid text colours — no transparency, readable over images */
	--w70:  #b4b1ac;
	--w45:  #7d7a77;
	--w28:  #555250;
	/* Borders/backgrounds keep rgba so they blend with panel colours */
	--w15:  rgba(240, 237, 232, 0.15);
	--w08:  rgba(240, 237, 232, 0.08);
	--f:    'Abel', sans-serif;

	background: var(--bg);
	color: var(--w);
	font-family: var(--f);
	-webkit-font-smoothing: antialiased;
}

/* Light mode override */
.hss.light-mode {
	--bg:   #ffffff;
	--surf: #f4f4f4;
	--w:    #0d0d0d;
	--w70:  #505050;
	--w45:  #888888;
	--w28:  #aaaaaa;
	--w15:  rgba(13, 13, 13, 0.15);
	--w08:  rgba(13, 13, 13, 0.08);
}

/* ── Through-line header ───────────────────────────────────────────── */
.hss-head {
	padding: 56px clamp(24px, 3.2vw, 72px) 0;
	max-width: 1400px;
	margin: 0 auto;
}

.hss-head-tag {
	font-family: "Abel", Sans-serif;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1em;
	letter-spacing: 1.4px;
	margin-bottom: 20px;
	color: #ffffff;
	background-color: #333333;
	padding: 6px 4px;
	display: inline-block;
}

.hss.light-mode .hss-head-tag {
	color: #000000;
	background-color: #e0e0e0;
}

.hss.light-mode .hss-has-bg { border-right-color: #ffffff; }

.hss-head-line {
	font-family: "Abel", Sans-serif;
	font-size: 44px;
	color: var(--w70);
	line-height: 1.1;
	max-width: max(65%, 762px);
	letter-spacing: -0.01em;
}

.hss-head-line strong {
	color: var(--w);
	font-weight: normal;
}

/* ── Panel row ─────────────────────────────────────────────────────── */
.hss-row {
	display: flex;
	width: 100%;
	/* Fixed height prevents layout shift when panels expand */
	height: var(--hss-row-height, 540px);
	margin-top: 40px;
	border-top: 0.5px solid var(--w15);
}

.hss-panel {
	position: relative;
	flex: 1 1 0;
	cursor: pointer;
	overflow: hidden;
	/* Border drawn here is semi-transparent; image panels replace it with ::after below */
	border-right: 0.5px solid var(--w15);
	padding: 40px 36px;
	display: flex;
	flex-direction: column;
	transition: flex-grow 0.6s cubic-bezier(0.22, 1, 0.36, 1),
	            background 0.5s ease;
	background: var(--bg);
	min-width: 0;
}

.hss-panel:last-child                       { border-right: none; }
.hss-panel:not(.hss-has-bg):hover           { background: var(--surf); }
.hss-panel.committed                         { flex-grow: 3.2; cursor: default; }
.hss-panel:not(.hss-has-bg).committed       { background: var(--surf); }
.hss-panel.dimmed                            { flex-grow: 0.7; }
.hss-panel:not(.hss-has-bg).dimmed          { background: var(--bg); }

.hss-panel.dimmed .hss-desc,
.hss-panel.dimmed .hss-detail { opacity: 0.25; }

/* Background image panels — image must never be touched by background shorthand */
.hss-has-bg {
	background-size: cover;
	background-position: center;
	background-color: transparent;
	/* Solid border so no image bleeds through */
	border-right-color: #000000;
	/* Drop `background` from transition so colour changes never interpolate image position */
	transition: flex-grow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Overlay — sits above the image, below content */
.hss-has-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--bg);
	opacity: var(--overlay-op, 0.72);
	transition: opacity 0.5s ease;
	z-index: 0;
	pointer-events: none;
}

.hss-has-bg:hover::before     { opacity: calc(var(--overlay-op, 0.72) - 0.1); }
.hss-has-bg.committed::before { opacity: calc(var(--overlay-op, 0.72) - 0.15); }
.hss-has-bg.dimmed::before    { opacity: min(calc(var(--overlay-op, 0.72) + 0.15), 1); }

/* Divider — drawn above the overlay so the image never bleeds through it */
.hss-has-bg::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 1px;
	background: #000000;
	z-index: 2;
	pointer-events: none;
}

.hss.light-mode .hss-has-bg::after { background: #ffffff; }

.hss-has-bg:last-child::after { display: none; }

.hss-has-bg > * { position: relative; z-index: 1; }

.hss-idx {
	font-size: 12px;
	letter-spacing: 0.2em;
	color: var(--w45);
	margin-bottom: 22px;
	font-variant-numeric: tabular-nums;
}

.hss-title {
	font-family: "Abel", Sans-serif;
	font-size: clamp(22px, 2.4vw, 30px);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--w);
	line-height: 1.05;
	margin-bottom: 22px;
	font-weight: normal;
}

/* collapsed description */
.hss-desc {
	font-size: 18px;
	color: var(--w);
	line-height: 1.55;
	letter-spacing: 0.01em;
	max-width: 280px;
	transition: opacity 0.4s;
}

/* expanded-only detail */
.hss-detail {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1),
	            opacity 0.5s ease 0.1s;
}

.hss-panel.committed .hss-detail {
	max-height: 400px;
	opacity: 1;
	margin-top: 26px;
}

.hss-proof {
	font-size: 16px;
	color: var(--w);
	line-height: 1.5;
	padding: 16px 0;
	border-top: 0.5px solid var(--w15);
	border-bottom: 0.5px solid var(--w15);
	letter-spacing: 0.01em;
}

.hss-proof span { color: var(--w70); }

.hss-work-label {
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--w70);
	margin: 20px 0 10px;
}

.hss-work {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 26px;
}

.hss-chip {
	font-size: 13px;
	letter-spacing: 0.04em;
	color: var(--w);
	border: 0.5px solid var(--w28);
	padding: 5px 11px;
	white-space: nowrap;
}

.hss-cta {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	align-self: flex-start;
	font-family: var(--f);
	font-size: 13px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--w);
	background: transparent;
	border: 0.5px solid var(--w45);
	padding: 13px 24px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

/* Force colour so theme <a> styles can't override it */
.hss .hss-cta,
.hss .hss-cta:visited,
.hss .hss-cta:hover,
.hss .hss-cta:focus {
	color: var(--w);
}

.hss-cta:hover {
	background: var(--w15);
	border-color: var(--w);
}

/* collapsed hint chevron */
.hss-hint {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--w45);
	transition: opacity 0.4s, color 0.2s;
}

.hss-panel:hover .hss-hint          { color: var(--w70); }
.hss-panel.committed .hss-hint      { opacity: 0; pointer-events: none; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 880px) {
	.hss-row {
		flex-direction: column;
		height: auto; /* fixed height only applies on desktop */
	}

	.hss-panel {
		border-right: none;
		border-bottom: 0.5px solid var(--w15);
		padding: 30px 26px;
	}

	.hss-panel.committed,
	.hss-panel.dimmed { flex-grow: 1; }

	.hss-panel.dimmed .hss-desc,
	.hss-panel.dimmed .hss-detail { opacity: 1; }

	.hss-panel.committed .hss-detail { max-height: 500px; }

	.hss-desc   { max-width: none; }
	.hss-hint   { margin-top: 20px; }
	.hss-panel.committed .hss-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hss-panel,
	.hss-detail { transition: none; }
}
