:root {
  --bg: #0f141b;
  --bg-soft: #121925;
  --panel: #151c26;
  --panel-2: #1a2330;
  --text: #e5edf9;
  --muted: #9fb1cc;
  --primary: #2f3fff;
  --accent: #ffce3a;
  --border: #243144;
  --shadow: rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 18px;
  background: var(--bg);
  color: var(--text);
}

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-16 { gap: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.max-600 { max-width: 600px; }
.max-720 { max-width: 720px; }

/* Layering */
.bg-canvas { position: fixed; inset: 0; z-index: 0; background: radial-gradient(800px 500px at 80% -120px, rgba(79,102,255,0.18), transparent 60%), radial-gradient(700px 400px at 10% -80px, rgba(127,200,255,0.12), transparent 60%), var(--bg); pointer-events: none; }
main, .site-header, .site-footer { position: relative; z-index: 1; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,14,20,0.8); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .container { height: 64px; }
.brand { display: inline-flex; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; }
.brand.small .brand-name { font-weight: 600; font-size: 14px; }
.brand .logo-img { height: 32px; width: auto; display: block; }
.brand.small .logo-img { height: 18px; }
.nav a { color: var(--muted); text-decoration: none; margin: 0 12px; font-weight: 500; }
.nav a:hover { color: var(--text); }
.actions .btn { margin-left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; border: 1px solid transparent; transition: transform .05s ease, background .2s, border-color .2s; }
.btn-primary { background: #1b2740; color: var(--text); border-color: #2a3a58; }
.btn-primary:hover { background: #223251; }
.btn-secondary { background: #1a2330; color: var(--text); border-color: #2b3a54; }
.btn-secondary:hover { background: #223044; }
.btn-accent { background: var(--accent); color: #1b1e27; }
.btn-accent:hover { filter: brightness(0.95); }

/* Hero */
.hero { padding: 96px 0 48px; background: transparent; }
.hero-tall { padding: 120px 0 72px; }
.hero-gradient { background: linear-gradient(180deg, rgba(20,27,37,0.1), rgba(20,27,37,0.35)); }
.display { font-size: 48px; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 800; }
.lede { color: var(--muted); margin: 0 auto; font-size: 18px; }

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: linear-gradient(180deg, rgba(20,27,37,0.6), rgba(20,27,37,0.6)); }
.center { text-align: center; }
.h2 { font-size: 32px; margin: 0 0 8px; letter-spacing: -0.02em; }
.h4 { margin: 0 0 8px; font-size: 18px; }

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.card-elev { box-shadow: 0 10px 30px var(--shadow); }
.card-img { width: 100%; height: 180px; object-fit: cover; display: block; filter: saturate(0.9); }
.card-body { padding: 16px; color: var(--muted); }
.card-body h3 { color: var(--text); }

/* Logo row */
.logo-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 24px; }
.logo-box { height: 64px; border-radius: 12px; background: #202a3a; border: 1px solid var(--border); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02); }
.logo-box.muted { background: #161e2a; }

/* Offerings page */
.heading-center { text-align: center; }
.eyebrow { color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.kicker { font-size: 42px; font-weight: 800; margin: 8px 0 12px; }
.sublede { color: var(--muted); max-width: 720px; margin: 0 auto; font-size: 18px; }

.collab-logos { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.collab-logo { height: 56px; width: auto; display: block; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.35)); }
.collab-logo.qubitron { height: 42px; }
.collab-logo.spinq { height: 96px; }
.collab-sign { font-weight: 800; font-size: 28px; color: var(--muted); line-height: 1; }

.pill-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 16px; }
.pill { background: linear-gradient(180deg, rgba(21,28,38,.85), rgba(18,25,37,.9)); border: 1px solid var(--border); border-radius: 14px; padding: 22px; text-align: center; color: var(--text); box-shadow: 0 6px 18px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.04); transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; cursor: pointer; }
.pill:hover, .pill:focus { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.07); border-color: #324563; outline: none; }
.pill:active { transform: translateY(0); }
.pill-icon { width: 32px; height: 32px; object-fit: cover; display: block; margin: 0 auto 10px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.pill .icon { display: block; width: 22px; height: 22px; margin: 0 auto 10px; opacity: .9; }
.pill span { color: var(--text); font-weight: 600; font-size: 14px; }

.section-title { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Horizontal scroll row for product cards */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 20px; overflow-x: hidden; padding-bottom: 10px; scroll-snap-type: x mandatory; scroll-behavior: smooth; user-select: none; touch-action: none; scrollbar-width: none; overscroll-behavior-x: contain; }
.hscroll > * { scroll-snap-align: start; }
.hscroll::-webkit-scrollbar { display: none; height: 0; width: 0; }

/* Carousel controls */
.carousel-wrap { position: relative; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 999px; background: rgba(15,20,27,0.7); border: 1px solid var(--border); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.35); z-index: 2; }
.carousel-arrow:hover { background: rgba(23,31,44,0.8); }
.carousel-arrow.left { left: -18px; }
.carousel-arrow.right { right: -18px; }
.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.carousel-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--border); cursor: pointer; transition: background .2s ease, transform .1s ease; }
.carousel-dot.active { background: var(--accent); transform: scale(1.1); }

/* Hardware */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.panel-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; color: var(--text); }
.bullets { color: var(--muted); padding-left: 18px; }
.bullets li { margin: 8px 0; }

/* Tabs for Hardware page */
.tabs { display: flex; gap: 10px; border-bottom: 1px solid var(--border); margin: 20px 0 8px; flex-wrap: wrap; }
.tab { padding: 10px 14px; border-radius: 10px 10px 0 0; background: #131b28; color: var(--muted); border: 1px solid var(--border); border-bottom: none; cursor: pointer; font-weight: 600; }
.tab.active { background: #1a2434; color: var(--text); }
.tabpanes > .tabpane { display: none; }
.tabpanes > .tabpane.active { display: block; }

/* Tighten spacing between tabs and product sections */
#hardware { padding-bottom: 20px; }
.section[data-pane] { padding-top: 28px; }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 980px) { .cards-3 { grid-template-columns: 1fr; } }

/* Gemini Lab animation */
.gemini-anim { position: relative; height: 260px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0b1118; margin-top: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); user-select: none; cursor: grab; }
.gemini-anim.dragging { cursor: grabbing; }
.gemini-anim .img { display: none; }
.gemini-anim .sprite { position: absolute; left: 50%; top: 50%; width: 320px; max-width: 92%; height: 100%; transform: translate(-50%, -50%); background-image: url('https://static-cdn.spinq.cn/24-official-static/static/img/13-detail-lab/animate.png?t=1'); background-repeat: no-repeat; background-size: 1400% 100%; background-position: 0 50%; image-rendering: -webkit-optimize-contrast; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4)); }
.gemini-anim .grid { position: absolute; inset: 0; background-image: 
  repeating-linear-gradient(0deg, rgba(42,58,88,0.35) 0 1px, transparent 1px 24px),
  repeating-linear-gradient(90deg, rgba(42,58,88,0.35) 0 1px, transparent 1px 24px);
  pointer-events: none; }
