/* ============================================================
   GUOZHAN home — Swiss flat
   Palette: #000000 / #0059E7 / #F9F3E7
   No frost, no gradients on cards, border-radius: 0
   ============================================================ */

:root {
  --bg: #000000;
  --blue: #0059E7;
  --cream: #F9F3E7;
  --ink: #F9F3E7;
  --muted: rgba(249, 243, 231, 0.42);
  --pad-x: clamp(20px, 5vw, 64px);
  --font: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.45;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible,
.work-card:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--cream);
  color: var(--bg);
  padding: 8px 14px;
  z-index: 100;
  text-decoration: none;
  font-size: 13px;
}
.skip-link:focus {
  left: var(--pad-x);
  top: 8px;
}


/* ---------------- Header ---------------- */
.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px var(--pad-x) 12px;
  position: relative;
  z-index: 10;
}

.brand {
  font-weight: 300;
  font-size: clamp(13px, 1.2vw, 15px);
  letter-spacing: 0.28em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
}

.site-nav a {
  font-weight: 300;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.22em;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--cream);
  opacity: 0.85;
}

/* ---------------- Hero ---------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(32px, 6vh, 72px) var(--pad-x) clamp(48px, 8vh, 96px);
  min-height: min(72vh, 820px);
}

.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Frame sized by static logo aspect; video is scaled to match last-frame → still */
.hero-logo-frame {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1072 / 1380;
  overflow: hidden;
  background: #000;
}

.hero-logo-still,
.hero-logo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
}

.hero-logo-video {
  background: #000;
  /* still fills ~92.5% of frame; video mark ~48.5% → scale ≈ 1.92 */
  --logo-intro-scale: 1.9225;
  --logo-intro-tx: 0;
  --logo-intro-ty: 0.012;
  transform: translate(
      calc(var(--logo-intro-tx) * 100%),
      calc(var(--logo-intro-ty) * 100%)
    )
    scale(var(--logo-intro-scale));
  transform-origin: center center;
}

.hero-logo.is-playing .hero-logo-still {
  opacity: 0;
  pointer-events: none;
}

.hero-logo.is-static .hero-logo-video {
  visibility: hidden;
  pointer-events: none;
}

.hero-logo.is-frozen .hero-logo-still {
  opacity: 0;
  pointer-events: none;
}

.hero-logo.is-frozen .hero-logo-video {
  visibility: visible;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 34rem;
}

.hero-name {
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 64px);
  letter-spacing: 0.18em;
  line-height: 1.1;
  color: var(--cream);
  text-transform: uppercase;
  margin: 0 0 6px;
}

.hero-en {
  font-weight: 400;
  font-size: clamp(15px, 1.55vw, 22px);
  letter-spacing: 0.14em;
  line-height: 1.55;
  color: var(--cream);
  text-transform: uppercase;
}

.hero-zh {
  font-weight: 300;
  font-size: clamp(14px, 1.35vw, 18px);
  letter-spacing: 0.12em;
  line-height: 1.7;
  color: var(--cream);
}

/* ---------------- Work cards ---------------- */
.work {
  padding: 0 var(--pad-x) 0;
  scroll-margin-top: 24px;
  overflow: visible;
}

.work-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  /* desktop mock ~22px @1280 */
  gap: clamp(16px, 1.8vw, 24px);
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: clamp(160px, 22vw, 240px);
  padding: clamp(18px, 2.2vw, 28px);
  text-decoration: none;
  border-radius: 0;
  border: none;
  background: var(--blue);
  transition: transform 0.28s ease, filter 0.28s ease;
  transform-origin: center center;
}

.work-card--cream {
  background: var(--cream);
}

.work-card--blue .work-card__label {
  color: var(--cream);
}

.work-card--cream .work-card__label {
  color: #000000;
}

.work-card__icon {
  display: block;
  line-height: 0;
}

.work-card__icon svg {
  width: clamp(28px, 4.2vw, 44px);
  height: clamp(28px, 4.2vw, 44px);
  /* ~1/5–1/4 of card height */
}

