/* =========================================================
   清屿科技 · Tsingyu AI
   Clean white (or black, following the system), Inter,
   pill buttons, hairline research list, gradient product tiles.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ─────────── Tokens ─────────── */
:root {
  color-scheme: light dark;
  --bg:      #ffffff;
  --fg:      #000000;
  --fg-2:    rgba(0, 0, 0, 0.6);
  --rule:    rgba(0, 0, 0, 0.1);
  --soft:    rgba(0, 0, 0, 0.05);
  --soft-2:  rgba(0, 0, 0, 0.09);
  --btn-bg:  #000000;
  --btn-fg:  #ffffff;

  --container: 1440px;
  --gutter: clamp(20px, 2.3vw, 32px);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans-cn: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #000000;
    --fg:     #ffffff;
    --fg-2:   rgba(255, 255, 255, 0.6);
    --rule:   rgba(255, 255, 255, 0.14);
    --soft:   rgba(255, 255, 255, 0.08);
    --soft-2: rgba(255, 255, 255, 0.14);
    --btn-bg: #ffffff;
    --btn-fg: #000000;
  }
}

/* ─────────── Base ─────────── */
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
html[lang="zh"] body { font-family: var(--sans-cn); letter-spacing: 0; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-fg);
  padding: 8px 16px; border-radius: 40px; font-size: 13px; font-weight: 500;
}
.skip:focus { left: 8px; }

/* ─────────── Pills ─────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px;
  padding: 0 20px;
  border-radius: 40px;
  font-size: 14px; font-weight: 500; line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: opacity .2s, background .2s;
}
.pill:hover { opacity: 0.82; }
.pill-soft { background: var(--soft); color: var(--fg); }
.pill-soft:hover { opacity: 1; background: var(--soft-2); }
.pill-lg { height: 44px; padding: 0 24px; font-size: 15px; }
.ext { width: 10px; height: 10px; flex: none; }

/* ─────────── Header ─────────── */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.topbar-inner { display: flex; align-items: center; height: 64px; gap: 24px; }
.brand { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; margin-right: 12px; }
html[lang="zh"] .brand { letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.nav a { padding: 8px 12px; border-radius: 40px; transition: background .2s; }
.nav a:hover { background: var(--soft); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .nav { display: none; }
}

/* ─────────── Hero ─────────── */
.hero { padding-block: clamp(64px, 12vh, 140px) clamp(48px, 9vh, 104px); }
.hero h1 {
  font-size: clamp(40px, 5.2vw, 72px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-bottom: 24px;
}
html[lang="zh"] .hero h1 { letter-spacing: 0; line-height: 1.2; max-width: 14em; font-size: clamp(34px, 5.2vw, 72px); }
.hero h1 .phrase { display: inline-block; }
.hero-text { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--fg-2); max-width: 38em; margin-bottom: 32px; }
html[lang="zh"] .hero-text { max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─────────── Featured ─────────── */
.feature { display: block; }
.feature-media { position: relative; }
.feature-word {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff;
  font-size: clamp(48px, 9vw, 136px);
  font-weight: 500;
  letter-spacing: -0.04em;
  pointer-events: none;
}
.feature img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 4px;
  transition: filter .3s;
}
.feature:hover img { filter: brightness(1.08); }
.feature-cap { margin-top: 16px; }
.feature-cap h2 { font-size: clamp(20px, 2vw, 28px); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 8px; max-width: 40ch; }
html[lang="zh"] .feature-cap h2 { letter-spacing: 0; }
.feature-cap h2 .ext { display: inline-block; width: 12px; height: 12px; margin-left: 8px; vertical-align: 0.1em; }
.feature:hover h2 { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
@media (max-width: 760px) {
  .feature img { aspect-ratio: 4 / 3; }
}

/* ─────────── Section header ─────────── */
.section { padding-top: clamp(56px, 9vh, 112px); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.section-head h2 { font-size: clamp(32px, 3.4vw, 48px); font-weight: 500; line-height: 1.16; letter-spacing: -0.03em; }
html[lang="zh"] .section-head h2 { letter-spacing: 0; }
.section-head a { font-size: 14px; font-weight: 500; }
.section-head a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ─────────── Research list ─────────── */
.list > li { border-bottom: 1px solid var(--rule); }
.row {
  display: grid;
  grid-template-columns: minmax(160px, 22%) minmax(0, 1fr);
  gap: 24px;
  padding-block: 32px;
}
.row-meta { font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.row-meta time { display: block; margin-top: 16px; color: var(--fg-2); }
.row-body { max-width: 720px; }
.row h3 { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; margin-bottom: 12px; }
html[lang="zh"] .row h3 { letter-spacing: 0; }
.row h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.row h3 .ext { display: inline-block; margin-left: 6px; vertical-align: 0.12em; }
.row-text { font-size: 15px; line-height: 1.6; margin-bottom: 10px; }
.row-authors { font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.row-authors strong { color: var(--fg); font-weight: 500; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 24px; }
.stat-v { display: block; font-size: 28px; font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
.stat-k { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--fg-2); letter-spacing: 0; max-width: 22ch; }
@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 28px; }
  .row-meta { display: flex; gap: 16px; }
  .row-meta time { margin-top: 0; }
}

/* ─────────── Product tiles ─────────── */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.7vw, 24px); }
.tile { display: flex; flex-direction: column; }
.tile-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 16px;
  transition: filter .3s;
}
.tile:hover .tile-img { filter: brightness(1.06); }
.tile h3 { font-size: 17px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 6px; }
html[lang="zh"] .tile h3 { letter-spacing: 0; }
.tile h3 .ext { display: inline-block; margin-left: 6px; vertical-align: 0.1em; }
.tile-meta { font-size: 13px; font-weight: 500; letter-spacing: 0; margin-bottom: 10px; }
.tile-meta span + span { margin-left: 12px; color: var(--fg-2); }
.tile p { font-size: 15px; line-height: 1.6; color: var(--fg-2); }
@media (max-width: 900px) {
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .tile-img { aspect-ratio: 16 / 9; }
}

/* ─────────── CTA box ─────────── */
.cta {
  margin-top: clamp(72px, 12vh, 140px);
  background: var(--soft);
  border-radius: 4px;
  padding: clamp(56px, 10vh, 112px) 24px;
  text-align: center;
}
.cta h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 500; line-height: 1.2; letter-spacing: -0.03em; margin-bottom: 12px; }
html[lang="zh"] .cta h2 { letter-spacing: 0; }
.cta p { color: var(--fg-2); margin: 0 auto 28px; max-width: 36em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ─────────── Footer ─────────── */
.footer { padding: clamp(64px, 12vh, 120px) 0 32px; font-size: 14px; letter-spacing: 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer h4 { font-size: 14px; font-weight: 400; color: var(--fg-2); margin-bottom: 16px; }
.footer li + li { margin-top: 10px; }
.footer li a { font-weight: 500; }
.footer li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-base {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(56px, 10vh, 96px);
  font-size: 13px;
}
.footer-base .icon { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 40px; }
.footer-base .icon:hover { background: var(--soft); }
.footer-base svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}

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