:root {
  --green: #dcf7d7;
  --paper: #fbfbfa;
  --tile: #e2e2e0;
  --tile-text: #bebebb;
  --ink: #050505;
  --bar: #f1f1f1;
  --type-nav: 12px;
  --type-small: 13px;
  --type-body: clamp(16px, 1.05vw, 18px);
  --type-section: clamp(24px, 2vw, 32px);
  --type-display: clamp(72px, 6vw, 96px);
  --type-metric: clamp(36px, 3vw, 48px);
  --max: 1700px;
  --gap: clamp(12px, 1vw, 18px);
  --edge: clamp(18px, 2.4vw, 44px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("assets/bg-flow-green-expanded-sat40.gif");
  background-position: 50% 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
  align-items: start;
  width: min(100%, var(--max));
  padding: 28px var(--edge) 0;
  isolation: isolate;
  mix-blend-mode: multiply;
  transform: translateX(-50%);
}

.site-header::before {
  position: absolute;
  top: 6px;
  right: 10px;
  left: 10px;
  z-index: -1;
  height: 44px;
  border: none;
  border-radius: 5px;
  background: rgba(251, 251, 250, 0.8);
  box-shadow: 0 12px 34px rgba(25, 35, 43, 0.08);
  backdrop-filter: blur(18px);
  content: "";
  opacity: 0;
  transition: opacity 180ms ease;
}

.site-header.has-backdrop {
  mix-blend-mode: normal;
}

.site-header.has-backdrop::before {
  opacity: 1;
}

.nav-primary {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.nav-about {
  justify-self: end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.74);
  font: inherit;
  font-size: var(--type-nav);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--ink);
  transform: translateY(-1px);
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  overflow: hidden;
  padding: 116px var(--edge) clamp(34px, 4.2vw, 72px);
  background-color: var(--green);
  background-image: url("assets/highlight/home_bg_gif.gif");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-copy {
  width: min(100%, var(--max));
  max-width: var(--max);
  margin: 0 auto clamp(22px, 3.2vw, 54px);
}

.hero-copy p {
  margin: 0;
  max-width: 1160px;
  font-size: clamp(18px, 1.42vw, 28px);
  font-weight: 400;
  line-height: 1.13;
}

h1 {
  width: min(100%, var(--max));
  margin: 0 auto;
  color: #000;
  font-size: clamp(74px, 12.2vw, 210px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  white-space: nowrap;
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(var(--gap) * 2);
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(144px, 14vw, 240px) var(--edge) clamp(34px, 3.8vw, 58px);
}

.project-card {
  position: relative;
  display: flex;
  min-height: clamp(220px, 20vw, 360px);
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 104px);
  background: var(--tile);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--tile-text);
  isolation: isolate;
  transition:
    transform 180ms ease;
}

.project-card::before {
  position: absolute;
  top: clamp(20px, 1.7vw, 30px);
  left: clamp(22px, 2vw, 36px);
  z-index: 2;
  color: rgba(0, 0, 0, 0.44);
  content: attr(data-index);
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 180ms ease;
}

.project-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(226, 226, 224, 0.5);
  opacity: 0;
  content: "";
  transition: opacity 180ms ease;
  pointer-events: none;
}

.project-card-content {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 100%;
  opacity: 0;
  transition: opacity 180ms ease;
}

.project-title {
  display: block;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: clamp(32px, 3.8vw, 69px);
  font-weight: 400;
  line-height: 1.08;
  white-space: nowrap;
}

.project-subtitle {
  display: block;
  margin-top: 0.4em;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: clamp(11px, 1.26vw, 23px);
  font-weight: 400;
  line-height: 1.2;
}

.project-card-cover-1 {
  background-image: url("assets/highlight/highlight cover 1.png");
}

.project-card-cover-2 {
  background-image: url("assets/highlight/highlight cover 2.png");
}

.project-card-cover-3 {
  background-image: url("assets/highlight/highlight cover 3.png");
}

.project-card-cover-4 {
  background-image: url("assets/highlight/highlight cover 4.png");
}

.project-card-large {
  align-items: flex-start;
}

