/* ============================================================
   玉言堂 GEM-IMC — Official Site
   Cinematic E direction · Dark palette · Scroll-driven
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-feature-settings: "palt" 1;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.02em;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Design tokens (CSS variables) ---------- */
:root {
  /* Type */
  --font-body: "Noto Sans TC", "PingFang TC", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;

  /* Palette: cinematic dark (default) */
  --bg:        #0e0e10;
  --bg-2:      #18181c;
  --bg-3:      #22232a;
  --fg:        #e6e2d6;
  --fg-muted:  rgba(230, 226, 214, 0.62);
  --fg-faint:  rgba(230, 226, 214, 0.28);
  --line:      rgba(230, 226, 214, 0.10);
  --line-2:    rgba(230, 226, 214, 0.20);
  --accent:    #c44a2a;
  --accent-2:  #d97a3a;

  /* Layout */
  --gutter: clamp(20px, 4vw, 64px);
  --max-w: 1640px;
  --chapter-pad-y: clamp(80px, 14vh, 180px);
}

/* Light mode override */
body.light {
  --bg:        #f6f4ef;
  --bg-2:      #ffffff;
  --bg-3:      #ece8de;
  --fg:        #18181c;
  --fg-muted:  rgba(24, 24, 28, 0.62);
  --fg-faint:  rgba(24, 24, 28, 0.28);
  --line:      rgba(24, 24, 28, 0.10);
  --line-2:    rgba(24, 24, 28, 0.20);
}

/* Palette variants (Tweaks-controlled) */
body.palette-ember {
  --accent:    #c44a2a;
  --accent-2:  #d97a3a;
}
body.palette-jade {
  --accent:    #5a8a6e;
  --accent-2:  #82b298;
}
body.palette-amber {
  --accent:    #d4a534;
  --accent-2:  #e8c668;
}
body.palette-cobalt {
  --accent:    #3253ff;
  --accent-2:  #5f7bff;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--accent);
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-faint);
}

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 7vw, 96px); font-weight: 400; letter-spacing: -0.025em; }
h2 { font-size: clamp(34px, 5.4vw, 72px); font-weight: 400; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.4vw, 32px); }
h4 { font-size: clamp(16px, 1.4vw, 18px); }

p { margin: 0; text-wrap: pretty; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.7; color: var(--fg-muted); max-width: 60ch; }
.small { font-size: 13px; color: var(--fg-muted); }

::selection { background: var(--accent); color: #fff; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.chapter {
  position: relative;
  padding: var(--chapter-pad-y) 0;
  border-top: 1px solid var(--line);
}
.chapter-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(24px, 4vw, 80px);
  margin-bottom: clamp(48px, 7vw, 96px);
  align-items: start;
}
.chapter-head .col-meta { padding-top: 8px; }
.chapter-head .col-meta .label { display: block; margin-top: 8px; font-size: 12px; color: var(--fg-muted); }

@media (max-width: 720px) {
  .chapter-head { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Top nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0));
  transition: transform 0.4s cubic-bezier(.22,.61,.36,1), background-color 0.3s;
}
body.light .nav { background: linear-gradient(to bottom, rgba(255,255,255,0.7), rgba(255,255,255,0)); }
.nav.hidden { transform: translateY(-100%); }
.nav.solid {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
}
.brand .logo-mark-img {
  flex-shrink: 0;
  display: block;
  width: auto;
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.brand:hover .logo-mark-img { transform: scale(1.05); }
/* White logo PNG → invert to dark when the site is in light mode */
body.light .brand .logo-mark-img { filter: invert(1); }
.brand .logo-mark-svg {
  flex-shrink: 0;
  display: block;
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.brand:hover .logo-mark-svg { transform: scale(1.06) rotate(-2deg); }
.brand .logo-mark {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--fg);
}
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand .brand-text .zh { font-family: var(--font-body); font-size: 14px; letter-spacing: 0.2em; }
.brand .brand-text .en { font-size: 9px; color: var(--fg-muted); letter-spacing: 0.3em; margin-top: 2px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 28px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-menu a {
  position: relative;
  color: var(--fg-muted);
  transition: color 0.2s;
  padding: 6px 0;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--fg); }
.nav-menu a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
}

