:root {
  --ink: #272030;
  --paper: #ffffff;
  --gallery-navy: #0a1931;
  --gallery-deep: #1a3d63;
  --gallery-mid: #4a7fa7;
  --gallery-pale: #b3cfe5;
  --gallery-white: #f6fafd;
  --vault-ink: #272030;
  --vault-cloud: #e3ebf2;
  --vault-mauve: #c79a99;
  --vault-maroon: #3b0a0a;
  --page: 1240px;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.theme-gallery {
  --theme-dark: var(--gallery-navy);
  --theme-mid: var(--gallery-mid);
  --theme-pale: var(--gallery-pale);
  --theme-light: var(--gallery-white);
}

body.theme-vault {
  --theme-dark: var(--vault-maroon);
  --theme-mid: var(--vault-mauve);
  --theme-pale: var(--vault-cloud);
  --theme-light: #fbf7f6;
}

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

button,
input {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  background: var(--theme-dark);
  color: var(--theme-light);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(var(--page), calc(100% - 48px));
  margin-inline: auto;
}

.product-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-dark), transparent 78%);
  background: color-mix(in srgb, var(--theme-light), transparent 8%);
  backdrop-filter: blur(18px);
}

.header-inner,
.header-nav,
.language-switch {
  display: flex;
  align-items: center;
}

.header-inner {
  min-height: 78px;
  justify-content: space-between;
  gap: 28px;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--serif);
}

.brand-lockup strong {
  font-size: 1.45rem;
  font-weight: 500;
}

.brand-lockup span {
  color: color-mix(in srgb, var(--theme-dark), transparent 32%);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.header-nav {
  gap: 26px;
}

.header-nav > a {
  border-bottom: 1px solid transparent;
  font-size: 0.88rem;
}

.header-nav > a:hover,
.header-nav > a:focus-visible {
  border-color: currentColor;
}

.language-switch {
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--theme-dark), transparent 68%);
  border-radius: 999px;
}

.language-switch button {
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.75rem;
}

.language-switch button[aria-pressed="true"] {
  background: var(--theme-dark);
  color: var(--theme-light);
}

.product-hero {
  display: grid;
  min-height: calc(100svh - 78px);
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(64px, 9vw, 120px);
}

