/* ==========================================================
 * MFStudio 官网样式
 * 配色取自 logo：暖黄、橙、红领巾红、手柄的深蓝紫、奶白底，深墨色粗描边。
 * 形状规则（全站统一）：
 *   - 卡片 / 图片：圆角 22px + 3px 墨色描边 + 向右下的实心投影（贴纸感）
 *   - 按钮 / 小标签：胶囊形（全圆角），同样的描边和实心投影
 * 字体：只用系统字体栈，不依赖任何在线字体。
 * ========================================================== */

:root {
  --cream: #FFF6E6;        /* 页面底色：奶白 */
  --paper: #FFFDF8;        /* 卡片底色 */
  --ink: #2A2140;          /* 正文与描边：带一点紫的深墨色 */
  --ink-soft: #4E4566;     /* 次要文字 */
  --yellow: #FFC93C;       /* logo 字的暖黄 */
  --orange: #F28A2E;       /* 小猫的橘色 */
  --red: #D8432F;          /* 红领巾 */
  --navy: #3D3A86;         /* 手柄的深蓝紫 */
  --navy-deep: #2B2865;
  --line: #2A2140;         /* 描边色 */
  --shadow: #2A2140;       /* 实心投影色 */
  --surface: var(--paper);
  --bg: var(--cream);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --radius: 22px;
  --border: 3px solid var(--line);
  --lift: 5px 5px 0 var(--shadow);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB",
          "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC",
          "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* 深色模式：底色换成手柄的深蓝紫，彩色卡片保持原色 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F1B36;
    --surface: #2C2750;
    --text: #FFF3DC;
    --muted: #D9D0E8;
    --line: #0F0C1E;
    --shadow: #0F0C1E;
  }
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  /* 很淡的波点纹理，呼应手作感 */
  background-image: radial-gradient(color-mix(in srgb, var(--text) 7%, transparent) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
.work__tagline, .note, .tile p { text-wrap: pretty; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  background: var(--yellow); color: var(--ink); padding: 8px 16px;
  border: var(--border); border-radius: 999px; font-weight: 700;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px dashed var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 26px;
  font-size: 17px; font-weight: 800; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
  border: var(--border); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }
.btn--primary { background: var(--yellow); color: var(--ink); }
.btn--ghost { background: var(--surface); color: var(--text); }
.btn--lg { min-height: 58px; padding: 12px 34px; font-size: 19px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 21px; text-decoration: none; letter-spacing: 0.01em;
}
.nav__brand img { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: #fff; }
.nav__links { display: flex; gap: 6px; }
.nav__links a {
  display: block; padding: 6px 14px; border-radius: 999px;
  font-weight: 700; text-decoration: none;
  transition: background-color 0.2s var(--ease);
}
.nav__links a:hover { background: var(--yellow); color: var(--ink); }

/* ---------- 首屏 ---------- */
.hero { padding: 72px 0 72px; overflow-x: clip; }
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  align-items: center; gap: 48px;
}
.hero__brand {
  display: inline-block; margin-bottom: 18px; padding: 4px 16px;
  background: var(--red); color: #FFF8EE; font-weight: 800; font-size: 16px;
  border: var(--border); border-radius: 999px; transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--shadow);
}
.hero__title {
  font-size: clamp(38px, 5.4vw, 66px); font-weight: 900; letter-spacing: -0.01em;
  line-height: 1.18;
}
.hl {
  /* 黄色马克笔划过的效果 */
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding: 0 4px; margin: 0 -2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  white-space: nowrap; /* 高亮词不拆行 */
}
@media (prefers-color-scheme: dark) {
  .hl { background: linear-gradient(transparent 58%, var(--orange) 58%, var(--orange) 92%, transparent 92%); }
  .about { background: color-mix(in srgb, var(--navy) 45%, var(--bg)) !important; }
}
.hero__sub { margin-top: 22px; max-width: 30em; font-size: 19px; color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__art { position: relative; justify-self: center; width: min(100%, 460px); aspect-ratio: 1; }
.hero__blob {
  /* 放射状的光芒背景，慢慢转动 */
  position: absolute; inset: -6%;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--yellow) 0deg 12deg, #FFE08A 12deg 24deg);
  border: var(--border);
  opacity: 0.9;
}
.hero__logo {
  position: relative; width: 78%; margin: 11% auto 0;
  background: #fff; border: var(--border); border-radius: 18%;
  box-shadow: 7px 7px 0 var(--shadow);
  transform: rotate(-3deg);
}
.hero__star { position: absolute; fill: var(--orange); stroke: var(--line); stroke-width: 1.6; stroke-linejoin: round; }
.hero__star--a { width: 54px; top: 2%; right: 2%; }
.hero__star--b { width: 36px; bottom: 6%; left: 0; fill: var(--red); }

/* ---------- 通用标题 ---------- */
.section-title { font-size: clamp(30px, 4vw, 46px); font-weight: 900; letter-spacing: -0.01em; }