.nav-cta {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.nav-cta:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.nav-hamburger { display: none; }
@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
  }
  .nav-hamburger .bar { display: block; width: 14px; height: 1px; background: var(--fg); position: relative; }
  .nav-hamburger .bar::before, .nav-hamburger .bar::after {
    content: ""; position: absolute; left: 0; width: 14px; height: 1px; background: var(--fg);
  }
  .nav-hamburger .bar::before { top: -4px; }
  .nav-hamburger .bar::after { top: 4px; }
}

/* Mobile menu sheet */
.menu-sheet {
  position: fixed; inset: 0;
  z-index: 60;
  background: var(--bg);
  padding: 80px var(--gutter) 40px;
  display: none;
  flex-direction: column;
  gap: 0;
}
.menu-sheet.open { display: flex; }
.menu-sheet .close {
  position: absolute; top: 18px; right: var(--gutter);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 18px;
}
.menu-sheet a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  font-weight: 400;
}
.menu-sheet a .n { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  border: 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.55) contrast(1.05);
  will-change: transform;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, var(--bg) 100%),
    linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0.1));
}

/* Ken Burns animation */
body.hero-anim-kenburns .hero-bg img {
  animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.05) translate(-1%, 0); }
  to   { transform: scale(1.18) translate(2%, -1%); }
}

/* Parallax (default) — handled by JS, smooth transform */
body.hero-anim-parallax .hero-bg img { transition: none; }

/* Static */
body.hero-anim-static .hero-bg img { transform: none; animation: none; }

/* Mist fade */
body.hero-anim-mist .hero-bg img { animation: mist-pulse 14s ease-in-out infinite alternate; }
body.hero-anim-mist .hero-bg::before {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 30%, rgba(14,14,16,0.45) 100%);
  animation: mist-shift 10s ease-in-out infinite alternate;
}
@keyframes mist-pulse {
  from { filter: brightness(0.5) contrast(1.05) blur(0px); }
  to   { filter: brightness(0.62) contrast(1.0) blur(1px); }
}
@keyframes mist-shift {
  from { transform: scale(1.0); opacity: 0.6; }
  to   { transform: scale(1.15); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 100px var(--gutter) 40px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-top {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1100px;
}
.hero-top .eyebrow { color: rgba(255,255,255,0.7); margin-bottom: 28px; }
.hero-top .eyebrow::before { background: var(--accent); }
.hero-top h1 {
  color: #f6f4ef;
  font-size: clamp(40px, 8vw, 110px);
  line-height: 1.04;
  margin-bottom: 28px;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.hero-top h1 .ink { color: var(--accent-2); }
.hero-top .hero-sub {
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.75;
  color: rgba(246,244,239,0.78);
  max-width: 56ch;
}

.hero-bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: end;
  color: rgba(246,244,239,0.7);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-bottom .meta-block { display: flex; flex-direction: column; gap: 4px; }
.hero-bottom .meta-block .v { font-size: 12px; color: #f6f4ef; }

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(246,244,239,0.7);
}
.scroll-cue .line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(246,244,239,0.7));
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0.2; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.2; }
}

