/* 衡泰貴金屬官網 */
:root {
  --paper: #FAF8F4;
  --paper-warm: #F3EEE6;
  --card: #FFFFFF;
  --line: #E4DDD1;
  --ink: #17293B;
  --ink-muted: #56636F;
  --navy: #103154;
  --navy-hover: #1C486F;
  --navy-deep: #0B2340;
  --gold: #E0B686;
  --gold-text: #8A5D2B;
  --on-navy: #FAF8F4;
  --on-navy-muted: rgba(250, 248, 244, .66);
  --on-navy-line: rgba(250, 248, 244, .14);
  --line-green: #07883E;
  --line-green-hover: #066F33;
  --line-green-text: #066F33;

  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --num: "Inter", "Noto Sans TC", sans-serif;

  --shell: min(1200px, 100% - 80px);
  --header-h: 72px;
  --r-tag: 4px;
  --r-btn: 10px;
  --r-card: 16px;
  --shadow: 0 1px 2px rgba(16, 49, 84, .06), 0 12px 32px rgba(16, 49, 84, .08);
  --shadow-lift: 0 2px 4px rgba(11, 35, 64, .08), 0 24px 56px rgba(11, 35, 64, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Brushed champagne: static metal used for lines and badges. */
  --metal: linear-gradient(90deg, #B8894F 0%, #E0B686 26%, #F7E7CC 50%, #E0B686 74%, #B8894F 100%);
  --metal-diag: linear-gradient(135deg, #C99A5E 0%, #F2D9B3 42%, #D9AB72 62%, #B8894F 100%);
  --glint: rgba(247, 231, 204, .95);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.85 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
svg { flex: 0 0 auto; }

.shell { width: var(--shell); margin-inline: auto; }

.num {
  font-family: var(--num);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px; left: 12px;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: var(--navy);
  color: var(--on-navy);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.kicker {
  margin: 0 0 20px;
  color: var(--gold-text);
  font: 500 13px/1.6 var(--sans);
  letter-spacing: .16em;
}

/* Signature: the balance line, a gold hairline with a centre mark. */
.balance,
.rule {
  position: relative;
  height: 9px;
  background: var(--metal) center / 100% 1px no-repeat;
}
.balance::after,
.rule::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 7px; height: 7px;
  border: 1px solid var(--gold);
  background: var(--paper);
  transform: translate(-50%, -50%) rotate(45deg);
}
.balance { width: 168px; margin: 28px 0; transform-origin: center; animation: balance-draw 700ms 200ms var(--ease) both; }

/* Seal corners, drawn from the logo's bracket frame. */
.corners { position: relative; }
.corners::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  --c: rgba(224, 182, 134, .5);
  --l: 18px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--l);
  background-repeat: no-repeat;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font: 700 16px/1 var(--sans);
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms var(--ease), box-shadow 150ms ease;
}
.btn svg { width: 20px; height: 20px; }
.btn svg:not(.line-brand-icon) { fill: currentColor; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy); color: var(--on-navy); }
.btn-primary:hover { background: var(--navy-hover); }
.btn-primary svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.btn-line { background: var(--navy-deep); color: var(--on-navy); border-color:var(--gold); }
.btn-line svg:not(.line-brand-icon) { color:#06C755; }
.btn-line:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.btn-line:hover { background: var(--navy); border-color:var(--gold); }

/* Utility bar (desktop only, scrolls away) */
.utility-bar { background: var(--navy-deep); color: var(--on-navy-muted); font-size: 13px; }
.utility-inner { height: 36px; display: flex; align-items: center; justify-content: space-between; }
.utility-inner p { margin: 0; display: flex; gap: 24px; }
.utility-inner a { color: var(--gold); }
.utility-inner a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 244, .92);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(16, 49, 84, .05); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }

