/* ========== daily-movie v2 · 放映厅 ==========
 *
 * Design spec: notes/daily-movie-v2-design-thinker.md v1.1
 *
 * 视觉哲学：推开放映厅的门 → 坐下 → 灯关了 → 银幕亮了
 * 3 色：paper #F5F1E8 主背景 · ink #0A0A0A 文字 · gold #B8985A 唯一 accent
 * 单字体家族：Cormorant Garamond (Latin) + Noto Serif SC (CJK)
 * Dark-only（放弃 light mode）
 *
 * Phase 1（骨架）：token + 字体加载 + 基础排版 + splash 降级
 */

/* --- 字体（self-host Cormorant latin subset + Noto Serif SC 中文 subset）---
 *
 * Cormorant Garamond：
 *  - Google Fonts v21 服务端对 Cormorant Garamond 的 400/500/600/700 供的是同一个文件
 *    （已核实：所有非-italic weight 指向同一个 URL），因此这里只 self-host 1 个 latin subset 文件，
 *    通过 CSS font-weight: 400 500 range 让浏览器对 500 触发 synthetic-bold（faux bold）
 *  - Italic 同理，只 self-host 1 个 latin italic subset 文件
 *  - unicode-range 与 Google Fonts latin subset 完全一致
 *
 * Noto Serif SC：
 *  - self-host 中文常用字符 subset（由 scripts/subset-noto-serif-sc.mjs 生成）
 *  - 400 为实际轮廓，500 靠浏览器 synthetic-bold；中文笔画复杂，faux-bold 足够营造字重层次
 *  - unicode-range 覆盖 CJK 常用区 + 中文标点 + 全角符号
 */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 500;
  font-display: block;
  src: url("/fonts/CormorantGaramond-Regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400 500;
  font-display: block;
  src: url("/fonts/CormorantGaramond-Italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 400 500;
  font-display: block;
  src: url("/fonts/NotoSerifSC-Regular.subset.woff2") format("woff2");
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+3000-303F, U+FF00-FFEF;
}

:root {
  /* 3 色系统（v2 妥协：paper 主背景 / ink 文字 / gold 唯一 accent） */
  --paper: #F5F1E8;
  --ink: #0A0A0A;
  --gold: #B8985A;

  /* 单字体家族 */
  --font-serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", Georgia, serif;

  /* 极端留白 */
  --pad-v: 15vh;
  --pad-h: 8vw;

  /* 层次（仅尺寸 + 字重 + 位置） */
  --size-hero: clamp(2.5rem, 5vw, 4.5rem);   /* 电影标题 hero 48-72px */
  --size-detail: clamp(3rem, 8vw, 6rem);     /* 详情大标题 96px */
  --size-body: 1.125rem;                     /* 18px 正文 */
  --size-caption: 0.875rem;                  /* 14px 副文 */
  --size-label: 0.75rem;                     /* 12px 日期 uppercase letter-spacing */

  /* 兼容旧组件（v1.1 遗留 token，v2 之后 Phase 3 收尾会一并删掉） */
  --bg-primary: var(--paper);
  --bg-secondary: var(--paper);
  --bg-card: var(--paper);
  --text-primary: var(--ink);
  --text-secondary: var(--ink);
  --text-muted: rgba(10, 10, 10, 0.55);
  --accent: var(--gold);
  --accent-hover: var(--gold);
  --border: rgba(10, 10, 10, 0.12);
  --divider: rgba(10, 10, 10, 0.08);
  --shadow: none;
  --shadow-hover: none;
  --radius: 0;
  --radius-lg: 0;
  --radius-sm: 0;
  --font-family: var(--font-serif);
  --font-mono: ui-monospace, monospace;
}

html {
  color-scheme: light;
  background: var(--paper);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--size-body);
  line-height: 1.8;
  letter-spacing: -0.02em;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

img {
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
}

/* Headings — 单字体，尺寸 + 字重分层 */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

h1 { font-size: var(--size-hero); }
h2 { font-size: calc(var(--size-hero) * 0.7); }
h3 { font-size: calc(var(--size-hero) * 0.5); }

/* Links — 极简，无颜色区分，只用下划线偏移 */

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

a:hover {
  border-bottom-color: var(--ink);
}

/* Gold accent — 唯一处使用 */

.accent-gold,
blockquote::before,
blockquote::after,
.quote-mark {
  color: var(--gold);
}

/* Splash — §5.3 降级提示，字体加载失败/超时时展示 */

.v2-splash {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  z-index: 9998;
  font-family: Georgia, "Songti SC", serif;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(10, 10, 10, 0.55);
  letter-spacing: 0.02em;
}

.v2-splash.visible {
  display: flex;
}

/* Focus visible */

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* Skip link */

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--ink);
  color: var(--paper) !important;
  padding: 8px 16px;
  font-family: var(--font-serif);
  font-weight: 500;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 8px;
}

/* Selection */

::selection {
  background: var(--gold);
  color: var(--paper);
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scale: none !important;
  }
}
