/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── Tokens — Neo-Brutalism ──────────────────────────────── */
:root {
  --black:   #0a0a0a;
  --white:   #ffffff;
  --red:     #ff3b30;
  --yellow:  #ffe03b;
  --purple:  #7c3aed;
  --bg:      #f5f0e8;       /* warm off-white */
  --border:  3px solid var(--black);
  --shadow:  5px 5px 0 var(--black);
  --shadow-lg: 8px 8px 0 var(--black);
  --radius:  0px;           /* brutalism = no border radius */
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --ease:    cubic-bezier(0.4, 0, 0.2, 1);
  --t:       0.2s;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--black);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 700px) { .container { padding: 0 20px; } }

/* ─── Scroll-reveal ───────────────────────────────────────── */
.sr {
  opacity: 0;
  transform: translateY(24px);
  /* transition 只在页面就绪后前开启，防止刷新时已入屏元素播放动画抄 */
}
.ready .sr {
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.sr.vis { opacity: 1; transform: none; }

/* ─── HEADER ──────────────────────────────────────────────── */
#header {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
  border-bottom: var(--border);
}
.hd-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 48px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
@media (max-width: 700px) { .hd-inner { padding: 0 20px; } }

.hd-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--white);
}
.hd-logo-icon { font-size: 20px; line-height: 1; }
.hd-logo-text {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
}
.hd-logo-text em { font-style: normal; opacity: 0.5; margin-left: 5px; font-size: 12px; }

.hd-nav {
  display: flex; align-items: center; gap: 6px;
}
.hd-nav-link {
  font-size: 13px; font-weight: 600; color: var(--white);
  text-decoration: none; padding: 5px 12px;
  transition: background var(--t), color var(--t);
}
.hd-nav-link:hover {
  background: var(--yellow); color: var(--black);
}

.hd-btn-gh {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; text-decoration: none;
  background: var(--white); color: var(--black);
  padding: 5px 14px;
  border: 2px solid var(--white);
  transition: background var(--t), color var(--t);
}
.hd-btn-gh:hover { background: var(--yellow); border-color: var(--yellow); }
.ico-gh { width: 15px; height: 15px; flex-shrink: 0; }

@media (max-width: 480px) {
  .hd-nav-link { display: none; }
}

/* ─── HERO ────────────────────────────────────────────────── */
#hero {
  position: relative;
  background: var(--black);
  color: var(--white);
  padding: 100px 0 80px;
  overflow: hidden;
}

/* noise texture overlay */
.hero-noise {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.18;
}

/* decorative border stripe at bottom */
#hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0px, var(--red) 32px,
    var(--yellow) 32px, var(--yellow) 64px,
    var(--white) 64px, var(--white) 96px,
    var(--black) 96px, var(--black) 128px
  );
}

.hero-badge-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 10px;
  border: 2px solid currentColor;
}
.badge-ver  { color: var(--yellow); border-color: var(--yellow); }
.badge-os   { color: var(--white);  border-color: var(--white); }
.badge-ai   { color: var(--red);    border-color: var(--red); }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(56px, 10vw, 120px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.hero-title-cn { color: var(--white); }
.hero-title-slash { color: var(--red); font-weight: 400; }
.hero-title-en {
  color: var(--yellow);
  font-size: 0.48em;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-sub {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 15.5px; color: rgba(255,255,255,0.72);
  line-height: 1.72; max-width: 560px;
  margin-bottom: 40px;
}
.hero-br { display: block; }
@media (max-width: 600px) { .hero-br { display: inline; } }

.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px;
}

/* primary button */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  text-decoration: none;
  background: var(--yellow); color: var(--black);
  padding: 13px 26px;
  border: var(--border);
  box-shadow: var(--shadow);
  transition: transform var(--t), box-shadow var(--t);
}
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }

/* secondary button */
.btn-secondary {
  display: inline-flex; align-items: center;
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  text-decoration: none;
  background: transparent; color: var(--white);
  padding: 13px 26px;
  border: 3px solid var(--white);
  transition: background var(--t), color var(--t);
}
.btn-secondary:hover { background: var(--white); color: var(--black); }

.ico-dl { width: 18px; height: 18px; flex-shrink: 0; }

.hero-req {
  font-size: 12px; color: rgba(255,255,255,0.4);
  letter-spacing: 0.03em;
}

/* floating deco tags */
.deco-tag {
  position: absolute;
  font-size: 12px; font-weight: 700;
  padding: 7px 14px;
  pointer-events: none; user-select: none;
  animation: floatTag 4s ease-in-out infinite;
  letter-spacing: 0.02em;
}
/* 语音输入 — 黄底黑字 */
.deco-tag-1 {
  top: 15%; right: 10%;
  background: var(--yellow); color: var(--black);
  border: 2px solid var(--yellow);
  box-shadow: 4px 4px 0 rgba(255,255,255,0.25);
  animation-delay: 0s;
}
/* 识图 — 红底白字 */
.deco-tag-2 {
  top: 45%; right: 6%;
  background: var(--red); color: var(--white);
  border: 2px solid var(--red);
  box-shadow: 4px 4px 0 rgba(255,255,255,0.2);
  animation-delay: 1.3s;
}
/* AI 菜谱 — 白底黑字，保留黑边 */
.deco-tag-3 {
  top: 68%; right: 14%;
  background: var(--white); color: var(--black);
  border: 2px solid var(--white);
  box-shadow: 4px 4px 0 rgba(255,255,255,0.18);
  animation-delay: 0.7s;
}

