:root {
  color-scheme: dark;
  --ink: #f3f0e8;
  --muted: #a7a095;
  --soft: #d8d1c5;
  --paper: #090909;
  --surface: #111111;
  --surface-2: #171717;
  --line: rgba(243, 240, 232, 0.16);
  --line-strong: rgba(243, 240, 232, 0.3);
  --accent: #ff4b2f;
  --accent-blue: #5da9ff;
  --accent-gold: #d8a841;
  --accent-green: #41c28b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    "Inter",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 75, 47, 0.1), rgba(9, 9, 9, 0) 360px),
    var(--paper);
}

body.modal-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

p,
h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 68px);
  color: var(--ink);
  background: rgba(9, 9, 9, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.94rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #090909;
  background: var(--ink);
  border-radius: 50%;
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.nav-links a {
  min-height: 38px;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  min-height: 790px;
  padding: 84px clamp(18px, 5vw, 68px) 34px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "MARS XPO";
  position: absolute;
  right: clamp(18px, 5vw, 68px);
  top: 92px;
  z-index: 1;
  color: rgba(243, 240, 232, 0.12);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-video,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.72) contrast(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(9, 9, 9, 0.94) 0%, rgba(9, 9, 9, 0.72) 48%, rgba(9, 9, 9, 0.38) 100%),
    linear-gradient(0deg, rgba(9, 9, 9, 0.92), rgba(9, 9, 9, 0.12));
}

.hero-content,
.hero-rail {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 920px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  display: grid;
  gap: 6px;
  max-width: 960px;
  font-size: 6rem;
  line-height: 0.96;
  font-weight: 950;
  text-transform: uppercase;
}

h1 span:last-child {
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 240, 232, 0.74);
}

h2 {
  font-size: 3.8rem;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.18;
  font-weight: 900;
}

.hero-copy {
  max-width: 680px;
  margin-top: 26px;
  color: var(--soft);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.button-primary {
  color: #090909;
  background: var(--ink);
  border-color: var(--ink);
}

.button-quiet {
  color: var(--ink);
  background: rgba(243, 240, 232, 0.04);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  max-width: 640px;
  margin: 48px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.metrics div {
  min-width: 0;
}

.metrics dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics dd {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 950;
}

.hero-rail {
  display: grid;
  gap: 10px;
  align-self: end;
}

.rail-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 100px;
  padding: 10px;
  text-align: left;
  background: rgba(17, 17, 17, 0.72);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.rail-item:hover {
  border-color: var(--line-strong);
  background: rgba(243, 240, 232, 0.07);
}

.rail-thumb {
  position: relative;
  min-height: 78px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-2);
}

.rail-thumb .media-shell {
  position: absolute;
  inset: 0;
}

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

.rail-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.3;
}

.rail-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section {
  padding: 92px clamp(18px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
  gap: 28px;
  align-items: end;
  max-width: 1360px;
  margin: 0 auto 34px;
}

.section-head > p {
  color: var(--muted);
  line-height: 1.8;
}

.section-head-stacked {
  align-items: start;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 260px;
  gap: 14px;
  max-width: 1360px;
  margin: 0 auto;
}

.feature-card,
.work-card {
  position: relative;
  display: grid;
  align-items: end;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.feature-card {
  grid-column: span 4;
}

.feature-card:first-child {
  grid-column: span 8;
  grid-row: span 2;
}

.feature-card:nth-child(4),
.feature-card:nth-child(5) {
  grid-column: span 6;
}

.feature-card::after,
.work-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 72%;
  background: linear-gradient(180deg, rgba(9, 9, 9, 0), rgba(9, 9, 9, 0.9));
  pointer-events: none;
}

.media-shell {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
}

.media-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 75, 47, 0.16), transparent 42%),
    linear-gradient(0deg, rgba(9, 9, 9, 0.18), transparent);
  pointer-events: none;
}

.media-shell img,
.media-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 460ms ease,
    opacity 180ms ease,
    filter 180ms ease;
}

.media-shell video {
  opacity: 0.96;
}

