/* 媧石皇家 demo 4 — 皇家學堂 (academy.html). Auravell /blog layout, prefix k4-.
   Also loaded by article.html for the shared blog card (.k4-card / .k4-grid), eyebrow and CTA band. */

/* ---------- shared bits ---------- */
.k4-eyebrow { font: 400 clamp(1rem, .9rem + .3vw, 1.25rem)/1.4 var(--f-serif); letter-spacing: .14em; color: var(--ink); }
.k4-h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.5rem); line-height: 1.25; letter-spacing: .03em; }
.k4-h2 .accent, .k4-head__title .accent { color: var(--burgundy); }
.k4-page mark, .r4-page mark { background: var(--burgundy-tint); color: var(--burgundy-deep); padding: 0 .1em; border-radius: 2px; }

/* ---------- 1. head ---------- */
.k4-head { padding-top: calc(var(--hd-h) + clamp(96px, 9vw, 150px)); padding-bottom: clamp(40px, 4.4vw, 64px); }
.k4-head__in { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px 64px; flex-wrap: wrap; }
.k4-head__copy { display: grid; gap: clamp(20px, 2.4vw, 36px); flex: 1 1 560px; }
.k4-head__title { font-size: clamp(2.6rem, 1.5rem + 3.9vw, 4.75rem); line-height: 1.16; letter-spacing: .04em; }
.k4-head__side { flex: 0 1 460px; display: grid; gap: 24px; }
.k4-head__side > p { color: var(--muted); font-size: var(--fs-body); line-height: 1.85; }

