:root {
  --cream: #f2efe8;
  --paper: #fbfaf6;
  --navy: #142033;
  --navy-deep: #0c1625;
  --navy-soft: #26354a;
  --orange: #d97848;
  --mint: #a7cabb;
  --ink: #182335;
  --ink-muted: #69717c;
  --text-muted: #c5ccd5;
  --line-dark: rgba(20, 32, 51, 0.16);
  --line-light: rgba(251, 250, 246, 0.18);
  --page: min(1240px, calc(100vw - 64px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--navy); }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
main { width: 100%; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }

.page-shell { width: var(--page); margin-inline: auto; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 1000;
  padding: 10px 16px; color: var(--paper); background: var(--navy);
  border-radius: 999px; transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  color: var(--paper); border-bottom: 1px solid var(--line-light);
  background: rgba(12, 22, 37, 0.78); backdrop-filter: blur(14px);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; font-family: "Outfit", sans-serif; font-weight: 700; }
.brand-link img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: rgba(251, 250, 246, 0.74); font-size: 0.88rem; font-weight: 600; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--paper); }

.hero { position: relative; min-height: 92svh; display: grid; align-items: end; color: var(--paper); background: var(--navy); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(10, 19, 32, 0.78) 0%, rgba(10, 19, 32, 0.34) 50%, rgba(10, 19, 32, 0.08) 100%);
}
.hero__media { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.hero__media picture, .hero__media img { display: block; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; object-position: center; filter: saturate(0.72) contrast(0.9) brightness(1.02); }
.hero__inner { position: relative; z-index: 2; padding: 156px 0 88px; }
.hero__copy { max-width: 630px; }
.hero h1, .case-hero h1 {
  margin: 0; font-size: clamp(2.7rem, 5.2vw, 4.8rem); font-weight: 600;
  line-height: 1.15; letter-spacing: -0.045em; text-wrap: balance;
}
.hero__lead, .case-hero__lead {
  max-width: 590px; margin: 24px 0 0; color: rgba(251, 250, 246, 0.82);
  font-size: clamp(1.02rem, 1.45vw, 1.2rem);
}
.text-link {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 28px;
  padding-bottom: 4px; border-bottom: 1px solid currentColor; font-weight: 600;
}
.text-link::after { content: "↗"; font-size: 0.92em; transition: transform 200ms var(--ease); }
.text-link:hover::after { transform: translate(3px, -3px); }
.text-link--light { color: var(--paper); }

.section-label {
  margin: 0; color: var(--orange); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em;
}
.intro-section { padding: clamp(86px, 11vw, 150px) 0; background: var(--cream); }
.intro-grid, .approach-grid, .closing-grid {
  display: grid; grid-template-columns: minmax(130px, 0.32fr) minmax(0, 1.68fr);
  gap: clamp(40px, 8vw, 120px); align-items: start;
}
.intro-grid h2, .section-heading h2, .closing-copy {
  max-width: 820px; margin: 0; font-size: clamp(2rem, 3.7vw, 3.45rem);
  font-weight: 600; line-height: 1.28; letter-spacing: -0.04em; text-wrap: balance;
}
.intro-grid p:last-child { max-width: 680px; margin: 28px 0 0; color: var(--ink-muted); font-size: 1.05rem; }

.case-index { padding: clamp(90px, 12vw, 160px) 0; background: var(--paper); }
.section-heading { display: grid; grid-template-columns: minmax(130px, 0.32fr) minmax(0, 1.68fr); gap: clamp(40px, 8vw, 120px); }
.project-list { display: grid; gap: clamp(100px, 15vw, 190px); margin-top: clamp(64px, 9vw, 110px); }
.project-row { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(310px, 0.78fr); gap: clamp(44px, 8vw, 112px); align-items: end; }
.project-row--reverse { grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr); }
.project-row--reverse .project-row__media { order: 2; }
.project-row--reverse .project-row__body { max-width: 420px; justify-self: end; }
.project-row__media { display: block; height: 560px; overflow: hidden; background: var(--cream); }
.project-row--reverse .project-row__media { height: 660px; }
.project-row__media picture, .project-row__media img { display: block; width: 100%; height: 100%; }
.project-row__media img {
  object-fit: cover; filter: saturate(0.76) contrast(0.92) brightness(1.02);
  transition: transform 700ms var(--ease), filter 300ms ease;
}
.project-row__media:hover img { transform: scale(1.025); filter: saturate(0.86) contrast(0.94) brightness(1.02); }
.project-row__body { padding-bottom: 12px; }
.project-row__meta { margin: 0 0 18px; color: var(--ink-muted); font-size: 0.84rem; }
.project-row h3 { margin: 0; font-size: clamp(2rem, 3.2vw, 3.15rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.04em; }
.project-row__tagline { margin: 20px 0 0; font-size: 1.18rem; font-weight: 600; }
.project-row__copy { max-width: 560px; margin: 14px 0 0; color: var(--ink-muted); }

.approach-section { padding: clamp(86px, 10vw, 132px) 0; color: var(--paper); background: var(--navy); }
.approach-section .section-label { color: var(--mint); }
.approach-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-light); }
.approach-list li {
  display: grid; grid-template-columns: 64px minmax(180px, 0.58fr) minmax(0, 1fr);
  gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--line-light); align-items: start;
}
.approach-list span { color: var(--mint); font-family: "Outfit", sans-serif; font-size: 0.8rem; }
.approach-list strong { font-size: 1.18rem; font-weight: 600; }
.approach-list p { margin: 0; color: var(--text-muted); }

