/* =============================================================================
   about.css — trang Giới thiệu (page-gioi-thieu.php), nạp sau style.css + wp.css
   -----------------------------------------------------------------------------
   Dùng lại biến màu và chữ của style.css (--nen, --tre, --serif…).
   Hiệu ứng chỉ chạy khi about.js gắn lớp .about-js lên <html>; không có JS
   thì mọi chữ và hình hiện sẵn ở trạng thái cuối.
   ========================================================================== */

.about { position: relative; z-index: 2; overflow: hidden; }
.about section { scroll-margin-top: 90px; }

/* ---------- Mở đầu ---------- */
.about-hero {
  position: relative;
  padding-block: calc(66px + clamp(40px, 7vw, 88px)) clamp(48px, 8vw, 96px);
  /* Không nền đặc, để lớp lá rơi phía sau hiện xuyên qua */
  background: radial-gradient(60% 70% at 78% 40%, rgba(94, 155, 63, .13), transparent 70%);
}
.about-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.about-hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.3rem, 6.4vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin-bottom: .45em;
}
.about-hero__lead { max-width: 54ch; color: var(--chu-phu); font-size: 1.06rem; margin: 0 0 32px; }
.about-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.about-hero__art { position: relative; margin: 0; aspect-ratio: 32 / 42; max-width: 380px; justify-self: center; width: 100%; }
.grove { width: 100%; height: 100%; overflow: visible; }
.grove__ground { fill: rgba(94, 155, 63, .16); }
.grove .ln { fill: none; stroke-linecap: round; }
.grove .node { fill: none; stroke: #1b3014; stroke-width: 3; stroke-linecap: round; }
.grove__leaves use { fill: var(--tre-sang); opacity: .9; }

/* Lá tre rơi 3D phía sau nội dung (cùng cách làm với trang /bio).
   Lớp cố định nằm dưới .about (z-index 2), chỉ trang trí, không chặn chuột. */
.about-sky {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  perspective: 700px;
  pointer-events: none;
}
.about-leaf {
  position: absolute; top: 0; left: var(--x);
  width: 12px; height: 34px;
  border-radius: 0 100% 0 100%;
  background: linear-gradient(160deg, var(--tre-sang), var(--tre) 55%, #2f5a22);
  /* lá xa mờ dần: z = -40 gần như rõ, z = -460 gần như tan vào nền */
  opacity: calc(.95 + var(--z) / 500);
  animation: about-roi var(--dur) linear var(--delay) infinite;
  will-change: transform;
}
@keyframes about-roi {
  0%   { transform: translate3d(0, -12vh, calc(var(--z) * 1px)) rotate(var(--r)) rotateX(0deg) rotateY(0deg); }
  50%  { transform: translate3d(-6vw, 55vh, calc(var(--z) * 1px)) rotate(calc(var(--r) + 140deg)) rotateX(160deg) rotateY(60deg); }
  100% { transform: translate3d(4vw, 118vh, calc(var(--z) * 1px)) rotate(calc(var(--r) + 300deg)) rotateX(360deg) rotateY(120deg); }
}

/* ---------- Hành trình ---------- */
.journey { position: relative; padding-block: clamp(64px, 10vw, 120px); }
.journey__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 3.2rem); }
.journey__lead { color: var(--chu-phu); max-width: 52ch; margin: 0 0 clamp(40px, 7vw, 80px); }

.journey__body { position: relative; display: grid; gap: clamp(56px, 10vw, 120px); }

/* Thân tre chạy giữa trang; phần xanh dài ra theo tiến độ cuộn (--p từ 0 tới 1) */
.spine {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 6px; margin-left: -3px; border-radius: 3px;
  background: rgba(94, 155, 63, .14);
}
.spine__fill {
  position: absolute; inset: 0 0 auto 0;
  height: calc(var(--p, 1) * 100%);
  border-radius: 3px;
  background: linear-gradient(var(--tre-sang), var(--tre));
  box-shadow: 0 0 18px rgba(139, 195, 74, .35);
}

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(56px, 9vw, 120px);
  align-items: center;
}
/* Chữ luôn canh trái cho dễ đọc; khối chữ cột trái tự dạt sát vào thân tre */
.chapter__text { grid-column: 1; width: 100%; max-width: 46ch; justify-self: end; }
.chapter__art  { grid-column: 2; margin: 0; }
.chapter--flip .chapter__text { grid-column: 2; grid-row: 1; justify-self: start; }
.chapter--flip .chapter__art  { grid-column: 1; grid-row: 1; }
.chapter__text p { color: var(--chu-phu); margin: 0 0 1em; }
.chapter__text p:last-child { margin-bottom: 0; }
/* Không để một chữ đứng trơ trọi ở dòng cuối */
.about p { text-wrap: pretty; }

.chapter__num {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--tre-sang) !important; margin-bottom: 10px !important;
}
.chapter__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin-bottom: .55em;
}

