/* v3.2 art lettering, loaded last on every page.
   Each section of the site gets one large brush character behind its opening heading and a small
   jade seal (印章) after the heading, both decorative and hidden from screen readers.
   Chinese pages set their main headings in 楷体; every language gets italic serif numerals.
   Layout, copy and colours from v3.1 / Codex r2 are unchanged; nothing here adds lines or illustrations.
   Fonts: LXGW WenKai and Ma Shan Zheng (both SIL OFL 1.1), cut to the site's characters by
   tools/build-art-fonts.py. A character outside the subset falls back to the serif. */
@font-face{font-family:"GWC Kai";src:url("/assets/fonts/gwc-kai.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"GWC Brush";src:url("/assets/fonts/gwc-brush.woff2") format("woff2");font-weight:400;font-style:normal;font-display:block}
:root{
  --art-kai:"GWC Kai","Kaiti SC","STKaiti","KaiTi","楷体",var(--display);
  --art-brush:"GWC Brush","GWC Kai","Kaiti SC","STKaiti","KaiTi",var(--display);
  --art-glyph-ink:rgba(29,98,91,.085);
  --art-seal:#1d625b;
}
html[lang="zh-Hant"]{--art-kai:"GWC Kai","Kaiti TC","BiauKai","DFKai-SB",var(--display)}

/* One character and one seal per section. Legal pages carry none. */
body[data-route="home"]{--art-glyph:"康";--art-stamp:"安康"}
body[data-route="healthcare"]{--art-glyph:"诊";--art-stamp:"问诊"}
body[data-route="projects-health-check"]{--art-glyph:"检";--art-stamp:"体检"}
body[data-route="projects-specialist-opinion"]{--art-glyph:"医";--art-stamp:"专科"}
body[data-route="projects-dental-eye-dermatology"]{--art-glyph:"明";--art-stamp:"齿目"}
body[data-route="projects-womens-health"]{--art-glyph:"家";--art-stamp:"家安"}
body[data-route="projects-aesthetics"]{--art-glyph:"美";--art-stamp:"医美"}
body[data-route="process"]{--art-glyph:"程";--art-stamp:"六步"}
body[data-route="journey"]{--art-glyph:"行";--art-stamp:"定制"}
body[data-route="jiangxi"]{--art-glyph:"山";--art-stamp:"山水"}
body[data-route^="guide"]{--art-glyph:"南";--art-stamp:"指南"}
body[data-route="cases"]{--art-glyph:"例";--art-stamp:"示例"}
body[data-route="about"],body[data-route="hospital-profile"]{--art-glyph:"院";--art-stamp:"医院"}
body[data-route="companion-service"]{--art-glyph:"伴";--art-stamp:"陪护"}
body[data-route="enquiry"]{--art-glyph:"问";--art-stamp:"咨询"}
body[data-route="enquiry-received"]{--art-glyph:"谢";--art-stamp:"收悉"}
body[data-route="partners"]{--art-glyph:"合";--art-stamp:"合作"}

/* Brush character behind the opening heading */
main .page-intro,main .gw-hero,main .travel-hero,main .huarui-hero,.welcome-close{position:relative;isolation:isolate;overflow:hidden}
main .page-intro::before,main .gw-hero::before,main .travel-hero::before,.welcome-close::before{
  content:var(--art-glyph,none);content:var(--art-glyph,none) / "";
  position:absolute;z-index:-1;top:50%;inset-inline-end:clamp(12px,9vw,150px);transform:translateY(-52%);
  font-family:var(--art-brush);font-size:clamp(150px,19vw,300px);font-weight:400;font-style:normal;line-height:1;
  color:var(--art-glyph-ink);pointer-events:none;user-select:none;white-space:nowrap
}
main .page-intro.illustrated-intro::before{inset-inline-end:clamp(150px,24vw,360px)}
main .gw-hero::before{inset-inline-end:auto;inset-inline-start:44%}
main .travel-hero::before{inset-inline-start:auto;inset-inline-end:2%}
.welcome-close::before{--art-glyph-ink:rgba(201,166,91,.16);font-size:clamp(150px,16vw,240px)}

/* The process page opened on a grey-green band; it now uses the same warm ground as every other intro. */
main .gw-hero{background:linear-gradient(110deg,#f1d9c8,#f8e9c7);border-bottom:1px solid var(--rim-soft,#dfcfb9)}

/* Jade seal after the main heading */
main h1::after{
  content:var(--art-stamp,none);content:var(--art-stamp,none) / "";
  display:inline-block;vertical-align:.18em;margin:-.8em 0 -.8em .5em;
  writing-mode:vertical-rl;text-orientation:upright;
  font-family:var(--art-brush);font-size:max(15px,.3em);font-weight:400;font-style:normal;line-height:1.02;letter-spacing:0;
  padding:.3em .2em;color:#fbf3e4;background:var(--art-seal);border-radius:2px;
  box-shadow:inset 0 0 0 2px var(--art-seal),inset 0 0 0 3px rgba(251,243,228,.6);
  transform:rotate(-2deg)
}
.home-hero h1::after{vertical-align:.08em}

/* 楷体 for h1 and h2 on Chinese pages; card and step titles (h3) stay in the serif. */
html[lang^="zh"] main h1,
html[lang^="zh"] main h2{font-family:var(--art-kai);font-weight:400;letter-spacing:.03em}
html[lang^="zh"] main h1{letter-spacing:.05em}
html[lang^="zh"] main .selection-panel h2{font-family:var(--display);letter-spacing:0}
html[lang^="zh"] .home-hero h1{font-size:clamp(40px,4.3vw,60px);line-height:1.3;letter-spacing:.02em}
html[lang^="zh"] .home-concerns h2{font-size:clamp(22px,2vw,28px)}
html[lang^="zh"] .welcome-close h2{font-size:clamp(28px,2.6vw,36px)}

/* Numerals in italic serif, so the order of things reads at a glance */
.service-index{font-family:var(--display);font-style:italic;font-size:46px;line-height:1;letter-spacing:0;color:var(--gold-light,#c9a65b)}
.service-card .service-index{display:block;margin-bottom:6px}

/* Footer greeting set as a signature line */
.footer-brand>p{font-size:17px;line-height:1.7;color:var(--ink)}
html:is([lang^="en"],[lang="fr"],[lang="de"],[lang="ru"]) .footer-brand>p{font-family:var(--display);font-style:italic;font-size:18px}
html[lang^="zh"] .footer-brand>p{font-family:var(--art-kai);font-style:normal;font-size:20px;letter-spacing:.06em}

@media(max-width:760px){
  main .page-intro::before,main .gw-hero::before,main .travel-hero::before,.welcome-close::before{font-size:150px;inset-inline-end:12px;inset-inline-start:auto}
  main h1::after{font-size:14px;margin-left:10px}
  main .illustrated-intro h1{padding-inline-end:96px}
  .service-index{font-size:36px}
}
@media print{
  main .page-intro::before,main .gw-hero::before,main .travel-hero::before,.welcome-close::before,main h1::after{content:none}
}

/* Traditional forms on zh-Hant pages */
html[lang="zh-Hant"] body[data-route="healthcare"]{--art-glyph:"診";--art-stamp:"問診"}
html[lang="zh-Hant"] body[data-route="projects-health-check"]{--art-glyph:"檢";--art-stamp:"體檢"}
html[lang="zh-Hant"] body[data-route="projects-specialist-opinion"]{--art-glyph:"醫";--art-stamp:"專科"}
html[lang="zh-Hant"] body[data-route="projects-dental-eye-dermatology"]{--art-stamp:"齒目"}
html[lang="zh-Hant"] body[data-route="projects-aesthetics"]{--art-stamp:"醫美"}
html[lang="zh-Hant"] body[data-route="journey"]{--art-stamp:"定製"}
html[lang="zh-Hant"] body[data-route="about"],html[lang="zh-Hant"] body[data-route="hospital-profile"]{--art-stamp:"醫院"}
html[lang="zh-Hant"] body[data-route="companion-service"]{--art-stamp:"陪護"}
html[lang="zh-Hant"] body[data-route="enquiry"]{--art-glyph:"問";--art-stamp:"諮詢"}
html[lang="zh-Hant"] body[data-route="enquiry-received"]{--art-glyph:"謝"}

/* The seal is set vertically, so its own logical margins turn sideways; right-to-left pages mirror it physically. */
html[dir="rtl"] main h1::after{margin-left:0;margin-right:.5em}
@media(max-width:760px){html[dir="rtl"] main h1::after{margin-left:0;margin-right:10px}}
