:root {
  --gallery-bg: #f8f7f4;
  --gallery-text: #292823;
  --gallery-muted: #77736b;
  --gallery-accent: #8a6b50;
}

@font-face {
  font-family: "Melted Ideas";
  src: url("../fonts/melted-ideas.otf") format("opentype");
  font-style: normal;
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabin Regular";
  src: url("../fonts/Cabin-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bebas Neue";
  src: url("../fonts/bebas-neue.otf") format("truetype");
  font-style: normal;
  font-weight: bold;
  font-display: swap;
}

.pswp {
  --pswp-bg: rgba(0, 0, 0, 0.45);
}

body:has(.pswp--open) > :not(.pswp) {
  filter: blur(12px);
}

body {
  background: var(--gallery-bg);
  font-family: "Cabin Regular", cursive;
  color: var(--gallery-text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  align-items: center;
  margin-bottom: 0;
  header {
    margin-bottom: 0;
  }
}

h1, h2, h3 {
  color: var(--gallery-text);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.035em;
}

hgroup h1 {
  font-weight: 400;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.1;
}

a {
  color: inherit;
  text-underline-offset: 4px;
  transition: color 180ms ease;
}

a:hover {
  color: var(--gallery-accent);
}

img {
  border-radius: 2px;
}

main {
  width: 100%;
  max-width: 1440px;
  margin-right: auto;
  margin-left: auto;
}

header, nav, footer {
  letter-spacing: 0.035em;
}

body > header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 1rem;
  padding: 1rem 1.5rem;
}

.site-brand {
  font-family: "Melted Ideas", cursive;
  font-size: 6rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  color: #62b6a2;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.3rem;
  font-family: "Bebas Neue", cursive;
  font-size: 1.25rem;
  color: #3f7a83;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

@media (max-width: 1050px) {
  body > header.site-header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
  }

  .site-brand {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .site-nav {
    width: 100%;
    justify-content: center;
    gap: 0.25rem clamp(0.75rem, 3vw, 1.25rem);
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  body > header.site-header {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .site-brand {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
  }

  .site-nav {
    column-gap: 0.55rem;
    font-size: clamp(1.05rem, 4.5vw, 1.15rem);
  }

  main h1,
  main .home-feature__about h1 {
    font-size: clamp(2.25rem, 9.5vw, 2.75rem);
  }
}

footer {
  color: var(--gallery-muted);
  font-size: 0.85rem;
}

body > footer section.social-icons {
  margin-top: 1rem;
}

body > footer section:last-of-type {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

::selection {
  background: #ded3c5;
  color: #292823;
}

.gallery img,
.gallery a,
a img {
  cursor: pointer !important;
}

section.gallery {
  position: relative;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

.gallery-item {
  display: block;
  overflow: hidden;
}

.gallery-item figure {
  margin: 0;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

section.gallery--sales {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  padding: 0 1.5rem;
}

.gallery--sales .gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: visible;
  aspect-ratio: auto !important;
  text-decoration: none;
}

.gallery--sales .gallery-item figure {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 !important;
  overflow: hidden;
}

.gallery--sales .gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.painting-title {
  color: var(--gallery-text);
  font-family: "Cabin Regular", cursive;
  font-size: 1.3rem;
  line-height: 1.4;
  text-align: center;
}

@media (min-width: 640px) {
  section.gallery--sales {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  section.gallery--sales {
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  }
}

.painting-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 0.8fr);
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto 3rem;
  align-items: start;
}

.painting-detail figure {
  margin: 0;
}

.painting-detail img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.painting-details {
  padding-top: 0.5rem;
}

.painting-detail-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.home-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem) 1.5rem 5rem;
}

.home-feature__artwork {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .home-feature__artwork {
    transform: translateY(3rem);
  }
}

.home-feature__artwork img {
  display: block;
  width: 100%;
  object-fit: contain;
}

.home-feature__artwork figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.75rem;
  color: var(--gallery-muted);
  font-size: 0.9rem;
}

.home-feature__artwork figcaption a {
  color: var(--gallery-text);
  font-weight: 600;
  text-decoration: none;
}

.home-feature__about {
  max-width: 44rem;
}

.home-feature__about h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.home-feature__summary {
  margin: 0 0 1.5rem;
  color: var(--gallery-muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.home-feature__bio {
  font-size: 1.05rem;
}

.home-feature__bio > :first-child {
  margin-top: 0;
}

.home-feature__bio > :last-child {
  margin-bottom: 0;
}

.commission-description {
  margin: 3rem auto;
}

.painting-price {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
}

.painting-price span {
  margin-right: 0.5rem;
  color: var(--gallery-muted);
  font-size: 0.875rem;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .painting-detail {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .home-feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .home-feature__artwork {
    max-width: 480px;
  }
}

@media (min-width: 640px) {
  .painting-detail {
    margin-bottom: 4rem;
  }
}

.commission-page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.commission-hero {
  padding: clamp(3.5rem, 2vw, 8rem) 0 4rem;
  border-bottom: 1px solid var(--gallery-muted);
  text-align: center;
}

.commission-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gallery-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.commission-hero__title {
  max-width: 24ch;
  margin: 0 auto 1rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
}

.commission-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--gallery-text);
  border-radius: 999px;
  background: var(--gallery-text);
  color: var(--gallery-bg);
  font-weight: 600;
  text-decoration: none;
}

.commission-button:hover {
  background: transparent;
  color: var(--gallery-text);
}

.commission-work {
  padding: 4.5rem 0;
}

.commission-work__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.commission-work__heading h2,
.commission-contact h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.commission-carousel__controls {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.commission-carousel__button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--gallery-muted);
  border-radius: 50%;
  background: transparent;
  color: var(--gallery-text);
  font-size: 1.25rem;
  cursor: pointer;
}

.commission-carousel__button:hover:not(:disabled) {
  background: var(--gallery-text);
  color: var(--gallery-bg);
}

.commission-carousel__button:disabled {
  opacity: 0.4;
  cursor: default;
}

.commission-carousel__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--gallery-muted) transparent;
  scrollbar-width: thin;
}

.commission-carousel__track {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 0.75rem;
}

.commission-card {
  flex: 0 0 min(82%, 36rem);
  overflow: hidden;
  border: 1px solid rgb(41 40 35 / 12%);
  border-radius: 0.25rem;
  background: #fff;
  scroll-snap-align: start;
}

.commission-card__image {
  display: flex;
  height: clamp(24rem, 48vw, 38rem);
  margin: 0;
  align-items: center;
  justify-content: center;
  background: #eeece7;
}

.commission-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

section.social-icons a[href*="instagram.com"] svg,
section.social-icons a[href^="mailto:"] svg {
  width: 36px;
  height: 36px;
}

.commission-contact {
  padding: clamp(2rem, 6vw, 4rem);
  border-radius: 0.25rem;
  background: #eeece7;
  text-align: center;
}

.commission-contact > p:not(.commission-eyebrow) {
  max-width: 55ch;
  margin: 1rem auto;
}

.commission-contact__email {
  display: inline-block;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
}

@media (max-width: 600px) {
  .commission-page {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .commission-work__heading {
    align-items: start;
  }

  .commission-card {
    flex-basis: 88%;
  }

  .commission-card__image {
    height: clamp(22rem, 100vw, 32rem);
  }
}