/* Hefeng Xilai · International site (hefengxilai.cn)
   Soundfirm-inspired: black / white / amber · large whitespace
   No ICP/MPS beian. No hosted video files — embeds via YouTube/Vimeo only. */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #3a3a3a;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --amber: #b8952c;
  --amber-soft: rgba(184, 149, 44, 0.14);
  --header-h: 64px;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 10vw, 6.5rem);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover { color: var(--amber); }

ul { list-style: none; }

.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2 * var(--pad), 40rem);
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--ink);
  white-space: nowrap;
  text-transform: uppercase;
}

.brand:hover { color: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.65rem;
}

.nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  position: relative;
}

.nav a:hover { color: var(--ink); }

.nav a.is-active {
  color: var(--amber);
  font-weight: 500;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  margin-left: 0.35rem;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  line-height: 1.2;
}

.lang-switch button:hover { color: var(--amber); }

.lang-switch button.is-active {
  color: var(--ink);
  font-weight: 600;
}

.lang-switch .lang-sep {
  color: var(--line);
  user-select: none;
}

.mobile-nav .lang-switch {
  display: inline-flex;
  margin: 0.85rem 0 0.25rem;
  border-bottom: 0;
  padding: 0.25rem 0.55rem;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0.75rem var(--pad) 1.25rem;
  background: #fff;
}

.mobile-nav.is-open { display: block; }

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.mobile-nav a.is-active { color: var(--amber); }
/* mobile lang-switch styled above */

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #1a1a1a;
}

.hero-still {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.72) 100%),
    radial-gradient(ellipse 80% 60% at 30% 40%, #3d3428 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 75% 55%, #2a3540 0%, transparent 50%),
    linear-gradient(135deg, #1c1c1c 0%, #2b241c 40%, #1a2228 100%);
}

.hero-still::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 48%, rgba(255, 220, 160, 0.08) 0%, transparent 12%),
    radial-gradient(circle at 68% 42%, rgba(180, 200, 220, 0.06) 0%, transparent 10%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2 * var(--pad), var(--max));
  margin: 0 auto;
  padding: 3.5rem 0 3.75rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.hero p {
  font-size: clamp(0.875rem, 1.6vw, 1.0625rem);
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.1em;
  font-weight: 400;
}

.hero-note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
}


.hero--video {
  min-height: 0;
  flex-direction: column;
  align-items: center;
  background: #111;
  padding: clamp(1rem, 3vw, 1.75rem) var(--pad) 0;
}

.hero-media {
  position: relative;
  width: min(100%, var(--max));
  aspect-ratio: 16 / 9;
  background: #000;
  /* same width as Work embeds — avoid full-bleed stretch that softens the player */
}

.hero-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.hero--video .hero-content {
  background: transparent;
  width: min(100%, var(--max));
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  box-sizing: border-box;
}

.hero--video .hero-content > * {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}


/* —— Sections —— */
.section {
  padding: var(--section-y) 0;
}

.section--soft {
  background: #fafafa;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  text-align: center;
}

.section-title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 2.5rem;
  line-height: 1.35;
  color: var(--ink);
}

.section-title--left {
  text-align: left;
  margin-bottom: 1.75rem;
}

.lead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.9;
}

.lead + .lead { margin-top: 1rem; }

/* —— Services two-col —— */
.services-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.75rem;
}

.services-head h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: var(--ink);
}

.service-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
  max-width: 42rem;
  margin: 0 auto;
}

.service-col h3 {
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.15rem;
  font-weight: 500;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.service-col ul li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.55rem;
  font-size: 0.96875rem;
  color: var(--ink-soft);
  border-bottom: 1px solid #f0f0f0;
}

.service-col ul li:last-child { border-bottom: 0; }

.service-col ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.55rem;
  height: 0.35rem;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(-45deg);
}

.service-col--audio ul li::before {
  border-color: var(--amber);
}

.service-more {
  text-align: center;
  margin-top: 2.5rem;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: #fff;
}

.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.btn--amber:hover {
  background: transparent;
  color: var(--amber);
}

/* —— Works grid —— */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.work-card {
  display: block;
  color: inherit;
}

.work-card:hover { color: inherit; }

