:root {
  /* RGB triplet：讓 rgba() 也能吃主題色。
     換色只要改這五行＋下面的 hex，全站跟著走。 */
  --bg-rgb: 7, 10, 15;
  --surface-rgb: 12, 17, 24;
  --ink-rgb: 245, 247, 251;
  --accent-rgb: 52, 245, 197;
  --wash-rgb: 125, 211, 252;
  --bg: rgb(var(--bg-rgb));
  --bg-2: rgb(var(--surface-rgb));
  --panel: rgba(var(--ink-rgb), 0.06);
  --panel-strong: rgba(var(--ink-rgb), 0.1);
  --line: rgba(var(--ink-rgb), 0.14);
  --ink: rgb(var(--ink-rgb));
  --ink-soft: rgba(var(--ink-rgb), 0.78);
  --muted: rgba(var(--ink-rgb), 0.58);
  --accent: rgb(var(--accent-rgb));
  --accent-2: #7dd3fc;
  --dark: #07101f;
  --white: #ffffff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --sans: "Geist", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 112px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(140deg, rgba(var(--accent-rgb), 0.08) 0%, transparent 28%),
    linear-gradient(220deg, rgba(var(--wash-rgb), 0.09) 0%, transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--ink-rgb), 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

.site-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.34'/%3E%3C/svg%3E");
}

.site-main {
  width: 100%;
  max-width: 100%;
  /* hidden 會讓 site-main 變成捲動容器、殺死子層 sticky；clip 同樣裁掉橫向溢出但不建立捲動容器 */
  overflow-x: hidden;
  overflow-x: clip;
}

.top-nav {
  position: fixed;
  z-index: 80;
  top: 18px;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: 62px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand-mark {
  display: grid;
  gap: 1px;
  min-width: 150px;
  padding-left: 18px;
}

.brand-mark span {
  font-size: 15px;
  font-weight: 900;
}

.brand-mark small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.top-nav nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.top-nav nav a,
.dock-pill a {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  transition:
    background 220ms ease,
    color 220ms ease;
}

.top-nav nav a:hover,
.dock-pill a:hover {
  background: rgba(var(--ink-rgb), 0.08);
  color: var(--white);
}

.nav-cta,
.button,
.line-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.nav-cta {
  min-width: 118px;
  padding: 0 20px;
  background: var(--accent);
  color: #06100d;
}

.nav-cta:hover,
.button:hover,
.line-button:hover {
  transform: translateY(-2px);
}

.nav-cta:active,
.button:active,
.line-button:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 120ms;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(36px, 5vw, 88px);
  width: min(1280px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 140px 0 90px;
}

.hero-copy {
  max-width: 72rem;
}

.section-kicker,
.card-label,
.project-type,
.eyebrow,
.line-label,
.tag {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

h1 {
  max-width: 72rem;
  margin-bottom: 24px;
  font-size: clamp(3rem, 4.5vw, 5.4rem);
  line-height: 1.02;
  font-weight: 900;
}

.hero-lead {
  max-width: 760px;
  margin-bottom: 34px;
  color: var(--ink-soft);
  font-size: clamp(1.06rem, 1.7vw, 1.38rem);
  line-height: 1.85;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  min-width: 156px;
  padding: 0 22px;
}

.button-primary {
  background: var(--accent);
  color: #06100d;
  box-shadow: 0 18px 38px rgba(var(--accent-rgb), 0.18);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(var(--ink-rgb), 0.08);
  color: var(--white);
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

.portrait-card,
.hero-system-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portrait-card {
  position: absolute;
  inset: 0 0 auto auto;
  width: min(86%, 430px);
  aspect-ratio: 4 / 5;
}

.portrait-card img,
.hero-system-card img,
.project-media img,
.outcome-media img,
.thread-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.portrait-card img {
  object-position: 50% 34%;
}

.portrait-note {
  position: absolute;
  left: 0;
  bottom: 52px;
  display: grid;
  gap: 4px;
  width: min(360px, 74%);
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--bg-rgb), 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.portrait-note span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.portrait-note strong {
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.2;
}

.hero-system-card {
  position: absolute;
  left: 0;
  right: 4%;
  bottom: 16px;
  aspect-ratio: 16 / 9;
}

.hero-system-card img {
  filter: saturate(1.08) contrast(1.08);
}

.hero-system-card:hover img,
.project-media button:hover img,
.outcome-media button:hover img,
.thread-gallery button:hover img {
  transform: scale(1.05);
}

.marquee-band {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(var(--ink-rgb), 0.04);
}

.marquee-track {
  display: flex;
  flex: 0 0 auto;
  gap: 44px;
  min-width: 100%;
  padding: 24px 22px;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  color: var(--ink-soft);
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 900;
  white-space: nowrap;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.work-section,
.outcome-section,
.projects-section,
.case-gallery-section,
.accordion-section,
.final-cta {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(110px, 14vw, 190px) 0;
}

.section-intro {
  max-width: 920px;
  margin-bottom: 54px;
}

.section-intro h2,
.projects-pin h2,
.final-cta h2,
.service-hero h1,
.section-heading h2 {
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 5vw, 4.9rem);
  line-height: 1.1;
  font-weight: 900;
}

.section-intro p:not(.section-kicker),
.projects-pin p,
.final-cta p,
.service-lead,
.section-heading p:not(.eyebrow) {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.9;
  font-weight: 600;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.bento-card {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--ink-rgb), 0.1), rgba(var(--ink-rgb), 0.04)),
    var(--panel);
  overflow: hidden;
  transition:
    transform 260ms ease,
    border-color 260ms ease,
    background 260ms ease;
}

.bento-card:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.13), rgba(var(--ink-rgb), 0.05)),
    var(--panel);
  transform: translateY(-5px);
}