/* Hero side rail with vertical brand */
.hero-rail {
  position: absolute;
  left: max(12px, calc(var(--gutter) - 34px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(246,244,239,0.5);
  pointer-events: none;
}
@media (max-width: 1200px) { .hero-rail { display: none; } }

/* ---------- Marquee strip ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.marquee-track {
  display: flex;
  gap: 64px;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.marquee-track .dot { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- About chapter ---------- */
.about-quote {
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--fg);
  max-width: 26ch;
  margin: 0 0 56px;
  text-wrap: balance;
}
.about-quote .em { color: var(--accent); font-style: normal; }
.about-quote::before {
  content: "“";
  display: block;
  font-size: 1.6em;
  line-height: 0.8;
  color: var(--accent);
  margin-bottom: 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 32px;
}
.about-grid > div {
  background: var(--bg);
  padding: 32px;
}
.about-grid h3 {
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.about-grid h3 .y { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.2em; }
.about-grid p { color: var(--fg-muted); font-size: 14px; line-height: 1.7; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Big numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > div {
  background: var(--bg);
  padding: 40px 24px;
  text-align: left;
}
.stats .n {
  font-family: var(--font-body);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stats .n .unit { font-size: 0.28em; color: var(--accent); font-weight: 500; letter-spacing: 0.1em; }
.stats .l { display: block; margin-top: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--fg-muted); text-transform: uppercase; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Services chapter ---------- */
.svc-list {
  display: flex;
  flex-direction: column;
}
.svc-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 60px;
  gap: clamp(16px, 3vw, 56px);
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  cursor: pointer;
  transition: padding 0.3s, background-color 0.3s;
  position: relative;
}
.svc-row:first-child { border-top: 1px solid var(--line); }
.svc-row:hover { background: var(--bg-2); }
.svc-row:hover .svc-arrow { color: var(--accent); transform: translate(4px, -4px); }
.svc-row .svc-n { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); letter-spacing: 0.2em; padding-top: 6px; }
.svc-row .svc-title { display: flex; flex-direction: column; gap: 6px; }
.svc-row .svc-title h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; }
.svc-row .svc-title .en { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; }
.svc-row .svc-desc { color: var(--fg-muted); font-size: 15px; line-height: 1.7; max-width: 50ch; }
.svc-row .svc-desc ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.svc-row .svc-desc li {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em;
  color: var(--fg-muted); text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px;
}
.svc-row .svc-arrow {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--fg-muted);
  align-self: start;
  transition: transform 0.3s, color 0.3s;
  padding-top: 4px;
}
@media (max-width: 900px) {
  .svc-row { grid-template-columns: 32px 1fr 28px; }
  .svc-row .svc-desc { grid-column: 2 / 4; }
}

/* ---------- Works chapter ---------- */
.works-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.works-filter button {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-muted);
  transition: all 0.2s;
}
.works-filter button:hover { color: var(--fg); border-color: var(--fg-muted); }
.works-filter button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 2vw, 28px) clamp(16px, 2vw, 28px);
}
.work-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: default;
  transition: opacity 0.4s;
}
.work-card.alt-3 { grid-column: span 4; }
.work-card.alt-12 { grid-column: span 12; }
.work-card.hide { display: none; }

.work-image {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-3);
}
.work-card.alt-12 .work-image { aspect-ratio: 21/9; }
.work-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1);
  filter: saturate(0.96);
}
.work-card:has(a.work-image) { cursor: pointer; }
.work-card:has(a.work-image):hover .work-image img { transform: scale(1.06); }
.work-image::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), rgba(0,0,0,0) 50%);
  pointer-events: none;
}
.work-image .cat {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(0,0,0,0.55);
  color: #f6f4ef;
  backdrop-filter: blur(8px);
  border-radius: 2px;
}
.work-image .yr {
  position: absolute;
  bottom: 14px; right: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #f6f4ef;
}
.work-image.placeholder {
  background: repeating-linear-gradient(45deg, var(--bg-3) 0 12px, var(--bg-2) 12px 24px);
  display: grid;
  place-items: center;
}
.work-image.placeholder::before {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  text-transform: uppercase;
  z-index: 2;
}

