@font-face {
  font-family: Inter;
  src: url('../assets/fonts/InterVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --background: #0d0e0f;
  --foreground: #f2f2ec;
  --muted: #a1a5a0;
  --line: #2c302c;
  --accent: #c2f65c;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: Inter, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--background); }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
p, h1, h2, h3 { margin: 0; }
.wrap { width: calc(100% - 108px); max-width: 1440px; margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 14px 20px; background: var(--accent); color: var(--background); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; min-height: 44px; gap: 5px; font-size: 28px; font-weight: 650; letter-spacing: -.06em; }
.brand span { color: var(--accent); font-size: 24px; }
.header-section { font-size: 15px; margin-left: 36px; }
.back-link { display: inline-flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; font-size: 15px; }
.back-link span { display: inline-block; transition: transform .3s var(--ease); }
.back-link:hover { color: var(--accent); }
.back-link:hover span { transform: translate(3px, -3px); }
.gallery-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding: 53px 0 37px; border-bottom: 1px solid var(--line); }
h1 { display: flex; align-items: flex-start; gap: 12px; font-size: clamp(56px, 6.9vw, 104px); line-height: 1.15; font-weight: 600; letter-spacing: -.065em; }
.title-star { display: inline-block; color: var(--accent); font-size: .62em; margin-top: 7px; transform: rotate(var(--star-angle, 0deg)); }
.english-title { color: var(--muted); font-size: 18px; letter-spacing: .2em; margin-top: 13px; }
.intro-copy { padding-bottom: 0; }
.intro-copy p { font-size: 26px; line-height: 1.5; margin-bottom: 13px; }
.intro-copy>span { color: var(--muted); font-size: 18px; line-height: 1.65; }
.works-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 22px; }
.works-heading h2 { font-size: 21px; font-weight: 500; }
.works-heading h2 span { color: var(--muted); font-size: 18px; margin-left: 15px; font-weight: 400; font-variant-numeric: tabular-nums; }
.works-heading>p { color: var(--muted); font-size: 16px; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px 32px; }
.case-card { min-width: 0; scroll-margin-top: 30px; }
.case-entry { display: flex; flex-direction: column; height: 100%; }
.case-cover { flex-shrink: 0; width: 100%; aspect-ratio: 16 / 9; }
.case-cover:after { background: none; }
.case-cover>strong { font-size: clamp(28px, 3.6vw, 58px); top: 31%; }
.case-cover .tf-cover-top { font-size: 11px; letter-spacing: .18em; font-weight: 500; }
.case-cover .tf-cover-bottom { font-size: 13px; bottom: 27px; }
.case-cover .tf-cover-bottom>b { height: 46px; width: 46px; font-size: 29px; transition: background .3s, color .3s, transform .3s var(--ease); }
.case-cover>img { transition: transform .8s var(--ease); }
.case-entry:hover .case-cover>img, .case-entry:focus-visible .case-cover>img { transform: scale(1.045); }
.case-entry:hover .tf-cover-bottom>b, .case-entry:focus-visible .tf-cover-bottom>b { background: var(--accent); color: var(--background); transform: rotate(45deg); }
.case-info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-top: 25px; flex: 1; }
.case-number { font-size: 11px; line-height: 1.6; letter-spacing: .17em; }
.case-info h3 { font-size: clamp(28px, 3vw, 44px); font-weight: 600; letter-spacing: -.045em; margin-top: 15px; line-height: 1.3; }
.case-name { color: #c0c3bd; font-size: 12px; letter-spacing: .2em; margin-top: 12px; }
.case-description { font-size: 15px; color: #c0c3bd; line-height: 1.85; padding: 28px 0 30px; margin-top: 27px; border-block: 1px solid var(--line); width: 100%; }
.case-tags { display: flex; flex-wrap: wrap; padding: 0; margin: 27px 0 32px; list-style: none; gap: 12px; color: #c0c3bd; font-size: 14px; }
.case-tags li+li:before { content: '/'; color: var(--muted); margin-right: 12px; }
.case-action { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 18px 22px; margin-top: auto; font-size: 16px; background: var(--accent); color: var(--background); transition: background .25s; }
.case-action>span { transition: transform .3s var(--ease); }
.case-entry:hover .case-action, .case-entry:focus-visible .case-action { background: var(--foreground); }
.case-entry:hover .case-action>span { transform: translate(3px, -3px); }
/* The same card needs no layout flag when the collection grows. */
.case-card:only-child { grid-column: 1 / -1; }
.case-card:only-child .case-entry { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); gap: 42px; align-items: center; }
.case-card:only-child .case-cover>strong { font-size: clamp(42px, 5.35vw, 84px); }
.case-card:only-child .case-info { align-self: stretch; padding: 24px 0 34px; }
.case-card:only-child .case-info h3 { font-size: 48px; }
.case-card:only-child .case-description { font-size: 17px; }
.gallery-outro { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 44px; padding: 22px 0; border-block: 1px solid var(--line); }
.gallery-outro>p { font-size: 34px; font-weight: 400; letter-spacing: -.03em; line-height: 1.5; }
.gallery-outro .back-link { font-size: 20px; }
.gallery-footer { display: flex; align-items: center; gap: 34px; padding-block: 17px; font-size: 12px; color: #c0c3bd; }
.footer-brand { font-size: 20px; font-weight: 650; color: var(--foreground); }
.gallery-footer>p { border-left: 1px solid var(--line); padding-left: 34px; }
.gallery-footer>div { margin-left: auto; display: flex; align-items: center; gap: 34px; }
.gallery-footer a, .motion-toggle { display: inline-flex; align-items: center; min-height: 44px; }
.motion-toggle { color: inherit; border: 0; border-left: 1px solid var(--line); padding: 0 0 0 34px; background: none; font-size: 12px; cursor: pointer; }
.gallery-footer a:hover, .motion-toggle:hover { color: var(--accent); }
html[data-motion='off'] { scroll-behavior: auto; }
html[data-motion='off'] *, html[data-motion='off'] *:before, html[data-motion='off'] *:after { animation: none !important; transition: none !important; }
html[data-motion='off'] .case-cover>img, html[data-motion='off'] .title-star { transform: none !important; }
@media (max-width: 1150px) {
  .wrap { width: calc(100% - 72px); }
  .gallery-intro { padding-block: 50px 40px; }
  .intro-copy p { font-size: 20px; }
  .intro-copy>span { font-size: 14px; }
  .case-card:only-child .case-entry { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 30px; }
  .case-card:only-child .case-cover { aspect-ratio: 1.45; }
  .case-card:only-child .case-cover>strong { font-size: 4.7vw; }
  .case-info h3, .case-card:only-child .case-info h3 { font-size: 32px; }
  .case-description, .case-card:only-child .case-description { font-size: 13px; padding-block: 20px; margin-top: 22px; }
  .case-tags { font-size: 12px; gap: 8px; margin: 22px 0; }
  .case-tags li+li:before { margin-right: 8px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .gallery-header { height: 72px; gap: 16px; }
  .brand { font-size: 26px; }
  .header-section { display: none; }
  .back-link { font-size: 13px; }
  .gallery-intro { display: block; padding: 43px 0 30px; }
  h1 { font-size: clamp(45px, 11.6vw, 80px); gap: 8px; }
  .english-title { font-size: 12px; margin-top: 14px; }
  .intro-copy { margin-top: 27px; }
  .intro-copy p { font-size: 19px; margin-bottom: 9px; }
  .intro-copy>span { font-size: 13px; line-height: 1.8; }
  .works-heading { padding-block: 22px 18px; gap: 12px; }
  .works-heading h2 { font-size: 17px; }
  .works-heading h2 span { font-size: 14px; margin-left: 8px; }
  .works-heading>p { font-size: 11px; }
  .case-grid { grid-template-columns: minmax(0, 1fr); gap: 46px; }
  .case-card:only-child .case-entry { display: flex; gap: 0; }
  .case-card:only-child .case-cover, .case-cover { aspect-ratio: 16 / 10; padding: 22px; }
  .case-card:only-child .case-cover>strong, .case-cover>strong { font-size: clamp(29px, 8vw, 56px); left: 22px; top: 34%; }
  .case-cover .tf-cover-top { font-size: 8px; }
  .case-cover .tf-cover-bottom { font-size: 10px; bottom: 18px; left: 22px; right: 22px; }
  .case-cover .tf-cover-bottom>b { width: 34px; height: 34px; font-size: 22px; }
  .case-card:only-child .case-info, .case-info { padding-top: 22px; padding-bottom: 0; }
  .case-number { font-size: 10px; }
  .case-info h3, .case-card:only-child .case-info h3 { font-size: 30px; margin-top: 10px; }
  .case-name { font-size: 10px; margin-top: 10px; }
  .case-description { margin-top: 22px; font-size: 13px; }
  .case-action { font-size: 14px; padding: 17px 20px; }
  .gallery-outro { margin-top: 36px; padding: 23px 0; align-items: flex-start; flex-direction: column; gap: 7px; }
  .gallery-outro>p { font-size: clamp(20px, 5.4vw, 30px); }
  .gallery-outro .back-link { font-size: 14px; }
  .gallery-footer { flex-wrap: wrap; gap: 8px 20px; padding-block: 17px; }
  .gallery-footer>p { padding-left: 20px; font-size: 11px; }
  .gallery-footer>div { width: 100%; justify-content: space-between; gap: 18px; margin: 0; }
  .motion-toggle { padding: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='on']) { scroll-behavior: auto; }
  html:not([data-motion='on']) *, html:not([data-motion='on']) *:before, html:not([data-motion='on']) *:after { animation: none !important; transition: none !important; }
  html:not([data-motion='on']) .case-cover>img, html:not([data-motion='on']) .title-star { transform: none !important; }
}
