/* =================================================================
   K-Well — Team bio pages (team/*.html)
   Loads AFTER styles.css (reuses --kw-* tokens, nav, footer, .btn,
   .eyebrow, .kw-container, .member__role-tag) and site.css.
   ================================================================= */

.tm-page { background: var(--kw-paper); }

/* ---------------- Hero ---------------- */
.tm-hero { padding: 132px 0 40px; position: relative; overflow: hidden; }
/* soft watercolor backdrop, fading into paper */
.tm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/images/practitioners-bg.webp") center / cover no-repeat;
  opacity: .30;
  pointer-events: none;
}
.tm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(243,239,231,.25), var(--kw-paper) 92%);
  pointer-events: none;
}
.tm-hero .kw-container { position: relative; z-index: 2; }
/* giant vertical brush watermark of the practitioner's hangul name (injected by tm-anim.js) */
.tm-wm {
  position: absolute;
  top: 50%;
  right: 1.5%;
  transform: translateY(-50%);
  z-index: 1;
  font-family: var(--kw-font-brush);
  font-size: clamp(150px, 22vw, 300px); /* refined per-page by tm-anim.js to fit the hero */
  line-height: .92;
  writing-mode: vertical-rl;
  letter-spacing: .02em;
  color: var(--kw-ink);
  opacity: .045;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.tm-hero__grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.tm-hero__media { position: relative; }
/* offset blue frame behind the portrait — mounted-photo feel */
.tm-hero__media::before {
  content: "";
  position: absolute;
  inset: 18px -16px -16px 18px;
  border: 1.5px solid var(--kw-blue);
  border-radius: var(--kw-radius-md, 16px);
  opacity: .3;
  pointer-events: none;
}
.tm-hero__img-wrap {
  position: relative;
  z-index: 1;
  aspect-ratio: 3 / 4;
  border-radius: var(--kw-radius-md, 16px);
  overflow: hidden;
  background: var(--kw-paper-2);
  box-shadow: 0 24px 60px -28px rgba(20,17,13,.35);
}
.tm-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--kw-ease); }
.tm-hero__media:hover .tm-hero__img { transform: scale(1.035); }
/* small blue stamp seal overlapping the portrait corner (injected by tm-anim.js) */
.tm-seal {
  position: absolute;
  right: -14px;
  bottom: 26px;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--kw-blue);
  color: var(--kw-paper);
  font-family: var(--kw-font-brush);
  font-size: 22px;
  border-radius: 11px;
  transform: rotate(-5deg);
  box-shadow: 0 8px 20px -8px rgba(14,79,142,.6);
  pointer-events: none;
}
.tm-hero__img-wrap .member__role-tag { z-index: 2; white-space: nowrap; }

.tm-name {
  font-family: var(--kw-font-serif);
  font-weight: 700;
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 14px 0 0;
  color: var(--kw-ink);
}
.tm-name__hangul {
  font-family: var(--kw-font-brush);
  font-size: 0.42em;
  font-weight: 400;
  color: var(--kw-stone);
  margin-left: 14px;
  vertical-align: 6px;
  white-space: nowrap;
}
.tm-cred {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--kw-ink);
}
.tm-role {
  margin-top: 6px;
  font-size: 15px;
  color: var(--kw-stone);
  letter-spacing: 0.03em;
}
.tm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tm-chip {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--kw-ink);
  background: var(--kw-paper-cream, #f8f5ef);
  border: 1px solid var(--kw-bone);
  border-radius: 999px;
  padding: 7px 14px;
  transition: color var(--kw-dur) var(--kw-ease), border-color var(--kw-dur) var(--kw-ease), background var(--kw-dur) var(--kw-ease), transform var(--kw-dur) var(--kw-ease);
}
.tm-chip:hover {
  color: var(--kw-blue);
  border-color: color-mix(in srgb, var(--kw-blue) 45%, var(--kw-bone));
  background: color-mix(in srgb, var(--kw-blue-soft, #d6e1ee) 40%, var(--kw-paper-cream, #f8f5ef));
  transform: translateY(-2px);
}
.tm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 30px; }
.tm-back {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--kw-stone);
  text-decoration: none;
  border-bottom: 1px solid var(--kw-bone);
  padding-bottom: 2px;
  transition: color var(--kw-dur) var(--kw-ease);
}
.tm-back:hover { color: var(--kw-ink); }

/* ---------------- Body ---------------- */
.tm-body { padding: 10px 0 90px; }
.tm-body__inner { max-width: 840px; margin: 0 auto; }
.tm-p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--kw-stone);
  margin: 0 0 1.2em;
  text-wrap: pretty;
}
.tm-p strong { color: var(--kw-ink); }

.tm-section { border-top: 1px solid var(--kw-bone); padding: 30px 0 8px; margin-top: 26px; }
.tm-section__h {
  font-family: var(--kw-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kw-ink);
  margin: 0 0 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.tm-section__h::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--kw-blue);
  align-self: center;
  flex-shrink: 0;
}
.tm-section__h small {
  font-family: var(--kw-font-brush);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--kw-wash);
}
.tm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tm-list li {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--kw-stone);
  padding: 11px 0 11px 24px;
  border-top: 1px dashed color-mix(in srgb, var(--kw-bone) 65%, transparent);
  position: relative;
  transition: padding-left var(--kw-dur) var(--kw-ease);
}
.tm-list li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.35em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kw-blue);
  opacity: .4;
  transition: opacity var(--kw-dur) var(--kw-ease), transform var(--kw-dur) var(--kw-ease);
}
.tm-list li:hover { padding-left: 28px; }
.tm-list li:hover::before { opacity: 1; transform: scale(1.35); }
.tm-list li:first-child { border-top: 0; }
.tm-list li strong { color: var(--kw-ink); font-weight: 700; }
.tm-list li em {
  font-style: normal;
  color: var(--kw-wash);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  float: right;
  margin-left: 16px;
}

