:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --paper: #ffffff;
  --ink: #111114;
  --muted: #6e6e73;
  --soft: #e8e8ed;
  --line: rgba(0, 0, 0, 0.12);
  --accent: #0066cc;
  --accent-soft: rgba(0, 102, 204, 0.12);
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.18);
  --section: min(1180px, calc(100vw - 64px));
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.is-menu-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 14px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.section-shell {
  width: var(--section);
  margin: 0 auto;
}

.global-nav {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 max(32px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(245, 245, 247, 0.78);
  backdrop-filter: saturate(160%) blur(18px);
  transition: border-color 180ms ease, background 180ms ease;
}

.global-nav.is-scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  background: rgba(245, 245, 247, 0.88);
}

.brand {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: rgba(17, 17, 20, 0.82);
  font-size: 13px;
  font-weight: 600;
}

.site-nav a {
  padding: 10px 0;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  display: grid;
  place-items: center;
  min-height: auto;
  padding: 52px 0 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f5f5f7 0%, #ffffff 56%, #f5f5f7 100%),
    var(--bg);
}

.hero-copy {
  width: var(--section);
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  max-width: 1120px;
  margin: 0 auto;
  font-size: 82px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.title-line {
  display: block;
}

.mobile-title-line {
  display: none;
}

.hero-copy p {
  max-width: 670px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: #0066cc;
  color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #0055b8;
}

.button-ghost {
  border-color: rgba(0, 102, 204, 0.34);
  color: #0066cc;
}

.button-ghost:hover,
.button-ghost:focus-visible {
  background: rgba(0, 102, 204, 0.12);
}

.showcase {
  width: var(--section);
  max-width: 1180px;
  margin-top: 40px;
}

.showcase-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.showcase-meta strong {
  color: var(--ink);
}

.product-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 360px;
  margin: 14px auto 0;
  perspective: 1400px;
}

.hero-device,
.side-device {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(225, 225, 230, 0.92));
  box-shadow: var(--shadow);
}

.hero-device {
  z-index: 3;
  width: min(700px, 76vw);
  padding: 10px 10px 16px;
  animation: floatProduct 6s ease-in-out infinite;
}

.device-lid {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 3px;
}

.device-lid span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8c8ce;
}

.device-screen,
.side-screen,
.story-screen {
  background-image: url("assets/project-previews.webp");
  background-repeat: no-repeat;
  background-size: 310% auto;
  background-position: var(--shot-position, 2%) center;
}

.device-screen {
  aspect-ratio: 16 / 8.6;
  overflow: hidden;
  border-radius: 5px;
  background-color: #111114;
  transition: background-position 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-device figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 6px 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-device figcaption strong {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.side-device {
  z-index: 2;
  width: 330px;
  padding: 8px;
  opacity: 0.54;
  filter: saturate(0.84);
  transform: translateX(-360px) rotateY(24deg) scale(0.82);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 520ms ease;
}

.side-device-right {
  transform: translateX(360px) rotateY(-24deg) scale(0.82);
}

.side-screen {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
}

.showcase.is-switching .device-screen {
  transform: scale(0.985);
}

.showcase.is-switching .side-device-left {
  opacity: 0.34;
  transform: translateX(-390px) rotateY(30deg) scale(0.78);
}

.showcase.is-switching .side-device-right {
  opacity: 0.34;
  transform: translateX(390px) rotateY(-30deg) scale(0.78);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(0, 102, 204, 0.42);
  background: #fff;
  transform: translateY(-1px);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.page-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
}

.page-tabs button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease;
}

.page-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
}

.works {
  padding: 92px 0 100px;
}

.works > .section-intro[data-reveal] {
  opacity: 1;
  transform: none;
}

.section-intro {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(280px, 430px);
  gap: 36px;
  align-items: start;
}

