/* ═══════════════════════════════════════════════════════════════════════════════
   YANG ARTS — with video window
   ══════════════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #f6f2ec;
  --surface: #ffffff;
  --ink: #171411;
  --muted: #71685f;
  --soft: #e8ded1;
  --line: rgba(23, 20, 17, 0.12);
  --red: #9f2f22;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

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

/* ── Video window ──────────────────────────────────────────────────────────── */
.video-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #15110d;
}

.video-window:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(0,0,0,0.36);
}

.video-window.fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vmin !important;
  height: 100vmin !important;
  border-radius: 16px !important;
  margin: auto;
  z-index: 9999 !important;
}

.video-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #15110d;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.video-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f87171;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.mute-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  padding: 0;
  transition: background 0.2s;
}

.mute-btn:hover { background: rgba(255,255,255,0.28); }

.mute-btn .icon-sound { display: block; }
.mute-btn .icon-muted { display: none; }
.mute-btn.is-muted .icon-sound { display: none; }
.mute-btn.is-muted .icon-muted { display: block; }

.video-corner-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Ken Burns when no real video ─────────────────────────────────────────── */
.video-window.ken-burns-active .video-canvas {
  animation: ken-burns 18s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  0%   { transform: scale(1)    translate(0, 0); }
  25%  { transform: scale(1.06) translate(-1%, 0.5%); }
  50%  { transform: scale(1.04) translate(0.5%, -0.5%); }
  75%  { transform: scale(1.07) translate(1%, 0); }
  100% { transform: scale(1.03) translate(-0.5%, 0.5%); }
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(20px, 5vw, 72px);
  color: #fff;
  background: linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0));
}

.brand {
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.7vw, 32px);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

nav a:hover { color: #fff; }

.language-toggle {
  min-width: 58px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 120px clamp(20px, 5vw, 72px) clamp(54px, 8vw, 96px);
  color: #fff;
  background: #15110d;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-video.loaded {
  opacity: 1;
}

.hero-video-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: center/cover no-repeat;
  transition: opacity 0.6s ease;
}

.hero-video-poster.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.28) 42%, rgba(0,0,0,0.08) 100%),
    linear-gradient(0deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.08) 42%, rgba(0,0,0,0.18) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
  color: #fff;
}

