:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --ink: #171717;
  --muted: #69635b;
  --line: rgba(23, 23, 23, 0.14);
  --panel: rgba(255, 255, 255, 0.72);
  --accent: #b24b2f;
  --teal: #0f766e;
  --gold: #d7a64f;
  --shadow: 0 18px 50px rgba(29, 25, 20, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  min-height: 92vh;
  padding: 22px clamp(18px, 4vw, 56px) 34px;
  background:
    linear-gradient(90deg, rgba(247, 244, 238, 0.78), rgba(247, 244, 238, 0.58)),
    image-set(url("./thumbs/易拉宝设计.jpg") 1x);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(28px, 6vw, 90px);
  align-items: end;
  padding: 8vh 0 12vh;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(2.75rem, 8vw, 7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 0;
  color: #342f2b;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(247, 244, 238, 0.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel div {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.hero-panel div:last-child {
  border-bottom: 0;
}

.hero-panel strong {
  font-size: 2.2rem;
  line-height: 1;
}

.hero-panel span {
  color: var(--muted);
}

main {
  padding: 42px clamp(18px, 4vw, 56px) 60px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 28px;
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap label {
  color: var(--muted);
  font-size: 0.88rem;
}

.search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.64);
  color: #34302b;
  cursor: pointer;
}

.filter-button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.featured {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
  margin-bottom: 34px;
}

.feature {
  min-height: 220px;
  padding: 22px;
  border: 0;
  color: white;
  text-align: left;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.feature span,
.feature strong {
  position: relative;
}

.feature span {
  color: rgba(255, 255, 255, 0.76);
}

.feature strong {
  margin-top: 6px;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  line-height: 1;
}

.feature-video {
  background-image: url("./thumbs/项目宣传片.jpg");
}

.feature-image {
  background-image: url("./thumbs/易拉宝设计.jpg");
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(29, 25, 20, 0.08);
}

.work-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.thumb {
  aspect-ratio: 4 / 3;
  background: #ded8cc;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 260ms ease;
}

.work-button:hover img {
  transform: scale(1.04);
}

.work-meta {
  min-height: 116px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.work-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.34;
}

.badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(178, 75, 47, 0.12);
  color: #7b321e;
  font-size: 0.78rem;
}

.badge.media {
  background: rgba(15, 118, 110, 0.12);
  color: #075c56;
}

.empty {
  grid-column: 1 / -1;
  padding: 44px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 42px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: #201f1d;
  color: #f7f4ee;
}

.footer h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.footer p:last-child {
  max-width: 520px;
  margin-bottom: 0;
  color: rgba(247, 244, 238, 0.74);
}

.footer code {
  color: #fff;
}

.preview-dialog {
  width: min(1120px, calc(100vw - 32px));
  border: 0;
  padding: 0;
  background: #111;
  color: #fff;
  box-shadow: var(--shadow);
}

.preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.preview-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  min-height: min(720px, 80vh);
}

.preview-media {
  min-height: 420px;
  display: grid;
  place-items: center;
  background: #050505;
}

.preview-media img,
.preview-media video {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}

.preview-media video {
  width: 100%;
}

.preview-info {
  padding: 34px 24px;
  background: #1e1d1b;
}

.preview-info h2 {
  font-size: 1.7rem;
  line-height: 1.15;
}

.preview-info p {
  color: rgba(255, 255, 255, 0.7);
}

.preview-info a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--gold);
  color: #17120a;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 780px) {
  .site-header {
    min-height: auto;
  }

  .hero,
  .toolbar,
  .featured,
  .preview-shell,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 72px 0 40px;
  }

  .filters {
    justify-content: flex-start;
  }

  .feature {
    min-height: 180px;
  }

  .preview-shell {
    display: block;
  }

  .preview-media {
    min-height: 260px;
  }

  .footer {
    display: grid;
  }
}
