/* ============================================
   PRUE TREWEEKE — Editorial Portfolio
   Design reference: Webber Represents
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Instrument+Serif:ital,wght@0,400;1,400&display=swap');

:root {
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-muted: rgba(0, 0, 0, 0.4);
  --color-border: rgba(0, 0, 0, 0.08);
  --color-overlay: rgba(255, 255, 255, 0.97);

  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Instrument Serif', serif;

  --nav-height: 52px;
  --container-pad: clamp(20px, 4vw, 48px);
  --grid-gap: clamp(60px, 8vw, 120px);

  --transition-fast: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-medium: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--container-pad);
  height: var(--nav-height);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-menu {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.header-menu:hover { opacity: 0.5; }

.header-label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.header-nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.header-nav-links a {
  display: inline-block;
  padding: 12px 0;
  transition: opacity var(--transition-fast);
}
.header-nav-links a:hover { opacity: 0.5; }
.header-nav-links a.active {
  font-weight: 600;
}

/* ---- Wordmark / Hero ---- */
.wordmark {
  padding: clamp(30px, 5vw, 60px) var(--container-pad) 0;
  position: relative;
  z-index: 2;
}
.wordmark h1 {
  font-family: var(--font-sans);
  font-size: clamp(48px, 10vw, 160px);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---- Grid ---- */
.grid {
  padding: clamp(40px, 6vw, 80px) var(--container-pad);
}

.grid__item {
  margin-bottom: var(--grid-gap);
  max-width: 520px;
}

.grid__item-inner {
  position: relative;
  overflow: hidden;
}
.grid__item-inner img,
.grid__item-inner video {
  width: 100%;
  transition: opacity var(--transition-medium);
}
.grid__item:hover .grid__item-inner img,
.grid__item:hover .grid__item-inner video {
  opacity: 0.85;
}

.grid__caption {
  margin-top: 12px;
}
.grid__caption-name {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}
.grid__caption-pub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
}

/* Alternating layout — some items shift right */
.grid__item--right {
  margin-left: auto;
  margin-right: var(--container-pad);
}

/* Featured chip (text card like Webber's "Introducing" cards) */
.grid__chip {
  background: #e8e4df;
  padding: clamp(40px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 300px;
}
.grid__chip-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.4;
}
.grid__chip-text strong {
  font-family: var(--font-sans);
  font-weight: 500;
  font-style: normal;
  display: block;
  font-size: clamp(22px, 3.5vw, 36px);
  margin-top: 4px;
}

/* ---- Full-screen overlay menu ---- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-overlay);
  display: flex;
  flex-direction: column;
  padding: var(--nav-height) var(--container-pad) var(--container-pad);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay__close {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--container-pad);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 201;
}
.nav-overlay__close button {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity var(--transition-fast);
}
.nav-overlay__close button:hover { opacity: 0.5; }

.nav-overlay__content {
  padding-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.nav-overlay__section h3 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--color-muted);
}
.nav-overlay__section ul li {
  margin-bottom: 8px;
}
.nav-overlay__section ul li a {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  display: inline-block;
  padding: 4px 0;
  transition: opacity var(--transition-fast);
}
.nav-overlay__section ul li a:hover { opacity: 0.5; }

.nav-overlay__contact {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--color-border);
}
.nav-overlay__contact a {
  font-size: 14px;
  display: inline-block;
  margin-right: 24px;
  transition: opacity var(--transition-fast);
}
.nav-overlay__contact a:hover { opacity: 0.5; }

/* ---- Footer ---- */
.footer {
  padding: 60px var(--container-pad) 30px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
}
.footer__links {
  display: flex;
  gap: 20px;
}
.footer__links a {
  font-size: 13px;
  color: var(--color-muted);
  transition: color var(--transition-fast);
}
.footer__links a:hover { color: var(--color-text); }
.footer__email {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 8px;
}

/* ---- About page ---- */
.about {
  padding: clamp(60px, 10vw, 120px) var(--container-pad);
  max-width: 680px;
}
.about__headline {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 32px;
}
.about__body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 40px;
}
.about__body p { margin-bottom: 16px; }

.about__section-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  margin-top: 48px;
}
.about__list {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 2;
}
.about__list a {
  transition: opacity var(--transition-fast);
}
.about__list a:hover { opacity: 0.5; }

.about__cta {
  margin-top: 56px;
  font-size: 16px;
  line-height: 1.8;
}
.about__cta a {
  font-weight: 500;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 1px;
  transition: opacity var(--transition-fast);
}
.about__cta a:hover { opacity: 0.5; }

/* ---- Work page (grid of projects) ---- */
.work-intro {
  padding: clamp(40px, 6vw, 80px) var(--container-pad) clamp(20px, 3vw, 40px);
  max-width: 680px;
}
.work-intro p {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.5;
}

