/* ArtProject CollectiFF — Contact page / dedicated stylesheet.
   External stylesheet layered over existing styles.css.
   Keep the menu styles in menu.php and footer styles in styles.css.
   The desktop layout retains the original five-column, three-row grid. */

.collectiff-contact-grid {
  --contact-gold: #DDB260;
  color: #292929;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  aspect-ratio: 5 / 3;
  width: 100%;
  gap: 0;
  background: #fff;
}
.contact-tile {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.contact-gallery { grid-column: 1 / span 2; grid-row: 1 / span 2; background: #eeeae4; }
.contact-copy { grid-column: 3 / span 2; grid-row: 1 / span 2; }
.contact-motto { grid-column: 5; grid-row: 1; }
.contact-slideshow { grid-column: 5; grid-row: 2; }
.contact-negative-space { grid-column: 1; grid-row: 3; }
.contact-artists-label { grid-column: 2; grid-row: 3; }
.contact-artists-panel { grid-column: 3 / span 3; grid-row: 3; }

.contact-gallery > img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.contact-copy {
  /* Match the Home and Artists introductory panels precisely. */
  padding: var(--collectiff-copy-padding);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--collectiff-copy-size);
  line-height: var(--collectiff-copy-leading);
  letter-spacing: var(--collectiff-copy-tracking);
}
.contact-copy p { margin: 0 0 var(--collectiff-copy-gap); }
.contact-copy p:last-child { margin-bottom: 0; }
.contact-copy strong { font-weight: 700; }
.contact-gold-letters { color: var(--contact-gold); }

.contact-motto, .contact-artists-panel { background: var(--contact-gold); color: #fff; }
.contact-motto { padding: var(--collectiff-motto-padding); }
.contact-motto p {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--collectiff-motto-size);
  font-weight: 400;
  line-height: var(--collectiff-motto-leading);
  letter-spacing: var(--collectiff-motto-tracking);
}

.contact-slideshow, .contact-slideshow-images { background: #211811; }
.contact-slideshow-images { position: relative; width: 100%; height: 100%; isolation: isolate; }
.contact-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity .65s ease, visibility .65s;
}
.contact-slide.is-active { opacity: 1; visibility: visible; }
.contact-slideshow-fallback {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 18px; text-align: center; color: #fff;
  font-size: 15px;
}
.contact-slideshow-fallback small { margin-top: 9px; font-size: 10px; color: #e9c68c; }

.contact-negative-space, .contact-artists-label { background: #fff; }
.contact-artists-label {
  display: flex;
  /* Match the first artist's name at the TOP of the neighbouring gold panel. */
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(13px, 1.35vw, 27px) clamp(12px, 1vw, 19px) 20px;
}
.contact-artists-label span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--contact-gold);
  font-size: clamp(15px, 1.7vw, 26px);
  line-height: 1.05;
  font-weight: 400;
}
.contact-artists-panel { padding: clamp(13px, 1.35vw, 27px); }
.contact-artists-list { display: flex; flex-direction: column; align-items: flex-start; gap: .16em; }
.contact-artists-list a {
  display: inline-block;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: clamp(17px, 1.62vw, 27px);
  line-height: 1.16;
  text-decoration: none;
  white-space: nowrap;
}
.contact-artists-list a:hover, .contact-artists-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.contact-artists-list a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.contact-slideshow-dots {
  position: absolute;
  /* The panel spans columns 3–5; the image above is column 5.
     Its centre is at 5/6 of this three-column panel's width. */
  left: 83.333333%;
  right: auto;
  transform: translateX(-50%);
  top: 10px;
  display: flex;
  align-items: center;
  gap: clamp(3px, .25vw, 7px);
}
.contact-slideshow-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.contact-slideshow-dot::before {
  content: '';
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, .72);
  border-radius: 50%;
  transition: background .2s ease, transform .2s ease;
}
.contact-slideshow-dot.is-active::before, .contact-slideshow-dot:hover::before {
  background: #fff;
  transform: scale(1.18);
}
.contact-slideshow-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Medium screens: retain the 5-column design only as long as its text fits. */
@media (max-width: 1050px) {
  .collectiff-contact-grid {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
  }
  .contact-gallery { width: 100%; aspect-ratio: 1 / 1; order: 1; }
  .contact-copy {
    order: 2;
    padding: 27px clamp(22px, 5vw, 54px) 32px;
    font-size: clamp(15px, 2.15vw, 18px);
    line-height: 1.4;
    letter-spacing: 0;
  }
  .contact-copy p { margin-bottom: 1em; }
  .contact-motto { order: 3; min-height: 160px; padding: 29px clamp(22px, 5vw, 54px); }
  .contact-motto p { font-size: clamp(22px, 3.4vw, 29px); }
  .contact-slideshow { order: 4; aspect-ratio: 1 / 1; width: 100%; }
  .contact-negative-space { display: none; }
  .contact-artists-label {
    order: 5;
    padding: 24px clamp(22px, 5vw, 54px) 0;
    justify-content: flex-start;
    align-items: center;
  }
  .contact-artists-label span {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 24px;
  }
  .contact-artists-panel {
    order: 6;
    padding: 45px clamp(22px, 5vw, 54px) 32px;
    min-height: 240px;
  }
  .contact-artists-list { gap: .25em; }
  .contact-artists-list a { font-size: clamp(19px, 3.3vw, 26px); white-space: normal; }
  /* On mobile the panel is full-width, so centre the dots within it. */
  .contact-slideshow-dots { top: 11px; left: 50%; right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-slide, .contact-slideshow-dot::before { transition: none; }
}

/* Match small-screen text and motto sizes across all three pages. */
@media (max-width: 700px) {
  .contact-copy {
    padding: var(--collectiff-mobile-copy-padding);
    font-size: var(--collectiff-mobile-copy-size);
    line-height: var(--collectiff-mobile-copy-leading);
    letter-spacing: 0;
  }
  .contact-copy p { margin-bottom: var(--collectiff-copy-gap); }
  .contact-motto { padding: var(--collectiff-mobile-motto-padding); }
  .contact-motto p {
    font-size: var(--collectiff-mobile-motto-size);
    line-height: var(--collectiff-motto-leading);
    letter-spacing: var(--collectiff-motto-tracking);
  }
}

/* Contact-specific content in the two-column white panel. */
.contact-copy h1 {
  font-family: inherit;
  font-size: clamp(20px, 1.7vw, 27px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 var(--collectiff-copy-gap);
}
.contact-email {
  color: inherit;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.contact-email:hover, .contact-email:focus-visible {
  color: var(--contact-gold);
}
@media (max-width: 700px) {
  .contact-copy h1 { font-size: 24px; }
}
