/* ByteHive — 颜色、字体在 :root 里统一修改 */
:root {
  --bg: #070C18;
  --bg-2: #0B1324;
  --surface: #0F1A30;
  --line: #1C2944;
  --line-2: #2A3A5E;
  --text: #E7ECF6;
  --muted: #8E9BB8;
  --accent: #FF8A2B;
  --accent-2: #FFB23F;
  --cool: #2FB2F0;
  --c-yellow: #FEAD02; --c-orange: #FF8700; --c-pink: #FE3262;
  --c-magenta: #BC17AF; --c-violet: #6722B1; --c-blue: #009BE5;
  --grad: linear-gradient(90deg, #FEAD02, #FF8700 22%, #FE3262 48%, #6722B1 76%, #009BE5);
  --grad-warm: linear-gradient(90deg, #FFA020, #FF4D6D);
  --ok: #5BD69A;
  --err: #FF7A7A;
  --f-display: "Chakra Petch", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-body: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --wrap: 1180px;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--accent); color: var(--bg); padding: .5rem 1rem; border-radius: var(--r); }
.skip:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2rem); }

/* 待填标记：内容填好后自动消失 */
mark.todo {
  background: rgba(244, 183, 64, .12); color: var(--accent-2);
  border: 1px dashed var(--accent); border-radius: 4px;
  padding: .05em .4em; font: inherit; font-size: .9em;
}

.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.4rem; border-radius: var(--r);
  font: 600 .95rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--grad-warm); color: #1B0710; font-weight: 700; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* 顶栏 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 12, 24, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 2rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font: 700 1.3rem/1 var(--f-display); letter-spacing: .01em; }
