/* ============================================================================
   CSS VARIABLES & ROOT STYLES
   ============================================================================ */

:root {
  --white: #fff;
  --black: #000;
  --default-gray: 88, 88, 88;
  --accent: 79, 196, 122;
  --error: #721c24;
  --spacing-top: 0;
  --grid-base-min: 160px;
  --grid-base-max: 500px;

  /* Fluid Font Sizes */
  --font-size-xs: clamp(0.8rem, 2vw, 0.9rem);
  --font-size-sm: clamp(0.9rem, 2.5vw, 1rem);
  --font-size-base: clamp(1rem, 2.5vw, 1.1rem);
  --font-size-lg: clamp(1.2rem, 3vw, 1.3rem);
  --font-size-xl: clamp(1.5rem, 4vw, 2rem);
  --font-size-2xl: clamp(2rem, 6vw, 2.6rem);
  --font-size-3xl: clamp(2.5rem, 8vw, 3.5rem);

  --animation-duration: 0.8s;
  --animation-duration-short: 0.5s;
}

@media screen and (min-width: 798px) {
  :root {
    --spacing-top: 4.5rem;
  }
}


/* ============================================================================
   ANIMATIONS & TRANSITIONS
   ============================================================================ */

@media not (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: auto;
  }
}


/* ============================================================================
   BASE & RESET STYLES
   ============================================================================ */

html {
  box-sizing: border-box;
  font-family: sans-serif;
  font-size: 16px;
}

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

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  margin-inline: 2rem;
}


/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
  font-weight: 300;
  font-size: var(--font-size-base);
  color: var(--default-gray);
  text-wrap: balance;
  text-align: left;
  padding: 0;
}

p {
  text-wrap: pretty;
  margin-block: 0.35em;
  line-height: 1.3em;
  max-width: 60ch;
  display: block;
}

a {
  font-weight: 300;
  font-size: var(--font-size-base);
  color: var(--default-gray);
}
a:focus {
  outline: none;
  border-bottom: 2px solid rgb(var(--accent));
  margin-bottom: -2px;
}

address {
  line-height: unset;
}

h1 {
  margin: auto;
  margin-block-end: 1em;
  max-width: 60ch;
  font-size: var(--font-size-xl);
}

h1 a {
  text-decoration: none;
  border-bottom: 3px solid var(--black);
  transition: border 0.3s ease-in-out;
}

h1 a:hover {
  border-bottom: 3px solid var(--white);
  cursor: pointer;
}

h2 {
  margin-block: 0.5em;
  font-size: var(--font-size-xl);
}

h3 {
  line-height: 1.3em;
  font-size: var(--font-size-lg);
}

h3 a {
  text-decoration: none;
  color: unset;
}

h3 a:hover {
  text-decoration: underline;
}

h4 {
  margin-block-start: 0;
  margin-block-end: 0;
  font-size: var(--font-size-base);
}

br {
  margin-block-end: 1em;
}

ul {
  margin-block: 1em;
  margin: 0;
  padding-inline-start: 1em;
}

hr {
  display: none;
}

/* Definition list styling for specifications */
dl {
  margin: 0;
  padding: 0;
}

dt {
  display: inline;
  font-weight: 700;
  color: var(--black);
}

dt::after {
  content: ": ";
}

dd {
  display: inline;
  margin: 0;
  color: var(--default-gray);
}

dd::after {
  content: "";
  display: block;
  margin-block-end: 0.35em;
}


/* ============================================================================
   LAYOUT CONTAINERS
   ============================================================================ */

main {
  color: var(--default-gray);
  /* margin-top:var(--spacing-top); */
  /* margin-block: 2rem; */
  margin-block-end: 4rem;
}

section {
  margin-block: 1rem;
}

.container {
  max-width: 2000px;
  margin-inline: auto;
  padding: 0rem 1rem 1rem;

  @media screen and (min-width: 798px) {
    padding: 0rem 1.5rem 1rem;
  }
}

