/* vesturheimsrit's public pages: the Claude Design handoff's look ("Vesturheimsrit v2"), its inline styles turned into classes. Dark only, as designed. */
:root {
	--bg: #15120e;
	--bg-raised: #1a1612;
	--bg-tile: #1d1914;
	--bg-deep: #0c0a08;
	--bg-panel: #110f0c;
	--text: #efe9df;
	--text-2: #e4ddd1;
	--text-3: #d9d1c4;
	--muted: #b3aa9c;
	--muted-2: #a39a8c;
	--faint: #968d7f;
	--faint-2: #8a8173;
	--accent: #d4b26a;
	--accent-hover: #e2c27c;
	--line: rgba(239, 233, 223, .12);
	--line-soft: rgba(239, 233, 223, .08);
	--line-strong: rgba(239, 233, 223, .36);
	--serif: 'EB Garamond', Georgia, serif;
	--sans: 'IBM Plex Sans', system-ui, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, monospace;
	--gutter: clamp(20px, 4vw, 48px);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--text);
	font-family: var(--sans);
	-webkit-font-smoothing: antialiased;
}
main { flex: 1; display: flex; flex-direction: column; }
a { color: var(--text-3); }
a:hover { color: var(--accent); }
button, input { font: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; }
.icon { display: inline-block; flex: none; vertical-align: middle; }
.mono { font-family: var(--mono); }
.muted { color: var(--faint); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent); color: var(--bg); border-radius: 3px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; color: var(--bg); }