.gemini-anim .scan { position: absolute; top: 0; bottom: 0; width: 28%; transform: translateX(-40%); background: linear-gradient(90deg, rgba(79,102,255,0) 0%, rgba(127,200,255,0.35) 50%, rgba(79,102,255,0) 100%); filter: blur(2px); animation: geminiScan 4.5s linear infinite; pointer-events: none; }
@keyframes geminiScan { from { transform: translateX(-40%); } to { transform: translateX(140%); } }
@keyframes geminiFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.01); } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #0c1118; padding: 24px 0; color: var(--muted); }
.subnav a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.subnav a:hover { color: var(--text); }
.legal { color: var(--muted); }

/* Responsive */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr; }
  .pill-row { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .logo-row { grid-template-columns: repeat(3, 1fr); }
  .display { font-size: 40px; }
}


/* Additions: stats, testimonials, FAQ, CTA */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-align: center; }
.stat .num { font-size: 28px; font-weight: 800; color: var(--text); }
.stat .label { color: var(--muted); font-weight: 500; }

.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.case { background: linear-gradient(180deg, rgba(36,49,68,.5), rgba(21,28,38,.8)); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.case h3 { margin: 0 0 8px; font-size: 18px; }
.case p { color: var(--muted); }

.cta { background: linear-gradient(90deg, rgba(47,63,255,.18), rgba(127,200,255,.1)); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.cta h3 { margin: 0; font-size: 22px; }

.faq { border-top: 1px solid var(--border); margin-top: 24px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-btn { width: 100%; text-align: left; background: transparent; color: var(--text); padding: 16px 0; border: none; font-weight: 600; cursor: pointer; font-size: 20px; line-height: 1.35; }
.faq-panel { color: var(--muted); display: none; padding: 0 0 16px; font-size: 18px; line-height: 1.6; }
.faq-item.open .faq-panel { display: block; }

@media (max-width: 980px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; }
}

/* Forms */
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.form .card-body { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
label { color: var(--muted); font-weight: 600; font-size: 13px; }
label { color: var(--muted); font-weight: 600; font-size: 14px; }
input, textarea { width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 12px 12px; outline: none; }
input:focus, textarea:focus { border-color: #2f3fff; box-shadow: 0 0 0 3px rgba(47,63,255,0.15); }

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Map */
.map-embed { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0b1118; }
.map-embed iframe { display: block; width: 100%; height: 240px; border: 0; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(6,10,16,0.7); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 60; }
.modal { width: min(720px, 92vw); background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.modal-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-weight: 800; font-size: 20px; }
.modal-close { background: transparent; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
.modal-body { padding: 18px; color: var(--muted); }
.modal-footer { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-body .modal-img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 12px; filter: saturate(0.95); }
.modal-overlay.show { display: flex; }

.pill { cursor: pointer; }

