/* ==========================================================================
   塔塔EV充电助手 · 站点样式（纯 CSS，无外链）
   配色沿用 App 的「03 高对比安全」主题 token，只做静态页需要的部分。
   ========================================================================== */

:root {
  /* 颜色 */
  --c-bg:         #FFFFFF;
  --c-surface:    #F3F6F0;
  --c-line:       #DDE3D8;
  --c-line-soft:  #E9EDE4;
  --c-ink:        #0E0F0C;
  --c-sub:        #4B5245;
  --c-brand:      #163300;
  --c-brand-soft: #E9EFE3;
  --c-accent:     #9FE870;
  --c-accent-bg:  #E4F7D3;

  /* 字体（只用系统字体，不加载外部字体） */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
               "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* 尺寸 */
  --wrap: 1120px;
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* --- 基础 ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

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

/* 顶部淡淡的点阵背景，越往下越淡 */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  background-image: radial-gradient(var(--c-line) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
          mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
  z-index: 0;
}

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

a { color: inherit; }

::selection {
  background: var(--c-accent);
  color: var(--c-brand);
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .wrap { padding: 0 40px; }
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip:focus { left: 0; }

/* --- 顶栏 ---------------------------------------------------------------- */

.topbar {
  border-bottom: 1px solid var(--c-line-soft);
  position: relative;
  z-index: 2;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark { width: 32px; height: 32px; }

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-sub);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .tag { font-size: 10px; padding: 4px 9px; }
}

/* 极窄屏（320px 左右）留给品牌名，标签收起 */
@media (max-width: 380px) {
  .tag { display: none; }
}

/* --- 首屏 ---------------------------------------------------------------- */

.hero {
  padding: clamp(44px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  position: relative;
}

/* 右上角的一层很淡的绿色光晕 */
.hero::before {
  content: "";
  position: absolute;
  inset: -80px 0 auto 0;
  height: 560px;
  background: radial-gradient(60% 62% at 82% 8%, rgba(159, 232, 112, 0.22), transparent 72%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: 56px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--c-sub);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(159, 232, 112, 0.22);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5.4vw, 3.25rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 16px 0 0;
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  line-height: 1.6;
  font-weight: 500;
  color: var(--c-ink);
  border-left: 3px solid var(--c-accent);
  padding-left: 14px;
}

.lead {
  margin: 20px 0 0;
  max-width: 42em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-sub);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 26px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--c-sub);
}

.meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--c-line);
}

/* 标志：一圈细虚线 + 一颗绿点，像设备上的刻度 */
.hero-mark {
  margin: 0;
  justify-self: start;
  order: -1;
  width: 88px;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #fff, var(--c-surface) 72%);
}

.hero-mark img { width: 66%; }

.hero-mark::before {
  content: "";
  position: absolute;
  inset: calc(-1 * clamp(9px, 2vw, 14px));
  border: 1px dashed var(--c-line);
  border-radius: 50%;
}

.hero-mark::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 14%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-accent);
}

@media (min-width: 900px) {
  .hero-mark {
    justify-self: end;
    order: 0;
    width: clamp(190px, 22vw, 264px);
    margin-right: 8px;
  }
}

/* --- 说明 ---------------------------------------------------------------- */

.notes {
  padding: clamp(8px, 2vw, 16px) 0 clamp(56px, 8vw, 96px);
}

.notes-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .notes-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }
  .notes-head { position: sticky; top: 32px; }
}

.notes-head h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--c-sub);
}

.notes-head h2::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--c-accent);
}

.notes-head p {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--c-sub);
}

.rows { margin: 0; }

.row {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-top: 1px solid var(--c-line);
}

.row:last-child { border-bottom: 1px solid var(--c-line); }

.row dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--c-sub);
}

.row dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}

@media (min-width: 640px) {
  .row {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
    padding: 20px 0;
  }
}

/* --- 使用方式 ------------------------------------------------------------ */

.open { padding: 0 0 clamp(48px, 7vw, 80px); }

.open-box {
  background: var(--c-accent-bg);
  border-radius: 16px;
  padding: clamp(24px, 4vw, 40px);
  position: relative;
  overflow: hidden;
}

.open-box::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(22, 51, 0, 0.12);
}

@media (max-width: 520px) {
  .open-box::after { display: none; }
}

.open-k {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #3C5A22;
}

.open-t {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.65;
  color: var(--c-brand);
  max-width: 34em;
}

.open-t strong { font-weight: 600; }

.open-s {
  margin: 14px 0 0;
  font-size: 13px;
  color: #46603A;
}

/* --- 页脚 / 备案 --------------------------------------------------------- */

.site-footer {
  background: var(--c-brand);
  color: var(--c-brand-soft);
  padding: clamp(40px, 6vw, 64px) 0 24px;
}

.footer-top {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 48px;
    align-items: start;
  }
}

.footer-name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.footer-desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.legal-title {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
}

.legal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  line-height: 1.5;
}

.legal-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 1px 5px;
}

.legal-list a {
  color: #F1F6EB;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(159, 232, 112, 0.45);
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}

.legal-list a:hover,
.legal-list a:focus-visible {
  color: var(--c-accent);
  text-decoration-color: var(--c-accent);
}

/* 公安备案图标：官方图标为深色，垫一层白底保证在深绿页脚上看得清 */
.beian-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  padding: 3px;
  background: #fff;
  border-radius: 50%;
  box-sizing: content-box;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom p { margin: 0; }

@media (max-width: 639px) {
  .footer-bottom { flex-direction: column; gap: 4px; }
}

/* --- 首屏入场（只做一次，克制）------------------------------------------ */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.hero-copy > * {
  animation: rise 640ms var(--ease) both;
}
.hero-copy > *:nth-child(1) { animation-delay: 40ms; }
.hero-copy > *:nth-child(2) { animation-delay: 110ms; }
.hero-copy > *:nth-child(3) { animation-delay: 180ms; }
.hero-copy > *:nth-child(4) { animation-delay: 250ms; }
.hero-copy > *:nth-child(5) { animation-delay: 320ms; }

.hero-mark { animation: rise 760ms var(--ease) 180ms both; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --- 打印 ---------------------------------------------------------------- */

@media print {
  body::before,
  .hero::before,
  .hero-mark::before,
  .hero-mark::after,
  .open-box::after { display: none; }
  .site-footer { background: #fff; color: #000; }
  .legal-list a { color: #000; }
}