/* Representative-photo overlay tag for case cards with stock placeholders */
.work-image .placeholder-tag {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(196, 74, 42, 0.85);
  color: #fff;
  backdrop-filter: blur(4px);
  border-radius: 2px;
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.work-meta .client { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--fg-muted); text-transform: uppercase; }
.work-meta h3 {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 400;
}
.work-card.alt-12 .work-meta h3 { font-size: clamp(28px, 3vw, 42px); }
.work-meta .tag { font-size: 14px; color: var(--fg-muted); margin-top: 2px; }

@media (max-width: 900px) {
  .work-card, .work-card.alt-3, .work-card.alt-12 { grid-column: span 12; }
}

/* ---------- Awards chapter ---------- */
.award-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.award-tabs button {
  padding: 12px 0;
  color: var(--fg-muted);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.award-tabs button.active { color: var(--fg); border-bottom-color: var(--accent); }

.award-row {
  display: grid;
  grid-template-columns: 80px 1fr 2fr 1fr 1fr;
  gap: clamp(12px, 2vw, 32px);
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  font-size: 15px;
}
.award-row:hover { background: var(--bg-2); }
.award-row.hide { display: none; }
.award-row .yr { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.award-row .nm { font-size: 17px; font-weight: 400; }
.award-row .agency { color: var(--fg-muted); font-size: 14px; }
.award-row .work-link { font-size: 13px; color: var(--fg-muted); }
.award-row .work-link:hover { color: var(--fg); }
.award-row .cat { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--fg-muted); text-transform: uppercase; text-align: right; }
@media (max-width: 900px) {
  .award-row { grid-template-columns: 60px 1fr; gap: 4px 16px; padding: 18px 0; }
  .award-row .agency, .award-row .work-link, .award-row .cat { grid-column: 2; }
}

/* ---------- Clients chapter ---------- */
.clients-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 96px);
}
@media (max-width: 900px) { .clients-cols { grid-template-columns: 1fr; } }
.clients-col h3 { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.clients-col h3 .n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.2em; }
.clients-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.clients-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 15px;
  color: var(--fg);
  font-feature-settings: "palt" 1;
}
.clients-list li:hover { color: var(--accent); }

/* ---------- News chapter ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: border-color 0.2s, transform 0.4s cubic-bezier(.22,.61,.36,1);
  cursor: pointer;
}
.news-card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.news-card .news-meta { display: flex; justify-content: space-between; align-items: baseline; }
.news-card .cat { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; padding: 4px 8px; background: var(--bg-3); color: var(--fg-muted); }
.news-card .cat.cat-award { color: var(--accent); }
.news-card .date { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.news-card h3 { font-size: 19px; font-weight: 400; line-height: 1.4; }
.news-card p { color: var(--fg-muted); font-size: 14px; line-height: 1.65; }
.news-card .more { margin-top: auto; font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Contact chapter ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 96px);
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px 24px;
  margin: 32px 0 0;
}
.contact-info dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-muted); padding-top: 4px; }
.contact-info dd { margin: 0; font-size: 16px; line-height: 1.6; }
.contact-info dd a:hover { color: var(--accent); }

.form-grid { display: grid; gap: 16px; margin-top: 32px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-muted);
}
.form-row input, .form-row select, .form-row textarea {
  font: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--fg);
  padding: 8px 0;
  outline: none;
  transition: border-color 0.2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); }
.form-row textarea { resize: vertical; min-height: 100px; }
.form-row select { appearance: none; background-image: linear-gradient(to bottom, transparent, transparent); }
.form-row.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) { .form-row.two-up { grid-template-columns: 1fr; } }
.form-submit {
  margin-top: 16px;
  padding: 16px 24px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
  align-self: start;
}
.form-submit:hover { background: var(--accent-2); transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px var(--gutter) 40px;
  background: var(--bg-2);
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr; } }
.footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer ul a { color: var(--fg); font-size: 14px; }
.footer ul a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
@media (max-width: 600px) { .footer-bottom { flex-direction: column; gap: 8px; } }

/* ---------- Section dividers (cinematic full-bleed image bands) ---------- */
.divider {
  position: relative;
  height: 82vh;
  min-height: 560px;
  overflow: hidden;
}
.divider img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* 預設略偏上，避免人物頭部被裁掉；個別圖可用 inline style 微調 */
  object-position: center 38%;
  will-change: transform;
}
.divider::after {
  content: "";
  position: absolute; inset: 0;
  background:
    /* 上下淡出縮短，少遮到主體 */
    linear-gradient(to bottom, var(--bg) 0%, rgba(0,0,0,0) 13%, rgba(0,0,0,0) 86%, var(--bg) 100%),
    /* 只在左下壓暗以保證文字可讀，右側人物維持明亮 */
    linear-gradient(to top, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.18) 34%, rgba(0,0,0,0) 58%),
    linear-gradient(to right, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0.10) 42%, rgba(0,0,0,0) 66%),
    /* 全域壓暗 0.25 → 0.08 */
    rgba(0,0,0,0.08);
}
.divider .divider-text {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  bottom: 60px;
  max-width: 800px;
  color: #f6f4ef;
}
.divider .divider-text .eyebrow { color: rgba(246,244,239,0.6); }
.divider .divider-text h2 {
  color: #f6f4ef;
  margin-top: 16px;
}

