/* ============================================================================
   茶皇乐游 / TEAJOY GAMES · 官网单页样式
   ----------------------------------------------------------------------------
   方向：「一盏茶的仪表」—— 宋式克制 × 仪表精度（出自 brand/teajoy/README.md）

   三条硬约束（改样式前先读）：
   1. 颜色有职能，不是装饰：
        青瓷 #8FC0B4 = 可交互 / 我方（链接、主按钮、焦点）
        金   #C9A24B = 价值与编号（章节号、要点方钉）
        朱砂 #C2402E = 只出现一次 —— 页脚的印章。除此之外任何地方都不许用。
        橙   #F27A42 = 威胁（只在“异色敌人”这一处，借用《双环》的语义色）
   2. 全站零圆角。切角一律 45°（--c 变量控制大小），不用 border-radius。
   3. 可读性优先：正文对比度不低于 4.5:1，`--muted` 与 `--muted-2` 的下限就是按这条定的。
   ========================================================================== */

:root{
  /* 墨（底） */
  --ink:      #101B18;
  --ink-deep: #0A1310;
  --ink-soft: #1D2F29;
  /* 纸（字） */
  --paper:    #EDE6D6;
  /* 职能色 */
  --celadon:  #8FC0B4;
  --gold:     #C9A24B;
  --vermilion:#C2402E;
  --foe:      #F27A42;

  --line:     rgb(237 230 214 / .14);
  --muted:    rgb(237 230 214 / .64);
  --muted-2:  rgb(237 230 214 / .58);

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, "宋体", serif;
  --sans:  "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", system-ui, sans-serif;

  --gut:   clamp(20px, 5vw, 64px);
  --s1: 10px;
  --s2: 18px;
  --s3: 30px;
}

*,*::before,*::after{ box-sizing: border-box; }

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

body{
  margin: 0;
  /* 材质：极轻的斜向渐变（取自品牌应用图标的底板）+ 左上柔光。
     不是装饰 —— 纯色填充会让整块墨底看起来像没有印刷的纸。 */
  /* 注意：这里**故意不用** background-attachment: fixed。
     固定背景在 iOS Safari 上渲染代价高、且常常不重绘，得不偿失 ——
     渐变铺满整个文档高度就够了。 */
  background:
    radial-gradient(78% 52% at 16% -8%, rgb(143 192 180 / .10), transparent 68%),
    linear-gradient(166deg, #1B2D26 0%, var(--ink) 44%, var(--ink-deep) 100%);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* 颗粒：SVG 湍流噪点内联，不引外部文件、不发额外请求 */
.grain{
  position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: .042;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

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

a{ color: var(--celadon); }

/* ---------------------------------------------------------------- 页面骨架 */

.frame{
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gut) 0;
}

/* 两侧的“仪表刻度”：1px 基线 + 每 24px 一格的小刻度。
   只在宽屏出现（窄屏放不下，会挤掉正文）—— 这是「仪表精度」那一半方向。 */
.scale{ position: absolute; top: 0; bottom: 0; width: 7px; display: none; }
@media (min-width: 1200px){ .scale{ display: block; } }
.scale--l{ left: calc(var(--gut) - 22px); }
.scale--r{ right: calc(var(--gut) - 22px); }
.scale::before{
  content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line);
}
.scale--l::before{ left: 0; }
.scale--r::before{ right: 0; }
.scale::after{
  content: ""; position: absolute; top: 0; bottom: 0; width: 6px;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 24px);
}
.scale--l::after{ left: 0; }
.scale--r::after{ right: 0; }

/* ------------------------------------------------------------------ 页头 */

.top{
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: clamp(26px, 4vw, 40px) 0 20px;
}
.brand{ display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
/* 标识用「纸底双色版」（石墨绿环 + 黄铜叶），不是墨底上的单色版 ——
   纸色底板在深墨页面上是整页最亮的一块，视线自然先落在品牌上。
   底板切四个 45° 角，和页脚印章、按钮同一套转角规则。 */
.brand__plate{
  --c: 11px;
  display: grid; place-items: center; flex: none;
  width: 58px; height: 58px; background: var(--paper);
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}
.brand__mark{ display: block; width: 44px; height: 44px; }
.brand__txt{ display: flex; flex-direction: column; gap: 4px; }
.brand__cn{
  font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .16em;
}
.brand__en{
  font-size: 10px; letter-spacing: .42em; color: var(--celadon); text-transform: uppercase;
}

.nav{ display: flex; gap: clamp(14px, 2.6vw, 32px); }
.nav a{
  position: relative; padding: 4px 0; font-size: 13.5px; letter-spacing: .16em;
  color: var(--muted); text-decoration: none;
}
.nav a::after{
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--celadon); transition: right .22s ease;
}
.nav a:hover, .nav a:focus-visible{ color: var(--paper); }
.nav a:hover::after, .nav a:focus-visible::after{ right: 0; }

