:root {
  --ink: #d7dde6;
  --text: #c2cad6;
  --muted: #8b95a3;
  --line: rgba(215, 221, 230, 0.12);
  --paper: #1a1f27;
  --paper-2: #222833;
  --surface: #252b36;
  --accent: #6faba3;
  --accent-soft: rgba(111, 171, 163, 0.14);
  --header-h: 52px;
  --footer-h: 32px;
  --controls-h: 48px;
  --max: 1180px;
  --font-display: "Fraunces", "Noto Sans SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
  padding: 0 20px;
  background: rgba(26, 31, 39, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-btn {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
}

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

.nav-btn.is-active {
  color: var(--ink);
  background: rgba(215, 221, 230, 0.08);
}

.contact-trigger {
  margin-left: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(111, 171, 163, 0.4);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(37, 43, 54, 0.8);
}

.contact-trigger:hover {
  background: var(--accent-soft);
}

.deck {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: calc(var(--footer-h) + var(--controls-h));
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(111, 171, 163, 0.14), transparent 58%),
    radial-gradient(720px 400px at 100% 30%, rgba(88, 118, 150, 0.12), transparent 55%),
    radial-gradient(640px 360px at 40% 110%, rgba(40, 48, 62, 0.9), transparent 50%),
    linear-gradient(165deg, #1c222c 0%, #171c24 45%, #141920 100%);
}

.deck::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

.track {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.panel {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: auto;
}

.panel-body {
  width: min(100%, var(--max));
  min-height: 100%;
  margin: 0 auto;
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  box-sizing: border-box;
}

.panel-head h2,
.intro-copy h1,
.gallery-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.25;
}

.panel-head h2,
.gallery-head h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.kicker {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.intro-body,
.solve-body {
  width: min(100%, 1360px);
  padding: 28px 32px 24px;
}

.intro-body {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.22fr);
  gap: 28px 36px;
  align-items: center;
  place-content: center;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.intro-copy .kicker {
  margin: 0 0 20px;
  font-size: 1.02rem;
}

.intro-copy h1 {
  margin: 0 0 24px;
  font-size: clamp(1.65rem, 3.1vw, 2.25rem);
  max-width: 12em;
}

.intro-copy .lead {
  margin: 0;
  max-width: 38em;
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--muted);
}

.intro-visual {
  min-width: 0;
}

.intro-duo {
  display: flex;
  align-items: stretch;
  gap: 14px;
  height: clamp(340px, 54vh, 540px);
}

.intro-web,
.intro-phone {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12171f;
  box-shadow: var(--shadow);
  min-height: 0;
}

.intro-web {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 12px;
}

.intro-phone {
  flex: 0 0 auto;
  height: 100%;
  width: auto;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
}

.intro-web img,
.intro-phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.solve-body {
  gap: 22px;
  justify-content: center;
}

.solve-body .panel-head h2 {
  font-size: clamp(1.55rem, 2.8vw, 2rem);
}

.solve-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.solve-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px 32px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.solve-q h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
}

.solve-q p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--muted);
}

.solve-a {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  line-height: 1.5;
}

.panel-body-gallery {
  gap: 10px;
  height: 100%;
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.view-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.view-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.view-btn.is-active {
  background: var(--surface);
  color: var(--ink);
}

.gallery-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-frame {
  flex: 1;
  width: min(100%, 960px);
  margin: 0 auto;
  min-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #10141a;
  box-shadow: var(--shadow);
}

.stage-frame[data-mode="web"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.stage-frame[data-mode="mp"] {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #222833 0%, #1a1f27 100%);
}

.stage-frame[data-mode="mp"] img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
}

.stage-caption {
  margin: 0 auto;
  width: min(100%, 960px);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  flex: 0 0 auto;
}

.stage-thumbs {
  width: min(100%, 960px);
  margin: 0 auto;
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.stage-thumbs[data-count="4"] {
  grid-template-columns: repeat(4, 1fr);
}

.stage-thumbs[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 160px));
  justify-content: center;
}

.thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(37, 43, 54, 0.7);
}

.thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 5px;
  background: #10141a;
}

.stage-thumbs[data-count="2"] .thumb img {
  aspect-ratio: 9 / 16;
  width: auto;
  height: 88px;
  margin: 0 auto;
}

.thumb span {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.thumb.is-active {
  border-color: rgba(111, 171, 163, 0.55);
  background: var(--accent-soft);
}

.thumb.is-active span {
  color: var(--accent);
  font-weight: 600;
}

.deck-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--footer-h);
  z-index: 40;
  height: var(--controls-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(26, 31, 39, 0.96);
  border-top: 1px solid var(--line);
}

.arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  line-height: 0;
}

.arrow svg {
  display: block;
  flex: 0 0 auto;
}

.arrow:hover {
  border-color: rgba(111, 171, 163, 0.5);
}

.arrow:disabled {
  opacity: 0.32;
  cursor: default;
}

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 64px;
  height: 36px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(215, 221, 230, 0.25);
}

.dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--muted);
  background: #141820;
  border-top: 1px solid var(--line);
}

.footer-sep {
  margin: 0 0.4em;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.45);
}

.contact-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(360px, 92vw);
  height: 100%;
  padding: 22px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 36px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--paper-2);
  line-height: 0;
}

.drawer-text {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.drawer-email {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  user-select: all;
  word-break: break-all;
}

@media (max-width: 920px) {
  .site-header {
    gap: 8px;
    padding: 0 12px;
  }

  .brand-mark {
    font-size: 0.88rem;
  }

  .site-nav {
    display: flex;
    margin-left: auto;
    gap: 0;
    max-width: min(58vw, 240px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    padding: 5px 8px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .contact-trigger {
    margin-left: 2px;
    padding: 5px 10px;
    font-size: 0.76rem;
    flex: 0 0 auto;
  }

  .intro-body,
  .solve-body {
    width: 100%;
    padding: 16px 14px 14px;
    gap: 14px;
  }

  .intro-body {
    grid-template-columns: 1fr;
    place-content: center;
  }

  .intro-copy .kicker {
    margin: 0 0 12px;
    font-size: 0.92rem;
  }

  .intro-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(1.35rem, 6vw, 1.7rem);
  }

  .intro-copy .lead {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .intro-duo {
    display: block;
    height: auto;
  }

  .intro-web {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .intro-phone {
    display: none;
  }

  .solve-body {
    justify-content: center;
    min-height: 100%;
  }

  .solve-body .panel-head h2 {
    font-size: clamp(1.3rem, 5.5vw, 1.6rem);
  }

  .solve-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
    padding: 12px 0;
  }

  .solve-q h3 {
    font-size: 0.98rem;
  }

  .solve-q p,
  .solve-a {
    font-size: 0.86rem;
  }

  .panel-body-gallery {
    padding: 14px 12px 12px;
  }

  .gallery-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .gallery-head h2 {
    font-size: 1.25rem;
  }

  .stage-frame {
    min-height: 200px;
    width: 100%;
  }

  .stage-thumbs[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage-thumbs[data-count="2"] .thumb img {
    height: 72px;
  }

  .contact-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: min(70vh, 420px);
    padding: 10px 18px 28px;
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.4);
    transform: translateY(110%);
  }

  .contact-drawer.is-open {
    transform: translateY(0);
  }

  .contact-drawer::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: rgba(215, 221, 230, 0.28);
  }

  .drawer-head {
    margin-bottom: 10px;
  }

  .drawer-text {
    margin-bottom: 14px;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .track,
  .contact-drawer {
    transition: none;
  }
}
