:root {
  color-scheme: light;
  --ink: #1d1a22;
  --muted: #68606d;
  --paper: #fffaf4;
  --panel: #ffffff;
  --line: rgba(29, 26, 34, 0.14);
  --rose: #c4496d;
  --teal: #0f817b;
  --gold: #c28b2c;
  --shadow: 0 18px 55px rgba(29, 26, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Noto Sans TC",
    "Microsoft JhengHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.65;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 52px);
  color: #fff;
  background: linear-gradient(to bottom, rgba(19, 17, 21, 0.78), rgba(19, 17, 21, 0));
}

.brand,
.nav-links,
.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.nav-links {
  gap: clamp(14px, 3vw, 30px);
  font-size: 0.95rem;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 88svh;
  overflow: hidden;
  color: #fff;
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
}

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

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(15, 14, 17, 0.82), rgba(15, 14, 17, 0.36) 55%, rgba(15, 14, 17, 0.08)),
    linear-gradient(0deg, rgba(15, 14, 17, 0.46), rgba(15, 14, 17, 0) 42%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, calc(100% - 36px));
  min-height: 88svh;
  margin: 0 auto;
  padding: 118px 0 96px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.contact-band h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(3rem, 7.4vw, 6.6rem);
}

.hero h1 span {
  display: block;
}

.name-local {
  font-size: 0.72em;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button,
.icon-button,
.segment {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
}

.button svg,
.service svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button.primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 12px 26px rgba(196, 73, 109, 0.28);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.button.dark {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 86px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.section h2,
.contact-band h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  width: min(330px, 100%);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segment {
  min-height: 38px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segment.active {
  background: var(--ink);
  color: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.work-card {
  grid-column: span 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(29, 26, 34, 0.08);
}

.work-card.wide {
  grid-column: span 6;
}

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

.work-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(15, 129, 123, 0.09), rgba(196, 73, 109, 0.08)),
    #f4eee8;
}

.work-card[data-type="gif"] .work-media {
  aspect-ratio: 1 / 1;
  padding: 22px;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.work-card[data-type="gif"] .work-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.work-button:hover .work-media img,
.work-button:focus-visible .work-media img {
  transform: scale(1.03);
}

.work-caption {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px 16px;
}

.tag {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 129, 123, 0.11);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 900;
}

.commission {
  width: 100%;
  padding-inline: max(18px, calc((100% - 1180px) / 2));
  background: #f4eee8;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service {
  min-height: 238px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service svg {
  width: 26px;
  height: 26px;
  color: var(--rose);
}

.service h3 {
  margin: 18px 0 8px;
  font-size: 1.25rem;
}

.service p,
.contact-band p {
  margin: 0;
  color: var(--muted);
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 70px max(18px, calc((100% - 1180px) / 2));
  background: var(--ink);
  color: #fff;
}

.contact-band p {
  max-width: 660px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.74);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px max(18px, calc((100% - 1180px) / 2));
  background: #141219;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.9rem;
}

.lightbox {
  width: min(1120px, calc(100% - 26px));
  max-height: calc(100svh - 26px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #111015;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.lightbox::backdrop {
  background: rgba(10, 9, 12, 0.78);
}

.lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: min(86svh, 840px);
  margin: 0;
}

.lightbox img {
  align-self: center;
  justify-self: center;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06);
}

.lightbox figcaption span {
  color: rgba(255, 255, 255, 0.66);
}

.icon-button {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.close-lightbox {
  top: 12px;
  right: 12px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

@media (max-width: 920px) {
  .work-card,
  .work-card.wide {
    grid-column: span 6;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .contact-band,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-actions {
    margin-top: 0;
  }
}

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

  .nav-links {
    gap: 13px;
    font-size: 0.86rem;
  }

  .brand span:last-child {
    display: none;
  }

  .hero-inner {
    width: min(100% - 28px, 760px);
    padding-top: 92px;
  }

  .hero h1 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 62px 0;
  }

  .gallery {
    gap: 12px;
  }

  .work-card,
  .work-card.wide {
    grid-column: 1 / -1;
  }

  .work-caption,
  .lightbox figcaption,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-actions,
  .contact-actions {
    width: 100%;
  }

  .lightbox-prev,
  .lightbox-next {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}
