:root {
  --ink: #151515;
  --muted: #66635e;
  --paper: #f5f3ee;
  --panel: #fbfaf6;
  --panel-strong: #ffffff;
  --line: rgba(21, 21, 21, 0.14);
  --accent: #c8a652;
  --accent-dark: #9d7d31;
  --green: #353b37;
  --sky: #a7b7bd;
  --yellow: #e7d28b;
  --shadow: 0 24px 70px rgba(25, 24, 22, 0.12);
}

:root[data-theme="dark"] {
  --ink: #f8f5ed;
  --muted: #b9b3a7;
  --paper: #111211;
  --panel: #1c1d1b;
  --panel-strong: #262724;
  --line: rgba(248, 245, 237, 0.14);
  --accent: #ddc06d;
  --accent-dark: #f2d98c;
  --green: #737b72;
  --sky: #9fb2ba;
  --yellow: #f0d78b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    sans-serif;
  line-height: 1.6;
  transition:
    background 220ms ease,
    color 220ms ease;
}

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

button {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px clamp(18px, 4vw, 56px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--ink);
  border-radius: 6px;
  color: var(--paper);
  font-size: 12px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav-links a,
.brand,
.button,
.filter-tab,
.icon-button,
.text-toggle {
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.nav-links a:hover,
.brand:hover {
  color: var(--accent);
}

.header-actions {
  display: inline-flex;
  gap: 8px;
}

.icon-button,
.text-toggle {
  display: inline-grid;
  place-items: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.icon-button {
  width: 38px;
}

.text-toggle {
  min-width: 42px;
  padding: 0 10px;
}

.icon-button:hover,
.text-toggle:hover,
.filter-tab:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.hero {
  position: relative;
  min-height: 94vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 140px clamp(20px, 5vw, 72px) 56px;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 12, 12, 0.82), rgba(12, 12, 12, 0.34) 48%, rgba(12, 12, 12, 0.08)),
    linear-gradient(0deg, rgba(12, 12, 12, 0.62), rgba(12, 12, 12, 0) 42%);
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(118deg, rgba(221, 192, 109, 0.42), transparent 30%),
    linear-gradient(24deg, rgba(26, 26, 26, 0.78), transparent 48%),
    radial-gradient(circle at 76% 20%, rgba(231, 210, 139, 0.34), transparent 18%),
    linear-gradient(90deg, transparent 0 7%, rgba(255, 255, 255, 0.16) 7% 9%, transparent 9% 17%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.14) 0 1px,
      transparent 1px 24px
    ),
    url("./han-hero.jpg");
  background-position: 68% center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-content {
  max-width: 760px;
  color: #fffdf7;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f3c869;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 22px;
  font-size: clamp(42px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 660px;
  color: rgba(255, 253, 247, 0.84);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-tags span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 253, 247, 0.28);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.08);
  color: rgba(255, 253, 247, 0.86);
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.hero-actions,
.contact-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 20px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-weight: 900;
}

.button:hover {
  transform: translateY(-2px);
}

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

.button.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button.secondary {
  color: #fffdf7;
}

.button.secondary:hover {
  background: #fffdf7;
  color: #191816;
}

.button.ghost {
  color: var(--ink);
}

.button.ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.section {
  padding: clamp(64px, 10vw, 132px) clamp(20px, 5vw, 72px);
}

.intro-band {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) 1fr;
  gap: clamp(28px, 5vw, 72px);
  max-width: 1180px;
  margin: 0 auto;
}

.section-grid p:not(.section-kicker),
.about-copy p,
.case-copy p {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 32px;
}

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

.filter-tab {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.filter-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

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

.project-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(25, 24, 22, 0.06);
}

.project-card.hidden {
  display: none;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card.featured {
  transform: translateY(-24px);
}

.project-card.featured:hover {
  transform: translateY(-28px);
}

.project-visual {
  min-height: 360px;
  background-color: var(--green);
  background-size: cover;
  background-position: center;
}

.visual-one {
  background-image:
    linear-gradient(135deg, rgba(25, 24, 22, 0.08), rgba(25, 24, 22, 0.48)),
    url("./project-coffee.png");
}

.visual-two {
  background-image:
    linear-gradient(180deg, rgba(25, 24, 22, 0.06), rgba(25, 24, 22, 0.32)),
    url("./project-space.png");
}

.visual-three {
  background-image:
    linear-gradient(135deg, rgba(25, 24, 22, 0.12), rgba(199, 71, 47, 0.44)),
    url("./project-sound.png");
}

.project-info {
  padding: 22px;
}

.project-info p {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.project-info span {
  color: var(--muted);
}

.video-section {
  background: var(--panel);
  border-block: 1px solid var(--line);
}

.video-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.video-stage {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(199, 71, 47, 0.42), transparent 44%),
    linear-gradient(45deg, rgba(122, 167, 178, 0.52), rgba(32, 32, 29, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 28px);
}

.play-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  background: rgba(255, 253, 247, 0.95);
  border-radius: 50%;
  color: #191816;
  font-size: 28px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
}

.motion-bars {
  position: absolute;
  inset: auto 12% 16% 12%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.motion-bars span {
  display: block;
  height: 120px;
  background: rgba(255, 253, 247, 0.72);
  transform-origin: bottom;
  animation: wave 1.8s ease-in-out infinite alternate;
}

.motion-bars span:nth-child(2) {
  animation-delay: 160ms;
}

.motion-bars span:nth-child(3) {
  animation-delay: 320ms;
}

.motion-bars span:nth-child(4) {
  animation-delay: 480ms;
}

@keyframes wave {
  from {
    transform: scaleY(0.28);
  }

  to {
    transform: scaleY(1);
  }
}

.video-caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
}

.video-caption span {
  max-width: 480px;
  color: var(--muted);
}

.cases-section {
  background: var(--paper);
}

.case-study {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 0.85fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.case-study.reverse .case-media {
  order: 2;
}

.case-media {
  min-height: 430px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.case-index {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.case-copy ul {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.case-copy li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 118px;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}

.practice-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(199, 71, 47, 0.18), transparent 45%),
    var(--panel);
}

.practice-card.tall {
  grid-row: span 2;
}

.practice-card.wide {
  grid-column: span 2;
}

.practice-card.alt {
  background:
    linear-gradient(145deg, rgba(47, 102, 83, 0.24), transparent 45%),
    var(--panel);
}

.practice-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.practice-card strong {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.12;
}

.discovery-section,
.splash-section {
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 70%, transparent)),
    var(--paper);
}