/* search */
.k4-search { position: relative; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 6px 6px 6px 48px; background: #fff; border-radius: var(--r); box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 10px 30px rgba(23,24,26,.05); }
.k4-search:focus-within { box-shadow: 0 0 0 1px var(--burgundy), 0 10px 30px rgba(23,24,26,.06); }
.k4-search__ic { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); }
.k4-search__in { flex: 1 1 auto; min-width: 0; height: 48px; border: 0; background: none; font: 400 1rem/1.4 var(--f-sans); letter-spacing: .04em; color: var(--ink); }
.k4-search__in:focus { outline: none; }
.k4-search__in::placeholder { color: #8b8d93; }
.k4-search__in::-webkit-search-cancel-button { display: none; }
.k4-search__clear { flex: none; padding: 0 10px; height: 40px; font-size: var(--fs-label); letter-spacing: .1em; color: var(--muted); }
.k4-search__clear:hover { color: var(--burgundy); }
.k4-search__go { flex: none; height: 48px; padding: 0 22px; border-radius: 6px; background: var(--burgundy); color: #fff; font-size: var(--fs-small); letter-spacing: .12em; transition: background-color .3s; }
.k4-search__go:hover { background: var(--burgundy-deep); }

/* ---------- 2. featured ---------- */
.k4-featsec { padding-bottom: clamp(72px, 8vw, 120px); transition: opacity .5s var(--ease); }
.k4-featsec.is-dim { opacity: .55; }
.k4-feat { display: flex; align-items: stretch; gap: clamp(24px, 3.4vw, 56px); }
.k4-feat__media { position: relative; flex: 1 1 0%; max-width: 820px; min-height: 0; aspect-ratio: 16 / 11; border-radius: var(--r); overflow: hidden; background: var(--stone); }
.k4-feat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.k4-feat__tag { position: absolute; left: 20px; top: 20px; padding: 8px 14px; border-radius: 6px; background: rgba(254,249,239,.94); font-size: var(--fs-label); letter-spacing: .14em; color: var(--burgundy); }
.k4-feat__body { flex: 1 1 0%; max-width: 520px; display: flex; flex-direction: column; padding-block: 8px; }
.k4-feat__title { margin-top: 24px; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem); line-height: 1.3; letter-spacing: .03em; transition: color .4s var(--ease); }
.k4-feat__ex { margin-top: 20px; color: var(--muted); line-height: 1.9; }
.k4-feat__foot { margin-top: auto; padding-top: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.k4-feat__mins { font-size: var(--fs-small); color: var(--muted); letter-spacing: .08em; }
.k4-feat:hover .k4-feat__media img { transform: scale(1.04); }
.k4-feat:hover .k4-feat__title { color: var(--burgundy); }
.k4-feat:hover .k4-feat__btn::before { transform: translateY(0); }
.k4-feat:hover .k4-feat__btn::after { transform: rotate(90deg); }

/* ---------- blog card (Auravell): photo left, meta / dashed rule / title / excerpt / round arrow ---------- */
.k4-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; column-gap: 24px; row-gap: 48px; align-items: stretch; }
.k4-card { display: flex; gap: 24px; align-items: stretch; color: var(--ink); }
.k4-card__media { position: relative; flex: 1 1 0%; max-width: 326px; min-height: 0; aspect-ratio: 326 / 316; align-self: flex-start; border-radius: var(--r); overflow: hidden; background: var(--stone); }
.k4-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.k4-card__media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(42,43,47,0), rgba(42,43,47,.6)); opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.k4-card__frame { position: absolute; inset: 0; z-index: 1; opacity: 0; transform: scale(.6); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.k4-card__frame i { position: absolute; width: 30px; height: 30px; border: 0 solid rgba(255,255,255,.85); }
.k4-card__frame i:nth-child(1) { top: 16px; left: 16px; border-top-width: 1px; border-left-width: 1px; border-top-left-radius: 8px; }
.k4-card__frame i:nth-child(2) { top: 16px; right: 16px; border-top-width: 1px; border-right-width: 1px; border-top-right-radius: 8px; }
.k4-card__frame i:nth-child(3) { bottom: 16px; left: 16px; border-bottom-width: 1px; border-left-width: 1px; border-bottom-left-radius: 8px; }
.k4-card__frame i:nth-child(4) { bottom: 16px; right: 16px; border-bottom-width: 1px; border-right-width: 1px; border-bottom-right-radius: 8px; }
.k4-card__body { flex: 1 1 0%; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.k4-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; padding-bottom: 18px; border-bottom: 1px dashed #C9C2B8; font-size: var(--fs-small); line-height: 1.5; letter-spacing: .04em; color: var(--burgundy); }
.k4-card__title { margin-top: 18px; font: 400 clamp(1.25rem, 1.05rem + .5vw, 1.5rem)/1.5 var(--f-serif); letter-spacing: .03em; transition: color .4s var(--ease); }
.k4-card__ex { display: block; margin-top: auto; padding-top: 18px; font-size: var(--fs-small); line-height: 1.75; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.k4-card__go { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-top: 20px; border-radius: 50%; background: var(--ink); color: #fff; transition: background-color .4s var(--ease), transform .5s var(--ease); }
.k4-card__go svg { width: 12px; height: 12px; }
.k4-feat__body .k4-card__meta { font-size: var(--fs-body); }
.k4-card:hover .k4-card__media img, .k4-card:focus-visible .k4-card__media img { transform: scale(1.08) rotate(-1.5deg); }
.k4-card:hover .k4-card__media::after, .k4-card:hover .k4-card__frame,
.k4-card:focus-visible .k4-card__media::after, .k4-card:focus-visible .k4-card__frame { opacity: 1; transform: none; }
.k4-card:hover .k4-card__title, .k4-card:focus-visible .k4-card__title { color: var(--burgundy); }
.k4-card:hover .k4-card__go, .k4-card:focus-visible .k4-card__go { background: var(--burgundy); transform: rotate(45deg); }
.k4-card.is-new, .k4-row.is-new { animation: k4-in .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes k4-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- chips ---------- */
.k4-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.k4-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r); background: #fff; font-size: var(--fs-small); letter-spacing: .06em; color: var(--ink); transition: background-color .3s, color .3s, box-shadow .3s; box-shadow: inset 0 0 0 1px rgba(42,43,47,.06); }
.k4-chip .num { font-size: .8125rem; color: var(--muted); transition: color .3s; }
.k4-chip:hover { box-shadow: inset 0 0 0 1px var(--burgundy); }
.k4-chip[aria-pressed="true"] { background: var(--burgundy); color: #fff; box-shadow: none; }
.k4-chip[aria-pressed="true"] .num { color: rgba(255,255,255,.75); }

/* ---------- 3. 學堂 list ---------- */
.k4-list { padding-block: clamp(72px, 8vw, 120px); border-top: 1px dashed #C9C2B8; }
.k4-list .wrap, .k4-news .wrap { position: relative; }
.k4-list__head, .k4-news__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 28px 48px; margin-bottom: clamp(36px, 4.4vw, 64px); }
.k4-list__head > div:first-child, .k4-news__head > div:first-child { display: grid; gap: 16px; }
.k4-list__head .k4-chips { flex: 0 1 820px; justify-content: flex-end; }
.k4-status { margin: -24px 0 32px; font-size: var(--fs-small); letter-spacing: .06em; color: var(--muted); }
.k4-empty { grid-column: 1 / -1; display: grid; justify-items: start; gap: 16px; padding: 48px 0; color: var(--muted); }
.k4-more { display: flex; justify-content: center; margin-top: clamp(48px, 5vw, 72px); }
.k4-more .btn[hidden] { display: none; }

/* ---------- 4. 品牌消息: timetable rows ---------- */
.k4-news { padding-block: clamp(80px, 9vw, 140px); background: var(--sand); }
.k4-news__side { flex: 0 1 560px; display: grid; gap: 20px; }
.k4-news__side > p { color: var(--muted); }
.k4-status--news { margin: 0 0 12px; }
.k4-rows { border-top: 1px solid var(--line); }
.k4-row { border-bottom: 1px solid var(--line); }
.k4-row > a, .k4-row summary { display: grid; grid-template-columns: 140px 120px minmax(0, 1fr) 40px; align-items: center; gap: 12px 24px; padding: 22px 8px; transition: background-color .35s var(--ease), padding .45s var(--ease); cursor: pointer; }
.k4-row summary { list-style: none; }
.k4-row summary::-webkit-details-marker { display: none; }
.k4-row > a:hover, .k4-row summary:hover { background: rgba(255,255,255,.55); padding-inline: 20px; }
.k4-row__d { font-size: 1.0625rem; color: var(--ink); }
.k4-row__c { justify-self: start; padding: 4px 12px; border-radius: 6px; background: #fff; font-size: var(--fs-label); letter-spacing: .12em; color: var(--burgundy); white-space: nowrap; }
.k4-row__t { font: 400 clamp(1.0625rem, 1rem + .3vw, 1.25rem)/1.55 var(--f-zh-serif); letter-spacing: .04em; transition: color .3s; }
.k4-row__t small { display: block; margin-top: 4px; font: 400 var(--fs-label)/1.5 var(--f-sans); letter-spacing: .06em; color: var(--muted); }
.k4-row__go { justify-self: end; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: background-color .35s, color .35s, border-color .35s, transform .45s var(--ease); }
.k4-row__go svg { width: 12px; height: 12px; }
.k4-row > a:hover .k4-row__t, .k4-row summary:hover .k4-row__t { color: var(--burgundy); }
.k4-row > a:hover .k4-row__go { background: var(--burgundy); border-color: var(--burgundy); color: #fff; transform: rotate(45deg); }
.k4-row__go--plus { position: relative; }
.k4-row__go--plus::before, .k4-row__go--plus::after { content: ""; position: absolute; width: 12px; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
.k4-row__go--plus::after { transform: rotate(90deg); }
.k4-row details[open] .k4-row__go--plus::after { transform: rotate(0deg); }
.k4-row details[open] summary .k4-row__go { background: var(--ink); border-color: var(--ink); color: #fff; }
.k4-bundle { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 24px; padding: 4px 8px 24px calc(140px + 24px + 8px); }
.k4-bundle a { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed #C9C2B8; font-size: var(--fs-small); line-height: 1.6; transition: color .3s; }
.k4-bundle a:hover { color: var(--burgundy); }
.k4-bundle time { flex: none; color: var(--muted); }

/* ---------- 5. CTA panel (rounded burgundy card on cream; the footer below already carries the photo band) ---------- */
.k4-cta { padding-block: clamp(80px, 9vw, 140px); }
.r4-page .k4-cta { padding-top: 0; }
.k4-cta__in { position: relative; overflow: hidden; isolation: isolate; display: flex; justify-content: space-between; align-items: center; gap: 40px 64px; flex-wrap: wrap;
  padding: clamp(40px, 6vw, 96px) clamp(24px, 5.5vw, 88px); border-radius: var(--r); color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #7a2536 0%, var(--burgundy-deep) 55%, #2c0b13 100%); }
.k4-cta__lines { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
.k4-cta__copy { flex: 1 1 480px; max-width: 720px; display: grid; gap: 22px; justify-items: start; }
.k4-cta .eyebrow { color: #E9C9C3; }
.k4-cta__h { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.5rem); line-height: 1.28; letter-spacing: .04em; color: #fff; }
.k4-cta__h .accent { color: #E9C9C3; }
.k4-cta__p { max-width: 34em; color: rgba(244,237,227,.86); line-height: 1.9; }
.k4-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.k4-btn--white { background: #fff; border-color: #fff; color: var(--burgundy); --fill: var(--paper); }
.k4-cta__qr { flex: none; display: flex; align-items: center; gap: 20px; padding: 16px 24px 16px 16px; border-radius: var(--r); background: var(--paper); color: var(--ink); }
.k4-cta__qr img { width: 112px; height: 112px; border-radius: 6px; }
.k4-cta__qr p { font-size: var(--fs-small); line-height: 1.7; letter-spacing: .06em; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .k4-grid { column-gap: 20px; }
  .k4-card { flex-direction: column; gap: 20px; }
  .k4-card__media { flex: none; width: 100%; max-width: none; aspect-ratio: 4 / 3; }
  .k4-card__ex { margin-top: 0; }
  .k4-card__go { margin-top: 18px; }
}
@media (max-width: 991px) {
  .k4-feat { flex-direction: column; }
  .k4-feat__media { flex: none; width: 100%; max-width: none; }
  .k4-feat__body { max-width: none; }
  .k4-list__head .k4-chips { justify-content: flex-start; flex-basis: 100%; }
  .k4-row > a, .k4-row summary { grid-template-columns: 110px 100px minmax(0, 1fr) 40px; gap: 10px 16px; }
  .k4-bundle { padding-left: 8px; }
}
@media (max-width: 767px) {
  .k4-head { text-align: center; }
  .k4-head__in { justify-content: center; }
  .k4-head__copy { justify-items: center; }
  .k4-head__side { flex-basis: 100%; }
  .k4-head__side > p { text-align: left; }
  .k4-grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .k4-row > a, .k4-row summary { grid-template-columns: auto minmax(0, 1fr) 36px; grid-template-areas: "d c go" "t t go"; gap: 8px 12px; padding: 18px 0; }
  .k4-row > a:hover, .k4-row summary:hover { padding-inline: 0; background: none; }
  .k4-row__d { grid-area: d; font-size: .9375rem; }
  .k4-row__c { grid-area: c; }
  .k4-row__t { grid-area: t; }
  .k4-row__go { grid-area: go; width: 36px; height: 36px; }
  .k4-bundle { padding: 0 0 18px; }
  .k4-cta__qr { width: 100%; }
}
@media (max-width: 640px) {
  .k4-head { padding-top: calc(var(--hd-h) + 72px); }
  .k4-search { padding-left: 42px; }
  .k4-search__ic { left: 14px; }
  .k4-search__go { padding: 0 16px; }
  .k4-search__in { font-size: 1rem; }
  .k4-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .k4-chips::-webkit-scrollbar { display: none; }
  .k4-chip { flex: none; }
  .k4-feat__tag { left: 12px; top: 12px; }
  .k4-cta__btns { width: 100%; }
  .k4-cta__btns .btn { flex: 1 1 100%; }
  .k4-cta__qr img { width: 92px; height: 92px; }
  .k4-cta__qr p br { display: none; }
}
