/* ==============================================
   TALISMANIC COFFEE CLUB — style.css
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,500;1,400;1,500&family=Jost:wght@300;400;500&display=swap');

/* ------------------------------------------
   Variables
------------------------------------------ */
:root {
  --black:      #29202A;
  --magenta:    #9C21A1;
  --offwhite:   #F2F2E5;
  --menu-bg:    #655B66;
  --serif:      'Crimson Pro', Georgia, serif;
  --sans:       'Jost', Arial, sans-serif;
  --sidebar-w:  240px;
}

/* ------------------------------------------
   Reset & Base
------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--serif);
  color: var(--black);
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--magenta);
}

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

/* ------------------------------------------
   Logo / Wordmark
   Used in sidebar (show pages) and headers
------------------------------------------ */
.logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--black);
  text-decoration: none;
  line-height: 1.3;
}

.logo-link:hover {
  color: var(--black); /* logo stays black on hover */
}

.logo-link img {
  width: 56px;
  margin-bottom: 5px;
}

.logo-link span {
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* ------------------------------------------
   Mobile Menu Toggle Button
   Hidden on desktop, shown on mobile
------------------------------------------ */
.menu-toggle {
  display: none;
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 400;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  color: var(--black);
  cursor: pointer;
}

.menu-toggle:hover {
  color: var(--magenta);
}

/* ------------------------------------------
   Mobile Menu Overlay
------------------------------------------ */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.92);
  z-index: 500;
  flex-direction: column;
  padding: 22px 28px 40px;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  color: var(--black);
  cursor: pointer;
  margin-bottom: 44px;
}

.mobile-menu-close:hover {
  color: var(--magenta);
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mobile-menu nav a {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--black);
  text-decoration: none;
  margin-bottom: 20px;
  line-height: 1.3;
}

.mobile-menu nav a:hover {
  color: var(--magenta);
}

/* Info / Contact — last item in mobile menu */
.mobile-menu nav a.mobile-info-link {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.05em;
  color: var(--magenta);
  margin-top: auto;
  margin-bottom: 0;
}

.mobile-menu nav a.mobile-info-link:hover {
  color: var(--offwhite);
}

/* ------------------------------------------
   Site Footer Link (Info / Contact)
   Appears at the bottom of every page
------------------------------------------ */
.site-footer {
  padding: 24px 0 32px;
  text-align: center;
}

.site-footer a {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--magenta);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--black);
}

/* ==============================================
   INDEX PAGE
   ============================================== */

body.index-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.index-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  padding: 24px 30px 40px;
  display: flex;
  flex-direction: column;
}

.index-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 20px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.index-section {
  margin-bottom: 52px;
}

.index-section-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 24px;
}

/* Each show entry on the index page */
.show-entry {
  display: block;
  margin-bottom: 28px;
  color: var(--black);
  text-decoration: none;
  line-height: 1.55;
}

.show-entry:hover {
  color: var(--magenta);
}

/* Show title uses Crimson Pro on the index page */
.show-entry-title {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.show-entry-artists,
.show-entry-dates,
.show-entry-city {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
}

/* ==============================================
   INFO PAGE
   ============================================== */

body.info-page {
  background-color: var(--magenta);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Logo text turns offwhite on magenta background */
body.info-page .logo-link,
body.info-page .logo-link:hover {
  color: var(--offwhite);
}

.info-header {
  padding: 24px 30px;
  flex-shrink: 0;
}

.info-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 80px 60px;
  text-align: center;
}

.info-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.info-statement {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--offwhite);
  max-width: 660px;
  margin-bottom: 80px;
}

.info-contact-line {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--offwhite);
}

.info-contact-line a {
  color: var(--offwhite);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-contact-line a:hover {
  color: var(--black);
}

/* Footer on info page */
body.info-page .site-footer a {
  color: var(--offwhite);
  opacity: 0.65;
}

body.info-page .site-footer a:hover {
  color: var(--offwhite);
  opacity: 1;
}

/* ==============================================
   SHOW PAGES — LAYOUT (exhibition + overview)
   ============================================== */

/* Mobile-only header with logo
   Hidden on desktop, visible on mobile */
.show-mobile-header {
  display: none;
  justify-content: center;
  padding: 24px 28px 10px;
}

/* Fixed left sidebar (desktop only) */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  padding: 24px 30px 40px;
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.sidebar-nav a {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--black);
  line-height: 1.4;
  text-decoration: none;
}

.sidebar-nav a:hover {
  color: var(--magenta);
}

