:root {
  color-scheme: dark;
  --font-sans:
    "Almarai", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-family: var(--font-sans);
  --black: #030303;
  --cream: #e1e0cc;
  --cream-soft: #dedbc8;
  --white: #f7f5ea;
  --glass: rgba(16, 16, 16, 0.62);
  --glass-strong: rgba(28, 28, 25, 0.72);
  --muted: rgba(225, 224, 204, 0.62);
  --soft: rgba(225, 224, 204, 0.2);
  --line: rgba(225, 224, 204, 0.16);
  --nav-bar-height: clamp(54px, 4.88vw, 96px);
  --nav-bar-bg: url("./assets/nav-bar-bg.png?v=20260714-nav-bar-bg-1");
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background: var(--black);
  overflow-x: clip;
}

button,
select,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.ambient-video {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.28;
  filter: saturate(0.45) contrast(1.02) brightness(1.05) hue-rotate(175deg);
}

.site-noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: normal;
  opacity: 0.16;
}

.liquid-glass {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(225, 224, 204, 0.13);
  background: var(--glass);
  background-blend-mode: luminosity;
  box-shadow:
    inset 0 1px 1px rgba(225, 224, 204, 0.14),
    0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.liquid-glass::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(225, 224, 204, 0.2) 0%,
      rgba(225, 224, 204, 0.06) 28%,
      transparent 48%,
      rgba(225, 224, 204, 0.06) 76%,
      rgba(225, 224, 204, 0.16) 100%
    );
  opacity: 0.42;
  mask-image: linear-gradient(#000, transparent);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--nav-bar-height);
  padding: 0 clamp(26px, 3vw, 54px);
  border-radius: 0;
  background-image: var(--nav-bar-bg);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(124px, 8.4vw, 164px);
  min-height: 44px;
  opacity: 0;
  outline: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.site-nav {
  display: flex;
  gap: clamp(42px, 7vw, 128px);
  align-items: center;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 0.15em;
  border-radius: 0;
  outline: none;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-sans);
  font-size: clamp(1.26rem, 1.5vw, 1.72rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.22),
    0 4px 10px rgba(0, 0, 0, 0.28);
  transition:
    color 0.18s ease,
    opacity 0.18s ease;
}

.site-nav a::after {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 0;
  height: 1.5px;
  content: "";
  border-radius: 1px;
  background: currentColor;
  opacity: 0;
  transform: translateX(-50%);
  transition:
    width 0.24s ease,
    opacity 0.2s ease;
  pointer-events: none;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #fff;
  background: transparent;
  opacity: 1;
}

.site-nav a:hover::after,
.site-nav a.is-active::after,
.site-nav a:focus-visible::after,
.site-nav a.is-focused::after {
  width: 100%;
  opacity: 0.72;
}

.brand {
  outline: none;
}

.brand:focus-visible {
  outline: 2px solid rgba(225, 224, 204, 0.45);
  outline-offset: 4px;
}

.page-view {
  display: none;
  min-height: 100vh;
  padding: 108px 20px 56px;
}

.home-view,
.contact-view {
  padding: 0;
}

.page-view.is-active {
  display: block;
}

.site-footer {
  position: fixed;
  right: 0;
  bottom: 12px;
  left: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  pointer-events: none;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.4;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.78);
  pointer-events: auto;
  transition: color 0.18s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-view,
.contact-view {
  display: none;
  place-items: stretch;
  text-align: center;
}

.home-view.is-active,
.contact-view.is-active {
  display: grid;
}

