:root {
  color-scheme: light;
  --page: #f8f8f6;
  --surface: #ffffff;
  --surface-soft: #eeeeeb;
  --ink: #09090b;
  --muted: #62645f;
  --line: #ddddd8;
  --accent: #b80f19;
  --accent-deep: #830910;
  --shadow: 0 24px 70px rgb(9 9 11 / 0.14);
  --shadow-soft: 0 18px 46px rgb(9 9 11 / 0.08);
  --radius: 2px;
  --max: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Avenir Next", "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  letter-spacing: 0;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-160%);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: white;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
}

.skip-link:focus-visible {
  transform: translateY(0);
  clip-path: none;
  opacity: 1;
  pointer-events: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgb(248 248 246 / 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand {
  min-height: 44px;
  font-weight: 760;
}

.brand img,
.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  font-size: 15px;
  color: #262626;
}

.site-header a,
.site-footer a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 180ms ease;
}

.site-header a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.hero {
  min-height: calc(88dvh - 72px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 64px) clamp(20px, 4vw, 56px) clamp(30px, 4vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.86fr);
  gap: clamp(28px, 6vw, 92px);
  align-items: center;
}

.hero-copy {
  position: relative;
  max-width: 680px;
}

.hero-copy::before {
  content: "花獅";
  position: absolute;
  inset: -120px auto auto 28%;
  z-index: -1;
  color: rgb(9 9 11 / 0.04);
  font-size: clamp(7rem, 16vw, 17rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.1em;
}

.hero h1 {
  margin: 0;
  max-width: 9.8em;
  font-size: clamp(3.35rem, 7.6vw, 7.7rem);
  line-height: 1.06;
  font-weight: 780;
}

.hero p,
.section-heading p,
.atelier-copy p,
.inquiry-copy p,
.site-footer p {
  color: var(--muted);
  line-height: 1.85;
}

.hero p {
  max-width: 35rem;
  margin: 24px 0 0;
  font-size: clamp(1.04rem, 1.28vw, 1.18rem);
}

.primary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
  margin-top: 34px;
  padding: 0 28px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 760;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.primary-action:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateY(-1px);
}

.primary-action:active {
  transform: translateY(1px);
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.series-action:focus-visible,
.filter-button:focus-visible,
.piece-card-action:focus-visible,
.dialog-close:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(184 15 25 / 0.28);
  outline-offset: 3px;
}

.hero-media {
  margin: 0;
  background: #0b0b0d;
  height: clamp(480px, 64dvh, 620px);
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  max-height: 780px;
  object-fit: cover;
  object-position: center;
}

.series,
.works,
.atelier,
.inquiry {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 72px) clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 72px;
}

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

.section-heading {
  max-width: 780px;
}

.section-heading h2,
.atelier h2,
.inquiry h2 {
  margin: 0;
  font-size: clamp(2.15rem, 4.4vw, 4.8rem);
  line-height: 1.12;
  font-weight: 760;
}

.section-heading p,
.atelier-copy p,
.inquiry-copy p {
  max-width: 46rem;
  margin: 16px 0 0;
  font-size: 1.04rem;
}

.series-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-rows: repeat(2, minmax(300px, auto));
  gap: 16px;
}

.series-panel {
  min-height: 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(220px, 0.86fr) minmax(0, 1fr);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.series-panel-primary {
  grid-row: span 2;
  min-height: 650px;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
}

.series-panel img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: contain;
  object-position: center;
  background: #101012;
}

.series-panel-primary img {
  height: 520px;
}

.series-panel div,
.piece-card div {
  padding: 20px;
}

.series-panel div {
  align-self: end;
}