.work-card__label {
  font-weight: 500;
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.work-card {
  transition: transform 0.28s ease, filter 0.28s ease;
  transform-origin: center center;
  will-change: transform;
}

.work-card:hover {
  transform: scale(1.035);
  filter: brightness(1.04);
  z-index: 2;
}

.work-cards {
  /* allow hover scale to breathe without clipping neighbors too hard */
  overflow: visible;
}

.work-rule {
  height: 1px;
  background: var(--cream);
  margin-top: clamp(16px, 1.8vw, 24px);
  width: 100%;
}

/* ---------------- About ---------------- */
.about {
  padding: clamp(48px, 8vh, 96px) var(--pad-x) clamp(40px, 6vh, 72px);
  max-width: 920px;
  scroll-margin-top: 24px;
}

.about-title {
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.12em;
  color: var(--cream);
  margin-bottom: 20px;
}

.about-bio {
  font-weight: 300;
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.75;
  color: var(--cream);
  max-width: 36rem;
}

.contact {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(249, 243, 231, 0.22);
  scroll-margin-top: 24px;
}

.contact-title {
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 14px;
}

.contact-line {
  font-size: 15px;
  letter-spacing: 0.06em;
}

.contact-line a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(249, 243, 231, 0.35);
  padding-bottom: 2px;
}

.contact-line a:hover {
  border-bottom-color: var(--cream);
}

/* ---------------- Footer ---------------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px var(--pad-x) 28px;
  border-top: 1px solid rgba(249, 243, 231, 0.18);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.22em;
}

/* ---------------- Mobile ---------------- */
@media (max-width: 800px) {
  .site-header {
    align-items: flex-start;
    padding-top: 22px;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
    padding-bottom: 56px;
    gap: 36px;
    text-align: center;
  }

  .hero-logo-frame {
    width: min(72vw, 280px);
    margin-inline: auto;
  }

  .hero-copy {
    align-items: center;
    margin-inline: auto;
  }

  .hero-en {
    letter-spacing: 0.1em;
  }

  .work-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .work-card {
    min-height: 148px;
    /* mobile mock: icon nearer top-center-left feel; keep left align per brief */
    padding: 22px 20px 20px;
  }

  .work-card__icon svg {
    width: 36px;
    height: 36px;
  }

  .about {
    padding-top: 40px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .brand {
    letter-spacing: 0.2em;
  }
}

/* ============================================================
   List / collection pages (photos, videos, design, aigc)
   Same Swiss flat system as home
   ============================================================ */

.page {
  position: relative;
  z-index: 2;
  max-width: 1420px;
  margin: 0 auto;
  padding: clamp(40px, 6vh, 72px) var(--pad-x) clamp(48px, 8vh, 96px);
  min-height: 50vh;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-bottom: 1px solid rgba(249, 243, 231, 0.22);
  padding-bottom: 24px;
  margin-bottom: clamp(28px, 4vh, 46px);
}

.page-head h1 {
  font-weight: 400;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0.12em;
  color: var(--cream);
  text-transform: uppercase;
}

.page-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.grid-label {
  color: var(--muted);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.22em;
}

#item-count {
  color: var(--cream);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 1.8vw, 24px);
}

.card {
  border: 1px solid rgba(249, 243, 231, 0.22);
  background: transparent;
  border-radius: 0;
  transition: border-color 0.2s ease, filter 0.2s ease;
}

.card:hover {
  border-color: var(--cream);
  filter: brightness(1.04);
}

.card-video:hover {
  border-color: var(--blue);
}

.card .media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0a0a0a;
  border-radius: 0;
}

.card-video .media {
  aspect-ratio: 16 / 9;
}

.card img,
.card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.card .meta {
  padding: 16px 18px 18px;
}

.card .row {
  display: flex;
  justify-content: space-between;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.card .idx {
  color: var(--muted);
}

.card .cat {
  color: var(--blue);
}

.card h3 {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin: 10px 0 6px;
  color: var(--cream);
}

.card p {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.12em;
  padding: 40px 0;
  line-height: 1.7;
}

/* Standalone about page (if not redirecting) */
.page.about-standalone .bio {
  color: var(--cream);
  font-weight: 300;
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.75;
  max-width: 36rem;
  margin-top: 8px;
}

.page.about-standalone .stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.page.about-standalone .stack span {
  border: 1px solid rgba(249, 243, 231, 0.22);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 9px 16px;
  border-radius: 0;
}

@media (max-width: 800px) {
  .page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-head-side {
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