.work-thumb {
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.work-thumb--a {
  background: linear-gradient(160deg, #2a2520 0%, #1a1e24 100%);
}
.work-thumb--b {
  background: linear-gradient(200deg, #1e2428 0%, #2c221c 100%);
}
.work-thumb--c {
  background: linear-gradient(120deg, #222018 0%, #1a1a22 100%);
}

.work-thumb::after {
  content: "Still TBD";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

html[lang="zh-CN"] .work-thumb::after {
  content: "静帧待定";
  letter-spacing: 0.12em;
  text-transform: none;
}

.work-card h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.work-card p {
  font-size: 0.8125rem;
  color: var(--muted);
}

.work-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.work-meta a {
  color: var(--amber);
  border-bottom: 1px solid transparent;
}

.work-meta a:hover { border-bottom-color: var(--amber); }

/* —— Embed placeholders (Work page) —— */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.work-entry h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.work-entry .work-tags {
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

.embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  border: 1px solid var(--line);
  overflow: hidden;
}

.embed-frame::before {
  content: "Embed placeholder — paste YouTube / Vimeo iframe below";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  z-index: 0;
}

html[lang="zh-CN"] .embed-frame::before {
  content: "嵌片占位 — 授权后粘贴 YouTube / Vimeo iframe";
  letter-spacing: 0.04em;
}

.embed-frame:has(iframe)::before { display: none; }

.embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

.embed-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

/* —— Process —— */
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.process-item {
  text-align: center;
  padding: 0 0.5rem;
}

.process-item::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.process-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}

.process-item p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.65;
}

/* —— CTA band —— */
.cta-band {
  text-align: center;
  padding: var(--section-y) 0;
}

.cta-band h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: var(--muted);
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}

.cta-band .email {
  display: block;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.cta-band .email:hover { color: var(--amber); }

/* —— Page hero (inner) —— */
.page-hero {
  padding: clamp(3rem, 8vw, 4.5rem) 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.page-hero p {
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 36rem;
}

/* —— Detail blocks —— */
.detail-block {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

.detail-block:last-child { border-bottom: 0; }

.detail-block h2 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.detail-block p,
.detail-block li {
  color: var(--ink-soft);
  font-size: 0.96875rem;
  line-height: 1.85;
}

.detail-block ul {
  margin-top: 0.75rem;
}

.detail-block ul li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
}

.detail-block ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 700;
}

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3.5rem;
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info dt {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  margin-top: 1.25rem;
  text-transform: uppercase;
}

.contact-info dt:first-child { margin-top: 0; }

.contact-info dd {
  font-size: 0.96875rem;
  color: var(--ink);
}

.contact-info a { color: var(--ink); border-bottom: 1px solid var(--line); }
.contact-info a:hover { color: var(--amber); border-color: var(--amber); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  border-radius: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--amber);
}

.contact-form textarea { min-height: 8rem; resize: vertical; }

.form-note {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.25rem;
}

.form-feedback {
  display: none;
  padding: 0.75rem 1rem;
  background: var(--amber-soft);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.form-feedback.is-visible { display: block; }

/* —— About —— */
.about-prose {
  max-width: 40rem;
  margin: 0 auto;
}

.about-prose p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 1.15rem;
}

.pending {
  color: var(--muted);
  font-style: italic;
}

/* —— Footer —— */
.site-footer {
  background: #111111;
  color: #9a9a9a;
  padding: 2.5rem 0 2rem;
  font-size: 0.8125rem;
  line-height: 1.85;
  text-align: center;
}

.site-footer p { margin-bottom: 0.35rem; }

.site-footer a {
  color: #9a9a9a;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.site-footer .disclaimer {
  max-width: 36rem;
  margin: 0 auto 1rem;
  color: #7a7a7a;
  font-size: 0.75rem;
}

/* —— Utilities —— */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: #111;
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
}
.skip-link:focus {
  left: var(--pad);
  top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* —— ZH typography —— */
html[lang="zh-CN"] .brand {
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: none;
}

html[lang="zh-CN"] .hero h1,
html[lang="zh-CN"] .page-hero h1 {
  text-transform: none;
  letter-spacing: 0.08em;
}

html[lang="zh-CN"] .section-label,
html[lang="zh-CN"] .service-col h3,
html[lang="zh-CN"] .contact-info dt,
html[lang="zh-CN"] .contact-form label {
  letter-spacing: 0.12em;
  text-transform: none;
}

/* —— Responsive —— */
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }

  .service-cols,
  .works-grid,
  .process-list,
  .two-up,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .process-list { gap: 2rem; }

  .hero { min-height: min(62vh, 480px); align-items: flex-end; }
  .hero--video { min-height: 0; padding-top: 1rem; }

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

@media (min-width: 561px) and (max-width: 860px) {
  .works-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* —— Vimeo click-to-play facade —— */
.vm-facade {
  position: absolute;
  inset: 0;
  background: #000;
}
.vm-facade.is-playing iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.vm-facade__btn {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
  display: block;
  width: 100%;
  height: 100%;
}
.vm-facade__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vm-facade__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 14px;
  background: #1ab7ea;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.vm-facade__play::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}
.vm-facade__btn:hover .vm-facade__play,
.vm-facade__btn:focus-visible .vm-facade__play {
  background: #00a1d6;
}
.vm-facade__fallback {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 0.35rem 0.6rem;
  border-radius: 2px;
}
.vm-facade__fallback:hover { color: #fff; background: rgba(0,0,0,0.75); }
.vm-facade.is-playing .vm-facade__fallback { display: none; }
.hero-media .vm-facade,
.embed-frame .vm-facade { z-index: 1; }
.embed-frame--live { border-color: #111; }