.series-panel span,
.piece-card span,
.atelier-list span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.series-panel h3,
.piece-card h3,
.atelier-list h3 {
  margin: 8px 0 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.series-panel p,
.piece-card p,
.atelier-list p {
  color: var(--muted);
  line-height: 1.75;
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.series-action {
  min-height: 44px;
  margin-top: 18px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 760;
  cursor: pointer;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.series-action:hover {
  color: var(--accent);
}

.series-action:active {
  transform: translateY(1px);
}

.filter-bar {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.filter-button:hover,
.filter-button.is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.filter-button:active {
  transform: scale(0.98);
}

.work-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.piece-card {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 520px;
  overflow: hidden;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.piece-card[hidden] {
  display: none;
}

.piece-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.piece-card-action {
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-rows: 1fr auto;
  text-align: left;
  cursor: zoom-in;
}

.piece-card img {
  width: 100%;
  height: 390px;
  object-fit: contain;
  object-position: center;
  background: #101012;
}

.piece-card-wide {
  grid-column: span 2;
}

.piece-card-wide img {
  height: 390px;
}

.atelier {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: clamp(22px, 4vw, 58px) clamp(28px, 6vw, 86px);
  align-items: stretch;
}

.atelier-media {
  grid-row: span 2;
  margin: 0;
  min-height: 620px;
  overflow: hidden;
  background: #101012;
  box-shadow: var(--shadow-soft);
}

.atelier-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.atelier-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.atelier-list article {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.inquiry {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.82fr);
  gap: clamp(28px, 6vw, 86px);
}

.inquiry-form {
  display: grid;
  gap: 18px;
  scroll-margin-top: 88px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
}

.selected-works {
  padding: 16px 18px;
  border: 1px solid rgb(184 15 25 / 0.26);
  background: rgb(184 15 25 / 0.055);
}

.selected-works[hidden] {
  display: none;
}

.selected-works span {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.selected-works p {
  margin: 8px 0 0;
  color: var(--ink);
  font-weight: 760;
  line-height: 1.55;
}

.inquiry-form label {
  display: grid;
  gap: 8px;
}

.inquiry-form span {
  font-size: 0.92rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd1d4;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  min-height: 48px;
  padding: 12px 14px;
}

textarea {
  resize: vertical;
  min-height: 112px;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--accent-deep);
  line-height: 1.6;
}

.work-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.work-dialog::backdrop {
  background: rgb(9 9 11 / 0.58);
  backdrop-filter: blur(8px);
}

.dialog-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.78fr);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgb(9 9 11 / 0.34);
}

.dialog-media {
  margin: 0;
  min-height: min(720px, calc(100dvh - 32px));
  background: #101012;
  display: grid;
  place-items: center;
}

.dialog-image {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 32px);
  object-fit: contain;
}

.dialog-copy {
  padding: clamp(24px, 4vw, 46px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dialog-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.dialog-position {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 760;
}

.dialog-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 4rem);
  line-height: 1.12;
}

.dialog-description,
.dialog-note {
  color: var(--muted);
  line-height: 1.85;
}

.dialog-description {
  margin: 18px 0 0;
  font-size: 1rem;
}

.dialog-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.dialog-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.dialog-actions .primary-action,
.secondary-action {
  margin-top: 0;
}

.secondary-action,
.dialog-close {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 760;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.secondary-action {
  padding: 0 22px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 0 16px;
  box-shadow: 0 8px 22px rgb(9 9 11 / 0.14);
}

.secondary-action:hover,
.dialog-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.secondary-action:active,
.dialog-close:active {
  transform: translateY(1px);
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px clamp(20px, 4vw, 56px) 46px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.site-footer p {
  margin: 8px 0 0;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1120px) {
  .hero,
  .atelier,
  .inquiry {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .atelier-media {
    grid-row: auto;
    min-height: 0;
    height: clamp(360px, 60dvh, 560px);
  }

  .hero-media {
    height: clamp(380px, 56dvh, 500px);
  }

  .series-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .series-panel,
  .series-panel-primary {
    min-height: auto;
    grid-row: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .series-panel img,
  .series-panel-primary img {
    height: 430px;
  }

  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 76px;
  }

  .site-header {
    height: auto;
    min-height: 68px;
    align-items: flex-start;
    padding-block: 12px;
    gap: 10px;
  }

  .brand {
    gap: 8px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .site-header nav {
    gap: 10px;
    font-size: 13px;
  }

  .hero {
    padding-top: 34px;
    padding-bottom: 22px;
    gap: 20px;
  }

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

  .hero p {
    max-width: 100%;
  }

  .hero .primary-action {
    margin-top: 26px;
  }

  .hero-media {
    height: 250px;
  }

  .atelier-media {
    height: 360px;
  }

  .series-panel img {
    height: 340px;
  }

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

  .piece-card-wide {
    grid-column: span 1;
  }

  .piece-card,
  .piece-card-wide {
    min-height: auto;
  }

  .piece-card img,
  .piece-card-wide img {
    height: clamp(330px, 92vw, 460px);
    aspect-ratio: auto;
  }

  .dialog-frame {
    grid-template-columns: 1fr;
  }

  .dialog-media {
    grid-column: 1;
    grid-row: 1;
  }

  .dialog-copy {
    grid-column: 1;
    grid-row: 2;
  }

  .dialog-media {
    min-height: 0;
    height: min(58dvh, 460px);
  }

  .dialog-image {
    max-height: 58dvh;
  }

  .dialog-copy {
    padding: 22px;
  }

  .dialog-close {
    position: sticky;
    top: 10px;
    right: auto;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    margin: 10px 10px -54px 0;
    background: rgb(255 255 255 / 0.94);
  }

  .site-footer {
    flex-direction: column;
  }
}
