/* ==========================================================================
   Hutchinson Portfolio
   Proportions are derived from the layout drawings (2000 x 1125 reference),
   expressed in vw so the design scales the way it was drawn, with clamps so
   it stays usable at the extremes.
   ========================================================================== */

:root {
	--hp-font: "neue-haas-grotesk-display", "neue-haas-grotesk-text", "Helvetica Neue", Helvetica, Arial, sans-serif;

	--hp-bg: #ffffff;
	--hp-ink: #000000;
	--hp-line: #000000;
	--hp-line-w: 1px;

	/* 52 / 2000 = 2.6% */
	--hp-pad: clamp(18px, 2.6vw, 52px);
	/* header baseline sits at 95 / 2000 */
	--hp-header-h: clamp(54px, 4.75vw, 95px);
	/* collapsed list row: 62 / 2000 */
	--hp-row-h: clamp(42px, 3.1vw, 62px);
	/* media column starts at 870 / 2000 */
	--hp-col2: 43.5%;

	--hp-fs: clamp(14px, 1.3vw, 26px);
	--hp-lh: 1.26;

	--hp-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--hp-dur: 0.5s;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

/* Applies both to <body> in the plugin templates and to the shortcode wrapper. */
.hp-scope {
	margin: 0;
	background: var(--hp-bg);
	color: var(--hp-ink);
	font-family: var(--hp-font);
	font-size: var(--hp-fs);
	line-height: var(--hp-lh);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	/* Kills the grey flash Safari paints over a tapped row on iOS. */
	-webkit-tap-highlight-color: transparent;
}

.hp-scope *,
.hp-scope *::before,
.hp-scope *::after {
	box-sizing: border-box;
}

/* Every link state is named explicitly. The active theme's stylesheet is still
   enqueued on these pages (wp_head brings it along), and a bare `a { color }`
   ties with a theme's `a:visited { color: … }` on specificity — whichever loads
   last would win. Naming the states outranks it instead of racing it. */
.hp-scope a,
.hp-scope a:link,
.hp-scope a:visited,
.hp-scope a:hover,
.hp-scope a:focus,
.hp-scope a:active {
	color: inherit;
	text-decoration: none;
}

.hp-scope img,
.hp-scope video {
	max-width: 100%;
	display: block;
}

.hp-scope button,
.hp-scope button:hover,
.hp-scope button:focus,
.hp-scope button:active {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
}

.hp-scope :focus-visible {
	outline: 2px solid var(--hp-ink);
	outline-offset: 3px;
}

/* `font: inherit`, not just size and weight. Block themes push a heading
   typeface through global styles (Twenty Twenty-Five uses Cardo), and a
   property this reset does not declare is a property the theme still owns. */
.hp-scope h1,
.hp-scope h2,
.hp-scope h3,
.hp-scope h4,
.hp-scope h5,
.hp-scope h6,
.hp-scope p,
.hp-scope figure,
.hp-scope ul,
.hp-scope ol {
	margin: 0;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	color: inherit;
	list-style: none;
}

/* Fallback shape for a video WordPress has no dimensions for, so the slide
   still occupies sensible space before metadata arrives. */
.hp-media--noratio {
	aspect-ratio: 16 / 9;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.hp-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 90;
	height: var(--hp-header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 var(--hp-pad);
	background: var(--hp-bg);
	border-bottom: var(--hp-line-w) solid var(--hp-line);
}

.hp-header__wordmark {
	letter-spacing: -0.005em;
	white-space: nowrap;
}

.hp-header__nav {
	display: flex;
	align-items: center;
	gap: clamp(24px, 7.5vw, 150px);
}

.hp-header__link {
	position: relative;
	white-space: nowrap;
}

.hp-header__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.12em;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s var(--hp-ease);
}

.hp-header__link:hover::after,
.hp-header__link:focus-visible::after {
	transform: scaleX(1);
}

/* Burger — 45 / 2000 wide in the drawings. It is not a menu of its own any
   more: it carries the same three links, and only where they stop fitting
   across the header. Hidden by default, switched on at phone widths below. */
.hp-burger {
	width: clamp(24px, 2.25vw, 45px);
	height: clamp(14px, 1.1vw, 22px);
	display: none;
	flex-direction: column;
	justify-content: space-between;
	/* The bars are empty spans, so they have no width of their own. A <button>
	   carries align-items:center from the UA stylesheet, which sizes them to
	   their content — nothing — and the icon renders invisible in WebKit.
	   Stretching them across the button is what makes the three lines exist. */
	align-items: stretch;
	flex: 0 0 auto;
}

.hp-burger span {
	display: block;
	height: 2px;
	background: currentColor;
	transition: transform 0.4s var(--hp-ease), opacity 0.2s linear;
}

.hp-burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(calc(clamp(14px, 1.1vw, 22px) / 2 - 1px)) rotate(45deg);
}

