/* ==========================================================================
   Oakâme Design System — Design Tokens & Fluid Typography Scale
   --------------------------------------------------------------------------
   从 REA 捕获的原站样式 app.f3c6b3.css 逆向拆解并注释还原。
   核心机制：
   1. 全站没有任何固定 px 字体，而是用 --size (375 / 768 / 1024 / 1440)
      作为设计稿基准宽度，设定 1rem = 10px（在 1440px 下精确等于 10px），
      因此整个建筑栅格、字体、边距都随视口宽度等比例流畅缩放。
   2. 全站不使用纯黑 #000 和纯白 #fff，而是暖烟熏深橡木色 (#403A34) 与
      原生亚麻暖白 (#F6F1EB)，通过 RGB 三元组变量支持透明度组合。
   ========================================================================== */

:root {
  /* 1. 建筑大地色板 (RGB 三元组) */
  --color-black: 64 58 52;       /* #403A34 烟熏深橡木色 / 主墨线与文字 */
  --color-white: 246 241 235;    /* #F6F1EB 暖亚麻灰白 / 主画布背景 */
  --color-gray: 155 151 147;     /* #9B9793 风化老木灰 */
  --color-grid: 0 0 255;         /* #0000FF 克莱因蓝 / 开发调试栅格专属色 */
  --color-blue: 0 0 255;

  --ink: rgb(var(--color-black));
  --paper: rgb(var(--color-white));
  --muted: rgb(var(--color-gray));
  --klein-blue: rgb(var(--color-grid));

  /* 2. Beaucoup 建筑级物理缓动函数 */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in: cubic-bezier(0.12, 0, 0.39, 0);
  --ease-in-out: cubic-bezier(0.86, 0, 0.07, 1);
  --ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* 3. 流体比例尺与 24 栏几何尺寸 */
  --size: 375;
  --padding-container: 1rem;
  --vw: 100%;                    /* 使用 100% 避免非叠加滚动条下的 100vw 溢出缺陷 */
  --vh: 100dvh;
  --header-height: 4.5rem;       /* 1440px 下精确为 45px */
  --top-header: calc(var(--padding-container) + var(--header-height));

  /* 单栏轨道宽度计算（供特定需要跨出容器的宽度计算使用） */
  --column: calc(var(--vw) / 24 - var(--padding-container) * 2 / 24 - 0.95833rem);

  /* 4. Z-index 层级阶梯 */
  --z-header: 16;
  --z-over-header: 17;
  --z-transition: 19;
  --z-loader: 20;

  /* 5. 商业字体 BwGradual 的无版权几何等气韵替代栈 */
  --font-sans: "Space Grotesk", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (min-width: 768px) {
  :root {
    --size: 768;
    --padding-container: 2rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --size: 1024;
  }
}

@media (min-width: 1200px) {
  :root {
    --size: 1440;
    --padding-container: 3rem;
  }
}

/* --------------------------------------------------------------------------
   Base Reset & Fluid Root Font Size
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border: 0 solid var(--ink);
}

html {
  font-size: calc((100vw / var(--size)) * 10);
  line-height: 1.3;
  -webkit-text-size-adjust: 100%;
  background-color: var(--paper);
  color: var(--ink);
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.2rem;
  line-height: 150%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, ul, ol {
  margin: 0;
  padding: 0;
  font-weight: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

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

/* 焦点可见态（键盘导航规范） */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* [inert] 背景隔离态（模态抽屉开启时禁用底层焦点的同时做轻度退隐） */
[inert] {
  user-select: none;
}

/* --------------------------------------------------------------------------
   Typography Scale Classes (1rem = 10px @ 1440px viewport)
   -------------------------------------------------------------------------- */
.body-8   { font-size: 0.8rem; letter-spacing: 1px; line-height: 120%; }
.body-10  { font-size: 1rem;   letter-spacing: 1px; line-height: 120%; }
.body-12  { font-size: 1.2rem; line-height: 150%; }
.body-14  { font-size: 1.4rem; line-height: 142%; }
.body-15  { font-size: 1.5rem; line-height: 120%; }
.body-18  { font-size: 1.8rem; line-height: 140%; }
.body-20  { font-size: 2rem;   line-height: 125%; }
.body-22  { font-size: 2.2rem; line-height: 118%; }
.body-25  { font-size: 2.5rem; line-height: 120%; }
.body-35  { font-size: 3.5rem; line-height: 115%; }
.body-40  { font-size: 4rem;   line-height: 110%; }
.body-50  { font-size: 5rem;   line-height: 120%; }
.body-60  { font-size: 6rem;   line-height: 120%; }
.body-70  { font-size: 7rem;   line-height: 120%; }
.body-80  { font-size: 8rem;   line-height: 100%; }
.body-120 { font-size: 12rem;  letter-spacing: -0.05rem; line-height: 100%; }
.body-180 { font-size: 18rem;  letter-spacing: -1rem; line-height: 120%; }
.text-250 { font-size: 25rem;  line-height: 1; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.uppercase   { text-transform: uppercase; }
.tracking-tight-05 { letter-spacing: -0.05rem; }
.tracking-zero     { letter-spacing: 0 !important; }

/* --------------------------------------------------------------------------
   Architectural 4x4px Corner Anchor Squares (.square)
   全站最具识别度的视觉符号：4x4px 实心矩形铆钉
   -------------------------------------------------------------------------- */
.square {
  display: block;
  position: absolute;
  width: 0.4rem;
  height: 0.4rem;
  min-width: 0.4rem;
  min-height: 0.4rem;
  max-width: 0.4rem;
  max-height: 0.4rem;
  transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
  pointer-events: none;
}

.square-inline {
  position: static;
  flex-shrink: 0;
}

.square-top-left     { top: 0.8rem;    left: 0.8rem; }
.square-top-right    { top: 0.8rem;    right: 0.8rem; }
.square-bottom-left  { bottom: 0.8rem; left: 0.8rem; }
.square-bottom-right { bottom: 0.8rem; right: 0.8rem; }

.square-dark  { background-color: var(--ink); }
.square-light { background-color: var(--paper); }

/* 工具定位辅助 */
.absolute-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.absolute-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nsb {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.nsb::-webkit-scrollbar {
  display: none;
}

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