/* Đốt tre: vòng tròn trên thân, sáng lên khi chương vào khung nhìn */
.chapter__node {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: var(--nen);
  border: 3px solid var(--vien-dam);
  transition: border-color .6s var(--ease), box-shadow .6s var(--ease), transform .6s var(--ease);
}
.chapter.is-in .chapter__node {
  border-color: var(--tre-sang);
  box-shadow: 0 0 0 6px rgba(139, 195, 74, .12), 0 0 22px rgba(139, 195, 74, .45);
  transform: scale(1.08);
}

/* Khung hình minh hoạ */
.chapter__art svg {
  width: 100%; max-width: 360px; height: auto; display: block;
  background: var(--nen-2);
  border: 1px solid var(--vien);
  border-radius: 18px;
  padding: 18px;
}
.chapter:not(.chapter--flip) .chapter__art svg { margin-right: auto; }
.chapter--flip .chapter__art svg { margin-left: auto; }
.chapter__art--photo { max-width: 420px; }
.chapter--flip .chapter__art--photo { margin-left: auto; }
.chapter__photo { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--vien); }
.chapter__art figcaption,
.forms__video figcaption { font-size: .85rem; color: var(--chu-phu); margin-top: 10px; }

/* Bản đồ chữ S: chấm xanh khắp đất liền (tre ở đâu cũng có), xứ Quảng sáng lên */
.vn__land { fill: var(--nen); stroke: var(--tre); stroke-width: 1.6; stroke-linejoin: round; }
.vn__tre circle { fill: var(--tre); opacity: .45; }
.vn__isl circle { fill: var(--tre); opacity: .8; }
.vn__isl-name { fill: var(--chu-phu); font-family: var(--sans); font-size: 11px; font-weight: 300; }
.vn__route { fill: none; stroke: var(--tre-sang); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.vn__glow { fill: rgba(139, 195, 74, .18); transform-box: fill-box; transform-origin: center; }
.vn__fav { fill: var(--tre-sang); stroke: var(--chu); stroke-width: 2; }
.vn__home { fill: var(--nen); stroke: var(--tre-sang); stroke-width: 2.5; }
.vn__name { fill: var(--chu); font-family: var(--sans); font-size: 14px; font-weight: 400; }
.vn__name--fav { fill: var(--tre-sang); font-weight: 600; }
.about-js .vn__glow { animation: glow 2.8s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.35); opacity: .5; } }

/* Lát cắt chậu ươm */
.soil__grain circle { fill: rgba(242, 242, 236, .12); }
.soil__surface { stroke: rgba(242, 242, 236, .25); stroke-width: 2; stroke-dasharray: 6 6; }
.soil__bulb { fill: #6b8a3a; stroke: #2f4a1c; stroke-width: 2; }
.soil__ring { fill: none; stroke: #2f4a1c; stroke-width: 2; }
.soil__root { fill: none; stroke: #ece6d6; stroke-width: 2.4; stroke-linecap: round; }
.soil__shoot { fill: none; stroke: var(--tre-sang); stroke-width: 5; stroke-linecap: round; }
.soil__sprout { fill: var(--tre-sang); }

/* Ba bước giao cây, xếp dọc */
.trip__path { fill: none; stroke: var(--tre); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.trip__ring { fill: var(--nen); stroke: rgba(139, 195, 74, .55); stroke-width: 1.5; }
.trip__ring--end { stroke: var(--tre-sang); fill: rgba(139, 195, 74, .08); }
.trip__ico { fill: none; stroke: var(--tre-sang); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trip__dot, .trip__leaf { fill: var(--tre-sang); }
.trip__label { fill: var(--chu); font-family: var(--sans); font-size: 16px; font-weight: 400; }
.trip__sub { fill: var(--chu-phu); font-family: var(--sans); font-size: 13px; font-weight: 300; }

/* ---------- Một cây, một dáng ---------- */
.forms { padding-block: clamp(56px, 9vw, 110px); background: linear-gradient(180deg, transparent, rgba(31, 58, 26, .35) 50%, transparent); }
.forms__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}
.forms__text p:not(.eyebrow) { color: var(--chu-phu); max-width: 52ch; }
.forms__video { margin: 0; max-width: 340px; justify-self: center; width: 100%; }
.tt {
  position: relative; display: block; aspect-ratio: 540 / 774;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--vien-dam);
  background: var(--nen-2);
}
.tt img, .tt iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.tt__play {
  position: absolute; left: 50%; top: 50%;
  width: 68px; height: 68px; margin: -34px 0 0 -34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10, 10, 10, .55);
  border: 1px solid rgba(242, 242, 236, .4);
  color: var(--chu);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.tt__play svg { width: 30px; height: 30px; margin-left: 4px; }
.tt:hover .tt__play, .tt:focus-visible .tt__play { transform: scale(1.08); background: var(--tre); color: var(--nen); }

/* ---------- Ghi chép ---------- */
.notes { padding-block: clamp(56px, 9vw, 110px); }
.notes__lead { color: var(--chu-phu); max-width: 66ch; margin: 0 0 40px; }
.notes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.note {
  display: grid; gap: 8px; align-content: start;
  padding: 24px;
  border: 1px solid var(--vien);
  border-radius: 16px;
  background: var(--nen-2);
  text-decoration: none;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.note:hover, .note:focus-visible { border-color: var(--tre); transform: translateY(-3px); }
.note__kicker { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--tre-sang); }
.note__title { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; color: var(--chu); }
.note__desc { font-size: .92rem; color: var(--chu-phu); }

/* ---------- Câu hỏi ---------- */
.ask { padding-block: clamp(40px, 7vw, 90px); }
.ask__item { border-top: 1px solid var(--vien); }
.ask__item:last-child { border-bottom: 1px solid var(--vien); }
.ask__item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-size: 1.05rem; color: var(--chu);
}
.ask__item summary::-webkit-details-marker { display: none; }
.ask__item summary::after { content: "+"; color: var(--tre-sang); font-size: 1.4rem; line-height: 1; transition: transform .3s var(--ease); }
.ask__item[open] summary::after { transform: rotate(45deg); }
.ask__item summary:focus-visible { outline: 2px solid var(--tre); outline-offset: 4px; }
.ask__item p { color: var(--chu-phu); margin: 0 0 22px; max-width: 64ch; }

/* ---------- Kết ---------- */
.about-end { padding-block: clamp(64px, 11vw, 140px); text-align: center; }
.about-end__inner { display: grid; justify-items: center; }
.about-end__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 6vw, 3.8rem); line-height: 1.1; margin: 0 0 14px; }
.about-end__lead { color: var(--chu-phu); margin: 0 0 30px; }