figure {
  margin: 0;
  padding: 0;
}


/* ============================================================================
   HEADER
   ============================================================================ */

header {
  display: grid;
  grid-template-columns: 2ch 1fr 2ch;
  /* grid-template-columns: 1fr 1fr 1fr; */
  grid-template-areas: "logo nav contact";
  font-weight: 700;
  align-items: flex-start;
  border-bottom: 1px solid var(--default-gray);
  padding-block: 1rem;
}

header .logo {
  /* grid-area: nav; */
  /* justify-self: center; */
  width: 180px;
  justify-self: flex-start;
  grid-area: logo;
}

header address {
  grid-area: contact;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;

  /* @media screen and (max-width: 798px) {
    display: none;
  } */
}

header a {
  color: var(--black);
  text-decoration: none;
}

header .social-link,
header .contact-trigger {
  display: inline-flex;
  align-items: center;
  color: var(--default-gray);
  background: rgba(var(--default-gray), 0);
  transition: all var(--animation-duration) ease;
  /* border-radius: 5px; */
}

header .social-link:hover,
header .contact-trigger:hover {
  color: var(--accent);
/* background: rgba(var(--default-gray), 0.2); */
}

header .social-link svg,
header .contact-trigger svg {
  display: block;
}

.top-header {
  display: none;
}

@media screen and (min-width: 798px) {
  .top-header {
    display: block;
  }
}

.desktop-nav,
.desktop-address {
  display: none;
}

.desktop-nav a {
  text-align: left;
}

.nav-item.active {
  border-bottom: 3px solid var(--black);
}

@media screen and (min-width: 798px) {
  .desktop-nav {
    display: flex;
  }

  .desktop-address {
    display: flex;
  }

  .top-header {
    position: sticky;
    inset: 0 0 auto 0;
    display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  }
}


/* ============================================================================
   NAVIGATION
   ============================================================================ */

nav {
  a {
    text-decoration: none;
  }
}

nav[aria-labelledby="primary-navigation"] {
  grid-area: nav;
  margin-inline-start: 1rem;

  ul {
    list-style: none;
    margin-block: unset;
  }

  li {
    margin-block: unset;
  }

  @media screen and (max-width: 798px) {
    display: none;
  }
}

nav[aria-labelledby="breadcrumb"] {
  ul {
    list-style: none;
    display: flex;
    gap: 1em;
    padding: 0;
  }

  li a {
    margin: 0;
  }

  li:not(:last-child):after {
    content: ">";
    margin-inline-start: 0.5em;
  }
}


/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
  /* position: fixed; */
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--white);
  z-index: 100;
}

footer a {
  transition: text-decoration-color 300ms;
  text-decoration: underline 0.05em rgba(0, 0, 0, 1);
  &:hover {
    text-decoration-color: rgba(0, 0, 0, 0);
  }
}

footer nav a {
  color: var(--black);
  width: 100%;
  text-transform: uppercase;
  padding: 1em;
  text-decoration: none;
  text-align: center;
  border-top: 3px solid var(--white);
  transition: border 0.3s ease-in-out;
}

footer .contact {
  text-align: center;
}


/* ============================================================================
   CONTACT
   ============================================================================ */

.contact {
  margin-inline: auto;
  margin-block-start: 1rem;
  text-align: center;
}

@media screen and (min-width: 798px) {
  .contact {
    margin-block-start: 0;
  }
}


/* ============================================================================
   GRID & GALLERY LAYOUTS
   ============================================================================ */

/* Index menu */
.menu {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--grid-base-min), var(--grid-base-max))
  );
  gap: 1rem;
  margin: auto;
  justify-content: center;
}

.item img {
  width: 100%;
  transition: transform var(--animation-duration-short) ease-in-out;
}