/* 签名细节：细线末端收在一个方形焊盘上（呼应标识里叶脉的电路走线） */
.trace{ position: relative; height: 1px; margin: 0 0 clamp(46px, 7vw, 84px); background: var(--line); }
.trace__pad{ position: absolute; right: 0; top: -2.5px; width: 6px; height: 6px; background: var(--celadon); }

/* ------------------------------------------------------------------ 首屏 */

.hero{ margin: 0 0 clamp(58px, 8vw, 100px); }
.eyebrow{
  margin: 0 0 20px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
}
.hero__h{
  margin: 0 0 26px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(29px, 5.2vw, 52px); line-height: 1.34; letter-spacing: .05em;
}
.hero__lead{
  margin: 0 0 14px; max-width: 42em;
  font-size: clamp(15px, 1.5vw, 16.5px); line-height: 2; color: var(--muted);
}
.hero__lead b{ color: var(--paper); font-weight: 600; }

.facts{ display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 30px 0 0; padding: 0; list-style: none; }
.facts li{ position: relative; padding-left: 15px; font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.facts li::before{
  content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--gold);
}

/* ------------------------------------------------------------ 章节通用 */

.sec{ margin: 0 0 clamp(60px, 8.5vw, 104px); }
.sec__h{
  display: flex; align-items: baseline; gap: 14px;
  margin: 0 0 clamp(24px, 3.4vw, 40px); padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(19px, 2.3vw, 24px); letter-spacing: .1em;
  position: relative;
}
/* 章节标题下的短青线：告诉眼睛“这一节从这里开始” */
.sec__h::after{
  content: ""; position: absolute; left: 0; bottom: -1px; width: 54px; height: 1px; background: var(--celadon);
}
.sec__n{ font-family: var(--sans); font-size: 11.5px; letter-spacing: .26em; color: var(--gold); }
.sec__en{
  margin-left: auto; font-family: var(--sans); font-size: 10.5px;
  letter-spacing: .34em; color: var(--muted-2); text-transform: uppercase;
}

/* ------------------------------------------------------------ 01 作品 */

.work{ display: grid; grid-template-columns: 1fr; gap: clamp(26px, 3.6vw, 44px); align-items: start; }
@media (min-width: 820px){ .work{ grid-template-columns: minmax(0, 1fr) 286px; } }

.work__t{
  display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(23px, 3.1vw, 33px); letter-spacing: .08em;
}
.work__en{ font-family: var(--sans); font-size: 11.5px; letter-spacing: .32em; color: var(--celadon); }
.work__meta{ margin: 0 0 20px; font-size: 12.5px; letter-spacing: .07em; color: var(--gold); }
.work__desc{ margin: 0 0 22px; max-width: 40em; font-size: 15.5px; line-height: 2; }
.work__desc b{ color: var(--celadon); font-weight: 600; }
.work__desc .foe{ color: var(--foe); font-weight: 600; }