.media-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(243, 240, 232, 0.58);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-copy {
  position: relative;
  z-index: 2;
  padding: 18px;
}

.card-kicker,
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  color: var(--ink);
  background: rgba(9, 9, 9, 0.68);
  border: 1px solid rgba(243, 240, 232, 0.18);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-copy h3 {
  margin-top: 12px;
}

.card-copy p {
  margin-top: 8px;
  color: rgba(243, 240, 232, 0.72);
  font-size: 0.88rem;
  line-height: 1.55;
}

.feature-card:first-child h3 {
  max-width: 680px;
  font-size: 2.25rem;
}

.feature-card:hover .media-shell img,
.feature-card:hover .media-shell video,
.work-card:hover .media-shell img,
.work-card:hover .media-shell video {
  transform: scale(1.04);
  filter: saturate(1.08);
}

.category-section {
  background: #0d0d0d;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  max-width: 1360px;
  margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line);
}

.category-tile {
  min-height: 230px;
  padding: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-top: 4px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  text-align: left;
}

.category-tile h3 {
  min-height: 48px;
  margin-bottom: 28px;
  font-size: 1.02rem;
}

.category-tile strong {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 3.3rem;
  line-height: 1;
  font-weight: 950;
}

.category-tile p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.category-tile:hover {
  background: var(--surface);
}

.works-section {
  background:
    linear-gradient(180deg, rgba(93, 169, 255, 0.08), transparent 360px),
    var(--paper);
}

.search-box {
  display: grid;
  gap: 10px;
  min-width: min(390px, 100%);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(167, 160, 149, 0.78);
}

.search-box input:focus {
  border-color: var(--ink);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1360px;
  margin: 0 auto 24px;
}

.filter-button {
  min-height: 40px;
  padding: 9px 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.filter-button[aria-selected="true"] {
  color: #090909;
  background: var(--ink);
  border-color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1360px;
  margin: 0 auto;
}

.work-card {
  min-height: 300px;
  aspect-ratio: 16 / 11;
}

.work-card .card-copy {
  padding: 16px;
}

.work-card h3 {
  font-size: 1.08rem;
}

.work-card p {
  font-size: 0.8rem;
}

.empty-state {
  max-width: 1360px;
  margin: 28px auto 0;
  padding: 22px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(18px, 5vw, 68px);
  color: var(--muted);
  background: #070707;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1180px, 100%);
  max-height: min(90vh, 880px);
  overflow: hidden;
  background: #090909;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.modal-topbar,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: var(--ink);
}

.modal-category,
.modal-footer p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-topbar h3 {
  margin-top: 5px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--ink);
}

.modal-media {
  display: grid;
  place-items: center;
  min-height: 280px;
  background: #030303;
}

.modal-media video,
.modal-media img {
  width: 100%;
  max-height: calc(90vh - 150px);
  object-fit: contain;
}

.modal-footer {
  border-top: 1px solid var(--line);
}

.modal-footer .button-quiet {
  min-height: 40px;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 760px;
  }

  h1 {
    font-size: 5rem;
  }

  h2 {
    font-size: 3rem;
  }

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

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 320px;
  }

  .feature-card,
  .feature-card:first-child,
  .feature-card:nth-child(4),
  .feature-card:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
  }

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

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

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    padding-inline: 8px;
  }

  .hero {
    min-height: 720px;
    padding-top: 58px;
  }

  .hero::before {
    display: none;
  }

  h1 {
    font-size: 3.1rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

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

  .hero-rail,
  .featured-grid,
  .category-strip,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .rail-item {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .section {
    padding-block: 62px;
  }

  .section-head,
  .section-head-stacked {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .featured-grid {
    grid-auto-rows: 280px;
  }

  .feature-card:first-child h3 {
    font-size: 1.25rem;
  }

  .category-tile {
    min-height: 180px;
  }

  .work-card {
    min-height: 0;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: 94vh;
  }

  .modal-topbar,
  .modal-footer {
    align-items: start;
  }

  .modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal-footer p {
    grid-column: 1 / -1;
    order: -1;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
