/* 媧石皇家 demo 3 — 關於我們 (prefix a3-) */

/* ---------- 1. Hero: brand line + widening store window ---------- */
.a3-hero { padding-top: calc(var(--hd-h) + clamp(40px, 7vw, 112px)); }
.a3-hero > .wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.a3-hero__head { display: grid; gap: 28px; justify-items: start; }
.a3-hero__title { font-family: var(--f-zh-serif); font-size: clamp(2.1rem, 5.6vw, 5.75rem); line-height: 1.22; letter-spacing: .06em; }
.a3-hero__meta { display: grid; gap: 28px; padding-bottom: 10px; }
.a3-hero__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.a3-hero__tags li { padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; font-size: var(--fs-label); letter-spacing: .14em; color: var(--muted); }
.a3-hero__window { margin-top: clamp(48px, 6vw, 96px); }
.a3-hero__frame { position: relative; max-width: 1920px; margin-inline: auto; aspect-ratio: 16 / 7; min-height: 0; overflow: hidden; background: var(--stone); }
.a3-hero__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.a3-hero__window .caption { display: block; }

/* ---------- 2. Story ---------- */
.a3-story__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px clamp(40px, 6vw, 120px); align-items: start; }
.a3-story__num { display: flex; align-items: flex-start; color: var(--burgundy); font-size: clamp(7.5rem, 20vw, 19rem); line-height: .82; }
.a3-story__num .num { letter-spacing: -.02em; }
.a3-story__plus { font-size: .42em; line-height: 1; margin-left: .06em; color: var(--brass); }
.a3-story__body { display: grid; gap: 24px; justify-items: start; padding-top: clamp(0px, 2vw, 32px); }
.a3-story__prose { color: var(--muted); }
.a3-ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.a3-ledger > div { display: grid; gap: 14px; padding: 28px 24px 0 0; }
.a3-ledger > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.a3-ledger dt { font-size: var(--fs-label); letter-spacing: .2em; color: var(--muted); }
.a3-ledger dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.a3-ledger dd .num { font-size: clamp(2.5rem, 4vw, 3.75rem); line-height: 1; color: var(--ink); }
.a3-ledger dd small { font-size: var(--fs-small); color: var(--muted); letter-spacing: .08em; }

/* ---------- 3. Craft: swipe deck ---------- */
.a3-craft { overflow: hidden; }
.a3-craft__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 64px; align-items: end; margin-bottom: clamp(44px, 5vw, 72px); }
.a3-craft__head > div { display: grid; gap: 22px; justify-items: start; }
.a3-craft__head .lead { max-width: 32em; color: var(--on-dark-muted); font-family: var(--f-zh-serif); }
.a3-deck { --pad: max(var(--gutter), calc((100vw - 1440px) / 2 + var(--gutter))); }
.a3-deck__track {
  display: flex; gap: clamp(16px, 2vw, 28px); overflow-x: auto; overscroll-behavior-x: contain;
  padding-inline: var(--pad); scroll-padding-inline: var(--pad); scroll-snap-type: x mandatory;
  scrollbar-width: none; cursor: grab; outline-offset: -4px;
}
.a3-deck__track::-webkit-scrollbar { display: none; }
.a3-deck__track::after { content: ""; flex: 0 0 1px; }
.a3-deck__track.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.a3-step { flex: 0 0 clamp(268px, 29vw, 420px); scroll-snap-align: start; display: grid; gap: 22px; align-content: start; }
.a3-step__fig { aspect-ratio: 4 / 5; min-height: 0; border-radius: var(--r); background: rgba(244, 237, 227, .08); }
.a3-step__fig img { pointer-events: none; transition: transform 1.2s var(--ease); }
.a3-step:hover .a3-step__fig img { transform: scale(1.04); }
.a3-step__txt { display: grid; gap: 10px; align-content: start; }
.a3-step__no { font-size: clamp(2.2rem, 3vw, 2.75rem); line-height: 1; color: #E9C9C3; font-style: italic; }
.a3-step__txt p { color: var(--on-dark-muted); font-size: var(--fs-small); line-height: 1.85; max-width: 26em; }
.a3-step__txt .a3-step__cap { font-size: var(--fs-label); letter-spacing: .12em; color: rgba(244, 237, 227, .55); }
.a3-step--end { flex-basis: clamp(240px, 22vw, 320px); align-content: center; padding: 32px 28px; border: 1px solid rgba(244, 237, 227, .2); border-radius: var(--r); }
.a3-step--end .a3-step__txt { gap: 28px; justify-items: start; }
.a3-step__txt .a3-step__big { font: 400 clamp(1.6rem, 2.2vw, 2.1rem)/1.5 var(--f-zh-serif); letter-spacing: .08em; color: var(--on-dark); }
.a3-deck__ui { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 24px; margin-top: clamp(32px, 4vw, 52px); }
.a3-deck__bar { position: relative; height: 1px; background: rgba(244, 237, 227, .22); }
.a3-deck__bar span { position: absolute; inset: -1px 0; background: var(--on-dark); transform-origin: left; transform: scaleX(var(--p, .2)); transition: transform .3s linear; }
.a3-deck__count { font-size: 1rem; color: var(--on-dark-muted); }
.a3-deck__count b { font-weight: 400; color: var(--on-dark); }
.a3-deck__btns { display: flex; gap: 10px; }
.a3-deck__btn { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(244, 237, 227, .35); border-radius: 50%; transition: background .35s, color .35s, border-color .35s, opacity .35s; }
.a3-deck__btn svg { width: 20px; height: 20px; }
.a3-deck__btn:hover { background: var(--on-dark); color: var(--burgundy-deep); border-color: var(--on-dark); }
.a3-deck__btn[disabled] { opacity: .3; pointer-events: none; }

/* ---------- 4. Keepers ---------- */
.a3-keepers__head { display: grid; gap: 20px; justify-items: center; text-align: center; margin-bottom: clamp(48px, 6vw, 88px); }
.a3-keepers__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 40px clamp(32px, 5vw, 96px); align-items: start; }
.a3-keeper { display: grid; gap: 12px; justify-items: center; text-align: center; }
.a3-keeper__arch { width: 100%; max-width: 400px; aspect-ratio: 4 / 5; min-height: 0; overflow: hidden; border-radius: 999px 999px var(--r) var(--r); background: var(--stone); margin-bottom: 18px; }
.a3-keeper__arch img { width: 100%; height: 100%; object-fit: cover; }
.a3-keeper__role { font-size: var(--fs-label); letter-spacing: .3em; color: var(--burgundy); }
.a3-keeper .h3 { font-family: var(--f-zh-serif); font-size: clamp(1.4rem, 2vw, 1.85rem); letter-spacing: .1em; }
.a3-keeper__txt { max-width: 24em; color: var(--muted); font-size: var(--fs-small); line-height: 1.95; }
.a3-keepers__mid { display: flex; flex-direction: column; align-items: center; gap: 20px; align-self: center; }
.a3-keepers__mid p { writing-mode: vertical-rl; font: 400 1.15rem/2 var(--f-zh-serif); letter-spacing: .3em; color: var(--ink); }
.a3-keepers__line { width: 1px; height: clamp(48px, 6vw, 96px); background: var(--line); }

