:root {
  --ink: #080808;
  --paper: #f1f1ef;
  --muted: #666;
  --line: rgba(8, 8, 8, .58);
  --hair: rgba(8, 8, 8, .16);
  --surface: #d8d8d5;
  --surface-deep: #c9c9c5;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --max: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.dark {
  --ink: #f5f5f3;
  --paper: #111;
  --muted: #aaa;
  --line: rgba(255,255,255,.6);
  --hair: rgba(255,255,255,.18);
  --surface: #252525;
  --surface-deep: #1a1a1a;
}

a, button { color: inherit; font: inherit; }
a { text-decoration: none; }
button { border: 0; background: none; cursor: pointer; }

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 60;
  width: 0;
  height: 2px;
  background: var(--ink);
  transition: width .18s linear;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(var(--max), calc(100% - 40px));
  padding: 10px 0;
  transform: translateX(-50%);
}

.lang-switch,
.mode-toggle,
.nav-links a,
.section-label,
.footer,
.panel-counter {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.lang-switch { justify-self: start; }
.mode-toggle { justify-self: end; }

.nav-links {
  display: flex;
  gap: 18px;
}

.nav-links a,
.mode-toggle,
.lang-switch {
  position: relative;
  opacity: .68;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.nav-links a.is-active,
.nav-links a:hover,
.mode-toggle:hover,
.lang-switch:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-links a::after,
.lang-switch::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease);
}

.nav-links a.is-active::after,
.nav-links a:hover::after,
.lang-switch:hover::after {
  transform: scaleX(1);
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 2;
  min-height: 100vh;
  overflow: hidden;
}

.scroll-spacer {
  height: 400vh;
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%) translateY(44px) scale(.985);
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
  will-change: opacity, transform, filter;
  transition: opacity .72s var(--ease), transform .72s var(--ease), filter .72s var(--ease);
}

.panel.is-active {
  opacity: 1;
  filter: blur(0);
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

.hero-title-wrap {
  position: relative;
  width: min(840px, 100%);
  min-height: 360px;
  display: grid;
  place-items: center;
}

.outline-title {
  margin: 0;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  font-size: clamp(118px, 20vw, 260px);
  line-height: .78;
  font-weight: 500;
  text-align: center;
}

.social-links {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 18px;
  transform: translateX(-50%);
}

.social-links a,
.social-links button {
  position: relative;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.social-links a::after,
.social-links button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(.35);
  transform-origin: left;
  transition: transform .5s var(--ease);
}

.social-links a:hover::after,
.social-links button:hover::after,
.social-links button.is-open::after {
  transform: scaleX(1);
}

.email-popover {
  position: absolute;
  left: 50%;
  top: calc(100% + 18px);
  padding: 8px 12px;
  border: 1px solid var(--hair);
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  font-size: 12px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
  white-space: nowrap;
}

.email-popover.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.section-label {
  position: absolute;
  top: 14%;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}

.intro-layout {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  align-items: center;
  gap: clamp(28px, 7vw, 112px);
  width: 100%;
}

.intro-text-only {
  grid-template-columns: 1fr;
  justify-items: center;
}

.intro-copy { text-align: center; }

.intro-copy h2 {
  margin: 0 0 30px;
  color: var(--ink);
  -webkit-text-stroke: .75px var(--ink);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
  font-weight: 500;
}

.intro-copy h2 span { color: transparent; }

.intro-copy h2 em { font-style: normal; }

.intro-copy p {
  max-width: 410px;
  margin: 0 auto;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.9;
}

.photo-card,
.art-scroll article {
  position: relative;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(0,0,0,.12) 49% 51%, transparent 52%),
    linear-gradient(45deg, transparent 0 48%, rgba(0,0,0,.07) 49% 51%, transparent 52%),
    var(--surface);
  overflow: hidden;
}

.photo-card::after,
.art-scroll article::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.36);
}

.photo-card::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(8, 8, 8, .18);
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(8,8,8,.16) 49% 51%, transparent 52%),
    radial-gradient(circle at 50% 28%, rgba(8,8,8,.36) 0 8%, transparent 9%),
    linear-gradient(0deg, rgba(8,8,8,.08), rgba(8,8,8,.08));
}

.small-card { width: 260px; height: 260px; margin-top: 120px; }
.tall-card { width: 300px; height: 520px; }

.panel-works {
  display: grid;
  align-content: center;
  gap: 28px;
}