.project-card:hover,
.project-card:focus-visible,
.project-card.is-hovered {
  color: #0b0b0b;
  transform: translateY(-4px);
}

.project-card:hover::before,
.project-card:focus-visible::before,
.project-card.is-hovered::before {
  opacity: 1;
}

.project-card:hover::after,
.project-card:focus-visible::after,
.project-card.is-hovered::after {
  opacity: 1;
}

.project-card:hover .project-card-content,
.project-card:focus-visible .project-card-content,
.project-card.is-hovered .project-card-content {
  opacity: 1;
}

.spacer-section {
  display: none;
}

.contact-bar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - (var(--edge) * 2)), 1500px);
  min-height: 62px;
  margin: clamp(14px, 2vw, 34px) auto clamp(42px, 5vw, 84px);
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--bar);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.04);
}

.email-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: #171717;
  font-size: 16px;
  font-weight: 800;
}

.email-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.social-links {
  display: flex;
  gap: 7px;
  align-items: center;
}

.social-link {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  filter: saturate(1.12);
  transform: translateY(-2px);
}

.social-in {
  background: #335aa8;
}

.social-github {
  background: #24292f;
}

.social-itch {
  background: #fa5c5c;
}

.social-douyin {
  background: #111;
}

.social-link svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
}

.social-itch svg {
  color: #fff;
}

.social-douyin svg {
  color: #fff;
}

.douyin-cyan {
  fill: #25f4ee;
}

.douyin-red {
  fill: #fe2c55;
}

.case-page {
  background: var(--paper);
}

.case-page .site-header {
  position: fixed;
}

.case-intro {
  position: relative;
  display: grid;
  min-height: 54svh;
  overflow: hidden;
  place-items: center;
  padding: 96px var(--edge) 54px;
  background: #dff7dc;
}

.case-intro::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("assets/social-media/social-media-hero-clean.png") center / cover no-repeat;
  content: "";
  filter: saturate(0.98) brightness(1.02);
}

.case-intro::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(220, 247, 215, 0.18);
  content: "";
}

.logo-stage {
  position: relative;
  z-index: 2;
  width: min(100%, 1200px);
  height: min(36vw, 340px);
  min-height: 210px;
}

.hero-logo {
  position: absolute;
  top: 50%;
  display: block;
  width: clamp(220px, 20vw, 365px);
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  filter: drop-shadow(0 24px 34px rgba(39, 76, 45, 0.16));
  transform: translate(-50%, -50%) scale(0.7);
  transform-origin: center;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.hero-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.logo-flowly {
  left: 79%;
}

.logo-hooroo {
  left: 50%;
}

.logo-watchverse {
  left: 21%;
}

.hero-logo:hover,
.hero-logo:focus-visible {
  filter: drop-shadow(0 28px 44px rgba(39, 76, 45, 0.24));
  animation: logo-shake 520ms ease-in-out both;
  transform: translate(-50%, -50%) scale(0.9);
  outline: none;
}

@keyframes logo-shake {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.9) rotate(0deg);
  }

  20% {
    transform: translate(calc(-50% - 4px), calc(-50% + 2px)) scale(0.9) rotate(-1.4deg);
  }

  42% {
    transform: translate(calc(-50% + 4px), calc(-50% - 2px)) scale(0.9) rotate(1.2deg);
  }

  64% {
    transform: translate(calc(-50% - 2px), calc(-50% - 1px)) scale(0.9) rotate(-0.7deg);
  }

  82% {
    transform: translate(calc(-50% + 2px), calc(-50% + 1px)) scale(0.9) rotate(0.5deg);
  }
}