.wrap { max-width: 1320px; width: 100%; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* Small type: the mono capitals over titles, the gold rule beside them */
.label { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.label--accent { color: var(--accent); }
.kicker { display: flex; align-items: center; gap: 14px; font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.rule { width: 36px; height: 1px; background: var(--accent); }
/* Vesturheimsrit's mark (assets/img/mark.svg) beside the name */
.brand__mark { width: 30px; height: 30px; flex: none; display: block; }
.brand__mark--small { width: 20px; height: 20px; }

/* The Fragile Heritage Project's mark, drawn in the accent colour through its logo as a mask */
.fhp-mark { width: 52px; height: 52px; flex: none; background: var(--accent); -webkit-mask: url(../img/fhp-logo.png) center/contain no-repeat; mask: url(../img/fhp-logo.png) center/contain no-repeat; }
.fhp-mark--medium { width: 44px; height: 44px; }
.fhp-mark--small { width: 20px; height: 20px; background: var(--faint); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(21, 18, 14, .9); border-bottom: 1px solid rgba(239, 233, 223, .1); backdrop-filter: blur(10px); }
.site-header--overlay { position: absolute; left: 0; right: 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.site-header__inner { display: flex; align-items: center; gap: 20px 36px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__name { font: 500 28px/1 var(--serif); letter-spacing: .01em; }
.site-nav { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.site-nav a { font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.site-header__tools { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; padding: 3px; border: 1px solid rgba(239, 233, 223, .2); border-radius: 999px; gap: 2px; }
.lang-switch a { height: 28px; padding: 0 11px; display: grid; place-items: center; border-radius: 999px; font: 500 12px/1 var(--mono); letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.lang-switch a[aria-current] { background: var(--text); color: var(--bg); }
.signin { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-3); text-decoration: none; }
@media (max-width: 720px) {
	.site-nav { order: 3; width: 100%; margin-left: 0; gap: 22px; }
	.site-header__tools { margin-left: auto; }
	.brand__name { font-size: 24px; }
}

/* Buttons and links */
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 42px; }
.button { height: 52px; padding: 0 24px; display: inline-flex; align-items: center; gap: 12px; border-radius: 3px; font-size: 15px; text-decoration: none; cursor: pointer; }
.button--primary { background: var(--accent); color: var(--bg); font-weight: 600; border: 0; }
.button--primary:hover { background: var(--accent-hover); color: var(--bg); }
.button--ghost { border: 1px solid var(--line-strong); color: var(--text); font-weight: 500; }
.button--ghost:hover { border-color: var(--text); color: var(--text); }
.button--outline { height: 46px; padding: 0 20px; gap: 10px; background: transparent; border: 1px solid var(--line-strong); color: var(--text); font-size: 14px; font-weight: 500; }
.button--outline:hover { border-color: var(--accent); color: var(--accent); }
.button--small { height: 42px; justify-content: center; font-size: 14px; }
.link-accent { display: flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; font-size: 15px; font-weight: 500; }
.link-accent:hover { color: var(--accent-hover); }

/* Home */
.hero { position: relative; min-height: min(94vh, 920px); display: flex; align-items: flex-end; overflow: hidden; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(0deg, var(--bg) 0%, rgba(21, 18, 14, 0) 38%), linear-gradient(90deg, rgba(21, 18, 14, .95) 0%, rgba(21, 18, 14, .78) 40%, rgba(21, 18, 14, .2) 100%); }
.hero { isolation: isolate; }
.hero__inner { padding-top: 160px; padding-bottom: 104px; }
.hero__title { font: 400 clamp(48px, 7.2vw, 108px)/.98 var(--serif); letter-spacing: -.012em; margin: 26px 0 30px; max-width: 11.5ch; text-wrap: balance; }
.hero__lead { font-size: 20px; line-height: 1.55; color: var(--text-3); max-width: 40ch; margin: 0; text-wrap: pretty; }
.partner-band { padding-top: 24px; }
.partner { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; padding: 26px 28px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); }
.partner__text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.partner__name { font: 400 26px/1.15 var(--serif); color: var(--text); text-decoration: none; }
.partner__name--small { font-size: 22px; line-height: 1.2; }
.partner__subtitle { font: italic 400 17px/1.3 var(--serif); color: var(--muted); }
.partner--inline { padding: 20px 0; gap: 18px; flex-wrap: nowrap; border-width: 1px 0; border-radius: 0; background: none; margin-top: 6px; }
.partner--inline .partner__text { gap: 4px; min-width: 0; }
.partner--inline .partner__subtitle { font-size: 16px; }
.partner__url { display: flex; align-items: center; gap: 6px; margin-top: 6px; font: 400 12px/1 var(--mono); color: var(--accent); text-decoration: none; }
.home-collections { padding-top: 72px; padding-bottom: 120px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-head .label { font-size: 12px; }
.section-head__title { font: 400 42px/1.1 var(--serif); margin: 12px 0 0; }
.section-head__lead { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 60ch; margin: 12px 0 0; text-wrap: pretty; }

/* Collection cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 36px 32px; margin-top: 36px; }
.cards--gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 48px 36px; margin-top: 56px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.card:hover { color: var(--text); }
.cards--gallery .card { border-top: 1px solid rgba(239, 233, 223, .14); padding-top: 18px; }
.card__num { font: 500 12px/1 var(--mono); color: var(--accent); letter-spacing: .08em; margin-bottom: 18px; }
.card__image { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 3px; background: var(--bg-tile); }
.card__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__image img { transform: scale(1.04); }
.card__name { font: 400 27px/1.15 var(--serif); margin-top: 18px; }
.cards--gallery .card__name { font-size: 32px; line-height: 1.1; margin-top: 22px; }
.card__desc { font-size: 15px; line-height: 1.5; color: var(--muted); margin-top: 4px; }
.card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font: 400 12px/1 var(--mono); color: var(--faint); letter-spacing: .02em; }
.cards--gallery .card__meta { margin-top: 18px; }
.card__meta .icon { color: var(--accent); }
.empty { color: var(--muted); margin-top: 36px; }

/* Plain pages: About, Gallery, not found */
.page { padding-top: 80px; padding-bottom: 120px; }
.page__title { font: 400 clamp(40px, 5.4vw, 76px)/1.02 var(--serif); letter-spacing: -.01em; margin: 24px 0 18px; text-wrap: balance; }
.page__title--narrow { max-width: 16ch; margin-bottom: 0; }
.page__lead { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 52ch; margin: 0; text-wrap: pretty; }
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px 72px; margin-top: 64px; align-items: start; }
.about__figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.about__image { display: block; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden; background: var(--bg-tile); }
.about__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about__figure figcaption { font: 400 12px/1.5 var(--mono); color: var(--faint); }
.about__text { display: flex; flex-direction: column; gap: 22px; font: 400 21px/1.6 var(--serif); color: var(--text-2); max-width: 36em; }
.about__text p { margin: 0; text-wrap: pretty; }
.about__intro { font-size: 25px; line-height: 1.45; color: var(--text); }
.about__text .button { margin-top: 14px; height: 50px; padding: 0 22px; font-family: var(--sans); }

/* Album */
.album { padding-top: 48px; padding-bottom: 120px; }
.breadcrumb { display: flex; gap: 10px; align-items: center; font: 400 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.breadcrumb a { color: var(--muted-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span[aria-hidden] { color: #6f675c; }
.breadcrumb [aria-current] { color: var(--text); }
.album__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 26px; }
.album__title { font: 400 clamp(40px, 5vw, 68px)/1.02 var(--serif); letter-spacing: -.01em; margin: 0; }
.album__desc { font-size: 18px; color: var(--muted); margin: 12px 0 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 36px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.chip { height: 34px; padding: 0 14px; display: flex; align-items: center; gap: 8px; border-radius: 999px; border: 1px solid rgba(239, 233, 223, .22); color: var(--text-3); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip__count { font: 400 11px/1 var(--mono); opacity: .7; }
.group { margin-top: 44px; }
.group__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.group__head .mono { font-size: 12px; }
.group__title { font: 400 27px/1 var(--serif); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 14px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 8px; color: var(--faint); text-decoration: none; cursor: zoom-in; }
.tile__image { display: block; width: 100%; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden; background: var(--bg-tile); outline: 1px solid var(--line-soft); transition: outline-color .2s; }
.tile:hover .tile__image, .tile:focus-visible .tile__image { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile:focus-visible { outline: none; }
.tile__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile__name { font: 400 11.5px/1 var(--mono); }

/* One photo without JavaScript (?photo=): the lightbox replaces it when the script runs */
.photo-panel { margin-top: 32px; padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-deep); }
.photo-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.photo-panel__file { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; font: 400 21px/1 var(--serif); }
.photo-panel__file .mono { font-size: 12px; }
.photo-panel__nav { display: flex; gap: 4px; }
.photo-panel__image { display: block; margin: 0 auto; max-height: 80vh; }
.js .photo-panel { display: none; }

/* Footer */
.site-footer { border-top: 1px solid rgba(239, 233, 223, .1); }
.site-footer__inner { padding-top: 36px; padding-bottom: 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px 40px; flex-wrap: wrap; }
.site-footer__brand { display: flex; flex-direction: column; gap: 12px; }
.site-footer__name { display: flex; align-items: center; gap: 10px; }
.site-footer__name .brand__name { font-size: 20px; }
.site-footer__name .muted { font-size: 13px; }
.site-footer__partner { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.site-footer__partner em { font-family: var(--serif); font-size: 15px; }
.credit { margin: 0; font: 400 12px/1.6 var(--mono); color: var(--faint); max-width: 70ch; }

/* Icon buttons (lightbox toolbar, photo panel) */
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 6px; color: var(--text); cursor: pointer; text-decoration: none; }
.icon-button:hover { background: var(--line-soft); color: var(--text); }
.icon-button[aria-pressed="true"] { background: rgba(212, 178, 106, .16); color: var(--accent); }
.icon-button--text { width: auto; min-width: 58px; padding: 0 8px; font: 500 12px/1 var(--mono); }
.icon-button--close { background: var(--line-soft); }
.icon-button--close:hover { background: rgba(239, 233, 223, .16); }
.divider { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: var(--bg-deep); color: var(--text); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox__bar { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: 12px 20px; padding: 10px 12px 10px 22px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.lightbox__title { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.lightbox__where { letter-spacing: .1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.lightbox__file { display: flex; align-items: baseline; gap: 12px; font: 400 21px/1 var(--serif); }
.lightbox__file .mono { font-size: 12px; color: var(--muted-2); }
.lightbox__tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.lightbox__stage { grid-column: 1; grid-row: 2; position: relative; overflow: hidden; }
.lightbox__inner { position: absolute; top: 28px; bottom: 36px; left: 84px; right: 84px; display: flex; align-items: center; justify-content: center; cursor: zoom-in; touch-action: none; user-select: none; }
.lightbox__inner.is-zoomed { cursor: grab; }
.lightbox__inner.is-dragging { cursor: grabbing; }
.lightbox__image { max-width: 100%; max-height: 100%; display: block; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); pointer-events: none; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.lightbox__image.is-instant { transition: none; }
.round-button { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: rgba(21, 18, 14, .7); border: 1px solid rgba(239, 233, 223, .14); color: var(--text); cursor: pointer; }
.round-button:hover { border-color: var(--accent); color: var(--accent); }
.round-button:disabled { opacity: .25; pointer-events: none; }
.round-button--prev { left: 18px; }
.round-button--next { right: 18px; }
.lightbox__hint { position: absolute; left: 22px; bottom: 10px; font-size: 11px; color: var(--faint-2); letter-spacing: .02em; }
.toast { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.toast[hidden] { display: none; }
.lightbox__panel { grid-column: 2; grid-row: 2; width: 300px; border-left: 1px solid var(--line-soft); background: var(--bg-panel); padding: 26px 24px; overflow: auto; display: flex; flex-direction: column; gap: 26px; }
.lightbox__panel[hidden] { display: none; }
.details { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; font-size: 14px; line-height: 1.3; }
.details dt { color: var(--muted-2); }
.details dd { margin: 0; text-align: right; font: 400 13px/1.3 var(--mono); color: var(--text); overflow-wrap: anywhere; }
.lightbox__panel-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.filmstrip { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; gap: 6px; padding: 12px 18px; overflow-x: auto; border-top: 1px solid var(--line-soft); background: var(--bg-deep); scrollbar-width: thin; scrollbar-color: #3a332a transparent; }
.filmstrip[hidden] { display: none; }
.filmstrip__divider { flex: none; writing-mode: vertical-rl; transform: rotate(180deg); font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); height: 66px; overflow: hidden; text-align: center; padding: 0 6px 0 2px; border-right: 1px solid rgba(239, 233, 223, .14); }
.filmstrip__divider:not(:first-child) { margin-left: 12px; }
.filmstrip button { flex: none; width: 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 3px; overflow: hidden; background: var(--bg-tile); opacity: .5; cursor: pointer; transition: opacity .2s; }
.filmstrip button:hover { opacity: 1; }
.filmstrip button[aria-current] { border-color: var(--accent); opacity: 1; }
.filmstrip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.keys { position: absolute; inset: 0; z-index: 5; background: rgba(8, 7, 5, .74); display: grid; place-items: center; padding: 24px; }
.keys[hidden] { display: none; }
.keys__box { width: min(480px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--bg-tile); border: 1px solid var(--line); border-radius: 8px; padding: 28px 30px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.keys__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.keys__head h2 { font: 400 28px/1 var(--serif); margin: 0; }
.keys__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid rgba(239, 233, 223, .07); font-size: 14px; color: var(--text-3); }
.keys__keys { display: flex; gap: 5px; }
kbd { min-width: 28px; height: 26px; padding: 0 7px; display: grid; place-items: center; font: 500 12px/1 var(--mono); color: var(--text); background: var(--bg); border: 1px solid rgba(239, 233, 223, .18); border-bottom-width: 2px; border-radius: 4px; }
body.lightbox-open { overflow: hidden; }
@media (max-width: 720px) {
	.lightbox { grid-template-columns: minmax(0, 1fr); }
	.lightbox__panel { display: none; }
	.lightbox__inner { left: 12px; right: 12px; }
	.round-button { width: 42px; height: 42px; }
	.round-button--prev { left: 8px; }
	.round-button--next { right: 8px; }
	.lightbox__hint, .divider { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
