/* LumaPost Static Web Companion — Mirrors DESIGN.md "Museum-Atelier Miniature Stage" */

:root {
  --surface-canvas: #f7f5f0;
  --surface-elevated: rgba(255, 255, 255, 0.88);
  --border-hairline: rgba(0, 0, 0, 0.08);
  --text-primary: #161618;
  --text-secondary: #5b5a57;
  --text-on-accent: #ffffff;
  --accent-primary: #1c1c1e;
  --accent-gold: #b88a44;

  --stage-bg-a: #faf3e8;
  --stage-bg-b: #f2dfc4;
  --stage-bg-c: #e8c9a0;
  --stage-ink: #161618;
  --stage-ink-muted: rgba(22, 22, 24, 0.72);
  --plaque-bg: rgba(255, 255, 255, 0.42);
  --plaque-border: rgba(255, 255, 255, 0.55);

  --font-serif: "New York", "Iowan Old Style", Georgia, "Songti SC", "Hiragino Mincho ProN", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-canvas: #0e0f13;
    --surface-elevated: rgba(24, 26, 32, 0.90);
    --border-hairline: rgba(255, 255, 255, 0.14);
    --text-primary: #f5f4f0;
    --text-secondary: #a6a5a0;
    --text-on-accent: #121214;
    --accent-primary: #f2ede4;
    --accent-gold: #d8b26e;
  }
}