.img-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  /* padding-bottom: 141.43222506%;  */
  display: flex;
  /* align-items: center; */
  picture {
    position: relative; /* Changed from absolute */
    display: block;
    width: 100%;
  }
}

/* .img-wrapper:hover{
    cursor: pointer;
  } */
/* @media screen and (max-width: 768px) {
  .img-wrapper:hover {
    cursor: none;
  }
} */

.figure {
  position: relative;
}


/* ============================================================================
   COLLECTIONS
   ============================================================================ */

.collections {
  display: grid;
  gap: 1rem;
  container-type: inline-size;
  container-name: collections;

  @media screen and (min-width: 768px) {
    /* grid-template-columns: 2fr 1fr; */
  }

  /* @media screen and (min-width:1480px) {
    grid-template-columns: 2fr 1fr;
  } */
}

.collection {
  display: grid;
  gap: 1rem;

  /* @media screen and (min-width:768px) {
    grid-template-columns: 2fr 1fr;
  } */

  /* @media screen and (min-width:1480px) {
    grid-template-columns: 2fr 1fr;
  } */
}

/* Collection Introduction */
.collection-intro {
  margin-bottom: 3rem;
  text-align: center;
  max-width: 800px;
  /* margin-left: auto; */
  margin-right: auto;
}

.collection-description {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--black);
  margin: 0;
}

#collection-description {
  max-width: 60ch;
}


/* ============================================================================
   SERIES & MASONRY GALLERY
   ============================================================================ */

.series {
  display: block;
  padding: 0 1rem;
  /* max-width: 1400px; */
  margin: 0 auto;

  .img-wrapper:hover {
    cursor: pointer;
  }
}

/* Masonry Gallery Layout */
.masonry-gallery {
  column-gap: 2rem;
  margin: 0;
}

@container collections (min-width: 900px) {
  .masonry-gallery {
    column-count: 2;
    column-gap: 3rem;
  }
}

@container collections (min-width: 1200px) {
  .masonry-gallery {
    column-count: 3;
    column-gap: 3rem;
  }
}

/* Masonry Items */
.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  display: inline-block;
  width: 100%;
}


/* ============================================================================
   ARTWORK CARDS
   ============================================================================ */

.artwork-card {
  background: white;
  border-radius: 0;
  overflow: hidden;
  transition:
    transform var(--animation-duration) ease,
    box-shadow var(--animation-duration) ease;
}

.artwork-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.artwork-card picture,
.artwork-card img {
  width: 100%;
  height: auto;
  display: block;
}

.artwork-card a {
  display: block;
  text-decoration: none;
}

.artwork-card
  h4{
    text-transform: uppercase;
  }

/* Card Details */
.card-details {
  padding: 1rem 0.5rem;
}

/* .masonry-gallery h2.artwork-title,
.masonry-gallery .artwork-title,
.artwork-card h2.artwork-title,
.artwork-card .artwork-title,
.card-details h2.artwork-title,
.card-details .artwork-title,
.series .masonry-gallery h2 {
  font-size: var(--font-size-base);
  font-weight: 400;
  margin: 0 0 0.1em 0;
  color: var(--black);
  line-height: 1.3;
} */

.artwork-specs {
  margin-bottom: 1rem;
}

.spec {
  margin: 0 0 0.1em 0;
  color: var(--blue);
  font-size: var(--font-size-sm);
  line-height: 1.3;
}

.spec:last-child {
  margin-bottom: 0;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-xs);
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.status-sold {
  background-color: #fee2e2;
  color: #dc2626;
}

.status-available {
  background-color: #d1fae5;
  color: #059669;
}

.status-marker {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 10px;
  position: absolute;
  top: 15px;
  right: 15px;
}

.sold {
  background-color: red;
}


/* ============================================================================
   ARTWORK CONTAINER & GALLERY
   ============================================================================ */

.artwork-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--grid-base-min), var(--grid-base-max))
  );
  column-gap: 1.5rem;
  row-gap: 5rem;
  justify-content: center;

  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(4, 1fr);
    order: 0;
  }
}

