/* ==========================================================================
   AnyRtmp — 产品官网样式（浅色 Editorial）
   手译自 Originkit「Hero 06」+ originkit-section-theme 设计令牌
   ========================================================================== */

/* ------------------------------ Design Tokens ------------------------------ */
:root {
  /* 颜色 */
  --bg: #f8f5ee;
  --ink: #000000;
  --ink-muted: rgba(0, 0, 0, 0.4);
  --ink-faint: rgba(0, 0, 0, 0.22);
  --line: rgba(0, 0, 0, 0.1);
  --line-soft: rgba(0, 0, 0, 0.06);
  --surface: rgba(255, 255, 255, 0.55);

  /* 字体 */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Red Hat Display", Inter, ui-sans-serif, system-ui,
    "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 动画缓动 */
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);

  /* 布局 */
  --container: 1512px;
  --gutter: 16px;
}

/* ------------------------------ 基础重置 ------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 让 HTML 的 hidden 属性始终生效（覆盖任何显式 display 规则） */
[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------ 动画关键帧 ------------------------------ */
@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(16px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
}

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

@keyframes ring-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ------------------------------ 按钮（移植 button.tsx） ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.6px;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  border-radius: 36px;
}

.btn:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { opacity: 0.9; }
}

.btn--nav {
  min-height: 44px;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn--primary {
  position: relative;
  min-height: 42px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  background: linear-gradient(180deg, #4d4d4d 0%, #0a0a0a 100%);
  color: #fff;
  box-shadow: inset 0 4px 5px rgba(0, 0, 0, 0.25);
}

/* 主按钮底部柔光 */
.btn--primary::before {
  content: "";
  position: absolute;
  top: calc(100% - 6px);
  left: 50%;
  z-index: -1;
  height: 40px;
  width: 92%;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.18) 40%, rgba(0,0,0,0) 100%);
  filter: blur(12px);
}

.btn--secondary {
  min-height: 42px;
  padding: 12px 24px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.7);
}

@media (hover: hover) and (pointer: fine) {
  .btn--secondary:hover { background: rgba(0, 0, 0, 0.04); }
}

/* ------------------------------ 顶栏（无背景，浮空在 Hero 上） ------------------------------ */
.navbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 100;
}

.navbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
}

.navbar__brand {
  display: inline-flex;
  align-items: baseline;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  -webkit-tap-highlight-color: transparent;
}

.navbar__brand-mark,
.footer__brand-mark {
  font-weight: 700;
  margin-right: 2px;
}

.navbar__brand-text {
  line-height: 16px;
  letter-spacing: -0.4px;
}

.navbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar__links {
  display: none;
  align-items: center;
  gap: 34px;
}

.navbar__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .navbar__links a:hover { opacity: 0.7; }
}

.navbar .btn--nav {
  display: none;
}

.navbar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.navbar__toggle-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 24px;
  height: 24px;
}

.navbar__toggle-bars span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 9999px;
  background: var(--ink);
}

.navbar__mobile {
  border-top: 1px solid var(--line);
  padding: 16px 20px;
}

.navbar__mobile[hidden] {
  display: none;
}

.navbar__mobile ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.navbar__mobile a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.navbar__mobile-cta {
  padding-top: 8px;
}

.navbar__mobile-cta .btn {
  width: 100%;
}

/* ------------------------------ Hero ------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

/* 同心圆环（Originkit hero-06 原版 4 层，共圆心 = 镜头中心） */
.hero__rings {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  --ring-cy: 300px;
}

.ring {
  position: absolute;
  left: 50%;
  top: var(--ring-cy);
  transform: translate(-50%, -50%);
}

.ring img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 旋转动画（原版：环形整体旋转，方向/转速各不相同） */
.ring--outer-soft,
.ring--outer,
.ring--inner-soft,
.ring--inner {
  animation: ring-rotate 32s linear infinite;
}

.ring--outer-soft {
  width: clamp(884px, 173vw, 1479px);
  height: clamp(884px, 173vw, 1479px);
  opacity: 0.1;
  animation-direction: reverse;
  animation-duration: 40s;
}