.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.seal {
  --s: 44px;
  display: grid; place-items: center;
  width: var(--s); height: var(--s);
  overflow: hidden;
  border-radius: var(--r-tag);
  background: var(--navy);
}
/* Original vector mark is centred with equal margins in the brand square. */
.seal img { display: block; width: 64%; height: 64%; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name b { color: var(--navy); font: 700 20px/1.2 var(--serif); letter-spacing: .14em; }
.brand-name small { margin-top: 3px; color: var(--gold-text); font-size: 10px; font-weight: 500; letter-spacing: .3em; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.site-nav a { font-size: 15px; color: var(--ink); }
.site-nav a:not(.nav-line):not(.nav-tel) { position: relative; padding-block: 6px; }
.site-nav a:not(.nav-line):not(.nav-tel)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 220ms var(--ease);
}
.site-nav a:not(.nav-line):not(.nav-tel):hover { color: var(--navy); }
.site-nav a:not(.nav-line):not(.nav-tel):hover::after { transform: scaleX(1); }
.nav-line {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border: 1px solid var(--gold-text);
  border-radius: var(--r-btn);
  background:transparent;
  color: var(--navy);
  font-weight: 700;
  transition: background-color 150ms ease, color 150ms ease;
}
.nav-line svg { width: 18px; height: 18px; }
.nav-line svg:not(.line-brand-icon) { fill:currentColor; color:#06C755; }
.site-nav .nav-line { color:var(--navy); }
.nav-line:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.site-nav .nav-line:hover { background:var(--navy-deep); color:var(--on-navy); }
.nav-tel { display: none; }
.menu-button { display: none; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 80px 104px;
  background: radial-gradient(900px 520px at 12% 8%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%), var(--paper);
}
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
.hero-copy { position: relative; z-index: 2; grid-column: 1 / span 6; animation: rise 500ms var(--ease) both; }
.hero h1 { margin: 0; color: var(--navy); font: 700 clamp(2.5rem, 4.2vw, 3.75rem)/1.3 var(--serif); letter-spacing: .04em; }
.hero h1 span { display: block; }
.hero-lead { margin: 0; color: var(--ink-muted); font-size: 19px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 32px 0 0; padding: 0; font-size: 15px; }
.facts li { display: inline-flex; align-items: center; gap: 10px; }
.facts li::before { content: ""; width: 6px; height: 6px; border: 1px solid var(--gold-text); transform: rotate(45deg); }

/* Hero price card (navy board) */
.quote-card {
  z-index: 3;
  grid-column: 7 / span 4;
  width: 404px;
  padding: 28px 30px 24px;
  border-radius: var(--r-card);
  background: var(--navy-deep);
  color: var(--on-navy);
  box-shadow: var(--shadow-lift);
  animation: rise 600ms 120ms var(--ease) both;
}
.qc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qc-title { margin: 0; font: 700 18px/1.4 var(--serif); letter-spacing: .1em; }
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; padding: 3px 10px;
  border: 1px solid rgba(224, 182, 134, .45);
  border-radius: 999px;
  color: var(--gold);
  font: 500 13px/1.5 var(--num);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stamp svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.qc-unit { margin: 4px 0 0; color: var(--on-navy-muted); font-size: 13px; }
.quote-card .rule { margin: 18px 0 20px; }
.quote-card .rule::after { background: var(--navy-deep); }

.qc-item { margin: 0; font-size: 15px; font-weight: 500; }
.qc-item small { margin-left: 8px; color: var(--on-navy-muted); font-size: 13px; font-weight: 400; }
/* 賣出 left, 回收 right: the buy-back price is the focal number. */
.qc-pair { display: grid; grid-template-columns: 1fr 1.3fr; align-items: end; gap: 16px; margin: 8px 0 0; }
.qc-pair dt { color: var(--on-navy-muted); font-size: 13px; }
.qc-pair dd { margin: 2px 0 0; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.qc-buy { text-align: right; }
.qc-buy dd { color: var(--gold); font-size: 38px; }
.qc-sell dd { color: rgba(250, 248, 244, .86); font-size: 24px; padding-bottom: 3px; }


.qc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.qc-foot p { margin: 0; color: var(--on-navy-muted); font-size: 12px; }
.qc-foot a { color: var(--gold); font-size: 14px; font-weight: 500; white-space: nowrap; border-bottom: 1px solid rgba(224, 182, 134, .5); }
.qc-foot a:hover { border-bottom-color: var(--gold); }

/* Image placeholder: never mistaken for a final image. */
.ph {
  margin: 0;
  overflow: hidden;
  color: var(--ink-muted);
  background:
    repeating-linear-gradient(135deg, rgba(16, 49, 84, .045) 0 1px, transparent 1px 16px),
    linear-gradient(160deg, #EFE7DA, #E6DCCB);
}
.hero-media {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  left: calc(50% + 72px);
  margin: 0;
  overflow: hidden;
  background: var(--paper-warm);
}
/* IMG-01: subject sits in the right half; keep it clear of the price card. */
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus, 0% 50%);
}
/* Wide screens: nudge the card left and slim it so the loupe and tray stay uncovered. */
@media (min-width: 1400px) {
  .quote-card { width: 370px; margin-left: -25px; }
  .qc-buy dd { font-size: 36px; }
}
/* Melt the image edge into the paper so the card bridges both. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--paper) 0, rgba(250, 248, 244, 0) 14%);
}
.ph-info {
  position: absolute;
  top: 32px; right: 32px;
  display: grid; gap: 2px;
  max-width: 320px;
  text-align: right;
  font-size: 13px;
  line-height: 1.6;
}
.ph-info b { color: var(--navy); font-size: 14px; }
.ph-safe {
  position: absolute;
  left: 0; top: 16%;
  width: 46%; height: 68%;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 10px 12px;
  border: 1px dashed rgba(138, 93, 43, .55);
  border-left: 0;
  color: var(--gold-text);
  font-size: 12px;
}
.ph-badge {
  position: absolute;
  right: 24px; bottom: 24px;
  padding: 5px 10px;
  border-radius: var(--r-tag);
  background: rgba(11, 35, 64, .86);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
}

/* Prices board */
.prices { padding-block: 96px; background: var(--paper-warm); border-top: 1px solid var(--line); }
.prices-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.prices-head h2 { margin: 0; color: var(--navy); font: 700 clamp(1.75rem, 3vw, 2.625rem)/1.35 var(--serif); letter-spacing: .04em; }
.stamp-block { padding-left: 24px; border-left: 2px solid var(--gold); }
.stamp-block p { margin: 0; }
.stamp-label { color: var(--ink-muted); font-size: 13px; letter-spacing: .12em; }
.stamp-value { color: var(--navy); font-size: 32px; font-weight: 600; line-height: 1.25; }
.stamp-value span { margin-left: 14px; }
.stamp-unit { margin-top: 4px !important; color: var(--ink-muted); font-size: 14px; }

.prices-status {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 32px 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-btn);
  background: var(--card);
  font-size: 15px;
  line-height: 1.7;
}
.prices-status svg { width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--gold-text); stroke-width: 1.6; stroke-linecap: round; }

