/* ==========================================================================
   周均叡 Ray 作品集
   設計概念「眉批」：印刷字是作品本體，紅筆手寫字是我自己加的註記。
   每個 token 的理由寫在專案根目錄的 DESIGN.md，要改樣式先改那邊。
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* 色彩：先給 hex（舊瀏覽器用），下面 @supports 再換成 OKLCH 正式值 */
  --bg: #e5f5f3;              /* 紙：淡薄荷 */
  --surface: #f6fcfb;         /* 疊在紙上的那一頁 */
  --fg: #002a2e;              /* 墨：深青 */
  --muted: #415e60;
  --border: #a9c4c2;
  --accent: #e44919;          /* 紅筆：只給大字和記號用（對比 3.5:1） */
  --accent-strong: #c43008;   /* 紅筆寫小字時用（對比 4.9:1） */
  --accent-on-dark: #fd8453;
  --accent-fg: #f6fcfb;
  --highlight: #faea5c;       /* 螢光筆：hover 與選取 */
  --muted-on-dark: #a2bebb;
  --success: #177c49;         /* 狀態色目前沒有用到（頁面沒有表單），先定義好 */
  --warning: #da950b;
  --error: #c2181d;

  /* 字體：歐文走 Bricolage Grotesque，中文走 Noto Sans TC；手寫只給註記 */
  --font-sans: "Bricolage Grotesque", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-hand: "Iansui", "DFKai-SB", "BiauKai", "KaiTi", cursive;

  /* 字級：1.333（完全四度），基準 17px */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.4167rem;
  --t-lg: 1.8889rem;
  --t-xl: 2.5185rem;
  --t-name: clamp(3.75rem, 15.5vw, 13rem);
  --t-role: clamp(2.5rem, 7.2vw, 5.5rem);

  /* 間距：4px 為基準 */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --section-gap: clamp(4rem, 11vw, 9rem);
  --page-pad: clamp(1.25rem, 5vw, 4rem);
  --page-max: 76rem;

  /* 形狀：只有兩種圓角；不用陰影，一律用墨線定邊 */
  --r-sm: 4px;
  --r-pill: 999px;
  --rule: 1.5px;

  /* 動態 */
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 480ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* 焦點環：外圈顏色與和背景之間的空隙 */
  --ring: var(--fg);
  --ring-gap: var(--bg);
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --bg: oklch(0.958 0.018 185);
    --surface: oklch(0.987 0.007 185);
    --fg: oklch(0.26 0.045 205);
    --muted: oklch(0.46 0.035 200);
    --border: oklch(0.8 0.03 190);
    --accent: oklch(0.62 0.2 36);
    --accent-strong: oklch(0.54 0.19 34);
    --accent-on-dark: oklch(0.74 0.16 42);
    --accent-fg: oklch(0.987 0.007 185);
    --highlight: oklch(0.925 0.16 103);
    --muted-on-dark: oklch(0.78 0.03 190);
    --success: oklch(0.52 0.12 155);
    --warning: oklch(0.72 0.15 75);
    --error: oklch(0.52 0.2 27);
  }
}

/* ---------- 基礎 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: light; /* 這一版只設計淺色模式 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

small {
  font-size: var(--t-sm);
}

::selection {
  background: var(--highlight);
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid transparent; /* 高對比模式下仍看得到 */
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ring-gap), 0 0 0 5px var(--ring);
}

.wrap {
  width: min(100% - 2 * var(--page-pad), var(--page-max));
  margin-inline: auto;
}

.skip {
  position: absolute;
  top: var(--s-2);
  left: var(--page-pad);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--fg);
  color: var(--surface);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
}

/* 文字連結：墨線底線，滑過去像被螢光筆畫過 */
.link {
  text-decoration: underline;
  text-decoration-thickness: var(--rule);
  text-underline-offset: 0.24em;
  transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear;
}

.link:hover {
  background-color: var(--highlight);
  color: var(--fg);
}

.link:active {
  text-decoration-thickness: 3px;
}

/* ---------- 頁首 ---------- */
.slug {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-2);
  border-bottom: var(--rule) solid var(--fg);
}

.slug__id {
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.slug__nav {
  display: flex;
  gap: var(--s-2);
  margin-right: calc(-1 * var(--s-2));
}

.slug__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--s-2);
  font-weight: 700;
}

/* ---------- 開頭 ---------- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3.5rem, 8vw, 6.5rem);
}

.hero__name {
  font-size: var(--t-name);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero__latin {
  font-weight: 800;
}

/* 上方留白要容得下斜斜寫上去的「會設計的」 */
.hero__statement {
  margin-top: calc(var(--t-role) * 1.55);
  padding-left: calc(var(--t-role) * 0.5);
}

