:root {
  --red: #eb0004;
  --fs-display: 13.6054vw;
  --fs-stat: 6.8027vw;
  --fs-work: max(24px, 3.4014vw);
  --fs-ui: max(13px, 2.0408vw);
  --fs-micro: max(11px, 1.0204vw);
  --gap-title: max(10px, 1.6327vw);
  --pad-header: max(16px, 2.7211vw);
  --top-header: max(16px, 2.1769vw);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --runway: 900vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #000;
  overscroll-behavior: none;
}

body {
  font-family: "Inter Tight", system-ui, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  opacity: calc(1 - var(--stage-out, 0));
}

.stage video,
.stage canvas,
.reveal video,
.reveal canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reveal {
  --rot: calc(var(--reveal, 0) * var(--angle));
  position: fixed;
  top: 50%;
  left: 50%;
  width: calc(var(--reveal, 0) * var(--span-w));
  height: var(--span-h);
  transform: translate(-50%, -50%) rotate(var(--rot));
  overflow: hidden;
  pointer-events: none;
  background: #000;
}

.reveal--a {
  z-index: 5;
  --angle: -45deg;
  --span-w: calc(72vw + 72vh);
  --span-h: calc(72vw + 72vh);
}

.reveal--b {
  z-index: 7;
  --angle: 0deg;
  --span-w: 102vw;
  --span-h: 102vh;
}

.reveal video,
.reveal canvas {
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: translate(-50%, -50%) rotate(calc(var(--rot) * -1));
}

canvas.plate {
  opacity: 0;
  transition: opacity 240ms linear;
}

canvas.plate.is-live {
  opacity: 1;
}

.is-covered {
  visibility: hidden;
}

.chrome {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  perspective: 1200px;
}

.header {
  position: absolute;
  top: calc(var(--top-header) + env(safe-area-inset-top));
  left: var(--pad-header);
  right: var(--pad-header);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.header__brand {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  font-family: "Inter Tight", sans-serif;
  font-size: max(15px, 1.15vw);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.45);
  white-space: nowrap;
  transition: opacity 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .header__brand:hover {
    opacity: 0.72;
  }
}

.header__brand:active {
  transform: scale(0.98);
}

.header__brand:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.9);
}

/* Web frosted-glass approximation, not Apple Liquid Glass */
.header__glass,
.sheet__card {
  isolation: isolate;
  border: 1px solid rgb(255 255 255 / 0.28);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0.05)),
    rgb(8 8 8 / 0.34);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.42),
    inset 0 -1px 0 rgb(255 255 255 / 0.08),
    0 14px 40px rgb(0 0 0 / 0.28);
}

.header__glass {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.42rem 0.85rem 0.46rem;
  border-radius: 999px;
  pointer-events: auto;
}

.header__glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 0%, rgb(255 255 255 / 0.34), transparent 42%),
    linear-gradient(90deg, rgb(255 255 255 / 0.12), transparent 48%, rgb(255 255 255 / 0.1));
  pointer-events: none;
}

.header__glass > * {
  flex: none;
  font-family: "BBH Bartle", sans-serif;
  font-size: max(11px, 0.95vw);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .header__glass > :hover {
    opacity: 0.65;
  }
}

.header__glass > :active {
  transform: scale(0.97);
}

.header__glass > :focus-visible,
.sheet__close:focus-visible,
.sheet__scrim:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.9);
}

.title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-title);
}

.title__tag {
  margin: 0;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-weight: 400;
  font-size: var(--fs-ui);
  text-transform: uppercase;
  text-align: center;
}

.title__mark {
  margin: 0;
  font-family: "BBH Bartle", sans-serif;
  font-size: var(--fs-display);
  line-height: 100%;
  white-space: nowrap;
}

.title__script {
  font-family: "Alex Brush", cursive;
  line-height: 0;
}

.exit-3d {
  transform: translate3d(0, 0, calc(var(--exit, 0) * var(--exit-z, 680px)));
  opacity: calc(1 - var(--exit, 0) * var(--exit, 0));
}

.exit-3d.is-exiting {
  filter: blur(calc(var(--exit) * var(--exit) * var(--exit-blur, 8px)));
}

.exit-3d.is-gone,
.is-gone {
  visibility: hidden;
  filter: none;
}

.rise {
  opacity: var(--in, 0);
  transform: translateY(calc((1 - var(--in, 0)) * var(--rise-y, 2em)));
}

.rise.is-anim {
  filter: blur(calc((1 - var(--in)) * (1 - var(--in)) * var(--rise-blur, 5px)));
}

.is-hidden {
  visibility: hidden;
}