.ring--outer {
  width: clamp(838px, 164.5vw, 1404px);
  height: clamp(838px, 164.5vw, 1404px);
  opacity: 0.1;
  animation-duration: 32s;
}

.ring--inner-soft {
  width: clamp(426px, 71.8vw, 534px);
  height: clamp(426px, 71.8vw, 534px);
  opacity: 0.12;
  animation-direction: reverse;
  animation-duration: 28s;
}

.ring--inner {
  width: clamp(412px, 69.4vw, 516px);
  height: clamp(412px, 69.4vw, 516px);
  opacity: 0.1;
  animation-duration: 24s;
}

/* 像素网格背景 */
.hero__pixels {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* 环形遮罩：像素只显示在外环与内环之间 */
  -webkit-mask-image: radial-gradient(circle at 50% var(--ring-cy, 300px),
    transparent clamp(210px, 35.5vw, 262px),
    #000 clamp(210px, 35.5vw, 262px),
    #000 clamp(412px, 81vw, 690px),
    transparent clamp(412px, 81vw, 690px));
  mask-image: radial-gradient(circle at 50% var(--ring-cy, 300px),
    transparent clamp(210px, 35.5vw, 262px),
    #000 clamp(210px, 35.5vw, 262px),
    #000 clamp(412px, 81vw, 690px),
    transparent clamp(412px, 81vw, 690px));
}

.hero__pixels canvas {
  width: 100%;
  height: 100%;
}

/* 螺旋主视觉 */
.hero__spiral {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transform: translateY(-20%);
}

.hero__spiral canvas {
  width: 100%;
  height: 100%;
}

/* 镜头 + 文案层 */
.hero__stage {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding-top: 96px;
}

.hero__lens {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  margin-bottom: 14px;
}

/* 镜头光晕：与 hero-06 原版一致
   外层定位 left 3.98% / top 2.49% / 90.55%（Figma 8/201、5/201、182/201）
   内层 inset -16.48% */
.hero__lens-glow {
  position: absolute;
  z-index: 0;
  left: 3.9801%;
  top: 2.48756%;
  width: 90.5473%;
  height: 90.5473%;
}

.hero__lens-glow-inner {
  position: absolute;
  inset: -16.48%;
}

.hero__lens-glow img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.hero__lens-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero__copy {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 370px;
  padding: 0 var(--gutter);
}

.hero__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -1.28px;
  text-wrap: balance;
  max-width: 370px;
}


.hero__subtitle {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.56px;
  color: var(--ink-muted);
  text-wrap: pretty;
  max-width: 312px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  animation: scroll-bob 2s ease-in-out infinite;
}

.hero__scroll-hint::after {
  content: "";
  width: 1px;
  height: 28px;
  background: var(--ink);
  opacity: 0.3;
}

/* ------------------------------ 通用区块 ------------------------------ */
.section {
  padding: 96px var(--gutter);
  position: relative;
}

.section--tint {
  background: rgba(0, 0, 0, 0.025);
}

.section__head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section__eyebrow {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.section__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -1px;
  text-wrap: balance;
}