.eyebrow,
.section-index,
.status-chip,
.art-meta,
.record-state {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-display,
.section-title,
.art-card h3,
.dialog-title,
.workflow-title,
.support-title {
  font-family: var(--serif);
  font-weight: 500;
}

.product-display {
  margin-block: 18px 28px;
  font-size: clamp(3.4rem, 6vw, 6.3rem);
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.hero-copy {
  max-width: 580px;
  color: color-mix(in srgb, var(--theme-dark), transparent 22%);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  margin-top: 36px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  font-weight: 500;
}

.status-chip {
  padding: 8px 11px;
  border: 1px solid currentColor;
}

.hero-art {
  position: relative;
  min-height: min(68svh, 680px);
  background: var(--theme-pale);
}

.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-caption {
  position: absolute;
  right: -1px;
  bottom: -1px;
  max-width: 72%;
  padding: 14px 18px;
  background: var(--theme-light);
  color: var(--theme-dark);
  font-size: 0.82rem;
}

.collection-section,
.prototype-section,
.support-main {
  padding-block: clamp(72px, 8vw, 112px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 44px;
  align-items: start;
  margin-bottom: clamp(38px, 5vw, 64px);
}

.section-title,
.support-title {
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.section-copy {
  max-width: 640px;
  color: color-mix(in srgb, var(--theme-dark), transparent 28%);
}

.collection-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding-block: 18px;
  border-top: 1px solid color-mix(in srgb, var(--theme-dark), transparent 72%);
  border-bottom: 1px solid color-mix(in srgb, var(--theme-dark), transparent 72%);
}

.search-field {
  min-width: min(100%, 300px);
  flex: 1;
  border: 0;
  background: transparent;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  padding: 7px 11px;
  border: 1px solid transparent;
  background: transparent;
}

.filter-button[aria-pressed="true"] {
  border-color: currentColor;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 74px) clamp(22px, 4vw, 54px);
}

.art-card {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.art-card:nth-child(even) {
  margin-top: clamp(50px, 8vw, 110px);
}

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

.art-frame {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: var(--theme-pale);
}

.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transition: transform 650ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 400ms ease;
}

.art-card:hover .art-frame img,
.art-card:focus-visible .art-frame img {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.art-card h3 {
  margin-block: 6px 4px;
  font-size: clamp(2rem, 3.7vw, 3.8rem);
  line-height: 1;
}

.art-artist {
  color: color-mix(in srgb, var(--theme-dark), transparent 30%);
}

.empty-state {
  display: none;
  padding-block: 46px;
  border-bottom: 1px solid currentColor;
}

.empty-state.is-visible {
  display: block;
}

.art-dialog {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  background: var(--theme-light);
  color: var(--theme-dark);
}

.art-dialog::backdrop {
  background: rgba(10, 25, 49, 0.74);
  backdrop-filter: blur(7px);
}

.dialog-close {
  position: sticky;
  z-index: 2;
  top: 14px;
  float: right;
  width: 42px;
  height: 42px;
  margin: 14px 14px 0 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--theme-light);
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  min-height: 620px;
}

.dialog-image-wrap {
  min-height: 520px;
  background: var(--theme-pale);
}

.dialog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dialog-copy {
  align-self: center;
  padding: clamp(38px, 6vw, 78px);
}

.dialog-title {
  margin-block: 16px 8px;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.95;
}

.dialog-artist {
  margin-bottom: 26px;
  color: color-mix(in srgb, var(--theme-dark), transparent 28%);
}

.dialog-description {
  margin-bottom: 30px;
}

.source-link {
  display: inline-block;
  border-bottom: 1px solid currentColor;
  font-size: 0.86rem;
}

.vault-hero {
  color: var(--vault-cloud);
  background: var(--vault-maroon);
}

.vault-hero .product-hero {
  min-height: calc(92svh - 78px);
}

.vault-hero .hero-copy {
  color: var(--vault-mauve);
}

.vault-mark {
  position: relative;
  min-height: min(64svh, 640px);
  overflow: hidden;
  background: linear-gradient(120deg, var(--vault-ink), var(--vault-maroon));
}

.vault-mark::before,
.vault-mark::after {
  content: "";
  position: absolute;
}

.vault-mark::before {
  width: 65%;
  aspect-ratio: 1;
  right: 8%;
  bottom: -22%;
  border: 1px solid var(--vault-cloud);
  border-radius: 50%;
  box-shadow: 0 0 0 30px var(--vault-maroon), 0 0 0 32px var(--vault-mauve), 0 0 0 68px var(--vault-maroon), 0 0 0 69px var(--vault-cloud);
}

.vault-mark::after {
  top: 8%;
  left: 8%;
  width: 34%;
  height: 70%;
  background: linear-gradient(180deg, var(--vault-cloud), var(--vault-mauve));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.notice-band {
  padding-block: 18px;
  border-top: 1px solid var(--vault-mauve);
  border-bottom: 1px solid var(--vault-mauve);
  background: var(--vault-maroon);
  color: var(--vault-cloud);
}

.notice-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.notice-inner strong {
  font-weight: 500;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 42px;
  border-top: 1px solid color-mix(in srgb, var(--theme-dark), transparent 66%);
  border-bottom: 1px solid color-mix(in srgb, var(--theme-dark), transparent 66%);
}

.workflow-tab {
  padding: 22px;
  border: 0;
  background: transparent;
  text-align: left;
}

.workflow-tab + .workflow-tab {
  border-left: 1px solid color-mix(in srgb, var(--theme-dark), transparent 66%);
}

.workflow-tab[aria-selected="true"] {
  background: var(--vault-maroon);
  color: var(--vault-cloud);
}

.workflow-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: end;
  min-height: 420px;
  padding: clamp(34px, 6vw, 74px);
  background: var(--vault-cloud);
}

.workflow-title {
  margin-block: 12px 18px;
  font-size: clamp(2.5rem, 5.2vw, 5.4rem);
  line-height: 0.96;
}

.workflow-details {
  display: grid;
  gap: 0;
  border-top: 1px solid currentColor;
}

.workflow-detail {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 22px;
  padding-block: 17px;
  border-bottom: 1px solid currentColor;
}

.workflow-detail span:first-child {
  opacity: 0.58;
}

.prototype-records {
  padding-block: clamp(84px, 10vw, 130px);
  background: var(--vault-maroon);
  color: var(--vault-cloud);
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.record-card {
  display: grid;
  min-height: 430px;
  align-content: space-between;
  padding: 26px;
  border: 1px solid color-mix(in srgb, var(--vault-cloud), transparent 48%);
}

.record-card:nth-child(2) {
  margin-top: 50px;
}

.record-visual {
  height: 210px;
  margin-bottom: 34px;
  border: 1px solid currentColor;
}

.record-card:nth-child(1) .record-visual {
  border-radius: 50%;
}

.record-card:nth-child(2) .record-visual {
  background: linear-gradient(135deg, transparent 50%, var(--vault-mauve) 50%);
}

.record-card:nth-child(3) .record-visual {
  background: linear-gradient(90deg, var(--vault-ink) 0 58%, var(--vault-mauve) 58%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.record-card h3 {
  margin-block: 12px 8px;
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
}

.disabled-action {
  width: 100%;
  margin-top: 28px;
  padding: 12px 16px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: not-allowed;
  opacity: 0.58;
}

.support-hero {
  padding-block: clamp(72px, 10vw, 124px) 42px;
}

.support-lead {
  max-width: 680px;
  margin-top: 30px;
  color: color-mix(in srgb, var(--theme-dark), transparent 28%);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid color-mix(in srgb, var(--theme-dark), transparent 70%);
}

.support-item {
  min-height: 220px;
  padding: 34px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-dark), transparent 70%);
}

.support-item:nth-child(odd) {
  padding-right: 34px;
}

.support-item:nth-child(even) {
  padding-left: 34px;
  border-left: 1px solid color-mix(in srgb, var(--theme-dark), transparent 70%);
}

.support-item h2 {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 38px;
  margin-top: 74px;
  padding: clamp(30px, 5vw, 62px);
  background: var(--theme-dark);
  color: var(--theme-light);
}

.contact-panel a {
  width: fit-content;
  border-bottom: 1px solid currentColor;
}

.product-footer {
  padding-block: 30px;
  border-top: 1px solid color-mix(in srgb, var(--theme-dark), transparent 72%);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

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

@media (max-width: 900px) {
  .product-hero,
  .section-heading,
  .workflow-panel,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .product-hero {
    min-height: auto;
  }

  .header-nav > a:not(.language-switch) {
    display: none;
  }

  .hero-art,
  .vault-mark {
    min-height: 520px;
  }

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

  .dialog-image-wrap {
    min-height: 420px;
  }

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

  .record-card:nth-child(2) {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(var(--page), calc(100% - 28px));
  }

  .brand-lockup span {
    display: none;
  }

  .product-display {
    overflow-wrap: anywhere;
  }

  .hero-art,
  .vault-mark {
    min-height: 390px;
  }

  .art-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .art-card:nth-child(even) {
    margin-top: 0;
  }

  .art-frame {
    min-height: 380px;
  }

  .workflow-list {
    grid-template-columns: 1fr;
  }

  .workflow-tab + .workflow-tab {
    border-top: 1px solid color-mix(in srgb, var(--theme-dark), transparent 66%);
    border-left: 0;
  }

  .workflow-detail {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .notice-inner,
  .footer-inner {
    flex-direction: column;
  }

  .support-item:nth-child(odd),
  .support-item:nth-child(even) {
    padding-inline: 0;
    border-left: 0;
  }
}

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

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

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