:root {
  --bg: #050505;
  --bg-2: #0b0b0b;
  --panel: rgba(255, 255, 255, 0.055);
  --text: #f6f1e8;
  --muted: #c9c1b4;
  --subtle: #8f887e;
  --gold: #c9a66b;
  --gold-light: #e0c08a;
  --rice: #d8b65d;
  --moon: #9ed6cf;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at 78% 8%, rgba(216, 182, 93, 0.14), transparent 30%),
    radial-gradient(circle at 16% 36%, rgba(158, 214, 207, 0.11), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 58%, #050505);
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(224, 192, 138, 0.72);
  outline-offset: 3px;
}

.case-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(16px);
}

.case-brand {
  font-size: 17px;
  font-weight: 900;
}

.case-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.case-nav a:hover,
.case-nav a.is-active {
  color: var(--gold-light);
}

.case-hero,
.case-section,
.case-footer-nav {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding-right: clamp(20px, 5vw, 72px);
  padding-left: clamp(20px, 5vw, 72px);
}

.case-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
  gap: clamp(30px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding-top: 66px;
  padding-bottom: 72px;
  overflow: hidden;
  isolation: isolate;
}

.gradient-blinds-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.28;
  mix-blend-mode: screen;
  pointer-events: none;
}

.case-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 36%, rgba(216, 182, 93, 0.18), transparent 28%),
    radial-gradient(circle at 18% 50%, rgba(158, 214, 207, 0.08), transparent 32%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.58), rgba(5, 5, 5, 0.16) 52%, rgba(5, 5, 5, 0.46));
}

.case-hero > *:not(.gradient-blinds-bg) {
  position: relative;
  z-index: 1;
}

.case-hero-copy {
  min-width: 0;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin: 10px 0 18px;
  color: var(--text);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(48px, 5.2vw, 86px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.case-hero h1,
.case-title {
  max-width: 980px;
  margin: 10px 0 18px;
  color: var(--text);
  font-family: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(48px, 5.2vw, 86px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.case-title span {
  display: block;
}

@media (min-width: 921px) {
  .case-title span {
    white-space: nowrap;
  }
}

h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.18;
}

h3 {
  color: var(--text);
  font-size: 20px;
  line-height: 1.35;
}

.case-subtitle {
  margin-bottom: 14px;
  color: var(--gold-light);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 900;
}

.case-intro {
  max-width: 760px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 17px;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.case-tags span {
  padding: 7px 11px;
  border: 1px solid rgba(201, 166, 107, 0.28);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
}

.case-meta {
  display: grid;
  gap: 12px;
}

.case-meta div {
  padding: 16px;
  border: 1px solid rgba(201, 166, 107, 0.22);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.case-meta span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.case-meta strong {
  color: var(--text);
  font-size: 15px;
}

.case-hero-visual {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 360px;
}

.hero-cover,
.visual-panel,
.motion-player,
.identity-card figure,
.scene-frame,
.operation-media {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 166, 107, 0.28);
  background:
    linear-gradient(rgba(201, 166, 107, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 166, 107, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 22% 18%, rgba(158, 214, 207, 0.13), transparent 30%),
    linear-gradient(135deg, rgba(201, 166, 107, 0.11), rgba(12, 12, 12, 0.96));
  background-size: 18px 18px, 18px 18px, auto, auto;
  box-shadow: var(--shadow);
}

.hero-cover,
.visual-panel,
.motion-player,
.scene-frame {
  width: min(100%, 1080px);
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 18px;
}

.hero-cover {
  border-radius: 20px;
}

.image-slot img,
.image-slot video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-video {
  background: #050505;
}

.image-slot span {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 24px;
  color: var(--text);
  text-align: center;
}

.image-slot span strong,
.image-slot span small {
  display: block;
}

.image-slot span small {
  color: var(--muted);
}

.image-slot.is-missing img,
.image-slot.is-missing video {
  display: none;
}

.image-slot img[hidden],
.image-slot video[hidden] {
  display: none;
}

.case-section {
  padding-top: 82px;
  padding-bottom: 82px;
  border-top: 1px solid rgba(201, 166, 107, 0.12);
  scroll-margin-top: 86px;
}

.case-section-heading {
  position: relative;
  max-width: 900px;
  margin-bottom: 30px;
  padding-left: 18px;
}

.case-section-heading::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 3px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-light), rgba(201, 166, 107, 0.08));
}

.case-section-heading p:not(.eyebrow) {
  max-width: 780px;
  color: var(--muted);
  font-size: 16px;
}

.motion-section .case-section-heading {
  max-width: none;
}

.motion-section .case-section-heading h2 {
  white-space: nowrap;
  font-size: clamp(28px, 2.55vw, 40px);
}

#operation .case-section-heading {
  max-width: none;
}

#operation .case-section-heading h2 {
  white-space: nowrap;
  font-size: clamp(28px, 2.55vw, 40px);
}