.hero .eyebrow { color: rgba(255,255,255,0.72); }
.hero h1 { color: #fff; }
.hero-text { color: rgba(255,255,255,0.84); }
.hero-actions { color: #fff; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow { color: rgba(255, 255, 255, 0.72); }

h1, h2, h3, p { margin-top: 0; }

h1, h2 {
  font-family: "Noto Serif SC", Georgia, serif;
  letter-spacing: -0.045em;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(76px, 14vw, 190px);
  line-height: 0.84;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.02;
}

.hero-text {
  max-width: 560px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.34;
  letter-spacing: -0.02em;
}

.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.primary-action {
  color: #fff;
  background: var(--ink);
}

.hero .primary-action { background: #fff; color: var(--ink); }

.secondary-action {
  color: var(--ink);
  border: 1px solid rgba(23, 20, 17, 0.22);
  background: transparent;
}

.hero .secondary-action {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
}

/* ── Content sections ────────────────────────────────────────────────────────── */
.intro-band,
.work-band,
.studio-band,
.journal-band,
.archive-band,
.site-footer {
  padding: clamp(64px, 8vw, 112px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.6fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: start;
  background:
    linear-gradient(rgba(21,17,13,0.88), rgba(21,17,13,0.88)),
    url("hero-apimart.jpg?v=20260601-230001") center/cover no-repeat;
  color: #fff;
  position: relative;
}

.pulse-time {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}

.intro-pulse h2 {
  max-width: 980px;
  margin-bottom: 18px;
}

.intro-pulse p {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.5;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(170px, 0.6fr) minmax(0, 1.4fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: end;
  margin-bottom: 34px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.work-grid article {
  min-height: 280px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
}

.work-grid span {
  display: block;
  margin-bottom: 76px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.work-grid h3 {
  margin-bottom: 12px;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: clamp(25px, 2.5vw, 36px);
  letter-spacing: -0.03em;
}

.work-grid p,
.studio-band > p,
.journal-entry p,
.archive-list {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.studio-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(28px, 6vw, 88px);
  background: #eee4d8;
}

.studio-band > p {
  max-width: 620px;
  margin: 0;
  align-self: end;
}

.journal-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(28px, 6vw, 88px);
  background: var(--surface);
}

.journal-entry {
  max-width: 820px;
  padding: clamp(28px, 4vw, 46px);
  background: var(--paper);
}

.journal-date,
.journal-meta {
  margin-bottom: 16px;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.journal-entry h3 {
  margin-bottom: 16px;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.archive-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 6vw, 88px);
}

.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  justify-content: space-between;
  background: var(--ink);
  color: #fff;
}

.site-footer .eyebrow { color: rgba(255, 255, 255, 0.58); }
.site-footer h2 { font-size: clamp(32px, 5vw, 64px); }
.site-footer .primary-action { background: #fff; color: var(--ink); }

/* ── Loading shimmer ─────────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { opacity: 0.4; }
  50%  { opacity: 0.7; }
  100% { opacity: 0.4; }
}

.pulse-loading .intro-pulse h2,
.pulse-loading .intro-pulse p {
  animation: shimmer 1.6s ease-in-out infinite;
  background: var(--soft);
  border-radius: 4px;
  color: transparent;
  min-height: 1.2em;
}

.pulse-loading .pulse-time {
  background: var(--soft);
  border-radius: 4px;
  color: transparent;
  min-width: 60px;
  min-height: 1em;
  display: inline-block;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* ── Pulse fade-in ──────────────────────────────────────────────────────────── */
.intro-pulse {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.intro-pulse.pulse-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Gallery Modal ──────────────────────────────────────────────────────────── */
.works-trigger {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(23, 20, 17, 0.96);
  overflow-y: auto;
}

.gallery-modal.open {
  display: block;
}

.gallery-header {
  position: sticky;
  top: 0;
  background: rgba(23, 20, 17, 0.95);
  backdrop-filter: blur(8px);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.gallery-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--paper);
  font-family: 'Noto Serif SC', serif;
}

.gallery-close {
  background: none;
  border: none;
  color: var(--paper);
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.gallery-close:hover { opacity: 1; }

.gallery-tabs {
  padding: 16px 32px;
  display: flex;
  gap: 8px;
  position: sticky;
  top: 64px;
  background: rgba(23, 20, 17, 0.9);
  backdrop-filter: blur(8px);
  z-index: 9;
}

.gallery-tab {
  background: none;
  border: 1px solid rgba(246, 242, 236, 0.2);
  color: rgba(246, 242, 236, 0.6);
  padding: 6px 16px;
  border-radius: 2px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.gallery-tab.active,
.gallery-tab:hover {
  border-color: rgba(246, 242, 236, 0.5);
  color: var(--paper);
}

.gallery-content {
  padding: 24px 32px 80px;
}

.gallery-grid {
  columns: 4 280px;
  column-gap: 16px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-info {
  opacity: 1;
}

.gallery-item-info p {
  margin: 0;
  font-size: 12px;
  color: rgba(246, 242, 236, 0.9);
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(23, 20, 17, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-desc {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(23, 20, 17, 0.8);
  color: var(--paper);
  padding: 10px 20px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  max-width: 600px;
  text-align: center;
  border-radius: 2px;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .video-window { width: 90px; height: 90px; bottom: 16px; right: 16px; }
  .site-header { height: auto; padding-top: 18px; align-items: flex-start; }
  nav { display: none; }
  .hero { padding-top: 96px; }
  .intro-band,
  .section-heading,
  .studio-band,
  .journal-band,
  .archive-band {
    grid-template-columns: 1fr;
  }
  .work-grid { grid-template-columns: 1fr; }
  .work-grid article { min-height: auto; }
  .work-grid span { margin-bottom: 46px; }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(58px, 22vw, 96px); }
  .hero-text { font-size: 19px; }
  .hero-actions { align-items: stretch; }
  .primary-action,
  .secondary-action { width: 100%; }
}
