/* ============================================================
   RAYCODING — 锐码科技官网
   体系：磷光绿单色终端 × 暖米编辑排版 × 纵深空间
   ============================================================ */

:root {
  --bg:      #0a0c0b;   /* 近黑（微偏绿） */
  --panel:   #101410;   /* 深色面板 */
  --line:    #1f2620;   /* 深色分隔线 */
  --ink:     #f2f4f2;   /* 主文字 */
  --mut:     #9aa39c;   /* 次文字 */
  --dim:     #5c655e;   /* 弱文字 */
  --acc:     #00f48e;   /* 磷光绿 */
  --acc-dim: rgba(0, 244, 142, .35);
  --beige:   #fcf3e1;   /* 暖米（亮段） */
  --stone:   #0c0a09;   /* 亮段上的深色 */
  --blue:    #7aa8ff;   /* 状态蓝 */
  --ease:    cubic-bezier(.8, 0, .2, 1);
  --sans:    -apple-system, BlinkMacSystemFont, "PingFang SC",
             "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
             "Source Han Sans SC", sans-serif;
  --mono:    ui-monospace, "SF Mono", SFMono-Regular, Menlo,
             "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--acc); color: #04110a; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--acc); outline-offset: 4px; }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
}

em { font-style: normal; }   /* 中文不用斜体，强调一律用颜色/字重 */

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 5vw;
}
.wrap.narrow { max-width: 920px; }

/* ============ 启动序列 ============ */

#boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #060807;
  display: block;
}
#boot .boot-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 244, 142, .028) 0 1px,
    transparent 1px 3px
  );
}
#bootlog {
  position: absolute;
  left: 5vw;
  bottom: 12vh;
  color: var(--acc);
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: .08em;
  text-shadow: 0 0 14px rgba(0, 244, 142, .45);
  white-space: pre-wrap;
}
body.booted #boot {
  animation: bootlift .85s var(--ease) forwards;
}
@keyframes bootlift {
  to { clip-path: inset(0 0 100% 0); visibility: hidden; }
}
#boot { clip-path: inset(0 0 0 0); }

/* ============ 入场：模糊 → 聚焦 ============ */

.reveal,
[data-h] {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(14px);
  transition:
    opacity  1.1s var(--ease),
    filter   1.3s var(--ease),
    transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, filter, transform;
}
.reveal.in,
[data-h].in {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* ============ 页头 ============ */

#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5vw;
  color: #fff;
  transition: color .45s var(--ease);
}
#site-header.on-light { color: var(--stone); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--acc);
  stroke-width: 7;
  stroke-linecap: square;
}
.logo .word {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2em;
}
.logo sup {
  font-size: 8px;
  letter-spacing: 0;
  margin-left: 2px;
  opacity: .55;
}
.logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 10px var(--acc-dim);
  animation: dotpulse 2.6s ease-in-out infinite;
}
@keyframes dotpulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

#site-header nav {
  display: flex;
  gap: 36px;
  text-transform: uppercase;
}
#site-header nav a {
  opacity: .6;
  transition: opacity .35s var(--ease);
  padding: 4px 0;
}
#site-header nav a:hover { opacity: 1; }

/* ============ HERO ============ */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner {
  position: relative;
  padding: 0 5vw;
  margin-bottom: 17vh;
}

.eyebrow {
  color: var(--acc);
  letter-spacing: .12em;
  margin-bottom: 3.4vh;
  text-shadow: 0 0 12px rgba(0, 244, 142, .3);
}