.bento-wide {
  grid-column: span 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  align-items: end;
  min-height: 270px;
}

.bento-feature {
  grid-column: span 2;
}

.bento-card h3 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 2vw, 2.1rem);
  line-height: 1.24;
  font-weight: 900;
}

.bento-card p:not(.card-label) {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 600;
}

.projects-section {
  width: min(1240px, calc(100% - 40px));
}

.projects-shell {
  display: grid;
  grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
  gap: clamp(32px, 5vw, 76px);
}

.projects-pin {
  position: sticky;
  top: 118px;
}

.project-stack {
  display: grid;
  gap: 72px;
  padding-bottom: 24vh;
}

.project-card {
  --stack-offset: 0px;
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.85fr);
  gap: 28px;
  min-height: 520px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.project-card:nth-child(2) {
  --stack-offset: 0px;
}

.project-card:nth-child(3) {
  --stack-offset: 0px;
}

.project-media,
.thread-gallery {
  min-height: 420px;
}

.project-yuka {
  grid-template-columns: 1fr;
}

.project-yuka .project-media {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.project-yuka .project-copy {
  max-width: 760px;
}

.project-media button,
.thread-gallery button,
.outcome-media button,
.case-tile,
.thread-shot {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.06);
  overflow: hidden;
  cursor: zoom-in;
}

.phone-media {
  max-width: 310px;
  justify-self: center;
}

.phone-media button {
  aspect-ratio: 9 / 16.5;
  height: auto;
}

.phone-media img {
  object-position: top center;
}

.thread-gallery {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

/* 限動工作台：直式影片，尺寸比照 .phone-media 的手機比例 */
.video-media {
  min-height: 0;
  width: 100%;
  min-width: 0;
  max-width: 310px;
  justify-self: center;
  align-self: center;
}

.video-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.06);
}

/* 私訊成交：對話直接用 HTML 畫，不用圖檔。
   ⚠️ 挽心真實私訊永久禁止上架，這裡的內容是依實際流程重現的示範。 */
.dm-media {
  min-height: 0;
  width: 100%;
  min-width: 0;
  max-width: 340px;
  justify-self: center;
  align-self: center;
}

.dm-phone {
  max-width: 100%;
  padding: 16px 15px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(var(--surface-rgb));
  box-shadow: var(--shadow);
}

.dm-note {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
}

.dm-thread {
  display: grid;
  gap: 9px;
}

.dm-in,
.dm-out {
  margin: 0;
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 500;
}

.dm-in {
  justify-self: start;
  border-bottom-left-radius: 5px;
  background: rgba(var(--ink-rgb), 0.07);
  color: var(--ink-soft);
}

.dm-out {
  justify-self: end;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-bottom-right-radius: 5px;
  background: rgba(var(--accent-rgb), 0.12);
  color: #b9ffec;
}

/* 虛擬形象：單欄，文案在上、縮圖牆在中、跑馬燈滿版在下 */
.project-persona {
  grid-template-columns: 1fr;
  gap: 22px;
  overflow: hidden; /* 跑馬燈要被卡片圓角切齊 */
}

.persona-copy {
  max-width: 760px;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.persona-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: transform 500ms ease;
}

.persona-grid img:hover {
  transform: scale(1.04);
}

/* 滿版出血：抵銷 .project-card 的 22px padding */
.persona-marquee {
  display: flex;
  width: calc(100% + 44px);
  margin: 4px -22px 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(var(--ink-rgb), 0.04);
}