.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.board-gold { grid-column: 1 / -1; }
.board-side { grid-column: 1 / -1; display: grid; grid-template-columns: 5fr 7fr; gap: 24px; }

.board-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
}
.board-card h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--navy); font: 600 22px/1.45 var(--serif); letter-spacing: .06em; }
.sym {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-tag);
  background: var(--navy);
  color: var(--gold);
  font: 600 15px/1 var(--serif);
  letter-spacing: 0;
}

.ptable { width: 100%; border-collapse: collapse; }
.ptable thead th { padding: 0 0 10px; border-bottom: 1px solid var(--line); color: var(--ink-muted); font: 500 13px/1.4 var(--sans); letter-spacing: .1em; text-align: right; }
.ptable thead th:first-child { text-align: left; }
.ptable tbody th { padding: 16px 0; border-bottom: 1px solid var(--line); font: 500 17px/1.4 var(--sans); text-align: left; }
.ptable tbody th span { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 13px; font-weight: 400; }
.ptable td { padding: 16px 0 16px 16px; border-bottom: 1px solid var(--line); color: var(--navy); font-size: 24px; font-weight: 600; line-height: 1.2; text-align: right; white-space: nowrap; }
.ptable tbody tr:last-child > * { border-bottom: 0; }
.na { color: var(--ink-muted); font: 400 16px/1 var(--sans); }
.board-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 13px; line-height: 1.7; }

.board-gold {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 32px;
  padding: 36px 48px 28px;
  border-color: transparent; background: var(--navy-deep); color: var(--on-navy); box-shadow: var(--shadow-lift); }
.board-gold h3 { color: var(--on-navy); }
.board-gold .sym { background: var(--gold); color: var(--navy-deep); }
.board-gold .ptable thead th { border-color: var(--on-navy-line); color: var(--on-navy-muted); }
.board-gold .ptable tbody th, .board-gold .ptable td { border-color: var(--on-navy-line); }
.board-gold .ptable tbody th span, .board-gold .na { color: var(--on-navy-muted); }
.board-gold .ptable td { color: var(--gold); font-size: 32px; }
.ptable-feature tbody tr:first-child th { padding-block: 24px; font-size: 20px; }
.ptable-feature tbody tr:first-child td { padding-block: 24px; font-size: 48px; letter-spacing: -.015em; }
.board-gold h3 { grid-column: 1; grid-row: 1; margin: 0; }
.board-gold .legend { grid-column: 2; grid-row: 1; }
.board-gold .ptable { position: relative; z-index: 1; grid-column: 1 / -1; grid-row: 2; margin-top: 20px; }
.board-gold .ptable th:first-child { width: 40%; }
.board-gold .ptable td[data-col="sell"] { color: rgba(250, 248, 244, .86); font-size: 24px; }
.ptable-feature tbody tr:first-child td[data-col="sell"] { font-size: 30px; }
.board-card:not(.board-gold) .board-note { margin-top: auto; }
.board-card:not(.board-gold) .ptable { margin-bottom: 16px; }

