:root {
  color-scheme: light;
  --paper: #faf8f4;
  --white: #fff;
  --ink: #232323;
  --muted: #57565b;
  --line: #dfdbd4;
  --red: #d4301b;
  --red-deep: #b20800;
  --display: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(20px, 4.7vw, 72px);
  font-family: "Manrope", var(--display);
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red-deep); outline-offset: 5px; }

.wrap {
  width: min(1296px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 12;
  inset: 12px auto auto 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.masthead { background: var(--paper); }
.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 15px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.brand img { width: 110px; height: auto; }
.brand-divider { display: block; width: 1px; height: 22px; background: var(--line); }
.masthead-cases { font-size: 14px; font-weight: 650; }
.masthead-site {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13px;
  white-space: nowrap;
}

.masthead-site:hover, .masthead-cases:hover, .footer a:hover { color: var(--red-deep); }

.hero {
  overflow: hidden;
  isolation: isolate;
  position: relative;
  color: #fffafa;
  background:
    radial-gradient(ellipse at 78% 30%, #ec5747 0%, transparent 58%),
    linear-gradient(118deg, #aa1d12 3%, var(--red) 53%, #bf2217 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: clamp(500px, 45vw, 655px);
}

.hero-copy { position: relative; z-index: 2; padding-block: 72px; }
.hero h1, .cases h2, .case-body h3 { font-family: var(--display); }

.hero h1 {
  max-width: 7em;
  margin: 0;
  font-size: clamp(72px, 8.4vw, 136px);
  font-weight: 850;
  line-height: .99;
  letter-spacing: -.09em;
  text-wrap: nowrap;
}

.hero h1 span {
  display: block;
  margin: 0 0 12px 3px;
  font-size: .49em;
  font-weight: 800;
  letter-spacing: -.06em;
}

.hero-copy p {
  max-width: 22em;
  margin: 26px 0 30px 4px;
  color: #fff2ed;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.85;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 29px;
  margin-left: 4px;
  min-height: 49px;
  padding: 10px 17px 10px 19px;
  color: #88170e;
  background: #fff8f3;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  transition: background 160ms, transform 160ms;
}

.hero-action:hover { background: var(--white); transform: translateY(-2px); }
.hero-action:focus-visible { outline-color: var(--white); }
.hero-action span { font-size: 19px; line-height: 1; }

.hero-art {
  position: relative;
  align-self: stretch;
  min-width: 0;
  isolation: isolate;
  pointer-events: none;
  --mouse-x: 0px;
  --mouse-y: 0px;
}

.art-halo {
  position: absolute;
  inset: 11% 5% 10% -5%;
  border-radius: 50%;
  background: radial-gradient(circle at 47% 43%, #fff6e65c, #f9b49b24 56%, transparent 72%);
}

.art-orbit {
  position: absolute;
  inset: 20% -21% 18% -34%;
  border: clamp(14px, 2.85vw, 48px) solid #fff6e62e;
  border-right-color: #fff6e60e;
  border-bottom-color: #fff6e646;
  border-radius: 50%;
  transform: rotate(-19deg) translate(var(--mouse-x), var(--mouse-y));
  transition: transform 180ms ease-out;
}

.art-spark {
  position: absolute;
  z-index: 1;
  width: 8px;
  height: 8px;
  top: 23%;
  right: 9%;
  background: #ffdfc7;
  box-shadow: 0 0 26px #ffdbbd8a;
  transform: rotate(45deg);
}

.mascot {
  position: absolute;
  z-index: 2;
  width: clamp(430px, 43.5vw, 640px);
  right: 3%;
  bottom: 0;
  transform: translate(var(--mouse-x), var(--mouse-y));
  transition: transform 180ms ease-out;
}

.mascot img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 32px #6f160c4d);
  animation: mascot-in 720ms cubic-bezier(.2,.7,.2,1) both;
}

@keyframes mascot-in {
  from { opacity: 0; transform: translate(18px, 12px) rotate(3deg); }
  to { opacity: 1; transform: none; }
}

.cases { padding-block: clamp(48px, 7vw, 98px) clamp(60px, 8vw, 115px); scroll-margin-top: 14px; }
.cases-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 27px;
}

.case-count { margin: 0 0 8px; color: var(--red-deep); font-size: 13px; font-weight: 750; }
.cases h2 { margin: 0; font-size: clamp(38px, 4.3vw, 65px); line-height: 1; letter-spacing: -.06em; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.filters button {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.filters button:hover { color: var(--red-deep); }
.filters button[aria-pressed="true"] { color: var(--white); background: var(--ink); }

.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.case-card {
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: border-color 180ms, box-shadow 180ms;
}

.case-card:hover { border-color: #c9a299; box-shadow: 0 14px 34px #421c1010; }
.case-media { position: relative; overflow: hidden; aspect-ratio: 12 / 7; background: #222; }
.case-film .case-media { background: #89141d; }
.case-globe .case-media { background: #e5e5e5; }
.case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 350ms cubic-bezier(.2,.7,.2,1); }
.case-card:hover img { transform: scale(1.035); }
.case-body { display: flex; flex: 1; flex-direction: column; padding: clamp(15px, 2vw, 25px); }
.case-meta { display: flex; gap: 9px; align-items: center; margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.case-meta span { padding-right: 9px; border-right: 1px solid var(--line); color: var(--red-deep); font: 650 11px var(--mono); }
.case-body h3 { margin: 0; font-size: clamp(19px, 2.05vw, 31px); font-weight: 800; line-height: 1.25; letter-spacing: -.045em; }
.case-description { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.case-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 14px;
  margin-top: auto;
  padding-top: 12px;
}

.case-preview-trigger, .case-original {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 6px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.case-preview-trigger {
  padding: 0;
  border: 0;
  color: var(--red-deep);
  background: transparent;
  cursor: pointer;
}

.case-preview-trigger::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 13px;
  content: "";
}

.case-preview-trigger:focus-visible::after { outline: 3px solid var(--red-deep); outline-offset: -3px; }
.case-original { position: relative; z-index: 2; color: var(--muted); }
.case-original:hover { color: var(--red-deep); text-decoration: underline; }

.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 13px; }
.footer a { padding-block: 10px; white-space: nowrap; }
.footer a span { margin-left: 4px; }

html:has(.case-preview[open]) { overflow: hidden; }

.case-preview {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--ink);
  background: var(--paper);
}

.case-preview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }

.preview-bar {
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  align-items: center;
  gap: 16px;
  padding: max(9px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 9px max(24px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}

.preview-bar h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(14px, 1.7vw, 20px);
  line-height: 1.4;
}

.preview-actions { display: flex; justify-self: end; gap: 8px; }

.preview-back, .preview-copy, .preview-original {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.preview-back { justify-self: start; color: var(--ink); background: var(--white); cursor: pointer; }
.preview-copy { color: var(--ink); background: var(--white); cursor: pointer; }
.preview-original { justify-self: end; color: var(--red-deep); }
.preview-back:hover, .preview-copy:hover, .preview-original:hover { color: var(--red-deep); border-color: #c9a299; }
.preview-stage { position: relative; min-height: 0; background: var(--white); }
.preview-stage iframe { display: block; width: 100%; height: 100%; border: 0; }

.preview-loading {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 50%;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  pointer-events: none;
}

.preview-share {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 10px 24px #23232319;
  transform: translateX(-50%);
}

.preview-share-status { margin: 0; font-size: 13px; }
.preview-share-manual { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.preview-share-url {
  min-width: 0;
  width: min(360px, 100%);
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: 16px var(--mono);
}

.preview-share-close {
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}

.preview-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px max(24px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
}

.preview-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.preview-step:not([aria-disabled="true"]):hover { color: var(--red-deep); border-color: #c9a299; }
.preview-step[aria-disabled="true"] { color: var(--muted); opacity: .56; cursor: default; }
.preview-position {
  min-width: 38px;
  color: var(--muted);
  text-align: center;
  font: 650 12px var(--mono);
  white-space: nowrap;
}

@media (max-width: 950px) {
  .hero-inner { min-height: 480px; }
  .hero h1 { font-size: clamp(59px, 9vw, 96px); }
  .mascot { right: -5%; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 630px) {
  .masthead-inner { grid-template-columns: 1fr auto; min-height: 62px; gap: 10px; }
  .brand { gap: 8px; font-size: 12px; }
  .brand img { width: 84px; }
  .brand-divider { height: 17px; }
  .masthead-cases { display: none; }
  .masthead-site { padding: 8px 10px; gap: 4px; font-size: 11px; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 42px 0 0; }
  .hero h1 { font-size: clamp(62px, 14vw, 90px); }
  .hero h1 span { margin-bottom: 7px; }
  .hero-copy p { margin-top: 17px; margin-bottom: 19px; font-size: 14px; }
  .hero-action { min-height: 43px; font-size: 13px; }
  .hero-art { height: clamp(238px, 65vw, 345px); }
  .art-halo { inset: 0 -6% 0 7%; }
  .art-orbit { inset: 18% -15% 18% -43%; border-width: 22px; }
  .art-spark { top: 24%; right: 14%; width: 6px; height: 6px; }
  .mascot { width: clamp(315px, 88vw, 435px); right: 4%; bottom: -7%; }
  .cases-heading { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
  .case-grid { grid-template-columns: 1fr; }
  .filters button { padding: 8px 12px; }
  .footer-inner { min-height: 70px; font-size: 12px; }
  .preview-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 7px max(12px, env(safe-area-inset-left)); }
  .preview-bar h2 { grid-column: 1 / -1; grid-row: 2; }
  .preview-actions { gap: 6px; }
  .preview-back, .preview-copy, .preview-original { min-height: 44px; padding-inline: 9px; gap: 4px; font-size: 12px; }
  .preview-navigation { gap: 10px; padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); }
  .preview-step { flex: 1; padding-inline: 8px; }
}

@media (max-width: 350px) {
  .brand-divider, .brand > span:last-child { display: none; }
  .hero h1 { font-size: 59px; }
  .mascot { right: -6%; }
}

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