/* 媧石皇家 demo 2 — 關於我們 (about.html) */

/* ---------- 1. Hero: type + offset collage ---------- */
.ab-hero { padding-top: calc(var(--hd-h) + clamp(48px, 7vw, 112px)); padding-bottom: clamp(72px, 9vw, 140px); }
.ab-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 112px); align-items: center; }
.ab-hero__text { display: grid; gap: 32px; justify-items: start; }
.ab-hero__title { margin-top: 4px; }
.ab-hero__lead { max-width: 30em; }
.ab-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 560px; margin-top: 16px; border-top: 1px solid var(--line); }
.ab-facts__item { padding: 22px 16px 0 0; }
.ab-facts__item + .ab-facts__item { padding-left: 20px; border-left: 1px solid var(--line); }
.ab-facts dt { font-size: var(--fs-label); letter-spacing: .18em; color: var(--muted); }
.ab-facts dd { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.ab-facts .num { font-size: clamp(2.2rem, 3.4vw, 3.25rem); line-height: 1; color: var(--burgundy); }
.ab-facts small { font-size: var(--fs-small); color: var(--muted); }

.ab-hero__collage { position: relative; padding-bottom: 14%; }
.ab-hero__a { aspect-ratio: 4 / 5; width: 74%; margin-left: auto; margin-right: 44px; border-radius: 200px 200px var(--r) var(--r); }
.ab-hero__b { position: absolute; left: 0; bottom: 0; width: 48%; aspect-ratio: 4 / 3; border: 10px solid var(--paper); border-radius: var(--r-lg); }
.ab-hero__c { position: absolute; left: 4%; top: 6%; width: 24%; aspect-ratio: 1; border-radius: 50%; border: 8px solid var(--paper); }
.ab-hero__b img, .ab-hero__c img, .ab-hero__a img { width: 100%; height: 100%; object-fit: cover; }
.ab-hero__note { position: absolute; right: 0; top: 8%; writing-mode: vertical-rl; font: 400 var(--fs-label)/1 var(--f-zh-serif); letter-spacing: .6em; color: var(--muted); }

/* ---------- 2. Story: sticky rail + chapters ---------- */
.ab-story { border-top: 1px solid var(--line); }
.ab-story__grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(40px, 7vw, 128px); align-items: start; }
.ab-rail { position: sticky; top: calc(var(--hd-h) + 48px); display: grid; gap: 28px; }
.ab-rail__list { display: grid; }
.ab-rail__list a { display: flex; align-items: center; gap: 14px; min-height: 48px; border-bottom: 1px solid var(--line); font-size: var(--fs-small); letter-spacing: .1em; color: var(--muted); transition: color .4s var(--ease), padding .4s var(--ease); }
.ab-rail__list .num { font-size: .8125rem; color: var(--brass); }
.ab-rail__list a:hover, .ab-rail__list a.is-on { color: var(--ink); }
.ab-rail__list a.is-on { padding-left: 8px; }
.ab-rail__list a.is-on .num { color: var(--burgundy); }
.ab-rail__bar { height: 2px; background: var(--line); overflow: hidden; }
.ab-rail__bar span { display: block; height: 100%; background: var(--burgundy); transform: scaleX(var(--sp, 0)); transform-origin: left; }

.ab-ch { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(20px, 3vw, 40px); align-items: end; }
.ab-ch + .ab-ch { margin-top: clamp(104px, 12vw, 184px); }
.ab-ch__no { font: 400 clamp(4.5rem, 9vw, 8.5rem)/.9 var(--f-zh-serif); color: #E3CCC7; }
.ab-ch > .h2 { padding-bottom: 8px; }
.ab-ch__body { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 4.5vw, 72px); align-items: center; margin-top: clamp(32px, 4vw, 56px); }
.ab-ch__body .prose { color: var(--muted); }
.ab-ch--flip .ab-ch__img { order: -1; }
.ab-ch__pull { grid-column: 1 / -1; margin-top: clamp(48px, 6vw, 88px); padding-left: 28px; border-left: 1px solid var(--brass); font: 400 clamp(1.5rem, 2.4vw, 2.25rem)/1.6 var(--f-zh-serif); letter-spacing: .08em; color: var(--burgundy); }