.section-number {
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.section-intro h2,
.about-copy h2,
.contact h2 {
  margin: 0;
  font-size: 56px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-intro p:last-child,
.about-copy p,
.contact p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 72px;
  align-items: center;
  margin-top: 62px;
  padding: 34px 0 0;
  border-top: 1px solid var(--line);
}

.story-copy {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.story-index {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.story-copy h3 {
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
}

.story-copy p[data-story-body] {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.story-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 42px 0 0;
}

.story-metrics div {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.story-metrics dt {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.story-metrics dd {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.story-visual {
  position: relative;
  min-height: 500px;
}

.story-device {
  position: absolute;
  z-index: 2;
  right: 0;
  left: 0;
  top: 38px;
  width: min(760px, 100%);
  margin: auto;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, #dedee4);
  box-shadow: var(--shadow);
}

.story-screen {
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  background-position: var(--shot-position, 2%) center;
  transition: background-position 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.story-visual img {
  position: absolute;
  right: 7%;
  bottom: -26px;
  z-index: 1;
  width: 64%;
  opacity: 0.32;
  filter: saturate(0.8);
}

.method {
  padding: 110px 0;
  background:
    linear-gradient(180deg, #111114 0%, #1b1b20 52%, #070708 100%),
    #111114;
  color: #f5f5f7;
}

.method-inner {
  display: grid;
  gap: 68px;
}

.section-intro.light .section-number {
  color: #8ac0ff;
}

.section-intro.light p:last-child {
  color: rgba(245, 245, 247, 0.66);
}

.method-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.method-track article {
  min-height: 300px;
  padding: 38px;
  background: rgba(255, 255, 255, 0.045);
}

.method-track span {
  color: #8ac0ff;
  font-size: 13px;
  font-weight: 800;
}

.method-track h3 {
  margin: 76px 0 0;
  font-size: 27px;
  line-height: 1.22;
}

.method-track p {
  margin: 18px 0 0;
  color: rgba(245, 245, 247, 0.66);
}

.about {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 90px;
  align-items: center;
  padding: 110px 0;
}

.about-media {
  overflow: hidden;
  aspect-ratio: 1 / 1.14;
  border-radius: var(--radius);
  background: #e8e8ed;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
}

.about-copy {
  max-width: 720px;
}

.about-copy p {
  margin-top: 26px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 42px;
  border-top: 1px solid var(--line);
}

.about-stats span {
  display: grid;
  gap: 8px;
  padding: 22px 24px 0;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.about-stats span:first-child {
  padding-left: 0;
  border-left: 0;
}

.about-stats strong {
  color: var(--ink);
  font-size: 31px;
  line-height: 1;
}

.contact {
  padding: 76px 0 28px;
  background: #fff;
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 60px;
  align-items: end;
}

.contact h2 {
  max-width: 760px;
}

.contact address {
  display: grid;
  gap: 12px;
  font-style: normal;
  font-size: 17px;
  font-weight: 700;
}

.contact address a {
  color: var(--accent);
}

.copyright {
  width: var(--section);
  margin: 54px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #86868b;
  font-size: 13px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero [data-reveal] {
  opacity: 1;
  transform: none;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatProduct {
  0%,
  100% {
    transform: translateY(0) rotateX(0deg);
  }
  50% {
    transform: translateY(-10px) rotateX(1.2deg);
  }
}

@media (max-width: 1080px) {
  :root {
    --section: min(100vw - 42px, 900px);
  }

  .global-nav {
    padding: 0 22px;
  }

  .hero h1 {
    font-size: 66px;
  }

  .hero-copy p {
    font-size: 20px;
  }

  .product-stage {
    height: 340px;
  }

  .side-device {
    width: 280px;
    transform: translateX(-290px) rotateY(22deg) scale(0.78);
  }

  .side-device-right {
    transform: translateX(290px) rotateY(-22deg) scale(0.78);
  }

  .section-intro {
    grid-template-columns: 80px 1fr;
  }

  .section-intro p:last-child {
    grid-column: 2;
    max-width: 560px;
  }

  .story-grid,
  .about {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .story-copy {
    min-height: 0;
  }

  .story-visual {
    min-height: 420px;
  }

  .method-track {
    grid-template-columns: 1fr;
  }

  .method-track article {
    min-height: 230px;
  }

  .method-track h3 {
    margin-top: 42px;
  }

  .about-media {
    width: min(360px, 100%);
  }
}

@media (max-width: 760px) {
  :root {
    --section: min(100vw - 30px, 620px);
  }

  body {
    font-size: 11px;
  }

  .global-nav {
    height: 50px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 50px;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 12px 22px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 245, 247, 0.96);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 15px 0;
    font-size: 12px;
  }

  .hero {
    min-height: auto;
    padding: 42px 0 18px;
  }

  .hero h1 {
    max-width: 350px;
    font-size: 33px;
    line-height: 1.08;
  }

  .title-line {
    display: none;
  }

  .mobile-title-line {
    display: block;
  }

  .hero-copy p {
    margin-top: 14px;
    font-size: 13px;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .showcase {
    margin-top: 28px;
  }

  .showcase-meta {
    flex-direction: column;
    gap: 3px;
  }

  .showcase-meta strong {
    display: none;
  }

  .product-stage {
    height: 280px;
    margin-top: 22px;
  }

  .hero-device {
    width: min(92vw, 440px);
  }

  .hero-device figcaption {
    display: grid;
    gap: 8px;
    font-size: 8px;
  }

  .hero-device figcaption strong {
    text-align: left;
  }

  .side-device {
    display: none;
  }

  .pagination {
    gap: 10px;
  }

  .section-intro {
    display: block;
  }

  .section-intro h2,
  .about-copy h2,
  .contact h2 {
    margin-top: 12px;
    font-size: 33px;
  }

  .section-intro p:last-child,
  .about-copy p,
  .contact p {
    margin-top: 18px;
    font-size: 12px;
  }

  .works {
    padding: 28px 0 66px;
  }

  .about {
    padding: 66px 0;
  }

  .story-grid {
    margin-top: 42px;
    gap: 34px;
  }

  .story-copy h3 {
    font-size: 27px;
  }

  .story-copy p[data-story-body] {
    font-size: 12px;
  }

  .story-metrics {
    grid-template-columns: 1fr;
  }

  .story-visual {
    min-height: 310px;
  }

  .story-device {
    top: 12px;
  }

  .story-visual img {
    width: 74%;
    right: 0;
  }

  .method {
    padding: 74px 0;
  }

  .method-track article {
    padding: 28px;
  }

  .about {
    gap: 34px;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 18px;
    border-top: 0;
  }

  .about-stats span {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .contact {
    padding-top: 58px;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
