/* ==========================================================================
   Case-study template + case index. Editorial layout: hairlines, big serif numerals, generous whitespace.
   ========================================================================== */
.case-main { background: var(--ivory); }
.h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.28; letter-spacing: 0.03em; }
html[lang="en"] .h1, html[lang="en"] .case-hero h1 { letter-spacing: 0; line-height: 1.16; }

/* breadcrumb */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: 0.5; }
.crumbs a { border-bottom: 1px solid transparent; transition: border-color 0.2s, color 0.2s; }
.crumbs a:hover { color: var(--ink); border-color: var(--gold-lo); }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }

/* hero */
.case-hero { position: relative; isolation: isolate; overflow: hidden; padding-block: 28px 76px; background: var(--ivory); }
.case-hero::before { content: none; }
.case-hero-grid { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: clamp(28px, 5vw, 72px); align-items: center; margin-top: 30px; }
.case-hero-copy { display: grid; gap: 22px; justify-items: start; }
.tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.genre-label { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; color: var(--muted); }
.case-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.7rem); line-height: 1.25; letter-spacing: 0.03em; }
.case-hero .lede { max-width: 30em; }
.case-shot { position: relative; margin: 0; border-radius: var(--r); background: var(--paper); box-shadow: none; aspect-ratio: 16 / 9; }
.case-shot img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r);  transform-origin: 40% 40%; }
.case-shot::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); pointer-events: none; }
.stamp { left: -22px; top: -24px; }                         /* the hang tag on the case screenshot */

/* key facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); }
.facts div { padding: 20px 24px 20px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-lo); margin-bottom: 4px; }
.facts dd { font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }   /* long client names (e.g. 文化內容策進院（TAICCA）) wrap inside narrow columns */

/* summary */
.case-summary { padding-block: clamp(64px, 8vw, 100px) clamp(32px, 4vw, 48px); }
.narrow { max-width: 900px; }
.case-summary .eyebrow { margin-bottom: 18px; }
.case-summary .big { font-family: var(--head); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.75; letter-spacing: 0.02em; text-wrap: pretty; }

/* chapters */
.case-story { padding-bottom: clamp(32px, 5vw, 64px); }
.chapter { display: grid; grid-template-columns: 110px minmax(0, 0.8fr) minmax(0, 1.5fr); gap: 12px 40px; padding-block: 48px; border-top: 1px solid var(--line); align-items: start; }
.chap-no { font-family: var(--serif-latin); font-size: 3.6rem; font-weight: 600; line-height: 1; color: var(--gold); letter-spacing: 0.02em; }
.chapter h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); line-height: 1.45; padding-top: 6px; }
.chap-body ul { display: grid; gap: 16px; }
.chap-body li { position: relative; padding-left: 28px; font-size: 1.04rem; line-height: 1.95; color: var(--text); text-wrap: pretty; }
.chap-body li::before { content: ""; position: absolute; left: 3px; top: 0.9em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); }
#outcome .chap-body li::before { transform: none; width: 10px; height: 6px; border-left: 2px solid var(--gold-lo); border-bottom: 2px solid var(--gold-lo); background: none; transform: rotate(-45deg); top: 0.8em; }
.chap-body .sub { margin: 28px 0 14px; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-lo); font-weight: 500; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.metrics div { padding: 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.metrics dd { font-family: var(--serif-latin); font-size: 2.2rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.metrics dt { order: 2; font-size: 0.86rem; color: var(--muted); }
.metrics div { display: grid; }

/* aside */
.case-aside { padding-block: 24px clamp(64px, 8vw, 100px); }
.aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.aside-block h2 { font-family: var(--mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-lo); margin-bottom: 16px; }
.links { display: grid; gap: 12px; }
.links a { font-weight: 700; border-bottom: 1px solid var(--gold-lo); padding-bottom: 2px; }
.svc-links { display: flex; flex-wrap: wrap; gap: 10px; }
.svc-links a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); font-size: 0.95rem; transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s; }
.svc-links a:hover { border-color: var(--gold); background: #fff7e0; transform: translateY(-2px); }
.svc-links .ic { width: 22px; height: 22px; color: var(--gold-lo); }

/* related + index */
.related .work-grid { margin-top: 0; }
.index-head { padding-top: 28px; }
.index-head .section-head { margin-top: 34px; }

/* prev / next */
.pn { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ivory); }
.pn a { display: grid; gap: 4px; padding: 34px 28px; transition: background 0.3s; }
.pn a:hover { background: var(--paper); }
.pn a.r { text-align: right; border-left: 1px solid var(--line); }
.pn small { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; color: var(--gold-lo); }
.pn b { font-family: var(--head); font-size: 1.25rem; }

/* CTA band */
.case-cta .wrap { display: grid; gap: 24px; justify-items: start; }
.case-cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.35; }
.case-cta .btns { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }

@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-1.6%, -1.2%); } }

@media (max-width: 1020px) {
  .case-hero-grid { grid-template-columns: 1fr; }
  .case-shot { order: -1; }
  .stamp { left: 10px; top: -20px; }
  .chapter { grid-template-columns: 70px minmax(0, 1fr); }
  .chapter .chap-body { grid-column: 2; }
  .chap-no { font-size: 2.6rem; grid-row: span 2; }
}
@media (max-width: 640px) {
  .chapter { grid-template-columns: 1fr; padding-block: 36px; }
  .chapter .chap-body { grid-column: 1; }
  .chap-no { grid-row: auto; font-size: 2.2rem; }
  .pn { grid-template-columns: 1fr; }
  .pn a.r { text-align: left; border-left: 0; border-top: 1px solid var(--line); }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div { padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-shot img { animation: none; }
}
