/* 基础样式：根字号 62.5%（1rem = 10px），正文 15px，和 Arent & Pyke 一样。 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-15);
  font-weight: var(--weight-regular);
  line-height: 1.5;
  font-kerning: normal;
  text-autospace: normal;
  text-wrap: pretty; /* 段落最后一行尽量不只剩一个字（支持的浏览器） */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 整屏宽的图（简介页的横幅、项目页"更多图片"）用 100vw 撑出去；滚动条一直显示时 100vw 比页面宽出一条滚动条，
   在 main 上裁掉。不能写在 body 上：body 的 overflow 会交给整个窗口，页面照样能横着滚出那几像素 */
main {
  overflow-x: clip;
}

/* 地址已经按两行断好了（content.toml 的 address_lines）。这里不用 pretty：Safari 26 起，
   在刚好和文字一样宽的框里（菜单、联系页）pretty 会多折一行，把"百空间湖丝栈"拆开。
   换行方式只对块级元素起作用，所以地址链接要是 block */
.address {
  display: block;
  text-wrap: wrap;
}

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd,
figure,
fieldset {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: inherit;
  font-size: inherit;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 1px dotted currentColor;
  outline-offset: 4px;
}

::selection {
  background: var(--ochre);
  color: var(--ink);
}

[lang="en"] {
  font-style: italic;
}

[hidden] {
  display: none !important;
}

/* 内容页的正文从页眉下面开始；首页和项目页的大图顶到最上面（页眉透明） */
main {
  padding-top: var(--header-height);
}

.has-transparent-header main {
  padding-top: 0;
}

/* 图片：铺满所在的框，按 object-position 取景；加载完之前是浅色底 */
.pic {
  display: block;
  background: var(--placeholder);
}

.pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 页面左上角的小标题（作品、关于我们）：15px，和 A&P 的 PROJECTS / PROFILE 一样 */
.page-label {
  font-size: var(--fs-15);
  line-height: 1;
  margin-bottom: 10rem;
}

/* 下划线按钮（预约设计、投递简历）：13px，字距 1.5px，下面一道 2px 的线 */
.cta {
  display: inline-block;
  padding: 0.8rem 0;
  border-bottom: 2px solid currentColor;
  font-size: var(--fs-13);
  letter-spacing: 0.15rem;
  transition: opacity 0.5s;
}

.cta:hover {
  opacity: 0.6;
}

/* 复制按钮（客服微信、公众号） */
.copy {
  display: inline-block;
  margin-left: 0.8rem;
  padding: 0 0.6rem;
  border: 1px solid currentColor;
  font-size: 1.2rem;
  line-height: 1.8rem;
  vertical-align: 0.1em;
  transition: opacity 0.3s;
}

.copy:hover {
  opacity: 0.6;
}

.copy__status:empty {
  display: none;
}

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

.skip-link {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 100;
  padding: 0.8rem 1.6rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* 系统设置了"减少动态效果"：去掉位移和长过渡 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
