:root {
  color-scheme: light;
  --page: #f6f4ef;
  --ink: #111316;
  --muted: #62666d;
  --line: rgba(17, 19, 22, 0.12);
  --panel: #ffffff;
  --panel-alt: #e8f4f1;
  --dark: #15171b;
  --dark-soft: #252a30;
  --accent: #f05d3b;
  --accent-2: #00a6a6;
  --accent-3: #b9ef4f;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body.public-site {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.public-site a {
  color: inherit;
  text-decoration: none;
}

body.public-site img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(var(--max), calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  mix-blend-mode: difference;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  overflow-wrap: anywhere;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  font-size: 11px;
  opacity: 0.78;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 750;
}

.site-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
}

.hero {
  min-height: 82vh;
  margin-top: -68px;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--dark);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.74;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.32) 48%, rgba(0, 0, 0, 0.12)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 42%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 130px 0 92px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 8.5em;
  font-size: clamp(54px, 13vw, 156px);
  line-height: 0.86;
  font-weight: 950;
}

.hero-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 28px;
}

.button-primary,
.button-secondary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 850;
  font-size: 14px;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

.hero-feature {
  position: absolute;
  z-index: 2;
  right: max(16px, calc((100vw - var(--max)) / 2));
  bottom: 22px;
  width: min(360px, calc(100% - 32px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(15, 17, 20, 0.48);
  backdrop-filter: blur(14px);
}

.hero-feature span,
.hero-feature small {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-feature strong {
  display: block;
  margin: 8px 0;
  font-size: 20px;
  line-height: 1.25;
}

.stats-band {
  width: min(var(--max), calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats-band article {
  min-height: 118px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-right: 1px solid var(--line);
}

.stats-band article:last-child {
  border-right: 0;
}

.stats-band strong {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.stats-band span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.intro-section,
.work-section,
.brand-section,
.contact-section,
.related-section,
.listing-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.intro-section {
  padding: 86px 0 42px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 42px;
  align-items: end;
}

.section-heading h2,
.contact-section h2,
.listing-hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1;
  font-weight: 920;
}

.intro-section > p,
.contact-card p,
.listing-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.filter-button,
.tag-cloud a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.work-section,
.brand-section,
.contact-section,
.related-section {
  padding-top: 86px;
}

.section-heading.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  border: 1px solid var(--line);
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.case-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.case-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.case-card.is-hidden {
  display: none;
}

.case-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--dark-soft);
  overflow: hidden;
}

.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.case-card:hover .case-media img {
  transform: scale(1.035);
}

.case-body {
  padding: 18px;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.case-meta a,
.tag-cloud a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.case-meta a {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
}

.case-body h3 {
  margin: 12px 0 0;
  font-size: 22px;
  line-height: 1.22;
}

.case-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.tag-cloud {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud a {
  padding: 0 12px;
}

.tag-cloud span {
  color: var(--accent-2);
}

.contact-section {
  padding-bottom: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: stretch;
}

.contact-card {
  padding: 24px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
}

.contact-card strong {
  display: block;
  font-size: 28px;
}

.contact-card .button-primary {
  margin-top: 18px;
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer-links a {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.footer-links {
  align-items: center;
}

.article-shell,
.related-section {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.article-hero {
  padding: 92px 0 34px;
}

.back-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}

.article-title {
  margin-top: 34px;
}

.article-title h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(38px, 8vw, 92px);
  line-height: 0.98;
  font-weight: 930;
}

.article-hero > img {
  width: 100%;
  max-height: 620px;
  margin-top: 30px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--dark-soft);
}

.ghost-content {
  padding: 28px 0 74px;
  color: #202327;
  font-size: 17px;
  line-height: 1.86;
}

.ghost-content p,
.ghost-content figure {
  margin: 0 0 24px;
}

.ghost-content img {
  height: auto;
  border-radius: 8px;
}

.ghost-content .kg-gallery-container {
  display: grid;
  gap: 12px;
}

.ghost-content .kg-gallery-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.ghost-content .kg-gallery-image img {
  width: 100%;
  background: #e1e4e1;
}

.listing-hero {
  padding: 104px 0 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111316;
    --ink: #f4f1ea;
    --muted: #aaa59e;
    --line: rgba(244, 241, 234, 0.14);
    --panel: #1c2025;
    --panel-alt: #172827;
  }

  .case-meta a,
  .tag-cloud a {
    background: rgba(255, 255, 255, 0.05);
  }

  .ghost-content {
    color: #f4f1ea;
  }
}

@media (max-width: 960px) {
  .stats-band,
  .case-grid,
  .case-grid.compact,
  .intro-section,
  .contact-section {
    grid-template-columns: 1fr 1fr;
  }

  .intro-section,
  .contact-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: min(var(--max), calc(100% - 20px));
    align-items: flex-start;
    padding-top: 10px;
  }

  .brand small {
    display: none;
  }

  .brand > span:not(.brand-mark) {
    display: none;
  }

  .site-nav {
    gap: 4px;
    font-size: 12px;
  }

  .site-nav a {
    padding: 0 7px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-copy,
  .intro-section,
  .work-section,
  .brand-section,
  .contact-section,
  .related-section,
  .listing-hero,
  .article-shell {
    width: min(var(--max), calc(100% - 20px));
  }

  .hero-copy {
    padding-bottom: 180px;
  }

  .hero-feature {
    left: 10px;
    right: 10px;
    width: auto;
  }

  .stats-band {
    width: min(var(--max), calc(100% - 20px));
    grid-template-columns: 1fr 1fr;
  }

  .stats-band article {
    min-height: 96px;
    padding: 16px;
  }

  .stats-band article:nth-child(2) {
    border-right: 0;
  }

  .stats-band article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .section-heading.split,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .filterbar {
    justify-content: flex-start;
  }

  .case-grid,
  .case-grid.compact {
    grid-template-columns: 1fr;
  }

  .ghost-content .kg-gallery-row {
    grid-template-columns: 1fr;
  }
}