.case-study {
  width: 100%;
  margin: 0;
  padding: 42px var(--edge) 112px;
  background:
    radial-gradient(circle at 18% 30%, rgba(191, 229, 255, 0.79), rgba(191, 229, 255, 0) 34%),
    radial-gradient(circle at 54% 42%, rgba(207, 243, 220, 0.86), rgba(207, 243, 220, 0) 34%),
    radial-gradient(circle at 88% 46%, rgba(255, 220, 206, 0.84), rgba(255, 220, 206, 0) 32%),
    linear-gradient(135deg, #fbfbfa 0%, #f2f9ff 38%, #fbfbfa 72%, #fff3ee 100%);
}

.case-block {
  width: min(100%, var(--max));
  margin-right: auto;
  margin-left: auto;
  margin-bottom: clamp(86px, 11vw, 180px);
  scroll-margin-top: 92px;
}

.case-copy {
  max-width: none;
  margin-bottom: 24px;
  padding: 0 clamp(34px, 5vw, 80px);
}

.case-copy h1,
.case-copy h2 {
  width: auto;
  margin: 0 0 28px;
  color: var(--ink);
  font-size: var(--type-display);
  font-weight: 400;
  line-height: 0.96;
  white-space: normal;
}

.case-kicker {
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(5, 5, 5, 0.58);
  font-size: var(--type-body);
  font-weight: 700;
  line-height: 1.3;
}

.case-copy p {
  max-width: 1280px;
  margin: 0 0 20px;
  font-size: var(--type-body);
  line-height: 1.45;
}

.case-copy .case-meta {
  margin-top: 6px;
  font-size: var(--type-small);
  font-weight: 700;
}

.dashboard-panel {
  margin-top: 20px;
  padding: clamp(34px, 5vw, 80px);
  background: transparent;
  color: var(--ink);
}

.dashboard-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: clamp(40px, 5vw, 84px);
}

.dashboard-tabs span,
.dashboard-tabs a,
.dashboard-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(5, 5, 5, 0.12);
  border-radius: 999px;
  background: rgba(251, 251, 250, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--type-small);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(25, 35, 43, 0.06);
}

.dashboard-tabs svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.dashboard-tabs a:hover,
.dashboard-tabs a:focus-visible,
.dashboard-tabs button:hover,
.dashboard-tabs button:focus-visible,
.dashboard-tabs .is-active {
  border-color: transparent;
  background: #d7ede0;
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(25, 35, 43, 0.12);
  transform: translateY(-1px);
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-profile {
  display: block;
}

.dashboard-heading strong {
  display: block;
  font-size: var(--type-section);
  line-height: 1;
}

.dashboard-heading small {
  display: block;
  color: rgba(16, 53, 15, 0.66);
  font-size: var(--type-small);
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 112px;
  padding: 20px;
  border-radius: 22px;
  background: #d7ede0;
  color: #143a12;
}

.demo-card {
  min-height: 112px;
  padding: 20px;
  background: #d7ede0;
  color: #143a12;
}

.metric-card small {
  display: block;
  margin-bottom: 14px;
  color: rgba(20, 58, 18, 0.68);
  font-size: var(--type-small);
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: var(--type-metric);
  line-height: 1;
}

.metric-wide {
  grid-column: span 2;
}

.audience-section h2,
.recent-posts h2 {
  margin: 0 0 18px;
  font-size: var(--type-section);
  font-weight: 500;
}

.audience-section {
  margin-top: clamp(22px, 4vw, 68px);
}

.audience-lede {
  margin: -8px 0 34px;
  color: rgba(5, 5, 5, 0.58);
  font-size: var(--type-body);
}

.demographic-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.16fr);
  gap: 30px;
}

.demo-card {
  min-height: 112px;
  padding: clamp(26px, 3vw, 42px);
  border: 1px solid rgba(5, 5, 5, 0.06);
  border-radius: 22px;
  background: rgba(251, 251, 250, 0.76);
  box-shadow: 0 18px 42px rgba(25, 35, 43, 0.08);
  color: var(--ink);
}