.tm-quote {
  margin: 40px 0 0;
  padding: 38px 42px;
  background: var(--kw-paper-cream, #f8f5ef);
  border: 1px solid color-mix(in srgb, var(--kw-bone) 55%, transparent);
  border-radius: var(--kw-radius-md, 16px);
  position: relative;
  overflow: hidden;
}
.tm-quote::before {
  content: "\201C";
  position: absolute;
  top: -8px;
  left: 16px;
  font-family: var(--kw-font-brush);
  font-size: 110px;
  line-height: 1;
  color: color-mix(in srgb, var(--kw-blue) 22%, transparent);
}
.tm-quote::after {
  content: "\6B63 ";
  position: absolute;
  right: -10px;
  bottom: -34px;
  font-family: var(--kw-font-brush);
  font-size: 130px;
  line-height: 1;
  color: var(--kw-ink);
  opacity: .045;
  pointer-events: none;
}
.tm-quote blockquote {
  margin: 0;
  font-family: var(--kw-font-serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.55;
  color: var(--kw-ink);
}
.tm-quote figcaption { margin-top: 12px; font-size: 13.5px; letter-spacing: 0.06em; color: var(--kw-wash); }

/* ---------------- Bottom CTA ---------------- */
.tm-cta {
  border-top: 1px solid var(--kw-bone);
  padding: 30px 0 0;
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
}
.tm-cta__note { font-size: 14.5px; color: var(--kw-stone); }
.tm-cta__note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .tm-hero { padding-top: 112px; }
  .tm-hero__grid { grid-template-columns: 1fr; }
  .tm-hero__media { max-width: 340px; }
  .tm-list li em { float: none; display: block; margin: 2px 0 0; }
  .tm-wm { font-size: 120px; right: -4%; opacity: .04; }
  .tm-seal { right: -8px; bottom: 18px; width: 38px; height: 38px; font-size: 18px; }
  .tm-hero__media::before { inset: 12px -10px -10px 12px; }
}

/* =================================================================
   Entrance animations — gated on html.tm-anim (set inline pre-paint).
   No JS → fully visible page. Reduced motion → opacity fades only.
   ================================================================= */
html.tm-anim .tm-hero__media { animation: tmRise .9s var(--kw-ease) .1s both; }
html.tm-anim .tm-hero__info .eyebrow { animation: tmRise .7s var(--kw-ease) .25s both; }
html.tm-anim .tm-name { animation: tmRise .85s var(--kw-ease) .35s both; }
html.tm-anim .tm-cred { animation: tmRise .8s var(--kw-ease) .47s both; }
html.tm-anim .tm-role { animation: tmRise .8s var(--kw-ease) .55s both; }
html.tm-anim .tm-actions { animation: tmRise .8s var(--kw-ease) .85s both; }
html.tm-anim .tm-chip {
  animation: tmChip .55s cubic-bezier(.2,1.3,.4,1) both;
  animation-delay: calc(.6s + var(--tm-i, 0) * 70ms);
}
html.tm-anim .tm-wm { animation: tmInk 1.6s var(--kw-ease) .4s both; }
html.tm-anim .tm-seal { animation: tmStamp .6s cubic-bezier(.2,1.5,.4,1) 1.15s both; }
@keyframes tmRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tmChip { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes tmInk { from { opacity: 0; filter: blur(8px); } to { opacity: .045; filter: blur(0); } }
@keyframes tmStamp { from { opacity: 0; transform: rotate(-5deg) scale(1.5); } to { opacity: 1; transform: rotate(-5deg) scale(1); } }

/* scroll entrances for the body (tm-anim.js adds .tm-in via IO) */
html.tm-anim .tm-body__inner > .tm-p,
html.tm-anim .tm-section,
html.tm-anim .tm-quote,
html.tm-anim .tm-cta {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--kw-ease), transform .7s var(--kw-ease);
}
html.tm-anim .tm-in { opacity: 1; transform: translateY(0); }
html.tm-anim .tm-section .tm-list li {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .6s var(--kw-ease), transform .6s var(--kw-ease);
  transition-delay: calc(.18s + var(--tm-i, 0) * 60ms);
}
html.tm-anim .tm-section.tm-in .tm-list li { opacity: 1; transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
  html.tm-anim .tm-hero__media,
  html.tm-anim .tm-hero__info .eyebrow,
  html.tm-anim .tm-name,
  html.tm-anim .tm-cred,
  html.tm-anim .tm-role,
  html.tm-anim .tm-actions,
  html.tm-anim .tm-chip,
  html.tm-anim .tm-wm,
  html.tm-anim .tm-seal {
    animation: tmRmFade .8s ease both !important;
  }
  html.tm-anim .tm-wm { opacity: .045; }
  html.tm-anim .tm-body__inner > .tm-p,
  html.tm-anim .tm-section,
  html.tm-anim .tm-quote,
  html.tm-anim .tm-cta,
  html.tm-anim .tm-section .tm-list li {
    transform: none !important;
    transition: opacity .7s ease !important;
    transition-delay: 0s !important;
  }
  .tm-hero__media:hover .tm-hero__img { transform: none; }
}
@keyframes tmRmFade { from { opacity: 0; } to { opacity: 1; } }
