/* =========================================================
   广州大为文化股份有限公司 官网样式
   结构：tokens → base → layout → components → sections → responsive
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --brand: #e4172d;
  --brand-dark: #c0122a;

  --ink: #0e1116;
  --ink-2: #3a3f47;
  --muted: #6b717b;
  --line: #e5e7eb;
  --line-dark: rgba(255, 255, 255, 0.14);

  --bg: #ffffff;
  --bg-soft: #f5f6f7;
  --bg-dark: #0b0d11;

  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Noto Sans SC', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 72px;
  --section-y: clamp(80px, 11vw, 144px);

  --radius: 10px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
}

/* ---------- components ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: currentColor;
}

.eyebrow span {
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.86);
}

.eyebrow--light::before {
  background: var(--brand);
}

.section-title {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.prose p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.9;
}

.prose p + p {
  margin-top: 16px;
}

.prose__lead {
  font-size: clamp(17px, 1.6vw, 19px) !important;
  color: var(--ink) !important;
  line-height: 1.85 !important;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}

.btn__icon--fill {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.btn:hover .btn__icon:not(.btn__icon--fill) {
  transform: translateX(3px);
}

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--light:hover {
  background: rgba(255, 255, 255, 0.86);
}

.btn--ghost-light {
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.btn--ghost-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: var(--brand);
}

.btn--outline {
  border-color: var(--line);
  color: var(--ink);
}

.btn.is-disabled {
  color: #a3a8b0;
  border-color: var(--line);
  background: transparent;
  cursor: not-allowed;
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: #fff;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  position: relative;
  display: block;
  flex-shrink: 0;
}

.brand__logo {
  width: 160px;
  height: auto;
  transition: opacity 0.3s var(--ease);
}

.brand__logo--dark {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__list {
  display: flex;
  gap: 8px;
}

.nav__link {
  position: relative;
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  opacity: 0.78;
  transition: opacity 0.2s var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  opacity: 1;
}

.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__stock {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 24px;
  border-left: 1px solid currentColor;
  border-left-color: rgba(255, 255, 255, 0.24);
  font-size: 13px;
  opacity: 0.78;
}

.nav__stock strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.nav-toggle {
  display: none;
}

/* 滚动后的实底状态 */
.site-header.is-solid {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}

.site-header.is-solid .brand__logo--light {
  opacity: 0;
}

.site-header.is-solid .brand__logo--dark {
  opacity: 1;
}

.site-header.is-solid .nav__stock {
  border-left-color: var(--line);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg-dark);
  color: #fff;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

/* 文字可读性遮罩 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(11, 13, 17, 0.88) 0%, rgba(11, 13, 17, 0.55) 55%, rgba(11, 13, 17, 0.2) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 56px;
}

.hero__copy {
  max-width: 640px;
  margin-bottom: auto;
  margin-top: auto;
  padding-bottom: 72px;
}

.hero__title {
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero__latin {
  margin-top: 20px;
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 600;
  letter-spacing: 0.42em;
  color: rgba(255, 255, 255, 0.6);
}

.hero__lead span {
  display: inline-block;
}

.hero__lead {
  max-width: 560px;
  margin-top: 32px;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
}

.hero__fact {
  padding: 24px 24px 0 0;
}

.hero__fact + .hero__fact {
  padding-left: 24px;
  border-left: 1px solid var(--line-dark);
}

.hero__fact dt {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.hero__fact dd {
  margin-top: 6px;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.hero__fact dd span {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- product ---------- */
.product__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
}

.app-id {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.app-id__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
}

.app-id__name {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.app-id__meta {
  font-size: 13px;
  color: var(--muted);
}

.product .section-title {
  margin-bottom: 24px;
}

.product .prose {
  max-width: 520px;
}

.download {
  display: flex;
  align-items: stretch;
  gap: 24px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.download__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.download__qr img {
  width: 104px;
  height: 104px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  image-rendering: pixelated;
}

.download__qr figcaption {
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
}

.download__actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.download__actions .btn {
  min-width: 160px;
}

.product__stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 24px;
  border-radius: 16px;
  background: var(--bg-soft);
}

.device {
  width: min(300px, 72%);
  aspect-ratio: 750 / 1624;
  padding: 10px;
  border-radius: 44px;
  background: #111317;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 30px 60px -20px rgba(14, 17, 22, 0.35);
}

.device__screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: cover;
  background: #fff;
}

/* ---------- about ---------- */
.about {
  background: var(--bg-soft);
}

.about__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
}

.about__stock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.about__stock i {
  width: 1px;
  height: 12px;
  background: #c9ccd1;
}

.about__body {
  padding-top: 4px;
}