.section__lead {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* ------------------------------ 网格 ------------------------------ */
.grid {
  display: grid;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
}

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

.grid--halves {
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.grid--code {
  grid-template-columns: 1fr;
  gap: 24px;
}

/* ------------------------------ 特性卡片 ------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 28px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--line);
  }
}

.card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.card__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ------------------------------ 面板 / 徽章 ------------------------------ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 28px;
}

.panel__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.chips--sm .chip {
  font-size: 13px;
  padding: 6px 13px;
}

/* ------------------------------ 平台卡片 ------------------------------ */
.platform {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 28px;
}

.platform__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.platform__meta {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ------------------------------ 架构 ------------------------------ */
.arch {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.arch__core {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0) 100%);
}

.arch__core-label {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.arch__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.arch__group-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.arch__points {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arch__points li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-muted);
  font-size: 14px;
}

.arch__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.5;
}

/* ------------------------------ 代码块 ------------------------------ */
.code-block {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  color: #e6e6e6;
  font-size: 13px;
  line-height: 1.7;
}

.code-block__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-block__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.code-block__dot:nth-child(1) { background: #ff5f57; }
.code-block__dot:nth-child(2) { background: #febc2e; }
.code-block__dot:nth-child(3) { background: #28c840; }

.code-block__lang {
  margin-left: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
}

.code-block code {
  font-family: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas,
    "Liberation Mono", monospace;
  font-size: 13px;
}

.tok-c  { color: #7d8491; }
.tok-k  { color: #ff7ab2; }
.tok-fn { color: #82aaff; }
.tok-s  { color: #c3e88d; }
.tok-n  { color: #f78c6c; }

.quickstart__foot {
  max-width: 720px;
  margin: 40px auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.quickstart__foot p {
  color: var(--ink-muted);
}

/* ------------------------------ Roadmap ------------------------------ */
.roadmap {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.roadmap__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
}

.roadmap__status {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 3px 12px;
  white-space: nowrap;
}

/* ------------------------------ Footer ------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px var(--gutter);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 700;
}

.footer__brand-text {
  font-size: 24px;
  letter-spacing: -0.5px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.footer__nav a {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .footer__nav a:hover { color: var(--ink); }
}

.footer__license {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ------------------------------ 滚动显现（reveal） ------------------------------ */
.reveal {
  opacity: 0;
}

.reveal.in-view {
  animation: section-rise 0.5s var(--ease-out) both;
}

.hero__title,
.hero__subtitle,
.hero__cta,
.hero__lens {
  animation: hero-reveal 0.45s var(--ease-out) both;
}

.hero__title   { animation-delay: 0.28s; }
.hero__subtitle{ animation-delay: 0.36s; }
.hero__cta     { animation-delay: 0.48s; }
.hero__lens    { animation-delay: 0.2s; }

/* ------------------------------ 响应式断点 ------------------------------ */
/* android-sm 360 */
@media (min-width: 360px) {
  .navbar__inner { padding-left: 32px; padding-right: 32px; }
}

/* ipad 768 */
@media (min-width: 768px) {
  :root { --gutter: 48px; }

  .navbar__inner { padding-top: 32px; padding-bottom: 32px; }
  .navbar__brand { font-size: 32px; }
  .navbar__brand-text { line-height: 24px; }
  .navbar__toggle-bars { width: 32px; height: 32px; }

  .hero__rings { --ring-cy: 450px; }

  .hero__lens { width: 201px; height: 201px; margin-bottom: 24px; }

  .hero__copy { max-width: 423px; gap: 24px; }
  .hero__title { font-size: 40px; letter-spacing: -1.6px; max-width: 423px; }
  .hero__subtitle { font-size: 15px; letter-spacing: -0.6px; }

  .section { padding-top: 128px; padding-bottom: 128px; }
  .section__title { font-size: 40px; letter-spacing: -1.2px; }

  .grid--features { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .grid--halves { grid-template-columns: 1fr 1fr; }
  .grid--platforms { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .arch__list { grid-template-columns: 1fr 1fr; }
}

/* desktop-sm 1280 */
@media (min-width: 1280px) {
  :root { --gutter: 130px; }

  .navbar__inner { padding-top: 36px; padding-bottom: 36px; }
  .navbar__links { display: flex; }
  .navbar .btn--nav { display: inline-flex; }
  .navbar__toggle { display: none; }
  .navbar__brand { font-size: clamp(24px, 2.1vw, 32px); }

  .hero__rings { --ring-cy: 50%; }

  .hero__spiral { transform: translateY(0); }

  .hero__lens { width: clamp(140px, 13.3vw, 201px); height: clamp(140px, 13.3vw, 201px); margin-bottom: 4px; }

  .hero__title { font-size: 40px; }

  .grid--features { grid-template-columns: repeat(3, 1fr); }
  .grid--platforms { grid-template-columns: repeat(3, 1fr); }
  .grid--code { grid-template-columns: 1fr 1fr; }

  .footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* 降级：减少动态 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__scroll-hint { display: none; }
}