.hp-burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.hp-burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(calc(clamp(14px, 1.1vw, 22px) / -2 + 1px)) rotate(-45deg);
}

/* Overlay menu */
.hp-overlay {
	position: fixed;
	inset: var(--hp-header-h) 0 0 0;
	z-index: 80;
	background: var(--hp-bg);
	display: flex;
	align-items: flex-start;
	padding: clamp(30px, 5vw, 100px) var(--hp-pad);
	opacity: 0;
	transition: opacity 0.35s var(--hp-ease);
}

.hp-overlay[hidden] {
	display: none;
}

.hp-overlay.is-open {
	opacity: 1;
}

/* Scoped with .hp-scope so it outranks the `.hp-scope ul { font: inherit }`
   reset, which otherwise drops the overlay back to body size — the menu is
   meant to be display type, as drawn. */
.hp-scope .hp-overlay__menu {
	display: flex;
	flex-direction: column;
	gap: clamp(6px, 0.9vw, 18px);
	font-size: clamp(28px, 5vw, 100px);
	line-height: 1.05;
}

/* --------------------------------------------------------------------------
   Archive
   -------------------------------------------------------------------------- */

.hp-main--archive {
	padding-top: var(--hp-header-h);
}

.hp-hero {
	width: 100%;
	/* 710 / 1125 of the reference viewport */
	height: 63vh;
	overflow: hidden;
	background: #000;
}

.hp-hero__media {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
   Project list
   -------------------------------------------------------------------------- */

.hp-list {
	border-top: var(--hp-line-w) solid var(--hp-line);
}

.hp-list__item {
	border-bottom: var(--hp-line-w) solid var(--hp-line);
}

.hp-row {
	display: block;
	position: relative;
}

.hp-row__label {
	display: flex;
	align-items: center;
	height: var(--hp-row-h);
	padding: 0 var(--hp-pad);
}

/* Underline wipes in from the left on hover, same gesture as the header links.
   The span keeps the rule the width of the text rather than the whole row. */
.hp-row__title {
	position: relative;
	display: inline-block;
}

.hp-row__title::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.12em;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.4s var(--hp-ease);
}

.hp-row:hover .hp-row__title::after,
.hp-row:focus-visible .hp-row__title::after {
	transform: scaleX(1);
}

/* Leaving the row retracts it to the right, so the motion reads as one sweep. */
.hp-row:not(:hover) .hp-row__title::after {
	transform-origin: right center;
}

/* The 0fr → 1fr grid trick animates to the row's natural height. */
.hp-row__preview {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--hp-dur) var(--hp-ease);
}

.hp-row__previewInner {
	display: block;
	overflow: hidden;
	min-height: 0;
	opacity: 0;
	transition: opacity 0.3s linear;
}

.hp-row:hover .hp-row__preview,
.hp-row:focus-visible .hp-row__preview,
.hp-row.is-open .hp-row__preview {
	grid-template-rows: 1fr;
}

.hp-row:hover .hp-row__previewInner,
.hp-row:focus-visible .hp-row__previewInner,
.hp-row.is-open .hp-row__previewInner {
	opacity: 1;
	transition-delay: 0.1s;
}

.hp-thumbs {
	display: flex;
	justify-content: flex-end;
	align-items: flex-end;
	gap: clamp(10px, 3vw, 60px);
	padding: 0 var(--hp-pad) clamp(10px, 1.2vw, 24px);
}

.hp-thumbs__item {
	display: block;
	/* 348 / 2000 in the drawings */
	height: clamp(96px, 17.4vw, 348px);
	flex: 0 0 auto;
	max-width: 30%;
	overflow: hidden;
}

.hp-thumbs__item .hp-media {
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: cover;
}

