/* ============================================================
   OPC工作室 · AI + 工业智能硬件 官网
   Design system — industrial-tech aesthetic (forlinx / xckz inspired)
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --bg-grid: #eef2f8;
  --ink: #0b1424;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --border: #e4e8f0;
  --border-strong: #cbd5e1;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-deep: #1e3a8a;
  --cyan: #06b6d4;
  --cyan-soft: #22d3ee;
  --orange: #f59e0b;
  --orange-dark: #d97706;

  --dark-bg: #061224;
  --dark-surface: #0c1f3c;
  --dark-surface-2: #12284c;
  --dark-text: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 30px 60px -24px rgba(15, 23, 42, .28);
  --radius: 14px;
  --radius-lg: 22px;

  --maxw: 1200px;
  --nav-h: 72px;

  --grad-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --grad-hero: linear-gradient(135deg, #061224 0%, #0e2a54 55%, #123a72 100%);
  --grad-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Section scaffolding ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark-bg); color: var(--dark-text); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--primary);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .18);
}
.eyebrow-dark { color: var(--cyan-soft); background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .25); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.25;
  letter-spacing: -.02em; margin: 18px 0 14px; color: var(--ink);
}
.section-dark .section-head h2 { color: #fff; }
.section-head p { font-size: 17px; color: var(--muted); }
.section-dark .section-head p { color: var(--muted-soft); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700; padding: 13px 26px; border-radius: 10px;
  border: 1.5px solid transparent; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: 0 12px 24px -10px rgba(37,99,235,.6); }
.btn-primary:hover { box-shadow: 0 18px 34px -10px rgba(37,99,235,.7); }
.btn-dark { background: #fff; color: var(--primary-deep); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.2); }
.btn-solid-dark { background: var(--primary); color: #fff; }
.btn-solid-dark:hover { background: var(--primary-dark); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  background: rgba(255,255,255,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: box-shadow .25s, border-color .25s;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--border); }
.nav-inner { width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-primary); color: #fff; font-weight: 900; font-size: 17px;
  box-shadow: 0 8px 18px -6px rgba(37,99,235,.6);
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 1px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft); padding: 9px 15px; border-radius: 9px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--primary); background: rgba(37,99,235,.07); }
.nav-cta { margin-left: 10px; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: var(--grad-hero); color: #fff; overflow: hidden; padding-top: var(--nav-h);
}
.hero::before { /* circuit grid */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(56,180,240,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,180,240,.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 85%);
}
.hero::after { /* glow orbs */
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.28), transparent 62%);
  top: -160px; right: -120px; filter: blur(6px);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 60px 0; }
.hero-copy .eyebrow { color: var(--cyan-soft); background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.28); }
.hero h1 {
  font-size: clamp(36px, 5.2vw, 60px); font-weight: 900; line-height: 1.12; letter-spacing: -.03em; margin: 22px 0 20px;
}
.hero h1 .grad { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: 18.5px; color: rgba(226,232,240,.85); max-width: 540px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; display: flex; justify-content: center; }

