/* airdiode · 总主页
   配色取自孤云的青绿 #1f7573：页面保持中性，品牌色只出现在卡片与强调处。 */

:root {
  --bg: #fbfaf8;
  --card: #ffffff;
  --ink: #14161a;
  --muted: #5d6470;
  --line: rgba(20, 22, 26, 0.10);
  --line-soft: rgba(20, 22, 26, 0.06);

  --guyun: #1f7573;
  --guyun-deep: #0d4a48;
  --guyun-light: #6bbfba;
  --guyun-soft: #eaf3f1;

  --radius: 22px;
  --wrap: 1060px;
  --shadow: 0 1px 2px rgba(20, 22, 26, 0.04), 0 30px 60px -40px rgba(20, 22, 26, 0.45);
  --shadow-lift: 0 2px 4px rgba(20, 22, 26, 0.05), 0 34px 64px -36px rgba(20, 22, 26, 0.5);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113;
    --card: #16191c;
    --ink: #edf0f3;
    --muted: #9aa3ae;
    --line: rgba(255, 255, 255, 0.11);
    --line-soft: rgba(255, 255, 255, 0.06);

    --guyun: #58b8b2;
    --guyun-deep: #2a7f7a;
    --guyun-light: #9fe0dc;
    --guyun-soft: #142c2a;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 30px 60px -40px rgba(0, 0, 0, 0.9);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.55), 0 34px 64px -36px rgba(0, 0, 0, 0.95);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--line-soft);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  white-space: nowrap;
}

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--guyun);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex; align-items: center; gap: 12px; height: 64px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17.5px; letter-spacing: 0.4px;
}
.brand img { width: 30px; height: 30px; display: block; }

.site-header nav {
  margin-left: auto;
  display: flex; align-items: center; gap: 22px;
  font-size: 14.5px; color: var(--muted);
}
.site-header nav a { transition: color 0.15s ease; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav .gh {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 13px;
  font-size: 13.5px;
  background: var(--card);
}
.site-header nav .gh:hover { border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.site-header nav .lang {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  background: transparent;
}
.site-header nav .lang:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  padding: 88px 0 56px;
  background:
    radial-gradient(720px 380px at 8% -16%, color-mix(in srgb, var(--guyun) 14%, transparent), transparent 62%),
    radial-gradient(680px 360px at 96% -12%, color-mix(in srgb, var(--guyun) 13%, transparent), transparent 62%);
}

.eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 5.8vw, 62px);
  line-height: 1.14;
  letter-spacing: -1.6px;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--guyun-deep), var(--guyun-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  max-width: 34em;
  font-size: 17.5px;
  color: var(--muted);
  line-height: 1.8;
}

.stats {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 10px 28px;
  margin: 34px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
}
.stats li { display: flex; align-items: baseline; gap: 7px; }
.stats b { color: var(--ink); font-size: 15px; font-weight: 700; }

/* ---------- sections ---------- */

.section { padding: 64px 0; }

.section-head { margin-bottom: 32px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.6px;
  line-height: 1.3;
}
.section-head p { color: var(--muted); font-size: 15.5px; }

/* ---------- product cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 30px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card::before {
  content: "";
  position: absolute; inset: 0 0 auto;
  height: 3px;
  background: var(--accent);
  opacity: 0.9;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.card-guyun { --accent: var(--guyun); --accent-soft: var(--guyun-soft); }
.card-fengyu { --accent: #8a5a3b; --accent-soft: #f3ece4; }
.card-stm32 { --accent: #1f6bff; --accent-soft: #eef4ff; }
/* 只有一件产品时，卡片整行铺开：左边叙事、右边事实与入口 */
.card-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 22px 44px;
  align-items: start;
}
.card-wide .desc { max-width: 44em; }
.arch-side { display: flex; flex-direction: column; gap: 20px; }
.arch-side .card-actions { margin-top: 0; padding-top: 0; }

.card-top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}

.app-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.45);
  flex: none;
}

.kicker {
  margin: 0 0 2px;
  font-size: 12px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.4px;
  line-height: 1.3;
}

.tagline {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 14px;
  color: var(--muted);
}

.facts li {
  position: relative;
  padding-left: 16px;
  line-height: 1.6;
}
.facts li::before {
  content: "";
  position: absolute; left: 1px; top: 0.62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.card-actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: auto;
  padding-top: 26px;
  font-size: 15px;
  font-weight: 600;
}

.go { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.go span { transition: transform 0.18s ease; }
.card:hover .go span { transform: translateX(4px); }

/* 让整张卡片可点，同时不嵌套 <a> */
.go::after { content: ""; position: absolute; inset: 0; }

.alt {
  position: relative; z-index: 1;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.alt:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 40%, transparent); }

/* ---------- principles ---------- */

.principles {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  counter-reset: p;
}

.principles li {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}