.legend { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; font-size: 14px; }
.legend div { display: flex; gap: 10px; }
.legend dt { color: var(--gold); font-weight: 500; }
.legend dd { margin: 0; color: var(--on-navy-muted); }
.board-clip { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.board-watermark {
  position: absolute;
  right: -10px; bottom: -64px;
  color: rgba(224, 182, 134, .07);
  font: 700 240px/1 var(--serif);
  pointer-events: none;
  user-select: none;
}

.prices-foot { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 28px; }
.prices-foot p { margin: 0; color: var(--ink-muted); font-size: 15px; }

/* ---------------------------------------------------------------
   Inspection: AB scroll story.
   Default is a stacked list (phones, tablets, no JS, reduced motion).
   app.js adds .is-scrolly on wide screens: a sticky 4:3 stage on the
   left switches scenes as each step crosses the viewport centre.
   --------------------------------------------------------------- */
.inspection { padding-block: 96px; background: var(--paper); }
.insp-head { max-width: 760px; margin-bottom: 56px; }
.insp-head h2 { margin: 0; color: var(--navy); font: 700 clamp(1.75rem, 3vw, 2.625rem)/1.35 var(--serif); letter-spacing: .04em; }
.insp-lead { margin: 16px 0 0; color: var(--ink-muted); font-size: 17px; }
.insp-rule { width: 168px; margin: 28px 0 24px; }
.insp-sub { margin: 0; color: var(--ink-muted); font-size: 15px; }
.insp-sub b { display: block; margin-bottom: 4px; color: var(--ink); font: 600 19px/1.5 var(--serif); letter-spacing: .04em; }

.steps { display: grid; gap: 48px; margin: 0; padding: 0; list-style: none; }
.steps-rail { display: none; }

.step-media { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.step-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.step-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-image: var(--metal) 1;
  opacity: .55;
  pointer-events: none;
}






.step-tag {
  display: none;
  position: absolute;
  z-index: 2;
  left: 20px; bottom: 20px;
  padding: 4px 10px;
  border-radius: var(--r-tag);
  background: rgba(11, 35, 64, .86);
  color: #fff;
  font-size: 12px;
  letter-spacing: .06em;
}

.step-copy { position: relative; }
.step-num {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 36px;
  margin: -18px 0 0 16px;
  padding: 0 12px;
  border: 1px solid var(--navy);
  border-radius: var(--r-tag);
  background: var(--navy);
  color: var(--gold);
  font: 600 15px/1 var(--num);
  font-variant-numeric: tabular-nums;
}
.step-num small { margin-left: 2px; color: var(--on-navy-muted); font-size: 12px; }
.step-copy h3 { margin: 14px 0 6px; color: var(--navy); font: 600 19px/1.45 var(--serif); letter-spacing: .06em; }
.step-copy p { margin: 0; color: var(--ink); }

/* Phones/tablets: each card fades in once (reuses the price reveal observer). */
.motion .inspection:not(.is-scrolly) [data-reveal] .step-media {
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 560ms var(--ease), transform 560ms var(--ease);
}
.motion .inspection:not(.is-scrolly) [data-reveal].is-revealed .step-media { opacity: 1; transform: none; }

@media (max-width: 768px) {
  .inspection { padding-block: 56px; }
  .insp-head { margin-bottom: 36px; }
  .insp-lead { font-size: 16px; }
  .steps { gap: 40px; }
}

@media (min-width: 769px) {
  .steps { gap: 40px; }
  .step { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; align-items: center; }
  .step-num { margin: 0; }
  .step-copy h3 { font-size: 22px; }
}

@media (min-width: 1025px) {
  .inspection.is-scrolly .steps {
    --stage-h: calc((min(1200px, 100vw - 80px) / 2 - 12px) * .75);
    --row-h: max(56svh, var(--stage-h));
    --stage-top: max(96px, calc((100svh - var(--header-h) - var(--stage-h)) / 2 + var(--header-h)));
    position: relative;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(var(--row-h), auto));
    column-gap: 24px;
    row-gap: 0;
  }
  .is-scrolly .step { display: contents; }

  /* Stage: four stacked sticky frames; only the active one is visible. */
  .is-scrolly .step-media {
    grid-column: 1 / span 6;
    grid-row: 1 / -1;
    position: sticky;
    top: var(--stage-top);
    align-self: start;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.025);
    filter: blur(2px);
    transition: opacity 420ms ease-out, filter 420ms ease-out, transform 560ms var(--ease), visibility 0s linear 560ms;
  }
  .is-scrolly .step.is-active .step-media {
    opacity: 1;
    visibility: visible;
    transform: none;
    filter: none;
    transition: opacity 560ms var(--ease), filter 560ms var(--ease), transform 560ms var(--ease), visibility 0s;
  }
  .is-scrolly .step-tag { display: block; }

  /* Copy column: each step's number sits on its row centre, level with the rail node. */
  .is-scrolly .step-copy {
    grid-column: 8 / span 5;
    padding: calc(var(--row-h) / 2 - 18px) 0 32px;
    /* Land an anchored step with its number just above the focus line (html adds header + 16px). */
    scroll-margin-top: calc(50svh - var(--row-h) / 2 - var(--header-h) - 28px);
  }
  .is-scrolly .step:nth-child(1) .step-copy { grid-row: 1; }
  .is-scrolly .step:nth-child(2) .step-copy { grid-row: 2; }
  .is-scrolly .step:nth-child(3) .step-copy { grid-row: 3; }
  .is-scrolly .step:nth-child(4) .step-copy { grid-row: 4; }
  .is-scrolly .step-num {
    background: var(--paper);
    border-color: var(--gold-text);
    color: var(--gold-text);
    transition: background-color 340ms ease, border-color 340ms ease, color 340ms ease;
  }
  .is-scrolly .step-num small { color: var(--ink-muted); transition: color 340ms ease; }
  .is-scrolly .step-copy h3 { margin-top: 18px; color: var(--ink-muted); font-size: 26px; transition: color 340ms ease; }
  .is-scrolly .step-copy p { max-width: 24em; color: var(--ink-muted); font-size: 17px; transition: color 340ms ease; }
  .is-scrolly .step.is-active .step-num { background: var(--navy); border-color: var(--navy); color: var(--gold); }
  .is-scrolly .step.is-active .step-num small { color: var(--on-navy-muted); }
  .is-scrolly .step.is-active h3 { color: var(--navy); }
  .is-scrolly .step.is-active p { color: var(--ink); }

  /* Progress rail: row-centre to row-centre, filled by transform only. */
  .is-scrolly .steps-rail {
    display: block;
    position: relative;
    grid-column: 7;
    grid-row: 1 / -1;
    justify-self: center;
    width: 9px;
    margin: calc(var(--row-h) / 2) 0;
  }
  .steps-rail::before,
  .rail-fill {
    content: "";
    position: absolute;
    left: 4px; top: 0; bottom: 0;
    width: 1px;
  }
  .steps-rail::before { background: var(--line); }
  .rail-fill {
    background: linear-gradient(var(--gold-text), var(--gold));
    transform: scaleY(var(--progress, 0));
    transform-origin: top;
    transition: transform 420ms var(--ease);
  }
  .rail-node {
    position: absolute;
    left: 0;
    width: 9px; height: 9px;
    margin-top: -4.5px;
    border: 1px solid #CDBFA9;
    background: var(--paper);
    transform: rotate(45deg);
    transition: background-color 300ms ease-out, border-color 300ms ease-out, box-shadow 300ms ease-out;
  }
  .rail-node:nth-of-type(1) { top: 0; }
  .rail-node:nth-of-type(2) { top: 33.333%; }
  .rail-node:nth-of-type(3) { top: 66.667%; }
  .rail-node:nth-of-type(4) { top: 100%; }
  .rail-node.is-done { background: var(--gold); border-color: var(--gold-text); }
  .rail-node.is-current { box-shadow: 0 0 0 4px rgba(224, 182, 134, .22), 0 0 14px rgba(224, 182, 134, .6); }

  /* Anchor jumps cut straight to the target scene. */
  .is-jumping :is(.step-media, .rail-fill, .rail-node, .step-num, h3, p) { transition: none !important; }
}

