/* ---------- Reset ---------- */
@font-face {
  font-family: 'InstrumentSerif';
  src: url('../fonts/InstrumentSerif-Regular.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'HelveticaNeue';
  src: url('../fonts/HelveticaNeue-Light.otf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

:root {
--off-white: #FFFEFC;
--font-heading: "InstrumentSerif";
--font-body: "HelveticaNeue", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
--font-size-heading: 40px;
--font-size-subheading: 30px;
--font-size-menu: 24px;
--font-size-body: 20px;
--font-size-archive-body: 18px;
--font-size-small: 14px;
--line-height-base: 1.2;

}

html, body, p, div{
  font-family: var(--font-body);
  font-size: var(--font-size-body)
}

.site-main {
  margin: 0 auto;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
  font-family: var(--font-heading);
}

h1 {
  font-size: var(--font-size-heading);
}

h2 {
  font-size: var(--font-size-subheading);
  margin: 16px 0;
  margin-top: 60px;
}

a:hover{
  text-decoration: underline;
}



* { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-base);
  color: #111;
  background: var(--off-white);
}

/* ---------- Intro sequence ---------- */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--intro-wipe-duration, 520ms) cubic-bezier(0.4, 0, 1, 1);
  overflow: hidden;
}

.intro-overlay__stage {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.intro-overlay__image {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity var(--intro-blend-duration, 180ms) cubic-bezier(0.3, 0, 0.6, 1);
  /* will-change: opacity; */
}

.intro-overlay__image.is-active {
  opacity: 1;
}

html.intro-is-active {
  overflow: hidden;
}

html.intro-is-active body {
  overflow: hidden;
}

.intro-overlay.is-exiting {
  clip-path: inset(0 0 100% 0);
}

.intro-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}



/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 25px 20px 80px 20px;
  position: relative;
  z-index: 20;
}
.site-branding {
  display: flex;
  align-items: center;
  height: auto;
  width: auto;
}
.site-title {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.site-title img,
.custom-logo-link img,
.custom-logo {
  display: block;
  max-height: 42px;
  width: auto;
  height: auto;
}
.site-nav {
  position: relative;
  margin-left: auto;
}
.menu-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: var(--font-size-menu);
  color: inherit;
  padding: 0;
}
.site-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  flex-direction: column;
  min-width: 180px;
  backdrop-filter: blur(20px);
  font-family: var(--font-body);
  font-size: var(--font-size-menu);
  opacity: 0.6;
  text-align: right;
}
.site-menu.open {
  display: flex;
}
.site-menu__link {
  font-family: var(--font-body);
  font-size: var(--font-size-menu);
  color: #111;
}
.site-menu__link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ---------- Filter bar ---------- */
.filter-bar {
  font-family: var(--font-heading);
  font-size: var(--font-size-body);
  font-weight: 300;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 50px 30px 15px 30px;
  margin-bottom: 30px;
}
.filter-btn {
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  padding: 6px 14px;
  border: 1px solid #ccc;
  /* border-radius: 999px; */
  background: transparent;
  cursor: pointer;
  transition: 0.15s ease;
}
.filter-btn:hover { background: #f0f0f0; }
.filter-btn.active { background: #111; color: #fff; border-color: #111; }

/* MAIN ARCHIVE */
.main-archive {
  margin: 0 20px;
}

.back-to-top-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  border: 1px solid #111;
  background: var(--off-white);
  color: #111;
  font-family: var(--font-body);
  font-size: var(--font-size-small);
  padding: 8px 14px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.back-to-top-btn:hover {
  background: #111;
  color: #fff;
}

.back-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Grid ---------- */
.graphics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 48px;
  padding: 48px 36px;
  align-items: start;
}
.graphics-item__image {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f5f5f5;
  height: auto;
}
.graphics-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.graphics-item__meta { padding-top: 16px; }
.graphics-item__title {  font-weight: 600;font-size: 0.8rem; }
.graphics-item__artist,
.graphics-item__location, 
.graphics-item__year {
  font-size: 0.8rem;
  color: #666;
}
/* ---------- Single item page ---------- */
.graphics-single-container{
  display: flex;
  flex-direction: column;
  margin: auto auto;
  max-width: 900px;
  align-self: center;
}
.graphics-single {
  display: grid;
  grid-template-columns: auto auto;
  gap: 50px;
  margin: 0 auto;
}

.graphics-single__image {
  width: 400px;
  max-width: 100%;
  margin-bottom: 24px;
}

.graphics-single__image img {
  width: 100%;
  height: auto;
  display: block;
}

.graphics-single-info {
  font-family: var(--font-body);
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 480px;
}
.graphics-single-info h1 { font-family: var(--font-body); font-size: 24px;}
.graphics-single-info p { font-size: var(--font-size-archive-body); }

.graphics-single-meta{
  opacity: 0.6;
}

.graphics-single-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.source-btn {
  display: inline-block;
  font-size: var(--font-size-archive-body);
  width: fit-content;
  padding: 2px 15px;
  border-radius: 999px;
  border: 1px solid black;
}

.source-btn--right {
  margin-left: auto;
}

.source-btn:hover{
  background-color: #111;
  color: white;
}

.back-btn {
  font-size: var(--font-size-archive-body);
  width: fit-content;
  margin-top: 10px;
}
.back-btn:hover{
  text-decoration: underline;
}

.graphics-single-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 24px auto 0;
  padding: 30px 0 48px;
}

