/* ============================================================
   Rilland 官网样式 — 主题:白 + 绿
   主色取自 Runtime 品牌绿 #12B886(渐变 #55D7AD → #12B886)
   五款产品色仅作功能性编码:SCADA 蓝 / Runtime 绿 /
   Flow 紫 / HMI 橙 / Gateway 青
   ============================================================ */
:root {
  --ink: #10241C;
  --ink-2: #0D3F30;
  --paper: #FFFFFF;
  --paper-2: #F3FAF7;
  --text: #23362E;
  --muted: #5C7167;
  --line: #DFEDE6;
  --green: #12B886;
  --green-deep: #0B8A5F;
  --green-dark: #0A3529;
  --blue: #1677FF;   /* 产品功能色:SCADA */
  --purple: #6947E8; /* 产品功能色:Flow */
  --orange: #FF7900; /* 产品功能色:HMI */
  --cyan: #0EA7D5;   /* 产品功能色:Gateway Manager */
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, Menlo, monospace;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(18, 184, 134, .2); }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b { font-weight: 600; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 99;
  background: var(--green-dark); color: #fff; padding: 8px 14px;
  border-radius: 0 0 8px 8px; font-size: 13px; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600; line-height: 1;
  transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #16C58F, #0DA273);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(18, 184, 134, .7);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #12B886, #0B8A5F);
  box-shadow: 0 8px 20px -8px rgba(18, 184, 134, .8);
}
.btn-ghost { border: 1.5px solid var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green-deep); }

/* ---------- 小节标题 ---------- */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .16em; color: #6E867B;
}
.kick-bar {
  width: 26px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg,
    #7CE3BE 0 20%, #3FCB9C 20% 40%, #12B886 40% 60%,
    #0E9C72 60% 80%, #0A7A59 80% 100%);
}
.section h2 {
  margin-top: 16px;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800; line-height: 1.25;
}
.section-sub { margin-top: 12px; color: var(--muted); font-size: 16px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #E3EFE8;
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 800; color: var(--ink);
}
.brand-mark { border-radius: 7px; }
.nav-links { margin-left: auto; display: flex; gap: 26px; }
.nav-links a { font-size: 14.5px; color: #44584F; transition: color .2s; }
.nav-links a:hover { color: var(--green-deep); }
.nav-cta { padding: 9px 16px; font-size: 13.5px; }

/* ---------- Hero ---------- */
.hero {
  background-image:
    linear-gradient(rgba(18, 184, 134, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 184, 134, .05) 1px, transparent 1px);
  background-size: 52px 52px;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.08fr;
  gap: 48px; align-items: center;
  padding-top: 84px; padding-bottom: 76px;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .18em; color: var(--green-deep);
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 800; line-height: 1.16;
}
.hero-sub { margin-top: 18px; font-size: 17px; color: var(--muted); max-width: 44ch; }
.hero-cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 28px; font-size: 12px; letter-spacing: .1em; color: #6E867B; }

/* ---------- Hero 示意图 ---------- */
.hero-fig {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #0B3D2E, #093225);
  border-radius: 20px;
  padding: 16px 16px 8px;
  box-shadow: 0 30px 60px -30px rgba(10, 53, 41, .55);
}
.hero-fig::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(127, 196, 166, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 196, 166, .08) 1px, transparent 1px);
  background-size: 38px 38px;
}
.schematic-scroll { overflow-x: auto; scrollbar-width: thin; }
.schematic {
  position: relative;
  width: 100%; min-width: 540px;
  aspect-ratio: 760 / 560;
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.wire path {
  fill: none; stroke: #3E7E64; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 5 9;
}
.js .schematic .wire path { opacity: 0; transition: opacity .8s ease; }
.wire:nth-of-type(1) path { transition-delay: .55s; }
.wire:nth-of-type(2) path { transition-delay: .75s; }
.wire:nth-of-type(3) path { transition-delay: .95s; }
.wire:nth-of-type(4) path { transition-delay: 1.15s; }
.js .hero-fig.in .wire path { opacity: 1; animation: dashflow 1.4s linear infinite; }
@keyframes dashflow { to { stroke-dashoffset: -14; } }

.node {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
}
.js .schematic .node {
  opacity: 0; translate: 0 10px;
  transition: opacity .5s ease, translate .5s ease;
  transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}
.js .hero-fig.in .node { opacity: 1; translate: 0 0; }

.node.prod {
  width: 19%; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 9px 6px 8px; text-align: center;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .10);
  border-top: 3px solid var(--pc);
  border-radius: 14px;
}
.node.prod img { width: 32px; height: 32px; }
.node.prod b { display: block; color: #EAF7F0; font-size: 12px; line-height: 1.3; }
.node.prod i {
  display: block; font-style: normal; font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .04em; color: #7FB8A2;
}

.node.dev {
  z-index: 2;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(8, 46, 34, .9);
  border: 1px dashed rgba(127, 196, 166, .45);
  border-radius: 12px; white-space: nowrap;
}
.node.dev .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3DDFA9; animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 223, 169, .45); }
  70% { box-shadow: 0 0 0 7px rgba(61, 223, 169, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 223, 169, 0); }
}
.node.dev b { display: block; color: #D9F2E6; font-size: 12.5px; line-height: 1.3; }
.node.dev i {
  font-style: normal; font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .08em; color: #6FAE97;
}

.wire-label {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%); z-index: 1;
  font-family: var(--font-mono); font-size: 10.5px;
  color: #BFE6D4; background: #0E3D2F;
  border: 1px solid #2A5C49; border-radius: 99px;
  padding: 3px 9px; white-space: nowrap;
}
.js .schematic .wire-label {
  opacity: 0; transition: opacity .6s ease;
  transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}