.home-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-hero-logo {
  position: relative;
  z-index: 2;
  display: block;
  width: min(640px, 56vw);
  max-width: calc(100vw - 48px);
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.contact-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.photo-bg-wrap {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.contact-frame::before {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(860px, 82vw);
  height: clamp(72px, 8.5vw, 118px);
  content: "";
  border-radius: 999px;
  background: rgba(168, 176, 182, 0.52);
  filter: blur(22px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.contact-method {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.6vw, 24px);
  max-width: calc(100vw - 48px);
  transform: translate(-50%, -50%);
}

.wechat-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: clamp(44px, 4.1vw, 74px);
  height: clamp(38px, 3.5vw, 64px);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.wechat-mark span {
  position: absolute;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.wechat-mark span::before,
.wechat-mark span::after {
  position: absolute;
  top: 40%;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.wechat-mark span:first-child {
  top: 2%;
  left: 0;
  width: 74%;
  height: 66%;
}

.wechat-mark span:first-child::before {
  left: 30%;
}

.wechat-mark span:first-child::after {
  right: 26%;
}

.wechat-mark span:last-child {
  right: 0;
  bottom: 0;
  width: 66%;
  height: 58%;
}

.wechat-mark span:last-child::before {
  left: 28%;
}

.wechat-mark span:last-child::after {
  right: 25%;
}

.home-frame::before,
.home-frame::after {
  display: none;
}

.contact-email {
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.97);
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 4.8vw, 4.8rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.08),
    0 6px 16px rgba(0, 0, 0, 0.18);
  transition: opacity 0.18s ease;
}

.contact-email:hover {
  opacity: 0.88;
}

.contact-email span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.42em);
  filter: blur(8px);
  animation: email-letter-in 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: clamp(30px, 5vw, 58px);
  transform: translate(8.5%, 4.7%);
}

body[data-route="home"] .site-header,
body[data-route="contact"] .site-header {
  justify-content: space-between;
  min-height: var(--nav-bar-height);
  padding: 0 clamp(28px, 3.2vw, 56px);
  background-image: var(--nav-bar-bg);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-route="home"] .brand,
body[data-route="contact"] .brand {
  display: inline-flex;
  opacity: 0;
}

body[data-route="home"] .site-nav,
body[data-route="contact"] .site-nav {
  gap: clamp(36px, 5.8vw, 108px);
}

body[data-route="contact"] .site-nav a,
body[data-route="home"] .site-nav a {
  min-height: var(--nav-bar-height);
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.18rem, 1.42vw, 1.62rem);
  text-shadow: none;
}

body[data-route="home"] .site-nav a::after,
body[data-route="contact"] .site-nav a::after {
  bottom: clamp(14px, 2.2vw, 20px);
  height: 1px;
  background: rgba(255, 255, 255, 0.92);
}

body[data-route="home"] .site-nav a:hover,
body[data-route="home"] .site-nav a.is-active,
body[data-route="home"] .site-nav a:focus-visible,
body[data-route="home"] .site-nav a.is-focused,
body[data-route="contact"] .site-nav a:hover,
body[data-route="contact"] .site-nav a.is-active,
body[data-route="contact"] .site-nav a:focus-visible,
body[data-route="contact"] .site-nav a.is-focused {
  color: #fff;
  background: transparent;
  outline: none;
}

body[data-route="home"] .site-nav a.is-active::after,
body[data-route="contact"] .site-nav a.is-active::after {
  width: 100%;
  opacity: 0.95;
}

body[data-route="home"] .site-nav a:hover::after,
body[data-route="contact"] .site-nav a:hover::after,
body[data-route="home"] .site-nav a:focus-visible::after,
body[data-route="contact"] .site-nav a:focus-visible::after {
  width: 100%;
  opacity: 0.55;
}

body[data-route="home"] .site-noise {
  opacity: 0;
}

body[data-route="contact"] .site-noise {
  opacity: 0;
}

.contact-card {
  place-self: center;
  width: min(760px, 100%);
  padding: clamp(36px, 7vw, 78px);
  margin: 0 auto;
}

.contact-card {
  width: min(760px, 100%);
  padding: clamp(36px, 7vw, 78px);
  border-radius: 34px;
}

.home-mark,
.kicker,
.micro-status,
.status-card span,
.progress-meta,
.step span,
.library-stats,
.release-badge,
.selected-firmware__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-mark,
.kicker {
  margin-bottom: 18px;
  color: rgba(225, 224, 204, 0.52);
}

.home-content h1,
.contact-card h1,
.home-title-button {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-sans);
  font-size: clamp(4.4rem, 6.2vw, 8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.34);
}

.home-title-button {
  min-width: min(560px, 64vw);
  min-height: 112px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: transparent;
  background: transparent;
  cursor: pointer;
  appearance: none;
  text-shadow: none;
}

.home-title-button:hover,
.home-title-button:focus-visible {
  background: transparent;
  outline: 0;
}

.home-slogan {
  width: fit-content;
  max-width: calc(100vw - 48px);
  margin: 8px auto 0;
  color: rgba(242, 250, 252, 0.82);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.28vw, 1.22rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  filter: blur(8px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease,
    filter 0.75s ease,
    visibility 0.75s ease;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.22),
    0 7px 16px rgba(0, 0, 0, 0.32);
}

.home-frame.is-slogan-visible .home-slogan {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  filter: blur(0);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid rgba(225, 224, 204, 0.18);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.button:hover:not(:disabled),
.button:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  outline: 0;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button--light {
  background: var(--cream-soft);
  color: var(--black);
}

.button--ghost {
  background: rgba(225, 224, 204, 0.04);
  color: var(--cream);
}

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

@keyframes screen-scan {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(100%);
  }
}