/* ---------- 代表作 ---------- */
.work { padding: 32px 0 96px; }
.work__banner {
  margin: 0; overflow: hidden;
  border: var(--border); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--shadow);
  background: #EADBC4;
}
.work__banner img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.work__intro {
  display: grid; grid-template-columns: auto 1fr; column-gap: 40px; row-gap: 20px;
  align-items: center; margin: 48px 0 56px;
}
.work__head { display: flex; align-items: center; gap: 20px; grid-column: 1 / -1; }
.work__icon {
  width: 96px; height: 96px; flex: none;
  border: var(--border); border-radius: 24px; box-shadow: 4px 4px 0 var(--shadow);
}
.work__tagline { margin-top: 4px; font-size: 19px; font-weight: 700; color: var(--orange); }
@media (prefers-color-scheme: light) { .work__tagline { color: #B4520F; } }
.work__lead { grid-column: 1 / 2; max-width: 34em; font-size: 18px; }
.work__cta { grid-column: 2 / 3; justify-self: end; }

/* 玩法亮点拼贴格 */
.bento {
  display: grid; gap: 22px;
  grid-template-columns: repeat(6, 1fr);
  grid-template-areas:
    "steps steps steps steps stars stars"
    "reg   reg   reg   reg   gear  gear"
    "reg   reg   reg   reg   learn learn"
    "modes modes modes modes modes modes";
}
.tile {
  position: relative; overflow: hidden;
  padding: 28px; border: var(--border); border-radius: var(--radius);
  box-shadow: var(--lift); background: var(--surface); color: var(--text);
}
.tile h3 { font-size: 23px; font-weight: 900; margin-bottom: 10px; }
.tile p + p { margin-top: 6px; }
.tile--steps { grid-area: steps; background: var(--yellow); color: var(--ink); }
.tile--stars { grid-area: stars; background: var(--navy); color: #FFF4DE; }
.tile.tile--regulars { grid-area: reg; padding: 0; display: flex; flex-direction: column; }
.tile--gear { grid-area: gear; }
.tile--learn { grid-area: learn; background: #FFD9B0; color: var(--ink); }
.tile--modes { grid-area: modes; background: var(--red); color: #FFF6EA; }

.steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; counter-reset: s; }
.steps li {
  counter-increment: s;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px 6px 8px; background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; font-weight: 800;
}
.steps li::before {
  content: counter(s);
  display: grid; place-items: center; width: 26px; height: 26px;
  background: var(--orange); color: #fff; border-radius: 50%; font-size: 14px;
}

.tile__big {
  display: flex; align-items: center; gap: 8px;
  font-size: 64px; font-weight: 900; line-height: 1; margin-bottom: 16px;
  color: var(--yellow); letter-spacing: 0.02em;
}
.tile__big svg { width: 56px; fill: var(--yellow); stroke: var(--line); stroke-width: 1.4; }

.tile--regulars img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: var(--border); }
.tile__body { padding: 22px 28px 26px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips li {
  padding: 4px 14px; border: 2px solid var(--line); border-radius: 999px;
  background: var(--bg); font-weight: 700; font-size: 15px;
}
.tile--modes { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px 48px; }
.tile--modes h3 { margin: 0 12px 0 0; }
.tile.tile--modes p { margin: 0; }
.tile--modes b {
  display: inline-block; margin-right: 8px; padding: 0 10px;
  background: #FFF6EA; color: var(--red); border-radius: 999px; font-size: 15px;
}

/* 截图横向滑动条 */
.shots { margin-top: 88px; }
.shots__title { font-size: clamp(24px, 3vw, 32px); font-weight: 900; margin-bottom: 26px; }
.shots__track {
  display: flex; gap: 22px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  /* 左右留白与正文对齐；scroll-padding 必须同值，否则吸附会把首张图拉到边上 */
  --gutter: max(24px, calc((100% - 1180px) / 2 + 24px));
  padding: 6px var(--gutter) 26px; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin; scrollbar-color: var(--orange) transparent;
}
.shots__track li { flex: 0 0 210px; scroll-snap-align: start; text-align: center; }
.shots__track img {
  width: 100%; aspect-ratio: 540 / 1039; object-fit: cover; object-position: top;
  border: var(--border); border-radius: var(--radius); box-shadow: var(--lift);
  background: #F1E4CF;
}
.shots__track span {
  display: inline-block; margin-top: 14px; padding: 2px 14px;
  font-weight: 800; background: var(--surface); border: 2px solid var(--line); border-radius: 999px;
}

/* ---------- 关于 ---------- */
.about { padding: 96px 0; background: color-mix(in srgb, var(--yellow) 22%, var(--bg)); border-block: 3px solid var(--line); }
.about__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.about__text p { margin-top: 18px; max-width: 34em; }
.about__text .section-title + p { margin-top: 24px; }

.notes {
  padding: 30px; background: var(--surface);
  border: var(--border); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--shadow);
}
.notes h3 { font-size: 21px; font-weight: 900; margin-bottom: 22px; }
.notes ul { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.note {
  padding: 16px 16px 18px; min-height: 104px;
  font-weight: 800; line-height: 1.5; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px 6px 18px 6px;
  box-shadow: 3px 3px 0 var(--shadow);
}
.note--y { background: var(--yellow); transform: rotate(-2deg); }
.note--o { background: #FFC08A; transform: rotate(1.5deg); }
.note--b { background: #C9C6F2; transform: rotate(1deg); }
.note--r { background: #FFB4A6; transform: rotate(-1.5deg); }
.notes__foot { margin-top: 22px; color: var(--muted); font-size: 15px; }

/* ---------- 联系 ---------- */
.contact { padding: 96px 0 72px; }
.contact__card {
  display: flex; align-items: center; gap: 36px;
  padding: 40px 44px; background: var(--navy); color: #FFF4DE;
  border: var(--border); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--shadow);
}
.contact__card img { width: 120px; height: 120px; flex: none; background: #fff; border: var(--border); border-radius: 28px; transform: rotate(4deg); }
.contact__card p { margin: 10px 0 24px; color: #E9E3FA; }
.contact__card .btn { white-space: normal; word-break: break-all; }

/* ---------- 页脚 ---------- */
.footer { padding: 34px 0 44px; border-top: 3px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer__brand img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__links a { font-weight: 700; text-underline-offset: 4px; }
.footer__links a:hover { color: var(--orange); }
.footer__copy { color: var(--muted); font-size: 15px; }

/* ---------- 动效（仅在用户未要求减少动态效果时启用） ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* 首屏依次入场 */
  .hero__text > * { animation: rise 0.8s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: 0.08s; }
  .hero__text > :nth-child(3) { animation-delay: 0.16s; }
  .hero__text > :nth-child(4) { animation-delay: 0.24s; }
  .hero__logo { animation: pop 0.9s 0.15s var(--ease) both, bob 4.5s 1.1s ease-in-out infinite; }
  .hero__blob { animation: spin 60s linear infinite; }
  .hero__star { animation: twinkle 2.6s ease-in-out infinite; }
  .hero__star--b { animation-delay: 1.3s; }

  /* 滚动出现（js 加上 .js-reveal 后才生效，没 js 时内容照常显示） */
  .js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js-reveal .reveal.is-in { opacity: 1; transform: none; }
  .bento .tile:nth-child(2) { transition-delay: 0.06s; }
  .bento .tile:nth-child(4) { transition-delay: 0.06s; }
  .bento .tile:nth-child(6) { transition-delay: 0.06s; }

  .tile, .shots__track img { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.7s var(--ease); }
  .tile:hover { transform: translate(-2px, -3px) rotate(-0.4deg); box-shadow: 8px 8px 0 var(--shadow); }
  .shots__track li:hover img { transform: translateY(-6px) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: rotate(-12deg) scale(0.8); } to { opacity: 1; transform: rotate(-3deg) scale(1); } }
@keyframes bob { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-1deg) translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(14deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero { padding: 40px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .hero__art { width: min(78vw, 380px); order: -1; }
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "steps steps"
      "stars gear"
      "reg   reg"
      "learn modes";
  }
  .tile--modes { grid-template-columns: 1fr; gap: 6px; }
  .tile--modes h3 { margin-bottom: 6px; }
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav__inner { height: 60px; }
  .nav__brand { font-size: 18px; }
  .nav__brand img { width: 38px; height: 38px; }
  .nav__links { gap: 0; }
  .nav__links a { padding: 6px 10px; }
  .hero { padding: 28px 0 56px; }
  .hero__art { width: min(72vw, 300px); }
  .hero__title { font-size: clamp(32px, 9vw, 40px); }
  .hero__sub { font-size: 17px; margin-top: 16px; }
  .hero__cta { margin-top: 26px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .work { padding-bottom: 72px; }
  .work__banner { box-shadow: 5px 5px 0 var(--shadow); border-radius: 18px; }
  .work__intro { grid-template-columns: 1fr; margin: 36px 0 40px; }
  .work__lead, .work__cta { grid-column: 1; justify-self: stretch; }
  .work__cta .btn { width: 100%; }
  .work__icon { width: 76px; height: 76px; border-radius: 20px; }
  .bento {
    grid-template-columns: 1fr; gap: 18px;
    grid-template-areas: "steps" "stars" "reg" "gear" "learn" "modes";
  }
  .tile { padding: 22px; }
  .tile__body { padding: 18px 22px 22px; }
  .tile__big { font-size: 52px; }
  .shots { margin-top: 64px; }
  .shots__track { gap: 16px; --gutter: 16px; }
  .shots__track li { flex-basis: 158px; }
  .about { padding: 72px 0; }
  .notes { padding: 22px; }
  .notes ul { gap: 12px; }
  .note { min-height: 92px; font-size: 15px; padding: 12px; }
  .contact { padding: 72px 0 56px; }
  .contact__card { flex-direction: column; align-items: flex-start; gap: 22px; padding: 28px 22px; }
  .contact__card img { width: 88px; height: 88px; border-radius: 22px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