.closing-section { padding: clamp(110px, 14vw, 190px) 0; color: var(--paper); background: var(--navy-deep); }
.closing-section .section-label { color: var(--mint); }
.closing-copy { color: var(--paper); }
.closing-credit { margin: 30px 0 0; color: var(--text-muted); font-size: 0.92rem; }

.button {
  display: inline-flex; min-height: 50px; align-items: center; justify-content: center;
  padding: 0 21px; color: var(--paper); border: 1px solid var(--navy);
  border-radius: 2px; background: var(--navy); font-weight: 700;
  transition: color 200ms ease, background-color 200ms ease, transform 200ms var(--ease);
}
.button:hover { color: var(--navy); background: var(--mint); transform: translateY(-2px); }

/* Case pages */
.case-hero { padding: 138px 0 96px; color: var(--paper); background: var(--navy); }
.case-hero__grid { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr); gap: clamp(48px, 8vw, 112px); align-items: center; }
.case-hero__eyebrow { margin: 0 0 18px; color: var(--mint); font-size: 0.82rem; font-weight: 700; }
.case-hero h1 { font-size: clamp(2.45rem, 4.2vw, 4.1rem); }
.case-hero__media { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--navy-soft); }
.case-hero__media picture, .case-hero__media img { display: block; width: 100%; height: 100%; }
.case-hero__media img { object-fit: cover; filter: saturate(0.76) contrast(0.92) brightness(1.02); }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.case-actions .button { color: var(--navy); border-color: var(--paper); background: var(--paper); }

.chapter { padding: clamp(90px, 11vw, 145px) 0; background: var(--paper); }
.chapter--paper { background: var(--cream); }
.chapter--dark { color: var(--paper); background: var(--navy); }
.section-kicker { margin: 0 0 16px; color: var(--orange); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; }
.chapter--dark .section-kicker { color: var(--mint); }
.section-title { max-width: 830px; margin: 0; font-size: clamp(2rem, 3.7vw, 3.45rem); font-weight: 600; line-height: 1.28; letter-spacing: -0.04em; text-wrap: balance; }
.section-lead { max-width: 680px; margin: 24px 0 0; color: var(--ink-muted); }
.chapter--dark .section-lead { color: var(--text-muted); }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 52px; margin-top: 62px; border-top: 1px solid var(--line-dark); }
.feature-card { display: grid; grid-template-columns: 48px 1fr; gap: 22px; min-height: 250px; padding: 36px 0; border-bottom: 1px solid var(--line-dark); }
.feature-card__number { color: var(--orange); font-family: "Outfit", sans-serif; font-size: 0.8rem; }
.feature-card h3 { margin: 0 0 12px; font-size: clamp(1.45rem, 2vw, 1.9rem); font-weight: 600; line-height: 1.3; }
.feature-card p { margin: 0; color: var(--ink-muted); }