.splash-section {
  padding-top: clamp(36px, 6vw, 86px);
}

.compact-heading {
  align-items: start;
}

.section-note {
  max-width: 420px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.discovery-strip {
  display: flex;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
  overflow-x: auto;
  padding: 2px 0 20px;
  scroll-snap-type: x mandatory;
}

.discovery-card {
  position: relative;
  flex: 0 0 210px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 48px rgba(21, 21, 21, 0.12);
  scroll-snap-align: start;
}

.discovery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.discovery-card.lift {
  margin-top: 42px;
}

.discovery-card img {
  display: block;
  width: 100%;
  height: auto;
}

.splash-board {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) repeat(5, minmax(120px, 0.62fr));
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.splash-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(21, 21, 21, 0.1);
}

.splash-card.hero-splash {
  grid-row: span 2;
}

.splash-card img {
  display: block;
  width: 100%;
  height: auto;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 86px);
  max-width: 1320px;
  margin: 0 auto;
}

.portrait-panel {
  min-height: 620px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.portrait-image {
  width: 100%;
  height: 100%;
  min-height: 620px;
  background:
    linear-gradient(180deg, rgba(21, 21, 21, 0), rgba(21, 21, 21, 0.22)),
    url("./han-portrait.jpg");
  background-position: 54% center;
  background-size: cover;
}

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

.stats div {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.stats dt {
  font-size: 34px;
  font-weight: 950;
}

.stats dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.services-section {
  background: #20201d;
  color: #fffdf7;
}

:root[data-theme="dark"] .services-section {
  background: #10110f;
}

.services-section .section-kicker {
  color: #f3c869;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  background: rgba(255, 253, 247, 0.2);
  border: 1px solid rgba(255, 253, 247, 0.2);
}

.service-list article {
  min-height: 260px;
  padding: 28px;
  background: #20201d;
}

:root[data-theme="dark"] .service-list article {
  background: #10110f;
}

.service-list span {
  display: inline-block;
  margin-bottom: 54px;
  color: #f3c869;
  font-weight: 950;
}

.service-list p {
  color: rgba(255, 253, 247, 0.68);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: clamp(64px, 9vw, 116px) clamp(20px, 5vw, 72px);
  background: var(--panel);
}

.contact-section h2 {
  max-width: 900px;
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 88vh;
    padding-top: 154px;
  }

  .section-grid,
  .about-section,
  .contact-section,
  .case-study {
    grid-template-columns: 1fr;
  }

  .case-study.reverse .case-media {
    order: 0;
  }

  .work-grid,
  .service-list {
    grid-template-columns: 1fr;
  }

  .project-card.featured,
  .project-card.featured:hover {
    transform: none;
  }

  .project-visual {
    min-height: 300px;
  }

  .portrait-panel,
  .portrait-image {
    min-height: 460px;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .section-heading,
  .video-caption {
    display: block;
  }

  .filter-tabs {
    justify-content: flex-start;
    margin-top: 18px;
  }

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

  .practice-card.wide {
    grid-column: span 2;
  }

  .discovery-strip,
  .splash-board {
    display: flex;
    gap: 12px;
    width: calc(100vw - 18px);
    max-width: none;
    margin-left: 0;
    overflow-x: auto;
    padding: 2px 18px 18px 0;
    scroll-snap-type: x mandatory;
  }

  .discovery-card {
    flex: 0 0 210px;
    scroll-snap-align: start;
  }

  .splash-card {
    flex: 0 0 210px;
    scroll-snap-align: start;
  }

  .discovery-card.lift {
    margin-top: 24px;
  }

  .splash-card.hero-splash {
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .nav-links {
    gap: 18px;
  }

  .hero {
    padding: 142px 18px 42px;
  }

  .hero-actions,
  .button,
  .contact-actions {
    width: 100%;
  }

  .section,
  .contact-section {
    padding-inline: 18px;
  }

  .video-stage {
    min-height: 300px;
  }

  .case-media {
    min-height: 320px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    grid-auto-rows: 108px;
  }
}