/* ---------- 3. Process: pinned horizontal ---------- */
.ab-proc { overflow: hidden; }
.ab-proc__in { display: flex; flex-direction: column; justify-content: center; padding-block: var(--sec); }
.ab-proc.is-pinned .ab-proc__in { min-height: 100vh; padding-top: calc(var(--hd-h) + 20px); padding-bottom: 40px; }
.ab-proc__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 64px; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 52px); }
.ab-proc__head .h1 { margin-top: 16px; font-size: clamp(2rem, 3.6vw, 3.5rem); }
.ab-proc__meta { display: grid; gap: 20px; max-width: 380px; }
.ab-proc__bar { position: relative; height: 2px; background: var(--line); overflow: hidden; }
.ab-proc__bar span { position: absolute; inset: 0; background: var(--burgundy); transform: scaleX(var(--hp, 0)); transform-origin: left; }

.ab-proc__track { display: flex; gap: clamp(20px, 2.4vw, 40px); padding-inline: max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter))); }
.ab-proc__track::after { content: ""; flex: 0 0 1px; }
.ab-step { flex: 0 0 clamp(280px, 25vw, 380px); display: grid; align-content: start; gap: 16px; }
.ab-step:nth-child(even) { padding-top: clamp(0px, 4vh, 48px); }
.ab-step__top { display: flex; align-items: baseline; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ab-step__top .num { font-size: 1.75rem; color: var(--burgundy); line-height: 1; }
.ab-step__of { font-size: var(--fs-label); color: var(--muted); }
.ab-step__img { height: clamp(220px, 36vh, 420px); }
.ab-step .h3 { margin-top: 4px; font-family: var(--f-zh-serif); }
.ab-step p { font-size: var(--fs-small); line-height: 1.85; color: var(--muted); }

/* ---------- 4. Energy: vertical statement + principles ---------- */
.ab-energy__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(56px, 9vw, 168px); align-items: start; }
.ab-energy__stmt { display: grid; gap: 40px; justify-items: start; }
.ab-energy__v { writing-mode: vertical-rl; font: 400 clamp(2.4rem, 4.2vw, 4.25rem)/1.55 var(--f-zh-serif); letter-spacing: .18em; color: var(--ink); text-wrap: nowrap; justify-self: center; }
.ab-energy__body { display: grid; gap: clamp(40px, 5vw, 72px); padding-top: clamp(40px, 6vw, 88px); }
.ab-energy__lede { max-width: 26em; font: 400 clamp(1.25rem, 1.8vw, 1.625rem)/1.95 var(--f-zh-serif); letter-spacing: .06em; }
.ab-princ { border-bottom: 1px solid var(--line); }
.ab-princ__item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 28px; padding-block: 32px; border-top: 1px solid var(--line); }
.ab-princ__seal { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--burgundy); border-radius: 4px; font: 500 1.5rem/1 var(--f-zh-serif); color: var(--burgundy); }
.ab-princ__item .h3 { font-family: var(--f-zh-serif); margin-bottom: 8px; }
.ab-princ__item p { color: var(--muted); max-width: 36em; }

/* ---------- 5. Image band ---------- */
.ab-band { position: relative; height: clamp(380px, 50vw, 720px); overflow: hidden; background: var(--dark); }
.ab-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ab-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(20deg, rgba(29, 24, 22, .6), rgba(29, 24, 22, 0) 58%); pointer-events: none; }
.ab-band__txt { position: absolute; z-index: 1; left: max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter))); bottom: clamp(32px, 5vw, 72px); font: 400 clamp(2.4rem, 5.6vw, 5.5rem)/1.3 var(--f-zh-serif); letter-spacing: .14em; color: #fff; }

/* ---------- 6. Comparison ---------- */
.ab-cmp { width: 100%; border-collapse: collapse; }
.ab-cmp thead th { padding: 22px 28px 20px; vertical-align: bottom; text-align: left; font: 500 var(--fs-label)/1.4 var(--f-sans); letter-spacing: .24em; color: var(--muted); }
.ab-cmp thead th.ab-cmp__us { color: var(--burgundy); }
.ab-cmp th[scope="row"] { width: 24%; padding: 26px 28px 26px 0; text-align: left; vertical-align: top; font: 400 var(--fs-h3)/1.5 var(--f-zh-serif); }
.ab-cmp th[scope="row"] .num { display: block; margin-bottom: 6px; font-size: .875rem; color: var(--brass); }
.ab-cmp td { width: 30%; padding: 30px 28px 26px; vertical-align: top; color: var(--muted); }
.ab-cmp td.ab-cmp__us { width: 46%; color: var(--ink); background: var(--burgundy-tint); }
.ab-cmp td.ab-cmp__us::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 14px; vertical-align: .2em; background: var(--burgundy); transform: rotate(45deg); }
.ab-cmp tbody tr { border-top: 1px solid var(--line); }
.ab-cmp tbody tr:last-child { border-bottom: 1px solid var(--line); }
.ab-cmp thead th.ab-cmp__us { background: var(--burgundy-tint); border-radius: var(--r-lg) var(--r-lg) 0 0; }