.character-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 58px; }
.character-card { margin: 0; padding: 24px; background: var(--paper); }
.character-card:nth-child(2) { background: #e8f0eb; }
.character-card:nth-child(3) { background: #f5e6db; }
.character-card img { width: 78%; max-height: 280px; margin: 0 auto; object-fit: contain; }
.character-card p { margin: 16px 0 0; text-align: center; font-weight: 600; }

.platform-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.chapter--dark .platform-row .button { color: var(--paper); border-color: rgba(251,250,246,.4); background: transparent; }
.chapter--dark .platform-row .button:hover { color: var(--navy); background: var(--mint); }

.tool-list { margin-top: 64px; border-top: 1px solid var(--line-light); }
.tool-card { display: grid; grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1.58fr); gap: 40px; padding: 36px 0; border-bottom: 1px solid var(--line-light); }
.tool-card__type { margin: 0; color: var(--mint); font-size: 0.82rem; font-weight: 700; }
.tool-card h3 { margin: 0 0 12px; font-size: clamp(1.55rem, 2.3vw, 2.15rem); font-weight: 600; line-height: 1.3; }
.tool-card p { max-width: 760px; margin: 0; color: var(--text-muted); }

.evidence-grid { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.62fr); gap: clamp(36px, 7vw, 96px); margin-top: 58px; align-items: end; }
.media-panel { min-height: 560px; margin: 0; overflow: hidden; background: var(--cream); }
.media-panel picture, .media-panel img { display: block; width: 100%; height: 100%; }
.media-panel img { object-fit: cover; filter: saturate(0.76) contrast(0.92) brightness(1.02); }
.evidence-copy { padding-bottom: 18px; }
.evidence-copy h3 { margin: 0; font-size: clamp(1.7rem, 2.7vw, 2.5rem); font-weight: 600; line-height: 1.3; }
.evidence-copy p { margin: 22px 0 0; color: var(--ink-muted); }

.site-footer { padding: 62px 0 28px; color: var(--paper); border-top: 1px solid var(--line-light); background: var(--navy-deep); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; padding-bottom: 48px; }
.footer-top h2 { margin: 0; font-family: "Outfit", "Noto Sans TC", sans-serif; font-size: clamp(1.9rem, 3vw, 3rem); line-height: 1.15; }
.footer-note { font-size: 0.66em; font-weight: 500; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.footer-links a { color: var(--text-muted); border-bottom: 1px solid rgba(251,250,246,.26); }
.footer-links a:hover { color: var(--paper); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; color: rgba(251,250,246,.5); border-top: 1px solid var(--line-light); font-size: 0.82rem; }

@media (max-width: 980px) {
  :root { --page: min(100% - 40px, 820px); }
  .project-row, .project-row--reverse, .case-hero__grid, .evidence-grid { grid-template-columns: 1fr; }
  .project-row--reverse .project-row__media { order: 0; }
  .project-row--reverse .project-row__body { max-width: none; justify-self: stretch; }
  .project-row__media, .project-row--reverse .project-row__media { height: auto; aspect-ratio: 16 / 10; }
  .case-hero__media { aspect-ratio: 16 / 10; }
  .media-panel { min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 700px) {
  :root { --page: calc(100% - 28px); }
  .site-nav { min-height: 60px; }
  .brand-link span { display: none; }
  .brand-link img { width: 36px; height: 36px; }
  .nav-links { gap: 15px; }
  .nav-links a { font-size: 0.8rem; }
  .hero { min-height: 78svh; }
  .hero::after { background: linear-gradient(0deg, rgba(10,19,32,.88) 0%, rgba(10,19,32,.34) 65%, rgba(10,19,32,.12) 100%); }
  .hero__media img { object-position: 52% center; }
  .hero__inner { padding: 124px 0 54px; }
  .hero h1, .case-hero h1 { font-size: clamp(2.25rem, 10vw, 3rem); line-height: 1.18; }
  .hero__lead, .case-hero__lead { margin-top: 18px; font-size: 1rem; }
  .intro-grid, .section-heading, .approach-grid, .closing-grid { grid-template-columns: 1fr; gap: 26px; }
  .intro-grid h2, .section-heading h2, .closing-copy, .section-title { font-size: clamp(1.9rem, 8.2vw, 2.55rem); }
  .intro-section, .case-index, .approach-section, .closing-section, .chapter { padding: 76px 0; }
  .project-list { gap: 88px; margin-top: 50px; }
  .project-row { gap: 30px; }
  .project-row__media, .project-row--reverse .project-row__media { aspect-ratio: 4 / 5; }
  .project-row h3 { font-size: 2.1rem; }
  .project-row__tagline { margin-top: 14px; font-size: 1.08rem; }
  .approach-list li { grid-template-columns: 42px 1fr; gap: 12px 16px; }
  .approach-list li p { grid-column: 2; }
  .case-hero { padding: 106px 0 64px; }
  .case-hero__grid { gap: 40px; }
  .case-hero__media { aspect-ratio: 4 / 5; }
  .feature-grid { grid-template-columns: 1fr; gap: 0; margin-top: 46px; }
  .feature-card { min-height: 0; grid-template-columns: 38px 1fr; padding: 28px 0; }
  .character-strip { grid-template-columns: 1fr; margin-top: 44px; }
  .tool-list { margin-top: 46px; }
  .tool-card { grid-template-columns: 1fr; gap: 12px; padding: 30px 0; }
  .evidence-grid { margin-top: 44px; }
  .media-panel { aspect-ratio: 4 / 5; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
