/* Diamond Corporate & Advisory Services Limited
   new2: shared stylesheet for /en/, /zh-cn/, /zh-hk/ */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  /* night */
  --base: #05050f;
  --base-2: #0a0a1a;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --line-ui: rgba(255, 255, 255, 0.38);
  --text: #f4f3ef;
  --text-2: #b4b3c7;
  --text-3: #8a89a3;
  --accent: #8f8bff;
  --accent-2: #a9a6ff;
  --brand: #2521cd;

  /* day */
  --paper: #f2f1ec;
  --ink: #0b0b18;
  --ink-2: #4f4e63;
  --ink-3: #6b6a80;
  --ink-line: rgba(11, 11, 24, 0.12);

  /* type */
  --cjk-sc-serif: "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Microsoft YaHei", serif;
  --cjk-tc-serif: "Songti TC", "Noto Serif HK", "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "Microsoft JhengHei", serif;
  --cjk-sc-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --cjk-tc-sans: "PingFang HK", "PingFang TC", "Noto Sans HK", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC", "Microsoft JhengHei", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* layout */
  --wrap: 1320px;
  --gut: clamp(20px, 4.5vw, 72px);
  --hdr-h: 76px;
  --r-lg: 28px;
  --r-md: 22px;

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);

  --grain: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html:lang(zh-CN) {
  --serif: "Instrument Serif", var(--cjk-sc-serif);
  --sans: "Instrument Sans", var(--cjk-sc-sans);
}
html:lang(zh-HK) {
  --serif: "Instrument Serif", var(--cjk-tc-serif);
  --sans: "Instrument Sans", var(--cjk-tc-sans);
}

/* Chinese display text: CJK serif first, so 「——」 and Latin inside Chinese lines share one face */
html:lang(zh-CN) { --display-cjk: var(--cjk-sc-serif); }
html:lang(zh-HK) { --display-cjk: var(--cjk-tc-serif); }
html:lang(zh) .hero__title,
html:lang(zh) .about__statement,
html:lang(zh) .shead__title,
html:lang(zh) .tile__text,
html:lang(zh) .bizcard__name,
html:lang(zh) .menu__nav a,
html:lang(zh) .ftr__nav a { font-family: var(--display-cjk); }

@media (max-width: 1023px) {
  :root { --hdr-h: 68px; }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  background: var(--base);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html:lang(zh) body { line-break: strict; }

img,
svg,
picture { display: block; max-width: 100%; }
p,
h1,
h2,
dl,
dd,
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

::selection { background: var(--accent); color: var(--base); }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }

.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.nowrap { white-space: nowrap; }

.wrap {
  width: min(100% - 2 * var(--gut), var(--wrap));
  margin-inline: auto;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--base);
  font-size: 0.875rem;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

.idx {
  color: var(--text-3);
  font: 400 0.8125rem/1 var(--sans);
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.idx::before { content: "("; }
.idx::after { content: ")"; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 54px;
  padding: 0 8px 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 400 1rem/1 var(--sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn__ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1rem;
}
.btn__ic .icon { transition: transform 0.45s var(--ease); }
.btn--light:hover .btn__ic .icon { transform: translateY(2px); }
.btn--dark:hover .btn__ic .icon { transform: translateX(3px); }

.btn--light { background: var(--text); color: var(--base); }
.btn--light .btn__ic { background: var(--base); color: var(--text); }
.btn--light:hover { background: #fff; }

.btn--line {
  padding: 0 26px;
  border-color: var(--line-ui);
  color: var(--text);
}
.btn--line:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.06); }

.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark .btn__ic { background: var(--paper); color: var(--ink); }
.btn--dark:hover { background: #1c1b38; }

/* ---------- Header ---------- */

.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  view-transition-name: site-header;
}
.hdr.is-scrolled,
html.menu-open .hdr {
  background: rgba(5, 5, 15, 0.74);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
/* over a light section the header swaps to day tokens */
.hdr.is-light {
  --text: #0b0b18;
  --text-2: #4f4e63;
  --text-3: #6b6a80;
  --line: rgba(11, 11, 24, 0.1);
  --line-2: rgba(11, 11, 24, 0.18);
  --base: #f2f1ec;
  --accent-2: #2521cd;
}
.hdr.is-light.is-scrolled {
  background: rgba(242, 241, 236, 0.8);
}
.hdr .brand,
.hdr .burger,
.hdr .lang,
.hdr .lang__thumb { transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease), transform 0.5s var(--ease), width 0.5s var(--ease), opacity 0.2s; }

.hdr__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--hdr-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  min-height: 44px;
  color: var(--text);
}
.brand__mark {
  width: 30px;
  height: 29px;
  fill: currentColor;
}
.brand__name {
  font: 400 0.8125rem/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
html:lang(zh) .brand__name { font-size: 0.9375rem; letter-spacing: 0.22em; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.nav__link[aria-current] { color: var(--text); }
.nav__link[aria-current]::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
}
.nav__link--cta {
  margin-left: 8px;
  padding: 0 16px 0 20px;
  background: var(--text);
  color: var(--base);
}
.nav__link--cta:hover { background: #fff; color: var(--base); }
.nav__link--cta[aria-current] { color: var(--base); }
.nav__link--cta[aria-current]::before { background: var(--brand); }
.nav__link--cta .icon { transition: transform 0.4s var(--ease); }
.nav__link--cta:hover .icon { transform: translate(2px, -2px); }

/* language switch: segmented control with a sliding thumb */
.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  isolation: isolate;
}
.lang__opt {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--text-2);
  font: 400 0.8125rem/1 var(--sans);
  letter-spacing: 0.06em;
  transition: color 0.35s var(--ease);
}
.lang__opt:lang(zh) { font-size: 0.875rem; letter-spacing: 0; }
.lang__opt:hover { color: var(--text); }
.lang__opt[data-on] { color: var(--base); }
.lang__thumb {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--w, 40px);
  border-radius: 999px;
  background: var(--text);
  opacity: 0;
  transform: translateX(var(--x, 3px));
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), opacity 0.2s;
}
.lang.is-ready .lang__thumb { opacity: 1; }
.no-js .lang__opt[aria-current] { background: var(--text); color: var(--base); }