.hero h1 {
  font-size: clamp(3.4rem, 9.6vw, 8.2rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
}
.hero h1 em {
  color: var(--acc);
  text-shadow: 0 0 26px rgba(0, 244, 142, .35);
}

.lede {
  margin-top: 3.6vh;
  font-size: 17px;
  line-height: 1.9;
  color: var(--mut);
  max-width: 36em;
}

.hero-foot {
  position: absolute;
  left: 5vw; right: 5vw;
  bottom: 4.5vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.status { color: var(--dim); }
.cursor {
  font-style: normal;
  color: var(--acc);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.cta {
  font-size: 13px;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color .35s var(--ease);
}
.cta .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 10px var(--acc-dim);
}
.cta:hover { color: var(--acc); }

.scroll-hint {
  position: absolute;
  right: 5vw;
  top: 42%;
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--dim);
  display: flex;
  align-items: center;
}
.scroll-hint .vline {
  display: inline-block;
  width: 1px;
  height: 9vh;
  margin-top: 14px;
  background: linear-gradient(to bottom, var(--acc), transparent);
}

/* ============ 斜切光刃（明暗交界签名） ============ */

.seam {
  position: relative;
  display: block;
  height: 132px;
  overflow: hidden;
  /* JS 失效时的兜底：中段硬切 */
  background: linear-gradient(to bottom, var(--bg) 0 50%, var(--beige) 50% 100%);
}
.seam[data-to="dark"] {
  background: linear-gradient(to bottom, var(--beige) 0 50%, var(--bg) 50% 100%);
}

.seam .blade {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 300%;
  transform-origin: top left;
  will-change: transform;
  border-top: 2px solid var(--acc);
  box-shadow:
    0 -6px 30px rgba(0, 244, 142, .22),
    0 -1px 10px rgba(0, 244, 142, .45);
}
.seam[data-to="light"] .blade { background: var(--beige); }
.seam[data-to="dark"]  .blade { background: var(--bg); }

.seam .sl,
.seam .pct {
  position: absolute;
  bottom: 12px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: .18em;
  color: var(--acc);
  opacity: .75;
  pointer-events: none;
}
.seam .sl  { left: 5vw; }
.seam .pct { right: 5vw; }

/* ============ 区块通用 ============ */

.sec { padding: 19vh 0 17vh; position: relative; }
.sec-light { background: var(--beige); color: var(--stone); }
.sec-dark  { background: var(--bg); }

section { scroll-margin-top: 70px; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-bottom: 8vh;
}
.sec-light .sec-head { border-top-color: rgba(12, 10, 9, .2); }
.sec-head .idx { color: var(--acc); font-size: 13px; }
.sec-light .sec-head .idx { color: #00a05c; }
.sec-head .tag {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .2em;
}
.sec-light .sec-head .tag { color: rgba(12, 10, 9, .45); }

.statement {
  font-size: clamp(1.65rem, 3.4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -.01em;
  max-width: 24em;
  margin-bottom: 10vh;
}

/* ============ 能力索引行 ============ */

.rows {
  list-style: none;
  border-top: 1px solid rgba(12, 10, 9, .18);
}
.row a {
  display: grid;
  grid-template-columns: 70px 1fr auto 52px;
  align-items: baseline;
  gap: 24px;
  padding: 36px 0;
  border-bottom: 1px solid rgba(12, 10, 9, .18);
  transition:
    background .4s var(--ease),
    color .4s var(--ease),
    padding-left .4s var(--ease);
}
.row a:hover {
  background: var(--stone);
  color: var(--beige);
  padding-left: 26px;
}
.row-no {
  font-size: 13px;
  color: rgba(12, 10, 9, .4);
  transition: color .4s var(--ease);
}
.row a:hover .row-no { color: var(--acc); }
.row-title {
  display: block;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.row-desc {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: rgba(12, 10, 9, .55);
  transition: color .4s var(--ease);
}
.row a:hover .row-desc { color: rgba(252, 243, 225, .62); }
.row-meta {
  font-size: 11px;
  text-transform: uppercase;
  color: rgba(12, 10, 9, .42);
  white-space: nowrap;
  transition: color .4s var(--ease);
}
.row a:hover .row-meta { color: rgba(252, 243, 225, .5); }
.row-arrow {
  font-size: 20px;
  justify-self: end;
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity .4s var(--ease),
    transform .4s var(--ease),
    color .4s var(--ease);
}
.row a:hover .row-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--acc);
}

/* ============ 产品：纵深浮动面板 ============ */

.stage {
  perspective: 1400px;
  transform-style: preserve-3d;
  margin-top: 2vh;
  padding: 4vh 0 6vh;
  transition: transform .6s var(--ease);
}

.card {
  position: relative;
  width: min(580px, 92%);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 52px 44px 38px;
  clip-path: polygon(
    0 0,
    calc(100% - 24px) 0,
    100% 24px,
    100% 100%,
    24px 100%,
    0 calc(100% - 24px)
  );
  transition: border-color .45s var(--ease);
}
.card:hover { border-color: rgba(0, 244, 142, .45); }

.card-a {
  z-index: 2;
  transform: rotateX(6deg) rotateZ(-1.1deg);
  animation: floaty 7s ease-in-out infinite alternate;
}
.card-b {
  z-index: 1;
  margin: -56px 0 0 auto;
  transform: rotateX(8deg) rotateZ(1.3deg);
  animation: floaty 8.5s ease-in-out .9s infinite alternate-reverse;
}
@keyframes floaty {
  from { translate: 0 -8px; }
  to   { translate: 0 10px; }
}

.card-no {
  position: absolute;
  top: 24px; left: 26px;
  font-size: 11px;
  color: var(--dim);
}
.pill {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 5px 11px;
  border-radius: 999px;
}
.pill-green {
  color: var(--acc);
  background: rgba(0, 244, 142, .1);
  border: 1px solid rgba(0, 244, 142, .35);
}
.pill-blue {
  color: var(--blue);
  background: rgba(76, 141, 255, .1);
  border: 1px solid rgba(76, 141, 255, .35);
}

.card h3 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.01em;
  margin-top: 14px;
}
.card h3 .latin {
  font-size: .5em;
  font-weight: 500;
  letter-spacing: .24em;
  color: var(--dim);
  margin-left: 10px;
}
.card-role {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--acc);
  margin: 12px 0 20px;
}
.card-b .card-role { color: var(--blue); }
.card-desc {
  font-size: 15px;
  line-height: 1.95;
  color: var(--mut);
  max-width: 32em;
}
.card-meta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--dim);
}

