/* 產品首頁與收費頁（tax-tofu.com）。沒有 script，樣式只有這一份。
   顏色沿用系統本身（apps/web/src/index.css）：奶油底、白豆腐、木頭色的字。 */

:root {
  --cream: #fff9e3;
  --cream-deep: #fff3c4;
  --butter: #ffe8a0;
  --tofu: #ffffff;
  --wood: #8b7355;
  --wood-dark: #6b5640;
  --ink: #4a3c2e;
  --ink-soft: #6f5f4f;
  --line: #e8dcc8;
  --line-soft: #f0e8d8;
  /* 小豆腐的眼睛，原作者用的顏色 */
  --eye: #54473f;

  /* 任務狀態的顏色，跟系統裡的一樣 */
  --pending: #ffe8a0;
  --delayed: #ffd0cc;
  --reviewing: #c0dfff;
  --completed: #c8e8b8;

  --font-body: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-figure: 'Nunito', var(--font-body);

  --text-hero: clamp(1.9rem, 1rem + 4.2vw, 4.4rem);
  --text-title: clamp(1.7rem, 1.2rem + 2vw, 2.6rem);
  --text-lead: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem);

  --space-section: clamp(4rem, 2.5rem + 6vw, 8rem);
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  --wide: 72rem;

  --thick: 0 7px 0 var(--line);
  --lift: 0 22px 40px rgba(107, 86, 64, 0.14);
  --ease-jelly: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --fast: 180ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  background-color: var(--cream);
  /* 方格帳本紙 */
  background-image: linear-gradient(rgba(139, 115, 85, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 115, 85, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--wood);
  outline-offset: 3px;
  border-radius: 10px;
}

/* 一句話切成幾段，換行只會落在段落之間 */
.phrase {
  display: inline-block;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

/* ===== 上方公告與選單 ===== */

.notice {
  padding: 0.5rem var(--gutter);
  background: var(--wood-dark);
  color: var(--cream);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  text-decoration: none;
}

/* 選單上的小豆腐：平常只眨眼，滑過去才跳 */
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 22%;
  background: var(--cream-deep);
}

.brand-mark .tofu-stage {
  width: 66%;
}

.brand-mark .tofu {
  animation: none;
}

.brand:hover .tofu,
.brand:focus-visible .tofu {
  animation: jelly-bounce 1.5s infinite;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-sub {
  display: none;
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
}

.site-nav li a {
  display: block;
  padding: 0.4rem 0.65rem;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--fast) ease;
}

.site-nav li a:hover,
.site-nav li a[aria-current='page'] {
  background: var(--cream-deep);
}

/* ===== 按鈕與標籤 ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border: 2px solid var(--wood-dark);
  border-radius: 18px;
  background: var(--wood-dark);
  box-shadow: 0 5px 0 var(--ink);
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--fast) var(--ease-jelly), box-shadow var(--fast) ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 var(--ink);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn--quiet {
  background: var(--tofu);
  box-shadow: 0 5px 0 var(--line);
  border-color: var(--line);
  color: var(--ink);
}

.btn--quiet:hover {
  box-shadow: 0 8px 0 var(--line);
}

.btn--quiet:active {
  box-shadow: 0 1px 0 var(--line);
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border: 1.5px dashed var(--wood);
  border-radius: 999px;
  color: var(--wood-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.soon::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 3px;
  background: var(--wood);
  animation: blink 2.4s ease-in-out infinite;
}

.eyebrow {
  color: var(--wood);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3em;
}

/* ===== 段落標題 ===== */

.section {
  padding-bottom: var(--space-section);
}

.section-head {
  display: grid;
  gap: 0.75rem;
  max-width: 40rem;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.section-head h2,
.page-head h1 {
  font-size: var(--text-title);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.section-head p,
.page-head p {
  color: var(--ink-soft);
  font-size: var(--text-lead);
}

.page-head p {
  max-width: 38rem;
}

/* 段落最後一行不要只剩一兩個字 */
p {
  text-wrap: pretty;
}

/* ===== 豆腐塊：兩頁共用的白色方塊 ===== */

.block {
  position: relative;
  padding: clamp(1.4rem, 1rem + 1.2vw, 2.25rem);
  border: 1px solid var(--line-soft);
  border-radius: 30px;
  background: var(--tofu);
  box-shadow: var(--thick);
  transition: transform 320ms var(--ease-jelly), box-shadow 320ms ease;
}

.block:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: var(--thick), var(--lift);
}

.block h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.block p {
  color: var(--ink-soft);
}

.block-no {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--wood);
  font-family: var(--font-figure);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.block--butter {
  border-color: var(--butter);
  background: var(--cream-deep);
  box-shadow: 0 7px 0 var(--butter);
}

.block--butter:hover {
  box-shadow: 0 7px 0 var(--butter), var(--lift);
}

.block--wood {
  border-color: var(--wood-dark);
  background: var(--wood-dark);
  box-shadow: 0 7px 0 var(--ink);
  color: var(--cream);
}

.block--wood:hover {
  box-shadow: 0 7px 0 var(--ink), var(--lift);
}

.block--wood p,
.block--wood .block-no {
  color: var(--cream-deep);
}

/* ===== 小豆腐：原作者啟動畫面上的那一塊 =====
   形狀、顏色和動作都照原作者的設計，只把 px 換成比例：
   原本豆腐寬 100px，這裡 1cqw 就是豆腐寬的百分之一。 */

.tofu-stage {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tofu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20%;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20%;
  background: var(--tofu);
  box-shadow: 0 8cqw 0 rgba(0, 0, 0, 0.05);
  animation: jelly-bounce 1.5s infinite;
}

.tofu::before,
.tofu::after {
  content: '';
  width: 10%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--eye);
  animation: blink 3s infinite;
}

.tofu-shadow {
  width: 60%;
  height: 10cqw;
  margin-top: 20cqw;
  border-radius: 50%;
  background: rgba(84, 71, 63, 0.1);
  animation: shadow-scale 1.5s infinite;
}

@keyframes jelly-bounce {
  0%,
  100% {
    transform: scale(1, 1) translateY(0);
  }
  30% {
    transform: scale(1.15, 0.8) translateY(0);
  }
  50% {
    transform: scale(0.85, 1.2) translateY(-60%);
  }
  70% {
    transform: scale(1.05, 0.95) translateY(0);
  }
}

@keyframes shadow-scale {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.8);
    opacity: 0.2;
  }
}

@keyframes blink {
  0%,
  90%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

/* ===== 價格 ===== */

.price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-figure);
  font-weight: 900;
  line-height: 1;
}

.price small {
  font-size: 1.05rem;
  font-weight: 800;
}

.price strong {
  font-size: clamp(3.4rem, 2rem + 6vw, 5.5rem);
  letter-spacing: -0.04em;
}

.price span {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
}

/* ===== 頁尾 ===== */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding-block: 2.25rem 3rem;
  border-top: 2px dashed var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.site-foot strong {
  margin-right: auto;
  color: var(--ink);
  font-family: var(--font-figure);
  font-weight: 900;
  letter-spacing: 0.4em;
}

/* ===== 動態 ===== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== 寬一點的畫面 ===== */

@media (min-width: 40rem) {
  .site-nav {
    gap: 1rem;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-mark {
    width: 2.5rem;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-sub {
    display: inline;
  }

  .site-nav li a {
    padding: 0.45rem 0.9rem;
  }
}