.gallery {
  display: grid;
  /* grid-template-columns: repeat(auto-fit, minmax(var(--grid-base-min), var(--grid-base-max))); */
  column-gap: 1.5rem;
  row-gap: 5rem;
  justify-content: center;

  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(4, 1fr);
    order: 0;
  }
}

.works {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

.gallery-column:has([data-paper-size*="1400"])
{
grid-column: 1/-1;
}


.content-grid:has([data-paper-size*="1400"]){
  grid-template-columns: 1fr 1fr;
}

/* .details {
  @media screen and (min-width:768px) {
    order: 1;
  }
} */


/* ============================================================================
   ITEM WRAPPER & DETAILS
   ============================================================================ */

.item-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-block-end:1.5rem;
  break-inside:avoid;

  img {
    width: 100%;
    height: auto;

    .collection-details {
      margin-block: 1rem;

      @media screen and (min-width: 768px) {
        margin-block: 0;
      }

      ul {
        padding: 0;
        text-align: left;
      }
    }

    .picture-details {
      margin-block: 1rem;

      ul {
        padding: 0;
        text-align: left;
      }
    }
  }
}

[data-modal="true"] img:hover {
  cursor: pointer;
}

/* .details:hover {
  cursor: pointer;
} */

.details-content {
  position: absolute;
  bottom: 0.2em;
  background-color: rgba(200, 200, 200, 1);
  padding: 1em 0;
  opacity: 0;
  width: 100%;
  transition: opacity 0.3s ease-in-out;
}

.details-content p {
  margin-inline: 1em;
}

/* on hover show the proceeding siblin div */
.details-content.show {
  opacity: 0.9;
}

.details-header::after {
  content: "...";
  opacity: 1;
  transition: opacity var(--animation-duration-short) ease-in-out;
}

.details-header:hover::after {
  content: "";
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.picture-details {
  margin-inline: 1rem;
}


/* ============================================================================
   EXHIBIT
   ============================================================================ */

.exhibit-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid black;
  padding: 1rem;
}

@media screen and (min-width: 632px) {
  .exhibit-wrapper {
    flex-direction: row;
  }
}

.exhibit-details {
  max-width: 50ch;
  flex: 1;
}

.exhibit-wrapper img {
  width: 100%;
}

.exhibit-wrapper figcaption {
  text-align: right;
}


/* ============================================================================
   TITLE STYLES
   ============================================================================ */

.title {
  margin-block: 0em;
}

.differance-drawings .title{
  text-transform:uppercase;
}


/* ============================================================================
   SELF PORTRAITS
   ============================================================================ */

/* .self-portrait-by .img-wrapper {
  padding: 16px;
} */

.self-portraits h3 {
  text-align: center;
}

.self-portrait-in-words-by img {
  max-width: 300px;
  border: 1px solid grey;
}

.self-portrait-in-words-by .img-wrapper {
  display: flex;
  justify-content: center;
}


/* ============================================================================
   LIGHTBOX
   ============================================================================ */

#lightbox {
  position: absolute;
  inset: 0;
  background-color: rgba(200, 200, 200, 1);
  z-index: 100;
  display: none;
  overflow: hidden;
}

#lightbox img {
  display: block;
  margin: auto;
}

.lightbox-close {
  font-size: var(--font-size-xl);
  position: absolute;
  margin: 10px;
}

#lightbox.landscape img {
  height: auto;
  width: 90%;
}

#lightbox.portrait img {
  height: 90%;
  width: auto;
}


/* ============================================================================
   DIALOG ELEMENTS
   ============================================================================ */