/* 衡泰貴金屬官網 */

.site-footer { padding-block: 32px; background: var(--navy-deep); color: var(--on-navy-muted); font-size: 13px; }
.site-footer p { margin: 0; }

.mobile-bar { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes balance-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Tablet: stacked hero, hamburger menu */
@media (max-width: 1024px) {
  :root { --shell: min(100% - 48px, 760px); --header-h: 64px; }

  .utility-bar { display: none; }

  .menu-button {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; margin-left: auto; margin-right: -8px;
    padding: 0; border: 0; background: transparent; color: var(--navy); cursor: pointer;
  }
  .menu-button span { width: 22px; height: 1.5px; background: currentColor; transition: transform 180ms ease; }
  .menu-button[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    display: none;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 16px 32px rgba(16, 49, 84, .1);
  }
  .site-nav.is-open { display: grid; gap: 0; }
  .site-nav a:not(.nav-line):not(.nav-tel) { padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .site-nav a:not(.nav-line):not(.nav-tel)::after { display: none; }
  .nav-line, .nav-tel { justify-content: center; min-height: 52px; margin-top: 12px; }
  .site-nav .nav-line { background:var(--navy-deep); color:var(--on-navy); border:1px solid var(--gold); }
  .nav-tel { display: flex; align-items: center; border: 1px solid var(--navy); border-radius: var(--r-btn); color: var(--navy); font-weight: 700; }

  .hero { padding-block: 40px 0; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; }
  .hero-copy { order: 1; }
  .quote-card { order: 2; width: 100%; max-width: 560px; margin-top: 32px; }
  .hero-media { order: 3; position: relative; inset: auto; left: auto; aspect-ratio: 4 / 3; margin: 40px calc((100vw - 100%) / -2) 0; --hero-focus: 50% 62%; }
  /* Stacked layouts: the photo dissolves out of the hero paper and into the price board below. */
  .hero-media::after {
    background: linear-gradient(180deg, var(--paper) 0%, rgba(250, 248, 244, 0) 24%, rgba(243, 238, 230, 0) 76%, var(--paper-warm) 100%);
  }
  .prices { border-top: 0; }
  .ph-safe { display: none; }
  .ph-info { inset: 50% 24px auto; transform: translateY(-50%); max-width: none; text-align: center; }

  .board-gold, .board-side { grid-column: 1 / -1; }
  .board-side { grid-template-columns: 1fr 1fr; }
}

/* Phone: designed for 360–480px, not a shrunken desktop */
@media (max-width: 768px) {
  :root { --shell: calc(100% - 32px); --header-h: 56px; }

  .seal { --s: 36px; }
  .brand { gap: 10px; }
  .brand-name b { font-size: 17px; letter-spacing: .12em; }
  .brand-name small { display: none; }

  /* Phone order: headline → price card → facts → image. */
  .hero { padding-top: 20px; }
  .hero-copy { display: contents; }
  .kicker { margin-bottom: 10px; font-size: 12.5px; letter-spacing: .1em; }
  .hero h1 { font-size: clamp(1.75rem, 8.4vw, 2.125rem); }
  .balance { width: 120px; margin: 14px 0; }
  .hero-lead { font-size: 16px; line-height: 1.75; }
  .hero-actions { display: none; }
  .facts { order: 3; gap: 8px 18px; margin-top: 20px; font-size: 14px; }

  .quote-card { margin-top: 20px; padding: 20px 20px 16px; border-radius: 14px; }
  .quote-card::before { inset: 8px; }
  .qc-title { font-size: 17px; }
  .quote-card .rule { margin: 12px 0; }
  .qc-pair { margin-top: 4px; }
  .qc-buy dd { font-size: 32px; }
  .qc-sell dd { font-size: 21px; }
  .qc-foot { margin-top: 12px; }
  .qc-foot a { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(224, 182, 134, .5); }

  /* Phone: zoom into the tray and scale (static transform, no scroll work). */
  .hero-media { order: 4; aspect-ratio: 5 / 4; margin-top: 4px; margin-inline: -16px; }
  .hero-media img { transform: scale(1.24); transform-origin: 86% 34%; }
  .hero-media::after { background: linear-gradient(180deg, var(--paper) 0%, rgba(250, 248, 244, 0) 13%, rgba(243, 238, 230, 0) 80%, var(--paper-warm) 100%); }

  .prices { padding-block: 24px 56px; }
  .prices-head { display: block; }
  .stamp-block { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r-btn); background: var(--card); }
  .stamp-value { font-size: 26px; }
  .stamp-unit { font-size: 13px; }
  .prices-status { margin: 12px 0 20px; padding: 12px 14px; font-size: 14px; }

  .board { gap: 16px; }
  .board-side { grid-template-columns: 1fr; gap: 16px; }
  .board-card { padding: 22px 20px; border-radius: 14px; }
  .board-gold { padding: 24px 20px; }
  .board-card h3 { margin-bottom: 8px; font-size: 19px; }
  .ptable tbody th { padding-block: 14px; font-size: 16px; }
  .ptable td { padding-block: 14px; font-size: 20px; }
  .board-gold .ptable td { font-size: 22px; }
  .board-gold .ptable td[data-col="sell"] { font-size: 17px; }
  .ptable-feature tbody tr:first-child td[data-col="sell"] { font-size: 20px; }
  .ptable-feature tbody tr:first-child th { padding-block: 16px; font-size: 17px; }
  .ptable-feature tbody tr:first-child td { padding-block: 16px; font-size: 28px; }
  .board-watermark { display: none; }
  .board-gold { grid-template-columns: 1fr; }
  .board-gold .ptable { margin-top: 8px; }
  .board-gold .legend { grid-column: 1; grid-row: 3; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--on-navy-line); font-size: 13px; }

  .prices-foot { display: block; }
  .prices-foot .btn { width: 100%; margin-top: 16px; }


  .mobile-bar {
    position: fixed;
    z-index: 45;
    left: 16px; right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 32px); max-width: 420px; margin-inline: auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    padding: 0; border: 1px solid var(--gold); border-radius: 999px;
    background: var(--navy-deep); backdrop-filter: none;
    box-shadow: 0 8px 24px rgba(11, 35, 64, .28);
    overflow: hidden;
  }
  .mobile-bar::after { content: ""; position:absolute; width:1px; height:20px; left:50%; top:50%; transform:translateY(-50%); background:var(--gold); pointer-events:none; }
  .mobile-bar .btn { min-width:0; min-height:52px; padding:0 12px; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--gold); }
  .mobile-bar .btn-line { color:var(--on-navy); }
  .mobile-bar .btn-line svg:not(.line-brand-icon) { color:#06C755; }
  .mobile-bar .btn-primary svg { color:var(--gold); }
  .mobile-bar .btn:active { background:rgba(255,255,255,.06); }
  .mobile-bar .btn:focus-visible { outline:2px solid var(--gold); outline-offset:-5px; border-radius:999px; }
  @media(hover:hover) { .mobile-bar .btn:hover { background:rgba(255,255,255,.06); box-shadow:none; transform:none; } }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------
   Motion layer. Everything below is enhancement only: the hidden
   start state exists only under html.motion, which app.js sets after
   the observer is ready and only when reduced motion is not requested.
   --------------------------------------------------------------- */

/* Gold accent line on top of each price card. */
.card-line {
  position: absolute;
  z-index: 2;
  top: 0; left: 32px; right: 32px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--metal);
  transform-origin: center;
}
.board-gold .sym { background: var(--metal-diag); }