.hero__role {
  font-size: var(--t-role);
  line-height: 1.1;
  white-space: nowrap;
}

/* 插入號：占一個 0.5em 的位置，掛在左邊的留白裡；手寫字浮在印刷字上方 */
.insert {
  position: relative;
  display: inline-block;
  width: 0.5em;
  height: 0.8em;
  margin-left: -0.5em;
}

.insert__text {
  position: absolute;
  bottom: calc(var(--t-role) * 0.96);
  left: 0;
  color: var(--accent);
  font-family: var(--font-hand);
  font-size: 0.68em;
  line-height: 1;
  transform: rotate(-5deg);
  transform-origin: 0 100%;
}

.insert__caret {
  position: absolute;
  bottom: -0.14em;
  left: 0.02em;
  width: 0.44em;
  height: 0.33em;
  overflow: visible;
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 100%;
}

.hero__fields {
  display: flex;
  flex-wrap: wrap;
  margin-top: var(--s-4);
  font-size: clamp(1.0625rem, 0.6rem + 2.2vw, 1.4167rem);
  font-weight: 700;
}

.hero__proof {
  margin-top: var(--s-4);
  color: var(--muted);
  font-size: var(--t-base);
  line-height: 1.7;
}

.hero__proof strong {
  color: var(--accent-strong);
  font-weight: 900;
}

.hero__fields li:not(:last-child)::after {
  content: "・";
  color: var(--muted);
}

.hero__fields a {
  display: inline-block;
  padding-block: var(--s-2);
}

/* ---------- 作品區 ---------- */
.works {
  padding-bottom: var(--section-gap);
  scroll-margin-top: var(--s-3);
}

.works__title {
  margin-bottom: var(--s-3);
  font-size: var(--t-xl);
  font-weight: 900;
  line-height: 1.2;
}

/* 頁籤：檔案夾的索引標籤。往下捲時黏在頂端，隨時可以換頁 */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: var(--s-1);
  padding-top: var(--s-2);
  background: var(--bg);
  border-bottom: var(--rule) solid var(--fg);
}

html:not(.js) .tabs {
  display: none;
}

.tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 3rem;
  margin: 0 0 calc(-1 * var(--rule));
  padding: var(--s-3) var(--s-1);
  border: var(--rule) solid transparent;
  border-bottom: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: clamp(0.875rem, 4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tab__label {
  display: inline-block;
  padding-inline: 0.2em;
  transition: background-color var(--dur-fast) linear;
}

.tab:hover {
  color: var(--fg);
}

.tab:hover .tab__label {
  background-color: var(--highlight);
}

.tab:active .tab__label {
  transform: translateY(1px);
}

/* 選中的那一張：接到下面的內頁上（不只靠顏色，形狀也不同） */
.js[data-tab="ecommerce"] #tab-ecommerce,
.js[data-tab="video"] #tab-video,
.js[data-tab="games"] #tab-games {
  border-color: var(--fg);
  background: var(--surface);
  color: var(--fg);
  cursor: default;
}

.js[data-tab="ecommerce"] #tab-ecommerce .tab__label,
.js[data-tab="video"] #tab-video .tab__label,
.js[data-tab="games"] #tab-games .tab__label {
  background-color: transparent;
  transform: none;
}

.panel {
  padding: clamp(1rem, 4vw, 3rem);
  border: var(--rule) solid var(--fg);
  border-top: 0;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  background: var(--surface);
}

.panel:focus-visible {
  box-shadow: inset 0 0 0 3px var(--fg);
}

.js .panel {
  display: none;
}

.js[data-tab="ecommerce"] #panel-ecommerce,
.js[data-tab="video"] #panel-video,
.js[data-tab="games"] #panel-games {
  display: block;
}

/* 沒有 JavaScript 時三區直接排開，各自顯示標題 */
html:not(.js) .panel {
  margin-bottom: var(--s-6);
  border-top: var(--rule) solid var(--fg);
  border-radius: var(--r-sm);
}

.panel__title {
  margin-bottom: var(--s-3);
  font-size: var(--t-lg);
  font-weight: 900;
  line-height: 1.3;
}

.js .panel__title {
  display: none;
}

/* 紅筆眉批 */
.note {
  width: fit-content;
  margin-bottom: var(--s-5);
  color: var(--accent-strong);
  font-family: var(--font-hand);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.35;
  transform: rotate(-1.5deg);
  transform-origin: 0 50%;
}

/* 只會在 file:// 直接開檔時出現的說明（由 main.js 插入） */
.localnote {
  max-width: 40em;
  margin-bottom: var(--s-5);
  padding: var(--s-3) var(--s-4);
  outline: 2px dashed var(--muted);
  outline-offset: -2px;
  font-size: var(--t-sm);
  line-height: 1.7;
}

