/* ===========================================================
   偶之十章 — 基礎樣式
   palette: warm-dark editorial（呼應 Patagonia activism）
   =========================================================== */

:root {
  /* 主色（取自 wireframe） */
  --c-oil:    #D4A04A;  /* 油燈黃 — 傳統 */
  --c-gold:   #C8332E;  /* 金光紅 — 電視時代 */
  --c-screen: #3A6FB5;  /* 螢幕冷藍 — 當代 */
  --c-future: #6B4E9F;  /* 推測紫 — 未來 */

  /* 編輯式深色背景 */
  --bg-0:     #14110f;  /* 主背景，近黑帶暖 */
  --bg-1:     #1c1815;
  --bg-2:     #2a231d;
  --line:     #3a322a;

  /* 文字 */
  --fg-0:     #f3ece0;  /* 主文字，米白 */
  --fg-1:     #d8cfc1;
  --fg-2:     #948a7c;  /* 次級灰 */
  --fg-mute:  #5e564b;

  /* 系統 */
  --max-w:    1400px;
  --gap:      clamp(1rem, 2.5vw, 2rem);
  --pad-x:    clamp(1.25rem, 5vw, 4rem);

  /* 字體 */
  --f-serif:  "Noto Serif TC", "Source Han Serif TC", "PingFang TC", "Songti TC", serif;
  --f-sans:   "Noto Sans TC", "Source Han Sans TC", "PingFang TC", -apple-system, "Segoe UI", sans-serif;
  --f-mono:   "IBM Plex Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  /* 動效 */
  --ease:     cubic-bezier(.2, .7, .2, 1);
  --t-fast:   .25s;
  --t-mid:    .5s;
  --t-slow:   .9s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--c-oil) var(--bg-0);
  scrollbar-width: thin;
}

body {
  font-family: var(--f-sans);
  font-weight: 350;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-0);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

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

::selection { background: var(--c-oil); color: var(--bg-0); }

/* ----- 字體層級（Patagonia 風：壓縮顯示字＋編輯襯線） ----- */
.display {
  font-family: var(--f-serif);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}

h1, .h1 {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}

h2, .h2 {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.015em;
}

h3, .h3 {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
}

h4, .h4 {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

p { max-width: 65ch; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--fg-1); }
.eyebrow {
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* ----- 版面工具 ----- */
.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.wrap-narrow {
  max-width: 880px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  border: 0;
  margin-block: 3rem;
}

.tag {
  display: inline-block;
  padding: .25em .7em;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* ----- 動效共用 ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
