* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #f5f5f7;
  --panel: #ffffff;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-dark: #005bb5;
  --dark: #000000;
  --shadow: 0 18px 48px rgba(0, 0, 0, .10);
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; }
.progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 20;
  width: 0;
  height: 3px;
  background: var(--blue);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(245, 245, 247, .78);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
nav {
  display: flex;
  gap: 22px;
  color: #424245;
  font-size: 13px;
}
nav a {
  text-decoration: none;
  transition: color .18s ease;
}
nav a:hover { color: var(--blue); }
main { overflow: clip; }
section { padding: 84px clamp(18px, 5vw, 72px); }
.hero {
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, .78fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  position: relative;
  padding-top: 56px;
  padding-bottom: 42px;
  color: #f5f5f7;
  background:
    radial-gradient(circle at 76% 26%, rgba(255,255,255,.18), transparent 28%),
    linear-gradient(145deg, #000 0%, #161617 58%, #2d2d2f 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(245,245,247,.04));
}
.hero > * {
  position: relative;
  z-index: 1;
}
.eyebrow {
  margin: 0 0 14px;
  color: #86868b;
  font-size: 13px;
  font-weight: 700;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 940px;
  margin-bottom: 24px;
  font-size: clamp(48px, 8.4vw, 112px);
  line-height: .95;
  font-weight: 800;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1.02;
  font-weight: 800;
}
h3 {
  margin-bottom: 10px;
  font-size: 21px;
}
.lead {
  max-width: 760px;
  color: #a1a1a6;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button.primary {
  background: var(--blue);
  color: #fff;
}
.button.primary:hover { background: var(--blue-dark); }
.button.ghost {
  border: 1px solid rgba(255,255,255,.36);
  color: #f5f5f7;
  background: rgba(255,255,255,.08);
}
.button:hover { transform: translateY(-1px); }
.hero-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.metric {
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  transition: transform .25s ease, background .25s ease;
}
.metric:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.12);
}
.metric strong {
  display: block;
  color: #fff;
  font-size: 42px;
  font-weight: 800;
}
.metric span {
  color: #a1a1a6;
  line-height: 1.45;
}
.hero-rail {
  grid-column: 1 / -1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 12px 2px 14px;
  scroll-snap-type: x mandatory;
}
.rail-card {
  min-height: 190px;
  display: grid;
  align-content: end;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: #1d1d1f;
  color: white;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: 0 16px 42px rgba(0,0,0,.22);
}
.rail-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
  transition: transform .5s ease, opacity .5s ease;
}
.rail-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 10%, rgba(0,0,0,.78) 100%);
}
.rail-card:hover img {
  transform: scale(1.06);
  opacity: .9;
}
.rail-card-content {
  position: relative;
  z-index: 1;
  padding: 20px;
}
.rail-card strong {
  display: block;
  line-height: 1.25;
}
.rail-card span {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
}
.intro {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 34px;
  background: var(--soft);
}
.intro p, .case-card p, .skills p, .contact p {
  color: var(--muted);
  line-height: 1.65;
}
.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.intro-grid article {
  padding: 26px;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.intro-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.intro-grid span {
  color: var(--blue);
  font-weight: 700;
}
.about {
  background: #fff;
}
.about .section-heading {
  display: block;
  max-width: 980px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 18px;
}
.about-card {
  min-height: 260px;
  padding: 30px;
  border-radius: 28px;
  background: #f5f5f7;
  transition: transform .25s ease, box-shadow .25s ease;
}
.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.about-main {
  background: #1d1d1f;
  color: #f5f5f7;
}
.about-card p {
  color: var(--muted);
  line-height: 1.7;
}
.about-main p {
  color: #a1a1a6;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  background: #fff;
  color: #424245;
  padding: 9px 15px;
  cursor: pointer;
  font: inherit;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.filter:hover {
  transform: translateY(-1px);
  color: var(--blue);
}
.filter.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.case-card {
  grid-column: span 6;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
  cursor: pointer;
  animation: riseIn .52s ease both;
  animation-delay: var(--delay);
  transition: transform .25s ease, box-shadow .25s ease;
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.case-media {
  height: 230px;
  overflow: hidden;
  background: #e8e8ed;
}
.case-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .45s ease;
}
.case-card:hover .case-media img { transform: scale(1.04); }
.case-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
}
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #6e6e73;
  font-size: 12px;
}
.case-card h3 {
  font-size: 25px;
  line-height: 1.18;
}
.case-card p { flex: 1; }
.open-case {
  color: var(--blue);
  font-weight: 600;
}
.open-case::after { content: " >"; }
.case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
.skill-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.skill-box {
  padding: 26px;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 6px 24px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.skill-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.skill-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.skill-pill {
  padding: 8px 11px;
  border-radius: 999px;
  background: #f5f5f7;
  color: #424245;
  font-size: 14px;
}
.companies {
  background: #fff;
}
.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.logo-strip img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  padding: 18px;
  border-radius: 22px;
  background: #f5f5f7;
}
.contact {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 28px;
  align-items: center;
  color: #f5f5f7;
  background: #000;
}
.contact .eyebrow { color: #86868b; }
.contact p { color: #a1a1a6; }
.contact-card {
  display: grid;
  gap: 12px;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 26px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}
.contact-card a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-card a:hover { color: #66b2ff; }
.copy-contact {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}
.copy-contact:hover {
  transform: translateY(-1px);
  background: var(--blue-dark);
}
.case-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 0;
  padding: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}
.case-dialog[open] { animation: dialogIn .22s ease both; }
.case-dialog::backdrop {
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(10px);
}
.close-dialog {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 3;
  margin: 12px 12px 0 0;
}
.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(245,245,247,.92);
  color: #1d1d1f;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.dialog-body { padding: 36px; }
.dialog-hero {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 30px;
}
.dialog-hero h2 { margin-bottom: 12px; }
.dialog-cover {
  min-height: 320px;
  overflow: hidden;
  border-radius: 24px;
  background: #f5f5f7;
  position: relative;
}
.dialog-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.cover-link {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(0, 113, 227, .92);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(14px);
}
.detail-content { max-width: 780px; }
.detail-content h2 {
  margin-top: 28px;
  font-size: 32px;
}
.detail-content h3 { margin-top: 24px; }
.detail-content p, .detail-content li {
  color: #424245;
  line-height: 1.75;
}
.detail-content a {
  color: var(--blue);
  font-weight: 600;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.gallery-item {
  margin: 0;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  background: #f5f5f7;
  cursor: zoom-in;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gallery img:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.gallery figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
}
.gallery figcaption a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.82);
}
.image-viewer.active { display: grid; }
.image-viewer img {
  max-width: min(1180px, 94vw);
  max-height: 88vh;
  border-radius: 20px;
  box-shadow: 0 22px 80px rgba(0,0,0,.36);
}
.close-viewer {
  position: fixed;
  top: 18px;
  right: 18px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(29,29,31,.92);
  color: #fff;
  box-shadow: 0 16px 44px rgba(0,0,0,.22);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    gap: 12px;
  }
  nav { gap: 12px; }
  .hero, .intro, .contact, .dialog-hero { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .intro-grid, .about-grid, .skill-columns { grid-template-columns: 1fr; }
  .case-card {
    grid-column: span 12;
    min-height: 0;
  }
  .section-heading { display: block; }
  .dialog-body { padding: 22px; }
}
@media (max-width: 560px) {
  section { padding: 56px 16px; }
  .hero-panel { grid-template-columns: 1fr; }
  .case-media { height: 180px; }
  .site-header { padding: 14px 16px; }
}