.about {
  position: absolute;
  left: max(20px, 3.9456vw);
  bottom: max(16px, 6.9038vh);
  width: max(260px, 46.0544vw);
  margin: 0;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-weight: 500;
  font-size: var(--fs-ui);
  line-height: 100%;
}

.stat {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + max(12px, 2.0921vh));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-title);
  --exit: 1;
  --exit-z: 464px;
  margin: 0;
}

.stat__label {
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: var(--fs-ui);
  text-transform: uppercase;
}

.stat__num {
  margin: 0;
  font-family: "Alex Brush", cursive;
  font-size: var(--fs-stat);
  line-height: 100%;
}

.sec2 {
  position: fixed;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
  font-family: "Inter Tight", system-ui, sans-serif;
  font-weight: 500;
}

.strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  transform: translateY(var(--s2y, 0));
  will-change: transform;
}

.strip > * {
  position: absolute;
  opacity: var(--o, 0);
}

.w-title {
  left: 3.5374vw;
  top: 22.9252vw;
  width: 38.3673vw;
  display: flex;
  flex-direction: column;
  gap: 1.6327vw;
}

.w-title.is-entering {
  filter: blur(var(--wb, 0));
}

.w-title .w-eye {
  margin: 0;
  font-size: var(--fs-micro);
  text-transform: uppercase;
}

.w-mark {
  margin: 0;
  font-family: "BBH Bartle", sans-serif;
  font-size: var(--fs-work);
  font-weight: 400;
}

.w-script {
  font-family: "Alex Brush", cursive;
  line-height: 0;
}

.w-desc1 {
  left: 50%;
  top: 58.7755vw;
  width: calc(50% - var(--pad-header));
  margin: 0;
  font-size: var(--fs-ui);
}

.w-list {
  top: 110.2041vw;
  left: 50%;
  width: 64.2857vw;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  gap: 2.7211vw;
}

.w-col {
  display: flex;
  flex-direction: column;
  gap: 2.6531vw;
}

.w-col--l {
  width: 32.7891vw;
  align-items: flex-end;
}

.w-col--l .w-row {
  --dir: -1;
  text-align: right;
}

.w-col--r {
  width: 28.7755vw;
  align-items: flex-start;
}

.w-col--r .w-row {
  --dir: 1;
}

.w-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 1.3605vw;
  transform: translateX(calc(var(--dir, 1) * var(--fly, 0) * var(--fly-x, 62vw)));
  opacity: calc(1 - var(--fly) * var(--fly));
  white-space: nowrap;
}

.w-row.is-flying {
  filter: blur(calc(var(--fly) * var(--fly) * var(--fly-blur, 12px)));
}

.w-year {
  font-size: var(--fs-micro);
  white-space: nowrap;
}

.w-brand {
  font-size: var(--fs-ui);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  white-space: nowrap;
}

.w-name {
  font-size: var(--fs-ui);
  white-space: nowrap;
}

.w-desc2 {
  top: 125.8503vw;
  left: 50%;
  width: 38.2993vw;
  transform: translateX(-50%);
  margin: 0;
  font-size: var(--fs-micro);
  text-align: center;
}

.runway {
  height: var(--runway);
}

.js .title__mark {
  opacity: 0;
  filter: blur(14px);
}

.js .title__tag {
  opacity: 0;
}

.js .header__brand,
.js .header__glass {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px);
}

.js.is-ready .title__mark {
  opacity: 1;
  filter: none;
  transition: opacity 1400ms var(--ease-expo), filter 1400ms var(--ease-expo);
}

.js.is-ready .title__tag {
  opacity: 1;
  transition: opacity 700ms var(--ease-expo) 380ms;
}

.js.is-ready .header__brand,
.js.is-ready .header__glass {
  opacity: 1;
  filter: none;
  transform: none;
  transition:
    opacity 700ms var(--ease-expo) 300ms,
    filter 700ms var(--ease-expo) 300ms,
    transform 700ms var(--ease-expo) 300ms;
}

.auth {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: none;
}

.auth.is-open {
  display: block;
}

.auth__scrim {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.auth__card {
  position: absolute;
  top: var(--auth-top, 4.5rem);
  right: var(--auth-right, var(--pad-header));
  width: min(20rem, calc(100vw - 2 * var(--pad-header)));
  padding: 1.1rem 1.15rem 1.15rem;
  border-radius: 1.15rem;
  color: #fff;
  background: rgb(12 12 12 / 0.55);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgb(255 255 255 / 0.14);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.35);
}