.js .hero-fig.in .wire-label { opacity: 1; }
.wire-label.vert {
  writing-mode: vertical-rl; letter-spacing: .1em;
  padding: 9px 3px;
}
.fig-caption {
  position: relative; text-align: right;
  font-size: 10.5px; letter-spacing: .14em;
  color: #5F9A82; padding: 8px 6px 6px;
}

/* ---------- 小节通用 ---------- */
.section { padding: 88px 0; }
.section-soft { background: var(--paper-2); }

/* ---------- 产品卡片 ---------- */
.product-grid {
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
}
.p-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 20px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.p-card:hover {
  transform: translateY(-4px);
  border-color: var(--pc);
  border-color: color-mix(in srgb, var(--pc) 45%, #fff);
  box-shadow: 0 16px 32px -20px rgba(16, 60, 45, .35);
}
.p-icon { width: 50px; height: 50px; }
.p-card h3 { margin-top: 14px; font-size: 16.5px; font-weight: 700; }
.p-tag {
  display: inline-block; margin-top: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1.4;
  padding: 3px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--pc) 10%, #fff);
  color: color-mix(in srgb, var(--pc) 78%, #10241C);
}
.p-card ul { list-style: none; margin-top: 12px; }
.p-card li {
  position: relative; padding-left: 16px; margin-top: 8px;
  font-size: 13.5px; line-height: 1.55; color: var(--muted);
}
.p-card li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--pc);
}

/* ---------- 协同(深绿色带) ---------- */
.section-dark {
  background: linear-gradient(180deg, #0B3D2E, #093225);
  color: #EAF7F0;
}
.kicker-dark { color: #6FA28C; }
.section-dark h2 { color: #F1FAF6; }
.sub-dark { color: #9CC4B2; }
.steps {
  margin-top: 44px; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.step {
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px; padding: 24px 22px;
}
.step-no {
  font-size: 13px; letter-spacing: .2em;
  color: color-mix(in srgb, var(--pc) 55%, #fff);
}
.step h3 { margin: 10px 0 8px; font-size: 17px; font-weight: 700; color: #EAF7F0; }
.step p { font-size: 14px; line-height: 1.7; color: #A8CDBC; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px 4px 5px; border-radius: 99px;
  background: color-mix(in srgb, var(--pc) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent);
  color: color-mix(in srgb, var(--pc) 70%, #10241C);
}
.chip img { width: 18px; height: 18px; border-radius: 5px; }
.section-dark .chip {
  background: rgba(255, 255, 255, .05);
  border-color: color-mix(in srgb, var(--pc) 55%, transparent);
  color: #D5EEE2;
}

/* ---------- 场景 ---------- */
.scene-grid {
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.s-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 26px 24px;
}
.s-card h3 { font-size: 17px; font-weight: 700; }
.s-card p { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--muted); }
.section-soft .s-card {
  background: #fff;
  border-color: #D5E9DF;
}

/* ---------- 获取 ---------- */
.download-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}
.download-copy h2 { margin-top: 16px; }
.contact-line { margin-top: 26px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.contact-addr { font-size: 13px; color: var(--muted); }
.dl-note { margin-top: 16px; font-size: 11.5px; letter-spacing: .06em; color: #8AA096; }
.dl-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--pc);
  border-radius: 12px; padding: 12px 16px; margin-top: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.dl-row:hover {
  border-color: color-mix(in srgb, var(--pc) 40%, #fff);
  box-shadow: 0 10px 24px -18px rgba(16, 60, 45, .4);
}
.dl-row img { width: 34px; height: 34px; }
.dl-row b { display: block; font-size: 15px; }
.dl-row span { font-size: 13px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.footer { background: var(--green-dark); padding: 26px 0; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  color: #BFE0D2; font-size: 13.5px;
}
.footer-brand svg { border-radius: 5px; }
.footer-nav { margin-left: auto; display: flex; gap: 20px; }
.footer-nav a { font-size: 13px; color: #8FC4AD; transition: color .2s; }
.footer-nav a:hover { color: #fff; }
.copyright { font-size: 11px; letter-spacing: .12em; color: #4E8A72; }

/* ---------- 滚动显现(仅 JS 可用时隐藏待显现元素) ---------- */
.js .reveal { opacity: 0; translate: 0 14px; transition: opacity .6s ease, translate .6s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }
.js .schematic .node, .js .schematic .wire-label, .js .schematic .wire path { opacity: 0; }
.hero-fig.in .node, .hero-fig.in .wire-label, .hero-fig.in .wire path { opacity: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 1120px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding-top: 60px; }
  .hero-fig { max-width: 640px; }
}
@media (max-width: 920px) {
  .steps, .scene-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .section { padding: 64px 0; }
}
@media (max-width: 740px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .product-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-nav { margin-left: 0; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal, .js .schematic .node,
  .js .schematic .wire-label, .js .schematic .wire path {
    opacity: 1; translate: 0 0;
  }
}