@keyframes product-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-1.8deg);
  }

  50% {
    transform: translateX(-50%) translateY(-12px) rotate(1deg);
  }
}

@keyframes screen-glint {
  0%,
  35% {
    transform: translateX(0) rotate(16deg);
    opacity: 0;
  }

  48% {
    opacity: 0.85;
  }

  72%,
  100% {
    transform: translateX(360%) rotate(16deg);
    opacity: 0;
  }
}

@keyframes home-light-drift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1.02);
  }

  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.05);
  }
}

@keyframes slogan-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
  }

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

@keyframes email-letter-in {
  from {
    opacity: 0;
    transform: translateY(0.42em);
    filter: blur(8px);
  }

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

@media (max-width: 900px) {
  .home-product {
    top: 19%;
    width: min(360px, 72vw);
    height: 140px;
  }

  .home-content {
    transform: translateY(11%);
  }

  .home-view {
    padding: 0;
  }

  .contact-view {
    padding: 0;
  }

  .home-frame {
    min-height: 100vh;
  }
}

@media (max-width: 620px) {
  .site-footer {
    bottom: 8px;
  }

  .site-footer a {
    font-size: 0.66rem;
  }

  .site-header {
    top: 0;
    width: 100%;
    min-height: 62px;
    padding: 0 12px;
  }

  body[data-route="home"] .site-header,
  body[data-route="contact"] .site-header {
    min-height: 52px;
    padding: 0 14px;
  }

  body[data-route="home"] .site-nav,
  body[data-route="contact"] .site-nav {
    gap: clamp(14px, 4vw, 28px);
  }

  body[data-route="home"] .site-nav a,
  body[data-route="contact"] .site-nav a {
    min-height: 52px;
    font-size: clamp(0.88rem, 3.4vw, 1rem);
  }

  body[data-route="home"] .site-nav a::after,
  body[data-route="contact"] .site-nav a::after {
    bottom: 12px;
  }

  .brand {
    width: 96px;
    min-height: 36px;
  }

  .site-nav {
    gap: 8px;
  }

  .site-nav a {
    min-height: 34px;
    padding: 0 0.1em;
    font-size: 0.82rem;
  }

  .site-nav a::after {
    bottom: 6px;
    height: 1px;
  }

  .page-view {
    padding: 88px 10px 36px;
  }

  .home-view {
    padding: 0;
  }

  .home-content,
  .contact-card {
    padding: 24px 10px;
  }

  .home-content h1,
  .contact-card h1,
  .home-title-button {
    font-size: clamp(5.6rem, 26vw, 7.4rem);
  }

  .home-slogan {
    width: fit-content;
    max-width: calc(100vw - 32px);
    font-size: clamp(0.96rem, 4.2vw, 1.08rem);
    line-height: 1.35;
  }

  .home-title-button {
    min-width: min(360px, 76vw);
    min-height: 84px;
  }

  .home-frame {
    min-height: 100vh;
    border-radius: 0;
  }

  .home-hero-logo {
    width: min(520px, 76vw);
    max-width: calc(100vw - 32px);
  }

  .contact-frame {
    min-height: 100vh;
  }

  .contact-frame::before {
    top: 52%;
    width: min(460px, 90vw);
    height: 92px;
  }

  .contact-method {
    top: 52%;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 30px);
  }

  .wechat-mark {
    width: 42px;
    height: 36px;
  }

  .wechat-mark span {
    border-width: 2px;
  }

  .contact-email {
    min-width: 0;
    max-width: calc(100vw - 30px);
    font-size: clamp(1.55rem, 7.2vw, 3rem);
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .home-product {
    top: 16%;
    width: min(300px, 74vw);
    height: 116px;
  }

  .home-product__screen {
    font-size: 1rem;
  }

  .home-content {
    transform: translateY(14%);
  }

  .home-actions,
  .button {
    width: 100%;
  }

  .button {
    min-height: 56px;
  }
}

@media (max-width: 400px) {
  body[data-route="home"] .site-nav,
  body[data-route="contact"] .site-nav {
    gap: clamp(8px, 2.8vw, 16px);
  }

  body[data-route="home"] .site-nav a,
  body[data-route="contact"] .site-nav a {
    min-height: 48px;
    font-size: clamp(0.78rem, 3.1vw, 0.9rem);
  }

  .site-nav {
    gap: 6px;
  }

  .site-nav a {
    font-size: 0.76rem;
  }
}