.timeline {
  margin-top: clamp(64px, 8vw, 104px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.timeline__title {
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.timeline__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.timeline__item {
  position: relative;
  padding-top: 24px;
}

.timeline__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.timeline__item::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 17px;
  right: -24px;
  height: 1px;
  background: #d6d9dd;
}

.timeline__item:last-child::after {
  display: none;
}

.timeline__item time {
  display: block;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.timeline__item p {
  max-width: 320px;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
}

/* ---------- footer ---------- */
.site-footer {
  padding: 72px 0 32px;
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.6fr;
  gap: 40px;
  padding-bottom: 48px;
}

.site-footer__brand img {
  width: 160px;
  height: auto;
}

.site-footer__brand p {
  margin-top: 16px;
  letter-spacing: 0.12em;
}

.site-footer__col h4 {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.site-footer__col li + li {
  margin-top: 10px;
}

.site-footer a {
  transition: color 0.2s var(--ease);
}

.site-footer a:hover {
  color: #fff;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.46);
}

.site-footer__records {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ---------- reveal（仅在 JS 可用时启用） ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   responsive
   ========================================================= */

/* 平板 */
@media (max-width: 1024px) {
  .nav {
    gap: 24px;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* 平板竖屏：限制首屏高度，避免大面积空白 */
@media (max-width: 1024px) and (orientation: portrait) {
  .hero {
    min-height: min(100svh, 860px);
  }
}

/* 平板竖屏 / 手机：折叠导航 */
@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }

  .brand__logo {
    width: 136px;
  }

  .nav-toggle {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0 11px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }

  .nav-toggle__bar {
    display: block;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s var(--ease);
  }

  .nav-toggle[aria-expanded='true'] .nav-toggle__bar:first-child {
    transform: translateY(3.75px) rotate(45deg);
  }

  .nav-toggle[aria-expanded='true'] .nav-toggle__bar:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 0 var(--line), 0 24px 40px -24px rgba(14, 17, 22, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__link {
    padding: 16px 0;
    font-size: 17px;
    opacity: 1;
    border-bottom: 1px solid var(--line);
  }

  .nav__link::after {
    display: none;
  }

  .nav__link.is-active {
    color: var(--brand);
  }

  .nav__stock {
    padding: 20px 0 0;
    border-left: 0;
    color: var(--muted);
    opacity: 1;
  }

  .nav__stock strong {
    color: var(--ink);
  }

  /* 菜单展开时头部切换为实底 */
  .site-header.menu-open {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 0 var(--line);
  }

  .site-header.menu-open .brand__logo--light {
    opacity: 0;
  }

  .site-header.menu-open .brand__logo--dark {
    opacity: 1;
  }

  .product__grid {
    gap: 40px;
  }

  .product__stage {
    padding: 40px 16px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* 手机 */
@media (max-width: 640px) {
  .hero::before {
    background: linear-gradient(180deg, rgba(11, 13, 17, 0.55) 0%, rgba(11, 13, 17, 0.8) 60%, rgba(11, 13, 17, 0.92) 100%);
  }

  .hero__inner {
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 32px;
  }

  .hero__copy {
    padding-bottom: 48px;
  }

  .hero__latin {
    letter-spacing: 0.3em;
  }

  .hero__actions .btn {
    flex: 1 1 0;
    padding: 0 16px;
  }

  .hero__facts {
    grid-template-columns: 1fr;
  }

  .hero__fact,
  .hero__fact + .hero__fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-left: 0;
  }

  .hero__fact + .hero__fact {
    border-top: 1px solid var(--line-dark);
  }

  .hero__fact dd {
    margin-top: 0;
    font-size: 22px;
  }

  .product__grid {
    grid-template-columns: 1fr;
  }

  .product .prose {
    max-width: none;
  }

  /* 手机端无法扫描本机屏幕，隐藏二维码 */
  .download__qr {
    display: none;
  }

  .download__actions {
    flex-direction: row;
    width: 100%;
  }

  .download__actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
  }

  .product__stage {
    padding: 40px 16px;
  }

  .device {
    width: min(260px, 76%);
    border-radius: 38px;
  }

  .device__screen {
    border-radius: 29px;
  }

  .timeline__list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .timeline__item {
    padding: 0 0 32px 32px;
  }

  .timeline__item:last-child {
    padding-bottom: 0;
  }

  .timeline__item::before {
    top: 9px;
  }

  .timeline__item::after,
  .timeline__item:last-child::after {
    display: block;
    top: 26px;
    bottom: -2px;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .timeline__item:last-child::after {
    display: none;
  }

  .timeline__item time {
    font-size: 22px;
  }

  .site-footer {
    padding-top: 56px;
  }

  .site-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .site-footer__col--wide {
    grid-column: 1 / -1;
  }

  .site-footer__bottom {
    flex-direction: column;
  }
}
