/* ============================================================
   记事本官网 · 样式表
   设计语言：暖色纸张 + 金黄强调色，简洁自适应
   ============================================================ */

:root {
  --gold: #f6c445;
  --gold-dark: #e0a800;
  --gold-soft: #fff7e0;
  --ink: #2b2b2b;
  --ink-soft: #6b6b6b;
  --paper: #fdfbf5;
  --paper-2: #f5f1e8;
  --line: #ece6d8;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.10);
  --maxw: 1120px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--gold);
  color: #4a3a00;
  box-shadow: 0 8px 20px rgba(246, 196, 69, .35);
}
.btn--primary:hover { background: var(--gold-dark); box-shadow: 0 10px 26px rgba(224, 168, 0, .4); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--gold-soft); }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(253, 251, 245, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .5px;
}
.nav__logo { width: 32px; height: 32px; border-radius: 9px; }
.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.nav__links a { color: var(--ink-soft); transition: color .18s; }
.nav__links a:hover { color: var(--gold-dark); }
.nav__cta { margin-left: 4px; }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px;
  transition: transform .25s, opacity .25s;
  pointer-events: none;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 40px) clamp(40px, 6vw, 72px);
  background:
    radial-gradient(900px 500px at 85% -10%, var(--gold-soft), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.hero__badge {
  display: inline-block;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero__title {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: -1px;
}
.hero__title .hl {
  background: linear-gradient(120deg, var(--gold-dark), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__desc {
  margin: 22px 0 30px;
  font-size: clamp(15px, 2vw, 18px);
  color: var(--ink-soft);
  max-width: 520px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats {
  display: flex;
  gap: 36px;
  list-style: none;
  margin-top: 38px;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 28px; font-weight: 800; color: var(--ink); }
.hero__stats span { font-size: 13px; color: var(--ink-soft); }

/* 手机样机 */
.hero__art { display: flex; justify-content: center; }
.phone {
  width: 260px;
  height: 520px;
  background: #1c1c1e;
  border-radius: 38px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: rotate(-3deg);
}
.phone__notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 22px; background: #1c1c1e; border-radius: 0 0 14px 14px; z-index: 2;
}
.phone__screen {
  width: 100%; height: 100%;
  background: var(--paper);
  border-radius: 28px;
  padding: 38px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.note--title { font-weight: 800; font-size: 20px; color: var(--ink); }
.note--line { height: 10px; background: var(--line); border-radius: 6px; }
.note--line.short { width: 60%; }
.note--card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow);
}
.note--card .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
}

/* ---------- 通用区块 ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 40px);
}
.section--alt {
  max-width: none;
  background: var(--paper-2);
}
.section--alt > * { width: 100%; max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; margin-bottom: 48px; }
.section__head h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.5px;
}
.section__head p { color: var(--ink-soft); margin-top: 12px; font-size: 16px; }

/* ---------- 功能卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 100%;
  justify-items: stretch;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-dark);
  background: var(--gold-soft);
  border-radius: 14px;
  margin-bottom: 16px;
}
.card__icon svg, .dl__icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 14.5px; }

/* ---------- 下载卡片 ---------- */
.downloads {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  width: 100%;
  justify-items: stretch;
}
.dl {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.dl__head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.dl__icon {
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-dark); background: var(--gold-soft); border-radius: 14px;
  flex-shrink: 0;
}
.dl__head h3 { font-size: 20px; }
.dl__meta { font-size: 13px; color: var(--ink-soft); }
.dl__desc { color: var(--ink-soft); font-size: 14.5px; flex: 1; margin-bottom: 18px; }
.dl__row { display: flex; gap: 12px; }
.dl__row .btn { flex: 1; }
.downloads__hint {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 28px;
}
.downloads__hint code {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
}

/* ---------- 网页版 ---------- */
.web {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.web__text h2 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; }
.web__text p { color: var(--ink-soft); margin: 16px 0 20px; font-size: 16px; }
.web__list { list-style: none; margin-bottom: 26px; display: flex; flex-direction: column; gap: 10px; }
.web__list li { color: var(--ink); font-size: 15px; display: flex; align-items: center; gap: 10px; }
.web__list .check { color: var(--gold-dark); display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; }
.web__list .check svg { width: 100%; height: 100%; }
.web__card { display: flex; justify-content: center; }
.web__window {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.web__bar {
  height: 38px;
  background: var(--paper-2);
  display: flex; align-items: center; gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.web__bar span { width: 11px; height: 11px; border-radius: 50%; background: #d9d2c2; }
.web__bar span:nth-child(1) { background: #ffb3a1; }
.web__bar span:nth-child(2) { background: #ffe08a; }
.web__bar span:nth-child(3) { background: #a8e6a3; }
.web__body { display: flex; height: 240px; }
.web__side { width: 34%; background: var(--paper-2); border-right: 1px solid var(--line); }
.web__main { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.web__line { height: 12px; background: var(--line); border-radius: 6px; }
.web__line.w70 { width: 70%; }
.web__line.w90 { width: 90%; }
.web__line.w60 { width: 60%; }
.web__line.w80 { width: 80%; }

/* ---------- 常见问题 ---------- */
.faq { display: flex; flex-direction: column; gap: 14px; }
.faq__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 22px;
  box-shadow: var(--shadow);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  outline: none;
}
.faq__item summary:focus-visible {
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--gold);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--gold-dark);
  transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { color: var(--ink-soft); padding: 0 0 18px; font-size: 14.5px; }

/* ---------- 页脚 ---------- */
.footer {
  background: #232220;
  color: #cfc9bd;
  padding: 48px clamp(16px, 4vw, 40px) 28px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer__brand strong { color: #fff; font-size: 18px; display: block; }
.footer__brand p { font-size: 13px; }
.footer__nav { display: flex; gap: 22px; font-size: 14px; }
.footer__nav a { color: #cfc9bd; transition: color .18s; }
.footer__nav a:hover { color: var(--gold); }
.footer__copy {
  max-width: var(--maxw);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  text-align: center;
  color: #8d887e;
}

/* ---------- 软件介绍 导航下拉 ---------- */
.nav__dropdown { position: relative; }
.nav__dropdown-btn {
  background: none; border: none; cursor: pointer; font: inherit;
  color: var(--ink-soft); font-weight: 500; font-size: 15px;
  display: flex; align-items: center; gap: 4px; padding: 0;
  transition: color .18s;
}
.nav__dropdown-btn:hover,
.nav__dropdown:hover .nav__dropdown-btn { color: var(--gold-dark); }
.nav__dropdown-btn .caret { font-size: 11px; transition: transform .2s; }
.nav__dropdown.open .nav__dropdown-btn .caret { transform: rotate(180deg); }
.nav__dropdown-panel {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px; display: flex; flex-direction: column;
  min-width: 184px; opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease; z-index: 120;
}
.nav__dropdown:hover .nav__dropdown-panel,
.nav__dropdown.open .nav__dropdown-panel { opacity: 1; visibility: visible; }
.nav__dropdown-panel a {
  padding: 10px 14px; border-radius: 9px; color: var(--ink);
  font-size: 14.5px; white-space: nowrap; transition: background .15s, color .15s;
}
.nav__dropdown-panel a:hover { background: var(--gold-soft); color: var(--gold-dark); }

/* ---------- 软件介绍 区块 ---------- */
.intro { display: grid; grid-template-columns: 232px 1fr; gap: 40px; align-items: start; }
.intro__menu {
  position: sticky; top: 90px;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.intro__menu a {
  padding: 12px 14px; border-radius: 10px; color: var(--ink);
  font-weight: 600; font-size: 15px; transition: background .15s, color .15s;
}
.intro__menu a:hover, .intro__menu a.active { background: var(--gold-soft); color: var(--gold-dark); }
.intro__body { display: flex; flex-direction: column; gap: 22px; }
.intro__chapter {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px;
  box-shadow: var(--shadow); scroll-margin-top: 92px;
}
.intro__chapter h3 {
  font-size: 22px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.intro__chapter h3 .num {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px;
  background: var(--gold-soft); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.intro__chapter p { color: var(--ink-soft); font-size: 15px; margin-bottom: 10px; }
.intro__chapter p:last-child { margin-bottom: 0; }

/* ============================================================
   响应式：平板与手机
   断点 600px（窄屏 / 手机），601–1024px（平板）
   ============================================================ */

/* 平板：单列或两列自适应收缩 */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__art { order: -1; }
  .phone { transform: rotate(0); width: 230px; height: 460px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .web { grid-template-columns: 1fr; gap: 32px; }
  .web__card { order: -1; }
}

/* 手机：纯窄屏布局 */
@media (max-width: 600px) {
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(253, 251, 245, .99);
    backdrop-filter: blur(12px);
    border-radius: 0 0 16px 16px;
    border-bottom: 1px solid var(--line);
    padding: 6px 0 12px;
    margin-left: 0;
    margin-right: 0;
    transform: translateY(-150%);
    transition: transform .28s ease, opacity .28s ease;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    z-index: 110;
    opacity: 0;
  }
  .nav__links.open { transform: translateY(0); opacity: 1; }
  .nav__links a { padding: 14px clamp(16px, 4vw, 40px); }
  .nav__links a:hover { background: var(--gold-soft); }
  .nav__cta { display: none; }
  .nav__toggle { display: flex; }

  /* 移动端：三条线弹窗作为顶部栏正下方的一级下拉面板 */
  .nav__dropdown { width: 100%; }
  .nav__dropdown-btn {
    width: 100%; justify-content: space-between;
    padding: 14px clamp(16px, 4vw, 40px); color: var(--ink-soft);
    border-radius: 0;
  }
  .nav__dropdown-panel {
    position: static; transform: none; left: auto; min-width: auto;
    box-shadow: none; border: none; background: var(--paper-2);
    border-radius: 0; opacity: 1; visibility: visible;
    display: none; padding: 0;
  }
  .nav__dropdown.open .nav__dropdown-panel { display: flex; }
  .nav__dropdown-panel a { padding: 12px clamp(16px, 4vw, 40px) 12px 48px; }

  .intro { grid-template-columns: 1fr; gap: 22px; }
  .intro__menu { position: static; flex-direction: row; flex-wrap: wrap; }
  .intro__menu a { flex: 1 1 auto; text-align: center; }

  .hero__stats { gap: 24px; }
  .hero__stats strong { font-size: 22px; }

  .grid { grid-template-columns: 1fr; }
  .downloads { grid-template-columns: 1fr; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__nav { flex-wrap: wrap; }
}

/* 减少动画偏好：关闭过渡和动画 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* 桌面大屏时隐藏移动菜单按钮 */
@media (min-width: 601px) {
  .nav__toggle { display: none; }
  .nav__cta { display: inline-flex; }
}