.work-grid {
  padding: 0 var(--container-pad) clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px 30px;
}
.work-card {
  opacity: 1;
}
.work-card__image {
  overflow: hidden;
  margin-bottom: 12px;
}
.work-card__image img {
  width: 100%;
  transition: opacity var(--transition-medium);
}
.work-card:hover .work-card__image img {
  opacity: 0.85;
}
.work-card__title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.work-card__brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Scroll reveal (JS adds .visible) ---- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Fallback: if JS doesn't fire (e.g. observer misses), make content visible after 1s */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: revealFallback 0s 1.5s forwards; }
  .reveal.visible { animation: none; }
}
@keyframes revealFallback {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Mobile ---- */
@media (max-width: 1024px) {
  .wordmark h1 {
    font-size: clamp(36px, 8vw, 80px);
  }
  .grid__item {
    max-width: 100%;
  }
  .grid__item--right {
    margin-left: 0;
    margin-right: 0;
  }
  .nav-overlay__content {
    grid-template-columns: 1fr;
  }
  .header-nav-links {
    display: none;
  }
  .header-menu {
    display: block;
  }
}

@media (max-width: 640px) {
  .wordmark h1 {
    font-size: clamp(32px, 12vw, 56px);
  }
  .grid {
    padding: 30px var(--container-pad);
  }
  .grid__item {
    margin-bottom: 50px;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .about {
    padding: 40px var(--container-pad);
  }
}

/* ---- Project Gallery (Thumbs View) ---- */
.gallery-thumbs {
  position: relative;
  padding: clamp(20px, 3vw, 40px) var(--container-pad);
}

.gallery-thumbs__first-row {
  position: relative;
}

.gallery-thumbs__wordmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-sans);
  font-size: clamp(60px, 12vw, 180px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 0.9;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  color: var(--color-text);
  opacity: 0;
  animation: wordmarkReveal 3s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes wordmarkReveal {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.gallery-thumbs__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
}

.gallery-thumbs__item {
  position: relative;
  flex: 0 0 auto;
  height: clamp(140px, 20vw, 220px);
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}
.gallery-thumbs__item img {
  height: 100%;
  width: auto;
  object-fit: cover;
  transition: opacity var(--transition-medium), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-thumbs__item:hover img {
  opacity: 0.7;
  transform: scale(1.03);
}
.gallery-thumbs__item:hover {
  z-index: 3;
}

.gallery-thumbs__title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  margin-top: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.gallery-thumbs__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}
.gallery-thumbs__counter {
  font-size: 14px;
  color: var(--color-muted);
}
.gallery-thumbs__slideshow-link {
  font-size: 14px;
  transition: opacity var(--transition-fast);
}
.gallery-thumbs__slideshow-link:hover { opacity: 0.5; }

/* ---- Project Slideshow (Carousel View) ---- */
.slideshow {
  position: relative;
  height: calc(100dvh - var(--nav-height));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.slideshow__images {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  position: relative;
  overflow: hidden;
}

.slideshow__wordmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-sans);
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 0.9;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  text-align: center;
  opacity: 0;
  animation: wordmarkReveal 3s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.slideshow__slide {
  flex-shrink: 0;
  height: 70%;
  max-width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.slideshow__slide img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.slideshow__slide--prev,
.slideshow__slide--next {
  max-width: 15%;
  opacity: 0.6;
}
.slideshow__slide--active {
  max-width: 45%;
  opacity: 1;
}

.slideshow__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--container-pad);
  border-top: 1px solid var(--color-border);
}
.slideshow__counter {
  font-size: 14px;
  color: var(--color-muted);
}
.slideshow__project-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
}
.slideshow__view-all {
  font-size: 14px;
  transition: opacity var(--transition-fast);
}
.slideshow__view-all:hover { opacity: 0.5; }

/* ---- Artist Sub-nav (chevron dropdown) ---- */
.artist-subnav {
  text-align: center;
  padding: 12px 0 4px;
}
.artist-subnav__name {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.artist-subnav__name:hover { opacity: 0.5; }
.artist-subnav__chevron {
  display: block;
  margin: 4px auto 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.artist-subnav__chevron.open {
  transform: rotate(180deg);
}
.artist-subnav__links {
  display: none;
  gap: 0 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 0;
  font-size: 13px;
}
.artist-subnav__links.open {
  display: flex;
}
.artist-subnav__links a {
  padding: 2px 0;
  transition: opacity var(--transition-fast);
}
.artist-subnav__links a:hover { opacity: 0.5; }
.artist-subnav__links span {
  color: var(--color-muted);
}

/* ---- Project detail page ---- */
.project-detail {
  padding: clamp(40px, 6vw, 80px) var(--container-pad);
}
.project-detail__title {
  font-family: var(--font-sans);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 400;
  margin-bottom: 8px;
  max-width: 680px;
}
.project-detail__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--color-muted);
  margin-bottom: 32px;
}
.project-detail__description {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 600px;
}
.project-detail__images {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.project-detail__images img {
  width: 100%;
}
.project-detail__nav {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
}
.project-detail__nav a {
  transition: opacity var(--transition-fast);
}
.project-detail__nav a:hover { opacity: 0.5; }

/* ---- Gallery mobile ---- */
@media (max-width: 1024px) {
  .gallery-thumbs__wordmark {
    font-size: clamp(40px, 10vw, 100px);
  }
  .gallery-thumbs__item {
    height: clamp(100px, 15vw, 160px);
  }
  .slideshow__slide--prev,
  .slideshow__slide--next {
    display: none;
  }
  .slideshow__slide--active {
    max-width: 85%;
  }
}

@media (max-width: 640px) {
  .gallery-thumbs__grid {
    gap: 4px;
  }
  .gallery-thumbs__item {
    height: 100px;
  }
  .slideshow__wordmark {
    font-size: 40px;
  }
}

/* Desktop: show nav links, hide menu button */
@media (min-width: 1025px) {
  .header-menu {
    display: none;
  }
}