.auth__close {
  position: absolute;
  top: 0.85rem;
  right: 0.95rem;
  z-index: 2;
  font-family: "BBH Bartle", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.7;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.auth__close:hover {
  opacity: 1;
}

.auth__title {
  margin: 0 0 0.85rem;
  padding-right: 2.4rem;
  font-family: "BBH Bartle", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.25;
}

.auth__form {
  display: grid;
  gap: 0.7rem;
}

.auth__field {
  display: grid;
  gap: 0.35rem;
  font-size: 12px;
  opacity: 0.95;
}

/* 上面给了 display: grid，UA 的 [hidden] 会被盖掉，这里显式收回 */
.auth__field[hidden] {
  display: none;
}

.auth__field span {
  opacity: 0.7;
}

.auth__field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 0.75rem;
  background: rgb(0 0 0 / 0.28);
  color: #fff;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.auth__field input:focus {
  border-color: rgb(255 255 255 / 0.42);
}

.auth__code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.auth__code-btn,
.auth__submit {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: #111;
  background: #fff;
}

.auth__code-btn {
  padding: 0 0.85rem;
  font-size: 12px;
  white-space: nowrap;
  background: rgb(255 255 255 / 0.92);
}

.auth__code-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth__remember {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.05rem 0;
  font-size: 12px;
  opacity: 0.85;
  cursor: pointer;
  user-select: none;
}

.auth__remember input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
}

.auth__submit {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 14px;
  font-weight: 600;
  margin-top: 0.15rem;
}

.auth__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth__hint {
  margin: 0;
  color: rgb(255 255 255 / 0.72);
  font-size: 12px;
  line-height: 1.4;
}

.auth__error {
  margin: 0;
  color: #ffb4b4;
  font-size: 12px;
  line-height: 1.4;
}

.auth__switch {
  margin: 0.85rem 0 0;
  text-align: center;
}

.auth__switch button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  opacity: 0.75;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.auth__switch button:hover {
  opacity: 1;
}

@media (prefers-reduced-transparency: reduce) {
  .auth__card {
    background: rgb(12 12 12 / 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.sheet.is-open {
  display: block;
}

.sheet__scrim {
  position: absolute;
  inset: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.sheet__card {
  position: absolute;
  top: var(--sheet-top, 4.5rem);
  right: var(--sheet-right, var(--pad-header));
  width: min(28rem, calc(100vw - 2 * var(--pad-header)));
  max-height: calc(100vh - var(--sheet-top, 4.5rem) - var(--pad-header));
  overflow: auto;
  padding: 1.25rem 1.35rem 1.4rem;
  border-radius: 1.25rem;
  color: #fff;
}

.sheet__close {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  z-index: 2;
  font-family: "BBH Bartle", sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.7;
}

.sheet__close:hover {
  opacity: 1;
}

.sheet__body {
  display: none;
}

.sheet__body.is-active {
  display: block;
}

.sheet__kicker {
  margin: 0 0 0.3rem;
  padding-right: 3.4rem;
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.65;
}

.sheet__title {
  margin: 0 0 0.55rem;
  padding-right: 2.5rem;
  font-family: "BBH Bartle", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.25;
}

.sheet__text,
.sheet__list li {
  margin: 0 0 0.5rem;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
}

.sheet__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet__list li {
  padding-left: 0.95rem;
  position: relative;
}

.sheet__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border: 1px solid #fff;
}

.sheet__list li:last-child,
.sheet__text:last-child {
  margin-bottom: 0;
}

.sheet__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sheet__contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.sheet__contact a {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  padding: 0.72rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgb(255 255 255 / 0.28);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.05)),
    rgb(8 8 8 / 0.28);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.32);
}

@media (hover: hover) and (pointer: fine) {
  .sheet__contact a:hover {
    opacity: 0.82;
  }
}

.sheet__contact a:active {
  transform: scale(0.99);
}

.sheet__contact a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.9);
}

.sheet__contact span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.sheet__contact strong {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
}

@media (prefers-reduced-transparency: reduce) {
  .header__glass,
  .sheet__card,
  .sheet__contact a {
    background: rgb(12 12 12 / 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exit-3d {
    transform: none;
  }

  .exit-3d.is-exiting,
  .rise.is-anim,
  .w-row.is-flying,
  .w-title.is-entering {
    filter: none;
  }

  .rise,
  .w-row {
    transform: none;
  }

  .js .title__mark,
  .js .title__tag,
  .js .header__brand,
  .js .header__glass {
    filter: none;
    transform: none;
  }

  .js.is-ready .title__mark,
  .js.is-ready .title__tag,
  .js.is-ready .header__brand,
  .js.is-ready .header__glass {
    transition: opacity 200ms linear;
  }

  canvas.plate {
    transition: none;
  }
}