.nav-btn {
  font-family: var(--font-body);
  font-size: var(--font-size-archive-body);
  color: #111;
}

.nav-btn:hover {
  text-decoration: underline;
}

/* ---------- Collections page ---------- */
.collections-page {
  /* max-width: 900px; */
  margin: 0 auto;
  padding: 48px 60px 32px;
}

.collections-page_title {
  font-size: 2rem;
  margin-bottom: 24px;
  text-align: center;
  font-family: var(--font-heading);
}

.collection-item {
  border-bottom: 1px solid #111;
}

.collection-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: 0;
  padding: 16px 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.collection-toggle__group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.collection-toggle_date {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}

.collection-toggle_number {
  flex-shrink: 0;
}

.collection-toggle:hover,
.collection-toggle.is-open {
  opacity: 0.8;
}

.collection-toggle__cell {
  font-size: 0.95rem;
}

.collection-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0;
  transition: max-height 280ms ease, opacity 220ms ease, padding 220ms ease;
  will-change: max-height, opacity;
}

.collection-panel.is-open {
  max-height: fit-content;
  opacity: 1;
  padding: 30px 0 24px;
}

.collection-panel__content {
  margin-bottom: 24px;
  line-height: 1.6;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 48px;
  margin: 48px 0 0;
}

.collection-grid__item {
  display: block;
  color: inherit;
  text-decoration: none;
}

.collection-grid__item img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 8px;
}

.collection-grid__meta {
  padding-top: 4px;
}

.collection-grid__title {
  font-size: 0.9rem;
  margin: 0;
}

.collection-panel__empty {
  color: #666;
  padding-bottom: 8px;
}

/* ---------- Creative index page ---------- */
.creatives-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 32px 80px;
  text-align: center;
}

.creatives-page__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-heading);
  margin-bottom: 48px;
}

.creative-index-table {
  width: 100%;
  border-collapse: collapse;
}

.creative-index-table th {
  font-family: var(--font-heading);
  opacity: 0.6;
}
.creative-index-table th,
.creative-index-table td {
  text-align: left;
  padding: 12px 12px;
  vertical-align: top;
  max-width: 200px;
  word-wrap: break-word;
}
.creative-index-table th:nth-child(3),
.creative-index-table td:nth-child(3) {
  text-align: right;
}

.creative-index-table__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.creative-index-table__arrow {
  line-height: 1;
}

.creative-index-table__link:hover {
  text-decoration: none;
}

.creative-index-table__link:hover .creative-index-table__link-text {
  text-decoration: underline;
}

/* ---------- Static pages ---------- */

.static-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 32px;
  width: 100%;
}
.static-page__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-heading);
  margin-bottom: 24px;
  text-align: center;
}

.static-page__content {
  width: 100%;
  margin: 0 auto;
}
.static-page__content p {
  margin-bottom: 36px;
}
.static-page__content li {
  margin-bottom: 12px;
  list-style-type: none;
}

.wp-block-columns.is-layout-flex.wp-container-core-columns-is-layout-8f761849.wp-block-columns-is-layout-flex {
  margin-top: 60px;
}


@media (max-width: 768px) {
  .site-header {
    flex-wrap: nowrap;
    align-items: flex-start;
    padding: 20px 16px;
  }

  .site-branding {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-title img,
  .custom-logo-link img,
  .custom-logo {
    max-height: 36px;
  }

  .site-nav {
    margin-left: auto;
    width: auto;
    display: block;
    position: static;
  }

  .menu-toggle {
    font-size: 20px;
    position: fixed;
    top: 20px;
    right: 16px;
    z-index: 10001;
  }

  .site-menu {
    position: fixed;
    inset: 0;
    min-width: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 28px;
    opacity: 1;
    text-align: center;
    background: rgba(255, 254, 252, 0.96);
    backdrop-filter: blur(8px);
    z-index: 10000;
  }

  .site-menu.open {
    display: flex;
  }

  .site-menu__link {
    font-size: 28px;
  }

  .graphics-single {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
  }

  .graphics-single-container {
    padding: 0 16px;
  }

  .graphics-single__image {
    width: min(100%, 420px);
    margin: 0 auto;
  }

  .graphics-single-info {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    align-items: center;
    text-align: center;
  }

  .graphics-single__notes,
  .graphics-single-meta {
    text-align: center;
  }

  .graphics-single-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .graphics-single-nav {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }

  .back-to-top-btn {
    right: 16px;
    bottom: 16px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px 32px;
  font-size: 0.8rem;
  color: #999;
  text-align: center;
}

/*
NEXT STEP: inspect eastasiangraphicsarchive.com in your browser devtools
and swap in the real font-family, exact colors, and spacing values above.
This is a clean structural starting point, not a pixel match yet.
*/