dialog {
  position: relative;
  border: none;
  overflow: hidden;
  padding: 0;
  margin: auto;
  width: 100%;
  height: 100%;
  padding: 2rem;
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog::backdrop {
  background-color: rgba(90, 90, 90, 0.649);
}


/* ============================================================================
   IMAGE MODAL
   ============================================================================ */

/* Gallery Modal */
/* Modal Overlay */
.image-modal {
  /* position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0; */
  /* visibility: hidden; */
  /* transition: opacity 0.3s ease, visibility 0.3s ease; */
}

/* .image-modal.visible {
  opacity: 1;
  visibility: visible;
} */

.modal-content {
  position: relative;
  /* max-width: 85%;
  max-height: fit-content; */
  background: white;
  text-align: center;
  margin: auto;
  /* margin-inline: 2rem; */
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
}

/* Close Button */
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: var(--font-size-xl);
  background: none;
  border: none;
  z-index: 1001;
  color: var(--default-gray);
  transition: color var(--animation-duration) ease;
}

.close:focus {
  outline: none;
  color: var(--black);
}

.close:focus-visible {
  outline: none;
}

/* Navigation Arrows */
.nav-arrows {
  position: absolute;
  bottom: 50%;
  padding-inline: 1rem;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  z-index: 1001;

}

.nav-arrow {
  position: relative;
  background-color: rgba(88, 88, 88, 0.2);
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  width: 2.5rem;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  font-size: var(--font-size-xl);
  transition: background-color var(--animation-duration-short) ease;

  &:hover {
    background-color: rgba(88, 88, 88, 0.8);
  }
}

/* .left-arrow {
  left: 1rem;
}
.right-arrow {
  right: 1rem;
} */


/* ============================================================================
   INDIVIDUAL ARTWORK PAGES
   ============================================================================ */

.individual-artwork {
  margin-inline: 0;
  margin-block-end: 0;
}

/* Navigation between artworks */
.artwork-navigation {
  padding: 1rem 0;
  /* padding: 1rem 2rem; */
  margin-block-end: 2rem;
  border-bottom: 1px solid rgba(88, 88, 88, 0.2);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* max-width: 1200px; */
  margin: 0 auto;
}

.nav-prev,
.nav-next {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--default-gray);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color var(--animation-duration) ease;
}

.nav-prev:hover,
.nav-next:hover {
  background-color: rgba(var(--default-gray), 0.2);
}

.nav-arrow {
  font-size: var(--font-size-lg);
  font-weight: 400;
}

.nav-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-next .nav-text {
  align-items: flex-end;
}

.nav-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.nav-title {
  font-size: var(--font-size-sm);
  font-weight: 400;
}

/* Full-width hero image */
.hero-image {
  width: 100%;
  /* margin-left: calc(50% - 50vw);
  margin-block-end: 3rem; */
}

.hero-picture {
  display: block;
  width: 100%;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 70vh;
  object-fit: contain;
  object-position: center;
}

/* Two-column content grid */
.content-grid {
  display: grid;
  /* grid-template-columns: minmax(min(300px, 100%) 0.5fr; */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 0.5fr));
  gap: 3rem;
  /* max-width: 1200px; */
  margin: 0 auto;
  /* padding: 0 2rem; */
}

/* Gallery column */

.gallery-title {
  font-size: var(--font-size-base);
  font-weight: 400;
  margin-block-end: 1rem;
  color: var(--black);
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

@media screen and (min-width: 1024px) {
  .thumbnail-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.thumbnail-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--animation-duration) ease;
}

.thumbnail-item:hover .thumbnail-img {
  transform: scale(1.05);
}

/* Details column */
.details-column {
  order: 1;
}

@media screen and (min-width: 1024px) {
  .details-column {
    order: 2;
  }
}

.artwork-info > * + * {
  margin-block-start: 2rem;
}

.artwork-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media screen and (min-width: 768px) {
  .artwork-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
  }
}

.artwork-title {
  font-weight: 400;
  color: var(--black);
  margin: 0;
}

/* @media screen and (min-width: 768px) {
  .artwork-title {
    font-size: var(--font-size-2xl);
  }
} */

