/* ============================================================
   FatTI 找到狡猾的猪腰官网 · 基础样式
   Token 对齐 spec §3.3/§3.4；Hero 具体样式由 T3 实现。
   ============================================================ */

:root {
  --paper: #f7f5f0;
  --ink: #243147;
  --accent: #c81e3a;
  --amber: #e6b422;
  --carbon: #5c6b7a;
  --rule: rgba(36, 49, 71, 0.14);
  --sheet: #ffffff;
  --font-cjk: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: Menlo, "SF Mono", monospace;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-cjk);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* 可见键盘焦点 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 排版基元 ---------- */
h1,
h2,
h3,
h4 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.2rem;
}

p {
  color: var(--ink);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- 容器与节距 ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
}

.section__head {
  margin-bottom: 32px;
}

.section__title {
  font-size: 1.6rem;
}

.section__sub {
  margin-top: 8px;
  color: var(--carbon);
  font-size: 0.95rem;
}

/* ---------- 响应式网格基础（移动端单列，桌面多列） ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 20px;
  background: var(--sheet);
  border-bottom: 1px solid var(--rule);
}

.nav__brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
}

.nav__links a {
  font-size: 0.95rem;
  color: var(--carbon);
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__links a:focus-visible {
  color: var(--ink);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, transform 0.1s ease;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
}

.btn--primary:hover {
  background: #a91731;
}

.btn--ghost {
  border: 1px solid var(--rule);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn:active {
  transform: scale(0.98);
}

/* ---------- 跳转链接（无障碍） ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--sheet);
}

.skip-link:focus {
  left: 0;
}

/* ---------- Footer ---------- */
.footer {
  padding: 48px 20px 40px;
  text-align: center;
  color: var(--carbon);
  font-size: 0.85rem;
  border-top: 1px solid var(--rule);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer__brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.footer__tagline {
  font-size: 0.98rem;
  color: var(--ink);
}

.footer__search {
  padding: 4px 16px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--sheet);
  border: 1px solid var(--rule);
}

.footer__disclaimer {
  max-width: 640px;
  margin: 6px auto 0;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--carbon);
}

.footer__copy {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--carbon);
}

/* ---------- 动效降级（prefers-reduced-motion） ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 56px 0 72px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero__copy {
  animation: hero-rise 0.7s ease both;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--carbon);
  border: 1px solid var(--rule);
  background: var(--sheet);
}

.hero h1 {
  font-size: 2.2rem;
  letter-spacing: 0.01em;
}

.hero__sub {
  max-width: 30em;
  margin-top: 20px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--carbon);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__qr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.hero__qr img {
  width: 96px;
  height: 96px;
  padding: 6px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 8px 18px rgba(36, 49, 71, 0.12);
}

.hero__qr-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--carbon);
}

.hero__shot {
  transform: rotate(1.6deg);
  animation: hero-sticker 0.8s ease both;
}

.hero__shot img {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 12px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 36px rgba(36, 49, 71, 0.16);
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-sticker {
  from {
    opacity: 0;
    transform: rotate(1.6deg) translateY(14px);
  }

  to {
    opacity: 1;
    transform: rotate(1.6deg) translateY(0);
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: calc(100vh - 72px);
    padding: 40px 0 88px;
  }

  .hero__inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .hero__shot {
    justify-self: center;
  }
}

/* ---------- 桌面端细化 ---------- */
@media (min-width: 768px) {
  .nav {
    height: 72px;
    padding: 0 32px;
  }

  .section {
    padding: 88px 0;
  }

  h1 {
    font-size: 2.6rem;
  }

  h2 {
    font-size: 1.9rem;
  }
}

/* ---------- 控卡区（T4） ---------- */
.ration {
  background: repeating-linear-gradient(
    180deg,
    var(--paper) 0,
    var(--paper) 21px,
    rgba(36, 49, 71, 0.05) 21px,
    rgba(36, 49, 71, 0.05) 22px
  );
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 64px;
}

.ration__head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.ration__head h2 {
  font-size: 1.7rem;
}

.ration__note {
  margin-top: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--carbon);
}

/* ---------- 热量颗粒条（Signature） ---------- */
.granule {
  display: flex;
  gap: 5px;
  width: 100%;
  max-width: 480px;
  margin: 28px auto 0;
}

.granule__cell {
  flex: 1;
  height: 14px;
  border-radius: 3px;
  background: #d5dae0;
  opacity: 0;
  transform: scaleY(0.3);
  transform-origin: bottom;
}

.granule--live .granule__cell {
  opacity: 1;
  transform: scaleY(1);
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 40ms);
}

.granule__cell--on {
  background: var(--ink);
}

.granule--over .granule__cell--on {
  background: var(--accent);
}