/* --------------------------------------------------------------------------
   Medium / Datum / Kunde
   -------------------------------------------------------------------------- */

.hp-meta {
	display: grid;
	/* column starts at 52 / 395 / 775 of 2000 */
	grid-template-columns: minmax(0, 17.2%) minmax(0, 19%) minmax(0, 1fr);
	gap: 0 clamp(12px, 2vw, 40px);
	padding: 0 var(--hp-pad);
}

.hp-meta__cell {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.hp-meta__value {
	overflow-wrap: anywhere;
}

.hp-meta--row {
	padding-bottom: clamp(10px, 1.3vw, 26px);
}

/* --------------------------------------------------------------------------
   Expanded project — opens inside the list, the index never goes away
   -------------------------------------------------------------------------- */

.hp-detail[hidden] {
	display: none;
}

/* The open row's label is replaced by the panel, which leads with "Titel". */
.hp-list__item.is-open > .hp-row {
	display: none;
}

.hp-project {
	display: grid;
	grid-template-columns: var(--hp-col2) minmax(0, 1fr);
}

.hp-project__text {
	padding: clamp(14px, 1.2vw, 24px) var(--hp-pad) 0;
	min-width: 0;
}

/* Clicking the title line closes the project again — it gets the same
   underline so it reads as the interactive element it is. */
.hp-project__title {
	cursor: pointer;
	display: inline-block;
	position: relative;
}

.hp-project__title::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.12em;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.4s var(--hp-ease);
}

.hp-project__title:hover::after,
.hp-project__title:focus-visible::after {
	transform: scaleX(1);
}

.hp-project__title:not(:hover)::after {
	transform-origin: right center;
}

.hp-project__link {
	margin-top: 1.4em;
}

.hp-project__link a {
	border-bottom: 1px solid currentColor;
}

.hp-field {
	/* 470 / 2000 measured column width */
	max-width: clamp(240px, 23.5vw, 470px);
}

.hp-field--desc {
	margin-top: clamp(28px, 4.6em, 130px);
}

.hp-project__desc {
	/* Flush left, ragged right. Automatic hyphenation goes with it: hyphens
	   exist to stop justified text opening up gaps, and against a rag they only
	   break words that had no need to break. */
	text-align: left;
}

.hp-project__desc p + p {
	margin-top: 1em;
}

.hp-project__media {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	padding: clamp(14px, 1.2vw, 24px) var(--hp-pad) 0 0;
}

.hp-slider {
	display: flex;
	flex-direction: column;
}

/* An explicit height rather than a flexed one: the panel is inside the page
   flow now, so there is no fixed-height parent to divide up. 762/1125 of the
   reference viewport. */
.hp-slider__track {
	height: clamp(240px, 64vh, 1000px);
	flex: 0 0 auto;
	display: flex;
	align-items: stretch;
	gap: clamp(12px, 1.75vw, 35px);
	overflow-x: auto;
	overflow-y: hidden;
	/* No scroll-snap. Safari re-snaps after a programmatic scroll and drags the
	   track back where it started, which stopped the arrows working there. The
	   arrows already land on exact slide offsets, so snapping added nothing. */
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior-x: contain;
}

.hp-slider__track::-webkit-scrollbar {
	display: none;
}