/* ---------- Hiện dần và nét vẽ (chỉ khi có JS) ---------- */
.about-js .rv--wait { opacity: 0; transform: translateY(26px); }
.about-js .rv { transition: opacity .9s var(--ease), transform .9s var(--ease); }

/* Nét vẽ dần: pathLength=1 do about.js gắn, nên chỉ cần dasharray 1 */
.about-js .draw.is-wait .ln,
.about-js .draw.is-wait .vn__land,
.about-js .draw.is-wait .soil__root,
.about-js .draw.is-wait .soil__shoot { stroke-dasharray: 1; stroke-dashoffset: 1; }
.about-js .draw .ln,
.about-js .draw .vn__land,
.about-js .draw .soil__root,
.about-js .draw .soil__shoot {
  stroke-dasharray: 1;
  transition: stroke-dashoffset 1.6s var(--ease) var(--d, 0s);
}
.about-js .draw .vn__land { transition-duration: 2.4s; }
.about-js .draw.is-wait .vn__route,
.about-js .draw.is-wait .trip__path { stroke-dashoffset: 120; opacity: 0; }
.about-js .draw .vn__route,
.about-js .draw .trip__path { transition: stroke-dashoffset 2s var(--ease) 1.6s, opacity .6s var(--ease) 1.6s; }
.about-js .draw.is-wait .grove__leaves use,
.about-js .draw.is-wait .soil__sprout,
.about-js .draw.is-wait .vn__tre,
.about-js .draw.is-wait .vn__isl,
.about-js .draw.is-wait .vn__isl-name,
.about-js .draw.is-wait .vn__fav,
.about-js .draw.is-wait .vn__home,
.about-js .draw.is-wait .vn__name,
.about-js .draw.is-wait .trip__step,
.about-js .draw.is-wait .node { opacity: 0; }
.about-js .draw .grove__leaves use,
.about-js .draw .soil__sprout,
.about-js .draw .node { transition: opacity .8s var(--ease) var(--d, 1.2s); }
.about-js .draw .vn__tre,
.about-js .draw .vn__isl,
.about-js .draw .vn__isl-name { transition: opacity 1.2s var(--ease) 1s; }
.about-js .draw .vn__fav,
.about-js .draw .vn__home,
.about-js .draw .vn__name { transition: opacity .8s var(--ease) 1.8s; }
.about-js .draw .trip__step { transition: opacity .8s var(--ease) var(--d, 0s); }

/* ---------- Điện thoại ---------- */
@media (max-width: 860px) {
  .about-hero__inner, .forms__inner { grid-template-columns: minmax(0, 1fr); }
  .about-hero__art { max-width: 260px; order: -1; justify-self: start; }
  .notes__grid { grid-template-columns: minmax(0, 1fr); }

  /* Thân tre chuyển sang mép trái, chữ và hình xếp dọc bên phải */
  .spine { left: 12px; }
  .chapter { grid-template-columns: minmax(0, 1fr); padding-left: 44px; row-gap: 22px; }
  .chapter__text, .chapter--flip .chapter__text { grid-column: 1; grid-row: 1; justify-self: start; max-width: none; }
  .chapter__art, .chapter--flip .chapter__art { grid-column: 1; grid-row: 2; }
  .chapter__node { left: 12px; top: 6px; }
  .chapter__art svg, .chapter--flip .chapter__art svg { margin: 0; max-width: 320px; }
  .chapter--flip .chapter__art--photo { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .about-leaf { display: none; }
  .about-js .vn__glow { animation: none; }
  .about-js .rv, .about-js .draw * { transition: none !important; }
}
