:root {
  --ink: #0b0c0f;
  --soft: #52525b;
  --muted: #8a8a93;
  --paper: #ffffff;
  --line: rgb(15 23 42 / .11);
  --line-subtle: rgb(15 23 42 / .07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mark: url("/assets/brand/moki7-favicon.svg");
  --edge: clamp(22px, 5.8vw, 96px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 999px; }
.contact-card a:focus-visible { border-radius: 4px; }
[hidden], [data-lang="zh"] .l-en, [data-lang="en"] .l-zh { display: none; }

.light, .grain { position: fixed; inset: 0; pointer-events: none; }
.light {
  background:
    radial-gradient(44% 56% at 74% 48%, rgb(246 248 252 / .82) 0%, rgb(248 250 252 / .36) 46%, transparent 74%),
    radial-gradient(30% 36% at 79% 40%, rgb(111 92 224 / .028) 0%, transparent 68%),
    radial-gradient(28% 34% at 68% 62%, rgb(223 123 54 / .024) 0%, transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
}
.grain {
  z-index: 0;
  opacity: .018;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

header {
  position: relative;
  z-index: 5;
  min-height: 88px;
  padding: env(safe-area-inset-top) max(var(--edge), env(safe-area-inset-right))
    0 max(var(--edge), env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
  transition: opacity .2s ease;
}
.brand:hover { opacity: .72; }
.brand img { display: block; width: 20px; height: 20px; }

.controls { display: flex; align-items: center; gap: 10px; }
.lang {
  border: 0;
  background: transparent;
  font: 500 13px var(--font);
  color: var(--soft);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .04em;
  transition: color .2s ease, background .2s ease;
}
.lang:hover { color: var(--ink); background: rgb(15 23 42 / .045); }

.contact { position: relative; }
.contact summary {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / .92);
  box-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 4px 12px -2px rgb(15 23 42 / .04);
  color: var(--ink);
  padding: 9px 19px;
  font: 500 13.5px/1.2 var(--font);
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.contact summary::-webkit-details-marker { display: none; }
.contact summary:hover,
.contact[open] summary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 6px 18px -6px rgb(11 12 15 / .28);
}
.contact-card {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(276px, calc(100vw - 2 * var(--edge)));
  margin: 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgb(255 255 255 / .96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-subtle);
  box-shadow: 0 24px 48px -16px rgb(15 23 42 / .14), 0 4px 12px -2px rgb(15 23 42 / .05);
}
.contact[open] .contact-card { animation: show-card .22s cubic-bezier(.16, 1, .3, 1) both; }
.contact-group + .contact-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
}
.contact-card dt {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .04em;
}
.contact-card dd {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  margin: 4px 0 0;
  letter-spacing: -.005em;
}
.contact-card a {
  transition: opacity .18s ease;
}
.contact-card a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgb(11 12 15 / .35);
}
.static-contact { top: calc(100% + 8px); right: var(--edge); }
@keyframes show-card {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
}

main {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  align-items: center;
  width: min(100%, 1680px);
  min-height: 0;
  margin-inline: auto;
  padding-inline: var(--edge);
  gap: 4vw;
}
.copy {
  max-width: 760px;
  animation: copy-in .85s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes copy-in {
  from { opacity: 0; transform: translateY(10px); }
}
h1 {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 86px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.028em;
  color: var(--ink);
  font-feature-settings: "kern" 1, "liga" 1;
}
[data-lang="en"] h1 {
  font-size: clamp(38px, 4.4vw, 68px);
  line-height: 1.11;
  letter-spacing: -.032em;
}
.lead {
  margin: clamp(22px, 2.2vw, 30px) 0 0;
  font-size: clamp(15.5px, 1.18vw, 18px);
  line-height: 1.8;
  letter-spacing: .01em;
  color: var(--soft);
  max-width: 34em;
}
[data-lang="en"] .lead {
  letter-spacing: -.005em;
  line-height: 1.72;
  max-width: 33em;
}

.object {
  position: relative;
  justify-self: center;
  width: min(30vw, 436px, 65dvh);
  aspect-ratio: 1;
  perspective: 1200px;
}
.mark {
  position: absolute;
  inset: 5% 5% 6%;
  transform: rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg));
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
  /* Continuous sub-pixel machined extrusion + studio ambient shadow on pure white */
  filter:
    drop-shadow(.38px .6px 0 rgb(48 52 64 / .96))
    drop-shadow(.76px 1.2px 0 rgb(36 40 49 / .95))
    drop-shadow(1.14px 1.8px 0 rgb(25 28 35 / .95))
    drop-shadow(1.52px 2.4px 0 rgb(17 19 24 / .94))
    drop-shadow(1.9px 3px 0 rgb(11 12 16 / .93))
    drop-shadow(0 20px 36px rgb(15 23 42 / .11))
    drop-shadow(0 6px 14px rgb(15 23 42 / .06));
}
.mark-face, .piece, .mark-sheen { position: absolute; inset: 0; }
.mark-face, .mark-sheen {
  mask: var(--mark) center / 100% 100% no-repeat;
  -webkit-mask: var(--mark) center / 100% 100% no-repeat;
}
.mark-face {
  background:
    radial-gradient(66% 60% at var(--light-x, 22%) var(--light-y, 14%),
      rgb(255 255 255 / .24) 0%,
      rgb(226 232 240 / .08) 36%,
      transparent 66%),
    linear-gradient(126deg,
      rgb(255 255 255 / .08) 0%,
      transparent 23%,
      rgb(255 255 255 / .045) 39%,
      rgb(255 255 255 / .11) 43%,
      transparent 52%),
    linear-gradient(150deg,
      #2e323c 0%,
      #1a1c22 26%,
      #0c0d11 64%,
      #15171d 100%);
}
.piece, .mark-sheen { display: none; }

/* Each animated piece is a clean slice of the exact original SVG asset. */
.piece-top { --slice: polygon(0 0, 100% 0, 96.56% 7.5%, 72.34% 25.16%, 0 25.16%); --from: translate(-24%, -16%) rotate(-20deg); }
.piece-arm { --slice: polygon(96.56% 7.5%, 100% 0, 100% 100%, 36% 100%, 36% 80%, 46.88% 69.53%, 72.34% 25.16%); --from: translate(26%, 22%) rotate(22deg); }
.piece-inner { --slice: polygon(19% 36%, 53% 36%, 36.5% 68%); --from: translate(-20%, 28%) rotate(-42deg); }
.piece .mark-face { clip-path: var(--slice); }
.assembling .mark > .mark-face { visibility: hidden; }
.assembling .piece { display: block; animation: assemble 1.45s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes assemble {
  from { transform: var(--from); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.sweeping .mark-sheen { display: block; }
.mark-sheen::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 28%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgb(255 255 255 / .16) 44%,
    rgb(255 255 255 / .52) 52%,
    rgb(226 232 240 / .16) 62%,
    transparent 90%);
  animation: sweep 1.15s cubic-bezier(.38, 0, .18, 1) both;
}
@keyframes sweep {
  from { transform: translateX(-130%) skewX(-20deg); }
  to { transform: translateX(420%) skewX(-20deg); }
}

.shadow {
  position: absolute;
  left: 20%;
  right: 12%;
  bottom: -1%;
  height: 8.5%;
  border-radius: 50%;
  transform: translate3d(var(--shadow-x, 0px), 0, 0);
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
  background: radial-gradient(closest-side, rgb(15 23 42 / .17), rgb(15 23 42 / .05) 56%, transparent 100%);
  filter: blur(9px);
}
.assembling .shadow { animation: shadow-in 1.15s .45s both; }
@keyframes shadow-in { from { opacity: 0; } to { opacity: 1; } }

footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 max(var(--edge), env(safe-area-inset-right))
    calc(28px + env(safe-area-inset-bottom)) max(var(--edge), env(safe-area-inset-left));
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 820px) {
  header { min-height: 64px; }
  .controls { gap: 6px; }
  .lang { padding: 7px 10px; font-size: 12.5px; }
  .contact summary { padding: 8px 15px; font-size: 13px; }
  main { grid-template-columns: 1fr; align-content: center; gap: 28px; }
  .light {
    background:
      radial-gradient(64% 42% at 32% 30%, rgb(246 248 252 / .85) 0%, transparent 66%),
      radial-gradient(46% 32% at 38% 26%, rgb(111 92 224 / .028) 0%, transparent 68%),
      linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
  }
  .object { order: -1; justify-self: start; width: min(42vw, 192px, 26dvh); }
  h1 { font-size: clamp(32px, 9.2vw, 46px); line-height: 1.16; }
  [data-lang="en"] h1 { font-size: clamp(30px, 8.5vw, 44px); line-height: 1.12; }
  .lead { margin-top: 18px; font-size: 15.5px; line-height: 1.75; }
  footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); font-size: 12px; }
  .static-contact { width: min(50vw, 196px); padding: 12px 14px; }
  .static-contact dd { font-size: 13px; overflow-wrap: anywhere; }
}
@media (max-height: 700px) and (max-width: 820px) {
  .object { width: min(144px, 39vw, 24dvh); }
  main { gap: 20px; }
  .lead { margin-top: 14px; }
}
@media (max-height: 460px) and (min-width: 520px) {
  header { min-height: 52px; }
  main { grid-template-columns: minmax(0, 1.24fr) minmax(0, .76fr); gap: 3vw; }
  .object { order: 0; justify-self: center; width: min(36vw, 58dvh); }
  h1, [data-lang="en"] h1 { font-size: clamp(26px, 5.2vw, 38px); }
  .lead { margin-top: 12px; font-size: 14px; line-height: 1.6; }
  footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) and (max-height: 490px) {
  header { min-height: 48px; }
  main { gap: 10px; }
  .object { width: min(30vw, 24dvh); }
  h1, [data-lang="en"] h1 { font-size: clamp(22px, 7.6vw, 32px); }
  .lead { margin-top: 10px; font-size: 13.5px; line-height: 1.5; }
  footer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .copy { opacity: 1; transform: none; }
  .mark, .shadow { transform: none; }
  .assembling .mark > .mark-face { visibility: visible; }
  .assembling .piece, .sweeping .mark-sheen { display: none; }
}