/* hero floating card mockup */
.chip-stack { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1/1; }
.chip {
  position: absolute; background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); backdrop-filter: blur(10px);
  padding: 18px 20px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.5);
  animation: floaty 6s ease-in-out infinite;
}
.chip .t { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.chip .s { font-size: 12.5px; color: rgba(226,232,240,.7); }
.chip .bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.14); margin-top: 10px; overflow: hidden; }
.chip .bar i { display: block; height: 100%; width: 70%; background: var(--grad-primary); }
.chip-1 { top: 4%; left: 2%; animation-delay: 0s; }
.chip-2 { top: 38%; right: 0%; animation-delay: 1.2s; }
.chip-3 { bottom: 6%; left: 10%; animation-delay: 2.4s; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* stats strip */
.stats { position: relative; z-index: 3; margin-top: -52px; margin-bottom: 20px; }
.stats-grid {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); display: grid; grid-template-columns: repeat(4,1fr); overflow: hidden;
}
.stat { padding: 30px 24px; text-align: center; position: relative; }
.stat:not(:last-child)::after { content:""; position:absolute; right:0; top:20%; height:60%; width:1px; background: var(--border); }
.stat .num { font-size: 40px; font-weight: 900; letter-spacing: -.02em; color: var(--primary); line-height: 1; }
.stat .num u { text-decoration: none; font-weight: 800; color: var(--orange); }
.stat .lbl { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ---------- Dual-mainline cards ---------- */
.dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.dual-card {
  position: relative; border-radius: var(--radius-lg); padding: 40px; overflow: hidden;
  border: 1px solid var(--border); background: #fff; transition: transform .25s, box-shadow .25s;
}
.dual-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.dual-card.hard { border-top: 4px solid var(--primary); }
.dual-card.ai { border-top: 4px solid var(--cyan); }
.dual-card .badge-icon {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px; color: #fff;
}
.dual-card.hard .badge-icon { background: var(--grad-primary); }
.dual-card.ai .badge-icon { background: linear-gradient(135deg,#06b6d4,#2563eb); }
.dual-card h3 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.dual-card p.desc { color: var(--muted); margin-bottom: 22px; }
.dual-card ul.specs { display: grid; gap: 10px; margin-bottom: 26px; }
.dual-card ul.specs li { position: relative; padding-left: 26px; font-size: 14.5px; color: var(--ink-soft); }
.dual-card ul.specs li::before { content:""; position:absolute; left:0; top:8px; width:14px; height:14px; border-radius:4px; background: var(--bg-grid); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }
.dual-card .link-row { display: flex; gap: 18px; }
.dual-card a.more { font-weight: 700; font-size: 14.5px; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; transition: gap .15s; }
.dual-card.hard a.more:hover { gap: 22px; }
.dual-card.ai a.more { color: var(--cyan); }
.dual-card.ai a.more:hover { gap: 22px; }
.dual-card::after { /* decorative circuit */
  content:""; position:absolute; right:-40px; bottom:-40px; width:200px; height:200px; opacity:.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M10 10 H40 V40 M60 10 V30 H70 M80 60 V90 H50' fill='none' stroke='%232563eb' stroke-width='2'/%3E%3Ccircle cx='10' cy='10' r='4' fill='%232563eb'/%3E%3Ccircle cx='80' cy='60' r='4' fill='%232563eb'/%3E%3C/svg%3E");
}

/* ---------- Section label inline (for hardware) ---------- */
.hard-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:34px; }
.hard-head .lead { max-width: 640px; }
.hard-head h2 { font-size: clamp(26px,3.6vw,40px); font-weight: 800; letter-spacing:-.02em; margin: 14px 0 10px; }
.hard-head p { color: var(--muted); font-size: 16.5px; }
.hard-head .see-all { font-weight:700; color:var(--primary); font-size:14.5px; white-space:nowrap; }

/* card grid */
.grid-cards { display: grid; gap: 20px; }
.g3 { grid-template-columns: repeat(3,1fr); }
.g4 { grid-template-columns: repeat(4,1fr); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: transform .22s, box-shadow .22s, border-color .22s; position: relative; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card .c-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(37,99,235,.09); color: var(--primary);
}
.card h4 { font-size: 17.5px; font-weight: 800; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); }
.card .tags { display:flex; flex-wrap:wrap; gap:6px; margin-top: 16px; }
.tag { font-size: 11.5px; padding: 3px 9px; border-radius: 6px; background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }

/* AI product cards (dark) */
.ai-card {
  background: var(--dark-surface); border: 1px solid rgba(255,255,255,.09); border-radius: var(--radius); padding: 30px;
  transition: transform .22s, box-shadow .22s, border-color .22s; position: relative; overflow: hidden;
}
.ai-card:hover { transform: translateY(-5px); border-color: rgba(34,211,238,.4); box-shadow: 0 24px 50px -22px rgba(0,0,0,.6); }
.ai-card .a-icon { width:52px;height:52px;border-radius:13px;display:grid;place-items:center;margin-bottom:18px;background:linear-gradient(135deg,#06b6d4,#2563eb);color:#fff; }
.ai-card h4 { font-size: 18px; font-weight: 800; color:#fff; margin-bottom:9px; }
.ai-card p { font-size: 14px; color: rgba(226,232,240,.72); }
.ai-card .a-tag { display:inline-block; margin-top:16px; font-size:12.5px; font-weight:700; color: var(--cyan-soft); }

/* ---------- About ---------- */
.about-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items:center; }
.about-copy h2 { font-size: clamp(26px,3.6vw,40px); font-weight: 800; letter-spacing:-.02em; margin: 16px 0 18px; line-height:1.2; }
.about-copy p.lead { color: var(--muted); font-size: 16.5px; margin-bottom: 16px; }
.about-visual { position:relative; }
.about-panel { background: var(--dark-bg); border-radius: var(--radius-lg); padding: 34px; color: var(--dark-text); border:1px solid rgba(255,255,255,.08); }
.about-panel .row { display:flex; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid rgba(255,255,255,.07); }
.about-panel .row:last-child { border-bottom:0; }
.about-panel .row .ic { width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:rgba(34,211,238,.15);color:var(--cyan-soft);flex:none; }
.about-panel .row .tx { font-weight:700; color:#fff; font-size:15px; }
.about-panel .row .sub { font-size:12.5px; color: var(--muted-soft); }
.skillbar { height:8px;border-radius:6px;background:rgba(255,255,255,.1);overflow:hidden;margin-top:8px; }
.skillbar i{display:block;height:100%;background:var(--grad-primary);border-radius:6px;}

/* ---------- News ---------- */
.news-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:24px; }
.news-card { background:#fff;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:transform .22s,box-shadow .22s; }
.news-card:hover{ transform:translateY(-5px); box-shadow:var(--shadow);}
.news-thumb { height:170px; background: var(--grad-hero); position:relative; display:grid; place-items:center; color:rgba(255,255,255,.5); }
.news-thumb.v2{ background: linear-gradient(135deg,#0e2a54,#06b6d4);}
.news-thumb.v3{ background: linear-gradient(135deg,#123a72,#f59e0b);}
.news-body { padding: 22px 24px; }
.news-body .date { font-size:12.5px; color:var(--muted); font-weight:600; }
.news-body h4 { font-size:17px; font-weight:800; margin:10px 0 9px; line-height:1.4; }
.news-body p { font-size:13.5px; color:var(--muted); }
.news-body .read { display:inline-flex; margin-top:12px; font-weight:700; font-size:13.5px; color:var(--primary); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad-hero); color:#fff; position:relative; overflow:hidden; text-align:center; }
.cta-band::before{ content:""; position:absolute; inset:0; background-image:linear-gradient(rgba(56,180,240,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(56,180,240,.07) 1px,transparent 1px); background-size:50px 50px; }
.cta-band .container { position:relative; z-index:2; }
.cta-band h2 { font-size: clamp(26px,4vw,40px); font-weight:900; margin-bottom:16px; letter-spacing:-.02em; }
.cta-band p { color: rgba(226,232,240,.8); font-size:17px; max-width:560px; margin:0 auto 30px; }
.cta-actions { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ---------- Contact ---------- */
.contact-grid { display:grid; grid-template-columns: 1fr 1fr; gap:44px; }
.contact-info .item { display:flex; gap:16px; padding:18px 0; border-bottom:1px solid var(--border); }
.contact-info .item:last-child{ border-bottom:0; }
.contact-info .item .ic { width:44px;height:44px;border-radius:11px;display:grid;place-items:center;background:rgba(37,99,235,.09);color:var(--primary);flex:none; }
.contact-info .item .tx strong{ display:block; font-weight:700; margin-bottom:2px; }
.contact-info .item .tx span{ font-size:14.5px; color:var(--muted); }
.contact-info .item .tx .fill { color: var(--orange-dark); font-style:normal; font-size:12.5px; }
.contact-form { background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);padding:34px;box-shadow:var(--shadow);}
.field { margin-bottom:16px; }
.field label{ display:block; font-size:13.5px; font-weight:700; margin-bottom:7px; }
.field input, .field textarea, .field select { width:100%; padding:12px 14px; border:1.5px solid var(--border); border-radius:10px; font-size:14.5px; font-family:inherit; transition:border-color .15s; background:var(--bg);}
.field input:focus, .field textarea:focus, .field select:focus{ outline:none; border-color:var(--primary); }
.field textarea { resize:vertical; min-height:110px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* ---------- Footer ---------- */
.footer { background: var(--dark-bg); color: rgba(226,232,240,.75); padding: 64px 0 28px; }
.footer-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap:36px; margin-bottom:44px; }
.footer .brand{ color:#fff; margin-bottom:14px; }
.footer p.brand-desc { font-size:14px; max-width:300px; color: rgba(226,232,240,.6); }
.footer h5 { color:#fff; font-size:14px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; margin-bottom:16px; }
.footer ul li { margin-bottom:10px; font-size:14px; }
.footer ul a:hover{ color:var(--cyan-soft); }
.footer-bottom { border-top:1px solid rgba(255,255,255,.09); padding-top:24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:13px; color: rgba(226,232,240,.5); }

/* ---------- Reveal animation ---------- */
.reveal { opacity:0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity:1; transform:none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align:center; }
  .hero p.lede { margin-left:auto; margin-right:auto; }
  .hero-cta { justify-content:center; }
  .chip-stack { max-width: 320px; margin: 30px auto 0; }
  .dual-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .g3,.g4 { grid-template-columns: repeat(2,1fr); }
  .news-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta { display:none; }
  .hamburger { display:flex; }
  .nav-links.open {
    display:flex; flex-direction:column; position:absolute; top:var(--nav-h); left:0; right:0;
    background:#fff; border-bottom:1px solid var(--border); padding:16px 24px; box-shadow:var(--shadow); gap:4px;
  }
  .nav-links.open a { padding:13px 14px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .stat:nth-child(2)::after { display:none; }
}
@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .g3,.g4,.news-grid,.footer-grid,.form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat:nth-child(2)::after, .stat::after { display:none; }
  .dual-card { padding: 28px; }
}
