﻿@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;700&display=swap");

:root {
  --page-bg: #efefef;
  --text: #111111;
  --muted: #6a6a6a;
  --accent: #e13b2f;
  --active-link: #2f3f67;
  --container-w: 1540px;
  --content-gap: 8px;
  --painting-height: 700px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

img,
video {
  display: block;
  max-width: 100%;
}

video {
  outline: none;
}

video::-webkit-media-controls {
  display: none !important;
}

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
}

.container {
  width: min(94vw, var(--container-w));
  margin: 0 auto;
}

.site-header {
  padding: 32px 0 20px;
}

.header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: transform 0.25s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  opacity: 0.9;
}

.brand-wordmark {
  font-size: 54px;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.brand-wordmark .brand-yan {
  color: var(--accent);
}

.brand-wordmark .brand-zhang {
  color: #1d1d1d;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 36px;
  padding-top: 16px;
}

.site-nav a {
  position: relative;
  font-size: 25px;
  font-weight: 300;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transition: color 0.24s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.24s ease;
  opacity: 0.8;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.site-nav a.active {
  color: var(--active-link);
}

.site-footer {
  padding: 22px 0 34px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #4f4f4f;
  text-transform: uppercase;
}

.js-enhanced [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.56s ease, transform 0.56s ease;
}

.js-enhanced [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-hero {
  margin-top: 2px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000;
}

.hero-video {
  width: 100%;
  aspect-ratio: 1099 / 645;
  object-fit: cover;
}

.hero-caption {
  margin: 8px 2px 0;
  font-size: 20px;
  font-weight: 400;
  color: #5f5f5f;
}

.hero-divider {
  margin: 8px 0 0;
  border: 0;
  border-top: 1px solid #cbcbcb;
}

.home-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.home-grid .video-shell video {
  width: 100%;
  aspect-ratio: 480 / 279;
  object-fit: cover;
  background: #000;
}

.video-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.video-control-btn {
  position: static;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(3px);
}

.video-control-btn:hover {
  background: rgba(0, 0, 0, 0.74);
  transform: translateY(-1px);
}

.hero-video-shell .video-controls {
  right: 18px;
  bottom: 18px;
}

.hero-video-shell .video-control-btn {
  width: 44px;
  height: 44px;
}

.video-toggle__icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #ffffff;
  margin-left: 2px;
  transition: all 0.2s ease;
}

.video-shell.is-playing .video-toggle__icon {
  width: 11px;
  height: 12px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(to right, #fff 0 38%, transparent 38% 62%, #fff 62% 100%);
}

.video-fullscreen__icon {
  width: 16px;
  height: 16px;
  display: block;
}

.video-fullscreen__icon path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.renders-page {
  padding-bottom: 8px;
}

.renders-masonry {
  column-count: 3;
  column-gap: var(--content-gap);
}

.render-card {
  break-inside: avoid;
  margin: 0 0 var(--content-gap);
  overflow: hidden;
  background: #d7d7d7;
}

.render-card img {
  width: 100%;
  height: auto;
  transition: transform 0.45s ease;
}

.render-card:hover img {
  transform: scale(1.02);
}

.paintings-page {
  padding-bottom: 8px;
}

.paintings-carousel {
  position: relative;
  margin-top: 2px;
  padding: 0 30px;
}

.paintings-viewport {
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.paintings-viewport::-webkit-scrollbar {
  display: none;
}

.paintings-track {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.painting-card {
  flex: 0 0 auto;
  width: clamp(190px, calc(var(--painting-height) * var(--painting-ratio, 0.62)), 1320px);
}

.painting-card img {
  width: 100%;
  height: var(--painting-height);
  object-fit: contain;
  background: #ddd;
  cursor: zoom-in;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.painting-card:hover img {
  transform: translateY(-2px);
  filter: saturate(1.02);
}

.painting-meta {
  text-align: center;
  padding-top: 10px;
}

.painting-title {
  margin: 0 0 2px;
  font-size: clamp(16px, 1.05vw, 22px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.painting-line {
  margin: 0;
  font-size: clamp(13px, 0.78vw, 17px);
  color: #5f5f5f;
  line-height: 1.45;
}

.paintings-error {
  margin: 20px 0;
  font-size: 14px;
  color: #8a2b2b;
}

.lightbox-open {
  overflow: hidden;
}

.painting-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 3vw;
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.painting-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.painting-lightbox__inner {
  position: relative;
  max-width: 94vw;
  max-height: 94vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.painting-lightbox__image {
  width: auto;
  max-width: 94vw;
  height: auto;
  max-height: 94vh;
  object-fit: contain;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.45);
}

.painting-lightbox__close {
  position: fixed;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 10001;
}

.painting-lightbox__close:hover {
  color: #d6d6d6;
  background: rgba(0, 0, 0, 0.72);
}

.carousel-btn {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  font-size: 70px;
  font-weight: 300;
  line-height: 1;
  color: #bdbdbd;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 80px;
}

.carousel-btn:hover {
  color: #949494;
}

.carousel-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.carousel-btn.prev {
  left: 0;
}

.carousel-btn.next {
  right: 0;
}

.contact-page {
  display: flex;
  justify-content: center;
  padding: 8px 0 28px;
}

.contact-form {
  width: min(100%, 620px);
}

.contact-form h1 {
  margin: 6px 0 28px;
  font-size: 30px;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #101010;
  background: transparent;
  font-size: 18px;
  padding: 8px 0 10px;
  outline: none;
  font-family: inherit;
}

.form-field textarea {
  min-height: 80px;
  resize: vertical;
}

.contact-submit {
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 34px;
  font-weight: 400;
  padding: 12px 44px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-submit:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
}

@media (max-width: 1400px) {
  .brand-wordmark {
    font-size: 44px;
  }

  .site-nav a {
    font-size: 22px;
  }

  .hero-caption {
    font-size: 18px;
  }

  .form-field label {
    font-size: 18px;
  }

  .contact-submit {
    font-size: 28px;
  }
}

@media (max-width: 1100px) {
  .brand-wordmark {
    font-size: 36px;
  }

  .site-nav {
    gap: 22px;
    padding-top: 12px;
  }

  .site-nav a {
    font-size: 18px;
  }

  .hero-caption {
    font-size: 16px;
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renders-masonry {
    column-count: 2;
  }

  .paintings-carousel {
    padding: 0 22px;
  }

  :root {
    --painting-height: 580px;
  }

  .contact-form {
    width: min(100%, 700px);
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-start;
    padding-top: 2px;
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .renders-masonry {
    column-count: 2;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .carousel-btn {
    display: none;
  }

  .paintings-carousel {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(95vw, var(--container-w));
  }

  .site-header {
    padding-top: 20px;
  }

  .brand-wordmark {
    font-size: 30px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 15px;
  }

  .hero-caption {
    font-size: 14px;
  }

  .video-controls,
  .hero-video-shell .video-controls {
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .video-control-btn,
  .hero-video-shell .video-control-btn {
    width: 34px;
    height: 34px;
  }

  .video-toggle__icon {
    border-top-width: 6px;
    border-bottom-width: 6px;
    border-left-width: 9px;
  }

  .video-shell.is-playing .video-toggle__icon {
    width: 10px;
    height: 11px;
  }

  .renders-masonry {
    column-count: 1;
  }

  :root {
    --painting-height: 430px;
  }

  .contact-form h1 {
    font-size: 32px;
  }

  .form-field label,
  .form-field input,
  .form-field textarea {
    font-size: 16px;
  }

  .contact-submit {
    font-size: 22px;
  }

  .painting-lightbox__close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 28px;
  }
}
