/* =========================================================
   StellarPolar · 北京星辰极智科技有限公司
   Minimalist European-style corporate theme
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-dark: #0b1220;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-mute: #94a3b8;
  --line: #e6ebf1;
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --accent: #38bdf8;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 40px rgba(15, 23, 42, .10);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans JP", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 15px; font-weight: 600; line-height: 1;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .25s var(--ease),
  background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 24px rgba(29, 78, 216, .28); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 12px 32px rgba(29, 78, 216, .36); transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; }
.brand-mark { border-radius: 8px; }
.brand-name { font-size: 19px; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink-soft); position: relative; transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--primary); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 16px; }

/* Language switch */
.lang-switch { position: relative; }
.lang-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-soft);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-soft); transition: all .2s var(--ease);
}
.lang-toggle:hover { color: var(--primary); border-color: var(--primary); }
.lang-toggle.is-open { color: var(--primary); border-color: var(--primary); }
.lang-icon { display: block; }

.lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 100;
  min-width: 140px; margin: 0; padding: 6px;
  list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.lang-dropdown.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: .9rem;
  color: var(--ink); transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.lang-option:hover { background: var(--bg-soft); color: var(--primary); }
.lang-option.is-active { color: var(--primary); font-weight: 700; }

/* Mobile */
@media (max-width: 980px) {
  .lang-dropdown { right: 0; }
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.hamburger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: var(--bg-dark); color: #fff; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 18% 12%, rgba(56, 189, 248, .20), transparent 60%),
    radial-gradient(800px 520px at 85% 88%, rgba(29, 78, 216, .28), transparent 60%),
    linear-gradient(160deg, #0b1220 0%, #0f1f3d 55%, #0b1220 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; padding: 120px 24px 120px; }
.badge {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(56,189,248,.35); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 26px;
  background: rgba(56,189,248,.08);
}
.hero-title {
  font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 800; line-height: 1.08;
  letter-spacing: -.02em; margin-bottom: 22px;
}
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.2rem); color: #cbd5e1; max-width: 720px; margin: 0 auto 38px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.32); color: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.scroll-hint:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.scroll-arrow { width: 20px; height: 20px; animation: bob 2s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.section-sub { margin-top: 16px; color: var(--ink-soft); font-size: 1.05rem; }

/* About */
#about .section-head { max-width: 760px; margin-inline: auto; }
#about .section-sub { margin-top: 16px; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.value-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--primary); background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(29,78,216,.12)); margin-bottom: 16px; }
.value-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); font-size: .98rem; }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #cfd9ea; }
.card-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--primary); background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(29,78,216,.12)); margin-bottom: 18px; }
.card h3 { font-size: 1.16rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .97rem; }

/* Contact */
.contact { background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact-intro .section-title { text-align: left; }
.contact-desc { color: var(--ink-soft); margin: 18px 0 26px; font-size: 1.05rem; }
.contact-info { font-size: .98rem; color: var(--ink-soft); border-left: 3px solid var(--accent); padding-left: 16px; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-md); display: grid; gap: 16px; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.form-success { color: #047857; font-size: .95rem; font-weight: 600; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: var(--radius-sm); padding: 12px 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #cbd5e1; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-tag { color: #94a3b8; font-size: .95rem; max-width: 360px; }
.footer-col h4 { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: 16px; letter-spacing: .02em; }
.footer-col a, .footer-col p { display: block; color: #94a3b8; font-size: .92rem; margin-bottom: 10px; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(148,163,184,.16); font-size: .85rem; color: #64748b; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.footer-bottom .icp-link { color: inherit; text-decoration: none; transition: color .2s; }
.footer-bottom .icp-link:hover { color: #93c5fd; }

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

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    padding: 16px 24px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .nav-links.open a { width: 100%; padding: 10px 0; font-size: 16px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 42px; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-inner { padding-top: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-arrow { animation: none; }
}