.split-showcase,
.motion-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
  gap: 22px;
  align-items: start;
}

.insight-card,
.motion-points,
.scene-caption {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(201, 166, 107, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022)),
    rgba(0, 0, 0, 0.18);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.3);
}

.insight-card article,
.motion-points article {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid rgba(201, 166, 107, 0.12);
}

.insight-card span,
.motion-points span,
.operation-grid span,
.final-grid span {
  color: var(--gold-light);
  font-weight: 900;
}

.motion-summary {
  display: grid;
  gap: 10px;
}

.motion-summary h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.22;
}

.motion-summary p {
  max-width: 28em;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.motion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 4px;
}

.motion-tags span {
  padding: 7px 11px;
  color: var(--gold-light);
  border: 1px solid rgba(201, 166, 107, 0.34);
  border-radius: 999px;
  background: rgba(201, 166, 107, 0.07);
  font-size: 13px;
  font-weight: 800;
}

.insight-card p,
.motion-points p,
.identity-card p,
.operation-grid p,
.final-grid p,
.scene-caption p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.play-button {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #070707;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.28s var(--ease), filter 0.28s var(--ease);
}

.play-button:hover,
.play-button:focus-visible {
  filter: brightness(1.06);
  transform: translate(-50%, -50%) scale(1.04);
}