/* ---------- 5. Letter ---------- */
.a3-nw { white-space: nowrap; }
.a3-letter .wrap { display: grid; gap: clamp(32px, 4vw, 56px); }
.a3-letter__quote { font-family: var(--f-zh-serif); font-size: clamp(2rem, 5vw, 4.75rem); line-height: 1.38; letter-spacing: .06em; max-width: 16em; }
.a3-letter__tenets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(244, 237, 227, .16); }
.a3-letter__tenets li { display: grid; gap: 10px; padding: 24px 24px 0 0; font: 400 clamp(1.05rem, 1.4vw, 1.25rem)/1.7 var(--f-zh-serif); letter-spacing: .08em; }
.a3-letter__tenets li + li { padding-left: 24px; border-left: 1px solid rgba(244, 237, 227, .16); }
.a3-letter__tenets .num { font-style: italic; color: #E9C9C3; font-size: 1.1rem; }
.a3-letter__grid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 40px clamp(40px, 7vw, 128px); align-items: start; margin-top: clamp(16px, 3vw, 40px); }
.a3-letter__fig { padding: 14px; background: rgba(244, 237, 227, .06); border-radius: var(--r); max-width: 400px; }
.a3-letter__fig img { width: 100%; border-radius: 3px; }
.a3-letter__fig .caption { color: var(--on-dark-muted); }
.a3-letter__body { display: grid; gap: 1.4em; max-width: 36em; color: var(--on-dark-muted); font-size: var(--fs-lead); line-height: 2.05; }
.a3-letter__sign { display: grid; gap: 6px; margin-top: 12px; padding-top: 24px; border-top: 1px solid rgba(244, 237, 227, .16); }
.a3-letter__name { font: 400 clamp(1.75rem, 2.4vw, 2.25rem)/1.3 var(--f-zh-serif); letter-spacing: .3em; color: var(--on-dark); }
.a3-letter__title { font-size: var(--fs-label); letter-spacing: .2em; color: var(--brass); }