.artwork-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-sold {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.status-available {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.section-title {
  font-size: var(--font-size-lg);
  font-weight: 400;
  color: var(--black);
  margin-block-end: 0.75rem;
}

.description-text {
  max-width: 65ch;
  line-height: 1.6;
  color: var(--default-gray);
}

/* Specifications */
.spec-grid {
  display: grid;
  gap: 1rem;
}

.spec-item {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr;
  /* grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); */
  gap: 1rem;
  padding-block-end: 0.75rem;
  border-bottom: 1px solid rgba(88, 88, 88, 0.1);
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-weight: 500;
  color: var(--black);
  margin: 0;
}

.spec-value {
  color: var(--default-gray);
  margin: 0;
}

/* Action buttons */
.artwork-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-block-start: 2rem;
  /* border-top: 1px solid rgba(88, 88, 88, 0.1); */
}

@media screen and (min-width: 768px) {
  .artwork-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.enquire-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--black);
  color: var(--white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  transition:
    background-color var(--animation-duration) ease,
    transform 0.1s ease;
}

.enquire-button:hover {
  background-color: #333;
  color: var(--white);
}

.back-link {
  color: var(--default-gray);
  text-decoration: none;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--animation-duration) ease;
}

.back-link:hover {
  color: var(--black);
}

.gallery-column:empty {
  display: none;
}


/* ============================================================================
   SIGNUP FORM
   ============================================================================ */

.signup {
  h1 {
    text-align: center;
    font-size: var(--font-size-2xl);
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #222;
    margin-bottom: 2.5rem;
    margin-top: 0.5em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }
}

.signup-form {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr;
  gap: 2rem 2.5rem;
  max-width: 70ch;
  margin: 4rem auto 0 auto;
  padding: 3rem 1.5em 1.5rem 1.5rem;
  background: #f5f5f5;
  border-radius: 24px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;

  label {
    align-self: center;
    justify-self: end;
    font-weight: 600;
    color: #222;
    font-size: var(--font-size-lg);
    letter-spacing: 0.03em;
    margin-bottom: 0;
  }

  input[type="text"],
  input[type="email"] {
    width: 100%;
    padding: 1.1em 1.2em;
    border: 2px solid #bbb;
    border-radius: 10px;
    font-size: var(--font-size-lg);
    background: #fff;
    transition: border var(--animation-duration);
    font-family: inherit;

    &:focus {
      border-color: #222;
      outline: none;
      background: #f0f8ff;
    }
  }

  button[type="submit"] {
    grid-column: 1 / span 2;
    justify-self: stretch;
    padding: 1.1em 0;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: var(--font-size-lg);
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
    transition:
      background var(--animation-duration),
      transform 0.1s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    &:hover,
    &:focus {
      background: #444;
      transform: scale(1.03);
    }
  }

  .g-recaptcha {
    grid-column: 1 / span 2;
    justify-self: center;
    margin: 1.5rem 0;
  }
}


/* ============================================================================
   CSS-ONLY CAROUSEL
   ============================================================================ */

/* CSS-Only Carousel */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel input[type="radio"] {
  position: absolute;
  left: -9999px;
}

.slides {
  display: flex;
  transition: transform var(--animation-duration-short) ease-in-out;
}

.slide {
  width: 100%;
  flex-shrink: 0;
  img {
    width: 100%;
  }
}

.carousel-nav {
  display: none;
  justify-content: center;
  margin-top: 1rem;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  margin: 0 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.nav-dot:hover {
  background-color: #999;
}

#slide-1:checked ~ .slides {
  transform: translateX(0%);
}
#slide-1:checked ~ .carousel-nav label[for="slide-1"] {
  background-color: #333;
}

#slide-2:checked ~ .slides {
  transform: translateX(-100%);
}
#slide-2:checked ~ .carousel-nav label[for="slide-2"] {
  background-color: #333;
}