.demo-card small {
  display: block;
  margin-bottom: 24px;
  color: rgba(5, 5, 5, 0.58);
  font-size: var(--type-small);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gender-card {
  display: grid;
  align-content: start;
  min-height: 430px;
}

.gender-donut {
  display: block;
  width: min(54%, 330px);
  min-width: 210px;
  aspect-ratio: 1;
  margin: 22px auto 34px;
  border-radius: 50%;
  background: conic-gradient(#659950 0 var(--male-angle), #d5edc9 var(--male-angle) var(--female-angle), rgba(5, 5, 5, 0.04) var(--female-angle) 360deg);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.42);
  -webkit-mask: radial-gradient(circle, transparent 0 31%, #000 32%);
  mask: radial-gradient(circle, transparent 0 31%, #000 32%);
}

.gender-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  width: min(100%, 460px);
  margin: 0 auto;
}

.gender-legend p {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  margin: 0;
}

.gender-legend span {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #659950;
}

.gender-legend p:nth-child(2) span {
  background: #d5edc9;
}

.gender-legend strong {
  font-size: var(--type-section);
  line-height: 1;
}

.gender-legend em {
  grid-column: 2;
  color: rgba(5, 5, 5, 0.58);
  font-size: var(--type-small);
  font-style: normal;
  font-weight: 700;
}

.audience-stack {
  display: grid;
  gap: 24px;
}

.audience-bars {
  display: grid;
  gap: 20px;
}

.audience-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.72fr) minmax(140px, 2.6fr) minmax(44px, auto);
  gap: 18px;
  align-items: center;
  font-size: var(--type-body);
}

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

.country-flag {
  display: inline-grid;
  min-width: 28px;
  min-height: 20px;
  place-items: center;
  border-radius: 4px;
  background: rgba(5, 5, 5, 0.06);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.audience-track {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.04);
}

.audience-track span {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: #559a45;
}

.audience-row strong {
  font-size: var(--type-body);
  text-align: right;
}

.recent-posts {
  width: min(980px, 100%);
  margin: clamp(24px, 4vw, 66px) auto 0;
}

.simple-recent-posts {
  width: min(100%, var(--max));
  padding: 0 clamp(34px, 5vw, 80px);
}

.simple-post-note {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px solid rgba(5, 5, 5, 0.06);
  border-radius: 22px;
  background: rgba(251, 251, 250, 0.76);
  box-shadow: 0 18px 42px rgba(25, 35, 43, 0.08);
  color: rgba(5, 5, 5, 0.58);
  font-size: var(--type-body);
  font-weight: 700;
}

.post-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.post-strip a {
  display: grid;
  min-height: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  place-items: center;
  padding: 0;
  border-radius: 12px;
  background: var(--tile);
  color: rgba(0, 0, 0, 0.62);
  font-size: var(--type-section);
  line-height: 1.08;
  text-align: center;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.post-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-strip a:hover,
.post-strip a:focus-visible {
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-4px);
}

.compact-case .dashboard-panel {
  min-height: 520px;
}

.compact-case .post-strip {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 16px var(--edge) 0;
  }

  .nav-primary {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 13px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-primary::-webkit-scrollbar {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding-top: 78px;
    padding-bottom: 34px;
  }

  .hero-copy p {
    font-size: clamp(16px, 4.3vw, 20px);
  }

  .hero h1 {
    font-size: clamp(54px, 17.6vw, 132px);
    white-space: normal;
  }

  .project-grid {
    padding-top: 96px;
  }

  .project-card {
    min-height: 210px;
    padding: 44px 30px;
  }

  .project-title {
    font-size: clamp(27px, 8.4vw, 48px);
  }

  .project-subtitle {
    font-size: clamp(9px, 2.8vw, 16px);
  }

  .contact-bar {
    width: calc(100vw - 28px);
    min-height: 58px;
    padding: 9px 12px;
  }

  .email-link {
    font-size: 13px;
  }

  .social-link {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 13px;
  }

  .social-link svg {
    width: 20px;
    height: 20px;
  }

  .case-intro {
    min-height: 48svh;
    padding-top: 96px;
  }

  .logo-stage {
    height: 260px;
  }

  .hero-logo {
    width: clamp(118px, 31vw, 220px);
  }

  .metric-grid,
  .demographic-grid,
  .post-strip {
    grid-template-columns: 1fr;
  }

  .metric-wide {
    grid-column: auto;
  }

  .post-strip a {
    min-height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo:hover,
  .hero-logo:focus-visible {
    animation: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: fixed;
  }

  .nav-link {
    font-size: var(--type-nav);
  }

  .hero {
    min-height: 62vh;
  }

  .contact-bar {
    align-items: stretch;
    border-radius: 22px;
    flex-direction: column;
    gap: 10px;
  }

  .social-links {
    justify-content: space-between;
  }
}