.hp-slide {
	flex: 0 0 auto;
	height: 100%;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.hp-slide .hp-media {
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left top;
}

.hp-slide__caption {
	padding-top: 0.4em;
	font-size: 0.85em;
}

.hp-slider__nav {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding: clamp(12px, 1.6vw, 32px) 0 clamp(10px, 1.2vw, 24px);
	flex: 0 0 auto;
}

.hp-slider__next {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: clamp(4px, 0.4vw, 8px);
	margin-left: auto;
}

.hp-slider__btn {
	display: block;
	transition: transform 0.35s var(--hp-ease), opacity 0.25s linear;
}

.hp-slider__btn[disabled] {
	opacity: 0.18;
	cursor: default;
}

/* Set by hp.js when the gallery fits without scrolling. The controls stay in
   place (the drawings show them on single-item projects too) — this is a hook
   in case you ever want to hide them. */
.hp-slider--static .hp-slider__nav {
	/* visibility: hidden; */
}

.hp-slider__btn--next:not([disabled]):hover {
	transform: translateX(6px);
}

.hp-slider__btn--prev:not([disabled]):hover {
	transform: translateX(-6px);
}

.hp-arrow {
	width: clamp(38px, 3.2vw, 64px);
	height: auto;
	display: block;
}

.hp-arrow--left {
	transform: scaleX(-1);
}

/* No border here: the list item's own hairline closes the panel off. */
.hp-project__footer {
	padding-bottom: clamp(12px, 1.6vw, 32px);
}

.hp-empty {
	padding: var(--hp-pad);
}

/* --------------------------------------------------------------------------
   About — same grid and hairlines as the index, so it reads as one object
   -------------------------------------------------------------------------- */

.hp-main--about {
	padding-top: var(--hp-header-h);
}

.hp-intro {
	display: grid;
	grid-template-columns: var(--hp-col2) minmax(0, 1fr);
	padding: clamp(30px, 5vw, 90px) var(--hp-pad) clamp(36px, 6vw, 110px);
	border-bottom: var(--hp-line-w) solid var(--hp-line);
	align-items: start;
}

.hp-intro__text {
	max-width: clamp(240px, 30vw, 600px);
	font-size: clamp(17px, 1.75vw, 35px);
	line-height: 1.25;
	letter-spacing: -0.012em;
}

.hp-intro__text p + p {
	margin-top: 0.9em;
}

.hp-intro__portrait {
	display: flex;
	justify-content: flex-end;
}

.hp-portrait {
	position: relative;
	width: clamp(180px, 26vw, 520px);
	overflow: hidden;
}

.hp-portrait__img {
	width: 100%;
	height: auto;
	display: block;
}

/* The second frame sits on top and fades in — the one place on the site
   where the portrait gets to be less composed. */
.hp-portrait__img--b {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.45s var(--hp-ease);
}

.hp-portrait--swap:hover .hp-portrait__img--b {
	opacity: 1;
}

/* CV groups: label once on the left, entries stacked to its right. */
.hp-cv__group {
	display: grid;
	grid-template-columns: minmax(0, 17.2%) minmax(0, 1fr);
	gap: 0 clamp(12px, 2vw, 40px);
	padding: clamp(20px, 2.6vw, 44px) var(--hp-pad);
	border-bottom: var(--hp-line-w) solid var(--hp-line);
}

.hp-cv__title {
	font-size: inherit;
	font-weight: inherit;
}

.hp-cv__rows {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	min-width: 0;
}

.hp-cv__row {
	display: grid;
	grid-template-columns: minmax(0, 24%) minmax(0, 1fr);
	gap: 0 clamp(12px, 2vw, 40px);
}

.hp-cv__row--wide {
	grid-template-columns: minmax(0, 1fr);
}

.hp-cv__year {
	font-variant-numeric: tabular-nums;
}

.hp-cv__entry {
	overflow-wrap: anywhere;
}

/* Same underline gesture as everywhere else. */
.hp-link {
	position: relative;
	display: inline-block;
}

.hp-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.12em;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.4s var(--hp-ease);
}

.hp-link:hover::after,
.hp-link:focus-visible::after {
	transform: scaleX(1);
}

.hp-link:not(:hover)::after {
	transform-origin: right center;
}

/* --------------------------------------------------------------------------
   Embedded via shortcode — no fixed chrome to offset
   -------------------------------------------------------------------------- */

.hp-scope--embedded .hp-main--archive,
.hp-scope--embedded {
	padding-top: 0;
}

/* --------------------------------------------------------------------------
   WP admin bar
   -------------------------------------------------------------------------- */

body.admin-bar .hp-header {
	top: 32px;
}