@keyframes floatTag {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@media (max-width: 860px) {
  .deco-tag { display: none; }
}

/* ─── DOWNLOAD ────────────────────────────────────────────── */
#download {
  padding: 96px 0;
  background: var(--white);
  border-bottom: var(--border);
}

.dl-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 760px) {
  .dl-wrapper { grid-template-columns: 1fr; gap: 40px; }
}

.sec-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 12px;
}
.sec-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.1; margin-bottom: 16px;
}
.sec-body {
  font-size: 14.5px; color: #555; line-height: 1.75;
  margin-bottom: 28px;
}

.dl-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 2px solid var(--black);
  border-left: 2px solid var(--black);
}
.dl-meta-item {
  padding: 12px 14px;
  border-right: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
}
.dl-meta-key {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #999; display: block; margin-bottom: 3px;
}
.dl-meta-val { font-size: 14px; font-weight: 600; color: var(--black); }

/* download card */
.dl-card {
  background: var(--black);
  color: var(--white);
  padding: 36px;
  border: var(--border);
  box-shadow: var(--shadow-lg);
}

.dl-card-top {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
}
.dl-card-icon { font-size: 40px; line-height: 1; }
.dl-card-name {
  font-family: var(--font-head); font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em;
}
.dl-card-version { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 2px; }

.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-size: 15px; font-weight: 700;
  text-decoration: none;
  background: var(--yellow); color: var(--black);
  padding: 14px 20px;
  border: var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: transform var(--t), box-shadow var(--t);
}
.dl-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.dl-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--black); }

.dl-btn-ghost {
  display: block; text-align: center;
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: rgba(255,255,255,0.6);
  padding: 10px 0;
  border: 2px solid rgba(255,255,255,0.2);
  transition: border-color var(--t), color var(--t);
  margin-bottom: 20px;
}
.dl-btn-ghost:hover { border-color: var(--white); color: var(--white); }

.dl-notice {
  font-size: 12px; color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

/* ─── FEATURES ────────────────────────────────────────────── */
#features {
  padding: 96px 0;
  background: var(--bg);
  border-bottom: var(--border);
}

.sec-head {
  margin-bottom: 56px;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: var(--border);
  border-left: var(--border);
}
@media (max-width: 1000px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .feat-grid { grid-template-columns: 1fr; }
}

.feat-card {
  padding: 36px 28px;
  border-right: var(--border);
  border-bottom: var(--border);
  position: relative;
  overflow: hidden;
  transition: transform var(--t);
}
.feat-card:hover { transform: translate(-3px, -3px); z-index: 1; box-shadow: var(--shadow-lg); }

.feat-card-red    { background: var(--red); color: var(--white); }
.feat-card-yellow { background: var(--yellow); color: var(--black); }
.feat-card-white  { background: var(--white); color: var(--black); }
.feat-card-dark   { background: var(--black); color: var(--white); }

.feat-num {
  font-family: var(--font-head);
  font-size: 64px; font-weight: 800; letter-spacing: -0.05em;
  line-height: 1; opacity: 0.12;
  position: absolute; top: 16px; right: 20px;
  pointer-events: none; user-select: none;
}
.feat-num-light { color: var(--white); }

.feat-icon { font-size: 32px; margin-bottom: 16px; }

.feat-title {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.feat-title-light { color: var(--yellow); }

.feat-desc { font-size: 13.5px; line-height: 1.72; opacity: 0.82; }
.feat-desc-light { opacity: 0.72; }

/* ─── TECH STACK ──────────────────────────────────────────── */
#tech {
  padding: 48px 0;
  background: var(--black);
  color: var(--white);
  border-bottom: var(--border);
}

.tech-inner {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}

.tech-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.2em;
  color: rgba(255,255,255,0.35); flex-shrink: 0;
}

.tech-pills {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.tech-pill {
  font-size: 12px; font-weight: 600;
  padding: 5px 12px;
  border: 2px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  transition: border-color var(--t), color var(--t);
}
.tech-pill:hover { border-color: var(--yellow); color: var(--yellow); }

/* ─── FOOTER ──────────────────────────────────────────────── */
#footer {
  padding: 48px 0;
  background: var(--bg);
  border-top: var(--border);
}

.ft-row {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 32px; flex-wrap: wrap;
  margin-bottom: 32px;
}

.ft-logo {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
  margin-bottom: 10px;
}
.ft-copy {
  font-size: 12px; color: #888; line-height: 1.8; max-width: 380px;
}

.ft-links {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
}
.ft-links a {
  font-size: 13px; font-weight: 600; color: var(--black);
  text-decoration: none; border-bottom: 2px solid transparent;
  transition: border-color var(--t);
}
.ft-links a:hover { border-color: var(--red); }

.ft-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  border-top: 2px solid var(--black);
  font-size: 12px; color: #888;
}
.ft-bottom a { color: inherit; text-decoration: underline; }

@media (max-width: 600px) {
  .ft-row { flex-direction: column; }
  .ft-bottom { flex-direction: column; }
}

/* ─── Utility ─────────────────────────────────────────────── */
::selection { background: var(--yellow); color: var(--black); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