/* Metallic border with a single light sweep. */
.sheen {
  position: absolute;
  z-index: 1;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 40%, var(--glint) 49%, transparent 58% 100%) 100% 0 / 300% 100% no-repeat,
    linear-gradient(160deg, rgba(224, 182, 134, .55), rgba(224, 182, 134, .12) 45%, rgba(224, 182, 134, .4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@keyframes sheen-pass { from { background-position: 100% 0, 0 0; } to { background-position: 0% 0, 0 0; } }

/* Lit state: stays on while the card is in view, hovered or focused; fades when it leaves.
   --lit is 0/1 and inherits, so the border and glow follow one switch. */
.sheen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--metal-diag);
  opacity: var(--lit, 0);
  transition: opacity 480ms ease;
}
:is(.quote-card, .board-card)::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(224, 182, 134, .35), 0 18px 56px rgba(224, 182, 134, .2);
  opacity: var(--lit, 0);
  transition: opacity 480ms ease;
}
.card-line { transition: box-shadow 480ms ease; }
.is-lit,
:is(.quote-card, .board-card):focus-within { --lit: 1; }
@media (hover: hover) {
  :is(.quote-card, .board-card):hover { --lit: 1; }
}
:is(.is-lit, :hover, :focus-within) > .card-line { box-shadow: 0 0 10px rgba(224, 182, 134, calc(var(--lit, 0) * .75)); }