/* ---------- 電商設計 ---------- */
.shots {
  --shot-ratio: 1 / 1; /* 商品圖不是正方形時改這裡，例如 4 / 5 */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}

/* 細邊框：白底商品圖放在近白色的內頁上，邊界才看得出來 */
.shot figure {
  position: relative;
  height: 100%;
  aspect-ratio: var(--shot-ratio);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.shot a {
  display: block;
  height: 100%;
  cursor: zoom-in;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 手機（640px 以下）：不論幾張都是兩欄等大；圖區抵銷面板內距，讓每張在 375px 仍有 160px 以上 */
@media (max-width: 39.999rem) {
  .shots {
    gap: var(--s-2);
    margin-inline: calc(-1 * clamp(1rem, 4vw, 3rem));
  }
}
@media (min-width: 40rem) {
  .shots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* 6 張：第一張 2×2，其餘五張繞著它 */
  .shots:has(> :nth-child(6):last-child) > :first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .shots:has(> :nth-child(6):last-child) > :last-child {
    grid-column: auto;
  }

  /* 5 張：上排 2 張、下排 3 張 */
  .shots:has(> :nth-child(5):last-child) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .shots:has(> :nth-child(5):last-child) > * {
    grid-column: span 2;
  }

  .shots:has(> :nth-child(5):last-child) > :nth-child(-n + 2) {
    grid-column: span 3;
  }

  /* 4 張：第一張占三欄，其餘三張直排在右邊 */
  .shots:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .shots:has(> :nth-child(4):last-child) > :first-child {
    grid-column: span 3;
    grid-row: span 3;
  }
}

.toolnote {
  display: grid;
  gap: var(--s-3) var(--s-7);
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: var(--rule) solid var(--fg);
}

.toolnote__title {
  font-size: var(--t-lg);
  font-weight: 900;
  line-height: 1.3;
}

.toolnote__title span,
.contact__title span {
  display: inline-block; /* 換行只會發生在詞組之間 */
}

.toolnote p {
  max-width: 34em;
  text-wrap: pretty;
}

@media (min-width: 52rem) {
  .toolnote {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* ---------- AI 影音 ---------- */
.videos {
  display: grid;
  gap: var(--s-7) var(--s-6);
}

.video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--fg);
}

.video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video__play {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: var(--r-sm);
}

.video__play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 播放鈕：墨色圓鈕放正中央，不會壓到縮圖四周的字幕 */
.video__chip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: auto;
  border-radius: var(--r-pill);
  background: var(--fg);
  color: var(--surface);
  transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear;
}

.video__chip svg {
  width: 0.9rem;
  height: 1.05rem;
  margin-left: 0.15rem; /* 三角形視覺重心偏左，往右補一點 */
  fill: currentColor;
}

.video__play:hover .video__chip {
  background: var(--highlight);
  color: var(--fg);
}

.video__play:active .video__chip {
  transform: translateY(1px);
}

/* 縮圖顏色不可控，焦點環用黃＋墨雙層，疊在任何圖上都看得到 */
.video__play:focus-visible {
  box-shadow: none;
}

.video__play:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 3px var(--highlight), inset 0 0 0 6px var(--fg);
}

.video__title {
  margin-top: var(--s-3);
  font-weight: 700;
  line-height: 1.5;
}

.nowrap {
  white-space: nowrap; /* 型號這類字串不要從中間斷行 */
}

@media (min-width: 52rem) {
  .videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 第二支往下錯開半格，像貼在樣張上的兩張照片 */
  .video:nth-child(even) {
    margin-top: var(--s-8);
  }
}

/* ---------- 插畫（不裁切；長條圖依比例縮放，點擊在新分頁開大圖） ---------- */
.illus-block {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: var(--rule) solid var(--fg);
}

.illus-block__title {
  margin-bottom: var(--s-5);
  font-size: var(--t-lg);
  font-weight: 900;
  line-height: 1.2;
}

.illus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-3);
}

.illus a {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
  cursor: zoom-in;
}

.illus img {
  display: block;
  width: 100%;
  height: auto; /* 保留原比例，不裁切 */
}

@media (min-width: 40rem) {
  .illus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* ---------- 網頁小遊戲 ---------- */
.game {
  display: grid;
  gap: var(--s-5);
}

.game + .game {
  margin-top: var(--s-8);
}

.game__media {
  width: min(100%, 18rem);
}

.game__media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--fg);
  object-fit: contain; /* 影片比例固定 9:16，不裁切 */
}

.game__press {
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 1.7;
}

/* 遊玩數據：大數字 + 小字補充 */
.game__stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s-2);
  font-weight: 700;
}