/* ---------- 7. Doors ---------- */
.ab-doors { padding-top: 0; padding-bottom: var(--sec); }
.ab-doors__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); align-items: start; }
.ab-door { display: grid; background: var(--sand); border-radius: var(--r-lg); overflow: hidden; transition: background .5s var(--ease); }
.ab-door:nth-child(2) { margin-top: clamp(0px, 7vw, 112px); }
.ab-door__img { aspect-ratio: 4 / 3; border-radius: 0; }
.ab-door__img img { transition: transform 1.2s var(--ease); }
.ab-door:hover .ab-door__img img { transform: scale(1.04); }
.ab-door__txt { display: grid; gap: 14px; justify-items: start; padding: clamp(28px, 3vw, 44px); }
.ab-door__kicker { font-size: var(--fs-label); letter-spacing: .28em; color: var(--burgundy); }
.ab-door .h2 { font-size: clamp(1.6rem, 2.4vw, 2.4rem); }
.ab-door .link { margin-top: 8px; }
.ab-door:hover .link { color: var(--burgundy); gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .ab-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .ab-hero__collage { max-width: 620px; width: 100%; margin-inline: auto; }
  .ab-story__grid { grid-template-columns: minmax(0, 1fr); }
  .ab-rail { position: static; }
  .ab-rail__list, .ab-rail__bar { display: none; }

  .ab-proc__track { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; padding-bottom: 8px; }
  .ab-proc__track::-webkit-scrollbar { display: none; }
  .ab-step { flex-basis: min(64vw, 380px); scroll-snap-align: start; }
  .ab-step:nth-child(even) { padding-top: 0; }
  .ab-step__img { height: auto; aspect-ratio: 4 / 5; }

  .ab-energy__grid { grid-template-columns: minmax(0, 1fr); }
  .ab-energy__stmt { justify-items: start; }
  .ab-energy__v { justify-self: start; }
  .ab-energy__body { padding-top: 0; }
}
@media (max-width: 767px) {
  .ab-ch__body { grid-template-columns: minmax(0, 1fr); }
  .ab-ch--flip .ab-ch__img { order: 0; }
  .ab-ch__no { font-size: 4rem; }

  .ab-energy__v { writing-mode: horizontal-tb; font-size: clamp(2rem, 8.6vw, 2.6rem); letter-spacing: .08em; text-wrap: balance; }
  .ab-princ__item { grid-template-columns: 48px minmax(0, 1fr); gap: 18px; }
  .ab-princ__seal { width: 46px; height: 46px; font-size: 1.25rem; }

  .ab-cmp, .ab-cmp tbody, .ab-cmp tr, .ab-cmp th, .ab-cmp td { display: block; width: auto !important; }
  .ab-cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ab-cmp tbody tr { padding-block: 24px; }
  .ab-cmp th[scope="row"] { padding: 0 0 14px; }
  .ab-cmp td { padding: 14px 16px; font-size: var(--fs-small); }
  .ab-cmp td::before { display: block; margin-bottom: 4px; font-size: .75rem; letter-spacing: .2em; color: var(--muted); }
  .ab-cmp td:not(.ab-cmp__us)::before { content: "常見的做法"; }
  .ab-cmp td.ab-cmp__us { border-radius: var(--r); }
  .ab-cmp td.ab-cmp__us::before { content: "在媧石皇家"; display: block; width: auto; height: auto; margin: 0 0 4px; background: none; transform: none; color: var(--burgundy); vertical-align: baseline; }

  .ab-doors__grid { grid-template-columns: minmax(0, 1fr); }
  .ab-door:nth-child(2) { margin-top: 0; }
}
@media (max-width: 480px) {
  .ab-facts__item { padding-right: 8px; }
  .ab-facts__item + .ab-facts__item { padding-left: 12px; }
  .ab-facts dt { letter-spacing: .06em; }
  .ab-hero__a { width: 78%; margin-right: 28px; }
  .ab-hero__note { letter-spacing: .4em; }
  .ab-step { flex-basis: 78vw; }
}