/* Buttons: a soft champagne light that stays while hovered, focused or pressed. */
.btn-primary { position: relative; isolation: isolate; overflow: hidden; border-color: rgba(224, 182, 134, .35); }
.btn-primary::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, transparent 10%, rgba(247, 231, 204, .22) 50%, transparent 90%);
  opacity: 0;
  transform: translateX(-35%);
  transition: opacity 360ms ease, transform 560ms var(--ease);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .qc-foot a {
    background: linear-gradient(110deg, var(--gold) 40%, #FFF3DF 50%, var(--gold) 60%) 100% 0 / 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 640ms var(--ease);
  }
  .qc-foot a:focus-visible { background-position: 50% 0; }
}

@media (hover: hover) {
  .btn-primary:hover::before { opacity: 1; transform: none; }
  .qc-foot a:hover { background-position: 50% 0; }
}
/* Touch and keyboard: the same light on press or focus. */
.btn-primary:is(:active, :focus-visible)::before { opacity: 1; transform: none; }

/* Price reveal: numbers fade up once, lines draw from the centre. */
.motion [data-reveal] .num {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
  transition-delay: calc(160ms + var(--i, 0) * 70ms);
}
.motion [data-reveal] :is(.rule, .card-line) {
  transform: scaleX(0);
  transition: transform 760ms var(--ease) 60ms;
}
.motion [data-reveal].is-revealed .num { opacity: 1; transform: none; }
.motion [data-reveal].is-revealed :is(.rule, .card-line) { transform: none; }
.motion [data-reveal].is-revealed .sheen { animation: sheen-pass 1500ms 520ms ease-in-out both; }

@media print {
  .motion [data-reveal] :is(.num, .step-media) { opacity: 1; transform: none; }
}

/* Small phones (360px): keep the whole price card above the bottom bar. */
@media (max-width: 380px) {
  .balance { margin: 10px 0; }
  .quote-card { margin-top: 14px; padding-top: 16px; }
}

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

