/*
 * Beelind 品牌網站的唯一一份樣式（web/site/PLAN.md 第 4 節）。
 * 顏色只用 mobile/src/theme/tokens.ts 的值，字級取自它的 type（16px = 1rem）。
 * check.mjs 會確認每個顏色都在 tokens.ts 裡，並計算下面兩組變數的文字對比（WCAG AA 4.5:1）。
 * 不載入任何外部字型或圖片；只用系統字。
 */

/* 淺色（tokens：paper、ink、crimsonDeep、blush、demo） */
:root {
  --bg: #FFF8F3;          /* paper */
  --surface: #FFFFFF;     /* paperRaised */
  --line: #F6C9D1;        /* blushLine，只當框線 */
  --text: #2B0F17;        /* ink */
  --text-soft: #6F4650;   /* inkSoft */
  --link: #B01E3A;        /* crimsonDeep */
  --notice-bg: #FFE4E8;   /* blush */
  --notice-text: #2B0F17; /* ink */
  --tbd-bg: #FFF0D2;      /* demoBg */
  --tbd-text: #6B4300;    /* demoInk */
  --hero-top: #4A0F24;    /* wine */
  --hero-bottom: #14050B; /* night */
  --hero-text: #FFF1F3;   /* onNight */
  --hero-soft: #E9B9C3;   /* onNightSoft */
  --hero-gold: #F2C46D;   /* gold */
  --focus: #D7263D;       /* crimson */
  --button-bg: #D7263D;   /* crimson（gradients.action 的上端） */
  --button-text: #FFFFFF; /* white */
  color-scheme: light dark;
}

/* 深色（tokens：night、nightRaised、onNight、heartLight） */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14050B;          /* night */
    --surface: #2A0A17;     /* nightRaised */
    --line: #4A0F24;        /* wine，只當框線 */
    --text: #FFF1F3;        /* onNight */
    --text-soft: #E9B9C3;   /* onNightSoft */
    --link: #FF9AA8;        /* heartLight */
    --notice-bg: #4A0F24;   /* wine */
    --notice-text: #FFF1F3; /* onNight */
    --tbd-bg: #FFD58A;      /* goldLight */
    --tbd-text: #14050B;    /* night */
    --hero-top: #4A0F24;
    --hero-bottom: #14050B;
    --hero-text: #FFF1F3;
    --hero-soft: #E9B9C3;
    --hero-gold: #F2C46D;
    --focus: #FFD58A;       /* goldLight */
    --button-bg: #D7263D;
    --button-text: #FFFFFF;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "PingFang TC", "Noto Sans CJK TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 1rem;      /* type.body 16 */
  line-height: 1.5;     /* 24 / 16 */
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
.wordmark {
  font-family: "Hiragino Mincho ProN", "Noto Serif CJK TC", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-weight: 600;
  letter-spacing: 0.0625rem; /* tracking.heading 1 */
}

h1 {
  font-size: 1.625rem;   /* type.title 26 */
  line-height: 1.3846;   /* 36 / 26 */
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;    /* type.heading 20 */
  line-height: 1.4;      /* 28 / 20 */
  margin: 2rem 0 0.75rem;
}

p,
ul,
ol,
table {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-inline-start: 1.5rem;
}

li + li {
  margin-top: 0.25rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.0625rem;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.125rem;
}

:focus-visible {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.125rem;
  border-radius: 0.25rem;
}

.small {
  font-size: 0.8125rem;  /* type.small 13 */
  line-height: 1.4615;   /* 19 / 13 */
}

.soft {
  color: var(--text-soft);
}

/* 跳到主要內容：平常藏起來，鍵盤移到時出現 */
.skip {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--link);
  z-index: 10;
}

.skip:focus {
  top: 0.5rem;
}

/* 版面 */
.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  border-bottom: 0.0625rem solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
}

.wordmark {
  font-size: 1.25rem;
  letter-spacing: 0.1875rem; /* tracking.wordmark 3 */
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: none;
}

main {
  display: block;
  padding: 2rem 0 3rem;
}

.site-footer {
  border-top: 0.0625rem solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--text-soft);
}

.site-footer p {
  margin: 0 0 0.5rem;
}

main.home {
  padding-top: 0;
}

main.home .hero + .wrap {
  padding-top: 1.5rem;
}

/* 首頁的主視覺：純 CSS 的夜色漸層（gradients.night），沒有圖片 */
.hero {
  background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom));
  color: var(--hero-text);
  padding: 2.5rem 0 3rem;
  text-align: center;
}

.hero img {
  width: 8rem;
  height: 8rem;
}

.hero h1 {
  font-size: 2.125rem;   /* type.display 34 */
  line-height: 1.2941;   /* 44 / 34 */
  margin: 0.5rem 0 0.25rem;
  letter-spacing: 0.1875rem;
}

.hero .latin {
  color: var(--hero-gold);
  font-family: Didot, "Bodoni 72", Georgia, serif;
  letter-spacing: 0.1875rem;
  margin: 0 0 1rem;
}

.hero .lead {
  color: var(--hero-soft);
  font-size: 1.25rem;
  line-height: 1.4;
  max-width: 30rem;
  margin: 0 auto;
}

/* 提示框：尚未開放、草稿 */
.notice {
  background: var(--notice-bg);
  color: var(--notice-text);
  border-radius: 0.625rem; /* radius.sm 10 */
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
}

.notice strong {
  font-weight: 700;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* 待填、待定、待提供：醒目的標記 */
.tbd {
  background: var(--tbd-bg);
  color: var(--tbd-text);
  border-radius: 0.25rem;
  padding: 0 0.25rem;
}

/* 還沒有的圖：明確的佔位框 */
.placeholder {
  border: 0.125rem dashed var(--line);
  border-radius: 1rem; /* radius.md 16 */
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-soft);
  background: var(--surface);
  margin: 0 0 1rem;
}

.card {
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
}

.card > :last-child {
  margin-bottom: 0;
}

/* 表格：窄螢幕時可以橫向捲動，不撐破版面 */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border: 0.0625rem solid var(--line);
}

th {
  font-weight: 600;
}

/* 按鈕：連結或表單按鈕都用同一個樣子 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 2.75rem;     /* 觸控目標至少 44px */
  padding: 0.5rem 1.25rem;
  border-radius: 999px;    /* radius.pill */
  border: 0.125rem solid var(--link);
  background: var(--surface);
  color: var(--link);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button.danger {
  background: var(--button-bg);
  border-color: var(--button-bg);
  color: var(--button-text);
}

.button.secondary {
  background: transparent;
}

/* 尚未開放：不是連結，不能按 */
.button[aria-disabled="true"] {
  border-style: dashed;
  border-color: var(--line);
  color: var(--text-soft);
  cursor: not-allowed;
}

.provider-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.provider-buttons li + li {
  margin-top: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

/* 刪除流程「輸入確認文字」的欄位（後端範本 confirm-typed）。框線用 inkSoft：對底色的對比在淺色、深色都超過 3:1。 */
.field {
  margin: 0 0 1rem;
}
.field label {
  display: block;
  font-weight: 600;
  margin: 0 0 0.375rem;
}
.field input {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 0.125rem solid var(--text-soft);
  border-radius: 0.625rem; /* radius.sm 10 */
  padding: 0.625rem 0.75rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 20rem;
}
.field input[aria-invalid="true"] {
  border-color: var(--focus);
}

.card h2:first-child {
  margin-top: 0;
}

li > ul {
  margin: 0.25rem 0 0;
}

@media print {
  .site-nav,
  .skip {
    display: none;
  }
}