/* Active show in sidebar gets medium weight */
.sidebar-nav a.active {
  font-weight: 500;
}

/* Main content area — pushed right of sidebar */
.show-main {
  margin-left: var(--sidebar-w);
  padding: 56px 80px 80px 60px;
  max-width: 860px;
  margin: auto;
}

/* ------------------------------------------
   Show Header (title, meta, tab link)
------------------------------------------ */
.show-header {
  margin-bottom: 36px;
}

/* Show title uses Jost medium on show pages */
.show-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 8px;
}

.show-meta {
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* Link to the other page (Overview ↔ Exhibition) */
.show-tab-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.show-tab-link:hover {
  color: var(--magenta);
}

/* ==============================================
   EXHIBITION PAGE (article layout)
   ============================================== */

.show-article {
  margin-top: 36px;
}

.show-article figure {
  margin: 0 0 10px 0;
}

.show-article figure img {
  width: 100%;
  cursor: pointer;
}

.show-article figure img:hover {
  opacity: 0.92;
}

/* figcaption is italic; <em> inside it becomes upright —
   standard typographic convention for art captions */
.show-article figure figcaption {
  font-family: var(--serif);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--black);
  margin-top: 6px;
  line-height: 1.4;
  margin-bottom: 36px;
}

.show-article figure figcaption em {
  font-style: normal;
}

.show-article p {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 22px;
  max-width: 600px;
}

/* Optional: section label (e.g. "Text by Author") */
.show-article .text-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 14px;
  margin-top: 48px;
  padding-left: 2.5em;
}

/* ==============================================
   OVERVIEW PAGE (image grid)
   ============================================== */

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px 28px;
  margin-top: 36px;
}

.overview-item {
  cursor: pointer;
}

.overview-item-number {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--black);
  margin-bottom: 6px;
}

.overview-item img {
  width: 100%;
  display: block;
  transition: opacity 0.15s ease;
}

.overview-item img:hover {
  opacity: 0.88;
}

.overview-item-caption {
  font-family: var(--serif);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--black);
  margin-top: 7px;
  line-height: 1.4;
}

/* Same upright <em> convention for overview captions */
.overview-item-caption em {
  font-style: normal;
}

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

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: 62%;
  max-height: 78vh;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 28px;
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--black);
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--magenta);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--black);
  cursor: pointer;
  padding: 20px;
  line-height: 1;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--magenta);
}

.lightbox-caption {
  position: absolute;
  bottom: 22px;
  left: 28px;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--black);
  max-width: 55%;
  line-height: 1.4;
}

.lightbox-counter {
  position: absolute;
  bottom: 22px;
  right: 28px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--black);
}

/* ==============================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ============================================== */

@media (max-width: 768px) {

  /* Show the mobile menu toggle */
  .menu-toggle {
    display: block;
  }

  body.info-page .menu-toggle {
    color: var(--offwhite);
  }

  /* --- Index page --- */
  .index-header {
    position: static;
    width: auto;
    height: auto;
    overflow-y: visible;
    display: flex;
    justify-content: center;
    padding: 28px 28px 8px;
  }

  .index-main {
    justify-content: flex-start;
    padding: 36px 28px 24px;
  }

  /* --- Info page --- */
  .info-header {
    display: flex;
    justify-content: center;
    padding: 28px 28px 8px;
  }

  .info-main {
    padding: 36px 28px 60px;
  }

  .info-statement {
    font-size: 1.35rem;
  }

  /* --- Show pages --- */

  /* Show the mobile logo header, hide the sidebar */
  .show-mobile-header {
    display: flex;
  }

  .sidebar {
    display: none;
  }

  /* Full width content */
  .show-main {
    margin-left: 0;
    padding: 28px 24px 60px;
    max-width: 100%;
  }

  /* --- Overview grid: 2 columns on mobile too --- */
  .overview-grid {
    gap: 28px 14px;
  }

  /* --- Lightbox on mobile --- */
  .lightbox-img {
    max-width: 95%;
    max-height: 65vh;
    margin-top: 60px;
  }

  .lightbox-caption {
    max-width: 68%;
    font-size: 0.76rem;
  }

  .lightbox-close {
    position: absolute;
    top: 22px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .lightbox-prev {
    position: absolute;
    top: 8px;
    left: 8px;
    transform: none;
    padding: 24px 16px;
  }

  .lightbox-next {
    position: absolute;
    top: 8px;
    right: 8px;
    transform: none;
    padding: 24px 16px;
  }
}