/* ---------- 6. Difference: index list + swapping image ---------- */
.a3-diff__head { display: grid; gap: 20px; justify-items: start; margin-bottom: clamp(40px, 5vw, 72px); }
.a3-diff__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px clamp(40px, 7vw, 128px); align-items: start; }
.a3-diff__list { border-bottom: 1px solid var(--line); }
.a3-diff__item { border-top: 1px solid var(--line); }
.a3-diff__btn { width: 100%; display: flex; align-items: baseline; gap: clamp(16px, 2.4vw, 36px); padding: clamp(20px, 2.4vw, 30px) 0; text-align: left; transition: color .4s var(--ease); }
.a3-diff__btn .num { font-size: 1rem; color: var(--muted); min-width: 2em; transition: color .4s; }
.a3-diff__t { font: 400 clamp(1.3rem, 2.3vw, 2.1rem)/1.4 var(--f-zh-serif); letter-spacing: .06em; transition: transform .5s var(--ease); }
.a3-diff__btn:hover .a3-diff__t { transform: translateX(6px); }
.a3-diff__item.is-on .a3-diff__btn, .a3-diff__item.is-on .a3-diff__btn .num { color: var(--burgundy); }
.a3-diff__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.a3-diff__more > div { overflow: hidden; min-height: 0; }
.a3-diff__item.is-on .a3-diff__more { grid-template-rows: 1fr; }
.a3-diff__more p { max-width: 30em; padding: 0 0 clamp(22px, 2.4vw, 30px) calc(2em + clamp(16px, 2.4vw, 36px)); color: var(--muted); font-size: var(--fs-small); }
.a3-diff__thumb { display: none; }
.a3-diff__stage { position: sticky; top: calc(var(--hd-h) + 32px); }
.a3-diff__frame { position: relative; aspect-ratio: 1; min-height: 0; padding: clamp(12px, 1.4vw, 20px); background: var(--sand); border-radius: var(--r); }
.a3-diff__frame img { position: absolute; inset: clamp(12px, 1.4vw, 20px); width: calc(100% - 2 * clamp(12px, 1.4vw, 20px)); height: calc(100% - 2 * clamp(12px, 1.4vw, 20px)); object-fit: cover; border-radius: 3px; opacity: 0; transform: scale(1.04); transition: opacity .8s var(--ease), transform 1.4s var(--ease); }
.a3-diff__frame img.is-on { opacity: 1; transform: scale(1); }

/* ---------- 7. Close ---------- */
.a3-close { padding-block: clamp(72px, 9vw, 136px) var(--sec); overflow: hidden; }
.a3-ribbon { overflow: hidden; margin-bottom: clamp(56px, 7vw, 104px); }
.a3-ribbon__row { display: flex; gap: 16px; width: max-content; animation: a3-drift 60s linear infinite; }
.a3-ribbon__row img { width: clamp(120px, 13vw, 200px); aspect-ratio: 1; height: auto; object-fit: cover; border-radius: var(--r); background: var(--stone); }
@keyframes a3-drift { to { transform: translateX(calc(-50% - 8px)); } }
.a3-close__in { display: grid; gap: 28px; justify-items: center; text-align: center; }
.a3-close .h1 { font-family: var(--f-zh-serif); }
.a3-close .lead { max-width: 30em; }
.a3-close__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .a3-hero > .wrap { grid-template-columns: minmax(0, 1fr); }
  .a3-hero__frame { aspect-ratio: 4 / 3; }
  .a3-story__grid { grid-template-columns: minmax(0, 1fr); }
  .a3-story__num { font-size: clamp(6rem, 30vw, 11rem); }
  .a3-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a3-ledger > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .a3-ledger > div:nth-child(n+3) { padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); }
  .a3-craft__head { grid-template-columns: minmax(0, 1fr); }
  .a3-keepers__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .a3-keepers__mid { grid-column: 1 / -1; grid-row: 1; flex-direction: row; justify-content: center; }
  .a3-keepers__mid p { writing-mode: horizontal-tb; text-align: center; font-size: 1.05rem; letter-spacing: .14em; }
  .a3-keepers__line { width: clamp(24px, 6vw, 64px); height: 1px; }
  .a3-letter__tenets { grid-template-columns: minmax(0, 1fr); }
  .a3-letter__tenets li, .a3-letter__tenets li + li { grid-template-columns: 2.4em minmax(0, 1fr); padding: 18px 0; border-left: 0; border-bottom: 1px solid rgba(244, 237, 227, .16); }
  .a3-letter__grid { grid-template-columns: minmax(0, 1fr); }
  .a3-diff__grid { grid-template-columns: minmax(0, 1fr); }
  .a3-diff__stage { display: none; }
  .a3-diff__more > div { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 16px; align-items: start; }
  .a3-diff__more > div > * { margin-bottom: 24px; }
  .a3-diff__more p { padding: 0 0 0 calc(2em + 16px); }
  .a3-diff__thumb { display: block; width: 112px; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: var(--r); }
}
@media (max-width: 640px) {
  .a3-hero__frame { aspect-ratio: 4 / 5; }
  .a3-hero__frame img { object-position: 46% 50%; }
  .a3-keepers__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .a3-keepers__mid { grid-row: auto; order: 0; }
  .a3-keeper__arch { max-width: 320px; }
  .a3-deck__ui { grid-template-columns: minmax(0, 1fr) auto; }
  .a3-deck__count { display: none; }
  .a3-deck__btn { width: 46px; height: 46px; }
  .a3-ledger dd .num { font-size: 2.4rem; }
  .a3-diff__more > div { grid-template-columns: minmax(0, 1fr) 88px; }
  .a3-diff__more p { padding-left: 0; }
  .a3-diff__thumb { width: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .a3-ribbon__row { animation: none; }
}