.persona-track {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 100%;
  padding: 14px 5px;
  animation: marquee 42s linear infinite;
}

.persona-track img {
  width: 132px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
}

.persona-foot {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* 課程系統：整頁截圖是直式的，用窄欄呈現，不要讓 object-fit 裁掉內容 */
.project-course .project-media {
  min-height: 0;
  width: 100%;
  min-width: 0;
  max-width: 340px;
  justify-self: center;
  align-self: center;
}

.project-course .project-media button {
  aspect-ratio: 1672 / 1858;
  height: auto;
}

.project-course .project-media img {
  object-position: top center;
}

/* LINE 客情：沒有畫面可放（真實私訊不能公開），改用結果數字排版 */
.crm-media {
  min-height: 0;
  width: 100%;
  min-width: 0;
  max-width: 360px;
  justify-self: center;
  align-self: center;
}

.crm-board {
  max-width: 100%;
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(var(--surface-rgb), 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.crm-head {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.crm-total {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 68px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.crm-total small {
  font-size: 20px;
  font-weight: 700;
}

.crm-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.crm-branch {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.crm-num {
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.crm-tag {
  padding: 5px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.crm-tag-alt {
  border-color: rgba(var(--ink-rgb), 0.28);
  background: rgba(var(--ink-rgb), 0.08);
  color: var(--ink-soft);
}

.crm-foot {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* 輪播工作台：橫式介面截圖，用單欄讓截圖夠大看得清 */
.project-carousel {
  grid-template-columns: 1fr;
}

.project-carousel .project-media {
  min-height: 0;
  aspect-ratio: 1672 / 1045;
}

.project-carousel .project-copy {
  max-width: 760px;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.project-copy h3 {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 3.2vw, 3.45rem);
  line-height: 1.08;
  font-weight: 900;
}

.project-copy p:not(.project-type) {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
  font-weight: 600;
}

.project-copy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
  transition:
    transform 220ms ease,
    background 220ms ease;
}

.project-copy a:hover {
  background: rgba(var(--ink-rgb), 0.08);
  transform: translateY(-2px);
}

.project-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  color: var(--accent);
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  font-weight: 900;
}

.project-proof i {
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.metric-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.metric-list span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.outcome-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.outcome-media {
  aspect-ratio: 4 / 3;
  margin-bottom: 2px;
}

.outcome-field {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.outcome-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(1.3rem, 1.9vw, 1.65rem);
  font-weight: 900;
  line-height: 1.15;
}

.outcome-figure em {
  color: var(--accent);
  font-size: clamp(1.85rem, 2.9vw, 2.5rem);
  font-style: normal;
}

.outcome-card p:not(.outcome-field):not(.outcome-figure) {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
  font-weight: 600;
}

.outcome-card .metric-list {
  margin-top: auto;
}

.credential-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outcome-card:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .outcome-grid {
    grid-template-columns: 1fr;
  }

  .outcome-card:last-child {
    grid-column: auto;
  }
}

.accordion-section {
  padding-top: clamp(80px, 10vw, 150px);
}

.case-gallery-section {
  width: min(1240px, calc(100% - 40px));
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.case-tile {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.case-tile.case-wide {
  grid-column: span 2;
}

.case-tile img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  transition: transform 700ms ease;
}

.case-tile:hover img {
  transform: scale(1.05);
}

.case-tile,
.project-media button,
.outcome-media button,
.thread-gallery button {
  transition: transform 140ms var(--ease-out);
}

.case-tile:active,
.project-media button:active,
.outcome-media button:active,
.thread-gallery button:active {
  transform: scale(0.985);
}

.case-tile span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 28px);
  padding: 9px 12px;
  border: 1px solid rgba(var(--ink-rgb), 0.34);
  border-radius: 999px;
  background: rgba(var(--bg-rgb), 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.horizontal-accordion {
  display: flex;
  gap: 12px;
  min-height: 390px;
}

.horizontal-accordion article {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.1), rgba(var(--ink-rgb), 0.04)),
    var(--panel);
  overflow: hidden;
  transition:
    flex 420ms ease,
    background 420ms ease;
}

.horizontal-accordion article:hover {
  flex: 1.75;
  background:
    linear-gradient(160deg, rgba(var(--wash-rgb), 0.17), rgba(var(--ink-rgb), 0.05)),
    var(--panel);
}

.horizontal-accordion h3 {
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 3vw, 3rem);
  line-height: 1.1;
}

.horizontal-accordion p {
  max-width: 320px;
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.8;
  font-weight: 600;
}

.final-cta {
  margin-bottom: 64px;
  padding: clamp(62px, 10vw, 120px);
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.16), rgba(var(--ink-rgb), 0.05)),
    var(--bg-2);
}

.final-cta h2 {
  max-width: 920px;
}

/* 懸浮社群（沿用挽心 FloatingContacts 的做法）。
   ⚠️ 三顆用各平台官方品牌色，不吃主題變數——換配色時不要動它們。 */
.floating-social {
  position: fixed;
  z-index: 70;
  right: 20px;
  bottom: 92px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
  transition: transform 200ms ease;
}

.fs-btn:hover { transform: scale(1.08); }
.fs-btn:active { transform: scale(0.96); }
.fs-btn img { width: 24px; height: 24px; }

.fs-line { background: #06c755; }
.fs-threads { background: #000000; }
.fs-ig {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%
  );
}

.dock-nav {
  position: fixed;
  z-index: 69;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.dock-icon,
.dock-pill {
  border: 1px solid var(--line);
  background: rgba(var(--bg-rgb), 0.74);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.dock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
}

.dock-icon.active {
  background: var(--accent);
  color: #06100d;
}

.dock-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 46px;
  padding: 0 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.site-footer,
footer {
  display: grid;
  gap: 8px;
  padding: 54px 24px 108px;
  color: var(--muted);
  text-align: center;
}

.site-footer strong,
footer strong {
  color: var(--ink);
  font-size: 16px;
}

.fade-in,
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 650ms ease,
    transform 650ms ease;
}

.fade-in.is-visible,
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* hero 首屏改由子元素錯落進場，外層不再整塊淡入 */
.hero-copy.fade-in {
  opacity: 1;
  transform: none;
}

.hero-copy.fade-in > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 650ms ease,
    transform 650ms ease;
}

.hero-copy.fade-in.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.hero-copy.fade-in.is-visible > *:nth-child(2) {
  transition-delay: 70ms;
}

.hero-copy.fade-in.is-visible > *:nth-child(3) {
  transition-delay: 140ms;
}

.hero-copy.fade-in.is-visible > *:nth-child(4) {
  transition-delay: 210ms;
}

.hero-visual.fade-in.is-visible {
  transition-delay: 120ms;
}

.case-lightbox {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  transition:
    opacity 180ms var(--ease-out),
    display 180ms allow-discrete;
}

.case-lightbox.is-open {
  display: flex;
  opacity: 1;
  transition:
    opacity 240ms var(--ease-out),
    display 240ms allow-discrete;
}

.case-lightbox-panel {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb));
  box-shadow: var(--shadow);
  transform: scale(0.97);
  transition: transform 180ms var(--ease-out);
}

.case-lightbox.is-open .case-lightbox-panel {
  transform: none;
  transition: transform 240ms var(--ease-out);
}

/* 開啟第一幀的起始值：舊瀏覽器不認得就直接顯示，等於原本行為 */
@starting-style {
  .case-lightbox.is-open {
    opacity: 0;
  }

  .case-lightbox.is-open .case-lightbox-panel {
    transform: scale(0.97);
  }
}

.case-lightbox img {
  width: 100%;
  max-height: calc(100vh - 132px);
  border-radius: 8px;
  object-fit: contain;
  background: rgb(var(--bg-rgb));
}

.case-lightbox-title {
  margin: 12px 48px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.case-lightbox-close {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(var(--ink-rgb), 0.08);
  color: var(--white);
  cursor: pointer;
}

.service-page {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 130px;
}

.service-hero,
.service-section {
  padding: 58px 0;
}

.back-link,
.scope-link {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.service-lead .quote,
.statement {
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.5;
  font-weight: 900;
}

.scope-grid,
.pricing-grid,
.deliverables,
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scope-grid article,
.deliverables article,
.price-card,
.proof-grid article,
.line-contact-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.scope-grid h3,
.deliverables h3,
.price-card h3,
.proof-grid h3,
.line-contact-card h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.3;
}

.scope-grid p,
.deliverables p,
.price-card p,
.proof-grid p,
.line-contact-card li {
  color: var(--ink-soft);
  line-height: 1.8;
  font-weight: 600;
}

.price-card.featured {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.1);
}

.price {
  color: var(--accent) !important;
  font-size: 32px !important;
  font-weight: 900 !important;
}

.meta {
  color: var(--muted) !important;
}

.deliverables article {
  display: flex;
  gap: 16px;
}

.deliverables span {
  color: var(--accent);
  font-weight: 900;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 16px;
  min-height: 58px;
  color: var(--ink-soft);
  line-height: 1.8;
  font-weight: 700;
}

.timeline span {
  width: 10px;
  height: 10px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.line-contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
}

.line-contact-card ul {
  margin: 0;
  padding-left: 1.2em;
}

.line-button {
  min-width: 150px;
  padding: 0 20px;
  background: var(--accent);
  color: #06100d;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .project-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 980px) {
  .top-nav {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .top-nav nav {
    display: none;
  }

  .hero-section,
  .projects-shell,
  .project-card,
  .bento-wide,
  .line-contact-card {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    padding-top: 130px;
  }

  .hero-visual {
    min-height: 560px;
  }

  .portrait-card {
    right: 0;
    width: min(70%, 320px);
  }

  .hero-system-card {
    right: 10%;
  }

  .projects-pin {
    position: relative;
    top: auto;
  }

  .project-card {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .project-media,
  .thread-gallery {
    min-height: 330px;
  }

  .project-yuka .project-media,
  .project-media {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  /* ⚠️ 上面那條 16/9 是套到「所有」.project-media 的。
     內容不是 16:9 的媒體區必須豁免，否則內容會溢出框、壓到下面的文案。
     （.phone-media 早就有豁免，新增的卡片一樣要加進來。） */
  .video-media,
  .dm-media,
  .crm-media,
  .project-course .project-media {
    aspect-ratio: auto;
    min-height: 0;
    align-self: start;
  }

  .persona-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .persona-track img {
    width: 112px;
  }

  .phone-media {
    width: min(100%, 330px);
  }

  .phone-media {
    aspect-ratio: auto;
  }
}

@media (max-width: 760px) {
  .top-nav {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 56px;
  }

  .brand-mark {
    min-width: 0;
    padding-left: 12px;
  }

  .brand-mark small {
    display: none;
  }

  .nav-cta {
    min-width: 98px;
    padding: 0 14px;
  }

  .hero-section,
  .work-section,
  .projects-section,
  .outcome-section,
  .case-gallery-section,
  .accordion-section,
  .final-cta,
  .service-page {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(2.75rem, 12vw, 4.2rem);
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-visual {
    min-height: 520px;
  }

  .portrait-card {
    left: 50%;
    right: auto;
    width: min(78vw, 330px);
    transform: translateX(-50%);
  }

  .portrait-note {
    left: 50%;
    bottom: 16px;
    width: min(86vw, 340px);
    transform: translateX(-50%);
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .bento-grid,
  .case-gallery,
  .scope-grid,
  .pricing-grid,
  .deliverables,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .bento-wide,
  .bento-feature,
  .case-tile.case-wide {
    grid-column: span 1;
  }

  .persona-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .persona-track img {
    width: 96px;
  }

  .case-tile,
  .case-tile img {
    min-height: 240px;
  }

  .horizontal-accordion {
    display: grid;
    min-height: 0;
  }

  .horizontal-accordion article,
  .horizontal-accordion article:hover {
    flex: none;
    min-height: 190px;
  }

  .final-cta {
    padding: 38px 24px;
  }

  /* 手機不隱藏——這是主要聯絡入口。縮小並避開底部導覽列 */
  .floating-social {
    right: 12px;
    bottom: 78px;
    gap: 8px;
  }

  .fs-btn {
    width: 42px;
    height: 42px;
  }

  .fs-btn img {
    width: 21px;
    height: 21px;
  }

  .dock-nav {
    left: 8px;
    right: 8px;
    bottom: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    transform: none;
    scrollbar-width: none;
  }

  .dock-nav::-webkit-scrollbar {
    display: none;
  }

  .dock-pill {
    min-width: max-content;
  }

  .dock-pill a {
    padding: 9px 10px;
    font-size: 12px;
  }

  .case-lightbox {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  .bento-card,
  .project-card,
  .scope-grid article,
  .deliverables article,
  .price-card {
    padding: 20px;
  }

  .hero-visual {
    min-height: 380px;
  }

  .project-media,
  .thread-gallery {
    min-height: 0;
  }

  .phone-media button {
    aspect-ratio: 9 / 16.5;
  }
}

/* 圖示：手寫 SVG，用 currentColor 才能跟著綠／金主題走。
   不要換成點陣圖：小尺寸會糊，而且兩套主題要各出一份。 */
.bento-icon,
.accordion-icon {
  color: var(--accent);
}

.bento-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
}

.accordion-icon {
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
}

@media (max-width: 760px) {
  .bento-icon { width: 24px; height: 24px; margin-bottom: 10px; }
  .accordion-icon { width: 22px; height: 22px; margin-bottom: 9px; }
}
