/* Replica of the Wix site. Measurements are the Wix editor's own: columns share width by the editor's
   flex ratios, and content sits on a centred 980px stage, so the page matches Wix at any width from 980px. */

/* Wix's own families: oswald-medium (Medium, with Bold for bold text) and poppins-extralight (one face,
   bold synthesised). The faces carry no unicode-range, so they load for Chinese text too and set the
   line metrics as they do on Wix. */
@font-face { font-family: 'Oswald Medium'; font-weight: 400; font-display: swap; src: url('assets/fonts/oswald-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Oswald Medium'; font-weight: 700; font-display: swap; src: url('assets/fonts/oswald-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Poppins ExtraLight'; font-weight: 400; font-display: swap; src: url('assets/fonts/poppins-200-latin.woff2') format('woff2'); }

:root {
  --cjk: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Source Han Sans SC', 'WenQuanYi Micro Hei', sans-serif;
  --heading: 'Oswald Medium', 'Oswald', var(--cjk);
  --body: 'Jost', var(--cjk);
  --green: #47a628;
  --green-light: #55b637;
  --lime: #c1ec24;
  --text: #525252;
  --grey: #666666;
  --grey-light: #999999;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 980px; font: 16px/1.8 var(--body); color: var(--text); background: #fff; }
h1, h2, h3, p, ul, ol { margin: 0; }
img { display: block; }
a { color: inherit; }
hr { border: 0; margin: 0; }
.stage { width: 980px; margin: 0 auto; position: relative; }

/* Blocks follow each other directly; a blank line is an empty paragraph, one line tall. */
.rich p:empty::before { content: '\200b'; }
.rich ul, .rich ol { padding-left: 1.8em; }
.rich li > p { margin: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; height: 79px; background: #fff; }
.site-header .logo { position: absolute; left: 42px; top: 4px; }
.site-header .logo img { object-fit: cover; }
.menu { position: absolute; right: 166px; top: 20px; display: flex; height: 50px; }
.menu a { display: block; height: 50px; padding: 0 10px; color: #858585; text-decoration: none; font: 16px/50px var(--body); white-space: nowrap; }
.menu span { display: block; border-top: 4px solid transparent; padding: 5px 8px 8px; }
.menu a:hover, .menu a[aria-current] { color: #000; }
.menu a:hover span, .menu a[aria-current] span { border-top-color: #000; }
.lang { position: absolute; right: 71px; top: 34px; width: 85px; font: 16px/1.4 'Jost', sans-serif; color: #000; }
.lang button, .lang li { display: flex; align-items: center; width: 100%; height: 45px; padding: 0 14px; }
.lang button { border: 1px solid #959595; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.lang svg { width: 13px; margin-left: auto; fill: currentColor; }
.lang ul { display: none; position: absolute; top: 0; left: 0; right: 0; list-style: none; padding: 0; background: #fff; border: 1px solid #959595; }
.lang.open ul { display: block; }
.lang li { padding: 0; height: 43px; }
.lang li a { display: flex; align-items: center; width: 100%; height: 100%; padding: 0 13px; text-decoration: none; }
.lang li a[aria-current] { background: #f3f3f3; }
.lang li a:hover { color: #959595; }
.lang li a svg { margin-left: auto; }

/* Footer */
.site-footer { height: 62px; padding-top: 17px; }
.site-footer p { font-size: 18px; line-height: 1.4; color: var(--green); }

/* Strip columns: 1px gutters show the strip's background between and around the columns. */
.strip { position: relative; display: flex; gap: 1px; padding: 1px; background: #fff; }
.strip > .col { position: relative; min-width: 0; }
.photo { background-size: cover; background-position: center; }

/* Home: hero */
/* Photo scale and offset are fitted to the Wix screenshots: Wix's scroll effects move these photos with the
   window, and the screenshots fix one state of them. */
.hero { min-height: 688px; padding-top: 138px; background-color: #000; background-size: max(1565px, 100%) auto; background-position: 50% -196px; }
.hero h1 { width: 980px; font: 700 80px/1.2 var(--heading); color: #fff; margin-bottom: 25px; }
.hero h1 span { font-family: 'Poppins ExtraLight', var(--cjk); }
/* The Wix Chinese title opens with a zero-width space, a space and a no-break space: 0.6em at 80px. */
.hero h1:lang(zh) { text-indent: 0.6em; }
.hero h1:lang(en) { font-size: 74px; }
.hero-lines { margin-left: 110px; width: 870px; padding-bottom: 10px; }
.hero-lines p { width: 870px; text-align: right; font: 700 30px/1.4 var(--heading); color: #fff; }
.hero-lines hr { height: 6px; border-top: 3px solid var(--green-light); margin-left: 360px; width: 510px; }
.hero-lines hr:nth-of-type(2) { margin-left: 174px; width: 696px; }
.hero-lines hr:nth-of-type(3) { margin-left: 205px; width: 665px; }

/* Home: founder */
.founder > .col { min-height: 1004px; }
.founder .photo { flex: 244 1 0; background-color: #000; background-size: auto 1139px; background-position: 50% -69px; }
.founder .photo h2 { margin: 346px 0 10px calc((100% - 244px) / 2 + 6px); width: 231px; text-align: center; font: 700 30px/1.4 var(--heading); color: #fff; }
.founder .body { flex: 733 1 0; background: var(--green); }
.founder .rich { width: 733px; margin: 66px auto 10px; position: relative; left: 1px; color: #fff; }

/* Home: quotes carousel */
.quotes { position: relative; height: 536px; margin-bottom: -8px; overflow: hidden; background: var(--green); color: #fff; }
.slides { display: grid; height: 100%; }
.slide { grid-area: 1 / 1; padding-top: 92px; background: var(--green); transition: transform 1s ease; }
.slide[aria-hidden] { visibility: hidden; }
.slide.moving { visibility: visible; }
.slide h2 { margin-left: 52px; width: 732px; margin-bottom: 25px; font: 700 30px/1.4 var(--heading); }
.slide p { margin-left: 52px; width: 796px; font-size: 24px; line-height: 1.4; }
.quotes .prev, .quotes .next { position: absolute; top: 50%; width: 18px; height: 36px; margin-top: -18px; padding: 0; border: 0; background: none; cursor: pointer; fill: #e8e6e6; }
.quotes .prev { left: 100px; }
.quotes .next { right: 85px; transform: scaleX(-1); }
.quotes button svg { display: block; width: 100%; height: 100%; }
.dots { position: absolute; left: 0; right: 0; bottom: 50px; display: flex; justify-content: center; list-style: none; padding: 0; }
.dots li { margin: 0 6px; }
.dots button { display: block; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #e8e6e6; cursor: pointer; }
.dots button[aria-current] { background: #fff; }

/* Home: strategy */
.strategy > .col { min-height: 330px; }
.strategy .photo { flex: 244 1 0; background-color: var(--grey); background-position: 100% 0; }
.strategy .photo > div { width: 210px; margin: 82px 0 10px calc((100% - 244px) / 2 + 17px); }
.strategy .photo h2 { margin-bottom: 20px; text-align: center; font: 700 30px/1.4 var(--heading); color: #fff; }
.strategy .photo p { margin-left: 16px; width: 177px; color: #fff; }
.cards { flex: 733 1 0; display: grid; }
.card { position: relative; padding-top: 87px; grid-area: 1 / 1; display: flex; flex-direction: column; width: 210px; margin-left: calc((100% - 733px) / 2 - 74px); margin-top: 10px; margin-bottom: 4px; min-height: 318px; border-radius: 10px; background: var(--grey); box-shadow: 0 0 30px rgba(0, 0, 0, .3); }
.card:nth-child(2) { margin-left: calc((100% - 733px) / 2 + 157px); margin-top: 12px; min-height: 314px; }
.card:nth-child(3) { margin-left: calc((100% - 733px) / 2 + 387px); margin-top: 13px; margin-bottom: 3px; min-height: 314px; }
.card:nth-child(4) { margin-left: calc((100% - 733px) / 2 + 614px); margin-top: 14px; margin-bottom: 2px; min-height: 314px; }
.card .icon { position: absolute; background: var(--green-light); -webkit-mask: center / 100% 100% no-repeat; mask: center / 100% 100% no-repeat; }
.card h3 { min-height: 78px; text-align: center; font: 400 18px/normal var(--heading); color: var(--green); }
.card h3:lang(zh) { color: var(--lime); }
.card p { min-height: 90px; margin: 0 0 29px 16px; width: 177px; font: 14px/1.6 'Open Sans', var(--cjk); color: #fff; }
.card hr { margin: auto 0 25px 16px; width: 177px; height: 5px; border-top: 4px solid var(--grey-light); }

/* Portfolio */
.banner { padding: 68px 0 54px 71px; background-color: #000; background-size: max(1567px, 100%) auto; background-position: 50% -263px; }
.banner:lang(en) { background-size: max(1589px, 100%) auto; background-position: 50% -286px; }
.banner p { width: 887px; font: 400 30px/1.4 var(--heading); color: #fff; }
.banner p:lang(en) { font-size: 28px; }
.companies { padding-top: 1px; }
.row { display: flex; gap: 1px; padding: 1px; margin: 0 70px; background: var(--grey); }
.row + .row { margin-top: -1px; }
.row > .col { min-width: 0; }
.row .logo { flex: 196 1 0; background: var(--green); }
.row .logo img { object-fit: cover; margin: var(--top) 0 0 calc((100% - 196px) / 2 + var(--left)); }
.row .text { flex: 781 1 0; background: #fff; }
.row h2 { width: 610px; margin: 52px 0 10px 70px; font: 400 18px/normal var(--heading); color: var(--green); }
.row .rich { width: 639px; margin: 0 0 10px 70px; }

/* Team */
.team-title { min-height: 270px; padding-top: 94px; background: var(--green); }
.team-title h1 { text-align: center; font: 700 56px/normal var(--heading); color: #fff; }
.member { display: flex; gap: 1px; padding: 1px; margin: 0 70px; }
.member .col { min-width: 0; }
.member:first-child .col { min-height: 585px; }
.member:last-child .col { min-height: 616px; }
.member:first-child .photo { flex: 326 1 0; padding-top: 16px; }
.member:first-child .photo img { margin: 0 auto; position: relative; left: 1px; }
.member:first-child .bio { flex: 651 1 0; padding: 16px 0 43px; }
.member:last-child .bio { flex: 645 1 0; padding: 32px 0 10px; }
.member:last-child .photo { flex: 332 1 0; padding: 32px 0 50px; }
.member:last-child .photo img { margin: 0 auto; }
.member .bio > * { margin-left: auto; margin-right: auto; width: 651px; }
.member:last-child .bio > * { width: 645px; }
.member h2 { margin-bottom: 9px; font: 700 38px/normal var(--heading); color: var(--green); }
.member:last-child h2 { margin-bottom: 19px; text-align: right; }
.member .rich { font-size: 16px; line-height: 1.8; }
.member .rich:lang(zh) { font-size: 17px; line-height: 1.6; }
.member .rich a { text-decoration: underline; }

/* Contact */
.reach { background-color: var(--text); background-size: 100% auto; background-position: 50% -274px; }
.reach .stage { display: grid; grid-template-rows: auto auto; color: #fff; }
.reach .stage > * { grid-area: 1 / 1; justify-self: start; align-self: start; }
.reach h2 { font: 700 30px/1.4 var(--heading); margin: 100px 0 41px; }
.reach .wechat { margin-left: 119px; width: 114px; }
.reach .email { margin-left: 577px; width: 85px; }
.reach .qr { margin: 73px 0 13px 260px; }
.reach .button { display: flex; align-items: center; justify-content: center; margin: 102px 0 42px 693px; width: 142px; height: 39px; border: 1px solid var(--green-light); border-radius: 5px; background: var(--green); color: #fff; text-decoration: none; font: 400 18px/normal var(--heading); transition: background-color .4s ease, border-color .4s ease; }
.reach .button:hover { background: #000; border-color: #fff; }
.reach .account { grid-area: 2 / 1; margin: 0 0 52px 205px; width: 207px; text-align: center; font-size: 18px; line-height: 1.4; }
.reach .account span { background: var(--green); }
.offices .stage { display: flex; margin-left: auto; padding-left: 116.5px; }
.office { width: 241px; min-height: 360px; margin: 0 2.5px; background: var(--green); color: #fff; }
.office h3 { margin: 61px 0 26px 8px; width: 235px; text-align: center; font: 400 28px/1.4 var(--heading); }
.office .lines { display: flex; flex-direction: column; min-height: 172.8px; margin-left: 20px; width: 201px; }
.office .lines p + p { margin-top: auto; }
.office .lines p + p + p { margin-top: 0; }

/* Below 900px the columns stack and the fixed stage gives way to the screen width. */
@media (max-width: 900px) {
  body { min-width: 0; }
  .stage, .hero h1, .hero-lines, .hero-lines p, .slide h2, .slide p, .founder .rich, .banner p, .row h2, .row .rich, .member .bio > *, .member:last-child .bio > * { width: auto; max-width: 100%; }
  .site-header { position: relative; height: auto; min-height: 79px; display: flex; flex-wrap: wrap; align-items: center; padding: 4px 16px; gap: 8px; }
  .site-header .logo, .menu, .lang { position: static; }
  .site-header .logo img { width: 160px; height: auto; }
  .lang { margin-left: auto; }
  .menu { order: 3; width: 100%; height: auto; overflow-x: auto; }
  .menu a { height: auto; line-height: 40px; padding: 0 4px; }
  .menu span { padding: 0 8px; }
  .stage { padding: 0 20px; }
  .hero { min-height: 0; padding: 60px 0; background-size: cover; background-position: center; }
  .hero h1 { font-size: 44px; }
  .hero h1:lang(en) { font-size: 40px; }
  .hero-lines { margin: 0; }
  .hero-lines p { margin: 0; font-size: 20px; }
  .hero-lines hr { margin-left: auto; width: 70%; }
  .hero-lines hr:nth-of-type(n) { margin-left: auto; width: 70%; }
  .strip, .row, .member { flex-direction: column; }
  .strip > .col, .member .col, .member:first-child .col, .member:last-child .col { min-height: 0; flex: none; }
  .founder .photo { background-size: cover; min-height: 240px; display: flex; align-items: center; justify-content: center; }
  .founder .photo h2 { margin: 0; }
  .founder .rich { margin: 40px 20px; left: 0; }
  .quotes { height: auto; min-height: 480px; }
  .slide { padding: 60px 56px 100px; }
  .slide h2, .slide p { margin-left: 0; }
  .slide p { font-size: 20px; }
  .quotes .prev { left: 16px; }
  .quotes .next { right: 16px; }
  .strategy .photo { padding: 40px 0; }
  .strategy .photo > div { margin: 0 auto; }
  .cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 24px 12px; }
  .card, .card:nth-child(n) { grid-area: auto; margin: 0; min-height: 0; }
  .card p { min-height: 0; }
  .banner, .banner:lang(en), .reach { background-size: cover; background-position: center; }
  .banner { padding: 48px 20px; }
  .banner p { font-size: 22px; }
  .banner p:lang(en) { font-size: 22px; }
  .row, .member { margin: 0 12px; }
  .row { min-height: 0 !important; }
  .row .logo { display: flex; justify-content: center; padding: 32px 0; }
  .row .logo img { margin: 0; max-width: 80%; height: auto; }
  .row h2, .row .rich { margin-left: 20px; margin-right: 20px; }
  .row h2 { margin-top: 28px; }
  .row .rich { margin-bottom: 28px; }
  .team-title { min-height: 0; padding: 60px 20px; }
  .team-title h1 { font-size: 40px; }
  .member:first-child .photo, .member:last-child .photo { padding: 24px 0; }
  .member:last-child .photo { order: -1; }
  .member .photo img { max-width: 100%; height: auto; }
  .member .bio, .member:first-child .bio, .member:last-child .bio { padding: 16px 8px 32px; }
  .member:last-child h2 { text-align: left; }
  .reach .stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 24px; padding: 40px 20px; }
  .reach .stage > * { margin: 0; }
  .reach .account { order: 2; width: 100%; margin: 0; }
  .reach .email { order: 3; }
  .reach .button { order: 4; }
  .offices .stage { flex-direction: column; align-items: center; gap: 5px; padding: 20px; }
  .office { width: 100%; max-width: 360px; min-height: 0; padding-bottom: 32px; }
  .office h3, .office .lines { margin-left: 20px; margin-right: 20px; width: auto; }
  .office h3 { margin-top: 32px; }
  .office .lines { min-height: 0; }
  .office .lines p + p { margin-top: 0; }
  .office .lines p:nth-child(2) { margin-top: 1.8em; }
  .site-footer { height: auto; padding: 17px 0 20px; }
}