#slide-3:checked ~ .slides {
  transform: translateX(-200%);
}
#slide-3:checked ~ .carousel-nav label[for="slide-3"] {
  background-color: #333;
}

#slide-4:checked ~ .slides {
  transform: translateX(-300%);
}
#slide-4:checked ~ .carousel-nav label[for="slide-4"] {
  background-color: #333;
}

#slide-5:checked ~ .slides {
  transform: translateX(-400%);
}
#slide-5:checked ~ .carousel-nav label[for="slide-5"] {
  background-color: #333;
}

#slide-6:checked ~ .slides {
  transform: translateX(-500%);
}
#slide-6:checked ~ .carousel-nav label[for="slide-6"] {
  background-color: #333;
}

#slide-7:checked ~ .slides {
  transform: translateX(-600%);
}
#slide-7:checked ~ .carousel-nav label[for="slide-7"] {
  background-color: #333;
}

#slide-8:checked ~ .slides {
  transform: translateX(-700%);
}
#slide-8:checked ~ .carousel-nav label[for="slide-8"] {
  background-color: #333;
}

#slide-9:checked ~ .slides {
  transform: translateX(-800%);
}
#slide-9:checked ~ .carousel-nav label[for="slide-9"] {
  background-color: #333;
}

#slide-10:checked ~ .slides {
  transform: translateX(-900%);
}
#slide-10:checked ~ .carousel-nav label[for="slide-10"] {
  background-color: #333;
}


/* ============================================================================
   CONTACT FORM DIALOG STYLES
   ============================================================================ */

/* Honeypot fields - visually hidden */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Dialog - override defaults to match site style */
dialog#contact-dialog {
  max-width: 500px;
  width: 90vw;
  height: fit-content;
  max-height: 90vh;
  border: 1px solid var(--default-gray);
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--animation-duration-short) ease;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: fixed;
}

dialog#contact-dialog[open] {
  opacity: 1;
}

dialog#contact-dialog::backdrop {
  background-color: rgba(90, 90, 90, 0);
  transition: background-color var(--animation-duration) ease;
}


/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  dialog#contact-dialog,
  dialog#contact-dialog::backdrop {
    transition: none;
  }
}

/* Dialog title */
#contact-dialog #dialog-title {
  margin: 0 0 1.5rem 0;
  font-size: var(--font-size-xl);
  font-weight: 300;
  color: var(--default-gray);
}


/* Form layout */
#contact-form {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 300;
  font-size: var(--font-size-base);
  color: var(--default-gray);
}

/* Form inputs - match site style */
#contact-dialog input[type="text"],
#contact-dialog input[type="email"],
#contact-dialog textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: 0;
  font-size: 16px;
  font-family: inherit;
  font-weight: 300;
  color: var(--default-gray);
  background: var(--white);
  box-sizing: border-box;
  /* outline: 1px solid var(--default-gray);
  outline-offset: 1px; */
  border:1px solid rgb(var(--default-gray));
}

#contact-dialog input[type="text"]:focus,
#contact-dialog input[type="email"]:focus,
#contact-dialog textarea:focus {
  outline: 1px solid var(--black);
  outline-offset: 1px;
  border:1px solid rgb(var(--default-gray));
}

#contact-dialog textarea {
  resize: vertical;
  min-height: 100px;
}

#contact-dialog input[aria-invalid="true"],
#contact-dialog textarea[aria-invalid="true"] {
  /* outline: 1px solid var(--black);
  outline-offset: 1px; */
  border:1px solid rgb(var(--default-gray));
}

/* Submit button - match enquire-button style */
#contact-dialog .submit-button {
  background-color: var(--black);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  font-size: var(--font-size-base);
  font-weight: 300;
  cursor: pointer;
  min-height: 44px;
  width: 100%;
  margin-top: 0.5rem;
  transition: background-color var(--animation-duration) ease, transform 0.1s ease;
}