.works-frame {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  width: 100%;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hair);
}

.works-head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 16px;
  width: min(920px, 100%);
}

.works-head h2,
.service-title h2 {
  margin: 0;
  font-size: clamp(70px, 13vw, 146px);
  line-height: .86;
  font-weight: 500;
  letter-spacing: 0;
}

.works-head p,
.service-title p,
.service-index p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.works-head p {
  justify-self: end;
  width: min(620px, 100%);
  text-align: right;
  white-space: nowrap;
}

.works-note {
  display: grid;
  gap: 9px;
  min-width: 118px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  text-align: right;
}

.art-scroll {
  display: flex;
  align-items: end;
  gap: 22px;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  padding: 8px 0 28px;
  scrollbar-color: var(--ink) transparent;
  scrollbar-width: thin;
}

.art-scroll::-webkit-scrollbar {
  height: 3px;
}

.art-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.art-scroll::-webkit-scrollbar-thumb {
  background: var(--ink);
  border-radius: 999px;
}

.art-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.art-scroll article {
  flex: 0 0 220px;
  height: 300px;
  scroll-snap-align: start;
  border: 1px solid var(--hair);
  transition: transform .7s var(--ease), border-color .7s var(--ease);
}

.art-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transform: scale(1.01);
  transition: filter .65s var(--ease), transform .65s var(--ease);
}

.art-card:hover img {
  filter: grayscale(0) contrast(1);
  transform: scale(1.045);
}

.art-card.has-image::before {
  display: none;
}

.art-card.has-image::after { border-color: rgba(255,255,255,.38); }

.art-card:nth-child(4) img { object-position: 58% 28%; }

.art-card:nth-child(7) img { object-position: 50% 24%; }

.art-scroll article:hover {
  transform: translateY(-8px);
  border-color: var(--line);
}

.art-scroll article:nth-child(even) {
  margin-bottom: 48px;
}

.art-card-large { flex-basis: 360px !important; }
.art-card-wide { flex-basis: 320px !important; height: 220px !important; }
.art-card-tall { height: 360px !important; }
.art-card-square { height: 260px !important; }

.art-card::before {
  content: "";
  position: absolute;
  inset: 50px 24px 54px;
  border: 1px solid rgba(8, 8, 8, .28);
  background:
    radial-gradient(circle at 35% 28%, rgba(8, 8, 8, .5) 0 7%, transparent 8%),
    linear-gradient(130deg, transparent 0 42%, rgba(8,8,8,.28) 43% 44%, transparent 45%),
    linear-gradient(0deg, rgba(8,8,8,.08), rgba(8,8,8,.08));
}

.art-card::after {
  inset: 14px;
  border-color: rgba(255,255,255,.36);
}

.art-01 {
  background:
    linear-gradient(115deg, transparent 0 54%, rgba(8,8,8,.16) 55% 56%, transparent 57%),
    radial-gradient(circle at 72% 36%, rgba(8,8,8,.12) 0 12%, transparent 13%),
    var(--surface);
}

.art-02 {
  background:
    linear-gradient(0deg, rgba(8,8,8,.1), rgba(8,8,8,.1)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(8,8,8,.05) 23px 24px),
    var(--surface-deep);
}

.art-03 {
  background:
    radial-gradient(circle at 50% 40%, rgba(8,8,8,.18) 0 18%, transparent 19%),
    linear-gradient(45deg, transparent 0 48%, rgba(8,8,8,.2) 49% 50%, transparent 51%),
    var(--surface);
}

.art-04 {
  background:
    repeating-linear-gradient(135deg, rgba(8,8,8,.09) 0 1px, transparent 1px 14px),
    var(--surface);
}

.art-05 {
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(8,8,8,.16) 47% 48%, transparent 49%),
    radial-gradient(circle at 32% 62%, rgba(8,8,8,.18) 0 14%, transparent 15%),
    var(--surface-deep);
}

.service-layout {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  align-items: center;
  gap: 74px;
  width: 100%;
}

.service-title {
  display: grid;
  gap: 24px;
  align-self: stretch;
  align-content: center;
  padding-right: 48px;
  border-right: 1px solid var(--hair);
}

