/* 首頁才用得到的樣式；共用的部分在 site.css */

/* ===== 首頁開場 ===== */

.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(2.5rem, 1rem + 6vw, 6rem) var(--space-section);
}

.hero h1 {
  margin-block: 1.1rem 1.5rem;
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--butter) 62%);
}

.lead {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: var(--text-lead);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 2.25rem;
}

.hero-copy > * {
  animation: rise 700ms var(--ease-jelly) backwards;
}

.hero-copy > :nth-child(2) {
  animation-delay: 80ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 160ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 240ms;
}

/* 盤子上的一塊豆腐，旁邊是切下來的幾塊 */
.plate {
  position: relative;
  width: min(100%, 26rem);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, var(--cream-deep) 0 60%, var(--butter) 61% 100%);
  box-shadow: 0 14px 0 var(--line), var(--lift);
}

/* 小豆腐本身在 site.css；這裡只決定它站在盤子的哪裡。跳到最高點時剛好碰到盤緣 */
.plate .tofu-stage {
  position: absolute;
  top: 32%;
  left: 31%;
  width: 38%;
}

.cut {
  position: absolute;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--tofu);
  box-shadow: 0 5px 0 var(--line);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.cut:nth-of-type(1) {
  top: 6%;
  left: -2%;
  transform: rotate(-7deg);
}

.cut:nth-of-type(2) {
  top: 15%;
  right: -4%;
  transform: rotate(5deg);
}

.cut:nth-of-type(3) {
  bottom: 13%;
  left: 0;
  transform: rotate(4deg);
}

.cut:nth-of-type(4) {
  right: -1%;
  bottom: 7%;
  transform: rotate(-5deg);
}

/* ===== 功能：大小不一的豆腐塊 ===== */

.bento {
  display: grid;
  gap: 1.25rem;
}

/* 功能塊裡的示意畫面 */
.rows {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.rows li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--cream);
  font-size: 0.92rem;
  font-weight: 500;
}

.rows li span:first-child {
  margin-right: auto;
}

.pill {
  flex: none;
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.pill--pending {
  background: var(--pending);
}

.pill--delayed {
  background: var(--delayed);
}

.pill--reviewing {
  background: var(--reviewing);
}

.pill--completed {
  background: var(--completed);
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  counter-reset: step;
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem 0.3rem 0.35rem;
  border-radius: 999px;
  background: var(--cream);
  font-size: 0.88rem;
  font-weight: 700;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--wood);
  color: var(--tofu);
  font-family: var(--font-figure);
  font-size: 0.8rem;
}

.sum {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--line);
  font-size: 0.9rem;
  font-weight: 700;
}

.sum b {
  margin-left: auto;
  font-family: var(--font-figure);
  font-size: 1.5rem;
  font-weight: 900;
}

/* ===== 每家事務所一塊 ===== */

.firms {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.addresses {
  display: grid;
  gap: 0.9rem;
}

.addresses li {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--tofu);
  box-shadow: 0 5px 0 var(--line);
  font-family: var(--font-figure);
  font-size: clamp(0.95rem, 0.8rem + 0.8vw, 1.25rem);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.addresses li:nth-child(2) {
  margin-left: clamp(0.75rem, 4vw, 2.5rem);
}

.addresses li:nth-child(3) {
  margin-left: clamp(1.5rem, 8vw, 5rem);
}

.addresses b {
  padding: 0.05rem 0.4rem;
  border-radius: 8px;
  background: var(--butter);
  font-weight: 900;
}

.promises {
  display: grid;
  gap: 1.5rem;
}

.promises li {
  padding-left: 1.5rem;
  border-left: 4px solid var(--butter);
}

.promises h3 {
  font-size: 1.1rem;
  font-weight: 900;
}

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

/* ===== 收費預告 ===== */

.teaser {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  border-radius: 40px;
}

.teaser h2 {
  font-size: var(--text-title);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.teaser .price {
  color: var(--cream);
}

.teaser-note {
  margin-top: 0.75rem;
  font-weight: 700;
}

.teaser .btn {
  justify-self: start;
  border-color: var(--cream);
  background: var(--cream);
  box-shadow: 0 5px 0 var(--butter);
  color: var(--ink);
}

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

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

/* 中等寬度：兩欄，頭尾兩塊各佔一整列 */
@media (min-width: 40rem) and (max-width: 59.99rem) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento > :first-child,
  .bento > :last-child {
    grid-column: span 2;
  }
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .bento {
    grid-template-columns: repeat(12, 1fr);
  }

  .span-7 {
    grid-column: span 7;
  }

  .span-6 {
    grid-column: span 6;
  }

  .span-5 {
    grid-column: span 5;
  }

  .span-4 {
    grid-column: span 4;
  }

  .tall {
    grid-row: span 2;
  }

  .firms {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  .teaser {
    grid-template-columns: 1.2fr auto;
    gap: 3rem;
  }
}
