/* ---------- Tokens ---------- */
:root{
  --ink: #141212;
  --canvas: #EDE7DD;
  --canvas-dim: #E2DACC;
  --oxide: #B23A24;
  --olive: #5C6B4F;
  --stone: #8C8378;
  --line: rgba(20,18,18,0.14);

  --display: 'Barlow Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: #000;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

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

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Header (mobile-first) ---------- */
.site-header{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  background: #000;
}
.site-header .wordmark{
  font-family: var(--display);
  font-weight:600;
  font-size: 1.4rem;
  color: var(--canvas);
  flex-shrink: 0;
  --display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}
.site-header nav{ display:flex; gap: 14px; align-items: center; }
.site-header nav a{
  color: var(--canvas);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
}
.site-header nav a.nav-ig{
  padding-bottom: 0;
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.site-header nav a.nav-ig:hover{ opacity: 1; }
.site-header nav a.active::after,
.site-header nav a:not(.nav-ig):hover::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:1px;
  background: currentColor;
}

@media (min-width: 481px){
  .site-header{ padding: 20px 24px; }
  .site-header nav{ gap: 20px; }
  .site-header nav a{ font-size: 0.78rem; }
}
@media (min-width: 901px){
  .site-header{ padding: 16px 48px; }
  .site-header nav{ gap: 36px; }
  .site-header nav a{ font-size: 0.82rem; }
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  transition: height 0.6s ease;
  --display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}
.hero--category-open{
  height: 50dvh;
  height: 50vh;
}

/* Hero background layers (divs with background-image for crossfade) */
.hero-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background-size: cover;
  background-position: center 65%;
  transition: opacity 2.5s ease;
}
.hero-bg--a{ z-index: 0; }
.hero-bg--b{ z-index: 1; }

.hero-scrim{
  position:absolute;
  inset:0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(15,13,13,0.55) 0%, rgba(15,13,13,0.25) 40%, rgba(15,13,13,0.75) 100%);
}

