@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/assets/fonts/jost/jost-latin-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('/assets/fonts/jost/jost-latin-ext-variable.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  color-scheme: dark;
  --art-font: 'Jost', system-ui, sans-serif;
  --art-wall: #141214;
  --art-paper: #eee9df;
  --art-ink: #eee8df;
  --art-muted: #c4b6b8;
  --art-accent: #512b35;
  --art-light-spacing: clamp(500px, 40vw, 680px);
  --art-frame-edge: clamp(6px, .65vw, 11px);
  --art-mat-side: clamp(16px, 3vw, 48px);
  --art-mat-top: var(--art-mat-side);
  --art-mat-bottom: clamp(30px, 4vw, 58px);
  --art-recess-edge: clamp(4px, .5vw, 7px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--art-ink);
  background: linear-gradient(
    180deg,
    var(--art-accent) 0,
    #482730 110px,
    #342127 230px,
    #201a1e 370px,
    var(--art-wall) 560px
  );
  font: 400 1rem/1.6 var(--art-font);
  -webkit-font-smoothing: antialiased;
}
/* Fine, seamless grain and broad tonal folds suggest velvet without a raster download. */
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    url('/assets/images/art-velvet-grain.svg') repeat,
    repeating-linear-gradient(93deg, #ffffff02 0, transparent 1px, transparent 4px),
    linear-gradient(108deg, #261c2140, transparent 24%, #0004 41%, #32222a30 62%, #0002 84%);
  pointer-events: none;
  mask-image: linear-gradient(transparent, #000 260px);
  content: "";
}
/* One continuous lighting layer covers the whole wall. Each full-width repeat
   fades to zero before its vertical edges, avoiding visible cells or seams.
   The entrance stays untouched; the light gradually appears farther down. */
body::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    radial-gradient(ellipse 70% 46% at 35% 50%, #75415129, #75415110 45%, #75415100 100%),
    radial-gradient(ellipse 45% 40% at 23% 46%, #ebcdb80e, #ebcdb805 44%, #ebcdb800 100%),
    radial-gradient(ellipse 45% 40% at 72% 46%, #ebcdb80c, #ebcdb804 44%, #ebcdb800 100%);
  background-size: 100% var(--art-light-spacing);
  background-position: 0 100px;
  background-repeat: repeat-y;
  mask-image: linear-gradient(transparent 300px, #000 680px);
  pointer-events: none;
  content: "";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible {
  outline: 2px solid #d4b6ad;
  outline-offset: 6px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: .75rem 1rem;
  background: var(--art-paper);
  color: #302629;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.art-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 5vw;
}
.art-logo { flex-shrink: 0; }
.art-logo img { display: block; width: 170px; height: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .92; }
.art-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.8rem);
  color: var(--art-muted);
  font-size: .875rem;
  letter-spacing: .07em;
  white-space: nowrap;
}
.art-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color .3s ease;
}
.art-nav a:hover,
.art-nav a[aria-current="page"] {
  color: var(--art-ink);
}
.art-nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 1px;
  background: currentColor;
  opacity: .65;
  content: "";
}
main { max-width: 1600px; margin: auto; overflow-x: clip; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.art-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5rem 7vw;
  padding: 4rem 7vw 5rem;
}
.art-work {
  position: relative;
  min-width: 0;
  margin: 0;
  isolation: isolate;
  container-type: inline-size;
  --art-frame-height: 80cqw;
  --art-frame-width: 100%;
}
/* Two frame sizes share one height. Every portrait has a 2:3 opening; cover
   crops other portrait ratios instead of creating another frame width.
   Deduct the frame and both mat layers before calculating the opening. */
.art-work-portrait {
  --art-photo-ratio: calc(2 / 3);
  --art-photo-height: calc(var(--art-frame-height) - 2 * var(--art-frame-edge) - var(--art-mat-top) - var(--art-mat-bottom) - 2 * var(--art-recess-edge) - 4px);
  --art-frame-width: calc(var(--art-photo-height) * var(--art-photo-ratio) + 2 * var(--art-frame-edge) + 2 * var(--art-mat-side) + 2 * var(--art-recess-edge) + 4px);
}
/* Local depth comes from the frame and its cast shadow. Wall lighting belongs
   to the shared body layer, never to individual grid cells. */
.art-frame {
  position: relative;
  display: block;
  width: min(100%, var(--art-frame-width));
  height: var(--art-frame-height);
  margin-inline: auto;
  padding: var(--art-frame-edge);
  border: 1px solid #544b3c;
  background: linear-gradient(120deg, #635644, #282720 17%, #444034 85%, #746552);
  box-shadow:
    inset 1px 2px 2px #fff9,
    inset -1px -2px 2px #100d0959,
    0 0 0 1px #26231e,
    3px 6px 7px #0006,
    11px 21px 27px #0006,
    22px 38px 54px #0004;
  transition: transform .5s ease, box-shadow .5s ease;
  cursor: zoom-in;
  overflow: hidden;
}
.art-frame::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #fff5df0d, transparent 48%);
  pointer-events: none;
  content: "";
}
.art-mat {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: var(--art-mat-top) var(--art-mat-side) var(--art-mat-bottom);
  background: var(--art-paper);
  box-shadow: 0 2px 5px #201d1740 inset;
}
.art-recess {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: var(--art-recess-edge);
  border: 1px solid #7b6e5e38;
  background: var(--art-paper);
  box-shadow: 0 1px 0 #fff9, 0 -1px 0 #4b40331f, inset 2px 3px 4px #4035292b, inset -1px -1px 1px #fff8;
}
.art-mat img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}
.art-recess img { box-shadow: 0 0 0 1px #4b40331f; }
.art-signature {
  position: absolute;
  right: 5%;
  bottom: 1.5%;
  width: 12%;
  aspect-ratio: 4500 / 2726;
  opacity: .36;
  filter: brightness(0);
  background: url('/assets/logo/kvamfoto-logo-white-background.png') right center / contain no-repeat;
  pointer-events: none;
}
.art-frame.is-lifted { visibility: hidden; transform: none; }
.art-work figcaption {
  width: min(100%, var(--art-frame-width));
  margin-inline: auto;
  padding: 1.35rem .1rem 0;
  font-size: .875rem;
  letter-spacing: .035em;
}
.art-empty { padding: 0 7vw 4rem; color: var(--art-muted); }
.art-viewer-open { overflow: hidden; }
.art-viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 3vw, 3rem);
  border: 0;
  color: #ece9e2;
  background: transparent;
  isolation: isolate;
}
.art-viewer::backdrop { background: transparent; }
.art-viewer-shade { position: fixed; z-index: -1; inset: 0; background: #21191cf5; }
.art-viewer-panel { position: relative; display: flex; flex-direction: column; min-height: 100%; max-width: 1600px; margin: auto; pointer-events: none; }
.art-viewer-panel button, .art-viewer-panel a { pointer-events: auto; }
.art-viewer-header { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 1rem; font-size: .875rem; }
.art-viewer button { min-width: 48px; min-height: 48px; padding: .5rem 1rem; border: 1px solid #67685f; color: inherit; background: transparent; cursor: pointer; }
.art-viewer button:focus-visible, .art-viewer a:focus-visible { outline-color: #e2c996; }
.art-viewer-header button { display: flex; align-items: center; gap: 1.3rem; }
.art-viewer-header button span { font-size: 1.5rem; line-height: 1; }
.art-viewer-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  gap: 1.25rem clamp(.5rem, 3vw, 3rem);
  flex: 1;
}
.art-viewer-arrow { grid-row: 1; font-size: 1.35rem; }
.art-viewer-image {
  position: relative;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  place-items: center;
  width: 100%;
  min-height: 0;
  aspect-ratio: 5 / 4;
  max-height: 54vh;
  max-height: 54dvh;
}
.art-floating-frame {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  margin: 0;
  max-width: none;
  transform-origin: 0 0;
  transition: none;
  cursor: default;
  will-change: transform;
  touch-action: pan-y pinch-zoom;
  pointer-events: none;
}
.art-viewer-header, .art-viewer-caption, .art-viewer-arrow { position: relative; z-index: 2; }
.art-viewer-image p { position: absolute; bottom: 1rem; max-width: 90%; margin: 0; padding: .5rem .8rem; color: #fff; background: #242622e8; font-size: .875rem; }
.art-viewer-image p:empty { display: none; }
.art-viewer-caption {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  justify-items: center;
  gap: .65rem;
  text-align: center;
}
.art-viewer-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.art-viewer-caption h2 {
  margin: 0;
  font: 300 1.5rem/1.25 var(--art-font);
  letter-spacing: .035em;
}
.art-viewer-offer {
  max-width: 100%;
}
.art-viewer-price {
  margin: 0;
  color: var(--art-ink);
  font: 400 1.25rem/1.35 var(--art-font);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.art-viewer-delivery {
  margin: .35rem 0 0;
  color: var(--art-muted);
  font-size: .875rem;
  line-height: 1.6;
  letter-spacing: .015em;
}
.art-viewer .art-viewer-buy {
  min-width: 144px;
  min-height: 44px;
  margin-top: .25rem;
  padding: .65rem 2.4rem;
  border: 1px solid #c4ab9180;
  border-radius: 2px;
  background: #eee9df0a;
  color: var(--art-ink);
  font-size: .875rem;
  letter-spacing: .08em;
  transition: background .3s ease, border-color .3s ease;
}
.art-viewer .art-viewer-buy:hover {
  border-color: #dcc5a9;
  background: #eee9df17;
}
.art-viewer-buy-status {
  min-height: 1.6em;
  margin: 0;
  color: var(--art-muted);
  font-size: .75rem;
  line-height: 1.6;
}
.art-viewer button:disabled { opacity: .35; cursor: default; }
@media (hover: hover) {
  .art-frame:hover {
    transform: translateY(-3px);
    box-shadow:
      inset 1px 2px 2px #fff9,
      inset -1px -2px 2px #100d0959,
      0 0 0 1px #26231e,
      4px 8px 9px #0006,
      13px 25px 32px #0006,
      25px 44px 60px #0004;
  }
}
@media (max-width: 640px) {
  :root {
    --art-light-spacing: clamp(360px, 94vw, 600px);
    --art-mat-side: 5.6vw;
    --art-mat-top: 5.6vw;
    --art-mat-bottom: 9.6vw;
  }
  .art-header { padding-top: 1rem; padding-bottom: 1rem; }
  .art-logo img { width: clamp(96px, 30vw, 132px); }
  .art-nav { font-size: .75rem; letter-spacing: .02em; }
  .art-wall { grid-template-columns: 1fr; gap: 3.5rem; padding: 3rem 8vw 4rem; }
  .art-viewer-stage { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .art-viewer-image { grid-column: 1 / -1; grid-row: 1; }
  .art-viewer-image { max-height: 46vh; max-height: 46dvh; }
  .art-viewer-caption { grid-column: 1 / -1; grid-row: 2; }
  .art-viewer-arrow { grid-row: 3; justify-self: start; }
  .art-viewer-arrow[data-viewer-next] { justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art-frame, .art-nav a, .art-viewer .art-viewer-buy { transition: none; }
}