#contact-dialog .submit-button:hover {
  background-color: #333;
}


#contact-dialog .submit-button:focus {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

#contact-dialog .submit-button:disabled {
  /* background-color: var(--default-gray); */
  cursor: not-allowed;
  transform: none;
}

.cf-turnstile{
  tab-index: -1;
}

/* ============================================================================
   CONTACT FORM DIALOG STYLES
   Target: ~2KB uncompressed
   ============================================================================ */

/* Turnstile widget - hide completely (interaction-only mode is invisible anyway) */
#turnstile-container {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Remove Turnstile iframe from tab order */
#turnstile-container iframe {
  pointer-events: none;
  position: absolute;
  left: -9999px;
}

/* Close button */
.close-button {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  /* padding: 0.25rem 0.5rem; */
  /* min-width: 44px; */
  /* min-height: 44px; */
  color: #666;
  opacity: 1;
  transition: opacity var(--animation-duration-short) ease-in-out;
}

.close-button:hover {
  color: var(--black);
}

.close-button:focus {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}


/* Error styles */
.error {
  display: block;
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.25rem; /* Reserve space to prevent layout shift */
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #d32f2f;
}


/* Form fields container for cross-dissolve */
#form-fields-container {
  opacity: 1;
  transition: opacity var(--animation-duration-short) ease-in-out;
}

#form-fields-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Status messages - position absolute to overlay form */
.form-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--animation-duration-short) ease-in-out;
}

.form-status.fade-in {
  opacity: 1;
  pointer-events: auto;
}

.form-status.success {
  background-color: var(--white);
  color: var(--default-gray);
  border: 1px solid var(--default-gray);
}

.form-status.error {
  background-color: var(--white);
  /* color: var(--default-gray); */
  color: var(--error);
  border: 2px solid var(--black);
}

/* Mobile responsive */
@media (max-width: 768px) {
  dialog#contact-dialog {
    width: 90vw;
    padding: 1.5rem;
  }

  #dialog-title,
  #contact-dialog #dialog-title {
    font-size: var(--font-size-lg);
    margin-bottom: 1rem;
  }
}

@media (max-width: 320px) {
  dialog#contact-dialog {
    width: 95vw;
    padding: 1rem;
  }

  .close-button,
  #contact-dialog .close-button {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  dialog#contact-dialog {
    border-width: 2px;
  }

  input[type="text"],
  input[type="email"],
  textarea,
  #contact-dialog input[type="text"],
  #contact-dialog input[type="email"],
  #contact-dialog textarea {
    border-width: 2px;
  }
}

/* Respect prefers-reduced-motion for transitions */
@media (prefers-reduced-motion: reduce) {
  #form-fields-container,
  .form-status,
  .close-button {
    transition: none !important;
  }
}


/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

/* UTILITIES */
.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-normal {
  justify-content: normal;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.justify-evenly {
  justify-content: space-evenly;
}

.justify-stretch {
  justify-content: stretch;
}

.text-center {
  text-align: center;
}

.margin-center {
  margin: auto;
}

.mt-1 {
  margin-block-start: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
}


/* ============================================================================
   RESPONSIVE UTILITIES
   ============================================================================ */

@media only screen and (min-width: 768px) {
  .mobile-only {
    display: none;
  }
}

@media only screen and (min-width: 600px) {
  .col-span-2 {
    grid-column: span 2;
  }
  .col-span-3 {
    grid-column: span 3;
  }
  .col-span-4 {
    grid-column: span 4;
  }
}

/* Mobile responsive adjustments */
@media screen and (max-width: 767px) {
  body {
    margin-block-end: 4rem;
  }

  .artwork-navigation {
    padding: 1rem;
  }

  .content-grid {
    padding: 0 1rem;
    gap: 2rem;
  }

  .hero-img {
    max-height: 50vh;
  }
}