/* ============ 关于 ============ */

.about-p {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 2.05;
  color: #c4cbc5;
  margin-bottom: 1.8em;
  max-width: 34em;
}
.dropcap {
  float: left;
  font-size: 84px;
  font-weight: 700;
  line-height: .76;
  padding: 10px 16px 0 0;
  color: var(--acc);
  text-shadow: 0 0 22px rgba(0, 244, 142, .3);
}

.facts {
  margin-top: 9vh;
  border-top: 1px solid var(--line);
}
.facts > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.facts dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--dim);
}
.facts dd { font-size: 14.5px; color: var(--ink); }

/* ============ 联系 ============ */

.big {
  font-size: clamp(2.9rem, 8vw, 6.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
}
.big em {
  color: var(--acc);
  text-shadow: 0 0 26px rgba(0, 244, 142, .3);
}

.mail {
  display: inline-block;
  margin-top: 7vh;
  padding-bottom: 8px;
  font-size: clamp(1.35rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -.01em;
  background-image: linear-gradient(var(--acc), var(--acc));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 2px;
  transition:
    background-size .55s var(--ease),
    color .4s var(--ease);
}
.mail:hover {
  color: var(--acc);
  background-size: 100% 2px;
}

.note {
  margin-top: 3.4vh;
  font-size: 12px;
  color: var(--dim);
}

/* ============ 页脚 ============ */

footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
  background: var(--bg);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--dim);
}
.foot .mono { font-size: 11px; letter-spacing: .1em; }
.foot a { transition: color .35s var(--ease); }
.foot a:hover { color: var(--acc); }

/* ============ 响应式 ============ */

@media (max-width: 900px) {
  .row a { grid-template-columns: 48px 1fr 40px; }
  .row-meta { display: none; }
  .hero-inner { margin-bottom: 20vh; }
  .scroll-hint { display: none; }
  .card-b { margin-top: -40px; }
}

@media (max-width: 640px) {
  #site-header nav { display: none; }
  .hero h1 { font-size: clamp(2.9rem, 13vw, 4.4rem); }
  .hero-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .br-pc { display: none; }
  .card { padding: 46px 28px 32px; }
  .facts > div { grid-template-columns: 1fr; gap: 6px; }
  .dropcap { font-size: 64px; }
}

/* ============ 减少动态 ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, [data-h] {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
  .card-a, .card-b, .logo-dot, .cursor { animation: none; }
  #boot { display: none; }
}
