@font-face {
  font-family: "Futura";
  src:
    url("../font/Futura.woff2") format("woff2"),
    url("../font/Futura.woff") format("woff"),
    url("../font/Futura.ttf") format("truetype");
  font-display: swap;
}

/* Theme variables */
:root {
  --bg: #ffffff;
  --text-muted: #b8b8b8;
  --social-icon-size: 40px;
  --social-icon-size-mobile: 30px;
}

/* Base reset */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Futura", "Arial", "Helvetica", sans-serif;
  font-weight: normal;
  background: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a {
  font-weight: normal;
}

/* Page frame */
.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

/* Social links */
.socials {
  position: absolute;
  top: 28px;
  right: 40px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: socials-fade-in 0.6s ease-out 1s forwards;
}

.socials .wechat-entry {
  position: relative;
}

.socials a,
.socials button {
  display: inline-block;
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  text-decoration: none;
  background-color: transparent;
  background-image: url("../images/social-sprite-all.png");
  background-repeat: no-repeat;
  background-size: calc(var(--social-icon-size) * 10)
    calc(var(--social-icon-size) * 2);
  background-position: calc(var(--icon-index) * var(--social-icon-size) * -1) 0;
}

.socials button {
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.socials :is(a, button):is(:hover, :focus-visible) {
  background-position: calc(var(--icon-index) * var(--social-icon-size) * -1)
    calc(var(--social-icon-size) * -1);
}

.wechat-qrcode {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  width: 120px;
  height: 120px;
  padding: 5px;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.socials .wechat-entry.qr-open-right .wechat-qrcode {
  left: 0;
  right: auto;
}

.socials .wechat-entry.qr-open-left .wechat-qrcode {
  right: 0;
  left: auto;
}

.wechat-qrcode img {
  width: 100%;
  height: 100%;
}

.socials .wechat-entry.qr-visible .wechat-qrcode {
  opacity: 1;
  visibility: visible;
}

/* Hero + logo */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 210px;
  perspective: 1400px;
}

.logo-wrap {
  opacity: 0;
  transform: translateY(44px);
  animation: logo-slide-up 1.8s ease-out 0.15s forwards;
}

.logo {
  position: relative;
  width: auto;
  height: clamp(92px, 10.5vw, 168px);
  aspect-ratio: 2485 / 391;
  max-width: min(1120px, 88vw);
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transform-style: preserve-3d;
}

.logo-face {
  position: absolute;
  inset: 0;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition:
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.35s ease;
}

.logo-front {
  background-image: url("../images/logo.png");
  opacity: 1;
  transform: rotateY(0deg);
}

.logo-back {
  background-image: url("../images/logo_h.png");
  opacity: 0;
  transform: rotateY(-90deg);
}

.logo.is-flipped .logo-front {
  opacity: 0;
  transform: rotateY(90deg);
}

.logo.is-flipped .logo-back {
  opacity: 1;
  transform: rotateY(0deg);
}

.logo.is-flipped .logo-face,
.logo:focus-visible .logo-face {
  will-change: transform, opacity;
}

.logo:focus-visible .logo-front {
  opacity: 0;
  transform: rotateY(90deg);
}

.logo:focus-visible .logo-back {
  opacity: 1;
  transform: rotateY(0deg);
}

@media (hover: hover) and (pointer: fine) {
  .logo:hover .logo-face {
    will-change: transform, opacity;
  }

  .logo:hover .logo-front {
    opacity: 0;
    transform: rotateY(90deg);
  }

  .logo:hover .logo-back {
    opacity: 1;
    transform: rotateY(0deg);
  }
}

/* Contact block */
.management {
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  letter-spacing: 1px;
  opacity: 0;
  animation: management-slide-up 0.8s ease-out 1s forwards;
}

/* Motion */
@keyframes management-slide-up {
  from {
    opacity: 0;
    transform: translate(-50%, 44px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes logo-slide-up {
  from {
    opacity: 0;
    transform: translateY(44px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes socials-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .socials,
  .logo-wrap,
  .management {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .logo {
    transition: none;
  }
}

/* Contact typography */
.management h2 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 0.95;
  letter-spacing: 1.6px;
}

.management p {
  margin: 0;
}

.management .name {
  font-size: 12px;
  letter-spacing: 1.1px;
}

.management .mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  white-space: nowrap;
}

.management .mail a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  padding-left: 20px;
  background: url("../images/icon-email.png") no-repeat center left;
  background-size: 15px 12px;
}

.management .mail a:hover,
.management .mail a:focus-visible {
  text-decoration: underline;
}

/* Footer */
.copyright {
  position: absolute;
  left: 26px;
  bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #b9b9b9;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.copyright .copyright-logo {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
}

.copyright .copyright-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 30px;
  margin: 0;
  line-height: 1.2;
}

.copyright .copyright-main {
  display: block;
  white-space: nowrap;
}

.copyright .copyright-links a {
  display: inline-block;
  margin-right: 5px;
  color: #b9b9b9;
  text-decoration: none;
}

.copyright .copyright-links a.beian{
    padding-left: 15px;
    background: url("../images/beian.png") no-repeat center left;
    background-size: 12px;
}

/*.copyright .copyright-record:hover,*/
/*.copyright .copyright-record:focus-visible {*/
/*  text-decoration: underline;*/
/*}*/

.copyright .copyright-links a:hover,
.copyright .copyright-links a:focus-visible {
  text-decoration: underline;
}

/* Mobile layout */
@media (max-width: 749px) {
  .socials {
    --social-icon-size: var(--social-icon-size-mobile);
    top: 18px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    gap: 4px;
  }

  .wechat-qrcode {
    width: 92px;
    height: 92px;
  }

  .hero {
    padding: 80px 14px 200px;
  }

  .logo {
    height: clamp(56px, 11vw, 86px);
    max-width: 92vw;
  }

  .management {
    bottom: 126px;
    letter-spacing: 0.8px;
  }

  .copyright {
    left: 50%;
    right: auto;
    bottom: 14px;
    transform: translateX(-50%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    white-space: normal;
  }

  .copyright .copyright-text {
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }

  .copyright .copyright-main {
    white-space: nowrap;
  }

  .copyright .copyright-record {
    display: block;
  }
}
