/* 小张便签官网 - 纯静态单页样式
 * 主题色与后台管理端保持一致：#FA9C2B -> #E8820C
 */

:root {
  --brand: #fa9c2b;
  --brand-dark: #e8820c;
  --brand-deep: #d9821d;
  --brand-soft: #fff7eb;

  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-400: #94a3b8;

  --line: #eef1f6;
  --bg: #ffffff;
  --bg-muted: #f8fafc;

  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);

  --container: 1120px;
  --nav-height: 68px;

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

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-900);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  color: #fff;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
    color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(250, 156, 43, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(250, 156, 43, 0.4);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}

/* ---------------- 导航 ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink-900);
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
}

.brand-name {
  font-size: 17px;
  letter-spacing: 0.01em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-700);
}

.nav-menu > a:not(.btn) {
  position: relative;
  padding: 6px 0;
  transition: color 0.18s ease;
}

.nav-menu > a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-menu > a:not(.btn):hover {
  color: var(--ink-900);
}

.nav-menu > a:not(.btn):hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0;
  place-items: center;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-900);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 120% at 15% 0%, #1e293b 0%, var(--ink-900) 45%, #0b1120 100%);
  color: #e2e8f0;
  padding: 88px 0 104px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(80% 60% at 30% 20%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 60% at 30% 20%, #000 0%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.hero-desc {
  max-width: 30em;
  font-size: 17px;
  color: #cbd5e1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(250, 156, 43, 0.42);
  background: rgba(250, 156, 43, 0.12);
  color: #fcd9a9;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(250, 156, 43, 0.2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #94a3b8;
}

.hero-points li {
  position: relative;
  padding-left: 20px;
}

.hero-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: rgba(250, 156, 43, 0.18);
  box-shadow: inset 0 0 0 1px rgba(250, 156, 43, 0.5);
}

.hero-points li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--brand);
}

/* 手机示意 */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  z-index: 0;
  width: 320px;
  height: 320px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(250, 156, 43, 0.34) 0%, transparent 68%);
  filter: blur(28px);
  pointer-events: none;
}

.phone {
  position: relative;
  z-index: 1;
  width: 286px;
  padding: 12px;
  border-radius: 38px;
  background: linear-gradient(160deg, #1f2937, #0b1120);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: rotate(-3deg);
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 20px;
  border-radius: 0 0 12px 12px;
  background: #0b1120;
  z-index: 2;
}

.phone-screen {
  border-radius: 28px;
  background: #f8fafc;
  padding: 30px 16px 18px;
  color: var(--ink-900);
}

.phone-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.phone-title {
  font-size: 15px;
  font-weight: 700;
}

.phone-date {
  font-size: 11px;
  color: var(--ink-400);
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12.5px;
}

.todo-check {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  font-size: 10px;
  color: #fff;
}

.todo-item.done .todo-check {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
}

.todo-item.done .todo-text {
  color: var(--ink-400);
  text-decoration: line-through;
}

.phone-card {
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.phone-card-cover {
  height: 84px;
  background: linear-gradient(135deg, #fcd9a9, var(--brand) 55%, #c2620a);
  position: relative;
}

.phone-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.5), transparent 55%);
}

.phone-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
}

.phone-card-body strong {
  font-size: 13px;
}

.phone-card-body span {
  font-size: 11px;
  color: var(--ink-400);
}

/* ---------------- 区块通用 ---------------- */

.section {
  padding: 88px 0;
}

.section-muted {
  background: var(--bg-muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  margin: 12px 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
}

.section-head p {
  color: var(--ink-500);
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------------- 功能卡片 ---------------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #e3e8f0;
  box-shadow: var(--shadow);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  font-size: 17px;
  font-weight: 700;
}

.card p {
  font-size: 14.5px;
  color: var(--ink-500);
}

/* ---------------- 入口卡片 ---------------- */

.entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 24px;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.entry:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 156, 43, 0.5);
  box-shadow: var(--shadow);
}

.entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.entry-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(250, 156, 43, 0.16), rgba(232, 130, 12, 0.16));
  color: var(--brand-deep);
}

.entry-icon svg {
  width: 20px;
  height: 20px;
}

.entry-arrow {
  font-size: 18px;
  color: var(--ink-400);
  transition: transform 0.22s ease, color 0.22s ease;
}

.entry:hover .entry-arrow {
  transform: translateX(4px);
  color: var(--brand-deep);
}

.entry h3 {
  font-size: 17px;
  font-weight: 700;
}

.entry p {
  font-size: 14.5px;
  color: var(--ink-500);
}

.entry-host {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brand-deep);
  word-break: break-all;
}

.entry-button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------------- 关于 ---------------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}

.about h2 {
  margin: 12px 0 18px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}

.about-text {
  margin-bottom: 14px;
  color: var(--ink-500);
}

.about-stats {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.about-stats > div {
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-muted);
}

.about-stats dt {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.2;
}

.about-stats dd {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-500);
}

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

.footer {
  padding: 48px 0 40px;
  background: var(--ink-900);
  color: #94a3b8;
  font-size: 14px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 40px;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand strong {
  display: block;
  font-size: 15px;
  color: #fff;
}

.footer-brand p {
  font-size: 13px;
  color: #64748b;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  justify-content: flex-end;
}

.footer-links a {
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 13px;
  color: #64748b;
}

.footer-meta a {
  transition: color 0.18s ease;
}

.footer-meta a:hover {
  color: var(--brand);
}

/* ---------------- 二维码弹层 ---------------- */

.qr-modal[hidden] {
  display: none;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.qr-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease;
}

.qr-panel {
  position: relative;
  width: min(360px, 100%);
  padding: 30px 26px 24px;
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop-in 0.24s ease;
}

.qr-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-400);
  border-radius: 9px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.qr-close:hover {
  background: var(--bg-muted);
  color: var(--ink-900);
}

.qr-panel h2 {
  font-size: 19px;
  font-weight: 700;
}

.qr-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-500);
}

.qr-frame {
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  margin: 20px auto 0;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-muted);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.qr-frame img[hidden] {
  display: none;
}

.qr-hint {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  font-size: 13.5px;
  color: #a15c07;
}

.qr-hint[hidden] {
  display: none;
}

.qr-tip {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-400);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------- 滚动淡入 ---------------- */

/* 只有 JS 可用时才隐藏等待淡入，避免脚本失效后内容不可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 980px) {
  .hero-inner,
  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .hero-visual {
    order: -1;
  }

  .hero {
    padding: 64px 0 80px;
    text-align: left;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .about-stats > div {
    padding: 16px;
  }

  .about-stats dt {
    font-size: 22px;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
  }

  .nav-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 24px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    display: none;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu > a:not(.btn) {
    padding: 12px 4px;
    border-radius: 8px;
  }

  .nav-menu > a:not(.btn)::after {
    display: none;
  }

  .nav-menu .btn {
    margin-top: 10px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 32px;
    text-align: left;
  }

  .grid-4,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .phone {
    width: 260px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-links {
    justify-content: flex-start;
  }

  .qr-panel {
    padding: 26px 20px 20px;
  }

  .qr-frame {
    width: 190px;
    height: 190px;
  }
}

/* ---------------- 动效可访问性 ---------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
