:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #121212;
  --muted: #6d6d68;
  --line: #ddddda;
  --soft: #efefec;
  --accent: #2a55d6;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button { font: inherit; }
.shell { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }

/* 顶部导航常驻置顶，滚动浏览案例时始终保留返回路径与项目名称。 */
.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); background: rgba(247,247,245,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.site-nav { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.back-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--text); }
.nav-title { position: absolute; left: 50%; margin: 0; font-size: 15px; font-weight: 780; line-height: 1.2; letter-spacing: -.025em; text-align: center; white-space: nowrap; transform: translateX(-50%); }
.nav-title span { display: block; margin-top: 4px; color: var(--accent); font-size: 8px; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.identity { justify-self: end; font-size: 13px; font-weight: 760; text-decoration: none; white-space: nowrap; }

/* 主标题移入顶部导航；Hero 只保留居中的项目说明与轻量标签。 */
.hero { padding-block: 76px 82px; text-align: center; }
.hero-lead { max-width: 860px; margin: 0 auto; color: #3f3f3b; font-size: clamp(17px, 2vw, 21px); line-height: 1.65; letter-spacing: -.018em; }
.hero-lead strong { color: var(--text); font-weight: 800; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 30px; }
.tags span { padding-bottom: 3px; border-bottom: 1px solid #bdbdb8; color: var(--muted); font-size: 12px; }
.hero-cta { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; margin-top: 32px; padding: 0 22px; border-radius: 999px; color: #fff; background: var(--text); font-size: 13px; font-weight: 760; text-decoration: none; transition: transform .2s ease, background-color .2s ease; }
.hero-cta span { font-size: 16px; transition: transform .2s ease; }
.hero-cta:hover { background: var(--accent); transform: translateY(-2px); }
.hero-cta:hover span { transform: translateY(2px); }
.hero-cta:focus-visible { outline: 3px solid rgba(42,85,214,.22); outline-offset: 3px; }

/* 三张成果卡片紧随项目说明，和首屏文案共同组成一个完整信息区。 */
.impact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 42px; }
.impact-card { min-height: 250px; padding: 26px 28px 32px; border: 1px solid #dbe3ef; border-radius: 24px; background: var(--surface); box-shadow: 0 8px 28px rgba(48,72,112,.04); text-align: left; }
.impact-card header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.impact-pill { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border-radius: 999px; color: #5c88ed; background: #edf3ff; font-size: 13px; font-weight: 760; }
.impact-help { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid #d7e1f0; border-radius: 50%; color: #70809a; background: #fff; font-size: 16px; font-weight: 760; cursor: help; }
.impact-help::before,
.impact-help::after { position: absolute; z-index: 20; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.impact-help::before { content: ""; top: calc(100% + 5px); right: 10px; width: 10px; height: 10px; background: #202a39; transform: translateY(-4px) rotate(45deg); }
.impact-help::after { content: attr(data-tooltip); top: calc(100% + 10px); right: 0; width: 240px; padding: 13px 15px; border-radius: 11px; color: #fff; background: #202a39; box-shadow: 0 12px 30px rgba(32,42,57,.2); font-size: 12px; font-weight: 540; line-height: 1.6; letter-spacing: 0; text-align: left; transform: translateY(-4px); }
.impact-help:hover::before,
.impact-help:hover::after,
.impact-help:focus-visible::before,
.impact-help:focus-visible::after { opacity: 1; visibility: visible; transform: translateY(0) rotate(45deg); }
.impact-help:hover::after,
.impact-help:focus-visible::after { transform: translateY(0); }
.impact-help:focus-visible { outline: 3px solid rgba(42,85,214,.2); outline-offset: 2px; }
.impact-card-content { margin-top: 34px; }
.impact-label { display: block; color: #66758e; font-size: clamp(16px, 1.65vw, 19px); font-weight: 720; letter-spacing: -.02em; }
.impact-card strong { display: block; margin-top: 20px; color: #202a39; font-size: clamp(56px, 6vw, 78px); font-weight: 760; line-height: .9; letter-spacing: -.06em; }
.impact-card strong small { margin-left: 5px; font-size: .42em; font-weight: 700; letter-spacing: -.025em; }

/* 所有一级标题统一居中，形成更简单直接的案例阅读节奏。 */
.section { padding-block: 104px; border-top: 1px solid var(--line); }
.section-heading { max-width: 820px; margin: 0 auto 58px; text-align: center; }
.section-heading > div { display: block; }
.section-index { display: block; margin-bottom: 18px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.section-heading h2 { margin: 0; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.08; letter-spacing: -.052em; }
.section-heading p { max-width: 670px; margin: 24px auto 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

/* 案例卡采用 Editorial 排版；图片区域是真实截图裁切，而非重画的产品界面。 */
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 68px 34px; }
.case-card { min-width: 0; padding-top: 17px; border-top: 1px solid var(--text); }
.case-meta { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.case-number { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.case-label { max-width: 360px; color: var(--accent); font-size: 11px; font-weight: 720; line-height: 1.5; text-align: right; }
.case-card h3 { margin: 30px 0 0; font-size: clamp(25px, 2.7vw, 35px); letter-spacing: -.042em; }
.case-description { min-height: 68px; margin: 14px 0 25px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.screenshot-button { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid #d9dde5; border-radius: 14px; background: #eef1f6; cursor: zoom-in; }
.screenshot-button img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform .35s ease; }
.screenshot-button:hover img { transform: scale(1.018); }
.case-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 23px 0 0; padding: 0; list-style: none; }
.case-flow li { color: #4f4f4b; font-size: 11px; }
.case-flow li:not(:last-child)::after { content: "→"; margin-left: 8px; color: #aaa9a4; }

.site-footer { display: flex; justify-content: space-between; gap: 24px; padding-block: 34px 46px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer a { text-decoration: none; }

/* Lightbox 使用原始裁切图的大尺寸版本，点击背景或关闭按钮均可退出。 */
.lightbox { width: min(1180px, calc(100% - 36px)); max-width: none; height: min(90vh, 940px); max-height: none; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; color: #fff; background: #111318; box-shadow: 0 30px 100px rgba(0,0,0,.45); }
.lightbox::backdrop { background: rgba(8,10,14,.82); backdrop-filter: blur(6px); }
.lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; padding: 14px 18px 14px 24px; border-bottom: 1px solid rgba(255,255,255,.12); }
.lightbox-toolbar span { display: block; color: #8e929c; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.lightbox-toolbar strong { display: block; margin-top: 5px; font-size: 13px; }
.lightbox-close { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #fff; background: transparent; font-size: 23px; cursor: pointer; }
.lightbox-stage { display: grid; place-items: center; height: calc(100% - 72px); overflow: auto; padding: 24px; }
.lightbox-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }

@media (max-width: 1024px) {
  .hero { padding-block: 74px 70px; }
}

@media (max-width: 768px) {
  .shell { width: min(var(--max), calc(100% - 34px)); }
  .hero { padding-block: 68px 64px; }
  .section { padding-block: 78px; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 44px; }
  .case-grid { grid-template-columns: 1fr; gap: 58px; }
  .case-description { min-height: 0; }
  .impact-grid { grid-template-columns: 1fr; }
  .impact-card { min-height: 220px; }
}

@media (max-width: 560px) {
  .site-nav { min-height: 64px; }
  .site-nav { gap: 8px; }
  .back-link { font-size: 10px; }
  .nav-title { width: 132px; font-size: 11px; white-space: normal; }
  .nav-title span { margin-top: 3px; font-size: 5.5px; letter-spacing: .045em; white-space: nowrap; }
  .identity { max-width: 106px; font-size: 9px; line-height: 1.25; text-align: right; white-space: normal; }
  .identity .portfolio-suffix { display: block; }
  .hero { padding-block: 58px 54px; }
  .hero-lead { font-size: 17px; }
  .hero-cta { width: 100%; max-width: 280px; margin-top: 28px; }
  .impact-grid { margin-top: 36px; }
  .impact-card { min-height: 210px; padding: 22px 24px 26px; border-radius: 20px; }
  .impact-pill { min-height: 34px; padding-inline: 13px; font-size: 12px; }
  .impact-help { width: 30px; height: 30px; font-size: 14px; }
  .impact-card-content { margin-top: 26px; }
  .impact-card strong { margin-top: 16px; font-size: 58px; }
  .section { padding-block: 64px; }
  .section-heading h2 { font-size: 35px; }
  .case-meta { display: block; }
  .case-label { margin-top: 8px; text-align: left; }
  .case-card h3 { margin-top: 24px; font-size: 29px; }
  .screenshot-button { aspect-ratio: 1.3 / 1; }
  .site-footer { flex-direction: column; }
  .lightbox { width: calc(100% - 18px); height: 92vh; border-radius: 14px; }
  .lightbox-stage { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-cta,
  .hero-cta span,
  .impact-help::before,
  .impact-help::after { transition: none; }
  .screenshot-button img { transition: none; }
}