/* Hero identity (name + subtitle) */
.hero-identity{
  position: relative;
  z-index: 4;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.hero-identity--hidden{
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.hero-name{
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: clamp(6rem, 18vw, 11.5rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  color: var(--canvas);
  text-align:center;
  margin: 0;
  padding: 0 5vw;
  text-wrap: balance;
}
.hero-sub{
  margin-top: 28px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 0 5vw;
}
@media (min-width: 481px){
  .hero-sub{ font-size: 0.85rem; letter-spacing: 0.12em; }
}

/* ---------- Category nav ---------- */
/* Mobile: fixed wrapping strip at bottom of viewport */
.cat-nav{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  padding: 6px 8px;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cat-nav-btn{
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 5px 7px;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}
.cat-nav-btn:hover{ color: rgba(255,255,255,0.85); }
.cat-nav-btn--active{
  color: rgba(255,255,255,0.95);
}
/* Mobile: underline indicator */
.cat-nav-btn--active::after{
  content: '';
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 2px;
  height: 1px;
  background: rgba(255,255,255,0.7);
}

/* Desktop: fixed vertical nav rail on left side */
@media (min-width: 601px){
  .cat-nav{
    bottom: auto;
    right: auto;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-y: auto;
    padding: 60px 0 20px 24px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    scrollbar-width: none;
  }
  .cat-nav::-webkit-scrollbar{ display: none; }
  .cat-nav-btn{
    text-align: left;
    padding: 7px 16px 7px 14px;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    font-weight: 300;
  }
  /* Desktop: left tick instead of underline */
  .cat-nav-btn--active::after{
    left: 0;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    border-radius: 1px;
  }

  /* Push page content right to make room for the fixed nav */
  .hero{ margin-left: 200px; }
  .gallery-section{ margin-left: 200px; }
  .site-footer{ margin-left: 200px; }
}
@media (min-width: 901px){
  .cat-nav{ width: 220px; padding-left: 36px; }
  .cat-nav-btn{ font-size: 1rem; padding: 8px 20px 8px 16px; }
  .hero{ margin-left: 220px; }
  .gallery-section{ margin-left: 220px; }
  .site-footer{ margin-left: 220px; }
}

/* ---------- Section head ---------- */
.section-head{
  display:flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 72px 24px 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.section-head h2{
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.1rem;
  margin:0;
}
.section-head p{
  margin:0;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}
@media (min-width: 901px){
  .section-head{
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    padding: 96px 48px 40px;
    gap: 0;
  }
}

/* ---------- Gallery ---------- */
.gallery-section{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.5s ease 0.1s;
}
.gallery--open{
  max-height: none;
  opacity: 1;
}

/* Gallery header */
.gallery-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  background: #000;
}
.gallery-title{
  font-family: var(--display);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0;
}
.gallery-close{
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease;
}
.gallery-close:hover{ color: #fff; }

@media (min-width: 601px){
  .gallery-header{ padding: 24px 24px 20px; }
  .gallery-title{ font-size: 1.05rem; }
}

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: #000;
  padding: 2px;
}
.piece{
  position: relative;
  margin:0;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--canvas-dim);
  cursor: pointer;
}

.piece-img{
  position: absolute;
  inset: 0;
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
  background: var(--canvas-dim);
}
.piece:hover .piece-img{ transform: scale(1.06); }

/* Fallback tone shown if an image fails to load, so the grid never breaks */
.piece--missing{
  background:
    repeating-linear-gradient(135deg, var(--canvas-dim), var(--canvas-dim) 10px, #d8cfbf 10px, #d8cfbf 20px);
}
.piece--missing::before{
  content: "Image not found";
  position:absolute;
  top:50%; left:50%;
  transform: translate(-50%,-50%);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}

.gallery-error{
  grid-column: 1 / -1;
  padding: 48px;
  font-size: 0.9rem;
  color: var(--stone);
}

@media (min-width: 601px){
  .gallery-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 901px){
  .gallery-grid{ grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Contact ---------- */
.contact-section{ padding-bottom: 40px; }
.contact-grid{
  display: grid;
  border-top: 1px solid var(--line);
}
.contact-line{
  display:flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  transition: background 0.3s ease, padding-left 0.3s ease;
}
.contact-line span:first-child{
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}
.contact-line span:last-child{
  font-family: var(--display);
  font-size: 1.2rem;
}
a.contact-line:hover{
  background: var(--canvas-dim);
  padding-left: 32px;
}
.contact-line--static{ cursor: default; }
.contact-line--static:hover{ background: none; padding-left: 24px; }

@media (min-width: 601px){
  .contact-line{
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: 26px 48px;
  }
  a.contact-line:hover{ padding-left: 58px; }
  .contact-line--static:hover{ padding-left: 48px; }
}

/* ---------- Footer ---------- */
.site-footer{
  display:flex;
  justify-content: flex-end;
  padding: 12px 24px 100px;
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  color: rgba(140, 131, 120, 0.45);
}
@media (min-width: 601px){
  .site-footer{ padding-bottom: 14px; }
}

/* ---------- About page ---------- */
.about-full{
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
}
.about-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.about-card{
  position: relative;
  z-index: 2;
  background: rgba(10, 8, 8, 0.85);
  color: var(--canvas);
  padding: 36px 24px 44px;
  max-width: none;
  margin: 0;
}
.about-card h1{
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  margin: 0 0 20px;
}
.about-card p{
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  color: rgba(237, 231, 221, 0.88);
}

@media (min-width: 601px){
  .about-full{
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
  }
  .about-card{
    padding: 48px 48px 56px;
    max-width: 540px;
    margin: 0 0 64px 48px;
  }
}

/* ---------- Interior page header ---------- */
.page-main{ padding-top: 0; }
.page-header{
  padding: 80px 24px 20px;
  border-bottom: 1px solid var(--line);
}
.page-header h1{
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0;
}
@media (min-width: 601px){
  .page-header{ padding: 100px 48px 28px; }
}

/* ---------- Exhibitions page ---------- */
.page-exhibitions{ background: #fff; color: var(--ink); }

.exhibition-header{
  padding: 80px 24px 28px;
  border-bottom: 1px solid var(--line);
}

.exhibition-section{
  padding: 0 0 64px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.exhibition-hero-image{
  max-width: none;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--ink);
}
.exhibition-hero-img{
  width: 100%;
  height: auto;
  display: block;
}
.exhibition-info{
  flex: 1;
  min-width: 0;
  padding: 0 24px;
}
.exhibition-title{
  font-family: var(--display);
  font-weight: 300;
  font-size: 2rem;
  margin: 0 0 16px;
}
.exhibition-venue{
  font-weight: 500;
  font-size: 1rem;
  margin: 0 0 4px;
}
.exhibition-location{
  font-size: 0.85rem;
  color: var(--stone);
  margin: 0 0 4px;
}
.exhibition-date{
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0;
}
.exhibition-work{
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.work-title{
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.work-meta{
  font-size: 0.82rem;
  color: var(--stone);
  line-height: 1.6;
  margin: 0;
}
.exhibition-info p{
  font-size: 0.92rem;
  line-height: 1.7;
  color: #2b2825;
  max-width: 60ch;
}

@media (min-width: 601px){
  .exhibition-header{ padding: 100px 48px 32px; }
  .exhibition-section{
    padding: 0 48px 96px;
    margin-top: 40px;
    flex-direction: row;
    gap: 48px;
  }
  .exhibition-hero-image{ max-width: 520px; }
  .exhibition-info{ padding: 0; }
}

/* ---------- Lightbox ---------- */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  touch-action: pan-y;
}
.lightbox--open{
  opacity: 1;
  pointer-events: auto;
}
.lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 8, 0.92);
}
.lightbox-stage{
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img{
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.8s ease;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.lightbox-img--b{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.lightbox-close{
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: none;
  border: none;
  color: var(--canvas);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  line-height: 1;
  padding: 8px;
}
.lightbox-close:hover{ opacity: 1; }

/* Hide arrow buttons on touch devices, show swipe hint instead */
.lightbox-prev,
.lightbox-next{
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  color: var(--canvas);
  font-size: 3rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  padding: 16px;
  line-height: 1;
}
.lightbox-prev:hover,
.lightbox-next:hover{ opacity: 1; }
.lightbox-prev{ left: 16px; }
.lightbox-next{ right: 16px; }

@media (min-width: 601px){
  .lightbox-prev,
  .lightbox-next{ display: block; }
  .lightbox-close{ top: 24px; right: 32px; }
}
