/* Layout */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: clamp(32px, 5vh, 64px);
  max-width: var(--page-max-width);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(40px, 6vh, 72px) 24px clamp(32px, 5vh, 56px);
}

.page > main {
  width: 100%;
}

/* Masthead */
.masthead {
  position: relative;
  isolation: isolate;
  text-align: center;
  animation: rise 600ms ease-out both;
}

.masthead__title {
  margin: 20px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.1em;
  margin-right: -0.1em;
}

.masthead__latin {
  margin: 8px 0 0;
  color: var(--color-gold);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-right: -0.3em;
}

.masthead__divider {
  margin: 24px auto 0;
}

.masthead__lede {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: var(--text-body);
  letter-spacing: 0.12em;
}

.masthead__credit {
  margin: 12px 0 0;
  color: var(--text-faint);
  font-size: var(--text-label);
  letter-spacing: 0.08em;
}

/* Gateways */
.gateways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--element-gap);
  width: 100%;
}

.gateway {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 28px;
  background: var(--color-slate-navy);
  border: 1px solid var(--line-antique);
  text-align: center;
  text-decoration: none;
  transition: border-color 250ms ease-out, background-color 250ms ease-out,
    box-shadow 250ms ease-out;
  animation: rise 600ms ease-out both;
}

.gateway::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line-gold-soft);
  pointer-events: none;
}

/* 顶部 24px 几何装饰：短线 */
.gateway::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  width: 24px;
  height: 1px;
  background: var(--line-gold);
  transform: translateX(-50%);
}

.gateway:nth-child(1) {
  animation-delay: 120ms;
}

.gateway:nth-child(2) {
  animation-delay: 200ms;
}

.gateway:nth-child(3) {
  animation-delay: 280ms;
}

.gateway:hover {
  background: var(--surface-slate-lift);
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

.gateway__index {
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.gateway__emblem {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 20px 0 0;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-medallions);
  color: var(--color-gold);
  transition: border-color 250ms ease-out, color 250ms ease-out;
}

.gateway__emblem svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  stroke-width: 1;
  fill: none;
}

.gateway:hover .gateway__emblem {
  border-color: var(--color-gold);
  color: #e8c954;
}

.gateway__title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

.gateway__cn {
  margin: 8px 0 0;
  color: rgba(212, 175, 55, 0.82);
  font-size: var(--text-label);
  letter-spacing: 0.2em;
}

.gateway__rule {
  width: 48px;
  height: 1px;
  margin: 16px 0;
  background: var(--line-gold);
  transition: width 250ms ease-out, background-color 250ms ease-out;
}

.gateway:hover .gateway__rule {
  width: 72px;
  background: var(--color-gold);
}

.gateway__cta {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  transition: color 250ms ease-out;
}

.gateway:hover .gateway__cta {
  color: var(--color-ivory);
}

/* Status line */
.gateway-notice {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--color-gold);
  font-size: var(--text-label);
  letter-spacing: 0.12em;
  text-align: center;
}

/* Footer */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: rise 600ms ease-out 360ms both;
}

.site-footer__note {
  margin: 0;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* 页首放射背景 */
.stage-rays {
  position: absolute;
  left: 50%;
  bottom: -32px;
  z-index: -1;
  width: min(1800px, 170vw);
  color: var(--color-gold);
  opacity: 0.22;
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 92%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 92%, transparent);
}

.stage-rays svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .page {
    gap: 48px;
  }

  .gateways {
    grid-template-columns: minmax(0, 1fr);
    max-width: 420px;
    margin: 0 auto;
  }

  .gateway {
    padding: 32px 24px 24px;
  }

  .gateway__title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .page-frame {
    inset: 10px;
  }

  .page-frame::before {
    inset: 6px;
  }

  .eyebrow {
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.14em;
  }

  .masthead__title {
    letter-spacing: 0.08em;
    margin-right: -0.08em;
  }
}