/* ---------- 功能点 ---------- */
.features {
  display: grid;
  gap: 64px;
  margin-top: 72px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.feature__kicker {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--carbon);
}

.feature h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.feature__desc {
  font-size: 0.98rem;
  line-height: 1.9;
  color: var(--carbon);
}

.feature__shot {
  margin: 0;
}

.feature__shot img {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 14px 28px rgba(36, 49, 71, 0.12);
}

/* 功能点 4：全宽居中独白块，打破 3 连 zigzag */
.feature--monologue {
  display: block;
  padding: 56px 24px 48px;
  text-align: center;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 36px rgba(36, 49, 71, 0.1);
}

.feature--monologue .feature__kicker {
  margin-bottom: 10px;
}

.feature--monologue h3 {
  font-size: 1.5rem;
}

.feature--monologue .granule {
  max-width: 420px;
  margin-top: 30px;
}

.feature__mono {
  margin-top: 18px;
  font-size: 2.5rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.feature--monologue .feature__desc {
  max-width: 34em;
  margin: 14px auto 0;
}

/* 控卡区底部次级链接（指向 #howto，与 Hero 主 CTA 意图区分） */
.ration__more {
  margin-top: 72px;
  text-align: center;
}

.ration__more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ration__more a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* 桌面端：功能点 1/2/5 左文右图，功能点 3 右文左图 */
@media (min-width: 768px) {
  .ration {
    scroll-margin-top: 72px;
  }

  .ration__head h2 {
    font-size: 1.9rem;
  }

  .features {
    gap: 88px;
  }

  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .feature--text-right .feature__shot {
    order: -1;
  }
}

/* ---------- 妖兽区（T5） ---------- */
.beasts {
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 64px;
}

.beasts__head {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
}

.beasts__head h2 {
  font-size: 1.7rem;
}

.beasts__strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -20px;
  padding: 8px 20px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}

.beast-card {
  flex: 0 0 auto;
  width: 44vw;
  max-width: 176px;
  scroll-snap-align: start;
  transition: transform 0.2s ease;
}

.beast-card:hover {
  transform: translateY(-6px);
}

.beast-card img {
  width: 100%;
  aspect-ratio: 9 / 10;
  object-fit: cover;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.beast-card__info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.85rem;
}

.beast-card__name {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beast-card__id {
  flex-shrink: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--carbon);
}

.beasts__cta {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* 桌面端：妖兽区细化 */
@media (min-width: 768px) {
  .beasts {
    scroll-margin-top: 72px;
  }

  .beasts__head h2 {
    font-size: 1.9rem;
  }

  .beast-card {
    width: 176px;
  }
}

/* ---------- 使用步骤（T6） ---------- */
.howto {
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 64px;
}

.howto__head {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
}

.howto__head h2 {
  font-size: 1.7rem;
}

.howto__sub {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--carbon);
}

.howto__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.howto__step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 148px;
  padding: 24px 20px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 12px 24px rgba(36, 49, 71, 0.08);
}

.howto__num {
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.howto__text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink);
}

/* 小程序码（真实图）：白色档案卡底 + 轻边框 */
.howto__qr-box {
  width: 100%;
  max-width: 168px;
  margin: 0 auto;
  padding: 10px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 22px rgba(36, 49, 71, 0.1);
}

.howto__qr-box img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .howto {
    scroll-margin-top: 72px;
  }

  .howto__head h2 {
    font-size: 1.9rem;
  }

  .howto__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* ---------- FAQ（T6） ---------- */
.faq {
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 64px;
}

.faq__head {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: center;
}

.faq__head h2 {
  font-size: 1.7rem;
}

.faq__sub {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--carbon);
}

.faq__list {
  max-width: 720px;
  margin: 0 auto;
}

.faq__item {
  border-top: 1px solid var(--rule);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 4px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: color 0.2s ease;
}

.faq__q:hover {
  color: var(--accent);
}

.faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 2px;
  background: var(--carbon);
  transform: translateY(-50%);
}

.faq__icon::after {
  transform: translateY(-50%) rotate(90deg);
  transition: transform 0.25s ease;
}

.faq__item--open .faq__icon::after {
  transform: translateY(-50%) rotate(0deg);
}

/* 高度动效：grid-template-rows 0fr 到 1fr，免 JS 测量 */
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.faq__a-inner {
  overflow: hidden;
}

.faq__a p {
  padding: 0 4px 18px;
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--carbon);
}

.faq__item--open .faq__a {
  grid-template-rows: 1fr;
}

@media (min-width: 768px) {
  .faq {
    scroll-margin-top: 72px;
  }

  .faq__head h2 {
    font-size: 1.9rem;
  }
}

