/* Chaya, paintings and portraits.
   Direction: her studio. The page opens on a real-time 3D wall where her canvases lean in the
   window light; everything after it is quiet paper, one centred reading column, and one accent:
   the red of the cabinet she painted in Webcam Girl. One typeface, Bricolage Grotesque, set
   narrow and heavy for display, plain for reading. */

:root {
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;

  /* colour: the studio (wall and concrete), paper, dark umber, bone, cabinet red */
  --wall: #e9e6e1;
  --concrete: #aeaaa3;
  --paper: #f4f2ee;
  --ink: #1b1a18;
  --ink-soft: rgb(27 26 24 / 0.72);
  --line: rgb(27 26 24 / 0.16);
  --umber: #1f1b18;
  --bone: #f2ede5;
  --bone-soft: rgb(242 237 229 / 0.74);
  --bone-line: rgb(242 237 229 / 0.24);
  --cabinet: #9b1b18;
  --cabinet-deep: #7a1411;

  /* type scale */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-0: 1.0625rem;
  --t-1: 1.25rem;
  --t-2: 1.625rem;
  --t-3: 2.25rem;
  --t-4: clamp(2.375rem, 1.6rem + 2.8vw, 4rem);
  --t-5: clamp(3rem, 1.2rem + 6vw, 7rem);

  /* spacing, 4 based */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  --gutter: clamp(16px, 4vw, 48px);
  --radius: 2px;
  --tap: 44px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-0);
  font-variation-settings: "opsz" 14;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
figure,
ol,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 650;
  font-variation-settings: "opsz" 96, "wdth" 82;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

cite {
  font-style: normal;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.col {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin-inline: auto;
}

.col--wide {
  width: min(100% - 2 * var(--gutter), 68rem);
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 30;
  padding: var(--s-2) var(--s-4);
  background: var(--ink);
  color: var(--bone);
  border-radius: var(--radius);
}

.skip:focus {
  top: var(--s-4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- shared pieces ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--s-5);
  border: 0;
  border-radius: var(--radius);
  background: var(--cabinet);
  color: var(--bone);
  font: 600 var(--t-sm) / 1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background: var(--cabinet-deep);
}

.btn--light {
  background: var(--bone);
  color: var(--ink);
}

.btn--light:hover {
  background: #fff;
}

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

.tbd {
  display: inline-block;
  padding: 0 var(--s-2);
  border-radius: var(--radius);
  background: #f4d56a;
  color: var(--ink);
  font-size: var(--t-xs);
  font-weight: 600;
  line-height: 1.7;
}

.head {
  margin-bottom: var(--s-7);
}

.head h2 {
  font-size: var(--t-4);
}

.head p {
  margin-top: var(--s-4);
  font-size: var(--t-1);
  line-height: 1.45;
  color: var(--ink-soft);
}

.price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

.status[data-status="available"]::before {
  background: #2e7a52;
  opacity: 1;
}

.status[data-status="reserved"]::before {
  background: #c58a16;
  opacity: 1;
}

.status[data-status="sold"]::before {
  background: var(--cabinet);
  opacity: 1;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.facts--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.facts dt {
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.facts dd {
  margin-top: var(--s-1);
}

/* ---------- top bar ---------- */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  padding: var(--s-5) var(--gutter);
}

.top__name {
  font-size: var(--t-1);
  font-weight: 650;
  font-variation-settings: "opsz" 96, "wdth" 82;
  text-decoration: none;
}

.top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  font-weight: 500;
}

.top__nav a {
  text-decoration: none;
}

.top__nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- the studio ---------- */

.studio {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--wall);
}

.studio__stage {
  position: absolute;
  inset: 0;
  outline: none;
}