.service-index {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

.service-index article {
  display: grid;
  grid-template-columns: 52px 58px 1fr;
  gap: 24px;
  align-items: center;
  min-height: 138px;
  padding: 28px 0;
  border-bottom: 1px solid var(--hair);
  transition: background .55s var(--ease), padding-left .55s var(--ease);
}

.service-index article:hover {
  background: rgba(8, 8, 8, .025);
  padding-left: 14px;
}

.service-index article:last-child {
  border-bottom: 0;
}

.service-number {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  padding-top: 8px;
}

.service-index h3 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 500;
  line-height: 1.08;
}

.icon {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1.4px solid var(--ink);
  display: block;
  color: var(--ink);
  transition: transform .55s var(--ease);
}

.service-index article:hover .icon {
  transform: rotate(-2deg);
}

body.dark .service-index article:hover {
  background: rgba(255, 255, 255, .035);
}

body.dark .photo-card::before,
body.dark .art-card::before {
  border-color: rgba(255,255,255,.2);
}

.icon-illust::before,
.icon-illust::after {
  content: "";
  position: absolute;
  background: var(--ink);
}

.icon-illust::before {
  width: 28px;
  height: 1px;
  left: 14px;
  top: 28px;
  transform: rotate(-36deg);
}

.icon-illust::after {
  width: 9px;
  height: 9px;
  right: 12px;
  bottom: 13px;
}

.icon-model {
  border-radius: 50%;
}

.icon-model::before,
.icon-model::after {
  content: "";
  position: absolute;
  border: 1.4px solid var(--ink);
  border-radius: 50%;
}

.icon-model::before {
  inset: 13px;
}

.icon-model::after {
  inset: 24px;
  background: var(--ink);
}

.icon-flow::before,
.icon-flow::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.4px;
  background: var(--ink);
}

.icon-flow::before { top: 19px; box-shadow: 0 20px 0 var(--ink); }
.icon-flow::after { top: 29px; transform: rotate(90deg); }

.panel-counter {
  position: absolute;
  left: 50%;
  bottom: 58px;
  z-index: 8;
  display: flex;
  gap: 8px;
  color: var(--muted);
  transform: translateX(-50%);
}

.footer {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  transform: translateX(-50%);
  color: var(--muted);
}

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

@media (max-width: 900px) {
  .site-header {
    top: 14px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  .mode-toggle { justify-self: start; }

  .panel {
    width: calc(100% - 28px);
    padding-top: 118px;
    padding-bottom: 80px;
    place-items: center;
  }

  .section-label {
    top: 104px;
  }

  .hero-title-wrap { min-height: 360px; }
  .outline-title { font-size: clamp(92px, 28vw, 132px); }

  .social-links {
    bottom: 38px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 13px 18px;
  }

  .social-links a,
  .social-links button {
    font-size: 13px;
  }

  .email-popover {
    top: calc(100% + 14px);
  }

  .intro-layout,
  .works-frame,
  .works-head,
  .service-layout {
    grid-template-columns: 1fr;
  }

  .intro-layout { gap: 18px; }
  .small-card,
  .tall-card {
    width: 100%;
    height: 180px;
    margin: 0;
  }

  .intro-copy { order: -1; }
  .intro-copy p { font-size: 14px; }

  .works-frame {
    gap: 16px;
    padding-bottom: 16px;
  }

  .works-head {
    gap: 12px;
  }

  .works-head p {
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

  .works-note {
    display: flex;
    justify-content: space-between;
    text-align: left;
  }

  .works-head h2,
  .service-title h2 {
    font-size: clamp(52px, 18vw, 76px);
  }

  .service-title {
    gap: 12px;
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--hair);
  }

  .panel-service {
    align-content: start;
    place-items: stretch;
  }

  .art-scroll {
    gap: 14px;
  }

  .art-scroll article {
    flex-basis: 72% !important;
    height: 260px !important;
    margin-bottom: 0 !important;
  }

  .service-layout {
    gap: 14px;
    align-self: start;
  }

  .panel-service .service-layout {
    margin-top: 44px;
  }

  .service-index article {
    grid-template-columns: 34px 46px 1fr;
    min-height: 96px;
    gap: 12px;
    padding: 16px 0;
  }

  .service-index h3 {
    margin-bottom: 4px;
    font-size: 24px;
  }

  .service-index p,
  .service-title p {
    font-size: 13px;
    line-height: 1.6;
  }

  .icon {
    width: 46px;
    height: 46px;
  }

  .panel-counter { bottom: 42px; }

  .footer {
    width: calc(100% - 28px);
    font-size: 10px;
  }
}