.num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.principles h3 {
  margin: 0 0 8px;
  font-size: 17.5px;
  letter-spacing: -0.2px;
}

.principles p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.75;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: start;
}

.about h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.6px;
}

.about p { font-size: 16px; max-width: 32em; }
.about p + p { margin-top: 14px; }
.about .muted { color: var(--muted); font-size: 15px; }

.links {
  list-style: none;
  margin: 0; padding: 0;
  border-top: 1px solid var(--line-soft);
}

.links a {
  display: flex; align-items: center; gap: 16px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  transition: color 0.15s ease, padding 0.15s ease;
}
.links a:hover { color: var(--guyun); padding-left: 6px; }

.arrow { margin-left: auto; color: var(--muted); font-size: 13px; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 64px;
  padding: 52px 0 44px;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.75fr) minmax(0, 0.9fr);
  gap: 32px 44px;
}

.foot-brand .brand { margin-bottom: 12px; color: var(--ink); }
.foot-brand .brand img { width: 26px; height: 26px; }
.foot-tagline { margin-bottom: 20px; }

.foot-about {
  display: grid;
  gap: 8px;
  max-width: 32em;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}
.foot-about-lead {
  color: var(--ink);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 1px;
}
.foot-about a,
.legal a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--line);
}
.foot-about a:hover,
.legal a:hover { text-decoration-color: currentColor; }

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
}
.site-footer nav a { color: var(--muted); width: fit-content; transition: color 0.15s ease; }
.site-footer nav a:hover { color: var(--ink); }

.legal {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}
.legal + .legal { margin-top: 8px; padding-top: 0; border-top: 0; }

/* ---------- narrow ---------- */

@media (max-width: 760px) {
  .hero { padding: 64px 0 48px; }
  .section { padding: 48px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-wide { grid-template-columns: 1fr; gap: 18px; }
  .site-footer nav { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .site-footer { margin-top: 48px; padding-top: 40px; }
  .site-header nav { gap: 16px; }
  .site-header nav a:not(.gh):not(.lang) { display: none; }
  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-top: 28px;
  }
  .card { padding: 26px 22px 22px; }
  .tagline { font-size: 18px; }
}

@media (prefers-color-scheme: dark) {
  .card-fengyu { --accent: #c99a72; --accent-soft: #2a2018; }
  .card-stm32 { --accent: #7ea6ff; --accent-soft: #16203a; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .go span, .links a { transition: none; }
  .card:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(20, 22, 26, 0.3); --muted: #454b55; }
}

/* ---------- 简化版首页：一句欢迎 + 产品清单 ---------- */

.hero-simple { padding: 88px 0 20px; }

.hero-simple h1 {
  margin: 0 0 24px;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.14;
  letter-spacing: -1.4px;
  font-weight: 800;
}

.intro-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; font-size: 15px; }
.intro-links a { color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.intro-links a:hover { color: var(--ink); border-color: currentColor; }

#products { padding-top: 28px; padding-bottom: 16px; }

.product-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.product-list li { border-bottom: 1px solid var(--line); }
.product-list a {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 6px;
  transition: background 0.15s ease, padding 0.15s ease;
}
.product-list a:hover { background: color-mix(in srgb, var(--card) 70%, transparent); padding-left: 14px; }
.product-list img { width: 40px; height: 40px; border-radius: 10px; flex: none; }

.pl-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl-name { font-size: 17.5px; font-weight: 600; color: var(--ink); }
.pl-desc { font-size: 14px; color: var(--muted); }
.pl-tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.2px;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  vertical-align: 2px;
}

/* 类型标签（App / 网页 / 硬件）：实心一点，和语言标签区分开 */
.pl-type {
  border-color: transparent;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink); font-weight: 600;
}
.pl-go { margin-left: auto; color: var(--muted); transition: transform 0.15s ease, color 0.15s ease; }
.product-list a:hover .pl-go { color: var(--ink); transform: translateX(3px); }

.footer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 13.5px; color: var(--muted); }
.footer-line a { color: var(--muted); }
.footer-line a:hover { color: var(--ink); }
.footer-line > span:first-child { margin-right: auto; }

/* ---------- 联系 ---------- */

.contact { padding-top: 40px; padding-bottom: 72px; }

.contact-row { display: flex; align-items: center; gap: 40px; }

.contact-row h2 { margin: 0 0 10px; font-size: 19px; letter-spacing: -0.3px; }
.contact-mail { margin: 0 0 6px; font-size: 15px; }
.contact-mail a { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.contact-mail a:hover { border-color: currentColor; }
.contact-meta { margin: 0; font-size: 13.5px; color: var(--muted); }

.qr { display: flex; align-items: center; gap: 14px; margin-left: auto; color: var(--muted); font-size: 13.5px; }
.qr img { width: 128px; height: 128px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qr:hover { color: var(--ink); }

@media (max-width: 760px) {
  .contact-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .qr { margin-left: 0; }
}