.brand .ic { width: 30px; height: 30px; color: var(--accent); stroke-width: 1.5; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav ul { display: flex; gap: 1.6rem; }
.nav ul a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; padding: .4rem 0; position: relative; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--text); }
.nav ul a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--grad); }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.lang a { text-decoration: none; font-size: .8rem; font-weight: 600; color: var(--muted); padding: .35rem .6rem; }
.lang a + a { border-left: 1px solid var(--line-2); }
.lang a[aria-current="true"] { color: var(--bg); background: var(--text); }
.lang a:hover:not([aria-current]) { color: var(--text); }
.nav-cta { min-height: 40px; padding: .55rem 1.1rem; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; position: relative; }
.nav-toggle .bar { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); transition: transform .25s, top .25s; }
.nav-toggle .bar:nth-child(1) { top: 16px; }
.nav-toggle .bar:nth-child(2) { top: 25px; }
.nav-open .nav-toggle .bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle .bar:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* 首页 Hero：蜂巢画布是全站唯一的动态元素 */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hive {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 62%);
  mask-image: linear-gradient(100deg, transparent 18%, #000 62%);
}
.hero-in { position: relative; padding-top: clamp(5rem, 13vh, 9rem); padding-bottom: clamp(3.5rem, 8vh, 5.5rem); pointer-events: none; }
.hero-in .actions { pointer-events: auto; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.5rem); font-weight: 700; max-width: 15ch; line-height: 1.05; letter-spacing: -0.02em; }
.lang-zh .hero h1 { max-width: 11em; line-height: 1.2; letter-spacing: 0; word-break: keep-all; overflow-wrap: anywhere; }
.hero .lead { margin-top: 1.5rem; max-width: 34rem; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.25rem; }
.stats { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 3rem; border-top: 1px solid var(--line); }
.stats > div { padding: 1.4rem 1.25rem 0 0; }
.stats > div + div { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: .3rem 0 0; font: 600 clamp(1.5rem, 2.6vw, 2.1rem)/1.1 var(--f-display); display: inline-block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats dd mark.todo { font-size: .55em; }

/* 区块 */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-tight { padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { margin-bottom: 2.75rem; max-width: 42rem; }
.sec-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.sec-head p { margin-top: .9rem; color: var(--muted); }
.sec-head-row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.more { color: var(--accent); font-weight: 600; text-decoration: none; font-size: .95rem; }
.more:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 4px; }

.page-head { padding: clamp(4rem, 10vw, 6.5rem) 0 clamp(1.5rem, 3vw, 2rem); border-bottom: 1px solid var(--line); background: radial-gradient(70% 140% at 100% 0%, rgba(103, 34, 177, .22), transparent 60%), radial-gradient(40% 90% at 70% 0%, rgba(0, 155, 229, .08), transparent 70%); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; }
.page-head .lead { margin-top: 1rem; }

/* 六边形图标 */
.hexicon {
  display: inline-grid; place-items: center; width: 52px; height: 58px; color: var(--accent);
  background: var(--line-2);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  position: relative; flex: none;
}
.hexicon::before { content: ""; position: absolute; inset: 1px; background: var(--surface); clip-path: inherit; }
.hexicon .ic { position: relative; width: 24px; height: 24px; }
.hx-web { color: #22AEF0; } .hx-mobile { color: #9B5CF0; } .hx-game { color: #D84BCB; }
.hx-security { color: #FE4A74; } .hx-crypto { color: #FF8700; } .hx-infra { color: #FEAD02; }
.hexicon-sm { width: 42px; height: 47px; }
.hexicon-sm .ic { width: 20px; height: 20px; }

/* 首页服务：用分隔线组成的网格，而非独立卡片 */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.svc { position: relative; padding: 2rem 1.75rem 1.9rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .8rem; transition: background .25s; }
.svc::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.svc:hover { background: var(--bg-2); }
.svc:hover::before { transform: scaleX(1); }
.svc h3 { font-size: 1.25rem; margin-top: .4rem; }
.svc p { color: var(--muted); font-size: .95rem; flex: 1; }

/* 流程：确实是顺序，所以用编号 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: s; }
.steps li { position: relative; padding-top: 1.4rem; border-top: 1px solid var(--line-2); }
.steps li:nth-child(1) { --sc: #FEAD02; } .steps li:nth-child(2) { --sc: #FF8700; } .steps li:nth-child(3) { --sc: #FE3262; } .steps li:nth-child(4) { --sc: #9B5CF0; }
.step-n { display: block; font: 600 .95rem/1 var(--f-display); color: var(--sc); margin-bottom: 1rem; }
.steps li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--sc); transform: rotate(45deg); }
.steps h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.steps p { color: var(--muted); font-size: .95rem; }

/* 案例 */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.case { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-2); transition: border-color .25s; }
.case:hover { border-color: var(--line-2); }
.case[hidden] { display: none; }
.case-media { aspect-ratio: 16 / 10; background: var(--surface); overflow: hidden; }
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-ph {
  height: 100%; display: grid; place-items: center; padding: 1rem; text-align: center;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='%231C2944' stroke-width='1'/%3E%3C/svg%3E");
}
.case-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.case-cat { color: var(--cool); font-size: .82rem; font-weight: 600; }
.case h3 { font-size: 1.15rem; }
.case-body > p:not(.case-cat) { color: var(--muted); font-size: .93rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .6rem; }
.tags li { font-size: .78rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 3px; padding: .15rem .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters button { font: 500 .9rem/1 var(--f-body); color: var(--muted); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: .55rem 1rem; cursor: pointer; }
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* 服务页 */
.svc-list { display: flex; flex-direction: column; }
.svc-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.svc-row:last-child { border-bottom: 0; }
.svc-row h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin: 1.1rem 0 .9rem; }
.svc-short { color: var(--text); font-size: 1.08rem; margin-bottom: .9rem; }
.svc-row-main p:not(.svc-short) { color: var(--muted); max-width: 38rem; }
.svc-row-list { align-self: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem 1.75rem; }
.svc-row-list h3 { font-size: .95rem; color: var(--muted); font-family: var(--f-body); font-weight: 600; margin-bottom: 1rem; }
.checks li { position: relative; padding: .55rem 0 .55rem 1.6rem; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }

/* 关于 */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.prose p { font-size: 1.08rem; color: #C9D2E6; max-width: 40rem; }
.prose p + p { margin-top: 1.3rem; }
.facts { border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem 1.75rem; background: var(--bg-2); }
.facts h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .75rem 1.25rem; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 500; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.value { border-left: 2px solid; border-image: linear-gradient(180deg, #FF8700, #FE3262, #6722B1) 1; padding-left: 1.25rem; }
.value h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.value p { color: var(--muted); font-size: .95rem; }
.scope { max-width: 52rem; }
.scope h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.scope p { color: var(--muted); }

/* CTA */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  padding: clamp(2rem, 5vw, 3.25rem); border: 1px solid var(--line-2); border-radius: var(--r);
  background:
    radial-gradient(55% 120% at 100% 30%, rgba(254, 50, 98, .14), transparent 70%),
    radial-gradient(50% 120% at 85% 100%, rgba(103, 34, 177, .22), transparent 70%),
    var(--bg-2);
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: var(--muted); margin-top: .6rem; }

/* 联系 */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.c-list li { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.c-list li:first-child { padding-top: 0; }
.c-list li > div { display: flex; flex-direction: column; min-width: 0; }
.c-label { color: var(--muted); font-size: .85rem; }
.c-val { font-weight: 500; overflow-wrap: anywhere; }
.c-val a { text-decoration: none; }
.c-val a:hover { color: var(--accent-2); }
.cform { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.5rem, 4vw, 2.25rem); display: flex; flex-direction: column; gap: 1.1rem; }
.cform h2 { font-size: 1.35rem; margin-bottom: .2rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field span { font-size: .88rem; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: .75rem .9rem;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field .invalid { border-color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-msg { font-size: .92rem; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }

/* 404 */
.nf { border-bottom: 0; min-height: 60vh; }
.nf-code { font: 700 clamp(4rem, 12vw, 7rem)/1 var(--f-display); color: var(--accent); margin-bottom: 1rem; }
.nf .btn { margin-top: 2rem; }

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px)); background: var(--bg-2); }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2rem; }
.f-brand p { color: var(--muted); margin-top: .9rem; font-size: .92rem; max-width: 22rem; }
.f-nav { display: grid; gap: .55rem; align-content: start; }
.f-nav a, .f-contact a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.f-nav a:hover, .f-contact a:hover { color: var(--text); }
.f-contact { display: grid; gap: .7rem; align-content: start; font-size: .92rem; }
.f-contact li { display: flex; gap: .6rem; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.f-contact .ic { color: var(--accent); }
.f-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

/* 平板 */
@media (max-width: 1000px) {
  .svc-grid, .case-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .svc-row, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .svc-row-list { align-self: stretch; }
}

/* 手机：导航收起 */
@media (max-width: 1100px) {
  /* backdrop-filter 会让 fixed 菜单以顶栏为定位基准，手机端改用实色背景 */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7, 12, 24, .97); }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; left: 0; right: 0; top: calc(72px + env(safe-area-inset-top, 0px)); bottom: 0;
    flex-direction: column; align-items: stretch; gap: 1.5rem; margin: 0;
    padding: 1.5rem clamp(1.25rem, 4vw, 2rem) calc(2rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg); border-top: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
    overflow-y: auto;
  }
  .nav-open .nav { visibility: visible; opacity: 1; transform: none; }
  .nav-open { overflow: hidden; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; font-size: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav ul a[aria-current="page"] { color: var(--accent); }
  .nav ul a[aria-current="page"]::after { display: none; }
  .lang { align-self: flex-start; }
  .lang a { padding: .55rem .9rem; font-size: .9rem; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .svc-grid, .case-grid, .values, .row2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div { padding: 1.1rem 1rem 1.1rem 0; border-left: 0 !important; padding-left: 0 !important; }
  .stats > div:nth-child(even) { padding-left: 1rem !important; border-left: 1px solid var(--line) !important; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hive { -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); opacity: .55; }
  .btn { width: 100%; }
  .actions .btn { width: auto; flex: 1 1 auto; }
  .footer-in { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
