@font-face {
  font-family: "Jost";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jost-400.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-500.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/cormorant-garamond-italic-400.woff2") format("woff2");
}

:root {
  --wall: #ece5da;
  --ink: #2e2a25;
  --ink-soft: #5d564c;
  --frame-r: clamp(14px, 2.6vmin, 24px);
  --frame-p: clamp(7px, 1.2vmin, 12px);
}

* { box-sizing: border-box; margin: 0; }

html, body { min-height: 100%; }

body {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
  /* A gallery wall, lit from above. */
  background: radial-gradient(ellipse 90% 70% at 50% -10%, #fbf8f2 0%, var(--wall) 60%, #e0d7ca 100%);
  background-color: var(--wall);
  color: var(--ink);
  font-family: "Jost", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); /* equal sides: the picture stays centred */
  align-items: end;
  column-gap: 48px;
  width: 100%;
  max-width: 1240px;
}

.frame {
  grid-column: 2;
  grid-row: 1;
  width: min(84vw, 70svh, 600px);
  padding: var(--frame-p);
  border-radius: var(--frame-r);
  background: linear-gradient(135deg, #6b5024 0%, #c9a45c 20%, #8a6a32 42%, #ecd8a6 60%, #7a5c2a 80%, #c09a52 100%);
  box-shadow:
    0 2px 3px rgba(60, 45, 30, 0.18),
    0 34px 60px -22px rgba(60, 45, 30, 0.45);
}

.art {
  --x: 50%;
  --y: 50%;
  --r: 100px;
  --a: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  isolation: isolate;
  border-radius: calc(var(--frame-r) - var(--frame-p));
  background: #d8c8bd;
  touch-action: none;
}

/* Where the frame meets the picture. */
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(40, 28, 15, 0.35), inset 0 2px 14px rgba(40, 28, 15, 0.3);
  pointer-events: none;
}

/* The whole picture, as through frosted glass. It reaches past the edges so the blur shows none. */
#soft {
  position: absolute;
  left: -8%;
  top: -8%;
  width: 116%;
  height: 116%;
  filter: blur(9px) brightness(0.84) saturate(0.8);
}

/* The same picture, clear, only where the light is. */
#sharp {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), rgba(0, 0, 0, var(--a)) 0%, rgba(0, 0, 0, calc(var(--a) * 0.85)) 50%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), rgba(0, 0, 0, var(--a)) 0%, rgba(0, 0, 0, calc(var(--a) * 0.85)) 50%, rgba(0, 0, 0, 0) 100%);
}

.glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle var(--r) at var(--x) var(--y), rgba(255, 222, 175, calc(var(--a) * 0.22)) 0%, rgba(255, 222, 175, 0) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Words on the wall: a quote high on the left, the caption low on the right. */
.quote {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  width: 280px;
  max-width: 100%;
  text-align: right;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-soft);
}

.label {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  width: 240px;
  max-width: 100%;
}

h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
}

.line {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.more {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.contact {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(46, 42, 37, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.4s ease;
}

.contact:hover,
.contact:focus-visible { text-decoration-color: var(--ink); }

/* Too narrow for words on both sides: they move under the picture. */
@media (max-width: 1200px) {
  main {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 32px;
  }
  .frame, .quote, .label { grid-column: 1; grid-row: auto; }
  .quote, .label { justify-self: center; text-align: center; }
}