body.admin-bar .hp-overlay {
	top: calc(var(--hp-header-h) + 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .hp-header {
		top: 46px;
	}

	body.admin-bar .hp-overlay {
		top: calc(var(--hp-header-h) + 46px);
	}
}

/* --------------------------------------------------------------------------
   Narrow screens
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
	:root {
		--hp-fs: 15px;
		--hp-col2: 100%;
	}

	.hp-header__nav {
		gap: clamp(18px, 5vw, 40px);
	}

	.hp-hero {
		height: 44vh;
	}

	.hp-project {
		display: block;
	}

	.hp-project__text {
		padding-bottom: clamp(20px, 5vw, 40px);
	}

	.hp-field {
		max-width: none;
	}

	.hp-project__media {
		padding: 0 var(--hp-pad) 0 0;
	}

	.hp-slider__track {
		height: 52vh;
		flex: 0 0 auto;
	}

	.hp-meta {
		grid-template-columns: 1fr;
		gap: 0.6em 0;
	}

	.hp-intro {
		display: block;
	}

	.hp-intro__text {
		max-width: none;
	}

	.hp-intro__portrait {
		justify-content: flex-start;
		margin-top: clamp(24px, 6vw, 48px);
	}

	.hp-portrait {
		width: min(100%, 340px);
	}

	.hp-cv__group {
		grid-template-columns: 1fr;
		gap: 0.5em 0;
	}

	.hp-cv__row {
		grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
	}

	.hp-meta__cell {
		flex-direction: row;
		gap: 0.6em;
	}

	.hp-project__footer {
		margin-top: clamp(20px, 6vw, 48px);
	}
}

/* Phone widths: three links would crowd the wordmark off the header, so the
   navigation collapses into the burger — the same three links, stacked. */
@media (max-width: 600px) {
	.hp-header__link {
		display: none;
	}

	.hp-burger {
		display: flex;
	}

	.hp-header__wordmark {
		white-space: normal;
	}

	.hp-hero {
		height: 38vh;
	}

	.hp-slider__track {
		height: 44vh;
	}
}

/* Touch devices have no hover: show a condensed preview permanently so the
   Medium / Datum / Kunde data and one thumbnail are still reachable. */
@media (hover: none) {
	.hp-row__preview {
		grid-template-rows: 1fr;
	}

	.hp-row__previewInner {
		opacity: 1;
	}

	.hp-thumbs__item:nth-child(n + 2) {
		display: none;
	}

	.hp-thumbs__item {
		height: clamp(88px, 26vw, 200px);
		max-width: 60%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hp-scope *,
	.hp-scope *::before,
	.hp-scope *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.hp-slider__track {
		scroll-behavior: auto;
	}
}


/* --------------------------------------------------------------------------
   Impressum / legal pages
   -------------------------------------------------------------------------- */

.hp-legal {
	padding-top: var(--hp-header-h);
}

/* Scoped with .hp-scope to outrank the heading reset above, which zeroes
   padding on every h1 at a specificity a lone class cannot beat. */
.hp-scope .hp-legal__title {
	font-size: inherit;
	font-weight: inherit;
	margin: 0;
	padding: clamp(20px, 2.6vw, 44px) var(--hp-pad);
	border-bottom: var(--hp-line-w) solid var(--hp-line);
}

.hp-legal__block {
	border-bottom: var(--hp-line-w) solid var(--hp-line);
}

/* Label left, value right — the same two-column reading rhythm as the CV. */
.hp-legal__row {
	display: grid;
	grid-template-columns: minmax(0, 24%) minmax(0, 1fr);
	gap: 0 clamp(12px, 2vw, 40px);
	padding: 0.55em var(--hp-pad);
}

.hp-legal__row + .hp-legal__row {
	border-top: var(--hp-line-w) solid var(--hp-line);
}

.hp-legal__value {
	overflow-wrap: anywhere;
}

.hp-legal__value a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.hp-legal__doc {
	padding: clamp(20px, 2.6vw, 44px) var(--hp-pad);
	border-bottom: var(--hp-line-w) solid var(--hp-line);
	display: grid;
	grid-template-columns: minmax(0, 24%) minmax(0, 1fr);
	gap: 0 clamp(12px, 2vw, 40px);
}

.hp-legal__heading {
	font-size: inherit;
	font-weight: inherit;
	margin: 0;
}

/* Legal prose is read, not scanned, so it gets a comfortable measure rather
   than the full width the rest of the design runs at. */
.hp-legal__prose {
	min-width: 0;
	max-width: 62ch;
	display: flex;
	flex-direction: column;
	gap: 0.9em;
}

.hp-legal__prose h3 {
	font-size: inherit;
	font-weight: inherit;
	margin: 0.6em 0 0;
}

.hp-legal__prose h3:first-child {
	margin-top: 0;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.hp-legal__prose p {
	margin: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 900px) {
	.hp-legal__row,
	.hp-legal__doc {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.2em 0;
	}

	.hp-legal__label {
		opacity: 0.55;
	}

	.hp-legal__doc {
		gap: 0.9em 0;
	}
}