/* full native name under the option on hover */
@media (hover: hover) {
  .lang__opt::after {
    content: attr(data-name);
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    padding: 7px 11px;
    border-radius: 10px;
    background: var(--text);
    color: var(--base);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -4px);
    transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
  }
  .lang__opt:hover::after,
  .lang__opt:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  .lang--ftr .lang__opt::after { top: auto; bottom: calc(100% + 12px); }
}

.burger {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.burger__lines {
  position: relative;
  display: block;
  width: 18px;
  height: 10px;
}
.burger__lines span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.45s var(--ease);
}
.burger__lines span:first-child { top: 0; }
.burger__lines span:last-child { top: 8.5px; }
.burger[aria-expanded="true"] .burger__lines span:first-child { transform: translateY(4.25px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

.hdr__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}
.hdr.is-scrolled .hdr__progress { opacity: 1; }
.hdr__progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent-2));
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

@media (max-width: 1023px) {
  .hdr__nav { display: none; }
  .burger { display: grid; }
}
@media (max-width: 479px) {
  .hdr__bar { gap: 10px; }
  html:not(:lang(zh)) .brand__name { display: none; }
  .lang__opt { min-width: 36px; padding: 0 9px; }
}

/* ---------- Mobile menu ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  padding-top: var(--hdr-h);
  background:
    radial-gradient(80% 50% at 0% 100%, rgba(37, 33, 205, 0.3), transparent 70%),
    var(--base);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-in), visibility 0s linear 0.25s;
}
.menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain);
  opacity: 0.06;
  pointer-events: none;
}
.menu[hidden] { display: none; }
.menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s var(--ease), visibility 0s;
}
.menu__body {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-block: 24px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.menu__nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: 400 clamp(2.5rem, 11vw, 4.25rem)/1 var(--serif);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i) * 60ms + 60ms);
}
.menu.is-open .menu__nav a { opacity: 1; transform: none; }
.menu__idx {
  color: var(--text-3);
  font: 400 0.8125rem/1 var(--sans);
  letter-spacing: 0.14em;
}
.menu__foot {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 40px;
  color: var(--text-2);
  font-size: 0.9375rem;
}
.menu__foot p { display: flex; gap: 12px; }
.menu__foot .icon { margin-top: 0.3em; color: var(--accent-2); }
.menu__foot a { color: var(--text); }
@media (min-width: 1024px) {
  .menu { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #1a1a2c;
}
.hero__media picture { height: 100%; }
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  transform-origin: 62% 40%;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 10% 95%, rgba(37, 33, 205, 0.42), transparent 62%),
    linear-gradient(90deg, rgba(5, 5, 15, 0.82) 0%, rgba(5, 5, 15, 0.35) 55%, rgba(5, 5, 15, 0.1) 100%),
    linear-gradient(180deg, rgba(5, 5, 15, 0.7) 0%, rgba(5, 5, 15, 0.1) 28%, rgba(5, 5, 15, 0.45) 64%, var(--base) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grain);
  opacity: 0.08;
  pointer-events: none;
}

.hero__content {
  align-self: end;
  padding-top: calc(var(--hdr-h) + 72px);
  padding-bottom: clamp(40px, 7vh, 80px);
}
.hero__title {
  margin-bottom: clamp(32px, 5vh, 56px);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.hero__title .line__in { display: block; }
.hero__l1 { font-size: clamp(3.4rem, 1.2rem + 8.6vw, 10.75rem); }
.hero__l2 {
  margin-top: 0.06em;
  color: var(--text-2);
  font-size: clamp(1.75rem, 0.9rem + 3.4vw, 4.75rem);
  font-style: italic;
  letter-spacing: -0.01em;
}
html:lang(zh) .hero__title { line-height: 1.12; letter-spacing: 0.02em; }
html:lang(zh) .hero__l1 { font-size: clamp(3.25rem, 1.4rem + 7.4vw, 9.5rem); }
html:lang(zh) .hero__l2 { font-style: normal; font-size: clamp(1.5rem, 0.9rem + 2.6vw, 3.75rem); letter-spacing: 0.06em; }

.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
}
.hero__lead {
  max-width: 33em;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
  text-wrap: pretty;
}
html:lang(zh) .hero__lead { line-height: 1.85; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  border-top: 1px solid var(--line-2);
}
.hero__fact:not(:first-child) > span { white-space: nowrap; }
.hero__fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 26px 0;
  color: var(--text-2);
  font-size: 0.875rem;
  line-height: 1.45;
}
.hero__fact + .hero__fact {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.hero__fact .icon { font-size: 1rem; color: var(--accent-2); }
.hero__fact a,
.menu__foot a,
.ftr__bottom a {
  color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.hero__fact a:hover,
.menu__foot a:hover,
.ftr__bottom a:hover { background-size: 100% 1px; }

@media (max-width: 959px) {
  .hero__bar { grid-template-columns: 1fr; }
  .hero__fact { padding: 14px 0; }
  .hero__fact + .hero__fact {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 599px) {
  .hero__fact:first-child { display: none; }
  .hero__fact:nth-child(2) { border-top: 0; }
  .btn { height: 50px; }
}

/* hero entrance */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__img { animation: hero-zoom 2.4s var(--ease) both; }
  .js .hero__title .line__in { animation: rise 1s var(--ease) 0.1s both; }
  .js .hero__title .line + .line .line__in { animation-delay: 0.22s; }
  .js .hero__row { animation: fade-up 0.9s var(--ease) 0.42s both; }
  .js .hero__bar { animation: fade-up 0.9s var(--ease) 0.55s both; }
  .js .hdr__bar { animation: fade-down 0.8s var(--ease) 0.15s both; }
}
@keyframes hero-zoom {
  from { opacity: 0.4; transform: scale(1.14); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { transform: translateY(108%); }
  to { transform: none; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- About (day section) ---------- */

.about {
  position: relative;
  padding-block: clamp(96px, 12vw, 184px);
  background: var(--paper);
  color: var(--ink);
}
.about__top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.about .idx { color: var(--ink-3); }
.about__rule { flex: 1; height: 1px; background: var(--ink-line); }
.about__mark { width: 22px; height: 21px; fill: var(--brand); }

.about__statement {
  max-width: 20em;
  font: 400 clamp(2.125rem, 1rem + 3.7vw, 4.75rem)/1.06 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
html:lang(zh) .about__statement {
  max-width: 24em;
  font-size: clamp(1.75rem, 1rem + 2.6vw, 3.5rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: justify;
}
.js .about__statement .w {
  opacity: 0.18;
  transition: opacity 0.3s linear;
}
.js .about__statement .w.is-on { opacity: 1; }

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(36px, 5vw, 96px);
  margin-top: clamp(64px, 8vw, 128px);
}
.about__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  border-radius: var(--r-lg);
  background: #26253a;
}
.about__media picture { height: 100%; }
.about__img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  transform: translateY(-8%);
}
.about__aside p {
  max-width: 24em;
  margin-bottom: 36px;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.55;
  text-wrap: pretty;
}
html:lang(zh) .about__aside p { line-height: 1.9; text-align: justify; }

@media (max-width: 899px) {
  .about__grid { grid-template-columns: 1fr; }
}

/* ---------- Section heads ---------- */

.shead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 20px 56px;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.shead .idx { grid-column: 1 / -1; }
.shead__title {
  font: 400 clamp(3.4rem, 0.8rem + 9.6vw, 10.5rem)/0.88 var(--serif);
  letter-spacing: -0.012em;
}
html:lang(zh) .shead__title {
  font-size: clamp(3rem, 1rem + 7vw, 8.25rem);
  line-height: 1.05;
  letter-spacing: 0.12em;
}
.shead__intro {
  justify-self: end;
  max-width: 21em;
  padding-bottom: 0.6em;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
}
@media (max-width: 767px) {
  .shead { grid-template-columns: 1fr; }
  .shead__intro { justify-self: start; }
}

/* ---------- Services (bento) ---------- */

.services {
  position: relative;
  padding-block: clamp(96px, 12vw, 184px);
  overflow: hidden;
  isolation: isolate;
}
.services::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -28vw;
  right: -22vw;
  width: 72vw;
  height: 72vw;
  background: radial-gradient(closest-side, rgba(37, 33, 205, 0.34), transparent);
}
.services__mark {
  position: absolute;
  z-index: -1;
  top: clamp(80px, 9vw, 140px);
  right: calc(var(--gut) * -0.5);
  width: min(44vw, 620px);
  height: auto;
  aspect-ratio: 450 / 430;
  fill: rgba(255, 255, 255, 0.028);
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 268px;
  padding: 26px 26px 30px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.tile--wide {
  grid-column: span 2;
  background:
    radial-gradient(110% 140% at 100% 0%, rgba(37, 33, 205, 0.38), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tile__no {
  color: var(--text-3);
  font: 400 0.8125rem/1 var(--sans);
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.tile__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(143, 139, 255, 0.26);
  border-radius: 50%;
  background: rgba(143, 139, 255, 0.08);
  color: var(--accent-2);
  font-size: 22px;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.tile__text {
  max-width: 19em;
  color: var(--text);
  font: 400 clamp(1.35rem, 1.05rem + 0.6vw, 1.65rem)/1.16 var(--serif);
  text-wrap: pretty;
}
html:lang(zh) .tile__text {
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.3125rem);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* cursor spotlight (pointer devices) */
@media (hover: hover) and (pointer: fine) {
  .tile::before,
  .tile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
  }
  .tile::before {
    z-index: -1;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(143, 139, 255, 0.14), transparent 45%);
  }
  .tile::after {
    padding: 1px;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(169, 166, 255, 0.7), transparent 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
  }
  .bento:hover .tile::before,
  .bento:hover .tile::after { opacity: 1; }
  .tile:hover .tile__icon {
    border-color: rgba(169, 166, 255, 0.6);
    background: rgba(143, 139, 255, 0.16);
  }
}

@media (max-width: 1099px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .bento { grid-template-columns: 1fr; gap: 10px; }
  .tile,
  .tile--wide { grid-column: auto; min-height: 0; gap: 32px; padding: 22px 22px 26px; }
}

/* ---------- Contact ---------- */

.contact {
  position: relative;
  padding-block: clamp(96px, 12vw, 184px);
  overflow: hidden;
  isolation: isolate;
}
.contact__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.contact__media picture { height: 100%; }
.contact__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 60% at 85% 45%, rgba(37, 33, 205, 0.32), transparent 70%),
    linear-gradient(180deg, var(--base) 0%, rgba(5, 5, 15, 0.84) 24%, rgba(5, 5, 15, 0.8) 72%, var(--base) 100%);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(48px, 6vw, 112px);
}
@media (max-width: 959px) {
  .contact__grid { grid-template-columns: 1fr; }
}

.bizcard-wrap {
  perspective: 1400px;
}
.bizcard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 320px;
  padding: clamp(26px, 3.4vw, 46px);
  border-radius: 24px;
  background: linear-gradient(150deg, #ffffff 0%, #f3f2ec 55%, #e9e8e1 100%);
  color: var(--ink);
  box-shadow:
    0 60px 120px -40px rgba(0, 0, 0, 0.7),
    0 40px 80px -50px rgba(37, 33, 205, 0.55);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease);
}
@media (min-width: 1100px) {
  .bizcard { aspect-ratio: 1.72; min-height: 0; }
}
.bizcard__logo { width: clamp(64px, 6vw, 88px); height: auto; }
.bizcard__name {
  margin-bottom: 12px;
  font: 400 clamp(1.5rem, 1.05rem + 1.1vw, 2.125rem)/1.1 var(--serif);
  letter-spacing: -0.005em;
}
html:lang(zh) .bizcard__name { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem); line-height: 1.35; letter-spacing: 0.04em; }
.bizcard__addr {
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.bizcard__site {
  position: absolute;
  top: clamp(26px, 3.4vw, 46px);
  right: clamp(26px, 3.4vw, 46px);
  color: var(--ink-3);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}
.bizcard__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(70% 90% at var(--sx, 30%) var(--sy, 0%), rgba(255, 255, 255, 0.9), transparent 60%);
  mix-blend-mode: soft-light;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.bizcard-wrap:hover .bizcard__sheen { opacity: 1; }

.lines { display: grid; gap: 40px; }
.lines dt {
  margin-bottom: 14px;
  color: var(--text-3);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html:lang(zh) .lines dt { letter-spacing: 0.12em; }
.lines dd { margin: 0; }
.lines__item {
  display: block;
  color: var(--text);
  font: 400 clamp(2rem, 1.1rem + 2.6vw, 3.6rem)/1.14 var(--serif);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.lines__item a {
  position: relative;
  display: inline-block;
  background: linear-gradient(currentColor, currentColor) 0 92% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
}
.lines__item a:hover { background-size: 100% 1px; color: #fff; }
.lines__arrow {
  position: absolute;
  top: 0.12em;
  left: calc(100% + 0.08em);
  font-size: 0.42em;
  color: var(--accent-2);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.lines__item a:hover .lines__arrow,
.lines__item a:focus-visible .lines__arrow { opacity: 1; transform: none; }

/* ---------- Footer ---------- */

.ftr {
  position: relative;
  padding-top: clamp(72px, 9vw, 120px);
  background-color: #0b0b26;
  background-image: url("../../images/footer.jpg");
  background-image: image-set(url("../../images/footer.webp") type("image/webp"), url("../../images/footer.jpg") type("image/jpeg"));
  background-position: center;
  background-size: cover;
  background-blend-mode: luminosity;
  color: var(--text-2);
}
.ftr::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 15, 0.55), rgba(5, 5, 15, 0.82));
  pointer-events: none;
}
.ftr > * { position: relative; }
.ftr__tab {
  position: absolute;
  top: 1px;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(188px, 17vw, 236px);
  aspect-ratio: 663 / 162;
  transform: translate(-50%, -100%);
}
.ftr__tab picture,
.ftr__tab img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ftr__tab img { transform: scaleY(-1); }
.ftr__tab span {
  position: relative;
  padding-top: 6px;
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}
.ftr__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  padding-bottom: clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.ftr__logo { width: clamp(96px, 9vw, 128px); height: auto; }
.ftr__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 36px;
}
.ftr__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-2);
  font: 400 clamp(1.5rem, 1.1rem + 1vw, 2.25rem)/1 var(--serif);
  transition: color 0.25s var(--ease);
}
.ftr__nav a:hover { color: var(--text); }
.ftr__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding-block: 26px calc(30px + env(safe-area-inset-bottom));
  color: var(--text-3);
  font-size: 0.8125rem;
}
@media (max-width: 767px) {
  .ftr__grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .ftr__bottom { justify-content: center; text-align: center; }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* scroll-linked parallax where the browser supports it */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .about__img {
      animation: drift linear both;
      animation-timeline: view();
    }
    .contact__img {
      animation: drift-soft linear both;
      animation-timeline: view();
    }
  }
}
@keyframes drift {
  from { transform: translateY(-14%); }
  to { transform: translateY(0); }
}
@keyframes drift-soft {
  from { transform: scale(1.12) translateY(-4%); }
  to { transform: scale(1.12) translateY(4%); }
}

/* ---------- Page transitions between languages ---------- */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.22s var(--ease-in) both vt-out; }
::view-transition-new(root) { animation: 0.5s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Print ---------- */

@media print {
  .hdr,
  .menu,
  .hero__media,
  .hero__actions,
  .contact__media,
  .services__mark,
  .ftr__tab,
  .skip { display: none !important; }
  html,
  body,
  .about { background: #fff; color: #000; }
  .hero,
  .services,
  .contact,
  .ftr { color: #000; background: #fff; min-height: 0; }
  .hero__l2,
  .hero__lead,
  .shead__intro,
  .lines__item,
  .tile__text { color: #000; }
  .js .reveal,
  .js .about__statement .w { opacity: 1; transform: none; }
  .tile { break-inside: avoid; border-color: #999; background: none; }
}