/* 12 Theme-Adaptive Stage Palettes (DESIGN.md §2.2) */
body[data-colorway="cream_gold"] { --stage-bg-a: #faf3e8; --stage-bg-b: #f2dfc4; --stage-bg-c: #e8c9a0; --stage-ink: #161618; --stage-ink-muted: #4a4844; --plaque-bg: rgba(255,255,255,0.48); --plaque-border: rgba(255,255,255,0.65); }
body[data-colorway="obsidian_gold"] { --stage-bg-a: #161412; --stage-bg-b: #2a2218; --stage-bg-c: #3f311d; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(230,228,220,0.82); --plaque-bg: rgba(18,20,26,0.52); --plaque-border: rgba(255,255,255,0.16); }
body[data-colorway="crimson_velvet"] { --stage-bg-a: #2b1016; --stage-bg-b: #4a1824; --stage-bg-c: #180b0f; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(235,225,222,0.82); --plaque-bg: rgba(24,11,15,0.52); --plaque-border: rgba(255,255,255,0.16); }

body[data-colorway="ivory_blush"] { --stage-bg-a: #faf4f2; --stage-bg-b: #f2dfe0; --stage-bg-c: #e6ced4; --stage-ink: #161618; --stage-ink-muted: #4a4547; --plaque-bg: rgba(255,255,255,0.50); --plaque-border: rgba(255,255,255,0.68); }
body[data-colorway="noir_champagne"] { --stage-bg-a: #131418; --stage-bg-b: #232127; --stage-bg-c: #322c24; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(230,228,220,0.82); --plaque-bg: rgba(19,20,24,0.52); --plaque-border: rgba(255,255,255,0.16); }
body[data-colorway="emerald_brass"] { --stage-bg-a: #0f1f1b; --stage-bg-b: #1b352d; --stage-bg-c: #101715; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(226,236,232,0.82); --plaque-bg: rgba(15,31,27,0.52); --plaque-border: rgba(255,255,255,0.16); }

body[data-colorway="midnight_frost"] { --stage-bg-a: #0b1324; --stage-bg-b: #162744; --stage-bg-c: #223a5e; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(220,232,248,0.84); --plaque-bg: rgba(11,19,36,0.54); --plaque-border: rgba(255,255,255,0.18); }
body[data-colorway="nordic_ivory"] { --stage-bg-a: #edf3f8; --stage-bg-b: #d8e6f2; --stage-bg-c: #c7d9eb; --stage-ink: #161618; --stage-ink-muted: #424c58; --plaque-bg: rgba(255,255,255,0.54); --plaque-border: rgba(255,255,255,0.72); }
body[data-colorway="ruby_hearth"] { --stage-bg-a: #240f12; --stage-bg-b: #451c1d; --stage-bg-c: #2b1b15; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(242,226,220,0.84); --plaque-bg: rgba(36,15,18,0.54); --plaque-border: rgba(255,255,255,0.16); }

body[data-colorway="vermilion_dusk"] { --stage-bg-a: #1a1221; --stage-bg-b: #3d1c26; --stage-bg-c: #632a24; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(245,228,220,0.84); --plaque-bg: rgba(26,18,33,0.54); --plaque-border: rgba(255,255,255,0.16); }
body[data-colorway="amber_indigo"] { --stage-bg-a: #0d1126; --stage-bg-b: #1c2347; --stage-bg-c: #3b2a26; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(235,232,240,0.84); --plaque-bg: rgba(13,17,38,0.54); --plaque-border: rgba(255,255,255,0.16); }
body[data-colorway="jade_moonlight"] { --stage-bg-a: #0e1c1e; --stage-bg-b: #1a3538; --stage-bg-c: #263b36; --stage-ink: #f5f4f0; --stage-ink-muted: rgba(226,240,238,0.84); --plaque-bg: rgba(14,28,30,0.54); --plaque-border: rgba(255,255,255,0.16); }

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

body {
  font-family: var(--font-sans);
  background: var(--surface-canvas);
  color: var(--text-primary);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Card Fallback Stage Layout */
body.card-stage {
  background: radial-gradient(circle at 20% 20%, var(--stage-bg-b), transparent 55%),
              radial-gradient(circle at 80% 75%, var(--stage-bg-c), transparent 60%),
              linear-gradient(155deg, var(--stage-bg-a) 0%, var(--stage-bg-b) 52%, var(--stage-bg-c) 100%);
  color: var(--stage-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px 32px;
}

.brand-pill {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--stage-ink);
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--plaque-bg);
  border: 1px solid var(--plaque-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-decoration: none;
}

.stage-hero {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: auto 0;
}

.poster-frame {
  width: min(300px, 76vw);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gentleFloat 6s ease-in-out infinite;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.24));
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .poster-frame {
    animation: none;
  }
}

.greeting-plaque {
  width: 100%;
  padding: 20px 24px;
  border-radius: 28px;
  background: var(--plaque-bg);
  border: 1px solid var(--plaque-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.greeting-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 5.2vw, 28px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--stage-ink);
  margin-bottom: 10px;
  word-break: break-word;
}

.greeting-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--stage-ink);
  opacity: 0.92;
  white-space: pre-line;
  word-break: break-word;
}

.greeting-sender {
  margin-top: 14px;
  text-align: right;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--stage-ink-muted);
}

/* CJK Typography Rules (DESIGN.md §3.2): Never italicize CJK/JA/KO */
:lang(zh) .greeting-title,
:lang(ja) .greeting-title,
:lang(ko) .greeting-title {
  font-family: var(--font-sans);
}

:lang(zh) .greeting-body,
:lang(ja) .greeting-body,
:lang(ko) .greeting-body {
  line-height: 1.75;
}

:lang(zh) .greeting-sender,
:lang(ja) .greeting-sender,
:lang(ko) .greeting-sender {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 500;
}

.notice-badge {
  margin-top: 12px;
  font-size: 13px;
  color: var(--stage-ink-muted);
  text-align: center;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 9999px;
  background: var(--plaque-bg);
  border: 1px solid var(--plaque-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--stage-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  margin-top: 20px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cta-pill:hover {
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

/* Landing & Legal Pages */
.page-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.site-brand {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 18px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.hero-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: 28px;
  padding: 40px 32px;
  margin-bottom: 32px;
}

.hero-card h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-card p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 60ch;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  margin-top: 24px;
  border-radius: 9999px;
  background: var(--accent-primary);
  color: var(--text-on-accent);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 16px;
  margin: 28px 0 40px;
}

.theme-tile {
  background: var(--surface-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: 22px;
  padding: 16px;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
}

.theme-tile h3 {
  font-family: var(--font-serif);
  font-size: 17px;
}

.theme-tile p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.legal-doc h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  margin-bottom: 8px;
}

.legal-doc .updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.legal-doc h2 {
  font-size: 19px;
  margin: 24px 0 10px;
}

.legal-doc p,
.legal-doc li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.legal-doc ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.site-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