.studio__gl {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.studio--ready .studio__gl {
  opacity: 1;
}

.studio--overview .studio__gl {
  cursor: pointer;
}

.studio--focus .studio__gl {
  cursor: grab;
}

/* the flat version: the canvases standing on a strip of floor, true relative size */
.still {
  --cm: min(0.34svh, 0.3vw);
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: calc(30 * var(--cm));
  padding: 0 var(--gutter) 13svh;
  list-style: none;
  background: linear-gradient(to top, var(--concrete) 13svh, transparent 13svh);
}

.still__work img {
  width: auto;
  height: calc(var(--h) * var(--cm));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 18px 28px -14px rgb(0 0 0 / 0.4);
}

.studio--3d .still {
  display: none;
}

.studio__hello {
  position: absolute;
  z-index: 2;
  top: clamp(96px, 15svh, 168px);
  left: var(--gutter);
  right: var(--gutter);
  max-width: 64rem;
  transition: opacity 0.45s ease, visibility 0.45s;
}

.studio__hello h1 {
  font-size: var(--t-5);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.studio__lede {
  max-width: 34ch;
  margin-top: var(--s-5);
  font-size: var(--t-1);
  line-height: 1.4;
}

.studio__go {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-5);
}

.studio--focus .studio__hello {
  opacity: 0;
  visibility: hidden;
}

.studio__back {
  position: absolute;
  z-index: 3;
  top: 76px;
  left: var(--gutter);
  min-height: var(--tap);
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(233 230 225 / 0.8);
  color: var(--ink);
  font: 500 var(--t-sm) / 1 var(--font);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.studio--focus .studio__back {
  opacity: 1;
  visibility: visible;
}

/* the label of the painting in front of you: centred under it, as one unit with it */
.studio__label {
  position: absolute;
  z-index: 3;
  top: var(--label-y, 70%);
  left: var(--label-x, 50%);
  width: max-content;
  max-width: min(100% - 2 * var(--gutter), 30rem);
  padding: var(--s-3) var(--s-5) var(--s-4);
  border-radius: var(--radius);
  background: rgb(244 242 238 / 0.94);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 10px 24px -12px rgb(0 0 0 / 0.3);
  transform: translateX(-50%);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.studio--settled.studio--focus .studio__label {
  opacity: 1;
  visibility: visible;
}

.studio__nav {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.studio__step {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 400 1.5rem / 1 var(--font);
  cursor: pointer;
}

.studio__step:hover {
  background: rgb(255 255 255 / 0.5);
}

.studio__title {
  margin-top: var(--s-2);
  font-size: var(--t-2);
  font-weight: 650;
  font-variation-settings: "opsz" 96, "wdth" 82;
  line-height: 1.1;
}

.studio__meta {
  margin-top: var(--s-1);
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.studio__sale {
  display: flex;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-1);
  font-size: var(--t-sm);
}

.studio__acts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-4);
}

/* ---------- price list ---------- */

.list {
  padding: var(--s-10) 0;
  background: var(--paper);
}

.pricelist {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 6rem 8.5rem 3.5rem;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}

.row__thumb {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  cursor: zoom-in;
}

.row__thumb img {
  width: auto;
  max-width: 96px;
  max-height: 96px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 8px 14px -8px rgb(0 0 0 / 0.35);
}

.row__title {
  font-size: var(--t-1);
  font-weight: 600;
  line-height: 1.25;
}

.row__meta {
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.row__price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.row__status {
  font-size: var(--t-sm);
}

.row__act {
  text-align: right;
  font-size: var(--t-sm);
}

/* ---------- portraits ---------- */

.portraits {
  padding: var(--s-10) 0;
  background: var(--umber);
  color: var(--bone);
}

.portraits .head p,
.portraits .facts dt {
  color: var(--bone-soft);
}

.portraits .facts {
  border-top-color: var(--bone-line);
}

.band {
  margin-bottom: var(--s-7);
}

.band img {
  width: 100%;
  height: min(70svh, 52vw);
  object-fit: cover;
  object-position: 50% 21%;
}

.band figcaption {
  width: min(100% - 2 * var(--gutter), 44rem);
  margin: var(--s-3) auto 0;
  font-size: var(--t-sm);
  color: var(--bone-soft);
}

.portraits .col > p {
  margin-top: var(--s-4);
}

.portraits .btn {
  margin-top: var(--s-6);
}

/* ---------- about ---------- */

.about {
  padding: var(--s-10) 0;
  background: var(--wall);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-8);
  align-items: start;
}

/* the words come first in the page (and on a phone); on a wide screen the photo sits to the left */
.about__photo {
  grid-column: 1;
  grid-row: 1;
}

.about__text {
  grid-column: 2;
  grid-row: 1;
}

.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
}

.about__text p + p {
  margin-top: var(--s-4);
}

/* ---------- contact ---------- */

.contact {
  padding: var(--s-10) 0 var(--s-9);
  background: var(--cabinet);
  color: var(--bone);
}

.contact .head p,
.contact .facts dt,
.form__note {
  color: var(--bone-soft);
}

.contact .facts {
  border-top-color: var(--bone-line);
}

.contact__ig {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.contact__ig a {
  font-size: var(--t-3);
  font-weight: 650;
  font-variation-settings: "opsz" 96, "wdth" 82;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.contact__ig span {
  color: var(--bone-soft);
}

.form {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-7);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
}

.form label {
  display: grid;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: 500;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: var(--tap);
  padding: var(--s-3) var(--s-4);
  border: 0;
  border-radius: var(--radius);
  background: var(--bone);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-0);
}

.form textarea {
  resize: vertical;
}

.form :focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 2px;
}