/* ---------- Scroll-reveal helpers ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.22,.61,.36,1), transform 0.9s cubic-bezier(.22,.61,.36,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* Line-by-line reveal (split text approximation, by spans) */
.split-line {
  display: block;
  overflow: hidden;
}
.split-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(.22,.9,.3,1);
}
.split-line.in > span { transform: none; }
.split-line.d1 > span { transition-delay: 0.1s; }
.split-line.d2 > span { transition-delay: 0.2s; }
.split-line.d3 > span { transition-delay: 0.3s; }

/* ---------- Progress indicator (right side) ---------- */
.progress-rail {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}
.progress-rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  color: var(--fg-muted);
  transition: color 0.2s;
}
.progress-rail a:hover, .progress-rail a.active { color: var(--fg); }
.progress-rail .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid var(--fg-muted);
  background: transparent;
  transition: background 0.2s, border-color 0.2s, width 0.2s;
}
.progress-rail a.active .dot { background: var(--accent); border-color: var(--accent); width: 14px; border-radius: 4px; }
.progress-rail .lbl {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.progress-rail a:hover .lbl, .progress-rail a.active .lbl { opacity: 1; transform: none; }
@media (max-width: 900px) { .progress-rail { display: none; } }

/* ---------- About images / placeholders ---------- */
.about-imagery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 16px;
  margin-top: 64px;
}
.about-imagery > div {
  position: relative;
  overflow: hidden;
}
.about-imagery > div:nth-child(1) { grid-row: span 2; }
.about-imagery img { width: 100%; height: 100%; object-fit: cover; }
.about-imagery .placeholder {
  background: repeating-linear-gradient(45deg, var(--bg-3) 0 12px, var(--bg-2) 12px 24px);
  display: grid;
  place-items: center;
}
.about-imagery .placeholder span {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--fg-muted); text-transform: uppercase;
}
@media (max-width: 720px) {
  .about-imagery { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px; }
  .about-imagery > div:nth-child(1) { grid-row: span 1; grid-column: span 2; }
}

/* ---------- Toast / utility ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  padding: 12px 20px; border-radius: 4px;
  font-size: 14px; z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translate(-50%, -8px); }
.toast { max-width: min(92vw, 520px); line-height: 1.65; text-align: center; }
.toast.error { background: #B3261E; }
.toast.error.show { pointer-events: auto; }
.toast.error a { color: #fff; text-decoration: underline; }

/* 蜜罐欄位：擋機器人灌信，真人看不到 */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 送出中狀態 */
.form-submit[disabled] { opacity: 0.55; cursor: progress; }
