/* DIYDRINK 官网样式
 *
 * 配色直接取自 App（lib/main.dart + bartend_page.dart），改这里之前先对一眼：
 *   --bg      #0B0E13   App 的 scaffoldBackgroundColor
 *   --surface #151A22   App 的 cardColor
 *   --accent  #4BED91   App 主色（顶部渐变条 / 底栏选中 / 按钮）
 *   --cyan    #00E5FF   调酒完成态的青色
 * 网站和 App 是一套视觉，别在这里引进新色。
 *
 * 没有任何构建步骤：这个文件就是最终产物，改完直接传服务器。
 */

:root {
  --bg: #0b0e13;
  --surface: #151a22;
  --surface-2: #1c232d;
  --border: #232b36;

  --accent: #4bed91;
  --cyan: #00e5ff;

  --text: #ffffff;
  --muted: #98a4b3;
  --muted-2: #6b7686;

  --maxw: 1120px;
  --radius: 14px;

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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 锚点跳转时给固定导航栏留出高度，否则标题会被压在导航栏底下 */
  scroll-padding-top: 88px;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- 布局 ---------- */

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

.narrow {
  max-width: 800px;
}

section {
  padding: 88px 0;
}

/* ---------- 顶部导航 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand svg {
  width: 30px;
  height: 28px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 15px;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* 语言切换：两个字母并排，当前语言高亮 */
.lang {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] {
  background: var(--accent);
  color: #0b0e13;
}

/* 手机上导航链接会挤，只留品牌 + 语言切换 */
@media (max-width: 720px) {
  .nav-links a {
    display: none;
  }
  .nav-links {
    margin-left: auto;
  }
}

/* ---------- 首页 Hero ---------- */

.hero {
  padding: 96px 0 72px;
  text-align: center;
  /* 顶部一层极淡的绿光，让深色页面不至于死板 */
  background: radial-gradient(
    ellipse 900px 420px at 50% -10%,
    rgba(75, 237, 145, 0.13),
    transparent 70%
  );
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.03em;
}

.hero p.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-shot {
  margin: 48px auto 0;
  /* 素材是张黑底产品图（底色 #000，页面是 #0B0E13），直接放上去会看到一个
     比页面更黑的黑方块。screen 混合让黑变成透明，机器自带的光晕保留下来 */
  mix-blend-mode: screen;
  max-width: 420px;
}

.actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 4px; /* 和 App 里的 rect 4dp 一致 */
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0b0e13;
}
.btn-primary:hover {
  filter: brightness(1.08);
}

/* 未上架时的置灰态：不可点，也不做成死链 */
.btn-disabled {
  background: var(--surface-2);
  color: var(--muted-2);
  border-color: var(--border);
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
}

/* ---------- 卡片 / 特性 ---------- */

.grid {
  display: grid;
  gap: 20px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 860px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* 图标用内联 SVG，不用 emoji —— emoji 在 Windows / Android / iOS / Linux
   上长得完全不一样，有的还会掉成黑白字形或豆腐块，官网不该赌这个 */
.card .ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(75, 237, 145, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card .ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h2.section-title {
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-align: center;
}

p.section-sub {
  color: var(--muted);
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

/* ---------- 步骤 ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  position: relative;
  padding-left: 60px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 {
  margin: 8px 0 6px;
  font-size: 16px;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- 下载区 ---------- */

.download {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 32px;
}

.badge-soon {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
}

/* ---------- 页脚 ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.foot-col h4 {
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.foot-col a {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}
.foot-col a:hover {
  color: var(--accent);
  text-decoration: none;
}

.foot-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 13px;
}

/* ---------- 法律/长文页面 ---------- */

.page-head {
  padding: 64px 0 8px;
}

.page-head h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.page-head .meta {
  color: var(--muted-2);
  font-size: 14px;
}

.doc {
  padding: 32px 0 96px;
}

.doc h2 {
  font-size: 21px;
  margin: 44px 0 12px;
  padding-top: 4px;
  letter-spacing: -0.01em;
}

.doc h2:first-child {
  margin-top: 0;
}

.doc h3 {
  font-size: 17px;
  margin: 28px 0 8px;
}

.doc p,
.doc li {
  color: var(--muted);
}

.doc strong {
  color: var(--text);
}

/* 提示框：用来标 TODO / 需要用户替换的占位符 */
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
}
.note p:last-child {
  margin-bottom: 0;
}
.note p:first-child {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
}
td {
  color: var(--muted);
}

code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 需要用户部署前替换的占位符，在页面上直接标黄，免得漏掉 */
.todo {
  background: rgba(255, 196, 0, 0.16);
  color: #ffc400;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