.motion-player.is-playing .play-button,
.motion-player.is-playing > img {
  display: none;
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.identity-card {
  padding: 18px;
  border: 1px solid rgba(201, 166, 107, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.identity-card figure {
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  border-radius: 14px;
}

.scene-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.scene-tabs button {
  flex: 1 0 210px;
  padding: 14px;
  color: var(--muted);
  text-align: left;
  border: 1px solid rgba(201, 166, 107, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.scene-tabs button.is-active {
  color: var(--text);
  border-color: rgba(224, 192, 138, 0.62);
  background: rgba(201, 166, 107, 0.08);
}

.scene-tabs strong,
.scene-tabs span {
  display: block;
}

.scene-tabs span {
  margin-top: 4px;
  font-size: 12px;
}

.scene-browser {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.scene-main {
  position: relative;
}

.scene-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--gold-light);
  border: 1px solid rgba(201, 166, 107, 0.36);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.76);
  cursor: pointer;
  transform: translateY(-50%);
}

.scene-arrow[data-scene-prev] {
  left: 12px;
}

.scene-arrow[data-scene-next] {
  right: 12px;
}

.scene-thumbs {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.scene-thumb {
  flex: 0 0 116px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(201, 166, 107, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.scene-thumb.is-active {
  border-color: rgba(224, 192, 138, 0.78);
}

.scene-thumb img,
.scene-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operation-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--gold-light);
  font-weight: 900;
}

.operation-flow i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(224, 192, 138, 0.62), transparent);
}

.operation-grid,
.final-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.operation-grid article,
.final-grid article {
  overflow: hidden;
  border: 1px solid rgba(201, 166, 107, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.operation-grid article {
  display: flex;
  flex-direction: column;
  min-height: 390px;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease);
}

.operation-grid article:hover {
  border-color: rgba(224, 192, 138, 0.46);
  transform: translateY(-3px);
}

.operation-copy {
  padding: 18px;
}

.operation-copy em {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 9px;
  color: var(--gold-light);
  border: 1px solid rgba(201, 166, 107, 0.22);
  border-radius: 999px;
  background: rgba(201, 166, 107, 0.07);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.operation-media {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 170px;
  margin: auto 0 0;
  border-top: 1px solid rgba(201, 166, 107, 0.18);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 900;
}

.btn-primary {
  color: #070707;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(201, 166, 107, 0.38);
}

.final-cta,
.case-footer-nav {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.case-footer-nav {
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 34px;
  padding-bottom: 56px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #050505;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .case-hero,
  .split-showcase,
  .motion-grid,
  .scene-browser {
    grid-template-columns: 1fr;
  }

  .case-hero-visual {
    width: min(100%, 760px);
  }

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

  .scene-caption {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .case-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .case-nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .case-hero {
    min-height: auto;
    padding-top: 48px;
    padding-bottom: 54px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 48px);
    white-space: normal;
  }

  .case-hero h1,
  .case-title {
    font-size: clamp(34px, 10vw, 48px);
    letter-spacing: -0.02em;
  }

  .case-title span {
    white-space: normal;
  }

  .motion-section .case-section-heading h2 {
    white-space: normal;
  }

  #operation .case-section-heading h2 {
    white-space: normal;
  }

  .case-section {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .identity-grid,
  .operation-grid,
  .final-grid {
    grid-template-columns: 1fr;
  }

  .operation-grid article {
    min-height: auto;
  }

  .operation-media {
    min-height: 210px;
  }

  .scene-arrow {
    width: 38px;
    height: 38px;
  }

  .operation-flow {
    align-items: stretch;
    flex-direction: column;
  }

  .operation-flow i {
    width: 1px;
    min-height: 18px;
  }
}

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

  .reveal-item {
    opacity: 1;
    transform: none;
  }
}


/* Selective black-gold edge glow. Used only on key portfolio/case surfaces. */
.border-glow-card {
  --glow-x: 50%;
  --glow-y: 50%;
  --edge-opacity: 0;
  --border-glow-alpha: 0.52;
  position: relative;
  isolation: isolate;
  transform: translate3d(0, 0, 0);
}

.border-glow-card::before,
.border-glow-card::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.28s var(--ease, cubic-bezier(0.2, 0.8, 0.2, 1));
}

.border-glow-card::before {
  inset: -1px;
  z-index: 5;
  padding: 1px;
  background:
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(224, 192, 138, 0.98), transparent 22%),
    radial-gradient(circle at calc(100% - var(--glow-x)) calc(100% - var(--glow-y)), rgba(141, 106, 53, 0.48), transparent 32%),
    linear-gradient(135deg, rgba(224, 192, 138, 0.42), rgba(201, 166, 107, 0.08));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: calc(var(--edge-opacity) * var(--border-glow-alpha));
}

.border-glow-card::after {
  inset: -14px;
  z-index: -1;
  background: radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(224, 192, 138, 0.18), transparent 38%);
  filter: blur(4px);
  opacity: calc(var(--edge-opacity) * 0.55);
}

.border-glow-card.border-glow-contact {
  --border-glow-alpha: 0.68;
}

.border-glow-card.border-glow-hero,
.border-glow-card.border-glow-media {
  --border-glow-alpha: 0.62;
}

.border-glow-card.border-glow-soft {
  --border-glow-alpha: 0.42;
}

@media (prefers-reduced-motion: reduce), (hover: none) {
  .border-glow-card::before,
  .border-glow-card::after {
    display: none;
  }
}

/* Stage 4H: narrow-screen layout guardrails. */
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

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

  .case-hero,
  .case-section,
  .motion-grid,
  .identity-grid,
  .scene-layout,
  .operation-grid,
  .final-grid,
  .case-footer-nav {
    grid-template-columns: 1fr !important;
    max-width: 100%;
    overflow-x: clip;
  }

  .case-copy,
  .case-hero-visual,
  .visual-panel,
  .motion-player,
  .scene-frame {
    width: 100%;
    max-width: 100%;
  }

  .visual-panel,
  .motion-player,
  .scene-frame,
  .case-hero-visual {
    aspect-ratio: 16 / 9;
  }

  .visual-panel img,
  .visual-panel video,
  .motion-player video,
  .scene-frame img,
  .scene-frame video,
  .case-hero-visual video {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .motion-points,
  .scene-caption {
    width: 100%;
    max-width: 100%;
  }

  .case-footer-nav {
    display: grid;
    gap: 12px;
    padding-inline: 5vw;
  }
}

@media (max-width: 640px) {
  .case-shell,
  .case-section,
  .case-hero {
    padding-left: 4.5vw;
    padding-right: 4.5vw;
  }

  .case-hero {
    min-height: auto;
    padding-top: 84px;
    padding-bottom: 44px;
  }

  .case-copy h1,
  .case-section-heading h2 {
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1.12;
  }

  .case-lead,
  .case-section-heading p {
    font-size: 15px;
  }

  .motion-tags,
  .case-meta {
    flex-wrap: wrap;
  }

  .case-footer-nav .btn {
    width: 100%;
  }
}