.form__send {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
}

.form__note {
  font-size: var(--t-sm);
}

.form__note.is-alert {
  color: var(--bone);
  font-weight: 600;
}

/* ---------- footer ---------- */

.foot {
  background: var(--cabinet);
  color: var(--bone);
  font-size: var(--t-sm);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-6);
  padding: var(--s-5) 0 var(--s-6);
  border-top: 1px solid var(--bone-line);
}

.foot__links {
  display: flex;
  gap: var(--s-5);
}

/* ---------- viewer ---------- */

.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #171514;
  color: var(--bone);
}

.viewer[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
}

.viewer::backdrop {
  background: rgb(0 0 0 / 0.6);
}

.viewer__stage {
  display: grid;
  place-items: center;
  overflow: auto;
  padding: var(--s-6);
}

.viewer__stage img {
  width: auto;
  max-height: calc(100dvh - 2 * var(--s-6));
  cursor: zoom-in;
}

.viewer__stage.is-full {
  place-items: start;
  padding: 0;
}

.viewer__stage.is-full img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.viewer__info {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-6);
  overflow-y: auto;
  border-left: 1px solid var(--bone-line);
}

.viewer__close {
  align-self: flex-end;
  min-height: var(--tap);
  padding: 0 var(--s-4);
  border: 1px solid rgb(242 237 229 / 0.4);
  border-radius: var(--radius);
  background: transparent;
  color: var(--bone);
  font: 500 var(--t-sm) / 1 var(--font);
  cursor: pointer;
}

.viewer__title {
  margin-top: var(--s-4);
  font-size: var(--t-3);
}

.viewer__meta {
  font-size: var(--t-sm);
  color: var(--bone-soft);
}

.viewer__sale {
  display: flex;
  gap: var(--s-3);
  font-size: var(--t-sm);
}

.viewer__zoom {
  align-self: flex-start;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: var(--bone);
  font: 500 var(--t-sm) / 1.3 var(--font);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.viewer .btn {
  align-self: flex-start;
  margin-top: var(--s-2);
}

.scale {
  margin-top: var(--s-4);
}

.scale svg {
  width: 100%;
  height: auto;
}

.scale .floor,
.scale .sofa {
  fill: none;
  stroke: rgb(242 237 229 / 0.55);
  stroke-width: 0.8;
}

.scale .shadow {
  fill: rgb(0 0 0 / 0.5);
}

.scale figcaption {
  margin-top: var(--s-2);
  font-size: var(--t-xs);
  color: var(--bone-soft);
}

/* ---------- smaller screens ---------- */

@media (max-width: 899px) {
  .top {
    flex-wrap: nowrap;
    gap: var(--s-3);
    padding-block: var(--s-4);
  }

  .top__name {
    font-size: var(--t-0);
  }

  .top__nav {
    flex-wrap: nowrap;
    gap: var(--s-3);
    font-size: 0.875rem;
  }

  .studio__lede {
    font-size: var(--t-0);
  }

  .studio__back {
    top: 64px;
  }

  .row {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name name"
      "thumb price act"
      "thumb status act";
    gap: var(--s-1) var(--s-4);
  }

  .row__thumb {
    grid-area: thumb;
    width: 72px;
    height: 72px;
  }

  .row__thumb img {
    max-width: 72px;
    max-height: 72px;
  }

  .row__name {
    grid-area: name;
  }

  .row__price {
    grid-area: price;
    text-align: left;
  }

  .row__status {
    grid-area: status;
  }

  .row__act {
    grid-area: act;
  }

  .about__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-7);
  }

  .about__photo,
  .about__text {
    grid-column: 1;
    grid-row: auto;
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
  }

  .facts > div {
    display: flex;
    justify-content: space-between;
    gap: var(--s-4);
  }

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

  .viewer[open] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 62dvh auto;
    overflow-y: auto;
  }

  .viewer__stage {
    padding: var(--s-4);
  }

  .viewer__stage img {
    max-height: calc(62dvh - 2 * var(--s-4));
  }

  .viewer__info {
    border-left: 0;
    border-top: 1px solid var(--bone-line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .studio__gl,
  .studio__hello,
  .studio__back,
  .studio__label,
  .btn {
    transition: none;
  }
}
