:root {
  --navy: #08131f;
  --ink: rgba(244, 248, 252, 0.94);
  --muted: rgba(198, 214, 228, 0.76);
  --faint: rgba(198, 214, 228, 0.5);
  --frame: rgba(168, 206, 230, 0.5);
  --focus: #9dffc4;
  --font: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --font-zh: "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --measure: 32rem;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  height: 100%;
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  background: var(--navy);
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: 0.005em;
  font-variant-numeric: lining-nums;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.frame {
  position: relative;
  z-index: 1;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  border: 1px solid var(--frame);
  display: grid;
  grid-template-columns: 1fr minmax(280px, var(--measure));
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 3.5rem;
  padding: 2.2rem 3.2rem 2rem 2.6rem;
}

.hero {
  position: absolute;
  z-index: 0;
  inset: 0;
  margin: 0;
  min-height: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 34% 52%;
  display: block;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(214, 226, 236, 0.16);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    112deg,
    rgba(8, 19, 31, 0) 0%,
    rgba(8, 19, 31, 0) 30%,
    rgba(16, 42, 56, 0.42) 33%,
    rgba(16, 42, 56, 0.7) 46%,
    rgba(8, 19, 31, 0.96) 56%,
    var(--navy) 64%,
    var(--navy) 100%
  );
  pointer-events: none;
}

header,
.place,
.welcome {
  position: relative;
  z-index: 1;
}

header {
  grid-column: 1;
  grid-row: 1;
}

.place {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.geo {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.12em;
}

.lang button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  color: #fff;
}

.zh { display: none; }

body.zh {
  display: block;
  font-family: var(--font-zh);
  letter-spacing: 0;
}

body.zh .en { display: none; }
body.zh .zh { display: inline; }
body.zh .brand-sub { font-size: 0.68rem; }
body.zh .lede { font-size: 1.05rem; line-height: 1.75; }
body.zh .contact { font-size: 0.96rem; line-height: 1.65; }
body.zh .office { font-size: 0.92rem; line-height: 1.7; }
body.zh .geo { letter-spacing: 0.18em; text-transform: none; }
body.zh .contact p { grid-template-columns: 3rem 1fr; }
body.zh .label { letter-spacing: 0.04em; text-transform: none; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  text-decoration: none;
}

.brand svg {
  width: 42px;
  height: 42px;
  display: block;
  filter: drop-shadow(0 0 1px rgba(8, 19, 31, 0.65));
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
}

.brand-name {
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px rgba(8, 19, 31, 0.85);
}

.brand-sub {
  color: #fff;
  text-shadow: 0 1px 1px rgba(8, 19, 31, 0.85);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: none;
}

.welcome {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
  justify-self: start;
  min-height: 0;
  max-width: var(--measure);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.welcome-inner {
  margin-block: auto;
  width: 100%;
  padding-block: 0.4rem 0.2rem;
}

.lede {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
}

.lede a {
  text-decoration: none;
}

.rule {
  width: 2.25rem;
  height: 1px;
  margin: 2.25rem 0 1.85rem;
  border: 0;
  background: #2a9f72;
}

.contact {
  font-size: 0.96rem;
  line-height: 1.55;
}

.contact p,
.office p,
.legal {
  margin: 0;
}

.contact p + p,
.office p + p {
  margin-top: 0.35rem;
}

.contact p {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  column-gap: 0.85rem;
  align-items: baseline;
}

.label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact a,
.office a {
  text-decoration: none;
}

.contact a:hover,
.office a:hover {
  text-decoration: underline;
}

.office {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.6;
}

.legal {
  margin-top: 2rem;
  color: var(--faint);
  font-size: 0.66rem;
  line-height: 1.55;
}

.legal a {
  color: var(--muted);
  text-decoration: none;
}

.legal a:hover {
  color: #fff;
  text-decoration: underline;
}

body:has(.doc) {
  height: auto;
  min-height: 100dvh;
  overflow: auto;
}

.doc {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.6rem 1.5rem 3rem;
}

.doc .lang {
  position: absolute;
  top: 1.7rem;
  right: 1.6rem;
}

.doc-frame {
  max-width: 40rem;
  margin: 0 auto;
}

.doc h1 {
  margin: 2.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.doc p {
  margin: 0 0 0.9rem;
  max-width: 38rem;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .frame {
    --measure: 26rem;
    column-gap: 2rem;
  }
}

@media (max-width: 860px) {
  body {
    height: auto;
    overflow: auto;
  }

  .frame {
    position: relative;
    inset: auto;
    height: auto;
    min-height: calc(100dvh - 20px);
    grid-template-columns: 1fr;
    row-gap: 1.6rem;
    margin: 10px;
    padding: 1.35rem 1.2rem 1.8rem;
  }

  .hero {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 1;
    height: 40vh;
    min-height: 40vh;
    margin: -1.35rem -1.2rem 0;
    pointer-events: none;
  }

  .hero img {
    object-position: center 48%;
    transform: none;
  }

  .hero::before {
    background: rgba(214, 226, 236, 0.1);
  }

  .hero::after {
    background: linear-gradient(
      180deg,
      rgba(8, 19, 31, 0) 0%,
      rgba(8, 19, 31, 0) 62%,
      rgba(8, 19, 31, 0.45) 82%,
      var(--navy) 100%
    );
  }

  .place::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -0.75rem -0.9rem -0.75rem -1.5rem;
    background: radial-gradient(
      ellipse at 78% 35%,
      rgba(8, 19, 31, 0.9) 0%,
      rgba(8, 19, 31, 0.55) 52%,
      rgba(8, 19, 31, 0) 78%
    );
    pointer-events: none;
  }

  header {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }

  .place {
    position: absolute;
    top: 1.05rem;
    right: 1.15rem;
    z-index: 2;
  }

  .welcome {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    overflow: visible;
    display: block;
  }

  .welcome-inner {
    margin-block: 0;
  }
}

@media (max-height: 740px) and (min-width: 861px) {
  html,
  body {
    height: auto;
    overflow: auto;
  }

  .frame {
    position: relative;
    height: auto;
    max-height: none;
    min-height: 100dvh;
    overflow: visible;
  }

  .welcome {
    align-self: start;
    overflow: visible;
    display: block;
    padding: 3vh 0 1.5rem;
  }

  .welcome-inner {
    margin-block: 0;
  }
}