/* 衡泰貴金屬官網 */
.quote-float { grid-column:7 / span 4; position:relative; z-index:3; width:404px; min-width:0; align-self:center; animation:quote-float 5.5s ease-in-out infinite; }
.quote-float .quote-card { width:100%; margin-left:0; }
.quote-shadow { position:absolute; z-index:-1; left:12%; right:12%; bottom:-20px; height:20px; border-radius:50%; background:var(--navy); filter:blur(16px); opacity:.3; animation:quote-shadow 5.5s ease-in-out infinite; }
.shine-border { position:absolute; inset:0; z-index:3; border-radius:inherit; padding:2px; pointer-events:none; background:linear-gradient(120deg,#c99a53,#fff0ca,#b9853e,#c99a53); background-size:300% 300%; -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite:exclude; animation:quote-shine 14s linear infinite; }
@keyframes quote-float { 50% { transform:translateY(-12px); } }
@keyframes quote-shadow { 50% { transform:scale(.82); opacity:.15; } }
@keyframes quote-shine { 50% { background-position:100% 100%; } }
.quote-float.is-paused, .quote-float.is-paused .shine-border, .quote-float.is-paused .quote-shadow { animation-play-state:paused; }
.quote-card { transition:translate .3s ease; }
@media (hover:hover) { .quote-float:hover .quote-card { translate:0 -7px; } .quote-float:hover .quote-shadow { opacity:.5; } }
.board-side { grid-template-columns:1fr; }
.metal-grid { display:grid; grid-template-columns:1fr 1fr; gap:32px; }
.metal-grid caption { text-align:left; color:var(--navy); font-weight:700; padding:12px 0; }
.estimate { font-size:16px; color:var(--paper-warm); }
.help-section,.visit-section { padding-block:72px; scroll-margin-top:110px; }
.help-section h2,.visit-section h2 { color:var(--navy); font-family:var(--serif); }
.help-list details { border-bottom:1px solid var(--gold); padding:20px 0; }
.help-list summary { cursor:pointer; display:flex; justify-content:space-between; gap:20px; color:var(--navy); font-weight:700; list-style:none; }
.help-list summary::-webkit-details-marker { display:none; }
.help-list summary span::before { content:'+'; display:block; transition:transform .2s; }
.help-list details[open] summary span::before { transform:rotate(45deg); }
.help-list summary:focus-visible { outline:2px solid var(--gold); outline-offset:6px; }
.help-answer { line-height:1.9; } .help-answer strong { margin-right:.5em; }
.visit-section { background:var(--paper-warm); padding-bottom:110px; }
.visit-grid { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.visit-details { margin-top:28px; } .visit-details div { padding-block:12px; border-bottom:1px solid var(--line); }
.visit-details dd { margin:6px 0 0; } .visit-map iframe { width:100%; height:100%; min-height:280px; border:0; border-radius:var(--r-card); }
@media(max-width:1024px) { .quote-float { order:2; width:100%; max-width:560px; margin-left:0; align-self:stretch; } .menu-button { gap:6px; } .menu-button[aria-expanded="true"] span:first-child { transform:translateY(7.5px) rotate(45deg); } .menu-button[aria-expanded="true"] span:nth-child(2) { opacity:0; } .menu-button[aria-expanded="true"] span:last-child { transform:translateY(-7.5px) rotate(-45deg); } }
@media(max-width:768px) { .metal-grid,.visit-grid { grid-template-columns:1fr; } .visit-map iframe { height:280px; } .help-section,.visit-section { padding-top:48px; } }
@media(prefers-reduced-motion:reduce) { .quote-float,.quote-shadow,.shine-border { animation:none; } .quote-float:hover .quote-card { translate:none; } .quote-card { transition:none; } .shine-border { background:var(--gold); } }

.board-gold .ptable td.estimate { font: 400 16px/1.5 var(--sans); color: var(--on-navy); }

/* R2: restore the original wide-screen card footprint on its floating wrapper. */
@media(min-width:1400px) { .quote-float { width:370px; margin-left:-25px; } }

/* Reference price states and footer contact links. */
[hidden] { display:none !important; }
.price-unavailable, .ptable td.price-unavailable, .qc-pair dd.price-unavailable { font:500 clamp(11px,1.1vw,16px)/1.6 var(--sans); letter-spacing:0; white-space:nowrap; }
.qc-foot { flex-wrap:wrap; }
.qc-foot .qc-updated { flex-basis:100%; font-size:11px; }
.price-time { font-size:13px; color:var(--ink-muted); }
.qc-foot .price-time { color:var(--on-navy-muted); }
.process-disclaimer { color:var(--ink-muted); font-size:13px; margin-top:24px; }
.social-links { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.social-links a { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; padding:2px; border:0; border-radius:12px; background:transparent; }
.social-links svg { display:block; width:40px; height:40px; flex:none; }
@media(hover:hover) { .social-links a:hover { filter:brightness(1.08); } }
.social-links a:focus-visible { outline:2px solid var(--gold); outline-offset:4px; }
@media(max-width:768px) { .site-footer { padding-bottom:calc(96px + env(safe-area-inset-bottom, 0px)); } }
.hero-media picture { display: contents; }

/* Keep unavailable text readable without inheriting large numeric first-row styles. */
.board-gold .ptable tbody td.price-unavailable, .board-gold .ptable tbody tr:first-child td.price-unavailable { font:500 clamp(11px,1.1vw,16px)/1.6 var(--sans); letter-spacing:0; }
@media(max-width:390px) { .board-gold .ptable td.price-unavailable { padding-left:6px; } }

/* Hero price link is secondary to the branded LINE action. */
.hero-actions .btn-primary { background:transparent; color:var(--navy); border:1px solid var(--gold-text); }
.hero-actions .btn-primary:hover { background:rgba(16,49,84,.05); }
.hero-actions .btn-primary::before { display:none; }

/* Keep the multicolour LINE app mark independent of inherited icon paint. */
.btn svg.line-brand-icon, .nav-line svg.line-brand-icon { flex-shrink:0; fill:none; stroke:none; }