.pts{ display: grid; gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.pts li{ position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.9; color: var(--muted); }
.pts li b{ color: var(--paper); font-weight: 600; }
/* 同样的「焊盘 + 细线」母题，缩到列表项大小。
   焊盘**放在左边**：如果放在线的末端，这个符号就会读成「→」，
   那就正好落进「到处粘箭头」那一类俗套里了。 */
.pts li::before{
  content: ""; position: absolute; left: 0; top: calc(.85em - 2px); width: 4px; height: 4px; background: var(--celadon);
}
.pts li::after{
  content: ""; position: absolute; left: 4px; top: .85em; width: 11px; height: 1px; background: var(--celadon);
}

/* 图片框：四角 45° 切角 + 1px 细描边。主视觉（16:9，占满整列）与游戏截图（窄栏竖图）
   共用同一套框 —— 切角大小由各处的 --c 决定，所以窄栏用小切角、宽图用大切角，
   视觉上两者的斜边长度才接近，不会一大一小显得像两套东西。 */
.shot{ margin: 0; }
.shot__box, .keyart__box{
  --c: 16px;
  position: relative; padding: 1px; background: var(--line);
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
}
.shot__box img, .keyart__box img{
  display: block; width: 100%; height: auto;
  /* 内面比外面再收 2px：45° 的切角被 1px 内缩后，在两条边的坐标和上正好少 2px，
     这样描边的粗细在斜边上才和直边一致（少 1px 会让斜边看起来粗一点）。 */
  clip-path: polygon(calc(var(--c) - 2px) 0, calc(100% - var(--c) + 2px) 0, 100% calc(var(--c) - 2px), 100% calc(100% - var(--c) + 2px), calc(100% - var(--c) + 2px) 100%, calc(var(--c) - 2px) 100%, 0 calc(100% - var(--c) + 2px), 0 calc(var(--c) - 2px));
}
.shot figcaption, .keyart figcaption{
  margin-top: 12px; font-size: 12.5px; line-height: 1.75; letter-spacing: .05em; color: var(--muted-2);
}

/* 主视觉：《双环》在 TapTap 商店用的那张宣传图。放在 01 作品 的章节标题之下、
   详情两栏之上 —— 先让眼睛看见这个游戏长什么样，再读它怎么玩。 */
.keyart{ margin: 0 0 clamp(32px, 4vw, 52px); }
.keyart__box{ --c: 24px; }

/* ------------------------------------------------------------ 02 关于 */

.tenets{
  display: grid; grid-template-columns: 1fr; gap: 1px;
  margin: 0; background: var(--line); border: 1px solid var(--line);
}
@media (min-width: 760px){ .tenets{ grid-template-columns: repeat(3, 1fr); } }
.tenet{ background: var(--ink); padding: clamp(22px, 2.6vw, 32px); }
.tenet dt{
  margin: 0 0 12px; font-family: var(--serif); font-size: 17px;
  font-weight: 600; letter-spacing: .1em;
}
.tenet dt::before{ content: ""; display: block; width: 16px; height: 1px; margin-bottom: 14px; background: var(--gold); }
.tenet dd{ margin: 0; font-size: 13.8px; line-height: 1.95; color: var(--muted); }

/* ------------------------------------------------------------ 03 联系 */

.contact{ margin: 0 0 26px; max-width: 42em; font-size: 15.5px; line-height: 2.05; color: var(--muted); }
.contact b{ color: var(--paper); font-weight: 600; }

/* ------------------------------------------------------------ 按钮 */

.acts{ display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

/* 切角是**描边**不是填充：外层当边线，::before 当内面。
   四个角都切 —— 和品牌印章、标识底板同一套转角规则。
   主按钮（.btn--key）内面直接上青瓷，一个页面只留一个视觉重心。 */
.btn{
  --c: 13px;
  position: relative; display: inline-block; padding: 13px 25px;
  background: var(--celadon); color: var(--paper);
  font-family: var(--sans); font-size: 14px; letter-spacing: .1em; text-decoration: none;
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c));
  transition: color .18s ease;
}
.btn::before{
  content: ""; position: absolute; inset: 1px; background: var(--ink-soft);
  clip-path: polygon(calc(var(--c) - 2px) 0, calc(100% - var(--c) + 2px) 0, 100% calc(var(--c) - 2px), 100% calc(100% - var(--c) + 2px), calc(100% - var(--c) + 2px) 100%, calc(var(--c) - 2px) 100%, 0 calc(100% - var(--c) + 2px), 0 calc(var(--c) - 2px));
  transition: background .18s ease;
}
.btn > span{ position: relative; }
.btn:hover{ color: var(--ink-deep); }
.btn:hover::before{ background: var(--celadon); }
.btn:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; }

.btn--key{ color: var(--ink-deep); font-weight: 600; }
.btn--key::before{ background: var(--celadon); }
.btn--key:hover::before{ background: var(--paper); }

/* ------------------------------------------------------------ 404 */

.nf{ padding: clamp(16px, 3vw, 34px) 0 clamp(56px, 8vw, 96px); }
/* 404 用金：金在这套体系里是「编号」的颜色，错误码也是编号。 */
.nf__code{
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(58px, 13vw, 116px); line-height: 1; letter-spacing: .06em; color: var(--gold);
}
.nf__h{
  margin: 18px 0 14px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(22px, 3.4vw, 32px); letter-spacing: .08em;
}
.nf__p{ margin: 0 0 30px; max-width: 34em; font-size: 15px; line-height: 2; color: var(--muted); }

/* ------------------------------------------------------------ 页脚 */

.foot{
  margin-top: clamp(54px, 8vw, 92px); padding: clamp(30px, 4vw, 46px) 0 60px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: flex-start;
}
/* 朱砂印章：全站唯一一处朱砂。用的是品牌自带的印章文件（阴文：朱砂地 + 纸白标识），
   按品牌规范不旋转、不加投影 —— 它是「盖章」语境，页脚正是这个语境。
   112px 是内部那行「茶皇乐游」还能看清的下限。 */
.foot__seal{ display: block; width: 112px; height: 112px; margin-bottom: 20px; }
.foot__slogan{
  margin: 0; font-family: var(--serif); font-size: 14px; letter-spacing: .22em; color: var(--gold);
}
.foot__legal{ margin: 18px 0 0; font-size: 12.5px; letter-spacing: .05em; color: var(--muted); }
.foot__note{ margin: 4px 0 0; font-size: 12px; letter-spacing: .05em; color: var(--muted-2); }

/* 动效只有悬停/焦点两处；系统要求减少动态时全部关掉 */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ transition: none !important; animation: none !important; }
}