.game__num {
  color: var(--accent-strong);
  font-size: var(--t-xl);
  font-weight: 900;
  line-height: 1.1;
}

.game__stat-sub {
  flex-basis: 100%;
  color: var(--muted);
  font-size: var(--t-sm);
  font-weight: 400;
}

.game__source {
  margin-top: var(--s-7);
  color: var(--muted);
  font-size: var(--t-sm);
}

.game__body {
  display: grid;
  justify-items: start;
  gap: var(--s-5);
}

.game__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-5);
}

.game__name {
  font-size: clamp(2.25rem, 1.2rem + 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
}

/* 印章 */
.stamp {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border: 2px solid currentColor;
  border-radius: var(--r-sm);
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-decoration: none;
  transform: rotate(-6deg);
}

.stamp::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid currentColor;
}

.stamp:hover {
  background: var(--highlight);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 3rem;
  padding: var(--s-3) var(--s-5);
  border: var(--rule) solid var(--fg);
  border-radius: var(--r-sm);
  background: var(--fg);
  color: var(--accent-fg);
  font-size: var(--t-base);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear;
}

.btn:hover {
  background: var(--highlight);
  color: var(--fg);
}

.btn:active {
  transform: translateY(1px);
}

.btn__arrow {
  margin-left: var(--s-1);
}

@media (min-width: 52rem) {
  .game {
    grid-template-columns: 18rem minmax(0, 1fr);
    align-items: end;
    gap: var(--s-7);
  }

  /* 第二款左右對調，文字仍貼著影片那一側 */
  .game--flip {
    grid-template-columns: minmax(0, 1fr) 18rem;
  }

  .game--flip .game__media {
    order: 2;
  }

  .game--flip .game__body {
    justify-items: end;
    text-align: right;
  }

  .game--flip .game__heading {
    justify-content: flex-end;
  }
}

/* ---------- 聯絡 ---------- */
.contact,
.foot {
  --ring: var(--highlight);
  --ring-gap: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.contact__inner {
  display: grid;
  gap: var(--s-7);
  padding-block: var(--section-gap) clamp(3rem, 8vw, 6rem);
}

.contact__title {
  font-size: clamp(2.75rem, 8.4vw, 6.75rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.contact__list {
  display: grid;
  gap: var(--s-5);
}

.contact__row dt {
  color: var(--muted-on-dark);
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
}

.contact__row dd {
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.contact__row a {
  display: inline-block;
  padding-block: var(--s-2);
}

.contact__more {
  margin-top: var(--s-5);
  color: var(--muted-on-dark);
  font-size: var(--t-sm);
}

.contact__more a {
  display: inline-block;
  padding-block: var(--s-2);
}

.contact__more .link:hover {
  color: var(--fg);
}

@media (min-width: 60rem) {
  .contact__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: var(--s-8);
  }
}

.foot {
  color: var(--muted-on-dark);
  font-size: var(--t-sm);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-1) var(--s-5);
  padding-block: var(--s-3);
  border-top: 1px solid var(--muted);
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* ---------- 動態：只在使用者沒有要求減少動態時才動 ---------- */
@keyframes mark-in {
  from {
    opacity: 0;
    transform: scaleY(0.3);
  }
}

@keyframes write-in {
  from {
    clip-path: inset(-25% 100% -25% -5%);
  }
  to {
    clip-path: inset(-25% -5% -25% -5%);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* 整頁唯一的進場動畫：先落下插入號，再把「會設計的」寫上去 */
  .insert__caret {
    animation: mark-in var(--dur) var(--ease-out) 450ms backwards;
  }

  .insert__text {
    animation: write-in var(--dur-slow) var(--ease-out) 620ms backwards;
  }

  .panel.is-entering > * {
    animation: panel-in var(--dur) var(--ease-out) backwards;
  }

  .tab__label,
  .video__chip,
  .btn,
  .btn__arrow,
  .stamp {
    transition-property: background-color, color, transform;
    transition-duration: var(--dur-fast), var(--dur-fast), var(--dur);
    transition-timing-function: linear, linear, var(--ease-out);
  }

  .btn:hover .btn__arrow {
    transform: translateX(4px);
  }

  .stamp:hover {
    transform: rotate(-2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel.is-entering > * {
    animation: fade-in var(--dur-fast) linear backwards;
  }
}

/* ---------- 寬螢幕的版面調整 ---------- */
@media (min-width: 40rem) {
  .tab {
    flex: 0 0 auto;
    padding-inline: var(--s-5);
  }
}

@media (min-width: 52rem) {
  /* 定位句往右推三分之一，和左上角的名字形成對角線 */
  .hero__statement {
    margin-left: 33.333%;
  }
}
